summaryrefslogtreecommitdiffstats
path: root/mille
diff options
context:
space:
mode:
authorchristos <christos@NetBSD.org>2016-06-05 18:39:02 +0000
committerchristos <christos@NetBSD.org>2016-06-05 18:39:02 +0000
commitcb2f5d807c883948c7603f43b8caf4a038e5dd9c (patch)
tree9c2eb3df579e20e44a47d5838ef2606a92fa2028 /mille
parent6a32d085073210e04dd9fad91e23128340629523 (diff)
downloadbsdgames-darwin-cb2f5d807c883948c7603f43b8caf4a038e5dd9c.tar.gz
bsdgames-darwin-cb2f5d807c883948c7603f43b8caf4a038e5dd9c.tar.zst
bsdgames-darwin-cb2f5d807c883948c7603f43b8caf4a038e5dd9c.zip
get rid of gets
Diffstat (limited to 'mille')
-rw-r--r--mille/varpush.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/mille/varpush.c b/mille/varpush.c
index 333b66fd..31963745 100644
--- a/mille/varpush.c
+++ b/mille/varpush.c
@@ -1,4 +1,4 @@
-/* $NetBSD: varpush.c,v 1.12 2011/08/31 16:24:56 plunky Exp $ */
+/* $NetBSD: varpush.c,v 1.13 2016/06/05 18:39:02 christos Exp $ */
/*
* Copyright (c) 1982, 1993
@@ -34,7 +34,7 @@
#if 0
static char sccsid[] = "@(#)varpush.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: varpush.c,v 1.12 2011/08/31 16:24:56 plunky Exp $");
+__RCSID("$NetBSD: varpush.c,v 1.13 2016/06/05 18:39:02 christos Exp $");
#endif
#endif /* not lint */
@@ -81,10 +81,12 @@ varpush(int file, ssize_t (*func)(int, const struct iovec *, int))
Topcard = &Deck[temp];
#ifdef DEBUG
if (Debug) {
- char buf[80];
+ char buf[80], *bp;
over:
printf("Debug file:");
- gets(buf);
+ fgets(buf, (int)sizeof(buf), stdin);
+ if ((bp = strchr(buf, '\n')) != NULL)
+ *bp = '\0';
if ((outf = fopen(buf, "w")) == NULL) {
warn("%s", buf);
goto over;