insstr, winsstr, insnstr, winsnstr, mvinsstr, mvwinsstr, mvinsnstr, mvwinsnstr [ MPE/iX Developer's Kit Reference Manual Volume II ] MPE/iX 5.0 Documentation
MPE/iX Developer's Kit Reference Manual Volume II
insstr, winsstr, insnstr, winsnstr, mvinsstr, mvwinsstr, mvinsnstr,
mvwinsnstr
The insstr set of routines is used to insert a character string.
Syntax
#include <curses.h>
int insstr(char *str);
int winsstr(WINDOW *win, char *str);
int insnstr(char *str, int n);
int winsnstr(WINDOW *win, char *str, int n);
int mvinsstr(int y, int x, char *str);
int mvwinsstr(WINDOW *win, int y, int x, char *str);
int mvinsnstr(int y, int x, char *str, int n);
int mvwinsnstr(WINDOW *win, int y, int x, char *str, int n);
Parameters
str A pointer to the string to be inserted.
n The number of characters not to exceed when
inserting str. If n is less than 0, the entire
string is inserted.
win A pointer to the window in which the string is to
be inserted.
x The x (column) coordinate of the starting position
of the string.
y The y (row) coordinate of the starting position of
the string.
Return Values
OK Successful completion.
ERR An error occurred.
Description
The insstr() routine inserts str at the current cursor position of the
stdscr window. The winsstr() routine performs the identical action, but
in window win. The mvinsstr() and mvwinsstr() routines insert the
character string at the starting position indicated by the x (column) and
y (row) parameters (the former to the stdscr window; the latter to window
win).
The insnstr(), winsnstr(), mvinsnstr(), and mvwinsnstr() routines insert
n characters to the window or as many as will fit on the line. If n is
less than 0, the entire string is inserted, or as much of it as fits on
the line. The former two routines place the string at the current cursor
position; the latter two commands use the position specified by the x and
y parameters.
All characters to the right of inserted characters are moved to the
right. Characters that do not fit on the current line are discarded.
The logical cursor is left at the point of insertion.
If a character in str is a newline, carriage return, backspace, or tab,
the cursor is moved appropriately. The cursor is moved to the next tab
stop for each tab character (tabs are eight characters apart). If the
character is a control character other than those previously mentioned,
the character is inserted using ^x notation, where x is a printable
character. The clrtoeol() routine is automatically done before a
newline.
NOTE All routines except winsnstr() are macros.
Implementation Considerations
UNIX System V implementation
See Also
waddstr(), winsch()
Portability
UNIX System V
MPE/iX 5.0 Documentation