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

Function xputc

sys/msdos/video.c:655–683  ·  view source on GitHub ↗

same signature as 'putchar()' with potential failure result ignored */

Source from the content-addressed store, hash-verified

653
654/* same signature as 'putchar()' with potential failure result ignored */
655int
656xputc(int ch) /* write out character (and attribute) */
657{
658 int i;
659 char attribute;
660
661 i = iflags.grmode ? attrib_gr_normal : attrib_text_normal;
662 attribute = (char) ((g_attribute == 0) ? i : g_attribute);
663
664 if (curframecolor != NO_COLOR) {
665 attribute |= ((ttycolors[curframecolor]) << 4);
666 }
667
668 if (!iflags.grmode) {
669 if (inversed) {
670 attribute = (g_attribute % 8) << 4;
671 }
672 txt_xputc(ch, attribute);
673#ifdef SCREEN_VGA
674 } else if (iflags.usevga) {
675 vga_xputc(ch, attribute);
676#endif /*SCREEN_VGA*/
677#ifdef SCREEN_VESA
678 } else if (iflags.usevesa) {
679 vesa_xputc(ch, attribute);
680#endif /*SCREEN_VESA*/
681 }
682 return 0;
683}
684
685/* write out a glyph picture at current location */
686void xputg(const glyph_info *glyphinfo, const glyph_info *bkglyphinfo)

Callers 1

xputgFunction · 0.70

Calls 3

txt_xputcFunction · 0.85
vga_xputcFunction · 0.85
vesa_xputcFunction · 0.85

Tested by

no test coverage detected