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

Function curses_wait_synch

win/curses/cursmain.c:861–889  ·  view source on GitHub ↗

wait_synch() -- Wait until all pending output is complete (*flush*() for streams goes here). -- May also deal with exposure events etc. so that the display is OK when return from wait_synch(). */

Source from the content-addressed store, hash-verified

859 display is OK when return from wait_synch().
860*/
861void
862curses_wait_synch(void)
863{
864 if (iflags.raw_printed) {
865#ifndef PDCURSES
866 int chr;
867 /*
868 * If any message has been issued via raw_print(), make the user
869 * acknowledge it. This might take place before initscr() so
870 * access to curses is limited. [Despite that, there's probably
871 * a more curses-specific way to handle this. FIXME?]
872 */
873
874 (void) fprintf(stdout, "\nPress <return> to continue: ");
875 (void) fflush(stdout);
876 do {
877 chr = fgetc(stdin);
878 } while (chr > 0 && chr != C('j') && chr != C('m') && chr != '\033');
879#endif
880 iflags.raw_printed = 0;
881 }
882
883 if (iflags.window_inited) {
884 if (curses_got_output())
885 (void) curses_more();
886 curses_mark_synch();
887 }
888 /* [do we need 'if (counting) curses_count_window((char *)0);' here?] */
889}
890
891/*
892cliparound(x, y)-- Make sure that the user is more-or-less centered on the

Callers 1

curses_init_nhwindowsFunction · 0.85

Calls 6

fprintfFunction · 0.85
fflushFunction · 0.85
fgetcFunction · 0.85
curses_got_outputFunction · 0.85
curses_moreFunction · 0.85
curses_mark_synchFunction · 0.85

Tested by

no test coverage detected