scan-gram: avoid portability trap with ctype usage.

* src/scan-gram.l (<SC_ESCAPED_STRING,SC_ESCAPED_CHARACTER>):
Avoid compiler warning.

Signed-off-by: Eric Blake <[email protected]>
(cherry picked from commit bbbbe221d7)
This commit is contained in:
Eric Blake committed 2009-08-27 20:18:56 -06:00
1 parent b70c7fb4e1
commit 4413bbd3d1
2 files changed
+7 -1

No files matched your search

+1 -1
View File
@@ -618,7 +618,7 @@ splice (\\[ \f\t\v]*\n)*
\\(.|\n) {
char const *p = yytext + 1;
/* Quote only if escaping won't make the character visible. */
if (isspace (*p) && isprint (*p))
if (isspace ((unsigned char) *p) && isprint ((unsigned char) *p))
p = quote (p);
else
p = quotearg_style_mem (escape_quoting_style, p, 1);