Fix a few of the games to use getprogname() in their usage() functions.
Suggested by Joerg. XXX There are probably many more that have their progname hard-coded, but XXX I'm not up for a wholesale roto-till at the moment.
This commit is contained in:
parent
1c22c7521b
commit
6688046702
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: bog.c,v 1.25 2010/12/05 04:11:51 pgoyette Exp $ */
|
||||
/* $NetBSD: bog.c,v 1.26 2010/12/05 04:34:22 pgoyette Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1993
|
||||
|
@ -42,7 +42,7 @@ __COPYRIGHT("@(#) Copyright (c) 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)bog.c 8.2 (Berkeley) 5/4/95";
|
||||
#else
|
||||
__RCSID("$NetBSD: bog.c,v 1.25 2010/12/05 04:11:51 pgoyette Exp $");
|
||||
__RCSID("$NetBSD: bog.c,v 1.26 2010/12/05 04:34:22 pgoyette Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -707,6 +707,7 @@ static void
|
|||
usage(void)
|
||||
{
|
||||
(void) fprintf(stderr,
|
||||
"usage: boggle [-bd] [-s#] [-t#] [-w#] [+[+]] [boardspec]\n");
|
||||
"usage: %s [-bd] [-s#] [-t#] [-w#] [+[+]] [boardspec]\n",
|
||||
getprogname());
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: pom.c,v 1.19 2009/08/12 08:23:20 dholland Exp $ */
|
||||
/* $NetBSD: pom.c,v 1.20 2010/12/05 04:34:22 pgoyette Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1989, 1993
|
||||
|
@ -41,7 +41,7 @@ __COPYRIGHT("@(#) Copyright (c) 1989, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)pom.c 8.1 (Berkeley) 5/31/93";
|
||||
#else
|
||||
__RCSID("$NetBSD: pom.c,v 1.19 2009/08/12 08:23:20 dholland Exp $");
|
||||
__RCSID("$NetBSD: pom.c,v 1.20 2010/12/05 04:34:22 pgoyette Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -272,6 +272,7 @@ static void
|
|||
badformat(void)
|
||||
{
|
||||
warnx("illegal time format");
|
||||
(void)fprintf(stderr, "usage: pom [[[[[cc]yy]mm]dd]HH]\n");
|
||||
(void)fprintf(stderr, "usage: %s [[[[[cc]yy]mm]dd]HH]\n",
|
||||
getprogname());
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: snake.c,v 1.26 2009/08/12 08:48:15 dholland Exp $ */
|
||||
/* $NetBSD: snake.c,v 1.27 2010/12/05 04:34:22 pgoyette Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
|
@ -39,7 +39,7 @@ __COPYRIGHT("@(#) Copyright (c) 1980, 1993\
|
|||
#if 0
|
||||
static char sccsid[] = "@(#)snake.c 8.2 (Berkeley) 1/7/94";
|
||||
#else
|
||||
__RCSID("$NetBSD: snake.c,v 1.26 2009/08/12 08:48:15 dholland Exp $");
|
||||
__RCSID("$NetBSD: snake.c,v 1.27 2010/12/05 04:34:22 pgoyette Exp $");
|
||||
#endif
|
||||
#endif /* not lint */
|
||||
|
||||
|
@ -180,9 +180,13 @@ main(argc, argv)
|
|||
case '?':
|
||||
default:
|
||||
#ifdef DEBUG
|
||||
fputs("usage: snake [-d seed] [-w width] [-l length] [-t]\n", stderr);
|
||||
fprintf(stderr,
|
||||
"usage: %s [-d seed] [-w width] [-l length] [-t]\n",
|
||||
getprogname());
|
||||
#else
|
||||
fputs("usage: snake [-w width] [-l length] [-t]\n", stderr);
|
||||
fprintf(stderr,
|
||||
"usage: %s [-w width] [-l length] [-t]\n",
|
||||
getprogname());
|
||||
#endif
|
||||
exit(1);
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: tetris.c,v 1.22 2009/08/12 08:51:21 dholland Exp $ */
|
||||
/* $NetBSD: tetris.c,v 1.23 2010/12/05 04:34:23 pgoyette Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1992, 1993
|
||||
|
@ -328,6 +328,7 @@ onintr(int signo __unused)
|
|||
static void
|
||||
usage(void)
|
||||
{
|
||||
(void)fprintf(stderr, "usage: tetris [-ps] [-k keys] [-l level]\n");
|
||||
(void)fprintf(stderr, "usage: %s [-ps] [-k keys] [-l level]\n",
|
||||
getprogname());
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue