home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 364_01 / ca.h < prev    next >
C/C++ Source or Header  |  1992-05-23  |  3KB  |  137 lines

  1.  
  2. #if !defined(FUNC_STRUC)
  3.  
  4. struct calls_from
  5.  {
  6.   struct func *caller;
  7.   struct calls_from *next;
  8.  };
  9.  
  10. struct func
  11.  
  12.  {
  13.   char name[32];
  14.   char module[9];
  15.   unsigned line_no;           /* first line of function:  declaration */
  16.   unsigned endfunc_line;     /* last line of function */
  17.   int fnptr;
  18.   struct func *next;         /* alphabetized linked list  */
  19.   struct func *next_function;  /* list in order of appearance in file */
  20.   struct calls_from  *first_call;
  21.  } ;
  22. #define FUNC_STRUC
  23. #endif
  24.  
  25. #if !defined(_GLOBALS_LIST)
  26. #define _MAX_MODS 6
  27. #define FIRST_MODS_CHECK 0
  28. #define FINAL_MODS_CHECK 1
  29. /* used in: GLOBL_CA,  INTF_CA, LINKL_CA, UTILG_CA */
  30. struct globals_list
  31.  {
  32.   char *variable;
  33.   char *module;
  34.   int type;
  35.   char *type_ident;    /* ptr to name of typedef type if type == TYPEDEF */
  36.   char *struct_ident; /* point to name of structure or union */
  37.   char *complex_decl;
  38.   char storage;       /* type of storage */
  39.   int modifiers[_MAX_MODS];     /* list of modifiers & qualfiers */
  40.   struct globals_list *next;
  41.  };
  42. #define _GLOBALS_LIST
  43. #endif
  44.  
  45. struct user_typeStack
  46. {
  47.    char * type;
  48.    struct user_typeStack *next;
  49. };
  50.  
  51. struct filespec
  52.  {
  53.  char *path;
  54.  struct filespec *next;
  55.  };
  56.  
  57. #define COMPLEX_INI  -1
  58. #define NO_COMPLEX   0
  59. #define COMPLEX_FN   0x10
  60. #define COMPLEX_VAR  0x20
  61. #define STD_DECL     0x30
  62.  
  63. #if defined (TYPEDEF_DEFINE)
  64.   #define __TYPEDEFS 60
  65.   #define __TYPEDEFSIZE 32
  66.   #define _MOD_     0x1
  67.   #define _TYPE_    0x2
  68.   #define _FNPTR_  ( COMPLEX_FN  | _TYPE_ )
  69.   #define _CMPLV_  ( COMPLEX_VAR | _TYPE_ )
  70.  #if defined (TDEF_CA)
  71.    char __type_def[__TYPEDEFS][__TYPEDEFSIZE];
  72.    int  __typ_mod[__TYPEDEFS];
  73.    int __typedef_count;
  74.    int __typenum;
  75.  #elif defined (TDEF_EXTERNAL)
  76.    extern char __type_def[__TYPEDEFS][__TYPEDEFSIZE];
  77.    extern int  __typ_mod[__TYPEDEFS];
  78.  #if defined (TDEF_NUM )
  79.    extern int __typedef_count;
  80.  #endif
  81.    extern int __typenum;
  82.  #endif
  83. #endif
  84.  
  85. #if defined (INCLUDEFILES_DEFINE)
  86. #define INCLF_LIMIT 8
  87. struct includeFILE {
  88.   FILE *address[INCLF_LIMIT];
  89.   char file[INCLF_LIMIT][80];
  90.   int level;
  91.   };
  92. #endif
  93.  
  94. #define BIGBUFSIZE  350 + 261
  95. #define LAST_FUNCTION 0xFFFF
  96. #define NO_TOKEN       0X0
  97. #define IS_TOKEN       0X1
  98. #define PTR_ASSIGNED   0X2
  99.  
  100.  
  101. #if !defined (IFDEFS_DEFINED)
  102.  
  103. /* temporary storage of information on if/def defines for testing */
  104. /* & analysis of truth values in ifdef_true() */
  105. typedef struct if_def {
  106.     char *def1;              /* definition name */
  107.     char *def2;
  108.     unsigned int boolean1;   /* truth value of def */
  109.     unsigned int boolean2;
  110.     int op;                 /*  relational operator in if/def expresion: */
  111.                 /*  either && or || */
  112. } IF_DEF;
  113. #define IFDEFS_DEFINED
  114. #endif
  115.  
  116. #if defined(EXIT_CODES)
  117. enum {
  118.     NO_IFDEF_STK, BAD_IFDEF_STK,         /* IFDEF_CA */   /* memory */
  119.  
  120.     NO_USER_TYP_STK, BAD_USER_TYP_STK,   /* UTLG_CA */    /* memory */
  121.  
  122.     BAD_FILE_BUF, NO_FILE_STR,           /* INTF_CA */    /* memory */
  123.     BAD_ARGV,  BAD_FILE, BAD_PROJ,                        /* files  */
  124.  
  125.     NO_BSEARCH_ARRAY,                     /* XRF_CA  */    /* memory */
  126.     NULL_POINTER
  127.     };
  128.  
  129. #endif
  130.  
  131. /* defines for splitting up report file */
  132. #define START_RPT     -1
  133. #define FIRST_SPLIT    0
  134. #define SECOND_SPLIT   1
  135. #define THIRD_SPLIT    2
  136.  
  137.