From a1a10498903d39b2256f140d991b1fbd86c98dd5 Mon Sep 17 00:00:00 2001 From: nhmall Date: Fri, 29 Mar 2024 16:10:33 -0400 Subject: [PATCH] follow-up for an apparent conflict in Qt5 --- include/decl.h | 2 +- src/coloratt.c | 4 ++-- src/decl.c | 2 +- src/options.c | 8 ++++---- src/utf8map.c | 8 ++++---- src/windows.c | 10 +++++----- 6 files changed, 17 insertions(+), 17 deletions(-) diff --git a/include/decl.h b/include/decl.h index 1b60d3ee2..1e8e75120 100644 --- a/include/decl.h +++ b/include/decl.h @@ -65,7 +65,7 @@ extern NEARDATA boolean has_strong_rngseed; extern struct engr *head_engr; /* used by coloratt.c, options.c, utf8map.c, windows.c */ -extern const char hex[33]; +extern const char hexdd[33]; /* material strings */ extern const char *materialnm[]; diff --git a/src/coloratt.c b/src/coloratt.c index be76df6e0..90e316ab7 100644 --- a/src/coloratt.c +++ b/src/coloratt.c @@ -782,14 +782,14 @@ wc_color_name(int32 colorindx) return result; } -/* hex[] is defined in decl.c */ +/* hexdd[] is defined in decl.c */ boolean onlyhexdigits(const char *buf) { const char *dp = buf; for (dp = buf; *dp; ++dp) { - if (!(strchr(hex, *dp) || *dp == '-')) + if (!(strchr(hexdd, *dp) || *dp == '-')) return FALSE; } return TRUE; diff --git a/src/decl.c b/src/decl.c index bd76ad31e..88e7f97ad 100644 --- a/src/decl.c +++ b/src/decl.c @@ -94,7 +94,7 @@ const char *fqn_prefix_names[PREFIX_COUNT] = { #endif /* used by coloratt.c, options.c, utf8map.c, windows.c */ -const char hex[33] = "00112233445566778899aAbBcCdDeEfF"; +const char hexdd[33] = "00112233445566778899aAbBcCdDeEfF"; /* x/y/z deltas for the 10 movement directions (8 compass pts, 2 down/up) */ const schar xdir[N_DIRS_Z] = { -1, -1, 0, 1, 1, 1, 0, -1, 0, 0 }; diff --git a/src/options.c b/src/options.c index 19611e996..0868f2d60 100644 --- a/src/options.c +++ b/src/options.c @@ -6662,7 +6662,7 @@ escapes(const char *cp, /* might be 'tp', updating in place */ char *tp) /* result is never longer than 'cp' */ { static NEARDATA const char oct[] = "01234567", dec[] = "0123456789"; - /* hex[] is defined in decl.c */ + /* hexdd[] is defined in decl.c */ const char *dp; int cval, meta, dcount; @@ -6695,11 +6695,11 @@ escapes(const char *cp, /* might be 'tp', updating in place */ cval = (cval * 8) + (*cp - '0'); } while (*++cp && strchr(oct, *cp) && ++dcount < 3); } else if ((cp[1] == 'x' || cp[1] == 'X') && cp[2] - && (dp = strchr(hex, cp[2])) != 0) { + && (dp = strchr(hexdd, cp[2])) != 0) { cp += 2; /* move past backslash and 'X' */ do { - cval = (cval * 16) + ((int) (dp - hex) / 2); - } while (*++cp && (dp = strchr(hex, *cp)) != 0 && ++dcount < 2); + cval = (cval * 16) + ((int) (dp - hexdd) / 2); + } while (*++cp && (dp = strchr(hexdd, *cp)) != 0 && ++dcount < 2); } else { /* C-style character escapes */ switch (*++cp) { case '\\': diff --git a/src/utf8map.c b/src/utf8map.c index d90455f4f..fcf562457 100644 --- a/src/utf8map.c +++ b/src/utf8map.c @@ -13,7 +13,7 @@ extern struct enum_dump objdump[]; extern glyph_map glyphmap[MAX_GLYPH]; extern const char *const known_handling[]; /* symbols.c */ -/* hex[] is defined in decl.c */ +/* hexdd[] is defined in decl.c */ int unicode_val(const char *cp) @@ -24,11 +24,11 @@ unicode_val(const char *cp) if (cp && *cp) { cval = dcount = 0; if ((*cp == 'U' || *cp == 'u') - && cp[1] == '+' && cp[2] && (dp = strchr(hex, cp[2])) != 0) { + && cp[1] == '+' && cp[2] && (dp = strchr(hexdd, cp[2])) != 0) { cp += 2; /* move past the 'U' and '+' */ do { - cval = (cval * 16) + ((int) (dp - hex) / 2); - } while (*++cp && (dp = strchr(hex, *cp)) != 0 && ++dcount < 7); + cval = (cval * 16) + ((int) (dp - hexdd) / 2); + } while (*++cp && (dp = strchr(hexdd, *cp)) != 0 && ++dcount < 7); } } return cval; diff --git a/src/windows.c b/src/windows.c index 87205acfc..33084c819 100644 --- a/src/windows.c +++ b/src/windows.c @@ -1432,7 +1432,7 @@ encglyph(int glyph) return encbuf; } -/* hex[] is defined in decl.c */ +/* hexdd[] is defined in decl.c */ int decode_glyph(const char *str, int *glyph_ptr) @@ -1441,18 +1441,18 @@ decode_glyph(const char *str, int *glyph_ptr) const char *dp; for (; *str && ++dcount <= 4; ++str) { - if ((dp = strchr(hex, *str)) != 0) { + if ((dp = strchr(hexdd, *str)) != 0) { retval++; - rndchk = (rndchk * 16) + ((int) (dp - hex) / 2); + rndchk = (rndchk * 16) + ((int) (dp - hexdd) / 2); } else break; } if (rndchk == gc.context.rndencode) { *glyph_ptr = dcount = 0; for (; *str && ++dcount <= 4; ++str) { - if ((dp = strchr(hex, *str)) != 0) { + if ((dp = strchr(hexdd, *str)) != 0) { retval++; - *glyph_ptr = (*glyph_ptr * 16) + ((int) (dp - hex) / 2); + *glyph_ptr = (*glyph_ptr * 16) + ((int) (dp - hexdd) / 2); } else break; }