| 263 |
dpurdie |
1 |
/* CPP V5 -- function templates
|
|
|
2 |
|
|
|
3 |
Source: tmp.h
|
|
|
4 |
Started: September 28, 1987
|
|
|
5 |
Version: May 31, 1988.
|
|
|
6 |
|
|
|
7 |
Written by Edward K. Ream.
|
|
|
8 |
This software is in the public domain.
|
|
|
9 |
|
|
|
10 |
See the read.me file for disclaimer and other information.
|
|
|
11 |
*/
|
|
|
12 |
|
|
|
13 |
#ifndef MICRO_SOFT
|
|
|
14 |
|
|
|
15 |
/* cpp.c */
|
|
|
16 |
void copy_file (void);
|
|
|
17 |
void begin_line (bool flag);
|
|
|
18 |
void bump_line (void);
|
|
|
19 |
void get_token (bool expand_flag);
|
|
|
20 |
|
|
|
21 |
/* def.c */
|
|
|
22 |
void pp_def (void);
|
|
|
23 |
bool outer_expand (char *name, bool old_mflag);
|
|
|
24 |
|
|
|
25 |
/* dir.c */
|
|
|
26 |
void do_pp (void);
|
|
|
27 |
|
|
|
28 |
/* exp.c */
|
|
|
29 |
void con_expr (en_tokens delim);
|
|
|
30 |
void expr (en_tokens delim);
|
|
|
31 |
void expr1 (en_tokens delim);
|
|
|
32 |
bool is_expr_tok (void);
|
|
|
33 |
|
|
|
34 |
/* mem.c */
|
|
|
35 |
void * m_alloc (int n);
|
|
|
36 |
void m_begin (void);
|
|
|
37 |
void m_end (void);
|
|
|
38 |
void m_free (void * mem);
|
|
|
39 |
void m_stat (void);
|
|
|
40 |
|
|
|
41 |
/* mst.c */
|
|
|
42 |
void mst_init (void);
|
|
|
43 |
void mst2_init (void);
|
|
|
44 |
void mst_delete (char *name);
|
|
|
45 |
void mst_enter (char *name, char *text, int nargs);
|
|
|
46 |
bool mst_lookup (char *name, char **text, int *nargs);
|
|
|
47 |
void mst_unarg (char *s);
|
|
|
48 |
|
|
|
49 |
/* pr.c */
|
|
|
50 |
char * pr_bool (bool flag);
|
|
|
51 |
char * pr_ch (int c);
|
|
|
52 |
char * pr_op (en_tokens tok);
|
|
|
53 |
char * pr_str (char *s);
|
|
|
54 |
char * pr_tok (void);
|
|
|
55 |
|
|
|
56 |
/* str.c */
|
|
|
57 |
char * str_alloc (char *s);
|
|
|
58 |
void str_cat (char *s1, char *s2);
|
|
|
59 |
char * str_mcat (char *s1, char *s2);
|
|
|
60 |
void str_cpy (char *s1, char *s2);
|
|
|
61 |
bool str_eq (char *s1, char *s2);
|
|
|
62 |
int str_len (char *s);
|
|
|
63 |
void str_lower (char *s);
|
|
|
64 |
void str_upper (char *s);
|
|
|
65 |
|
|
|
66 |
/* sys.c */
|
|
|
67 |
void sysabort (void);
|
|
|
68 |
void syspushback (int c);
|
|
|
69 |
void sysnext (void);
|
|
|
70 |
void syspremac (char old_ch);
|
|
|
71 |
void sysiclose (void);
|
|
|
72 |
int sysopen (char *file_name);
|
|
|
73 |
int syscreat (char *file_name);
|
|
|
74 |
void sysoclose (void);
|
|
|
75 |
void sysnlput (void);
|
|
|
76 |
void syscput (char c);
|
|
|
77 |
void syssput (char *s);
|
|
|
78 |
void sysend (void);
|
|
|
79 |
void sysinit (void);
|
|
|
80 |
bool sysargeq (char *s1, char *s2);
|
|
|
81 |
void syscsts (void);
|
|
|
82 |
char * systime (void);
|
|
|
83 |
char * sysdate (void);
|
|
|
84 |
|
|
|
85 |
/* tok.c */
|
|
|
86 |
void t_comment (void);
|
|
|
87 |
void skip_comment (void);
|
|
|
88 |
void t_id (char *buffer, int max_length);
|
|
|
89 |
en_tokens
|
|
|
90 |
t_number (bool dot_flag);
|
|
|
91 |
void t_string (char *out, int max_out, bool copy_flag);
|
|
|
92 |
int in_string (char *in, char *out, int max_out);
|
|
|
93 |
|
|
|
94 |
/* utl.c */
|
|
|
95 |
int char_val (char *s);
|
|
|
96 |
unsigned int
|
|
|
97 |
str_val (unsigned char *s);
|
|
|
98 |
|
|
|
99 |
int conv2i (char *string, int radix);
|
|
|
100 |
void conv2s (int a, char *s);
|
|
|
101 |
void convl2s (long a, char *s);
|
|
|
102 |
void conul2sc (unsigned long a, char *s, int count);
|
|
|
103 |
void conl2h (unsigned long a, char *s, int count);
|
|
|
104 |
|
|
|
105 |
void skip_bl (void);
|
|
|
106 |
void skip_1line (void);
|
|
|
107 |
void skip_past (void);
|
|
|
108 |
void skip_pp (void);
|
|
|
109 |
void copy_ws (bool nl_flag);
|
|
|
110 |
void skip_ws (bool nl_flag);
|
|
|
111 |
|
|
|
112 |
void fatal (char *message);
|
|
|
113 |
void error (char *message);
|
|
|
114 |
void err2 (char *mess1, char *mess2);
|
|
|
115 |
void err3 (char *mess1, char *mess2, char *mess3);
|
|
|
116 |
void syserr (char *message);
|
|
|
117 |
|
|
|
118 |
#else
|
|
|
119 |
|
|
|
120 |
/* cpp.c */
|
|
|
121 |
void copy_file (void);
|
|
|
122 |
void begin_line (bool);
|
|
|
123 |
void bump_line (void);
|
|
|
124 |
void get_token (bool);
|
|
|
125 |
|
|
|
126 |
/* def.c */
|
|
|
127 |
void pp_def (void);
|
|
|
128 |
bool outer_expand (char *, bool);
|
|
|
129 |
|
|
|
130 |
/* dir.c */
|
|
|
131 |
void do_pp (void);
|
|
|
132 |
|
|
|
133 |
/* exp.c */
|
|
|
134 |
void con_expr (en_tokens);
|
|
|
135 |
void expr (en_tokens);
|
|
|
136 |
void expr1 (en_tokens);
|
|
|
137 |
bool is_expr_tok (void);
|
|
|
138 |
|
|
|
139 |
/* mem.c */
|
|
|
140 |
void * m_alloc (int);
|
|
|
141 |
void m_begin (void);
|
|
|
142 |
void m_end (void);
|
|
|
143 |
void m_free (void *);
|
|
|
144 |
void m_stat (void);
|
|
|
145 |
|
|
|
146 |
/* mst.c */
|
|
|
147 |
void mst_init (void);
|
|
|
148 |
void mst2_init (void);
|
|
|
149 |
void mst_delete (char *);
|
|
|
150 |
void mst_enter (char *, char *, int);
|
|
|
151 |
bool mst_lookup (char *, char **, int *);
|
|
|
152 |
void mst_unarg (char *);
|
|
|
153 |
|
|
|
154 |
/* pr.c */
|
|
|
155 |
char * pr_bool (bool);
|
|
|
156 |
char * pr_ch (int);
|
|
|
157 |
char * pr_str (char *);
|
|
|
158 |
char * pr_tok (void);
|
|
|
159 |
|
|
|
160 |
/* str.c */
|
|
|
161 |
char * str_alloc (char *);
|
|
|
162 |
void str_cat (char *, char *);
|
|
|
163 |
char * str_mcat (char *, char *);
|
|
|
164 |
void str_cpy (char *, char *);
|
|
|
165 |
bool str_eq (char *, char *);
|
|
|
166 |
int str_len (char *);
|
|
|
167 |
void str_lower (char *);
|
|
|
168 |
void str_upper (char *);
|
|
|
169 |
|
|
|
170 |
/* sys.c */
|
|
|
171 |
void sysabort (void);
|
|
|
172 |
void syspushback (int);
|
|
|
173 |
void sysnext (void);
|
|
|
174 |
void syspremac (char);
|
|
|
175 |
void sysiclose (void);
|
|
|
176 |
int sysopen (char *);
|
|
|
177 |
int syscreat (char *);
|
|
|
178 |
void sysoclose (void);
|
|
|
179 |
void sysnlput (void);
|
|
|
180 |
void syscput (char);
|
|
|
181 |
void syssput (char *);
|
|
|
182 |
void sysend (void);
|
|
|
183 |
void sysinit (void);
|
|
|
184 |
bool sysargeq (char *, char *);
|
|
|
185 |
void syscsts (void);
|
|
|
186 |
char * systime (void);
|
|
|
187 |
char * sysdate (void);
|
|
|
188 |
|
|
|
189 |
/* tok.c */
|
|
|
190 |
void t_comment (void);
|
|
|
191 |
void skip_comment (void);
|
|
|
192 |
void t_id (char *, int);
|
|
|
193 |
en_tokens
|
|
|
194 |
t_number (bool);
|
|
|
195 |
void t_string (char *, int, bool);
|
|
|
196 |
int in_string (char *, char *, int);
|
|
|
197 |
|
|
|
198 |
/* utl.c */
|
|
|
199 |
int char_val (char *);
|
|
|
200 |
unsigned int
|
|
|
201 |
str_val (unsigned char *);
|
|
|
202 |
|
|
|
203 |
int conv2i (char *, int);
|
|
|
204 |
void conv2s (int, char *);
|
|
|
205 |
void convl2s (long, char *);
|
|
|
206 |
void conul2sc (unsigned long, char *, int);
|
|
|
207 |
void conl2h (unsigned long, char *, int);
|
|
|
208 |
|
|
|
209 |
void skip_bl (void);
|
|
|
210 |
void skip_1line (void);
|
|
|
211 |
void skip_past (void);
|
|
|
212 |
void skip_pp (void);
|
|
|
213 |
void copy_ws (bool);
|
|
|
214 |
void skip_ws (bool);
|
|
|
215 |
|
|
|
216 |
void fatal (char *);
|
|
|
217 |
void error (char *);
|
|
|
218 |
void err2 (char *, char *);
|
|
|
219 |
void err3 (char *, char *, char *);
|
|
|
220 |
void syserr (char *);
|
|
|
221 |
|
|
|
222 |
#endif /* MICRO_SOFT */
|