]> granicus.if.org Git - nethack/commitdiff
rgbstr_to_uint32() -> rgbstr_to_int32()
authornhmall <nhmall@nethack.org>
Mon, 9 May 2022 11:31:30 +0000 (07:31 -0400)
committernhmall <nhmall@nethack.org>
Mon, 9 May 2022 11:31:30 +0000 (07:31 -0400)
Closes #756

src/utf8map.c

index e386c366b4d597890b7f1aed5593596fc97d2966..f6394b23ce0a71b42923f61673eba0e8c8d5a212 100644 (file)
@@ -41,7 +41,7 @@ static int unicode_val(const char *cp);
 static int parse_id(const char *id, struct find_struct *findwhat);
 static int glyph_find_core(const char *id, struct find_struct *findwhat);
 static char *fix_glyphname(char *str);
-static uint32_t rgbstr_to_uint32(const char *rgbstr);
+static int32_t rgbstr_to_int32(const char *rgbstr);
 boolean closest_color(uint32_t lcolor, uint32_t *closecolor, int *clridx);
 
 static void
@@ -114,7 +114,7 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
     if (c_unicode && (*c_unicode == 'U' || *c_unicode == 'u')
         && (c_unicode[1] == '+')) {
         /* unicode = unicode_val(c_unicode); */
-        if ((rgb = rgbstr_to_uint32(c_rgb)) != -1L || !c_rgb) {
+        if ((rgb = rgbstr_to_int32(c_rgb)) != -1L || !c_rgb) {
             to_custom_symbol_find.unicode_val = c_unicode;
             /* if the color 0 is an actual color, as opposed to just "not set"
                we set a marker bit outside the 24-bit range to indicate a
@@ -134,8 +134,8 @@ glyphrep_to_custom_map_entries(const char *op, int *glyphptr)
     return 0;
 }
 
-static uint32_t
-rgbstr_to_uint32(const char *rgbstr)
+static int32_t
+rgbstr_to_int32(const char *rgbstr)
 {
     int r, gn, b, milestone = 0;
     char *cp, *c_r,*c_g,*c_b;