summaryrefslogtreecommitdiff
path: root/src/fmt.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2001-11-17 12:21:00 +0000
committerJim Meyering <jim@meyering.net>2001-11-17 12:21:00 +0000
commit940fd633a295b4b9a864082af8f2799bc277aeb7 (patch)
tree85f204bfb8fbdfec30d7b412ebddc7511e9678a1 /src/fmt.c
parentd577c22aa6d12ad73232b67fbba84b45565862e4 (diff)
downloadcoreutils-940fd633a295b4b9a864082af8f2799bc277aeb7.tar.xz
Remove `unsigned' attribute from type of global `prefix'.
(copy_rest): Cast to (unsigned char *) before dereferencing. (get_prefix): Likewise.
Diffstat (limited to 'src/fmt.c')
-rw-r--r--src/fmt.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/fmt.c b/src/fmt.c
index f47f25001..254ac990c 100644
--- a/src/fmt.c
+++ b/src/fmt.c
@@ -184,7 +184,7 @@ static bool split;
static bool uniform;
/* Prefix minus leading and trailing spaces (default ""). */
-static const unsigned char *prefix;
+static const char *prefix;
/* User-supplied maximum line width (default WIDTH). The only output
lines longer than this will each comprise a single word. */
@@ -571,7 +571,7 @@ copy_rest (FILE *f, register int c)
{
put_space (next_prefix_indent);
for (s = prefix; out_column != in_column && *s; out_column++)
- putchar (*s++);
+ putchar (*(unsigned char *)s++);
put_space (in_column - out_column);
}
while (c != '\n' && c != EOF)
@@ -656,7 +656,6 @@ static int
get_prefix (FILE *f)
{
register int c;
- register const unsigned char *p;
in_column = 0;
c = get_space (f, getc (f));
@@ -665,10 +664,11 @@ get_prefix (FILE *f)
prefix_lead_space : in_column;
else
{
+ const char *p;
next_prefix_indent = in_column;
for (p = prefix; *p != '\0'; p++)
{
- if (c != *p)
+ if (c != *(unsigned char *)p)
return c;
in_column++;
c = getc (f);