-/* $NetBSD: getpar.c,v 1.16 2009/05/25 00:39:45 dholland Exp $ */
+/* $NetBSD: getpar.c,v 1.18 2009/08/12 08:54:54 dholland Exp $ */
/*
* Copyright (c) 1980, 1993
#if 0
static char sccsid[] = "@(#)getpar.c 8.1 (Berkeley) 5/31/93";
#else
-__RCSID("$NetBSD: getpar.c,v 1.16 2009/05/25 00:39:45 dholland Exp $");
+__RCSID("$NetBSD: getpar.c,v 1.18 2009/08/12 08:54:54 dholland Exp $");
#endif
#endif /* not lint */
** get yes/no parameter
**/
-const struct cvntab Yntab[] = {
+static const struct cvntab Yntab[] = {
{ "y", "es", (cmdfun)1, 1 },
{ "n", "o", (cmdfun)0, 0 },
{ NULL, NULL, NULL, 0 }
if (t == 0)
t = " \t\n;";
- (void)sprintf(format, "%%%d[^%s]", l, t);
+ (void)snprintf(format, sizeof(format), "%%%d[^%s]", l, t);
while (1) {
if ((f = testnl()) && s)
printf("%s: ", s);