summaryrefslogtreecommitdiffstats
path: root/gnu
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1995-12-01 08:26:36 +0000
committerjkh <jkh@FreeBSD.org>1995-12-01 08:26:36 +0000
commitd1e63e144e1d1f58d1cb76a6348c28ac3eab5da8 (patch)
treeb27e853e67898cee13dfa1deec0ddceae744bb8e /gnu
parent65334cb4cf7a51b0e20b2812e9d20b2dd88f42c5 (diff)
downloadFreeBSD-src-d1e63e144e1d1f58d1cb76a6348c28ac3eab5da8.zip
FreeBSD-src-d1e63e144e1d1f58d1cb76a6348c28ac3eab5da8.tar.gz
gets() -> fgets()
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/rcs/lib/maketime.c4
-rw-r--r--gnu/usr.bin/rcs/lib/rcsrev.c10
2 files changed, 7 insertions, 7 deletions
diff --git a/gnu/usr.bin/rcs/lib/maketime.c b/gnu/usr.bin/rcs/lib/maketime.c
index bf14bb9..0f98926 100644
--- a/gnu/usr.bin/rcs/lib/maketime.c
+++ b/gnu/usr.bin/rcs/lib/maketime.c
@@ -43,7 +43,7 @@ Report problems and direct all questions to:
#include "maketime.h"
char const maketId[]
- = "$Id: maketime.c,v 5.11 1995/06/16 06:19:24 eggert Exp $";
+ = "$Id: maketime.c,v 1.3 1995/10/28 21:49:29 peter Exp $";
static int isleap P((int));
static int month_days P((struct tm const*));
@@ -335,7 +335,7 @@ main(argc, argv) int argc; char **argv;
time_t default_time = time((time_t *)0);
long default_zone = argv[1] ? atol(argv[1]) : 0;
char buf[1000];
- while (gets(buf)) {
+ while (fgets(buf, 1000, stdin)) {
time_t t = str2time(buf, default_time, default_zone);
printf("%s", asctime(gmtime(&t)));
}
diff --git a/gnu/usr.bin/rcs/lib/rcsrev.c b/gnu/usr.bin/rcs/lib/rcsrev.c
index 2602843..c0d0bda 100644
--- a/gnu/usr.bin/rcs/lib/rcsrev.c
+++ b/gnu/usr.bin/rcs/lib/rcsrev.c
@@ -105,7 +105,7 @@ Report problems and direct all questions to:
#include "rcsbase.h"
-libId(revId, "$Id: rcsrev.c,v 1.3 1995/10/28 21:49:51 peter Exp $")
+libId(revId, "$Id: rcsrev.c,v 1.4 1995/10/29 22:06:29 peter Exp $")
static char const *branchtip P((char const*));
static char const *lookupsym P((char const*));
@@ -882,17 +882,17 @@ int argc; char * argv[];
/* all output goes to stderr, to have diagnostics and */
/* errors in sequence. */
aputs("\nEnter revision number or <return> or '.': ",stderr);
- if (!gets(symrevno)) break;
+ if (!fgets(symrevno, 100, stdin)) break;
if (*symrevno == '.') break;
aprintf(stderr,"%s;\n",symrevno);
expandsym(symrevno,&numricrevno);
aprintf(stderr,"expanded number: %s; ",numricrevno.string);
aprintf(stderr,"Date: ");
- gets(date); aprintf(stderr,"%s; ",date);
+ fgets(date, 20, stdin); aprintf(stderr,"%s; ",date);
aprintf(stderr,"Author: ");
- gets(author); aprintf(stderr,"%s; ",author);
+ fgets(author, 20, stdin); aprintf(stderr,"%s; ",author);
aprintf(stderr,"State: ");
- gets(state); aprintf(stderr, "%s;\n", state);
+ fgets(state, 20, stdin); aprintf(stderr, "%s;\n", state);
target = genrevs(numricrevno.string, *date?date:(char *)0, *author?author:(char *)0,
*state?state:(char*)0, &gendeltas);
if (target) {
OpenPOWER on IntegriCloud