annotate lisp/oobr/tree-x/defs.h @ 0:376386a54a3c r19-14

Import from CVS: tag r19-14
author cvs
date Mon, 13 Aug 2007 08:45:50 +0200
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
1 /* ----------------------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
2 * File : defs.h
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
3 * Purpose : general defines for dynamic tree program
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
4 * ----------------------------------------------------------------------------
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
5 */
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
6
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
7 #include <stdio.h>
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
8
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
9 #define ASSERT(x, msg) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
10 if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); exit(0); }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
11
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
12 #define NASSERT(x, msg) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
13 if ((x) == NULL) { fprintf(stderr, "%s: %s\n", ProgramName, msg); \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
14 return (NULL); }
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
15
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
16 #define WARN(msg) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
17 fprintf(stderr, "%s: %s\n", ProgramName, msg)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
18
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
19 #define WARN_1(msg, arg1) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
20 fprintf(stderr, "%s: %s %s", ProgramName, msg, arg1)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
21
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
22 #define WARN_4(msg1, arg1, msg2, arg2) \
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
23 fprintf(stderr, "%s: %s %s; %s %s\n", ProgramName, msg1, arg1, msg2, arg2)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
24
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
25 #ifdef GLOBALS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
26 #define Global
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
27 #else
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
28 #define Global extern
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
29 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
30
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
31 Global char *ProgramName;
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
32
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
33 #undef Global
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
34 #undef GLOBALS
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
35
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
36 #ifndef TRUE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
37 #define TRUE 1
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
38 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
39
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
40 #ifndef FALSE
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
41 #define FALSE 0
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
42 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
43
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
44 #ifndef NULL
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
45 #define NULL 0L
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
46 #endif
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
47
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
48 #ifndef MAX
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
49 #define MAX(x, y) ((x) < (y)) ? (y) : (x)
376386a54a3c Import from CVS: tag r19-14
cvs
parents:
diff changeset
50 #endif