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

Function g_pututf8

sys/windows/consoletty.c:1408–1425  ·  view source on GitHub ↗

* Overrides wintty.c function of the same name * for win32. It is used for glyphs only, not text and * only when a UTF-8 sequence is involved for the * representation. Single character representations * use g_putch() instead. */

Source from the content-addressed store, hash-verified

1406 * use g_putch() instead.
1407 */
1408void
1409g_pututf8(uint8 *sequence)
1410{
1411#ifdef VIRTUAL_TERMINAL_SEQUENCES
1412#ifdef UTF8_FROM_CORE
1413 set_console_cursor(ttyDisplay->curx, ttyDisplay->cury);
1414 cell_t cell;
1415 cell.attr = console.attr;
1416 cell.colorseq = esc_seq_colors[console.current_nhcolor];
1417 cell.bkcolorseq = esc_seq_bkcolors[console.current_nhbkcolor];
1418 cell.color24 = console.color24 ? console.color24 : 0L;
1419 cell.color256idx =console.color256idx ? console.color256idx : 0;
1420 Snprintf((char *) cell.utf8str, sizeof cell.utf8str, "%s",
1421 (char *) sequence);
1422 buffer_write(console.back_buffer, &cell, console.cursor);
1423#endif /* UTF8_FROM_CORE */
1424#endif
1425}
1426
1427void
1428term_start_extracolor(uint32 nhcolor, uint16 color256idx)

Callers

nothing calls this directly

Calls 2

set_console_cursorFunction · 0.85
buffer_writeFunction · 0.85

Tested by

no test coverage detected