Annotation of 43BSDTahoe/new/courier/lib/courier.h, revision 1.1.1.1

1.1       root        1: /*     courier.h       4.1     83/07/03        */
                      2: 
                      3: /*
                      4:  * Predefined Courier types.
                      5:  */
                      6: typedef char           Boolean;
                      7: typedef unsigned short Cardinal;
                      8: typedef unsigned long  LongCardinal;
                      9: typedef short          Integer;
                     10: typedef long           LongInteger;
                     11: typedef char           *String;
                     12: typedef unsigned short Unspecified;
                     13: typedef unsigned long  LongUnspecified;
                     14: 
                     15: #define MoveByte(a, b, flag)   (flag ? *(char *)(b) = *(char *)(a), 1 : 1)
                     16: 
                     17: /*
                     18:  * Low-level byte moving, with byte-swapping.
                     19:  * Use these definitions for VAX and other low-enders.
                     20:  */
                     21: #if vax
                     22: #define MoveShort(a, b, flag)  (flag ? *(char *)(b) = *((char *)(a)+1), *((char *)(b)+1) = *(char *)(a), 1 : 1)
                     23: #define MoveLong(a, b, flag)   (flag ? *(char *)(b) = *((char *)(a)+3), *((char *)(b)+1) = *((char *)(a)+2), *((char *)(b)+2) = *((char *)(a)+1), *((char *)(b)+3) = *(char *)(a), 2 : 2)
                     24: #endif
                     25: 
                     26: /*
                     27:  * Low-level byte moving, without byte-swapping.
                     28:  * Use these definitions for SUN and other high-enders.
                     29:  */
                     30: #if sun
                     31: #define MoveShort(a, b, flag)  (flag ? *(short *)(b) = *(short *)(a), 1 : 1)
                     32: #define MoveLong(a, b, flag)   (flag ? *(long *)(b) = *(long *)(a), 2 : 2)
                     33: #endif
                     34: 
                     35: #define PackBoolean(p, buf, flag)              MoveByte(p, buf, flag)
                     36: #define UnpackBoolean(p, buf)                  MoveByte(buf, p, 1)
                     37: 
                     38: #define PackCardinal(p, buf, flag)             MoveShort(p, buf, flag)
                     39: #define UnpackCardinal(p, buf)                 MoveShort(buf, p, 1)
                     40: 
                     41: #define PackLongCardinal(p, buf, flag)         MoveLong(p, buf, flag)
                     42: #define UnpackLongCardinal(p, buf)             MoveLong(buf, p, 1)
                     43: 
                     44: #define PackInteger(p, buf, flag)              MoveShort(p, buf, flag)
                     45: #define UnpackInteger(p, buf)                  MoveShort(buf, p, 1)
                     46: 
                     47: #define PackLongInteger(p, buf, flag)          MoveLong(p, buf, flag)
                     48: #define UnpackLongInteger(p, buf)              MoveLong(buf, p, 1)
                     49: 
                     50: #define PackUnspecified(p, buf, flag)          MoveShort(p, buf, flag)
                     51: #define UnpackUnspecified(p, buf)              MoveShort(buf, p, 1)
                     52: 
                     53: #define PackLongUnspecified(p, buf, flag)      MoveLong(p, buf, flag)
                     54: #define UnpackLongUnspecified(p, buf)          MoveLong(buf, p, 1)
                     55: 
                     56: /*
                     57:  * External declarations.
                     58:  */
                     59: extern Unspecified *Allocate();
                     60: extern Unspecified *ReceiveCallMessage(), *ReceiveReturnMessage();

unix.superglobalmegacorp.com

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