30 |
|
int argc; |
31 |
|
char *argv[]; |
32 |
|
{ |
33 |
< |
char expr[512]; |
33 |
> |
char expr[2048]; |
34 |
> |
char *epos; |
35 |
|
FILE *fp; |
36 |
|
int i; |
37 |
|
register char *cp; |
50 |
|
recover = 1; |
51 |
|
eclock++; |
52 |
|
|
53 |
< |
while (fgets(expr, sizeof(expr), stdin) != NULL) { |
54 |
< |
for (cp = expr; *cp && *cp != '\n'; cp++) |
55 |
< |
; |
56 |
< |
*cp = '\0'; |
53 |
> |
epos = expr; |
54 |
> |
while (fgets(epos, sizeof(expr)-(epos-expr), stdin) != NULL) { |
55 |
> |
while (*epos && *epos != '\n') |
56 |
> |
epos++; |
57 |
> |
if (*epos && epos > expr && epos[-1] == '\\') { |
58 |
> |
epos[-1] = ' '; |
59 |
> |
continue; /* escaped newline */ |
60 |
> |
} |
61 |
> |
*epos = '\0'; |
62 |
> |
epos = expr; |
63 |
|
switch (expr[0]) { |
64 |
|
case '\0': |
65 |
|
continue; |