[w]addch

Add a character to the window at the current position of the cursor.

Format

#include  <curses.h>

int addch  (char ch);

int waddch  (WINDOW *win, char ch);

Arguments

win
A pointer to the window.
ch
The character to be added. A new-line character (\n) clears the line to the end, and moves the cursor to the next line at the same x coordinate. A return (\r) moves the cursor to the beginning of the line on the window. A tab (\t) moves the cursor to the next tabstop within the window.

Description

When the waddch function is used on a subwindow, it writes the character onto the underlying window as well.

The addch routine performs the same function as waddch, but on the stdscr window.

The cursor is moved after the character is written to the screen.

Return Values
OK  Indicates success. 
ERR  Indicates that writing the character would cause the screen to scroll illegally. For more information, see the scrollok function in this section. 


Previous Page | Next Page | Table of Contents | Index