tree/vixie.h

Go to the documentation of this file.
00001 
00002 /* vixie.h - include file to define general vixie-type things
00003  * v1.0 vix 21jun86 [broken out of as.h]
00004  */
00005 
00006 /*
00007 There are two macros you can define before including this file which can
00008 change the things defined by this file.
00009     
00010 DEBUG: if defined, will cause enter / exit messages to be printed by the
00011 ENTER / EXIT / EXITV macros. If not defined, causes ENTER to do nothing, and
00012 EXIT / EXITV to generate 'return' without any messages. If defined, should
00013 be set to the name of the including module.
00014 
00015 MAIN: Should be defined for a program containing a main() function which is
00016 linked with other modules which include this file. Value is not important,
00017 only existence / nonexistence matters.
00018 */
00019 
00020 #ifndef _VIXIE_FLAG
00021 #define _VIXIE_FLAG
00022 
00023                                                 /*--- debugging stuff ---*/
00024 #define MAXPROC 256
00025 #if 0
00026 #define ENTER(proc) do { \
00027                         APC_PROCS[I_PROC] = proc; \
00028                         printf("ENTER(%d:%s.%s)\n", \
00029                                 I_PROC, DEBUG, APC_PROCS[I_PROC]); \
00030                         I_PROC++; \
00031                 } while (0)
00032 #define EXIT(value) do { \
00033                         I_PROC--; \
00034                         printf("EXIT(%d:%s.%s)\n", \
00035                                 I_PROC, DEBUG, \
00036                                 APC_PROCS[I_PROC]); \
00037                         return value; \
00038                 } while (0)
00039 #define EXITV do { \
00040                         I_PROC--; \
00041                         printf("EXITV(%d:%s.%s)\n", \
00042                                 I_PROC, DEBUG, \
00043                                 APC_PROCS[I_PROC]); \
00044                         return; \
00045                 } while (0)
00046 #else
00047 #define ENTER(proc)
00048 #define EXIT(value)     return value
00049 #define EXITV           return
00050 #endif
00051 #ifdef MAIN
00052 int I_PROC = 0;
00053 char *APC_PROCS[MAXPROC];
00054 #else
00055 extern int I_PROC;
00056 extern char *APC_PROCS[MAXPROC];
00057 #endif
00058 
00059 
00060 #ifndef TRUE
00061 #define TRUE            1
00062 #define FALSE           0
00063 #endif
00064 
00065 
00066 #endif                          /* _VIXIE_FLAG */

Generated on Mon May 28 04:25:26 2007 for BattletechMUX by  doxygen 1.4.7