Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/bin/ed use const char [] for format.
details: https://anonhg.NetBSD.org/src/rev/115c19171ec2
branches: trunk
changeset: 768571:115c19171ec2
user: christos <christos%NetBSD.org@localhost>
date: Sun Aug 21 08:40:31 2011 +0000
description:
use const char [] for format.
diffstat:
bin/ed/main.c | 10 +++++-----
1 files changed, 5 insertions(+), 5 deletions(-)
diffs (38 lines):
diff -r 3884d7269ed6 -r 115c19171ec2 bin/ed/main.c
--- a/bin/ed/main.c Sun Aug 21 06:39:09 2011 +0000
+++ b/bin/ed/main.c Sun Aug 21 08:40:31 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: main.c,v 1.24 2011/08/14 09:38:05 christos Exp $ */
+/* $NetBSD: main.c,v 1.25 2011/08/21 08:40:31 christos Exp $ */
/* main.c: This file contains the main control and user-interface routines
for the ed line editor. */
@@ -39,7 +39,7 @@
#if 0
static char *rcsid = "@(#)main.c,v 1.1 1994/02/01 00:34:42 alm Exp";
#else
-__RCSID("$NetBSD: main.c,v 1.24 2011/08/14 09:38:05 christos Exp $");
+__RCSID("$NetBSD: main.c,v 1.25 2011/08/21 08:40:31 christos Exp $");
#endif
#endif /* not lint */
@@ -105,6 +105,8 @@
const char *dps = "*"; /* default command-line prompt */
+static const char usage[] = "Usage: %s [-] [-sxE] [-p string] [name]\n";
+
/* ed: line editor */
int
main(int ac, char *av[])
@@ -136,9 +138,7 @@
ere = REG_EXTENDED;
break;
default:
- fprintf(stderr,
- "Usage: %s [-] [-sxE] [-p string] [name]\n",
- getprogname());
+ fprintf(stderr, usage, getprogname());
exit(1);
/* NOTREACHED */
}
Home |
Main Index |
Thread Index |
Old Index