follow-up fix a regression on color naming
This commit is contained in:
+20
-13
@@ -102,7 +102,7 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
|
|||||||
int milestone, reslt = 0;
|
int milestone, reslt = 0;
|
||||||
long rgb = 0L;
|
long rgb = 0L;
|
||||||
boolean slash = FALSE, colon = FALSE;
|
boolean slash = FALSE, colon = FALSE;
|
||||||
|
|
||||||
if (!glyphid_cache)
|
if (!glyphid_cache)
|
||||||
reslt = 1; /* for debugger use only; no cache available */
|
reslt = 1; /* for debugger use only; no cache available */
|
||||||
|
|
||||||
@@ -111,20 +111,23 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
|
|||||||
c_unicode = c_colorval = (char *) 0;
|
c_unicode = c_colorval = (char *) 0;
|
||||||
c_glyphid = cp = buf;
|
c_glyphid = cp = buf;
|
||||||
while (*cp) {
|
while (*cp) {
|
||||||
if ((*cp == '/') || (*cp == ':')) {
|
if (*cp == ':' || *cp == '/') {
|
||||||
if (*cp == '/')
|
if (*cp == ':') {
|
||||||
slash = TRUE;
|
|
||||||
if (*cp == ':')
|
|
||||||
colon = TRUE;
|
colon = TRUE;
|
||||||
*cp = '\0';
|
*cp = '\0';
|
||||||
|
}
|
||||||
|
if (*cp == '/') {
|
||||||
|
slash = TRUE;
|
||||||
|
*cp = '\0';
|
||||||
|
}
|
||||||
milestone++;
|
milestone++;
|
||||||
}
|
}
|
||||||
cp++;
|
cp++;
|
||||||
if (colon && milestone < 2 && *cp == 'U') {
|
if (colon) {
|
||||||
c_unicode = cp;
|
c_unicode = cp;
|
||||||
colon = FALSE;
|
colon = FALSE;
|
||||||
}
|
}
|
||||||
if (slash && milestone >= 2) {
|
if (slash) {
|
||||||
c_colorval = cp;
|
c_colorval = cp;
|
||||||
slash = FALSE;
|
slash = FALSE;
|
||||||
}
|
}
|
||||||
@@ -132,10 +135,16 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
|
|||||||
/* some sanity checks */
|
/* some sanity checks */
|
||||||
if (c_glyphid && *c_glyphid == ' ')
|
if (c_glyphid && *c_glyphid == ' ')
|
||||||
c_glyphid++;
|
c_glyphid++;
|
||||||
if (c_unicode && *c_unicode == ' ')
|
|
||||||
c_unicode++;
|
|
||||||
if (c_colorval && *c_colorval == ' ')
|
if (c_colorval && *c_colorval == ' ')
|
||||||
c_colorval++;
|
c_colorval++;
|
||||||
|
if (c_unicode && *c_unicode == ' ') {
|
||||||
|
while (*c_unicode == ' ') {
|
||||||
|
c_unicode++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (c_unicode && !*c_unicode)
|
||||||
|
c_unicode = 0;
|
||||||
|
|
||||||
if ((c_colorval && (rgb = rgbstr_to_int32(c_colorval)) != -1L)
|
if ((c_colorval && (rgb = rgbstr_to_int32(c_colorval)) != -1L)
|
||||||
|| !c_colorval) {
|
|| !c_colorval) {
|
||||||
/* if the color 0 is an actual color, as opposed to just "not set"
|
/* if the color 0 is an actual color, as opposed to just "not set"
|
||||||
@@ -148,9 +157,7 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
|
|||||||
: (rgb == 0L) ? nonzero_black
|
: (rgb == 0L) ? nonzero_black
|
||||||
: rgb;
|
: rgb;
|
||||||
}
|
}
|
||||||
if (c_unicode
|
if (c_unicode)
|
||||||
&& (*c_unicode == 'U' || *c_unicode == 'u')
|
|
||||||
&& (c_unicode[1] == '+'))
|
|
||||||
to_custom_symbol_find.unicode_val = c_unicode;
|
to_custom_symbol_find.unicode_val = c_unicode;
|
||||||
to_custom_symbol_find.extraval = glyphptr;
|
to_custom_symbol_find.extraval = glyphptr;
|
||||||
to_custom_symbol_find.callback = to_custom_symset_entry_callback;
|
to_custom_symbol_find.callback = to_custom_symset_entry_callback;
|
||||||
|
|||||||
Reference in New Issue
Block a user