man.bsd.lv manual page server

Manual Page Search Parameters

CURSES_ADDSTR(3) Library Functions Manual CURSES_ADDSTR(3)

curses_addstr, addstr, addwstr, waddstr, waddwstr, addnstr, addnwstr, waddnstr, waddnwstr, mvaddstr, mvaddwstr, mvwaddstr, mvwaddwstr, mvaddnstr, mvaddnwstr, mvwaddnstr, mvwaddnwstrcurses add character strings to windows routines

library “libcurses”

#include <curses.h>

int
addstr(const char *string);

int
addwstr(const wchar_t *string);

int
waddstr(WINDOW *win, const char *string);

int
waddwstr(WINDOW *win, const wchar_t *string);

int
mvaddstr(int y, int x, const char *string);

int
mvaddwstr(int y, int x, const wchar_t *string);

int
mvwaddstr(WINDOW *win, int y, int x, const char *string);

int
mvwaddwstr(WINDOW *win, int y, int x, const wchar_t *string, int len);

int
addnstr(const char *string, int len);

int
addnwstr(const wchar_t *string, int len);

int
waddnstr(WINDOW *win, const char *string, int len);

int
waddnwstr(WINDOW *win, const wchar_t *string, int len);

int
mvaddnstr(int y, int x, const char *string, int len);

int
mvaddnwstr(int y, int x, const wchar_t *string, int len);

int
mvwaddnstr(WINDOW *win, int y, int x, const char *string, int len);

int
mvwaddnwstr(WINDOW *win, int y, int x, const wchar_t *string, int len);

These functions add character strings to stdscr or to the specified window.

The () function will add the characters passed in string to stdscr starting at the current cursor position. Any background attributes currently set on stdscr will be applied to the added character. The () function does the same as addstr() but adds the string to the window specified by ().

The () function will add the contents of string to stdscr but will limit the number of characters added to be, at most, len. If len is -1 then addnstr will add the number of characters contained in the null terminated string string. Any background attributes currently set on stdscr will be applied to the added character. The () function does the same as addnstr but adds the string to the window specified by win.

The functions (), (), () and () are the same as the functions addstr(), waddstr(), waddstr() and waddnstr(), respectively, excepting that () is called to move the cursor to the position specified by y, x before the string is added to the window.

Functions returning pointers will return NULL if an error is detected. The functions that return an int will return one of the following values:

OK
The function completed successfully.
ERR
An error occurred in the function.

curses_addch(3), curses_addchstr(3), curses_attributes(3), curses_cursor(3), curses_inch(3)

The NetBSD Curses library complies with the X/Open Curses specification, part of the Single Unix Specification.

The Curses package appeared in 4.0BSD.

July 28, 2019 NetBSD-9.2