Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/freebsd-ports
Path: blob/main/biology/babel/files/patch-menus.c
18160 views
1
--- menus.c.orig Tue Jan 21 16:52:36 1997
2
+++ menus.c Sun Nov 18 16:43:32 2001
3
@@ -63,9 +63,9 @@
4
}
5
}
6
printf("Input file name : ");
7
- gets(InfileName);
8
+ fgets(InfileName, BUFF_SIZE, stdin);
9
printf("Keywords : ");
10
- gets(InputKeywords);
11
+ fgets(InputKeywords, BUFF_SIZE, stdin);
12
13
if (strlen(InputKeywords) < 1)
14
strcpy(InputKeywords,"KEYWORDS GO HERE");
15
@@ -108,11 +108,11 @@
16
}
17
}
18
printf("Output file name : ");
19
- gets(OutfileName);
20
+ fgets(OutfileName, BUFF_SIZE, stdin);
21
if (has_keywords)
22
{
23
printf("Keywords : ");
24
- gets(OutputKeywords);
25
+ fgets(OutputKeywords, BUFF_SIZE, stdin);
26
if (strlen(OutputKeywords) < 1)
27
strcpy(OutputKeywords,"KEYWORDS GO HERE");
28
}
29
@@ -167,7 +167,7 @@
30
while (done == FALSE)
31
{
32
printf("Choice : ");
33
- gets(choice_string);
34
+ fgets(choice_string, sizeof(choice_string), stdin);
35
for (i = 0; i < (int) strlen(choice_string); i++)
36
{
37
if (!isdigit(choice_string[i]))
38
39