Changeset 420 for trunk/Jgraph/token.c
- Timestamp:
- 02/27/08 07:13:31 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Jgraph/token.c
r418 r420 8 8 #include <math.h> 9 9 #include <stdio.h> 10 #include <string.h> 10 11 11 12 #ifdef LCC … … 36 37 static int getnew = 1; 37 38 static char oldchar = '\0'; 38 static oldcharvalid = 0;39 static int oldcharvalid = 0; 39 40 static char pipe = 0; 40 41 static int eof = 0; … … 61 62 #endif /*VMS*/ 62 63 63 set_input_file(s) 64 char *s; 65 { 66 FILE *f; 64 void set_input_file(char *s) 65 { 67 66 Iostack n; 68 67 … … 94 93 } 95 94 96 error_header()95 void error_header() 97 96 { 98 97 fprintf(stderr, "%s,%d: ", FILENAME, line); … … 107 106 } 108 107 109 ungettokenchar()108 void ungettokenchar() 110 109 { 111 110 oldcharvalid = 1; … … 132 131 } 133 132 134 get_comment()133 void get_comment() 135 134 { 136 135 if (eof) return; … … 149 148 } 150 149 151 static push_iostack(p) 152 int p; 150 static void push_iostack(int p) 153 151 { 154 152 Iostack n; … … 178 176 } 179 177 180 static pop_iostack()178 static void pop_iostack() 181 179 { 182 180 Iostack n; … … 196 194 n->stream = fopen(n->filename, "r"); 197 195 if (n->stream == NULL) { 198 fprintf(stderr, "Error: cannot open file \"%s\"\n", n-> stream);196 fprintf(stderr, "Error: cannot open file \"%s\"\n", n->filename); 199 197 exit(1); 200 198 } … … 211 209 } 212 210 213 static nexttoken() 211 int getsystemstring(void); 212 213 static void nexttoken() 214 214 { 215 215 if (eof) return; … … 256 256 } 257 257 getnew = 1; 258 return; 259 } 260 261 int getstring(s) 262 char *s; 258 } 259 260 int getstring(char *s) 263 261 { 264 262 nexttoken(); … … 268 266 } 269 267 270 int getint(i) 271 int *i; 268 int getint(int *i) 272 269 { 273 270 int j; … … 283 280 } 284 281 285 int getfloat(f) 286 float *f; 282 int getfloat(float *f) 287 283 { 288 284 int j; … … 335 331 { 336 332 char c; 337 int i, j,done, len, started;333 int i, done, len, started; 338 334 char *out_str; 339 335 … … 375 371 char *getlabel() 376 372 { 377 char c;378 373 char *txt, *new; 379 int i;380 374 381 375 txt = getmultiline(); … … 416 410 } 417 411 418 rejecttoken()412 void rejecttoken(void) 419 413 { 420 414 getnew = 0;
Note:
See TracChangeset
for help on using the changeset viewer.