From 862f90359ce158a261692c35129db2e48ebdeaa6 Mon Sep 17 00:00:00 2001 From: Peter Breitenlohner Date: Wed, 18 Jun 2014 12:01:19 +0000 Subject: web2c/ctiedir, web2c/cwebdir: Avoid useless char subscript warnings git-svn-id: svn://tug.org/texlive/trunk@34289 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/ctiedir/ChangeLog | 4 ++++ Build/source/texk/web2c/ctiedir/ctie-k.ch | 12 ++++++++++ Build/source/texk/web2c/cwebdir/ChangeLog | 5 ++++ Build/source/texk/web2c/cwebdir/comm-w2c.ch | 26 +++++++++++++++++++++ Build/source/texk/web2c/cwebdir/ctang-w2c.ch | 35 ++++++++++++++++++++++++++++ Build/source/texk/web2c/cwebdir/cweav-w2c.ch | 28 ++++++++++++++++++++++ 6 files changed, 110 insertions(+) diff --git a/Build/source/texk/web2c/ctiedir/ChangeLog b/Build/source/texk/web2c/ctiedir/ChangeLog index 9e16d1d1e91..2ce0f61df9d 100644 --- a/Build/source/texk/web2c/ctiedir/ChangeLog +++ b/Build/source/texk/web2c/ctiedir/ChangeLog @@ -1,3 +1,7 @@ +2014-06-18 Peter Breitenlohner + + * ctie-k.ch: Avoid useless char subscript warnings. + 2014-02-12 Peter Breitenlohner * ctie-k.ch: Handle input lines with CRLF. diff --git a/Build/source/texk/web2c/ctiedir/ctie-k.ch b/Build/source/texk/web2c/ctiedir/ctie-k.ch index ebb0fa0d910..5741bb1c06d 100644 --- a/Build/source/texk/web2c/ctiedir/ctie-k.ch +++ b/Build/source/texk/web2c/ctiedir/ctie-k.ch @@ -111,6 +111,12 @@ extern char *strerror(); the \.{kpathsea} headers do the right thing. @z +@x l.149 +@d xisupper(c) (isupper(c)&&((unsigned char)c<0200)) +@y +@d xisupper(c) (isupper((unsigned char)c)&&((unsigned char)c<0200)) +@z + @x l.173 The kpathsea include files must be first. #include @y @@ -379,6 +385,12 @@ static void init_change_file (file_index i) @z +@x l.833 + if (xisupper(ccode)) ccode=tolower(ccode); +@y + if (xisupper(ccode)) ccode=tolower((unsigned char)ccode); +@z + @x l.858 void put_line(j) file_index j; diff --git a/Build/source/texk/web2c/cwebdir/ChangeLog b/Build/source/texk/web2c/cwebdir/ChangeLog index c1d40c72915..79fbbc4b489 100644 --- a/Build/source/texk/web2c/cwebdir/ChangeLog +++ b/Build/source/texk/web2c/cwebdir/ChangeLog @@ -1,3 +1,8 @@ +2014-06-18 Peter Breitenlohner + + * comm-w2c.ch, ctang-w2c.ch, cweav-w2c.ch: Avoid useless + char subscript warnings. + 2014-02-12 Peter Breitenlohner * comm-w2c.ch: Handle input lines with CRLF. diff --git a/Build/source/texk/web2c/cwebdir/comm-w2c.ch b/Build/source/texk/web2c/cwebdir/comm-w2c.ch index 07a945b69b2..bd6ac50e1e0 100644 --- a/Build/source/texk/web2c/cwebdir/comm-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/comm-w2c.ch @@ -84,6 +84,14 @@ Section 7. @d buf_size 1000 /* for \.{CWEAVE} and \.{CTANGLE} */ @z +@x l.156 +@d xisspace(c) (isspace(c)&&((unsigned char)c<0200)) +@d xisupper(c) (isupper(c)&&((unsigned char)c<0200)) +@y +@d xisspace(c) (isspace((unsigned char)c)&&((unsigned char)c<0200)) +@d xisupper(c) (isupper((unsigned char)c)&&((unsigned char)c<0200)) +@z + Section 9. @x l.173 @@ -122,6 +130,12 @@ static void prime_the_change_buffer (void) @z +@x l.271 + if (xisupper(buffer[1])) buffer[1]=tolower(buffer[1]); +@y + if (xisupper(buffer[1])) buffer[1]=tolower((unsigned char)buffer[1]); +@z + Section 16. @x l.321 @@ -132,6 +146,12 @@ static void check_change (void) /* switches to |change_file| if the buffers match */ @z +@x l.340 + char xyz_code=xisupper(buffer[1])? tolower(buffer[1]): buffer[1]; +@y + char xyz_code=xisupper(buffer[1])? tolower((unsigned char)buffer[1]): buffer[1]; +@z + Section 18. @x l.380 @@ -286,6 +306,12 @@ Replaced by Kpathsea `kpse_find_file' Section 26. +@x l.553 + if (xisupper(buffer[1])) buffer[1]=tolower(buffer[1]); +@y + if (xisupper(buffer[1])) buffer[1]=tolower((unsigned char)buffer[1]); +@z + @x l.571 check_complete(){ @y diff --git a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch index e1f507a5206..f1be29aacc5 100644 --- a/Build/source/texk/web2c/cwebdir/ctang-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/ctang-w2c.ch @@ -122,6 +122,22 @@ Section 6. #include @z +@x common.h l.65 +@d xisalpha(c) (isalpha(c)&&((eight_bits)c<0200)) +@d xisdigit(c) (isdigit(c)&&((eight_bits)c<0200)) +@d xisspace(c) (isspace(c)&&((eight_bits)c<0200)) +@d xislower(c) (islower(c)&&((eight_bits)c<0200)) +@d xisupper(c) (isupper(c)&&((eight_bits)c<0200)) +@d xisxdigit(c) (isxdigit(c)&&((eight_bits)c<0200)) +@y +@d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200)) +@d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200)) +@d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200)) +@d xislower(c) (islower((eight_bits)c)&&((eight_bits)c<0200)) +@d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200)) +@d xisxdigit(c) (isxdigit((eight_bits)c)&&((eight_bits)c<0200)) +@z + Section 9. @x common.h l.109 - protos now all in cweb.h. @@ -367,6 +383,12 @@ Section 63. else compress(minus_gt);} break; @z +@x l.974 + while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); +@y + while (isalpha((unsigned char)*++loc) || isdigit((unsigned char)*loc) || isxalpha(*loc) || ishigh(*loc)); +@z + Section 76. @x l.1200 @@ -388,6 +410,19 @@ Section 77. app_repl(a_l % 0400);} @z +Section 82. + +@x l.1320 + c=toupper(*id_first)-'A'+10; +@y + c=toupper((unsigned char)*id_first)-'A'+10; +@z +@x l.1325 + c=16*c+toupper(*id_first)-'A'+10; +@y + c=16*c+toupper((unsigned char)*id_first)-'A'+10; +@z + Section 83. @x l.1358 diff --git a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch index 4c3249eea90..0fde9a7df49 100644 --- a/Build/source/texk/web2c/cwebdir/cweav-w2c.ch +++ b/Build/source/texk/web2c/cwebdir/cweav-w2c.ch @@ -148,6 +148,22 @@ Section 6. #include @z +@x common.h l.65 +@d xisalpha(c) (isalpha(c)&&((eight_bits)c<0200)) +@d xisdigit(c) (isdigit(c)&&((eight_bits)c<0200)) +@d xisspace(c) (isspace(c)&&((eight_bits)c<0200)) +@d xislower(c) (islower(c)&&((eight_bits)c<0200)) +@d xisupper(c) (isupper(c)&&((eight_bits)c<0200)) +@d xisxdigit(c) (isxdigit(c)&&((eight_bits)c<0200)) +@y +@d xisalpha(c) (isalpha((eight_bits)c)&&((eight_bits)c<0200)) +@d xisdigit(c) (isdigit((eight_bits)c)&&((eight_bits)c<0200)) +@d xisspace(c) (isspace((eight_bits)c)&&((eight_bits)c<0200)) +@d xislower(c) (islower((eight_bits)c)&&((eight_bits)c<0200)) +@d xisupper(c) (isupper((eight_bits)c)&&((eight_bits)c<0200)) +@d xisxdigit(c) (isxdigit((eight_bits)c)&&((eight_bits)c<0200)) +@z + Section 9. @x common.h l.109 - protos now all in cweb.h. @@ -330,6 +346,18 @@ Section 45. else compress(minus_gt);} break; @z +@x l.800 + while (isalpha(*++loc) || isdigit(*loc) || isxalpha(*loc) || ishigh(*loc)); +@y + while (isalpha((unsigned char)*++loc) || isdigit((unsigned char)*loc) || isxalpha(*loc) || ishigh(*loc)); +@z + +@x l.835 + *id_loc++='$'; *id_loc++=toupper(*loc); loc++; +@y + *id_loc++='$'; *id_loc++=toupper((unsigned char)*loc); loc++; +@z + Section 48. @x l.870 -- cgit v1.2.3