addchstr(3XC)
NAME
addchstr, addchnstr, mvaddchstr, mvaddchnstr, mvwaddchnstr, mvwaddchstr, waddchstr, waddchnstr − copy a character string (with renditions) to a window
SYNOPSIS
#include <curses.h>
int addchstr(const chtype ∗chstr);
int addchnstr(const chtype ∗chstr, int n);
int mvaddchnstr(int y, int x, const chtype ∗chstr, int n);
int mvaddchstr(int y, int x, const chtype ∗chstr);
int mvwaddchnstr(WINDOW ∗win, int y, int x,
const chtype ∗chstr, int n);
int mvwaddchstr(WINDOW ∗win, int y, int x,
const chtype ∗chstr);
int waddchstr(WINDOW ∗win, const chtype ∗chstr);
int waddchnstr(WINDOW ∗win, const chtype ∗chstr, int n);
ARGUMENTS
chstrIs a pointer to the chtype string to be copied to the window.
nIs 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.
yIs the y (row) coordinate of the starting position of chstr in the window.
xIs the x (column) coordinate of the starting position of chstr in the window.
winIs a pointer to the window to which the string is to be copied.
DESCRIPTION
The addchstr() function copies the chtype character string to the stdscr window at the current cursor position. The mvaddchstr() and mvwaddchstr() functions 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 waddchstr() is identical to addchstr(), but writes to the window specified by win.
The addchnstr(), waddchnstr(), mvaddchnstr(), and mvwaddchnstr() functions 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 functions place the string at the current cursor position; the latter two commands use the position specified by the x and y parameters.
These functions differ from the addstr(3XC) set of functions in two important respects. First, these functions do not advance the cursor after writing the string to the window. Second, the current window rendition is not combined with the character; only the attributes that are already part of the chtype character are used.
RETURN VALUES
On success, these functions return OK. Otherwise, they return ERR.
ERRORS
None.
SEE ALSO
addch(3XC), addnstr(3XC), attroff(3XC)
SunOS 5.6 — Last change: 1 Jun 1996