summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>1996-03-31 17:18:28 +0000
committerJim Meyering <jim@meyering.net>1996-03-31 17:18:28 +0000
commit399abab9bca0ae37df737f7938e54e1b91f607e6 (patch)
tree794ddcf0ea08aefde0249c149635eca94ea85b59 /src
parent908040f25ef215313b0a8c3e72c5969f6162e11a (diff)
downloadcoreutils-399abab9bca0ae37df737f7938e54e1b91f607e6.tar.xz
(quote_filename): Use ISGRAPH and ISPRINT in place of
ASCII-centric tests against literals. (length_of_file_name_and_frills): Likewise.
Diffstat (limited to 'src')
-rw-r--r--src/ls.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/ls.c b/src/ls.c
index a8e2cbbc0..823d5d797 100644
--- a/src/ls.c
+++ b/src/ls.c
@@ -1676,14 +1676,14 @@ quote_filename (register const char *p, size_t *quoted_length)
default:
/* FIXME: why not just use the ISGRAPH macro here? */
- if (!(c > 040 && c < 0177))
+ if (!ISGRAPH (c))
found_quotable = 1;
break;
}
}
else
{
- if (!(c >= 040 && c < 0177)
+ if (!ISPRINT (c)
&& qmark_funny_chars)
found_quotable = 1;
}
@@ -1748,7 +1748,7 @@ quote_filename (register const char *p, size_t *quoted_length)
break;
default:
- if (c > 040 && c < 0177)
+ if (ISGRAPH (c))
SAVECHAR (c);
else
{
@@ -1760,7 +1760,7 @@ quote_filename (register const char *p, size_t *quoted_length)
}
else
{
- if (c >= 040 && c < 0177)
+ if (ISPRINT (c))
SAVECHAR (c);
else if (!qmark_funny_chars)
SAVECHAR (c);
@@ -1878,7 +1878,7 @@ length_of_file_name_and_frills (struct fileinfo *f)
break;
default:
- if (c >= 040 && c < 0177)
+ if (ISPRINT (c))
len += 1;
else
len += 4;