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
16       int mvinsstr(int y, int x, const char *str);
17       int mvinsnstr(int y, int x, const char *str, int n);
18       int mvwinsstr(WINDOW *win, int y, int x, const char *str);
19       int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);
20

DESCRIPTION

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

RETURN VALUE

33       All routines that return an integer return  ERR  upon  failure  and  OK
34       (SVr4 specifies only "an integer value other than ERR") upon successful
35       completion, unless otherwise noted in the  preceding  routine  descrip‐
36       tions.
37
38       X/Open  defines  no  error  conditions.  In this implementation, if the
39       window parameter is null or the str parameter is null, an error is  re‐
40       turned.
41
42       Functions  with  a  “mv”  prefix  first perform a cursor movement using
43       wmove, and return an error if the position is outside the window, or if
44       the window pointer is null.
45

NOTES

47       Note that all but winsnstr may be macros.
48

PORTABILITY

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

SEE ALSO

59       curses(3X), curs_util(3X), curs_clear(3X), curs_inch(3X).
60
61
62
63                                                               curs_insstr(3X)
Impressum