2 /***************************************************************************
4 ****************************************************************************
5 * ncurses is copyright (C) 1992-1995 *
7 * zmbenhal@netcom.com *
9 * esr@snark.thyrsus.com *
11 * Permission is hereby granted to reproduce and distribute ncurses *
12 * by any means and for any fee, whether alone or as part of a *
13 * larger distribution, in source or in binary form, PROVIDED *
14 * this notice is included with any such distribution, and is not *
15 * removed from any of its header files. Mention of ncurses in any *
16 * applications linked with it is highly appreciated. *
18 * ncurses comes AS IS with no warranty, implied or expressed. *
20 ***************************************************************************/
27 ** The routines printw(), wprintw() and friends.
31 #include <curses.priv.h>
33 MODULE_ID("$Id: lib_printw.c,v 1.3 1997/02/16 00:07:23 tom Exp $")
35 int printw(const char *fmt, ...)
40 T(("printw(%s,...) called", _nc_visbuf(fmt)));
43 vsprintf(buf, fmt, argp);
45 return(waddstr(stdscr, buf));
50 int wprintw(WINDOW *win, const char *fmt, ...)
55 T(("wprintw(%p,%s,...) called", win, _nc_visbuf(fmt)));
58 vsprintf(buf, fmt, argp);
60 return(waddstr(win, buf));
65 int mvprintw(int y, int x, const char *fmt, ...)
71 vsprintf(buf, fmt, argp);
73 return(move(y, x) == OK ? waddstr(stdscr, buf) : ERR);
78 int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...)
84 vsprintf(buf, fmt, argp);
86 return(wmove(win, y, x) == OK ? waddstr(win, buf) : ERR);
89 int vwprintw(WINDOW *win, const char *fmt, va_list argp)
93 vsprintf(buf, fmt, argp);
94 return(waddstr(win, buf));