home *** CD-ROM | disk | FTP | other *** search
/ The C Users' Group Library 1994 August / wc-cdrom-cusersgrouplibrary-1994-08.iso / vol_300 / 355_02 / slk2.exe / SPP / TMP.H < prev    next >
C/C++ Source or Header  |  1991-06-09  |  5KB  |  214 lines

  1. /*
  2.     New Sherlock preprocessor -- function templates
  3.  
  4.     Source:  tmp.h
  5.     Started: September 28, 1987
  6.     Version:
  7.         April 1, 1988
  8.         February 16, 1989:
  9.             eliminate entries for so_dump, so_lws, so_hws.
  10.             add entry for so_disable.
  11.  
  12.  
  13.     PUBLIC DOMAIN SOFTWARE
  14.  
  15.     Sherlock, including the SPP, SDEL and SDIF programs, was placed in
  16.     the public domain on June 15, 1991, by its author,
  17.  
  18.         Edward K. Ream
  19.         166 North Prospect Ave.
  20.         Madison, WI 53705.
  21.         (608) 257-0802
  22.  
  23.     Sherlock may be used for any commercial or non-commercial purpose.
  24.  
  25.  
  26.     DISCLAIMER OF WARRANTIES
  27.  
  28.     Edward K. Ream (Ream) specifically disclaims all warranties,
  29.     expressed or implied, with respect to this computer software,
  30.     including but not limited to implied warranties of merchantability
  31.     and fitness for a particular purpose.  In no event shall Ream be
  32.     liable for any loss of profit or any commercial damage, including
  33.     but not limited to special, incidental consequential or other damages.
  34. */
  35.  
  36. /* dcl.c */
  37. void    allow_mkeys    (void);
  38. void    block_dcls    (void);
  39. void    dcl        (en_scope scope);
  40. void    type_name    (void);
  41. void    program        (void);
  42.  
  43. /* def.c */
  44. void    pp_def        (void);
  45. bool    outer_expand    (char *name, bool old_mflag);
  46.  
  47. /* dir.c */
  48. void    do_pp        (void);
  49.  
  50. /* exp.c */
  51. void    con_expr    (en_tokens delim);
  52. void    expr        (en_tokens delim);
  53. void    expr1        (en_tokens delim);
  54. bool    is_expr_tok    (void);
  55.  
  56. /* mem.c */
  57. void *    m_alloc        (int n);
  58. void    m_begin        (void);
  59. void    m_end        (void);
  60. void    m_free        (void * mem);
  61. void    m_stat        (void);
  62.  
  63. /* mst.c */
  64. void    mst_init    (void);
  65. void    mst2_init    (void);
  66. void    mst_delete    (char *name);
  67. void    mst_enter    (char *name, char *text, int nargs);
  68. bool    mst_lookup    (char *name, char **text, int *nargs);
  69. void    mst_unarg    (char *s);
  70.  
  71. /* pr.c */
  72. char *    pr_bool        (bool flag);
  73. char *    pr_ch        (int c);
  74. char *    pr_op        (en_tokens tok);
  75. char *  pr_scope    (en_scope scope);
  76. char *    pr_str        (char *s);
  77. char *    pr_tok        (void);
  78.  
  79. /* par.c */
  80. void    block        (void);
  81. void    must        (en_tokens token);
  82. void    need        (en_tokens token);
  83. bool    needend        (en_tokens token);
  84.  
  85. /* res.c */
  86. en_tokens is_reserved    (char *name, int length);
  87.  
  88. /* sem.c */
  89. bool    is_type        (void);
  90. bool    is_typedef    (char * id);
  91. void    sd_dcl        (en_scope scope);
  92. void    sd_end        (en_scope scope, en_tokens end_tok);
  93. void    sd_func        (void);
  94. void    sd_htype    (en_scope scope, en_tokens token);
  95. void    sd_id        (en_scope scope, char * id);
  96. void    sd_type        (en_scope scope, en_tokens token);
  97. void    sd_typedef    (en_scope scope);
  98.  
  99. void    sf_1body    (void);
  100. void    sf_2body    (void);
  101. void    sf_break    (void);
  102. void    sf_default    (void);
  103. void    sf_1do        (void);
  104. void    sf_2do        (void);
  105. void    sf_expr        (void);
  106. void    sf_1for        (bool empty_control);
  107. void    sf_2for        (void);
  108. void    sf_goto        (void);
  109. void    sf_1if        (void);
  110. void    sf_2if        (void);
  111. void    sf_3if        (void);
  112. void    sf_label    (void);
  113. void    sf_return    (void);
  114. void    sf_1switch    (void);
  115. void    sf_2switch    (void);
  116. void    sf_1while    (void);
  117. void    sf_2while    (void);
  118.  
  119. void    so_disable    (void);        /* 2/16/89 */
  120. void    so_entry    (void);
  121. void    so_1exit    (void);
  122. void    so_2exit    (bool flag);
  123. void    so_3exit    (void);
  124. void    so_leave    (void);
  125.  
  126. /* spp.c */
  127. void    begin_line    (bool flag);
  128. void    bump_line    (void);
  129. void    get_token    (void);
  130. void    get_xtoken    (void);
  131. void    get_t1        (bool expand_flag);
  132. int    con_token    (void);
  133. void    synonyms    (void);
  134. bool    is_sherlock    (char * id);
  135.  
  136. /* st.c */
  137. void    st_dump        (void);
  138. void    st_begin    (void);
  139. void    st_end        (void);
  140. void    st_enter    (char * symbol, en_tokens type, bool td_flag);
  141. void    st_init        (void);
  142. bool    st_lookup    (char * symbol, en_tokens * type, bool * td_flag);
  143.  
  144. /* str.c */
  145. char *    str_alloc    (char *s);
  146. void    str_cat        (char *s1, char *s2);
  147. char *    str_mcat    (char *s1, char *s2);
  148. void    str_cpy        (char *s1, char *s2);
  149. bool    str_eq        (char *s1, char *s2);
  150. int    str_len        (char *s);
  151. void    str_lower    (char *s);
  152. void    str_upper    (char *s);
  153.  
  154. /* sys.c */
  155. void    sysabort    (void);
  156. void    syspushback    (int c);
  157. void    sysnext        (void);
  158. void    syspremac    (char old_ch);
  159. void    sysnext        (void);
  160.  
  161. void    syshdump    (void);
  162. void    syshflush    (void);
  163. void    syshkill    (void);
  164. char *    syshnldel    (void);
  165.  
  166. void    sysiclose    (void);
  167. int    sysopen        (char *file_name);
  168. int    syscreat    (char *file_name);
  169. void    sysoclose    (void);
  170. void    sysnlput    (void);
  171. void    syscput        (char c);
  172. void    syssput        (char *s);
  173. void    sysend        (void);
  174. void    sysinit        (void);
  175. bool    sysargeq    (char *s1, char *s2);
  176. void    syscsts        (void);
  177. char *    systime        (void);
  178. char *    sysdate        (void);
  179.  
  180. /* tok.c */
  181. void    t_comment    (void);
  182. void    skip_comment    (void);
  183. void    t_id        (char *buffer, int max_length);
  184. en_tokens
  185.     t_number    (bool dot_flag);
  186. void    t_string    (char *out, int max_out, bool copy_flag);
  187. int    in_string    (char *in, char *out, int max_out);
  188.  
  189. /* utl.c */
  190. int    char_val    (char *s);
  191. unsigned int
  192.     str_val        (unsigned char *s);
  193.  
  194. int    conv2i        (char *string, int radix);
  195. void    conv2s        (int a, char *s);
  196. void    convl2s        (long a, char *s);
  197. void    conul2sc    (unsigned long a, char *s, int count);
  198. void    conl2h        (unsigned long a, char *s, int count);
  199.  
  200. void    skip_bl        (void);
  201. void    skip_1line    (void);
  202. void    skip_past    (void);
  203. void    skip_ws        (bool nl_flag);
  204.  
  205. void    fatal        (char *message);
  206. void    err_cont    (void);
  207. void    error        (char *message);
  208. void    err2        (char *mess1, char *mess2);
  209. void    err3        (char *mess1, char *mess2, char *mess3);
  210. void    warning        (char *message);
  211. void    warn2        (char *mess1, char *mess2);
  212. void    warn3        (char *mess1, char *mess2, char *mess3);
  213. void    syserr        (char *message);
  214.