follow-up for an apparent conflict in Qt5

This commit is contained in:
nhmall
2024-03-29 16:10:33 -04:00
parent 055246f43d
commit a1a1049890
6 changed files with 17 additions and 17 deletions
+1 -1
View File
@@ -65,7 +65,7 @@ extern NEARDATA boolean has_strong_rngseed;
extern struct engr *head_engr; extern struct engr *head_engr;
/* used by coloratt.c, options.c, utf8map.c, windows.c */ /* used by coloratt.c, options.c, utf8map.c, windows.c */
extern const char hex[33]; extern const char hexdd[33];
/* material strings */ /* material strings */
extern const char *materialnm[]; extern const char *materialnm[];
+2 -2
View File
@@ -782,14 +782,14 @@ wc_color_name(int32 colorindx)
return result; return result;
} }
/* hex[] is defined in decl.c */ /* hexdd[] is defined in decl.c */
boolean boolean
onlyhexdigits(const char *buf) onlyhexdigits(const char *buf)
{ {
const char *dp = buf; const char *dp = buf;
for (dp = buf; *dp; ++dp) { for (dp = buf; *dp; ++dp) {
if (!(strchr(hex, *dp) || *dp == '-')) if (!(strchr(hexdd, *dp) || *dp == '-'))
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
+1 -1
View File
@@ -94,7 +94,7 @@ const char *fqn_prefix_names[PREFIX_COUNT] = {
#endif #endif
/* used by coloratt.c, options.c, utf8map.c, windows.c */ /* 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) */ /* 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 }; const schar xdir[N_DIRS_Z] = { -1, -1, 0, 1, 1, 1, 0, -1, 0, 0 };
+4 -4
View File
@@ -6662,7 +6662,7 @@ escapes(const char *cp, /* might be 'tp', updating in place */
char *tp) /* result is never longer than 'cp' */ char *tp) /* result is never longer than 'cp' */
{ {
static NEARDATA const char oct[] = "01234567", dec[] = "0123456789"; static NEARDATA const char oct[] = "01234567", dec[] = "0123456789";
/* hex[] is defined in decl.c */ /* hexdd[] is defined in decl.c */
const char *dp; const char *dp;
int cval, meta, dcount; int cval, meta, dcount;
@@ -6695,11 +6695,11 @@ escapes(const char *cp, /* might be 'tp', updating in place */
cval = (cval * 8) + (*cp - '0'); cval = (cval * 8) + (*cp - '0');
} while (*++cp && strchr(oct, *cp) && ++dcount < 3); } while (*++cp && strchr(oct, *cp) && ++dcount < 3);
} else if ((cp[1] == 'x' || cp[1] == 'X') && cp[2] } 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' */ cp += 2; /* move past backslash and 'X' */
do { do {
cval = (cval * 16) + ((int) (dp - hex) / 2); cval = (cval * 16) + ((int) (dp - hexdd) / 2);
} while (*++cp && (dp = strchr(hex, *cp)) != 0 && ++dcount < 2); } while (*++cp && (dp = strchr(hexdd, *cp)) != 0 && ++dcount < 2);
} else { /* C-style character escapes */ } else { /* C-style character escapes */
switch (*++cp) { switch (*++cp) {
case '\\': case '\\':
+4 -4
View File
@@ -13,7 +13,7 @@ extern struct enum_dump objdump[];
extern glyph_map glyphmap[MAX_GLYPH]; extern glyph_map glyphmap[MAX_GLYPH];
extern const char *const known_handling[]; /* symbols.c */ extern const char *const known_handling[]; /* symbols.c */
/* hex[] is defined in decl.c */ /* hexdd[] is defined in decl.c */
int int
unicode_val(const char *cp) unicode_val(const char *cp)
@@ -24,11 +24,11 @@ unicode_val(const char *cp)
if (cp && *cp) { if (cp && *cp) {
cval = dcount = 0; cval = dcount = 0;
if ((*cp == 'U' || *cp == 'u') 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 '+' */ cp += 2; /* move past the 'U' and '+' */
do { do {
cval = (cval * 16) + ((int) (dp - hex) / 2); cval = (cval * 16) + ((int) (dp - hexdd) / 2);
} while (*++cp && (dp = strchr(hex, *cp)) != 0 && ++dcount < 7); } while (*++cp && (dp = strchr(hexdd, *cp)) != 0 && ++dcount < 7);
} }
} }
return cval; return cval;
+5 -5
View File
@@ -1432,7 +1432,7 @@ encglyph(int glyph)
return encbuf; return encbuf;
} }
/* hex[] is defined in decl.c */ /* hexdd[] is defined in decl.c */
int int
decode_glyph(const char *str, int *glyph_ptr) decode_glyph(const char *str, int *glyph_ptr)
@@ -1441,18 +1441,18 @@ decode_glyph(const char *str, int *glyph_ptr)
const char *dp; const char *dp;
for (; *str && ++dcount <= 4; ++str) { for (; *str && ++dcount <= 4; ++str) {
if ((dp = strchr(hex, *str)) != 0) { if ((dp = strchr(hexdd, *str)) != 0) {
retval++; retval++;
rndchk = (rndchk * 16) + ((int) (dp - hex) / 2); rndchk = (rndchk * 16) + ((int) (dp - hexdd) / 2);
} else } else
break; break;
} }
if (rndchk == gc.context.rndencode) { if (rndchk == gc.context.rndencode) {
*glyph_ptr = dcount = 0; *glyph_ptr = dcount = 0;
for (; *str && ++dcount <= 4; ++str) { for (; *str && ++dcount <= 4; ++str) {
if ((dp = strchr(hex, *str)) != 0) { if ((dp = strchr(hexdd, *str)) != 0) {
retval++; retval++;
*glyph_ptr = (*glyph_ptr * 16) + ((int) (dp - hex) / 2); *glyph_ptr = (*glyph_ptr * 16) + ((int) (dp - hexdd) / 2);
} else } else
break; break;
} }