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(-) (limited to 'ch7') 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 v0.3b7&id=9ec059873772b201ff8fc3b124f6d2b942493e84&follow=1'>diff
path: root/AUTHORS (unfollow)
AgeCommit message (Expand)AuthorFilesLines
2018-03-18README.mdown: break line correctlyzlg1-1/+1
2018-03-18add 'playlog' list filterzlg2-2/+9
2018-03-13Update helpers a bitzlg1-2/+9
2018-03-13Make VGSTASH_DB_LOCATION point to a filezlg2-21/+20
2016-11-18Remove settings from helpers.shZe Libertine Gamer1-5/+0
2016-11-15Correct phrasing in README.Ze Libertine Gamer1-4/+4
2016-11-13DerpZe Libertine Gamer1-0/+1
2016-11-03Improve error handling in shell scriptsZe Libertine Gamer4-3/+23
2016-10-24Correct run_again, add recursionZe Libertine Gamer1-0/+4
2016-10-21Add quotes to correct behavior for arglistZe Libertine Gamer1-1/+1
2016-10-14updater.sh: add recursion, error handlingZe Libertine Gamer1-43/+101
2016-10-14Correct pipe-handling behaviorZe Libertine Gamer1-1/+9
2016-10-12Clarify a method to move between platformsZe Libertine Gamer1-2/+5