home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / PROGRAM / CP14.ZIP / CP.H < prev    next >
C/C++ Source or Header  |  1992-03-20  |  3KB  |  98 lines

  1. /*
  2. LISTING 4
  3. */
  4. #include <malloc.h>
  5. #include <conio.h>
  6. #include <stdio.h>
  7. #include <string.h>
  8. #include <stdlib.h>
  9.  
  10. #define MAXFNCTS   4000    /* maximum number of functions */
  11. #define MAXMODULES 500     /* number of different files */
  12.  
  13. struct Func_list           /* function statistics */
  14.    {
  15.    char *name;             /* function name */
  16.    int used;               /* times used in function */
  17.    };
  18.  
  19. struct Pages               /* linked list of pages */
  20.    {
  21.    int pg;                 /* page number */
  22.    struct Pages *next;     /* pointer to next page */
  23.    };
  24.  
  25. struct Module              /* module statistics */
  26.    {
  27.    char *name;             /* pointer to the module name */
  28.    char *cmt;              /* module comment/description */
  29.    unsigned int length;    /* lines in the module */
  30.    long size;              /* bytes in the module */
  31.    };
  32.  
  33. struct Mod_list            /* module control stucture */
  34.    {
  35.    struct Module *name;    /* pointer to module file name */
  36.    char *function;         /* name of function in file */
  37.    struct Func_list *ptr;  /* pointer to the first function */
  38.    int qty;                /* different functions called */
  39.    struct Pages *pg;       /* point to the page list */
  40.    int used;               /* times the function is used */
  41.    };
  42.  
  43. #if MAINMODULE != 0
  44.  
  45. struct Module Mnames[MAXMODULES], *pMnames;
  46. struct Mod_list Mlist[MAXMODULES], *pMlist, *pm[MAXMODULES];
  47. struct Func_list Flist[MAXFNCTS], *pFlist;
  48. char *rlist[50];           /* recursion function list */
  49. int Mqty = 0, Fqty = 0, Mcnt = 0;
  50. int page=1, line=0, depth=0;
  51. int fline;
  52. int firstcmt;
  53. char bfr[300];
  54. char tline[] = {"+-------------------------+"};
  55. char dbl[] = {"  "};
  56. char vbar[] = {"| "};
  57. char hbar[] = {"+-"};
  58. FILE *output;
  59. char pc[1000] = {0,0,0,0,0,0,0,0,0,0};
  60. char *pp;
  61. char filecmt[300];
  62. int pw = 80;               /* page width */
  63. int pl = 66;               /* page length */
  64. int lm = 8;                /* left margin */
  65. int rm = 8;                /* right margin */
  66. int width;                 /* the printable page width */
  67. char target[40] = "main";  /* target function */
  68. int stats = 0;
  69.  
  70. #else
  71.  
  72. extern struct Module Mnames[MAXMODULES], *pMnames;
  73. extern struct Mod_list Mlist[MAXMODULES], *pMlist;
  74. extern struct Mod_list *pm[MAXMODULES];
  75. extern struct Func_list Flist[MAXFNCTS], *pFlist;
  76. extern char *rlist[];       /* recursion function list */
  77. extern int Mqty, Fqty, Mcnt;
  78. extern int page, line, depth;
  79. extern int fline;
  80. extern int firstcmt;
  81. extern char bfr[];
  82. extern char tline[];
  83. extern char dbl[];
  84. extern char vbar[];
  85. extern char hbar[];
  86. extern FILE *output;
  87. extern char pc[];
  88. extern char *pp;
  89. extern char filecmt[];
  90. extern int pw;                    /* page width */
  91. extern int pl;                    /* page length */
  92. extern int lm;                    /* left margin */
  93. extern int rm;                    /* right margin */
  94. extern int width;                 /* the printable page width */
  95. extern char target[];             /* target function */
  96. extern int stats;
  97.  
  98. #endif