MCPcopy Create free account
hub / github.com/NetHack/NetHack / to_unicode_callback

Function to_unicode_callback

src/glyphs.c:1280–1300  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1278}
1279
1280staticfn void
1281to_unicode_callback(int glyph UNUSED, struct find_struct *findwhat)
1282{
1283 int uval;
1284#ifdef NO_PARSING_SYMSET
1285 glyph_map *gm = &glyphmap[glyph];
1286#endif
1287 uint8 utf8str[6];
1288
1289 if (!findwhat->unicode_val)
1290 return;
1291 uval = unicode_val(findwhat->unicode_val);
1292 if (unicodeval_to_utf8str(uval, utf8str, sizeof utf8str)) {
1293#ifdef NO_PARSING_SYMSET
1294 set_map_u(gm, uval, utf8str,
1295 (findwhat->color != 0L) ? findwhat->color : 0L);
1296#else
1297
1298#endif
1299 }
1300}
1301
1302int
1303glyphs_to_unicode(const char *id, const char *unicode_val, long clr)

Callers

nothing calls this directly

Calls 3

unicode_valFunction · 0.85
unicodeval_to_utf8strFunction · 0.85
set_map_uFunction · 0.85

Tested by

no test coverage detected