summaryrefslogtreecommitdiffstats
path: root/snake
diff options
context:
space:
mode:
authorpgoyette <pgoyette@NetBSD.org>2010-12-05 04:34:22 +0000
committerpgoyette <pgoyette@NetBSD.org>2010-12-05 04:34:22 +0000
commitea061499cfca6ed03384392d6972b6527402a242 (patch)
treeb79d765a910ae7f5543e902a5e680c336194aa1d /snake
parent7a7613e47c9abc7a70376d4a03f021988f49899e (diff)
downloadbsdgames-darwin-ea061499cfca6ed03384392d6972b6527402a242.tar.gz
bsdgames-darwin-ea061499cfca6ed03384392d6972b6527402a242.tar.zst
bsdgames-darwin-ea061499cfca6ed03384392d6972b6527402a242.zip
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.
Diffstat (limited to 'snake')
-rw-r--r--snake/snake/snake.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/snake/snake/snake.c b/snake/snake/snake.c
index 2db38721..7fedf522 100644
--- a/snake/snake/snake.c
+++ b/snake/snake/snake.c
@@ -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);
}