20 while((type
= getop(s
)) != EOF
)
42 printf("error: zero divisor\n");
48 push((int)(pop()) % (int)(op2
));
50 printf("error: zero divisor\n");
54 printf("\t%.8g\n", pop());
57 printf("error: unknown command %s\n", s
);
67 /* push f onto value stack */
73 printf("error: stack full\n");
77 /* pop and return top value from stack */
84 printf("error: stack empty\n");
92 /* get next operator or numberic operand */
97 while ((s
[0] = c
= getch()) == ' ' || c
== '\t')
100 if(!isdigit(c
) && c
!= '.')
104 while(isdigit(s
[++i
] = c
= getch()))
107 while(isdigit(s
[++i
] = c
= getch()))
120 return (bufp
> 0) ? buf
[--bufp
] : getchar();
126 printf("ungetch: too many characters\n");