home *** CD-ROM | disk | FTP | other *** search
/ Frozen Fish 1: Amiga / FrozenFish-Apr94.iso / bbs / alib / d6xx / d671 / tr2tex.lha / tr2tex / tr2tex.zoo / setups.h < prev    next >
C/C++ Source or Header  |  1990-12-07  |  3KB  |  157 lines

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