Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/expr Use {g, s}etprogname, and some other KNF stuff. Patc...
details: https://anonhg.NetBSD.org/src/rev/8f360a0c458b
branches: trunk
changeset: 515089:8f360a0c458b
user: wiz <wiz%NetBSD.org@localhost>
date: Sun Sep 16 13:42:10 2001 +0000
description:
Use {g,s}etprogname, and some other KNF stuff. Patch by Petri Koistinen.
diffstat:
bin/expr/expr.y | 11 +++++++----
1 files changed, 7 insertions(+), 4 deletions(-)
diffs (37 lines):
diff -r 36779dac6310 -r 8f360a0c458b bin/expr/expr.y
--- a/bin/expr/expr.y Sun Sep 16 13:35:52 2001 +0000
+++ b/bin/expr/expr.y Sun Sep 16 13:42:10 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: expr.y,v 1.27 2001/05/06 06:20:39 jmc Exp $ */
+/* $NetBSD: expr.y,v 1.28 2001/09/16 13:42:10 wiz Exp $ */
/*_
* Copyright (c) 2000 The NetBSD Foundation, Inc.
@@ -38,10 +38,11 @@
%{
#include <sys/cdefs.h>
#ifndef lint
-__RCSID("$NetBSD: expr.y,v 1.27 2001/05/06 06:20:39 jmc Exp $");
+__RCSID("$NetBSD: expr.y,v 1.28 2001/09/16 13:42:10 wiz Exp $");
#endif /* not lint */
#include <sys/types.h>
+
#include <err.h>
#include <errno.h>
#include <limits.h>
@@ -423,10 +424,12 @@
int
main(int argc, const char * const *argv)
{
- (void) setlocale(LC_ALL, "");
+ setprogname(argv[0]);
+ (void)setlocale(LC_ALL, "");
if (argc == 1) {
- (void) fprintf(stderr, "usage: expr expression\n");
+ (void)fprintf(stderr, "usage: %s expression\n",
+ getprogname());
exit(2);
}
Home |
Main Index |
Thread Index |
Old Index