Exemplo n.º 1
0
int
scanw(char *fmt, ...)
{
	va_list	ap;

	va_start(ap, fmt);
	return (vwscanw(stdscr, fmt, ap));
}
Exemplo n.º 2
0
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);
}
Exemplo n.º 3
0
/*VARARGS*/
int
wscanw(WINDOW *win, ...)
{
	char	*fmt;
	va_list	ap;

	va_start(ap, win);
	fmt = va_arg(ap, char *);
	return (vwscanw(win, fmt, ap));
}
Exemplo n.º 4
0
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);
}
Exemplo n.º 5
0
/*
 * 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);
}
Exemplo n.º 6
0
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);
}
Exemplo n.º 7
0
/*
 * 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);
}
Exemplo n.º 8
0
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);
}
Exemplo n.º 9
0
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);
}
Exemplo n.º 10
0
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;
}
Exemplo n.º 11
0
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;
}
Exemplo n.º 12
0
/*
 * 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);
}
Exemplo n.º 13
0
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;
}
Exemplo n.º 14
0
/*
 * 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;
}
Exemplo n.º 15
0
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;
}
Exemplo n.º 16
0
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;
}
Exemplo n.º 17
0
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));
}
Exemplo n.º 18
0
int
__sscans(WINDOW *win, char *fmt, va_list ap)
{
	return (vwscanw(win, fmt, ap));
}
Exemplo n.º 19
0
int vw_scanw(WINDOW *win, const char *fmt, va_list varglist)
{
    PDC_LOG(("vw_scanw() - called\n"));

    return vwscanw(win, fmt, varglist);
}