Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/games/mille get rid of gets
details: https://anonhg.NetBSD.org/src/rev/41f0c3bd3492
branches: trunk
changeset: 815873:41f0c3bd3492
user: christos <christos%NetBSD.org@localhost>
date: Sun Jun 05 18:39:02 2016 +0000
description:
get rid of gets
diffstat:
games/mille/varpush.c | 10 ++++++----
1 files changed, 6 insertions(+), 4 deletions(-)
diffs (33 lines):
diff -r 9377e3b73637 -r 41f0c3bd3492 games/mille/varpush.c
--- a/games/mille/varpush.c Sun Jun 05 18:35:32 2016 +0000
+++ b/games/mille/varpush.c Sun Jun 05 18:39:02 2016 +0000
@@ -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 @@
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;
Home |
Main Index |
Thread Index |
Old Index