summaryrefslogtreecommitdiff
path: root/biology/babel/files/patch-ab
diff options
context:
space:
mode:
Diffstat (limited to 'biology/babel/files/patch-ab')
-rw-r--r--biology/babel/files/patch-ab23
1 files changed, 12 insertions, 11 deletions
diff --git a/biology/babel/files/patch-ab b/biology/babel/files/patch-ab
index a8017dc3e65b..5859fc00e8d3 100644
--- a/biology/babel/files/patch-ab
+++ b/biology/babel/files/patch-ab
@@ -1,14 +1,17 @@
---- menus.c.orig Tue Jan 21 23:52:36 1997
-+++ menus.c Mon Dec 22 14:29:37 1997
+
+$FreeBSD$
+
+--- menus.c.orig Tue Jan 21 16:52:36 1997
++++ menus.c Sun Nov 18 16:43:32 2001
@@ -63,9 +63,9 @@
}
}
printf("Input file name : ");
- gets(InfileName);
-+ fgets(InfileName, BUFF_SIZE - 1, stdin);
++ fgets(InfileName, BUFF_SIZE, stdin);
printf("Keywords : ");
- gets(InputKeywords);
-+ fgets(InputKeywords, BUFF_SIZE - 1, stdin);
++ fgets(InputKeywords, BUFF_SIZE, stdin);
if (strlen(InputKeywords) < 1)
strcpy(InputKeywords,"KEYWORDS GO HERE");
@@ -17,23 +20,21 @@
}
printf("Output file name : ");
- gets(OutfileName);
-+ fgets(OutfileName, BUFF_SIZE - 1, stdin);
++ fgets(OutfileName, BUFF_SIZE, stdin);
if (has_keywords)
{
printf("Keywords : ");
- gets(OutputKeywords);
-+ fgets(OutputKeywords, BUFF_SIZE - 1, stdin);
++ fgets(OutputKeywords, BUFF_SIZE, stdin);
if (strlen(OutputKeywords) < 1)
strcpy(OutputKeywords,"KEYWORDS GO HERE");
}
-@@ -167,8 +167,8 @@
+@@ -167,7 +167,7 @@
while (done == FALSE)
{
printf("Choice : ");
- gets(choice_string);
-- for (i = 0; i < (int) strlen(choice_string); i++)
-+ fgets(choice_string, 99, stdin);
-+ for (i = 0; i < ((int) strlen(choice_string) - 1) ; i++)
++ fgets(choice_string, sizeof(choice_string), stdin);
+ for (i = 0; i < (int) strlen(choice_string); i++)
{
if (!isdigit(choice_string[i]))
- choice = 0;