From: Jim Meyering Date: Mon, 12 Mar 2001 21:16:05 +0000 (+0000) Subject: `fmt --prefix=S' would not work properly for any string S containing X-Git-Tag: FILEUTILS-4_0_42~58 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=c9fc879e8994ede1857e695a3d9fdf0e81140f73;p=thirdparty%2Fcoreutils.git `fmt --prefix=S' would not work properly for any string S containing a byte with the high bit set. (prefix): Declare to be of type unsigned char, not `char'. (get_prefix): Likewise for local, `p'. --- diff --git a/src/fmt.c b/src/fmt.c index 49c692591e..7769e0839d 100644 --- a/src/fmt.c +++ b/src/fmt.c @@ -1,5 +1,5 @@ /* GNU fmt -- simple text formatter. - Copyright (C) 1994-2000 Free Software Foundation, Inc. + Copyright (C) 1994-2001 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -185,7 +185,7 @@ static bool split; static bool uniform; /* Prefix minus leading and trailing spaces (default ""). */ -static const char *prefix; +static const unsigned char *prefix; /* User-supplied maximum line width (default WIDTH). The only output lines @@ -652,7 +652,7 @@ static int get_prefix (FILE *f) { register int c; - register const char *p; + register const unsigned char *p; in_column = 0; c = get_space (f, getc (f));