-/* $NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $ */
+/* $NetBSD: varpush.c,v 1.13 2016/06/05 18:39:02 christos Exp $ */
/*
* Copyright (c) 1982, 1993
#if 0
static char sccsid[] = "@(#)varpush.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: varpush.c,v 1.11 2011/08/26 09:01:07 tron Exp $");
+__RCSID("$NetBSD: varpush.c,v 1.13 2016/06/05 18:39:02 christos Exp $");
#endif
#endif /* not lint */
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;
}
if (strcmp(buf, _PATH_DEVNULL) != 0)
- setbuf(outf, (char *)NULL);
+ setbuf(outf, NULL);
}
#endif
} else {