summaryrefslogtreecommitdiffstats
path: root/4/3.c
diff options
context:
space:
mode:
authorSadeep Madurange <smadurange@users.noreply.github.com>2021-12-06 19:31:08 +0800
committerSadeep Madurange <smadurange@users.noreply.github.com>2021-12-06 19:31:08 +0800
commit7162cc3ef2f00bca7df69905728e468204054fee (patch)
tree64cb8fe24041f4540cc5126b6684900119167b68 /4/3.c
parentd73892efc5fa58331fb4884399cf4253b9832a7f (diff)
downloadk&r-exercises-7162cc3ef2f00bca7df69905728e468204054fee.tar.gz
4.3
Diffstat (limited to '4/3.c')
-rw-r--r--4/3.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/4/3.c b/4/3.c
index 55ef9f9..0dce6ce 100644
--- a/4/3.c
+++ b/4/3.c
@@ -87,7 +87,6 @@ void ungetch(int c) {
int getop(char s[]) {
int i, c;
-
while ((s[0] = c = getch()) == ' ' || c == '\t')
;
s[1] = 0;
@@ -103,7 +102,7 @@ int getop(char s[]) {
while (isdigit(s[++i] = c = getch()))
;
s[i] = 0;
-
+
if (c != EOF)
ungetch(c);