mirror of
https://github.com/opnsense/src.git
synced 2026-04-22 23:02:02 -04:00
gets() -> fgets()
This commit is contained in:
parent
b203792f98
commit
d7c4e4ec1e
4 changed files with 7 additions and 7 deletions
|
|
@ -75,7 +75,7 @@ reg int (*func)(); {
|
|||
char buf[80];
|
||||
over:
|
||||
printf("Debug file:");
|
||||
gets(buf);
|
||||
fgets(buf, 80, stdin);
|
||||
if ((outf = fopen(buf, "w")) == NULL) {
|
||||
perror(buf);
|
||||
goto over;
|
||||
|
|
|
|||
|
|
@ -2149,7 +2149,7 @@ main ()
|
|||
while (!done)
|
||||
{
|
||||
fprintf (stdout, "history%% ");
|
||||
t = gets (line);
|
||||
t = fgets (line, 1024, stdin);
|
||||
|
||||
if (!t)
|
||||
strcpy (line, "quit");
|
||||
|
|
|
|||
|
|
@ -316,7 +316,7 @@ main (argc, argv)
|
|||
printf ("~expand: ");
|
||||
fflush (stdout);
|
||||
|
||||
if (!gets (line))
|
||||
if (!fgets(line, 512, stdin))
|
||||
strcpy (line, "done");
|
||||
|
||||
if ((strcmp (line, "done") == 0) ||
|
||||
|
|
|
|||
|
|
@ -123,7 +123,7 @@
|
|||
*/
|
||||
|
||||
#ifndef lint
|
||||
static char rcsid[] = "$Id: hash.c,v 1.2 1993/11/03 00:51:44 paul Exp $";
|
||||
static char rcsid[] = "$Id: hash.c,v 1.3 1995/05/30 04:46:18 rgrimes Exp $";
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
|
|
@ -837,7 +837,7 @@ main()
|
|||
for (;;)
|
||||
{
|
||||
printf("hash_test command: ");
|
||||
gets(answer);
|
||||
fgets(answer, 100, stdin);
|
||||
command = answer[0];
|
||||
if (isupper(command)) command = tolower(command); /* ecch! */
|
||||
switch (command)
|
||||
|
|
@ -929,7 +929,7 @@ char * description;
|
|||
char * malloc();
|
||||
|
||||
printf(" %s : ",description);
|
||||
gets(answer);
|
||||
fgets(answer, 100, stdin);
|
||||
/* will one day clean up answer here */
|
||||
retval = malloc(strlen(answer)+1);
|
||||
if (!retval)
|
||||
|
|
@ -967,7 +967,7 @@ whattable() /* determine number: what hash table to use */
|
|||
for (;;)
|
||||
{
|
||||
printf(" what hash table (%d:%d) ? ",0,TABLES-1);
|
||||
gets(answer);
|
||||
fgets(answer, 100, stdin);
|
||||
sscanf(answer,"%d",&number);
|
||||
if (number >= 0 && number<TABLES)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue