1curs_insstr(3X)                                                curs_insstr(3X)
2
3
4

NAME

6       insstr,  insnstr,  winsstr,  winsnstr,  mvinsstr, mvinsnstr, mvwinsstr,
7       mvwinsnstr - insert string before cursor in a curses window
8

SYNOPSIS

10       #include <curses.h>
11       int insstr(const char *str);
12       int insnstr(const char *str, int n);
13       int winsstr(WINDOW *win, const char *str);
14       int winsnstr(WINDOW *win, const char *str, int n);
15       int mvinsstr(int y, int x, const char *str);
16       int mvinsnstr(int y, int x, const char *str, int n);
17       int mvwinsstr(WINDOW *win, int y, int x, const char *str);
18       int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);
19

DESCRIPTION

21       These routines insert a character string (as many  characters  as  will
22       fit on the line) before the character under the cursor.  All characters
23       to the right of the cursor are shifted right with  the  possibility  of
24       the  rightmost  characters on the line being lost.  The cursor position
25       does not change (after moving to y, x, if  specified).   The  functions
26       with  n  as  the  last argument insert a leading substring of at most n
27       characters.  If n<=0, then the entire string is inserted.
28
29       Special characters are handled as in addch.
30

RETURN VALUE

32       All routines that return an integer return  ERR  upon  failure  and  OK
33       (SVr4 specifies only "an integer value other than ERR") upon successful
34       completion, unless otherwise noted in the  preceding  routine  descrip‐
35       tions.
36
37       X/Open  defines  no  error  conditions.  In this implementation, if the
38       window parameter is null or the str parameter  is  null,  an  error  is
39       returned.
40

NOTES

42       Note that all but winsnstr may be macros.
43

PORTABILITY

45       These  functions  are  described  in  the XSI Curses standard, Issue 4,
46       which adds const qualifiers to the arguments.
47
48       The Single Unix Specification, Version 2 states that insnstr  and  win‐
49       snstr perform wrapping.  This is probably an error, since it makes this
50       group of functions inconsistent.  Also,  no  implementation  of  curses
51       documents this inconsistency.
52

SEE ALSO

54       curses(3X), curs_util(3X), curs_clear(3X), curs_inch(3X).
55
56
57
58                                                               curs_insstr(3X)
Impressum