diff options
author | kris <kris@FreeBSD.org> | 2000-11-26 11:07:45 +0000 |
---|---|---|
committer | kris <kris@FreeBSD.org> | 2000-11-26 11:07:45 +0000 |
commit | b64f677da6a8f3cbce3b1c8a085c7992e947b487 (patch) | |
tree | be702b9053cbac86e3cfcc0be9bd7d7620c6332f | |
parent | 0bec2472fdbc599d7de044c8672b653d89153217 (diff) | |
download | FreeBSD-src-b64f677da6a8f3cbce3b1c8a085c7992e947b487.zip FreeBSD-src-b64f677da6a8f3cbce3b1c8a085c7992e947b487.tar.gz |
Constify
-rw-r--r-- | lib/libedit/key.c | 4 | ||||
-rw-r--r-- | lib/libedit/term.c | 2 | ||||
-rw-r--r-- | usr.bin/yacc/defs.h | 1 | ||||
-rw-r--r-- | usr.bin/yacc/output.c | 1 | ||||
-rw-r--r-- | usr.bin/yacc/reader.c | 2 |
5 files changed, 6 insertions, 4 deletions
diff --git a/lib/libedit/key.c b/lib/libedit/key.c index 3da65d5..24e56a8 100644 --- a/lib/libedit/key.c +++ b/lib/libedit/key.c @@ -36,6 +36,8 @@ #if !defined(lint) && !defined(SCCSID) static char sccsid[] = "@(#)key.c 8.1 (Berkeley) 6/4/93"; +static const char rcsid[] = + "$FreeBSD$"; #endif /* not lint && not SCCSID */ /* @@ -601,7 +603,7 @@ key_kprint(el, key, val, ntype) { el_bindings_t *fp; char unparsbuf[EL_BUFSIZ]; - static char *fmt = "%-15s-> %s\n"; + static const char fmt[] = "%-15s-> %s\n"; if (val != NULL) switch (ntype) { diff --git a/lib/libedit/term.c b/lib/libedit/term.c index 18248f5..65fd1a1 100644 --- a/lib/libedit/term.c +++ b/lib/libedit/term.c @@ -1222,7 +1222,7 @@ term_echotc(el, argc, argv) int arg_need, arg_cols, arg_rows; int verbose = 0, silent = 0; char *area; - static char *fmts = "%s\n", *fmtd = "%d\n"; + static const char fmts[] = "%s\n", fmtd[] = "%d\n"; struct termcapstr *t; char buf[TC_BUFSIZE]; diff --git a/usr.bin/yacc/defs.h b/usr.bin/yacc/defs.h index a8d8113..43af00b 100644 --- a/usr.bin/yacc/defs.h +++ b/usr.bin/yacc/defs.h @@ -265,7 +265,6 @@ extern int nvars; extern int ntags; extern char unionized; -extern char line_format[]; extern int start_symbol; extern char **symbol_name; diff --git a/usr.bin/yacc/output.c b/usr.bin/yacc/output.c index 2130969..31bb4be 100644 --- a/usr.bin/yacc/output.c +++ b/usr.bin/yacc/output.c @@ -70,6 +70,7 @@ static void save_column __P((int, int)); static void sort_actions __P((void)); static void token_actions __P((void)); +static const char line_format[] = "#line %d \"%s\"\n"; static int nvectors; static int nentries; static short **froms; diff --git a/usr.bin/yacc/reader.c b/usr.bin/yacc/reader.c index 4e2e588..8fb38fa 100644 --- a/usr.bin/yacc/reader.c +++ b/usr.bin/yacc/reader.c @@ -75,7 +75,7 @@ bucket **plhs; int name_pool_size; char *name_pool; -char line_format[] = "#line %d \"%s\"\n"; +static const char line_format[] = "#line %d \"%s\"\n"; static void add_symbol __P((void)); static void advance_to_start __P((void)); |