HP 3000 Manuals

addchstr, waddchstr, addchnstr, waddchnstr, mvaddchstr, mvwaddchstr, mvaddchnstr [ MPE/iX Developer's Kit Reference Manual Volume II ] MPE/iX 5.0 Documentation


MPE/iX Developer's Kit Reference Manual Volume II

addchstr, waddchstr, addchnstr, waddchnstr, mvaddchstr, mvwaddchstr, 
mvaddchnstr 

The addchstr set of routines is used to copy a character string (with
attributes) to a window.

Syntax 

     #include <curses.h>

     int addchstr(chtype *chstr);
     int waddchstr(WINDOW *win, chtype *chstr);

     int addchnstr(chtype *chstr, int n);
     int waddchnstr(WINDOW *win, chtype *chstr, int n);

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

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

Parameters 

chstr                 A pointer to the chtype string to be copied to the
                      window.

n                     The maximum number of characters to be copied from
                      chstr.  If n is less than 0, the entire string is
                      written, or as much of it as fits on the line.

win                   A pointer to the window to which the string is to
                      be copied.

x                     The x (column) coordinate of the starting position
                      of chstr in the window.

y                     The y (row) coordinate of the starting position of
                      chstr in the window.

Return Values 

OK                    Successful completion.

ERR                   An error occurred.

Description 

The addchstr() routine copies the chtype character string to the stdscr
window at the current cursor position.  The waddchstr() routine performs
the identical action, but writes to the window specified by win.  The
mvaddchstr() and mvwaddchstr() routines copy the character string to the
starting position indicated by the x (column) and y (row) parameters (the
former to the stdscr window; the latter to window win).

The addchnstr(), waddchnstr(), mvaddchnstr(), and mvwaddchnstr() routines
write n characters to the window, or as many as will fit on the line.  If
n is less than 0, the entire string is written, or as much of it as fits
on the line.  The former two routines place the string at the current
cursor position; the latter two commands use the position specified by
the x and y parameters.

These routines differ from the waddnstr() set of routines in several
important respects.  First, the position of the cursor is not advanced
after the string is written to the window.  Second, these routines are
faster because they copy the string into the window without performing
checks such as line wrapping on a newline; instead, the string is
truncated if it does not fit on the line.  Third, the current foreground
and background window attributes are not combined with the character;
only the attributes that are already part of the chtype character are
used.


NOTE All routines except waddchnstr() are macros.
Implementation Considerations UNIX System V implementation See Also waddch(), waddnstr(), wattrset() Portability UNIX System V


MPE/iX 5.0 Documentation