]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(parse_line): Use ISSPACE, not isspace.
authorJim Meyering <jim@meyering.net>
Tue, 28 Apr 1998 13:09:47 +0000 (13:09 +0000)
committerJim Meyering <jim@meyering.net>
Tue, 28 Apr 1998 13:09:47 +0000 (13:09 +0000)
Use unsigned char * pointers, not potentially signed ones, to avoid
sign extension.

src/dircolors.c

index 6f0a3c8f8242b2a9d34488b63ca36243c21b36e2..f1c0cbc6eedcda60392b0a7806f0f9a3b90a2b15 100644 (file)
@@ -151,16 +151,16 @@ guess_shell_syntax (void)
 }
 
 static void
-parse_line (const char *line, char **keyword, char **arg)
+parse_line (unsigned char const *line, char **keyword, char **arg)
 {
-  const char *p;
-  const char *keyword_start;
-  const char *arg_start;
+  unsigned char const *p;
+  unsigned char const *keyword_start;
+  unsigned char const *arg_start;
 
   *keyword = NULL;
   *arg = NULL;
 
-  for (p = line; isspace (*p); ++p)
+  for (p = line; ISSPACE (*p); ++p)
     ;
 
   /* Ignore blank lines and shell-style comments.  */
@@ -169,7 +169,7 @@ parse_line (const char *line, char **keyword, char **arg)
 
   keyword_start = p;
 
-  while (!isspace (*p) && *p != '\0')
+  while (!ISSPACE (*p) && *p != '\0')
     {
       ++p;
     }
@@ -182,7 +182,7 @@ parse_line (const char *line, char **keyword, char **arg)
     {
       ++p;
     }
-  while (isspace (*p));
+  while (ISSPACE (*p));
 
   if (*p == '\0' || *p == '#')
     return;
@@ -192,7 +192,7 @@ parse_line (const char *line, char **keyword, char **arg)
   while (*p != '\0' && *p != '#')
     ++p;
 
-  for (--p; isspace (*p); --p)
+  for (--p; ISSPACE (*p); --p)
     {
       /* empty */
     }