Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ls - Add -h to usage.
details: https://anonhg.NetBSD.org/src/rev/a0b53292cca6
branches: trunk
changeset: 582113:a0b53292cca6
user: hira <hira%NetBSD.org@localhost>
date: Fri Jun 17 14:36:16 2005 +0000
description:
- Add -h to usage.
- Use set/getprogname(3).
diffstat:
bin/ls/ls.c | 5 +++--
bin/ls/util.c | 7 ++++---
2 files changed, 7 insertions(+), 5 deletions(-)
diffs (54 lines):
diff -r eb5fb196361a -r a0b53292cca6 bin/ls/ls.c
--- a/bin/ls/ls.c Fri Jun 17 14:27:18 2005 +0000
+++ b/bin/ls/ls.c Fri Jun 17 14:36:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: ls.c,v 1.55 2003/12/26 10:51:25 simonb Exp $ */
+/* $NetBSD: ls.c,v 1.56 2005/06/17 14:36:16 hira Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -42,7 +42,7 @@
#if 0
static char sccsid[] = "@(#)ls.c 8.7 (Berkeley) 8/5/94";
#else
-__RCSID("$NetBSD: ls.c,v 1.55 2003/12/26 10:51:25 simonb Exp $");
+__RCSID("$NetBSD: ls.c,v 1.56 2005/06/17 14:36:16 hira Exp $");
#endif
#endif /* not lint */
@@ -118,6 +118,7 @@
int kflag = 0;
const char *p;
+ setprogname(argv[0]);
setlocale(LC_ALL, "");
/* Terminal defaults to -Cq, non-terminal defaults to -1. */
diff -r eb5fb196361a -r a0b53292cca6 bin/ls/util.c
--- a/bin/ls/util.c Fri Jun 17 14:27:18 2005 +0000
+++ b/bin/ls/util.c Fri Jun 17 14:36:16 2005 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: util.c,v 1.27 2003/09/22 02:43:20 jschauma Exp $ */
+/* $NetBSD: util.c,v 1.28 2005/06/17 14:36:16 hira Exp $ */
/*
* Copyright (c) 1989, 1993, 1994
@@ -37,7 +37,7 @@
#if 0
static char sccsid[] = "@(#)util.c 8.5 (Berkeley) 4/28/95";
#else
-__RCSID("$NetBSD: util.c,v 1.27 2003/09/22 02:43:20 jschauma Exp $");
+__RCSID("$NetBSD: util.c,v 1.28 2005/06/17 14:36:16 hira Exp $");
#endif
#endif /* not lint */
@@ -103,7 +103,8 @@
{
(void)fprintf(stderr,
- "usage: ls [-AaBbCcdFfgikLlmnopqRrSsTtuWwx1] [file ...]\n");
+ "usage: %s [-AaBbCcdFfghikLlmnopqRrSsTtuWwx1] [file ...]\n",
+ getprogname());
exit(EXIT_FAILURE);
/* NOTREACHED */
}
Home |
Main Index |
Thread Index |
Old Index