1997-12-24 07:24:22 +00:00
|
|
|
--- menus.c.orig Tue Jan 21 23:52:36 1997
|
|
|
|
+++ menus.c Mon Dec 22 14:29:37 1997
|
1997-12-21 21:57:37 +00:00
|
|
|
@@ -63,9 +63,9 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("Input file name : ");
|
|
|
|
- gets(InfileName);
|
|
|
|
+ fgets(InfileName, BUFF_SIZE - 1, stdin);
|
|
|
|
printf("Keywords : ");
|
|
|
|
- gets(InputKeywords);
|
|
|
|
+ fgets(InputKeywords, BUFF_SIZE - 1, stdin);
|
|
|
|
|
|
|
|
if (strlen(InputKeywords) < 1)
|
|
|
|
strcpy(InputKeywords,"KEYWORDS GO HERE");
|
|
|
|
@@ -108,11 +108,11 @@
|
|
|
|
}
|
|
|
|
}
|
|
|
|
printf("Output file name : ");
|
|
|
|
- gets(OutfileName);
|
|
|
|
+ fgets(OutfileName, BUFF_SIZE - 1, stdin);
|
|
|
|
if (has_keywords)
|
|
|
|
{
|
|
|
|
printf("Keywords : ");
|
|
|
|
- gets(OutputKeywords);
|
|
|
|
+ fgets(OutputKeywords, BUFF_SIZE - 1, stdin);
|
|
|
|
if (strlen(OutputKeywords) < 1)
|
|
|
|
strcpy(OutputKeywords,"KEYWORDS GO HERE");
|
|
|
|
}
|
1997-12-24 07:24:22 +00:00
|
|
|
@@ -167,8 +167,8 @@
|
1997-12-21 21:57:37 +00:00
|
|
|
while (done == FALSE)
|
|
|
|
{
|
|
|
|
printf("Choice : ");
|
|
|
|
- gets(choice_string);
|
1997-12-24 07:24:22 +00:00
|
|
|
- for (i = 0; i < (int) strlen(choice_string); i++)
|
1997-12-21 21:57:37 +00:00
|
|
|
+ fgets(choice_string, 99, stdin);
|
1997-12-24 07:24:22 +00:00
|
|
|
+ for (i = 0; i < ((int) strlen(choice_string) - 1) ; i++)
|
1997-12-21 21:57:37 +00:00
|
|
|
{
|
|
|
|
if (!isdigit(choice_string[i]))
|
1997-12-24 07:24:22 +00:00
|
|
|
choice = 0;
|