c4cf543bb949d04d61e4ece9e275df77e3b7df9d
[oota-llvm.git] / utils / Spiff / misc.h
1 /*                        Copyright (c) 1988 Bellcore
2 **                            All Rights Reserved
3 **       Permission is granted to copy or use this program, EXCEPT that it
4 **       may not be sold for profit, the copyright notice must be reproduced
5 **       on copies, and credit should be given to Bellcore where it is due.
6 **       BELLCORE MAKES NO WARRANTY AND ACCEPTS NO LIABILITY FOR THIS PROGRAM.
7 */
8
9 #ifndef Z_INCLUDED
10
11 /*
12 **      make sure that if we have a XENIX system, that
13 **      we also treat it as an AT and T derivative
14 */
15 #ifdef XENIX
16 #ifndef ATT
17 #define ATT
18 #endif
19 #endif
20
21 #define Z_LINELEN       1024
22 #define Z_WORDLEN         20
23
24 extern char Z_err_buf[];
25
26 /*
27 **      helpful macros
28 */
29 #define Z_ABS(x)        (( (x) < (0) )? (-(x)):(x))
30 #define Z_MIN(x,y)      (( (x) < (y) )? (x):(y))
31 #define Z_MAX(x,y)      (( (x) > (y) )? (x):(y))
32
33 #define Z_ALLOC(n,type) ((type*) _Z_myalloc((n) * sizeof (type)))
34 extern int *_Z_myalloc();
35
36 /*
37 **      lines needed to shut up lint
38 */
39
40 extern void Z_complain();
41 extern void Z_fatal();
42 extern void Z_exceed();
43 extern void Z_setquiet();
44 #ifndef NOCHATTER
45 extern void Z_chatter();
46 #endif
47
48 #define Z_INCLUDED
49 #endif