replace calls to gets with fgets
authorNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 03:36:55 +0000 (03:36 +0000)
committerNathan Bryant <loanshark@uncensored.citadel.org>
Tue, 12 Mar 2002 03:36:55 +0000 (03:36 +0000)
citadel/ChangeLog
citadel/migratenet.c
citadel/parsedate.y

index 87fd837c5d7878c823ee0b3f4a2b9ef49cb543b0..849fe7052e08e42062a0641db826e3bed29e7d21 100644 (file)
@@ -1,4 +1,7 @@
  $Log$
+ Revision 590.142  2002/03/12 03:36:55  nbryant
+ replace calls to gets with fgets
+
  Revision 590.141  2002/03/12 03:19:09  nbryant
  more sprintf bashing. now the only ones left are in mime_parser
 
@@ -3444,3 +3447,4 @@ Sat Jul 11 00:20:48 EDT 1998 Nathan Bryant <bryant@cs.usm.maine.edu>
 
 Fri Jul 10 1998 Art Cancro <ajc@uncensored.citadel.org>
        * Initial CVS import 
+
index 1ecf2c1e705f0d0b9ffa19b3aa16b823322e692e..3717f83a9193752b965ebe9ae13dec978a92b2eb 100644 (file)
@@ -56,7 +56,7 @@ int main(int argc, char **argv)
 "ERASE any 5.90 configuration files that you have already set up.\n\n"
 "Are you sure you want to do this? ");
 
-       gets(buf);
+       fgets(buf, sizeof buf, stdin);
        if (tolower(buf[0]) != 'y') exit(0);
 
        get_config();
@@ -112,16 +112,16 @@ int main(int argc, char **argv)
 
                        fprintf(nodefp, "%s|", d->d_name);
                        printf("Enter shared secret: ");
-                       gets(buf);
+                       fgets(buf, sizeof buf, stdin);
                        if (buf[0] == 0) strcpy(buf, config.c_net_password);
                        fprintf(nodefp, "%s|", buf);
                        printf("Enter host name/IP : ");
-                       gets(buf);
+                       fgets(buf, sizeof buf, stdin);
                        if (buf[0] == 0) snprintf(buf, sizeof buf, "%s.citadel.org",
                                d->d_name);
                        fprintf(nodefp, "%s|", buf);
                        printf("Enter port number  : ");
-                       gets(buf);
+                       fgets(buf, sizeof buf, stdin);
                        if (buf[0] == 0) strcpy(buf, "504");
                        fprintf(nodefp, "%s\n", buf);
 
@@ -239,7 +239,7 @@ roomerror:  /* free this record */
                "old network configuration files.  Delete them now? "
        );
 
-       gets(buf);
+       fgets(buf, sizeof buf, stdin);
        if (tolower(buf[0]) != 'y') exit(0);
 
        get_config();
index 776781bbb6b8a3d3128d6b52a70f5fea851a7dc2..bf69da311a2a1524dd1d27d7e30fe0d34fbddb22 100644 (file)
@@ -799,7 +799,7 @@ main(int ac, char *av[])
     for ( ; ; ) {
        (void)printf("\t> ");
        (void)fflush(stdout);
-       if (gets(buff) == NULL || buff[0] == '\n')
+       if (fgets(buff, sizeof buff, stdin) == NULL || buff[0] == '\n')
            break;
 #if YYDEBUG
        if (strcmp(buff, "yydebug") == 0) {