curs_addchstr(S-osr5)
curs_addchstr: addchstr, addchnstr, waddchstr, waddchnstr, mvaddchstr, mvaddchnstr, mvwaddchstr, mvwaddchnstr --
add string of characters (and attributes) to a curses window
Syntax
cc ... -lcurses
#include <curses.h>
int addchstr(chtype *chstr);
int addchnstr(chtype *chstr, int n);
int waddchstr(WINDOW *win, chtype *chstr);
int waddchnstr(WINDOW *win, chtype *chstr, int n);
int mvaddchstr(int y, int x, chtype *chstr);
int mvaddchnstr(int y, int x, chtype *chstr, int n);
int mvwaddchstr(WINDOW *win, int y, int x, chtype *chstr);
int mvwaddchnstr(WINDOW *win, int y, int x, chtype *chstr, int n);
Description
All of these routines copy chstr directly into the window image
structure starting at the current cursor position.
The four routines with n as the last argument
copy at most n elements,
but no more than will fit on the line.
If n=-1 then the whole string is copied,
to the maximum number of elements that fit on the line.
The window cursor is not advanced.
These routines work faster than
waddnstr(S-osr5)
because they merely copy
chstr into the window image structure.
On the other hand, you must be careful when using these functions because:
-
They don't do any kind of checking (such as for the newline character).
-
They don't advance the current cursor position.
-
They truncate the string, rather than wrapping it around to the new line.
Return values
All routines return the integer ERR on
failure and an integer value other than ERR on successful completion,
unless otherwise noted in the preceding descriptions.
Warning
The header file curses.h automatically includes the header files
stdio.h and unctrl.h.
The following routines can be macros:
-
addchstr(S-osr5)
-
addchnstr(S-osr5)
-
waddchstr(S-osr5)
-
mvaddchstr(S-osr5)
-
mvaddchnstr(S-osr5)
-
mvwaddchstr(S-osr5)
-
mvwaddchnstr(S-osr5)
Files
/usr/lib/libcurses.a-
the library
See also
curses(S-osr5)
Standards conformance
addchstr(S-osr5),
addchnstr(S-osr5),
waddchstr(S-osr5),
waddchnstr(S-osr5),
mvaddchstr(S-osr5),
mvaddchnstr(S-osr5),
mvwaddchstr(S-osr5),
and
mvwaddchnstr(S-osr5)
are not part of any currently supported standard;
they are extensions of AT&T System V
developed by The Santa Cruz Operation, Inc.
and maintained by The SCO Group.
© 2005 The SCO Group, Inc. All rights reserved.
SCO OpenServer Release 6.0.0 -- 02 June 2005