From 81b3b08c46f906e1969334975636f8cdb4dad464 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Tue, 21 Dec 2021 18:20:53 +0800 Subject: 4.11 --- 4/11.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to '4/11.c') diff --git a/4/11.c b/4/11.c index e6c0645..bb2d1f1 100644 --- a/4/11.c +++ b/4/11.c @@ -126,11 +126,11 @@ int getch() { return (bufp > 0) ? buf[--bufp] : getchar(); } int getop(char s[]) { int c, i, rc; - static int pc = EOF; + static int pc = ' '; - if (pc != EOF && pc != ' ' && pc != '\t') { + if (pc != ' ' && pc != '\t') { c = pc; - pc = EOF; + pc = ' '; } else { while ((s[0] = c = getch()) == ' ' || c == '\t') ; -- cgit v1.2.3