{
do
ch = *bp++;
- while (ch == ' ' || ch == '\n');
+ while (isspace(ch));
}
static long number (void)
next();
else
error ();
+ } else {
+ char sign = ch;
+ if (sign == '+' || sign == '-') {
+ next();
+ }
+ f = number();
+ if (sign == '-')
+ f = -f;
}
- else
- f = number ();
-
return f;
}
static long expr(void)
{
- long e;
-
- if (ch == '+') {
- next();
- e = term ();
- } else if (ch == '-') {
- next();
- e = - term ();
- } else
- e = term ();
+ long e = term ();
while (ch == '+' || ch == '-') {
char op = ch;