Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

addwstr(3)

curses(3)

curses_intro(3)

inwstr(3)

addwchstr(3)  —  Subroutines

NAME

addwchstr, addwchnstr, waddwchstr, waddwchnstr, mvaddwchstr, mvaddwchnstr, mvwaddwchstr, mvwaddwchnstr − Add a string of wchar_t characters (and attributes) to a curses window

LIBRARY

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

SYNOPSIS

#include <curses.h>

int addwchstr(chtype ∗wchstr);

int addwchnstr(
        chtype ∗wchstr,
        int n);

int waddwchstr(
        WINDOW ∗win,
        chtype ∗wchstr);

int waddwchnstr(
        WINDOW ∗win,
        chtype ∗wchstr,
        int n);

int mvaddwchstr(
        int y,
        int x,
        chtype ∗wchstr);

int mvaddwchnstr(
        int y,
        int x,
        chtype ∗wchstr,
        int n);

int mvwaddwchstr(
        WINDOW ∗win,
        int y,
        int x,
        chtype ∗wchstr);

int mvwaddwchnstr(
        WINDOW ∗win,
        int y,
        int x,
        chtype ∗wchstr,
        int n);

PARAMETERS

wchstrSpecifies the wide-character string to be added to the window. 

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. 

nSpecifies the maximum number of wide characters to be added from the string. 

DESCRIPTION

The addwchstr routine writes all the characters of the wchar_t character string wchstr on the default window at the current (y, x) coordinates. 

The addwchnstr routine writes at most n characters of the wchar_t character string wchstr on the default window at the current (y, x) coordinates. 

The waddwchstr routine writes all the characters of the wchar_t character string wchstr on the specified window at the current (y, x) coordinates. 

The waddwchnstr routine writes at most n characters of the wchar_t character string wchstr on the specified window at the current (y, x) coordinates. 

The mvaddwchstr routine writes all the characters of the wchar_t character string wchstr on the default window at the specified (y, x) coordinates. 

The mvaddwchnstr routine writes at most n characters of the wchar_t character string wchstr on the default window at the specified (y, x) coordinates. 

The mvwaddwchstr routine writes all the characters of the wchar_t character string wchstr on the specified window at the specified (y, x) coordinates. 

The mvwaddwchnstr routine writes at most n characters of the wchar_t character string wchstr on the specified window at the specified (y, x) coordinates. 

For those routines with n as the last argument, if n is −1 then the whole string is written to the window. 

The following information applies to all the routines:

       •The cursor position is not advanced after the write operation. 

       •ERR (error) is returned if writing the string causes illegal scrolling. 

In this case, the routine will write as much of the string on the window as possible. 

The addwchstr, addwchnstr, waddwchstr, mvaddwchstr, mvaddwchnstr, mvwaddwchstr, and mvwaddwchnstr routines are macros. 

RETURN VALUES

The addwchstr, addwchnstr, waddwchstr, waddwchnstr, mvaddwchstr, mvaddwchnstr, mvwaddwchstr, and mvwaddwchnstr routines return OK on success and ERR on error. 

RELATED INFORMATION

Functions: addwstr(3), curses(3), curses_intro(3), inwstr(3). 

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