From d8014392bc291504997c65b3b44a7f21a60b0e07 Mon Sep 17 00:00:00 2001 From: Herbert Xu Date: Sun, 23 Apr 2006 16:01:05 +1000 Subject: [PARSER] Only use signed char for syntax arrays The existing scheme of using the native char for syntax array indicies makes cross-compiling difficult. Therefore it makes sense to choose one specific sign for everyone. Since signed chars are native to most platforms and i386, it makes more sense to use that if we are to choose one type for everyone. --- src/show.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/show.c') diff --git a/src/show.c b/src/show.c index 05af328..1b58de1 100644 --- a/src/show.c +++ b/src/show.c @@ -165,7 +165,7 @@ sharg(union node *arg, FILE *fp) } bqlist = arg->narg.backquote; for (p = arg->narg.text ; *p ; p++) { - switch (*p) { + switch ((signed char)*p) { case CTLESC: putc(*++p, fp); break; @@ -306,7 +306,7 @@ trstring(char *s) return; putc('"', tracefile); for (p = s ; *p ; p++) { - switch (*p) { + switch ((signed char)*p) { case '\n': c = 'n'; goto backslash; case '\t': c = 't'; goto backslash; case '\r': c = 'r'; goto backslash; -- cgit 1.4.1