[ Previous | Next | Contents | Glossary | Home | Search ]
AIX Version 4.3 Base Operating System and Extensions Technical Reference, Volume 2

insch, mvinsch, mvwinsch, or winsch Subroutine

Purpose

Inserts a single-byte character and rendition in a window.

Library

Curses Library (libcurses.a)

Syntax

#include <curses.h>
int insch(chtype ch);
int mvinsch(int y,
chtype h); 
int mvwinsch(WINDOW *win,
int x,
int y,
chtype h); 
int winsch(WINDOW *win,
chtype h); 

Description

These subroutines insert the character and rendition into the current or specified window at the current or specified position.

These subroutines do not perform wrapping or advance the cursor position. These functions perform special-character processing, with the exception that if a newline is inserted into the last line of a window and scrolling is not enabled, the behavior is unspecified.

Parameters

ch
y
x
*win Specifies the window in which to insert the character.

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.

Examples

  1. To insert the character x in the stdscr, enter:
    chtype x;
    insch(x);
  2. To insert the character x into the user-defined window my_window, enter:
    WINDOW *my_window
    chtype x;
    winsch(my_window, x);
  3. To move the logical cursor to the coordinates Y=10, X=5 prior to inserting the character x in the stdscr, enter:
    chtype x;
    mvinsch(10, 5, x);
  4. To move the logical cursor to the coordinates y=10, X=5 prior to inserting the character x in the user-defined window my_window, enter:
    WINDOW *my_window;
    chtype x;
    mvwinsch(my_window, 10, 5, x);

Implementation Specifics

These subroutines are part of Base Operating System (BOS) Runtime.

Related Information

The ins_wch subroutine.

Curses Overview for Programming in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

List of Curses Subroutines in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.

Manipulating Characters with Curses in AIX Version 4.3 General Programming Concepts: Writing and Debugging Programs.


[ Previous | Next | Contents | Glossary | Home | Search ]