addnstr(3X)
ENHANCED CURSES
NAME
addnstr, addstr, mvaddnstr, mvaddstr, mvwaddnstr, mvwaddstr waddnstr, waddstr — add a string of multi-byte characters without rendition to a window and advance cursor
SYNOPSIS
#include <curses.h>
int addnstr(char *const str, int n);
int addstr(char *const str);
int mvaddnstr(int y, int x, char *const str, int n);
int mvaddstr(int y, int x, char *const str);
int mvwaddnstr(WINDOW *win, int y, int x, char *const str, int n);
int mvwaddstr(WINDOW *win, int y, int x, char *const str);
int waddnstr(WINDOW *win, char *const str, int n);
int waddstr(WINDOW *win, char *const str);
DESCRIPTION
These functions write the characters of the string str on the current or specified window starting at the current or specified position using the background rendition.
These functions advance the cursor position. These functions perform special character processing. These functions perform wrapping.
The addstr(), mvaddstr(), mvwaddstr() and waddstr() functions are similar to calling mbstowcs() on str, and then calling addwstr(), mvaddwstr(), mvwaddwstr() and waddwstr(), respectively.
The addnstr(), mvaddnstr(), mvwaddnstr() and waddnstr() functions use at most n bytes from str. These functions add the entire string when n is −1. These functions are similar to calling mbstowcs() on the first n bytes of str, and then calling addwstr(), mvaddwstr(), mvwaddwstr() and waddwstr(), respectively.
RETURN VALUE
Upon successful completion, these functions return OK. Otherwise, they return ERR.
ERRORS
No errors are defined.
SEE ALSO
addnwstr(), mbstowcs() (in the X/Open System Interfaces and Headers, Issue 4, Version 2 specification ), <curses.h>.
CHANGE HISTORY
First released in X/Open Curses, Issue 4.
In X/Open Curses, Issue 3, the addstr(), mvaddstr(), mvwaddstr() and waddstr() functions were described in the addstr() entry. In X/Open Curses, Issue 4, the type of the str argument defined for these functions is changed from char * to char *const, and the DESCRIPTION is changed to indicate that the functions will handle multi-byte sequences correctly.
Hewlett-Packard Company — HP-UX Release 10.20: July 1996