26 |
|
#include <math.h> |
27 |
|
#include <stdlib.h> |
28 |
|
|
29 |
+ |
#include "rtmisc.h" |
30 |
+ |
#include "rtio.h" |
31 |
|
#include "rterror.h" |
32 |
|
#include "calcomp.h" |
33 |
|
|
47 |
|
unsigned int esupport = /* what to support */ |
48 |
|
E_VARIABLE | E_FUNCTION ; |
49 |
|
|
50 |
+ |
int eofc = 0; /* optional end-of-file character */ |
51 |
|
int nextc; /* lookahead character */ |
52 |
|
|
53 |
|
double (*eoper[])(EPNODE *) = { /* expression operations */ |
414 |
|
nextc = linbuf[linepos++]; |
415 |
|
if (!lnext) |
416 |
|
lnext = nextc; |
417 |
+ |
if (nextc == eofc) { |
418 |
+ |
nextc = EOF; |
419 |
+ |
break; |
420 |
+ |
} |
421 |
|
if (nextc == '{') { |
422 |
|
scan(); |
423 |
|
while (nextc != '}') |