Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ mvprintw(3) — OSF/1 3.0 αXP

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addstr(3)

printf(3)

waddstr(3)

vprintf(3)

printw(3)  —  Subroutines

NAME

printw, wprintw, mvprintw, mvwprintw, vwprintw − Formatted write operation to a curses window

LIBRARY

The curses library (libcurses.so, libcurses.a)

SYNOPSIS

#include <curses.h>

int printw( char ∗fmt [, arg] ... );

int wprintw(
    WINDOW ∗win,
    char ∗fmt [, arg] ... );

int mvprintw(
    int y,
    int x,
    char ∗fmt [, arg] ... );

int mvwprintw(
    WINDOW ∗win,
    int y,
    int x,
    char ∗fmt [, arg] ... );

#include <varargs.h>

int vwprintw(
    WINDOW ∗win,
    char ∗fmt,
    va_list varglist );

PARAMETERS

winSpecifies a curses window. If not specified, the window is the default window stdscr. 

y, xSpecifies the line (y) and column (x) coordinates of the target position on the window.  If coordinates are not specified, the target position is the current position of the logical cursor. 

fmtSpecifies a string combining literal characters with conversion specifications.  Refer to the printf(3) reference page for details about the format specification. 

argSpecifies an argument to be converted according to fmt. 

varglistSpecifies a list of arguments to be converted according to fmt. 

DESCRIPTION

The printw routine adds a string to the default window starting at the current cursor position.  This routine causes a string formatted by printf() to be output by addstr(). 

The wprintw routine adds a string to the window win starting at the current cursor position.  This routine causes a string formatted by printf() to be output by waddstr(). 

The mvprintw routine adds a string to the default window starting at cursor position (y, x).  This routine causes a string formatted by printf() to be output by addstr(). 

The mvwprintw routine adds a string to the window win starting at cursor position (y, x).  This routine causes a string formatted by printf() to be output by waddstr(). 

All of the preceding routines are analogous to printf().  To avoid leaving unwanted characters on the screen from earlier calls, use the field width options of printf(). 

The vwprintw routine adds a string to the window win starting at the current cursor position.  This routine causes a string formatted by vprintf() to be output by wprintw() using a variable argument list. 

RETURN VALUES

The printw, mvprintw, mvwprintw, wprintw, and vwprintw routines return OK on success and ERR on error. 

RELATED INFORMATION

Functions: addstr(3), printf(3), waddstr(3), vprintf(3). 

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026