_nc_free_and_exit(int code) { char *last_setbuf = (SP != 0) ? SP->_setbuf : 0; _nc_freeall(); #ifdef TRACE trace(0); /* close trace file, freeing its setbuf */ free(_nc_varargs("?", 0)); #endif fclose(stdout); FreeIfNeeded(last_setbuf); exit(code); }
wprintw(WINDOW *win, const char *fmt,...) { va_list argp; int code; #ifdef TRACE va_start(argp, fmt); T((T_CALLED("wprintw(%p,%s%s)"), win, _nc_visbuf(fmt), _nc_varargs(fmt, argp))); va_end(argp); #endif va_start(argp, fmt); code = vwprintw(win, fmt, argp); va_end(argp); returnCode(code); }
mvprintw(int y, int x, const char *fmt,...) { va_list argp; int code; #ifdef TRACE va_start(argp, fmt); T((T_CALLED("mvprintw(%d,%d,%s%s)"), y, x, _nc_visbuf(fmt), _nc_varargs(fmt, argp))); va_end(argp); #endif if ((code = move(y, x)) != ERR) { va_start(argp, fmt); code = vwprintw(stdscr, fmt, argp); va_end(argp); } returnCode(code); }
mvwprintw(WINDOW *win, int y, int x, const char *fmt,...) { va_list argp; int code; #ifdef TRACE va_start(argp, fmt); T((T_CALLED("mvwprintw(%d,%d,%p,%s%s)"), y, x, (void *) win, _nc_visbuf(fmt), _nc_varargs(fmt, argp))); va_end(argp); #endif if ((code = wmove(win, y, x)) != ERR) { va_start(argp, fmt); code = vwprintw(win, fmt, argp); va_end(argp); } returnCode(code); }