home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / gnustuff / tos / othergnu / texinf~1.zoo / texinfo.st / texi2roff / texi2roff.h < prev    next >
Encoding:
C/C++ Source or Header  |  1993-04-12  |  2.4 KB  |  74 lines

  1. /*
  2.  * texi2roff.h - texi2roff general header
  3.  *        Release 1.0a    August 1988
  4.  *        Release 2.0    January 1990
  5.  *
  6.  * Copyright 1988, 1989, 1990  Beverly A.Erlebacher
  7.  * erlebach@cs.toronto.edu    ...uunet!utai!erlebach
  8.  *
  9.  */
  10.  
  11. /* troff macro packages supported */
  12. #define NONE    0    /* dummy value for error detection */
  13. #define MS    1
  14. #define ME    2
  15. #define MM    3
  16.  
  17. /* useful confusion-reducing things */
  18. #define STREQ(s,t) (*(s)==*(t) && strcmp(s, t)==0)
  19. #define NO    0
  20. #define YES    1
  21. #define ERROR    (-1)
  22.  
  23. /* some [nt]roffs have big problems with long lines */
  24. #define MAXLINELEN      1024
  25.  
  26. /* miscellaneous troff command strings in macro header files. */
  27. struct misccmds {
  28.     char * init;    /* emit before the first input. this is the place to
  29.              * put troff commands controlling default point size,
  30.              * margin size, line length, etc.
  31.              */
  32.     char * dfltpara;    /* emit when 2 consecutive newlines are detected */
  33.             /* in the input and the indentation level is <= 1. */
  34.     char * dfltipara;    /* same but for indentation level > 1.  */
  35.     char * indentstart; /* emit to increase indent level for itemized list */
  36.     char * indentend;    /* emit to decrease indent level for itemized list */
  37. };
  38.  
  39. extern struct misccmds * cmds;
  40.  
  41. struct tablerecd {
  42.     char *  texstart;    /* starting token for a Texinfo command */
  43.     char *  texend;    /* ending token for a Texinfo command */
  44.     char *  trfstart;    /* troff commands to emit when texstart is found */
  45.     char *  trfend;    /* troff commands to emit when texend is found */
  46.     char *  font;    /* font in effect between trfstart & trfend */
  47.     int        type;    /* kind of Texinfo command, as #defined below */
  48. };
  49.  
  50. /* Texinfo command types */
  51.  
  52. #define ESCAPED        0    /* special character (special to Texinfo) */
  53. #define INPARA        1    /* in-paragraph command */
  54. #define HEADING        2    /* chapter structuring command */
  55. #define DISCARD        3    /* not supported - discard following text */
  56. #define PARAGRAPH   4    /* applies to following paragraph */
  57. #define ITEMIZING   5    /* starts itemized list */
  58. #define ITEM        6    /* item in list */
  59. #define END        7    /* end construct */
  60. #define CHAR        8    /* really special char: dagger, bullet - scary, eh? */
  61. #define FOOTNOTE    9    /* footnote */
  62. #define DISPLAY    10    /* text block of the kind called a 'display' */
  63. #define INDEX       11    /* index entry */
  64. #define INCLUDE       12    /* include file command */
  65.  
  66. /* portability */
  67. #ifdef BSD
  68. #include <strings.h>
  69. #define strchr  index
  70. #else
  71. #include <string.h>
  72. #endif
  73.  
  74.