From 184e8656337f33654b849f00abcc6f6df3c17432 Mon Sep 17 00:00:00 2001 From: Sadeep Madurange Date: Wed, 22 Dec 2021 22:48:05 +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 7c9d777..301751c 100644 --- a/4/11.c +++ b/4/11.c @@ -129,7 +129,7 @@ int getop(char s[]) { static int pc = ' '; if (pc != ' ' && pc != '\t') { - c = pc; + s[0] = c = pc; pc = ' '; } else { while ((s[0] = c = getch()) == ' ' || c == '\t') @@ -153,7 +153,7 @@ int getop(char s[]) { ; s[i] = 0; if (i == 1) { - if ((c = getch()) == '=') + if (c == '=' || (c = getch()) == '=') rc = '='; else { pc = c; @@ -161,7 +161,7 @@ int getop(char s[]) { } } else { pc = c; - rc = strcmp("LOUT", s) == 0 || strlen(s) == 1 ? VAR : FUN; + rc = strcmp("LOUT", s) == 0 ? VAR : FUN; } } -- cgit v1.2.3