| 7 |
|
* 4/1/86 |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
+ |
#include <stdlib.h> |
| 11 |
|
#include <stdio.h> |
| 12 |
< |
|
| 12 |
> |
#include <string.h> |
| 13 |
|
#include <setjmp.h> |
| 13 |
– |
|
| 14 |
|
#include <ctype.h> |
| 15 |
|
|
| 16 |
+ |
#include "rterror.h" |
| 17 |
|
#include "calcomp.h" |
| 18 |
|
|
| 18 |
– |
|
| 19 |
|
#define MAXRES 100 |
| 20 |
|
|
| 21 |
|
double result[MAXRES]; |
| 22 |
|
int nres = 0; |
| 23 |
|
|
| 24 |
– |
#ifndef BSD |
| 25 |
– |
#define index strchr |
| 26 |
– |
#endif |
| 27 |
– |
extern char *index(), *fgets(); |
| 28 |
– |
|
| 29 |
– |
|
| 24 |
|
jmp_buf env; |
| 25 |
|
int recover = 0; |
| 26 |
|
|
| 27 |
|
|
| 28 |
+ |
int |
| 29 |
|
main(argc, argv) |
| 30 |
|
int argc; |
| 31 |
|
char *argv[]; |
| 90 |
|
eclock++; |
| 91 |
|
continue; |
| 92 |
|
} |
| 93 |
< |
if ((cp = index(expr, '=')) != NULL || |
| 94 |
< |
(cp = index(expr, ':')) != NULL) { |
| 93 |
> |
if ((cp = strchr(expr, '=')) != NULL || |
| 94 |
> |
(cp = strchr(expr, ':')) != NULL) { |
| 95 |
|
if (cp[1]) |
| 96 |
|
scompile(expr, NULL, 0); |
| 97 |
|
else if (*cp == '=') { |
| 117 |
|
|
| 118 |
|
recover = 0; |
| 119 |
|
quit(0); |
| 120 |
+ |
return 0; /* pro forma exit */ |
| 121 |
|
} |
| 122 |
|
|
| 123 |
|
|