summaryrefslogtreecommitdiffstats
path: root/4/10.c
diff options
context:
space:
mode:
Diffstat (limited to '4/10.c')
-rw-r--r--4/10.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/4/10.c b/4/10.c
index baa6546..ac24b60 100644
--- a/4/10.c
+++ b/4/10.c
@@ -19,6 +19,8 @@ int main(int argc, char *argv[]) {
int type;
char s[MAXOP];
+ printf("Press CTRL+C to exit\n");
+
while (type == getop(s)) {
switch (type) {
case NUM:
@@ -45,4 +47,15 @@ int main(int argc, char *argv[]) {
}
return 0;
+}
+
+int ptr = 0;
+char line[MAXLINE];
+
+void mgetline() {
+ int i, c;
+ for (i = 0; i < MAXLINE - 1 && (c = getchar()) != '\n' && c != EOF; i++) {
+ line[i] = c;
+ }
+ line[i] = 0;
} \ No newline at end of file