Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addstr(3cur)

waddstr(3cur)

printf(3s)

printw(3cur)

Name

printw, mvprintw, mvwprintw, wprintw − formatted write to a window

Syntax

#include <cursesX.h>

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

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

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

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

Description

The printw routine adds a string to the default window starting at the current cursor position. This routine causes the string that would normally be output by printf to be output by addstr.

The routine wprintw adds a string to the specified window starting at the current cursor position. This routine causes the string that would normally be output by printf to be output by waddstr.

The routine mvprintw adds a string to the default window starting at the specified cursor position. This routine causes the string that would normally be output by printf to be output by addstr.

The routine mvwprintw adds a string to the specified window starting at the specified cursor position. This routine causes the string that would normally be output by printf to be output by waddstr.

All these routines are analogous to printf. It is advisable to use the field width options of printf to avoid leaving unwanted characters on the screen from earlier calls.

Retrn Value

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

Errors

No errors are defined for these functions. 

See Also

addstr(3cur), waddstr(3cur), printf(3s)

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