addstr, waddstr, addnstr, waddnstr, mvaddstr, mvwaddstr, mvaddnstr, mvwaddnstr [ MPE/iX Developer's Kit Reference Manual Volume II ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume II
addstr, waddstr, addnstr, waddnstr, mvaddstr, mvwaddstr, mvaddnstr,
mvwaddnstr
The addstr set of routines is used to add a character string (with
attributes) to a window.
Syntax
#include <curses.h>
int addstr(char *str);
int waddstr(WINDOW *win, char *str);
int addnstr(char *str, int n);
int waddnstr(WINDOW *win, char *str, int n);
int mvaddstr(int y, int x, char *str);
int mvwaddstr(WINDOW *win, int y, int x, char *str);
int mvaddnstr(int y, int x, char *str, int n);
int mvwaddnstr(WINDOW *win, int y, int x, char *str, int n);
Parameters
str A pointer to the character string that is to be
written to the window.
win A pointer to the window in which the string is to
be written.
x The x (column) coordinate of the starting position
of str in the window.
y The y (row) coordinate of the starting position of
str in the window.
Return Values
OK Successful completion.
ERR An error occurred. An attempt was made to write
outside the window boundary.
Description
The addstr() routine writes a null-terminated character string to the
stdscr window at the current cursor position and advances the cursor.
The waddstr() routine performs an identical action, but writes the
character to the window specified by win. The mvaddstr() and mvwaddstr()
routines write the character string to the position indicated by the x
(column) and y (row) parameters (the former to the stdscr window; the
latter to window win).
The functionality of these routines is equivalent to calling the
corresponding waddch() set of routines once for each character in the
string. Refer to waddch() for a complete description of the interaction
between the foreground and background attributes of the window and the
character written. Note that these routines differ from the waddchnstr()
set of routines in that the latter copy the string as is (without
combining each character with the foreground and background attributes of
the window).
The addnstr(), waddnstr(), mvaddnstr(), and mvwaddnstr() routines write
at most n characters to the window. If n is less than 0, the entire
string is written. The former two routines place the characters at the
current cursor position; the latter two commands use the position
specified by the x and y parameters.
NOTE All routines except waddnstr() are macros.
Implementation Considerations
The addstr(), waddstr(), mvaddstr(), and mvwaddstr() are identical to
XPG/3. The addnstr(), waddnstr(), mvaddnstr(), and mvwaddnstr() routines
are UNIX System V implementations.
See Also
waddch(), waddchnstr()
Portability
The addstr(), waddstr(), mvaddstr(), and mvwaddstr() routines conform to
HP-UX, UNIX System V, and XPG/3. The addnstr(), waddnstr(), mvaddnstr(),
and mvwaddnstr() routines conform to UNIX System V.
MPE/iX 5.0 Documentation