Annotation of researchv10no/cmd/odist/pax/include/swap.h, revision 1.1.1.1

1.1       root        1: /*
                      2:  * Glenn Fowler
                      3:  * AT&T Bell Laboratories
                      4:  *
                      5:  * internal representation conversion support definitions
                      6:  */
                      7: 
                      8: #ifndef BYTE
                      9: 
                     10: #define BYTE           01              /* swap bytes                   */
                     11: #define HALF           02              /* swap halfwords               */
                     12: 
                     13: #define getbyte(op,p)  (*((unsigned char*)(p)))
                     14: #define putbyte(op,p,n)        (*(p)=(n))
                     15: 
                     16: #if __STDC__ || __cplusplus || c_plusplus
                     17: #if __cplusplus
                     18: extern "C" {
                     19: #endif
                     20: extern char*           memswap(int, char*, int);
                     21: extern int             gethalf(int, const char*);
                     22: extern long            getlong(int, const char*);
                     23: extern void            puthalf(int, char*, int);
                     24: extern void            putlong(int, char*, long);
                     25: #if __cplusplus
                     26: }
                     27: #endif
                     28: #else
                     29: extern char*           memswap();
                     30: extern int             gethalf();
                     31: extern long            getlong();
                     32: extern void            puthalf();
                     33: extern void            putlong();
                     34: #endif
                     35: 
                     36: #endif

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.