home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume6 / lbl / hdr / types.h < prev   
Encoding:
C/C++ Source or Header  |  1986-11-30  |  1.1 KB  |  53 lines

  1. /* (C) C.D.F. Miller, Heriot-Watt University, March 1984
  2.  *
  3.  *    Permission is hereby given to reproduce or modify this
  4.  *    software freely, provided that this notice be retained,
  5.  *    and that no use be made of the software for commercial
  6.  *    purposes without the express written permission of the
  7.  *    author.
  8.  */
  9.  
  10. #define    rg        register
  11. #define    us        unsigned
  12.  
  13. /*** Header levels ***/
  14. #define    NLEVELS    20
  15. typedef    us int            levels[NLEVELS];
  16.  
  17. /*** Header format ***/
  18. typedef    char            *format;
  19.  
  20. /*** Label type: name and current header levels ***/
  21. typedef struct type
  22. {
  23.     char        *t_name;
  24.     levels        t_levels;
  25.     format        t_format;
  26.     struct label    *t_labels;
  27.     struct type    *t_next;
  28. }                type;
  29.  
  30. /*** Label definition ***/
  31. typedef struct label
  32. {
  33.     char        *l_name;
  34.     type        *l_type;
  35.     levels        l_levels;
  36.     us int        l_bottom;        /* Last significant level */
  37.     char        *l_file;        /* File where defined */
  38.     long        l_line;            /* line   "      "    */
  39.     struct label    *l_next;
  40. }                label;
  41.  
  42. /*** Action routine ***/
  43. typedef int            (*func)();
  44.  
  45. /*** Command keyword ***/
  46. typedef struct keyword
  47. {
  48.     char    *k_name;
  49.     func    k_action;
  50.     us int    k_minargs;
  51.     us int    k_maxargs;
  52. }                keyword;
  53.