* Copyright (c) 1981 Regents of the University of California.
* %sccs.include.redist.c%
static char sccsid
[] = "@(#)scanw.c 5.14 (Berkeley) %G%";
* Implement a scanf on the standard screen.
scanw(const char *fmt
, ...)
ret
= vwscanw(stdscr
, fmt
, ap
);
* Implements a scanf on the given window.
wscanw(WINDOW
*win
, const char *fmt
, ...)
wscanw(win
, fmt
, va_alist
)
ret
= vwscanw(win
, fmt
, ap
);
* Implement the mvscanw commands. Due to the variable number of
* arguments, they cannot be macros. Another sigh....
mvscanw(register int y
, register int x
, const char *fmt
,...)
mvscanw(y
, x
, fmt
, va_alist
)
ret
= vwscanw(stdscr
, fmt
, ap
);
mvwscanw(register WINDOW
* win
, register int y
, register int x
,
mvwscanw(win
, y
, x
, fmt
, va_alist
)
ret
= vwscanw(win
, fmt
, ap
);
* This routine actually executes the scanf from the window.
return (wgetstr(win
, buf
) == OK
?
vsscanf(buf
, fmt
, ap
) : ERR
);