home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_100 / 150_01 / roff.h < prev    next >
Text File  |  1985-03-10  |  3KB  |  106 lines

  1. /* 4 MAY 81 */
  2. /*
  3.    Suggestion for compiling and linking -change to suit.
  4.  
  5.   compile roff1 and roff2                 
  6.   then link them together
  7.   */
  8.  
  9. int     debug;
  10. int PAGESTOP;
  11.  
  12. #define MAXLINE 300
  13. /* send error messages to console while in DIO */
  14.  
  15. #define DEBUG        ( debug != 0 )
  16. #define HUGE        135    /* generally large number */
  17. #define PAGEWIDTH    80    /* see RM_DEF */
  18. #define    COMMAND        '.'    /* all commands starts with this */
  19. #define    CONSOLE        -5    /* one of output options */
  20. #define PRINTER     -4    /* another */
  21. #define FILE        -3    /* another */
  22. #define    UNKNOWN        -1    /* returned if doesn't recg. command */
  23. #define    NO_VAL        -32760    /* returned when no argument w/commad */
  24. #define WE_HAVE_A_WORD   1       /* returned by getwrd func. */
  25. #define    NO        0
  26. #define    YES        1
  27. #define UNDERLINE    '\137'
  28. #define    CR        0x0D
  29. #define BACKSPACE    '\b'
  30. #define NUMSIGN        '#'    /* for title strings */
  31. #define NEWLINE        '\n'
  32. #define TAB        '\t'
  33. #define BLANK        ' '
  34. #define SQUOTE        0x27    /* single quote */
  35. #define DQUOTE        0x22    /* double quote */
  36. #define PAGELEN        66
  37.  
  38. #define FI        1    /* fill lines */
  39. #define TI        2    /* temporary indent */
  40. #define BP        3    /* begin page  */
  41. #define BR        4    /* causes break */
  42. #define CE        5    /* center line(s) */
  43. #define IN        7    /* left indent */
  44. #define LS        8    /* line spacing */
  45. #define NF        9    /* no fill */
  46. #define PL        10    /* set page length */
  47. #define RM        11    /* set right margin */
  48. #define SP        12    /* add blank line(s) */
  49. #define UL        13    /* underline line(s) */
  50. #define FO        14    /* footer title */
  51. #define HE        15    /* header title */
  52. #define M1        16    /* top margin */
  53. #define M2        17    /* second top margin */
  54. #define M3        18    /* first bottom margin */
  55. #define M4        19    /* bottom-most margin       */
  56.  
  57.  
  58. int FILL;    /* set to YES or NO */
  59. int LSVAL;    /* line spacing value -> default will be 1 */
  60. int TIVAL;    /* temporary indent -> default  0 */
  61. int INVAL;    /* left indent -> default  0 */
  62. int RMVAL;    /* right margin -> default  PAGEWIDTH */
  63. int CEVAL;    /* set equal to number of lines to be centered    */
  64. /* default is 0                                   */
  65. int ULVAL;    /* set equal to number of lines to be underlined */
  66. int SPVAL;    /* blank lines to be spaced down */
  67.  
  68.  
  69. int CURPAG;    /* current output page number; init = 0 */
  70. int NEWPAG;    /* next output page number; init = 1 */
  71. int LINENO;    /* next line to be printed; init = 0 */
  72. int PLVAL;    /* page length in lines; init=66 */
  73. int M1VAL;    /* margin before and including header */
  74. int M2VAL;    /* margin after header */
  75. int M3VAL;    /* margin after last text line */
  76. int M4VAL;    /* bottom margin, including footer */
  77. int BOTTOM;    /* last live line */
  78.  
  79. char HEADER[ MAXLINE ];    /*  header title */
  80. char FOOTER[ MAXLINE ];    /* footer title */
  81.  
  82.  
  83. /* defaults for global parameters */
  84.  
  85. #define FI_DEF        1
  86. #define    LS_DEF        1
  87. #define    IN_DEF        0
  88. #define    RM_DEF        80
  89. #define    TI_DEF        0
  90. #define    CE_DEF        0
  91. #define    UL_DEF        -1
  92. #define M1_DEF        2
  93. #define M2_DEF        2
  94. #define M3_DEF        2
  95. #define M4_DEF        2
  96.  
  97.  
  98. int DIR;    /* for "spreading" of lines    */
  99. int OUTWRDS;    /* no. words in outbuf; init = 0 */
  100. char OUTBUF [ MAXLINE*2 ];    /* lines to be filled collected here */
  101. ch 
  102. aren't. For instance:
  103.  
  104. .fi
  105. .ti 0
  106. this is a line of text