Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
LSH
lsh
Commits
47ecadbf
Commit
47ecadbf
authored
Feb 26, 2000
by
Niels Möller
Browse files
* src/lsh_types.h (WRITE_UINT16): Added READ_UINT16 and
WRITE_UINT16 macros. Rev: src/lsh_types.h:1.38
parent
39624947
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/lsh_types.h
View file @
47ecadbf
...
...
@@ -121,6 +121,17 @@ do { \
(p)[3] = (i) & 0xff; \
} while(0)
/* Same, for 16-bit quantities */
#define READ_UINT16(p) \
((((UINT32) (p)[0]) << 16) \
| ((UINT32) (p)[1]))
#define WRITE_UINT16(p, i) \
do { \
(p)[0] = ((i) >> 8) & 0xff; \
(p)[1] = (i) & 0xff; \
} while(0)
/* Useful macros. */
#define MIN(a, b) (((a)>(b)) ? (b) : (a))
#define MAX(a, b) (((a)<(b)) ? (b) : (a))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment