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.he < prev    next >
Text File  |  1985-03-10  |  3KB  |  104 lines

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