home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / forut062.zip / ForUtil-0.62 / fflow / libflow.h < prev    next >
C/C++ Source or Header  |  1996-08-28  |  3KB  |  107 lines

  1. /*****
  2. * libflow.h : libflow header file.
  3. *
  4. * This file Version    $Revision: 1.2 $
  5. *
  6. * Creation date:    Mon Aug 19 15:49:49 GMT+0100 1996
  7. * Last modification:     $Date: 1996/08/28 17:48:35 $
  8. *
  9. * Author:        koen
  10. * (C)1995-1996 Ripley Software Development
  11. * All Rights Reserved
  12. *****/
  13. /*****
  14. * $Header: /usr/local/rcs/ForUtil/fflow/RCS/libflow.h,v 1.2 1996/08/28 17:48:35 koen Exp koen $
  15. *****/
  16. /*****
  17. * ChangeLog 
  18. * $Log: libflow.h,v $
  19. * Revision 1.2  1996/08/28 17:48:35  koen
  20. * Added proto's for print_file_stats and reset_scanner. 
  21. * Changed type from output_line in flowInfo struct from int to unsigned long.
  22. *
  23. * Revision 1.1  1996/08/27 19:14:53  koen
  24. * Initial Revision
  25. *
  26. *****/ 
  27.  
  28. #ifndef _libflow_h_
  29. #define _libflow_h_
  30.  
  31. #define DONOTHING    0 
  32. #define ADDFUNC        1
  33. #define ADDCALL        2
  34. #define True        1
  35. #define False        0 
  36. #define PROGRAM        1
  37. #define FUNCTION    2
  38. #define SUBROUTINE    3 
  39. #define CALL        4 
  40. #define KNOWN        5
  41. #define UNKNOWN        6 
  42. #define UNDEF        "<unknown>"
  43.  
  44. #define MAXDEPTH    64
  45. #define MAXDIRS        64
  46. #define MAXEXTS        8
  47. #define MAXIGNORE    64
  48.  
  49. /* data structure containing flow graph information */
  50. typedef struct _flowInfo{
  51.     char *path;            /* path of file */
  52.     char *file;            /* name of file */
  53.     char *name;            /* name of function */
  54.     int  defline;            /* line name is def'd/call is made */
  55.     int called;             /* number of times called */
  56.     unsigned long output_line;    /* line no in output file */
  57.     int Type;             /* type of record */
  58.     int num_args;            /* no of args */
  59.     int recursive;            /* true if this function is recursive */
  60.     struct _flowInfo *calls;    /* list of calls made in function */
  61.     struct _flowInfo *parent;    /* parent of call */
  62.     struct _flowInfo *next;        /* ptr to next record */
  63. }flowInfo; 
  64.  
  65. /* Bookkeeping data for flowgraph data */
  66. typedef struct _global_flow_data{
  67.     flowInfo *head;
  68.     flowInfo *current;
  69.     flowInfo *call_head;
  70.     flowInfo *current_call;
  71. }global_flow_data;
  72.  
  73. /**** Public Variables defined in libflow.c ****/
  74. extern global_flow_data global_flow;
  75. extern flowInfo *flow;
  76. extern int action, Type, full_names, quiet, maxdepth, have_first_routine;
  77. extern int num_ignore, num_dirs_to_visit, num_extensions, num_files;
  78. extern int numroutine, numcall, numfunc;
  79. extern char progname[32];
  80. extern char *ignore_list[MAXIGNORE];
  81. extern char *dirs_to_visit[MAXDIRS];
  82. extern char *ext_table[MAXEXTS];
  83. extern char **file_list;
  84. extern char curr_path[PATH_MAX], curr_file[NAME_MAX];
  85.  
  86. #ifdef __MSDOS__
  87. extern unsigned long dir_mem, ext_mem, file_mem, ign_mem;
  88. extern int need_mem_info_for_msdos;
  89. #endif
  90.  
  91. /**** Public Routines defined in libflow.c ****/
  92. extern flowInfo *sortAll(flowInfo *list);
  93. extern inline int ignore_this_file(char *file);
  94. extern inline void add_new_call(char *name, int callline, int num_args);
  95. extern inline void add_new_func(char *name, int callline, char *path, 
  96.     char *file, int num_args);
  97. extern FILE *reset_scanner(char *file_name);
  98. extern void print_unused_routines(FILE *file, flowInfo *list);
  99. extern void print_dos_memory_usage(void);
  100. extern void initialise(char *argv_nul);
  101. extern void install_sig_handlers(void);
  102. extern void print_settings(void);
  103. extern void print_file_stats(FILE *file, char *file_name, int num_lines);
  104.  
  105. /* Don't add anything after this endif! */
  106. #endif /* _libflow_h_ */
  107.