blob: e82785f41efc8ee767fb0b6c93e002a58f3a3b99 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
--- monitor.c.orig Sun Feb 22 02:19:59 1998
+++ monitor.c Thu Jun 18 21:05:50 1998
@@ -94,10 +94,13 @@
printf("> ");
fflush(stdout);
- if (gets(s) == NULL) {
+ if (fgets(s,256,stdin) == NULL) {
printf("\n> CONT\n");
strcpy(s, "CONT");
}
+
+ s[strlen(s)-1]='\0'; /* fgets provision */
+
t = get_token(s);
if (t == NULL) {
continue;
@@ -179,7 +182,7 @@
char gash[4];
printf("Press return to continue: ");
- gets(gash);
+ fgets(gash,4,stdin);
nlines = 0;
}
}
|