From ce7f0379df5dbfca9b86492ea5d2993196a1cc52 Mon Sep 17 00:00:00 2001 From: zlg Date: Wed, 12 Oct 2016 06:54:44 -0700 Subject: Actually run astyle on the file... --- ch7/7-05_postfix-calc-scanf.c | 46 +++++++++++++++++++++---------------------- 1 file changed, 23 insertions(+), 23 deletions(-) diff --git a/ch7/7-05_postfix-calc-scanf.c b/ch7/7-05_postfix-calc-scanf.c index 161f5f0..fa20f27 100644 --- a/ch7/7-05_postfix-calc-scanf.c +++ b/ch7/7-05_postfix-calc-scanf.c @@ -64,29 +64,29 @@ int main() { push(a); } else if (sscanf(s, "%s", buf)) { for (c = buf; *c; c++) { - switch (*c) { - case '+': - push(pop() + pop()); - break; - case '*': - push(pop() * pop()); - break; - case '-': - op2 = pop(); - push(pop() - op2); - break; - case '/': - op2 = pop(); - if (op2 != 0.0) { - push(pop() / op2); - } else { - printf("Error: Cannot divide by zero.\n"); - } - break; - default: - printf("Error: Unknown command %s\n", s); - break; - } + switch (*c) { + case '+': + push(pop() + pop()); + break; + case '*': + push(pop() * pop()); + break; + case '-': + op2 = pop(); + push(pop() - op2); + break; + case '/': + op2 = pop(); + if (op2 != 0.0) { + push(pop() / op2); + } else { + printf("Error: Cannot divide by zero.\n"); + } + break; + default: + printf("Error: Unknown command %s\n", s); + break; + } } if (ltr == '\n') { printf("%.8f\n", pop()); -- cgit v1.2.3-54-g00ecf