]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
`fmt --prefix=S' would not work properly for any string S containing
authorJim Meyering <jim@meyering.net>
Mon, 12 Mar 2001 21:16:05 +0000 (21:16 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 12 Mar 2001 21:16:05 +0000 (21:16 +0000)
a byte with the high bit set.
(prefix): Declare to be of type unsigned char, not `char'.
(get_prefix): Likewise for local, `p'.

src/fmt.c

index 49c692591e6aaa8d851d71602f9df591080f2458..7769e0839dae683d429789c1546eb6b74502af87 100644 (file)
--- 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));