From ea061499cfca6ed03384392d6972b6527402a242 Mon Sep 17 00:00:00 2001 From: pgoyette Date: Sun, 5 Dec 2010 04:34:22 +0000 Subject: 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. --- snake/snake/snake.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'snake') 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); } -- cgit v1.2.3-56-ge451