summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1997-04-06 19:32:19 +0000
committerJim Meyering <jim@meyering.net>1997-04-06 19:32:19 +0000
commit3426e7ca7a2b9834ab34701a1337a922deba5467 (patch)
tree8130b24ba817a9e8818f93a265cc1c5d9ba24857 /src
parent39b444e420d9684c7cebed67a694842bda69107e (diff)
downloadcoreutils-3426e7ca7a2b9834ab34701a1337a922deba5467.tar.xz
Change most char* dcls to const char*.
Diffstat (limited to 'src')
-rw-r--r--src/printf.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/printf.c b/src/printf.c
index 62460bbae..515d7d93d 100644
--- a/src/printf.c
+++ b/src/printf.c
@@ -212,9 +212,9 @@ print_esc_char (int c)
besides the backslash. */
static int
-print_esc (char *escstart)
+print_esc (const char *escstart)
{
- register char *p = escstart + 1;
+ register const char *p = escstart + 1;
int esc_value = 0; /* Value of \nnn escape. */
int esc_length; /* Length of \nnn escape. */
@@ -247,7 +247,7 @@ print_esc (char *escstart)
/* Print string STR, evaluating \ escapes. */
static void
-print_esc_string (char *str)
+print_esc_string (const char *str)
{
for (; *str; str++)
if (*str == '\\')
@@ -262,7 +262,7 @@ print_esc_string (char *str)
'*' values in those fields. */
static void
-print_direc (char *start, size_t length, int field_width, int precision, char *argument)
+print_direc (const char *start, size_t length, int field_width, int precision, const char *argument)
{
char *p; /* Null-terminated copy of % directive. */
@@ -361,11 +361,11 @@ print_direc (char *start, size_t length, int field_width, int precision, char *a
Return the number of elements of ARGV used. */
static int
-print_formatted (char *format, int argc, char **argv)
+print_formatted (const char *format, int argc, char **argv)
{
int save_argc = argc; /* Preserve original value. */
- char *f; /* Pointer into `format'. */
- char *direc_start; /* Start of % directive. */
+ const char *f; /* Pointer into `format'. */
+ const char *direc_start; /* Start of % directive. */
size_t direc_length; /* Length of % directive. */
int field_width; /* Arg to first '*', or -1 if none. */
int precision; /* Arg to second '*', or -1 if none. */