Writing a Single Character While Respecting the Window Options

If you want to write one character to the window, while observing the settings of the window write options, use the video character function, v_ch():

int v_ch(ch, wnp)
 
UCHAR ch;
/* Character to write to the window
*/
WINDOWPTR wnp;
/* Pointer to window to write to 
*/

v_ch() writes the character at the current virtual cursor location in the window's buffer. The window attribute is used to write the character. (You can change the window attribute with sw_att().) v_ch() respects all option settings for window writing, including virtual cursor advance.

v_ch() is useful for writing characters as they are received from a serial port.


Home Contents Previous Next