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

Function Gem_putstr

outdated/win/gem/wingem.c:664–708  ·  view source on GitHub ↗
(window, attr, str)

Source from the content-addressed store, hash-verified

662extern void mar_putstr_text(winid, int, const char *);
663
664void
665Gem_putstr(window, attr, str)
666winid window;
667int attr;
668const char *str;
669{
670 int win_type;
671
672 if (window == WIN_ERR) {
673 Gem_raw_print(str);
674 return;
675 }
676
677 if (str == (const char *) 0)
678 return;
679
680 switch ((win_type = mar_hol_win_type(window))) {
681 case NHW_MESSAGE:
682 mar_add_message(str);
683 break;
684
685 case NHW_STATUS:
686 mar_status_dirty();
687 mar_add_status_str(str, curr_status_line);
688 if (curr_status_line)
689 mar_display_nhwindow(WIN_STATUS);
690 break;
691
692 case NHW_MAP:
693 if (strcmp(str, "."))
694 Gem_putstr(WIN_MESSAGE, 0, str);
695 else
696 mar_map_curs_weiter();
697 mar_display_nhwindow(WIN_MESSAGE);
698 mar_display_nhwindow(WIN_STATUS);
699 break;
700
701 case NHW_MENU:
702 mar_change_menu_2_text(window);
703 /* Fallthru */
704 case NHW_TEXT:
705 mar_putstr_text(window, attr, str);
706 break;
707 } /* endswitch win_type */
708}
709
710void
711Gem_display_file(fname, complain)

Callers 1

Gem_display_fileFunction · 0.85

Calls 9

Gem_raw_printFunction · 0.85
mar_hol_win_typeFunction · 0.85
mar_add_messageFunction · 0.85
mar_status_dirtyFunction · 0.85
mar_add_status_strFunction · 0.85
mar_display_nhwindowFunction · 0.85
mar_map_curs_weiterFunction · 0.85
mar_change_menu_2_textFunction · 0.85
mar_putstr_textFunction · 0.85

Tested by

no test coverage detected