Module Name: src
Committed By: christos
Date: Sun Aug 21 08:40:32 UTC 2011
Modified Files:
src/bin/ed: main.c
Log Message:
use const char [] for format.
To generate a diff of this commit:
cvs rdiff -u -r1.24 -r1.25 src/bin/ed/main.c
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/bin/ed/main.c
diff -u src/bin/ed/main.c:1.24 src/bin/ed/main.c:1.25
--- src/bin/ed/main.c:1.24 Sun Aug 14 05:38:05 2011
+++ src/bin/ed/main.c Sun Aug 21 04:40:31 2011
@@ -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 */
}