summaryrefslogtreecommitdiff
path: root/gnu
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-07 14:10:45 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>1996-05-07 14:10:45 +0000
commit832cfb516bdb4cfba2e786128c0725274f88bd41 (patch)
tree2cfde493763890df935cef50e3e2d81262c8f8e7 /gnu
parent0beea9d0f00073068026e76a11a6a9f7bd1a7e22 (diff)
rcs used gets(); netbsd pr#2287; from beal@umiacs.UMD.EDU, cleaned up by me
Diffstat (limited to 'gnu')
-rw-r--r--gnu/usr.bin/rcs/lib/maketime.c4
-rw-r--r--gnu/usr.bin/rcs/lib/rcsrev.c17
2 files changed, 12 insertions, 9 deletions
diff --git a/gnu/usr.bin/rcs/lib/maketime.c b/gnu/usr.bin/rcs/lib/maketime.c
index dfddd5f8810..c37289014f1 100644
--- a/gnu/usr.bin/rcs/lib/maketime.c
+++ b/gnu/usr.bin/rcs/lib/maketime.c
@@ -30,7 +30,7 @@ Report problems and direct all questions to:
#include "maketime.h"
char const maketId[]
- = "$Id: maketime.c,v 1.1 1995/10/18 08:41:01 deraadt Exp $";
+ = "$Id: maketime.c,v 1.2 1996/05/07 14:10:40 deraadt Exp $";
static int isleap P((int));
static int month_days P((struct tm const*));
@@ -305,7 +305,7 @@ main(argc, argv) int argc; char **argv;
time_t default_time = time((time_t *)0);
int default_zone = argv[1] ? atoi(argv[1]) : 0;
char buf[1000];
- while (gets(buf)) {
+ while (fgets(buf, sizeof buf, 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 0e38fccdc25..b7620fef17e 100644
--- a/gnu/usr.bin/rcs/lib/rcsrev.c
+++ b/gnu/usr.bin/rcs/lib/rcsrev.c
@@ -28,8 +28,11 @@ Report problems and direct all questions to:
/*
* $Log: rcsrev.c,v $
- * Revision 1.1 1995/10/18 08:41:02 deraadt
- * Initial revision
+ * Revision 1.2 1996/05/07 14:10:44 deraadt
+ * rcs used gets(); netbsd pr#2287; from beal@umiacs.UMD.EDU, cleaned up by me
+ *
+ * Revision 1.1.1.1 1995/10/18 08:41:02 deraadt
+ * initial import of NetBSD tree
*
* Revision 1.3 1995/02/24 02:25:12 mycroft
* RCS 5.6.7.4
@@ -103,7 +106,7 @@ Report problems and direct all questions to:
#include "rcsbase.h"
-libId(revId, "$Id: rcsrev.c,v 1.1 1995/10/18 08:41:02 deraadt Exp $")
+libId(revId, "$Id: rcsrev.c,v 1.2 1996/05/07 14:10:44 deraadt Exp $")
static char const *branchtip P((char const*));
static char const *lookupsym P((char const*));
@@ -840,17 +843,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, sizeof(symrevno), 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, sizeof(date), stdin); aprintf(stderr,"%s; ",date);
aprintf(stderr,"Author: ");
- gets(author); aprintf(stderr,"%s; ",author);
+ fgets(author, sizeof author, stdin); aprintf(stderr,"%s; ",author);
aprintf(stderr,"State: ");
- gets(state); aprintf(stderr, "%s;\n", state);
+ fgets(state, state, 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) {