AcornSearch - Acorn and RISC OS information searching
RISC OS Search
containing
"Nutty quip goes here!"
Home  |  About  |  Filebase Archive  |  StrongHelp Manuals  |  Newsgroups  |  Module Database

Declaration for 

GETSHORT from NetLib:arpa.h.nameser

(#define)
/*
* Inline versions of get/put short/long.  Pointer is advanced.
*
* These macros demonstrate the property of C whereby it can be
* portable or it can be elegant but rarely both.
*/

#define GETSHORT(s, cp) { \
     register u_char *t_cp = (u_char *)(cp); \
     (s) = ((u_int16_t)t_cp[0] << 8) \
         | ((u_int16_t)t_cp[1]) \
         ; \
     (cp) += INT16SZ; \
}



Open original source file

See header files's help page


[sh-index] Back to list of manuals