https://invisible-island.net/ncurses/man/


curs_addchstr 3x 2024-07-27 ncurses 6.5 Library calls

curs_addchstr(3x)                Library calls               curs_addchstr(3x)




NAME

       addchstr,  waddchstr,  mvaddchstr,  mvwaddchstr, addchnstr, waddchnstr,
       mvaddchnstr, mvwaddchnstr - add a curses character string to a window


SYNOPSIS

       #include <curses.h>

       int addchstr(const chtype * chstr);
       int waddchstr(WINDOW * win, const chtype * chstr);
       int mvaddchstr(int y, int x, const chtype * chstr);
       int mvwaddchstr(WINDOW * win, int y, int x, const chtype * chstr);

       int addchnstr(const chtype * chstr, int n);
       int waddchnstr(WINDOW * win, const chtype * chstr, int n);
       int mvaddchnstr(int y, int x, const chtype * chstr, int n);
       int mvwaddchnstr(WINDOW * win, int y, int x, const chtype * chstr, int n);


DESCRIPTION

       waddchstr copies the string of curses characters chstr  to  the  window
       win.   A  null curses character terminates the string.  waddchnstr does
       the same, but copies at most n characters, or as many as possible if  n
       is -1.  ncurses(3x) describes the variants of these functions.

       Because  these  functions  do  not call waddch(3x) internally, they are
       faster than waddstr(3x) and waddnstr(3x).  On the other hand, they

       o   do  not  treat  the  backspace,  carriage  return,  or  line   feed
           characters specially;

       o   do not represent unprintable characters with unctrl(3x);

       o   do  not  update  the  cursor  position to follow the last character
           written;

       o   truncate the string at  the  window's  right  margin,  rather  than
           wrapping it to the next line and potentially scrolling.


RETURN VALUE

       These functions return OK on success and ERR on failure.

       In ncurses, they return ERR if

       o   win is NULL or

       o   chstr is NULL.

       Functions  prefixed with "mv" first perform cursor movement and fail if
       the position (y, x) is outside the window boundaries.


NOTES

       All of these functions except waddchnstr may be implemented as macros.


PORTABILITY

       X/Open Curses, Issue 4 describes  these  functions.   It  specifies  no
       error conditions for them.


HISTORY

       SVr3.1 (1987) introduced waddchstr and waddchnstr.


SEE ALSO

       curs_add_wchstr(3x)  describes  comparable  functions  of  the  ncurses
       library in its wide-character configuration (ncursesw).

       curses(3x), curs_addch(3x), curs_addstr(3x)



ncurses 6.5                       2024-07-27                 curs_addchstr(3x)