3 * (c) copyright 1987 by the Vrije Universiteit, Amsterdam, The Netherlands.
4 * See the copyright notice in the ACK home directory, in the file "Copyright".
13 #if ! defined(CHAR_UNSIGNED)
14 #define CHAR_UNSIGNED 0
18 #define Xchar(ch) (ch)
20 #define Xchar(ch) ((ch) & 0377)
23 #if ! defined(BYTE_ORDER)
24 #define BYTE_ORDER 0x3210
27 #if (BYTE_ORDER == 0x3210 || BYTE_ORDER == 0x1032)
28 #define uget2(c) (Xchar((c)[0]) | ((unsigned) Xchar((c)[1]) << 8))
29 #define Xput2(i, c) (((c)[0] = (i)), ((c)[1] = (i) >> 8))
30 #define put2(i, c) { register int j = (i); Xput2(j, c); }
32 #define uget2(c) (* ((unsigned short *) (c)))
33 #define Xput2(i, c) (* ((short *) (c)) = (i))
34 #define put2(i, c) Xput2(i, c)
37 #define get2(c) ((short) uget2(c))
39 #if BYTE_ORDER != 0x0123
40 #define get4(c) (uget2(c) | ((long) uget2((c)+2) << 16))
41 #define put4(l, c) { register long x=(l); \
43 Xput2((int)(x>>16),(c)+2); \
46 #define get4(c) (* ((long *) (c)))
47 #define put4(l, c) (* ((long *) (c)) = (l))
50 #define SECTCNT 3 /* number of sections with own output buffer */
52 #define WBUFSIZ (8*BUFSIZ)
54 #define WBUFSIZ BUFSIZ
66 extern struct fil __parts
[];
69 #define PARTRELO (PARTEMIT+SECTCNT)
70 #define PARTNAME (PARTRELO+1)
71 #define PARTCHAR (PARTNAME+1)
73 #define PARTDBUG (PARTCHAR+1)
75 #define PARTDBUG (PARTCHAR+0)
77 #define NPARTS (PARTDBUG + 1)
79 #define getsect(s) (PARTEMIT+((s)>=(SECTCNT-1)?(SECTCNT-1):(s)))