diff options
author | Jim Meyering <jim@meyering.net> | 2006-10-25 01:05:30 +0200 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 2006-10-25 01:05:30 +0200 |
commit | e81a82b74f44bfddce247d566617137725f11b19 (patch) | |
tree | 49abf1426b3f7994ed5791afac1bd798d00325b5 /src/nl.c | |
parent | 3e9cc761892d1601101e4b798046a6a5e47bc90d (diff) | |
download | coreutils-e81a82b74f44bfddce247d566617137725f11b19.tar.xz |
* src/cat.c (infile): Add "const" to declaration.
* src/csplit.c (prefix): Likewise.
* src/printf.c (cfcc_msg): Likewise.
* src/tail.c (valid_file_spec): Likewise.
* src/cut.c (cut_file): Likewise, for a parameter.
* src/expr.c (str_value): Likewise.
* src/fold.c (fold_file): Likewise.
* src/pr.c (init_header): Likewise.
* src/dircolors.c (dc_parse_stream): Likewise, for a local.
* src/tr.c (make_printable_str): Likewise.
* src/nl.c (body_type, header_type, footer_type, current_type):
(separator_str, build_type_arg, nl_file): Likewise, for many.
* src/paste.c (main): Don't assign a read-only string to 'optarg'.
* src/tac.c (separator, tac_seekable, copy_to_temp): Likewise.
Diffstat (limited to 'src/nl.c')
-rw-r--r-- | src/nl.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -64,16 +64,16 @@ enum section char *program_name; /* Format of body lines (-b). */ -static char *body_type = "t"; +static char const *body_type = "t"; /* Format of header lines (-h). */ -static char *header_type = "n"; +static char const *header_type = "n"; /* Format of footer lines (-f). */ -static char *footer_type = "n"; +static char const *footer_type = "n"; /* Format currently being used (body, header, or footer). */ -static char *current_type; +static char const *current_type; /* Regex for body lines to number (-bp). */ static struct re_pattern_buffer body_regex; @@ -93,7 +93,7 @@ static char footer_fastmap[UCHAR_MAX + 1]; static struct re_pattern_buffer *current_regex = NULL; /* Separator string to print after line number (-s). */ -static char *separator_str = "\t"; +static char const *separator_str = "\t"; /* Input section delimiter string (-d). */ static char const *section_del = DEFAULT_SECTION_DELIMITERS; @@ -235,9 +235,10 @@ FORMAT is one of:\n\ according to `optarg'. */ static bool -build_type_arg (char **typep, struct re_pattern_buffer *regexp, char *fastmap) +build_type_arg (char const **typep, + struct re_pattern_buffer *regexp, char *fastmap) { - const char *errmsg; + char const *errmsg; bool rval = true; switch (*optarg) @@ -414,7 +415,7 @@ process_file (FILE *fp) Return true if successful. */ static bool -nl_file (const char *file) +nl_file (char const *file) { FILE *stream; |