blob: 8a2d5d507d2b384129dac9ecdd339f5d565634ea (
plain) (
blame)
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
27
28
|
*** src/misc.c~ Wed May 26 06:51:17 1993
--- src/misc.c Wed Mar 13 23:37:13 1996
***************
*** 68,76 ****
HASHBLK *htinstall(); /* install hash table entry */
! if (gets(answerbuf) == NULL)
exit(1);
if (*answerbuf != '\0')
if (htinstall(mdefkey, answerbuf, mdefval, MDEFTABLE) == NULL)
exit(1);
}
--- 68,81 ----
HASHBLK *htinstall(); /* install hash table entry */
! if (fgets(answerbuf, ANSWERBUFSIZE, stdin) == NULL)
exit(1);
if (*answerbuf != '\0')
+ {
+ char *nlpos = strchr(answerbuf, '\n');
+ if (nlpos)
+ *nlpos = '\0';
if (htinstall(mdefkey, answerbuf, mdefval, MDEFTABLE) == NULL)
exit(1);
+ }
}
|