1curs_printw(3X)                                                curs_printw(3X)
2
3
4

NAME

6       printw, wprintw, mvprintw, mvwprintw, vwprintw, vw_printw - print
7       formatted output in curses windows
8

SYNOPSIS

10       #include <curses.h>
11
12       int printw(const char *fmt, ...);
13       int wprintw(WINDOW *win, const char *fmt, ...);
14       int mvprintw(int y, int x, const char *fmt, ...);
15       int mvwprintw(WINDOW *win, int y, int x, const char *fmt, ...);
16       int vw_printw(WINDOW *win, const char *fmt, va_list varglist);
17
18       /* obsolete */
19       int vwprintw(WINDOW *win, const char *fmt, va_list varglist);
20

DESCRIPTION

22       The printw, wprintw, mvprintw and mvwprintw routines are  analogous  to
23       printf  [see printf(3)].  In effect, the string that would be output by
24       printf is output instead as though waddstr were used on the given  win‐
25       dow.
26
27       The  vwprintw  and  wv_printw  routines  are  analogous to vprintf [see
28       printf(3)] and perform a wprintw using a variable argument  list.   The
29       third  argument  is a va_list, a pointer to a list of arguments, as de‐
30       fined in <stdarg.h>.
31

RETURN VALUE

33       Routines that return an integer return ERR upon failure  and  OK  (SVr4
34       only  specifies "an integer value other than ERR") upon successful com‐
35       pletion.
36
37       X/Open defines no error conditions.  In this implementation,  an  error
38       may be returned if it cannot allocate enough memory for the buffer used
39       to format the results.  It will return an error if the  window  pointer
40       is null.
41
42       Functions  with  a  “mv”  prefix  first perform a cursor movement using
43       wmove, and return an error if the position is outside the window, or if
44       the window pointer is null.
45

PORTABILITY

47       In  this implementation, vw_printw and vwprintw are equivalent, to sup‐
48       port legacy applications.  However, the latter (vwprintw) is obsolete:
49
50       ·   The XSI Curses standard, Issue 4 described  these  functions.   The
51           function  vwprintw is marked TO BE WITHDRAWN, and is to be replaced
52           by a function vw_printw using the <stdarg.h> interface.
53
54       ·   The Single Unix Specification, Version 2 states that vw_printw   is
55           preferred   to   vwprintw   since  the  latter  requires  including
56           <varargs.h>, which cannot be used in the same file  as  <stdarg.h>.
57           This  implementation  uses <stdarg.h> for both, because that header
58           is included in <curses.h>.
59
60       ·   X/Open Curses, Issue 5 (December 2007) marked vwprintw (along  with
61           vwscanw and the termcap interface) as withdrawn.
62

SEE ALSO

64       curses(3X), curs_addstr(3X), curs_scanw(3X), curs_termcap(3X),
65       printf(3), vprintf(3).
66
67
68
69                                                               curs_printw(3X)
Impressum