int scanw(char *fmt, ...) { va_list ap; va_start(ap, fmt); return (vwscanw(stdscr, fmt, ap)); }
mvscanw(int y, int x, NCURSES_CONST char *fmt,...) { int code; va_list ap; va_start(ap, fmt); code = (move(y, x) == OK) ? vwscanw(stdscr, fmt, ap) : ERR; va_end(ap); return (code); }
/*VARARGS*/ int wscanw(WINDOW *win, ...) { char *fmt; va_list ap; va_start(ap, win); fmt = va_arg(ap, char *); return (vwscanw(win, fmt, ap)); }
mvwscanw(WINDOW *win, int y, int x, NCURSES_CONST char *fmt,...) { int code; va_list ap; va_start(ap, fmt); code = (wmove(win, y, x) == OK) ? vwscanw(win, fmt, ap) : ERR; va_end(ap); return (code); }
/* * scanw -- * Implement a scanf on the standard screen. */ int scanw(const char *fmt, ...) { va_list ap; int ret; va_start(ap, fmt); ret = vwscanw(stdscr, fmt, ap); va_end(ap); return (ret); }
int mvwscanw(WINDOW *win, int y, int x, ...) { char *fmt; va_list ap; va_start(ap, x); fmt = va_arg(ap, char *); return (wmove(win, y, x) == OK ? vwscanw(win, fmt, ap) : ERR); }
/* * wscanw -- * Implements a scanf on the given window. */ int wscanw(WINDOW *win, const char *fmt, ...) { va_list ap; int ret; va_start(ap, fmt); ret = vwscanw(win, fmt, ap); va_end(ap); return (ret); }
wscanw(WINDOW *win, NCURSES_CONST char *fmt,...) { int code; va_list ap; T(("wscanw(%p,\"%s\",...) called", (void *) win, fmt)); va_start(ap, fmt); code = vwscanw(win, fmt, ap); va_end(ap); return (code); }
scanw(NCURSES_CONST char *fmt,...) { int code; va_list ap; T(("scanw(\"%s\",...) called", fmt)); va_start(ap, fmt); code = vwscanw(stdscr, fmt, ap); va_end(ap); return (code); }
int wscanw(WINDOW *win, const char *fmt, ...) { va_list args; int retval; PDC_LOG(("wscanw() - called\n")); va_start(args, fmt); retval = vwscanw(win, fmt, args); va_end(args); return retval; }
int scanw(const char *fmt, ...) { va_list args; int retval; PDC_LOG(("scanw() - called\n")); va_start(args, fmt); retval = vwscanw(stdscr, fmt, args); va_end(args); return retval; }
/* * mvscanw, mvwscanw -- * Implement the mvscanw commands. Due to the variable number of * arguments, they cannot be macros. Another sigh.... */ int mvscanw(register int y, register int x, const char *fmt,...) { va_list ap; int ret; if (move(y, x) != OK) return (ERR); va_start(ap, fmt); ret = vwscanw(stdscr, fmt, ap); va_end(ap); return (ret); }
int cscanf(const char* fmt, ...) { va_list v; int ret; init_screen(); echo(); va_start(v, fmt); ret = vwscanw(_working_window, fmt, v); va_end(v); wrefresh(_working_window); noecho(); return ret == ERR ? 0 : ret; }
/* * The use of the vwscanw() and the vw_scanw() functions in the same file will not work, due to * the requirement to include varargs.h and stdarg.h which both contain definitions of va_list. */ int vwscanwDotsShell( WINDOW * win, char * fmt, ... ) { int res; #if 0 // #error GCC (version >= 4.0) no longer implements <varargs.h>. va_list argList; va_start( argList, fmt ); res = vwscanw( win, fmt, argList ); va_end( argList ); #else va_list argList; va_start( argList, fmt ); res = vw_scanw( win, fmt, argList ); va_end( argList ); #endif return res; }
int mvscanw(int y, int x, const char *fmt, ...) { va_list args; int retval; PDC_LOG(("mvscanw() - called\n")); if (move(y, x) == ERR) return ERR; va_start(args, fmt); retval = vwscanw(stdscr, fmt, args); va_end(args); return retval; }
int mvwscanw(WINDOW *win, int y, int x, const char *fmt, ...) { va_list args; int retval; PDC_LOG(("mvscanw() - called\n")); if (wmove(win, y, x) == ERR) return ERR; va_start(args, fmt); retval = vwscanw(win, fmt, args); va_end(args); return retval; }
NCURSES_EXPORT(int) (vw_scanw) (WINDOW * a1, char * a2, va_list z) { T((T_CALLED("vw_scanw(%p,%s,%s)"), (const void *)a1, _nc_visbuf2(1,a2), "va_list")); returnCode(vwscanw(a1, a2, z)); }
int __sscans(WINDOW *win, char *fmt, va_list ap) { return (vwscanw(win, fmt, ap)); }
int vw_scanw(WINDOW *win, const char *fmt, va_list varglist) { PDC_LOG(("vw_scanw() - called\n")); return vwscanw(win, fmt, varglist); }