summaryrefslogtreecommitdiff
path: root/Build
diff options
context:
space:
mode:
authorPeter Breitenlohner <peb@mppmu.mpg.de>2014-12-11 07:04:54 +0000
committerPeter Breitenlohner <peb@mppmu.mpg.de>2014-12-11 07:04:54 +0000
commitec5ae92378df86967a7e3707fc4d8cd1ab5b5234 (patch)
tree23d42b13df6ec3528ec6cf940a98ceea8ea24da2 /Build
parented291494d3a3c28dbfd66cf9e160c6bc9b5fe0c0 (diff)
LuaTeX: Recover changes from r34311 (undefined behaviour when char is signed)
git-svn-id: svn://tug.org/texlive/trunk@35786 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Build')
-rw-r--r--Build/source/texk/web2c/luatexdir/font/mapfile.w8
-rw-r--r--Build/source/texk/web2c/luatexdir/font/tounicode.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writet1.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/font/writettf.w2
-rw-r--r--Build/source/texk/web2c/luatexdir/lang/texlang.w4
-rw-r--r--Build/source/texk/web2c/luatexdir/pdf/pdfgen.w2
6 files changed, 12 insertions, 12 deletions
diff --git a/Build/source/texk/web2c/luatexdir/font/mapfile.w b/Build/source/texk/web2c/luatexdir/font/mapfile.w
index d94189f4d6a..6c6f749425a 100644
--- a/Build/source/texk/web2c/luatexdir/font/mapfile.w
+++ b/Build/source/texk/web2c/luatexdir/font/mapfile.w
@@ -367,15 +367,15 @@ static void fm_scan_line(void)
fm = new_fm_entry();
read_field(r, q, buf);
set_field(tfm_name);
- if (!isdigit(*r)) { /* 2nd field ps_name may not start with a digit */
+ if (!isdigit((unsigned char)*r)) { /* 2nd field ps_name may not start with a digit */
read_field(r, q, buf);
set_field(ps_name);
}
- if (isdigit(*r)) { /* font descriptor /Flags given? */
- for (s = r; isdigit(*s); s++);
+ if (isdigit((unsigned char)*r)) { /* font descriptor /Flags given? */
+ for (s = r; isdigit((unsigned char)*s); s++);
if (*s == ' ' || *s == '"' || *s == '<' || *s == '\0') { /* not e. g. 8r.enc */
fm->fd_flags = atoi(r);
- while (isdigit(*r))
+ while (isdigit((unsigned char)*r))
r++;
}
}
diff --git a/Build/source/texk/web2c/luatexdir/font/tounicode.w b/Build/source/texk/web2c/luatexdir/font/tounicode.w
index b33bef027a0..1ed589eb1ce 100644
--- a/Build/source/texk/web2c/luatexdir/font/tounicode.w
+++ b/Build/source/texk/web2c/luatexdir/font/tounicode.w
@@ -92,7 +92,7 @@ void def_tounicode(str_number glyph, str_number unistr)
for (i = 0; i < l; i++) {
if (p[i] == ' ')
valid_unistr = 2; /* if a space occurs we treat this entry as a string */
- else if (!isXdigit(p[i])) {
+ else if (!isXdigit((unsigned char)p[i])) {
valid_unistr = 0;
break;
}
@@ -151,7 +151,7 @@ static long check_unicode_value(char *s, boolean multiple_value)
return UNI_UNDEF;
for (i = 0; i < l; i++) {
- if (!isXdigit(s[i]))
+ if (!isXdigit((unsigned char)s[i]))
return UNI_UNDEF;
if (multiple_value) {
if (i % 4 == 3) {
diff --git a/Build/source/texk/web2c/luatexdir/font/writet1.w b/Build/source/texk/web2c/luatexdir/font/writet1.w
index 2e65017d2f8..036c65ad9c3 100644
--- a/Build/source/texk/web2c/luatexdir/font/writet1.w
+++ b/Build/source/texk/web2c/luatexdir/font/writet1.w
@@ -456,7 +456,7 @@ static float t1_scan_num(char *p, char **r)
luatex_fail("a number expected: `%s'", t1_line_array);
}
if (r != NULL) {
- for (; isdigit(*p) || *p == '.' ||
+ for (; isdigit((unsigned char)*p) || *p == '.' ||
*p == 'e' || *p == 'E' || *p == '+' || *p == '-'; p++);
*r = p;
}
@@ -1522,7 +1522,7 @@ static void t1_flush_cs(PDF pdf, boolean is_subr)
t1_line_ptr = t1_line_array;
for (p = start_line; p - start_line < size_pos;)
*t1_line_ptr++ = *p++;
- while (isdigit(*p))
+ while (isdigit((unsigned char)*p))
p++;
sprintf(t1_line_ptr, "%u", count);
strcat(t1_line_ptr, p);
diff --git a/Build/source/texk/web2c/luatexdir/font/writettf.w b/Build/source/texk/web2c/luatexdir/font/writettf.w
index 2cab4b2371c..169e1c20d81 100644
--- a/Build/source/texk/web2c/luatexdir/font/writettf.w
+++ b/Build/source/texk/web2c/luatexdir/font/writettf.w
@@ -622,7 +622,7 @@ static char *strip_spaces_and_delims(char *s, int l)
for (i = 0; i < l; s++, i++) {
if (*s == '(' || *s == ')' || *s == '<' || *s == '>' ||
*s == '[' || *s == ']' || *s == '{' || *s == '}' ||
- *s == '/' || *s == '%' || isspace(*s))
+ *s == '/' || *s == '%' || isspace((unsigned char)*s))
continue;
*p++ = *s;
}
diff --git a/Build/source/texk/web2c/luatexdir/lang/texlang.w b/Build/source/texk/web2c/luatexdir/lang/texlang.w
index 9ffe9f546a9..97d9f00c682 100644
--- a/Build/source/texk/web2c/luatexdir/lang/texlang.w
+++ b/Build/source/texk/web2c/luatexdir/lang/texlang.w
@@ -193,7 +193,7 @@ const char *clean_hyphenation(const char *buff, char **cleaned)
char *uindex = (char *)word;
const char *s = buff;
- while (*s && !isspace(*s)) {
+ while (*s && !isspace((unsigned char)*s)) {
word[i++] = (unsigned)*s;
s++;
if ((s-buff)>MAX_WORD_LEN) {
@@ -271,7 +271,7 @@ void load_hyphenation(struct tex_language *lang, const unsigned char *buff)
lua_rawgeti(L, LUA_REGISTRYINDEX, lang->exceptions);
s = (const char *) buff;
while (*s) {
- while (isspace(*s))
+ while (isspace((unsigned char)*s))
s++;
if (*s) {
value = s;
diff --git a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
index 35ce3307cc0..990d2840dd7 100644
--- a/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
+++ b/Build/source/texk/web2c/luatexdir/pdf/pdfgen.w
@@ -621,7 +621,7 @@ void pdf_print_str(PDF pdf, const char *s)
return;
}
s++;
- while (is_hex_char(*s))
+ while (is_hex_char((unsigned char)*s))
s++;
if (s != orig + l) {
pdf_out(pdf, '(');