home *** CD-ROM | disk | FTP | other *** search
/ Mega Top 1 / os2_top1.zip / os2_top1 / APPS / TEKST / TEXI2IPF / TEXI2IPF.H < prev    next >
Text File  |  1993-02-13  |  4KB  |  100 lines

  1. /*
  2.  * texi2ipf.h - texi2ipf general header
  3.  *
  4.  * texi2roff history:
  5.  *             Release 1.0a    August 1988
  6.  *             Release 2.0     January 1990
  7.  *
  8.  * Copyright 1988, 1989, 1990  Beverly A.Erlebacher
  9.  * erlebach@cs.toronto.edu    ...uunet!utai!erlebach
  10.  *
  11.  * texi2ipf history:
  12.  *             Release 1.0     February 1993
  13.  *
  14.  * Modified by Marcus Gröber, Fido 2:2402/61.1
  15.  *
  16.  */
  17.  
  18. /* troff macro packages supported */
  19. #define NONE   0       /* dummy value for error detection */
  20.  
  21. /* useful confusion-reducing things */
  22. #define STREQ(s,t) (*(s)==*(t) && strcmp(s, t)==0)
  23. #define NO     0
  24. #define YES    1
  25. #define ERROR  (-1)
  26.  
  27. #define MAXLINELEN 1024
  28. #define MAXILEVEL 10
  29. #define MAXARG 5        /* Maximum number of arguments in xref etc */
  30.  
  31. /* tag table size */
  32. #define MAXTAG 256
  33. #define MAXTAGSIZE 16
  34.  
  35.  
  36. /* miscellaneous troff command strings in macro header files. */
  37. struct misccmds {
  38.     char * init;       /* emit before the first input. this is the place to
  39.                         * put troff commands controlling default point size,
  40.                         * margin size, line length, etc.
  41.                         */
  42.     char * exit;       /* the opposite of init... */
  43.     char * dfltpara;   /* emit when 2 consecutive newlines are detected */
  44.                        /* in the input and the indentation level is <= 1. */
  45.     char * dfltipara;  /* same but for indentation level > 1.  */
  46.     char * dflttpara;  /* same but for two-column-table */
  47.     char * indentstart; /* emit to increase indent level for itemized list */
  48.     char * indentend;  /* emit to decrease indent level for itemized list */
  49.     char * heading;    /* heading string, requires printf with arguments  
  50.                         * for heading level (1..4) and modfiers (string)
  51.                         */
  52. };
  53.  
  54. extern struct misccmds * cmds;
  55.  
  56. struct tablerecd {
  57.     char *  texstart;  /* starting token for a Texinfo command */
  58.     char *  texend;    /* ending token for a Texinfo command */
  59.     char *  trfstart;  /* troff commands to emit when texstart is found */
  60.     char *  trfend;    /* troff commands to emit when texend is found */
  61.     char *  font;      /* font in effect between trfstart & trfend */
  62.     int  type;         /* kind of Texinfo command, as #defined below */
  63. };
  64.  
  65. /* Texinfo command types */
  66.  
  67. #define ESCAPED    0  /* special character (special to Texinfo) */
  68. #define INPARA     1  /* in-paragraph command */
  69. #define PARAM      2  /* Parameter to structuring command follows */
  70. #define DISCARD    3  /* not supported - discard following text */
  71. #define PARAGRAPH  4  /* applies to following paragraph */
  72. #define ITEMIZING  5  /* starts itemized list */
  73. #define ITEM       6  /* item in list */
  74. #define END        7  /* end construct */
  75. #define CHAR       8  /* really special char: dagger, bullet - scary, eh? */
  76. #define FOOTNOTE   9  /* footnote */
  77. #define DISPLAY   10  /* text block of the kind called a 'display' */
  78. #define INDEX     11  /* index entry */
  79. #define INCLUDE   12  /* include file command */
  80. #define SETCLEAR  13  /* SET or CLEAR command */
  81. #define CONDITION 14  /* IFSET or IFCLEAR command */
  82. #define NODE      15  /* NODE command */
  83. #define XREF      16  /* cross reference */
  84. #define COMMENT   17  /* comment: ignore rest of line */
  85. #define HEADING1  18  /* chapter structuring commands */
  86. #define HEADING2  19
  87. #define HEADING3  20
  88. #define HEADING4  21
  89. #define TEMPLATE  22  /* template command */
  90. #define TEMPLATE2 23  /* template command with cathegory */
  91. #define VALUE     24  /* VALUE command */
  92.                                                                                                                                                                                                                                              
  93. /* itemizing types */
  94. #define ITEMIZE    0
  95. #define ENUMERATE  1
  96. #define TABLE      2
  97. #define APPLY      3
  98.  
  99. #include <string.h>
  100.