summaryrefslogtreecommitdiff
path: root/src/dircolors.c
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1998-04-28 13:09:47 +0000
committerJim Meyering <jim@meyering.net>1998-04-28 13:09:47 +0000
commit2e97d27586816254cbf5ffcf935760824882e2ab (patch)
tree46809b071909213f5dfdf298ddd9bdb2edba1163 /src/dircolors.c
parenta155c3d684798399b00ef142522dc05fba10c4ec (diff)
downloadcoreutils-2e97d27586816254cbf5ffcf935760824882e2ab.tar.xz
(parse_line): Use ISSPACE, not isspace.
Use unsigned char * pointers, not potentially signed ones, to avoid sign extension.
Diffstat (limited to 'src/dircolors.c')
-rw-r--r--src/dircolors.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/dircolors.c b/src/dircolors.c
index 6f0a3c8f8..f1c0cbc6e 100644
--- a/src/dircolors.c
+++ b/src/dircolors.c
@@ -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 */
}