home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 January / usenetsourcesnewsgroupsinfomagicjanuary1994.iso / sources / unix / volume10 / tr2latex / setups.h < prev    next >
Encoding:
C/C++ Source or Header  |  1987-06-30  |  3.3 KB  |  152 lines

  1. /* setup file */
  2.  
  3. #ifndef NO_SGTTY
  4. #define HAVE_SGTTY 1            /* host has sgtty.h and ioctl.h */
  5. #endif
  6.  
  7. #include        <stdio.h>
  8. #include        <ctype.h>
  9. #ifdef MSC
  10. #include        <string.h>
  11. #include    <stdlib.h>    /* for type declarations */
  12. #include    <io.h>        /* for type declarations */
  13. #else
  14. #include        <strings.h>
  15. #endif
  16.  
  17. #if HAVE_SGTTY
  18. #include        <sys/ioctl.h>
  19. #include        <sgtty.h>
  20. #endif
  21.  
  22. #define    MAXLEN    65535        /* maximum length of document */
  23. #define    MAXWORD    250        /* maximum word length */
  24. #define    MAXLINE    500        /* maximum line length */
  25. #define    MAXDEF    200        /* maximum number of defines */
  26.  
  27. extern char *malloc();
  28. #ifdef IN_TR        /* can only declare globals once */
  29. #else
  30. extern
  31. #endif
  32. int math_mode,        /* math mode status */
  33.     de_arg,        /* .de argument */
  34.     IP_stat,        /* IP status */
  35.     QP_stat,        /* QP status */
  36.     TP_stat;        /* TP status */
  37.  
  38. #ifdef IN_TR        /* can only declare globals once */
  39. #else
  40. extern
  41. #endif
  42. struct defs {
  43.     char *def_macro;
  44.     char *replace;
  45.     int illegal;
  46. } def[MAXDEF];
  47.  
  48. #ifdef IN_TR        /* can only declare globals once */
  49. #else
  50. extern
  51. #endif
  52. struct mydefs {
  53.     char *def_macro;
  54.     char *replace;
  55.     int illegal;
  56.     int arg_no;
  57.     int par;        /* if it impiles (or contains) a par break */
  58. } mydef[MAXDEF];
  59.  
  60. #ifdef IN_TR        /* can only declare globals once */
  61. #else
  62. extern
  63. #endif
  64. struct measure {
  65.     char old_units[MAXWORD];    float old_value;
  66.     char units[MAXWORD];        float value;
  67.     char def_units[MAXWORD];    /* default units */
  68.     int def_value;            /* default value: 0 means take last one */
  69. } linespacing, indent, tmpind, space, vspace;
  70.  
  71. #ifdef ANSI
  72. char*    alternate(char*, char*, char*);
  73. int    CAP_GREEK(char*);
  74. char*    do_table(char*,char*,int);
  75. char*    end_env(char*);
  76. void    envoke_stat(int);
  77. char*    flip(char*,char*);
  78. char*    flip_twice(char*,char*,char*);
  79. int    get_arg(char*,char*,int ,int );
  80. void    get_brace_arg(char*,char*);
  81. int    get_defword(char*,char*,int*);
  82. int    get_line(char*,char*,int );
  83. int    get_multi_line(char*,char*);
  84. int    get_mydef(char*,char*);
  85. int    get_N_lines(char *,char *,int);
  86. int    get_no_math(char*,char*);
  87. char*    get_over_arg(char*,char*);
  88. int    get_ref(char*,char*);
  89. int    get_string(char*,char*,int );
  90. void    get_size(char*,char*,char*);
  91. int    get_sub_arg(char*,char*);
  92. int    get_till_space(char*,char*);
  93. int    getdef(char*,char*);
  94. int    getword(char*,char*);
  95. void    GR_to_Greek(char*,char*);
  96. int    is_def(char*);
  97. int    is_flip(char*);
  98. int    is_forbid(char*);
  99. int    is_mathcom(char*,char*);
  100. int    is_mydef(char *);
  101. int    is_troff_mac(char*,char*,int*);
  102. int    main(int ,char **);
  103. void    parse_units(char*,int,int,int);
  104. void    scrbuf(FILE*,FILE*);
  105. int    similar(char*);
  106. char*    skip_line(char*);
  107. int    skip_white(char*);
  108. char*    strapp(char*,char*);
  109. void    tmpbuf(FILE*,char*);
  110. void    troff_tex(char *,char *,int );
  111. #else
  112. char*    alternate();
  113. int    CAP_GREEK();
  114. char*    do_table();
  115. char*    end_env();
  116. void    envoke_stat();
  117. char*    flip();
  118. char*    flip_twice();
  119. int    get_arg();
  120. void    get_brace_arg();
  121. int    get_defword();
  122. int    get_line();
  123. int    get_multi_line();
  124. int    get_mydef();
  125. int    get_N_lines();
  126. int    get_no_math();
  127. char*    get_over_arg();
  128. int    get_ref();
  129. int    get_string();
  130. void    get_size();
  131. int    get_till_space();
  132. int    get_sub_arg();
  133. int    getdef();
  134. int    getword();
  135. void    GR_to_Greek();
  136. int    is_def();
  137. int    is_flip();
  138. int    is_forbid();
  139. int    is_mathcom();
  140. int    is_mydef();
  141. int    is_troff_mac();
  142. int    main();
  143. void    parse_units();
  144. void    scrbuf();
  145. int    similar();
  146. char*    skip_line();
  147. int    skip_white();
  148. char*    strapp();
  149. void    tmpbuf();
  150. void    troff_tex();
  151. #endif
  152.