NAME | SYNOPSIS | PARAMETERS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO
#include <curses.h>int addch(const chtype ch);
Is the character/attribute pair to be written to the window.
Is the y (row) coordinate of the character's position in the window.
Is the x (column) coordinate of the character's position in the window.
Is a pointer to the window in which the character is to be written.
The addch() function writes a character to the stdscr window at the current cursor position. The mvaddch() and mvwaddch() functions write the character to the position indicated by the x (column) and y (row) parameters. The mvaddch() function writes the character to the stdscr window, while mvwaddch() writes the character to the window specified by win. The waddch() function is identical to addch(), but writes the character to the window specified by win.
These functions advance the cursor after writing the character. Characters that do not fit on the end of the current line are wrapped to the beginning of the next line unless the current line is the last line of the window and scrolling is disabled. In that situation, characters which extend beyond the end of the line are discarded.
When ch is a backspace, carriage return, newline, or tab, X/Open Curses moves the cursor appropriately. Each tab character moves the cursor to the next tab stop. By default, tab stops occur every eight columns. When ch is a control character other than backspace, carriage return, newline, or tab, it is written using ^x notation, where x is a printable character. When X/Open Curses writes ch to the last character position on a line, it automatically generates a newline. When ch is written to the last character position of a scrolling region and scrollok() is enabled, X/Open Curses scrolls the scrolling region up one line (see clearok(3XC)).
On success, these functions return OK. Otherwise, they return ERR.
None.
attroff(3XC), bkgdset(3XC), doupdate(3XC), inch(3XC), insch(3XC), nl(3XC), printw(3XC), scrollok(3XC), scrl(3XC), terminfo(4)
NAME | SYNOPSIS | PARAMETERS | DESCRIPTION | RETURN VALUES | ERRORS | SEE ALSO