| Main index | Section 3 | Options |
#include <curses.h> int insstr(const char *str); int insnstr(const char *str, int n); int winsstr(WINDOW *win, const char *str); int winsnstr(WINDOW *win, const char *str, int n);int mvinsstr(int y, int x, const char *str); int mvinsnstr(int y, int x, const char *str, int n); int mvwinsstr(WINDOW *win, int y, int x, const char *str); int mvwinsnstr(WINDOW *win, int y, int x, const char *str, int n);
The cursor position does not change (after moving to y, x, if specified).
The functions with n as the last argument insert a leading substring of at most n characters. If n is less than zero, the entire string is inserted (stopping on a NUL character).
Special characters are handled as in waddch(3X).
X/Open Curses does not specify any error conditions. This implementation returns an error
| &#187; | if the win parameter is null or |
| &#187; | if the str parameter is null or |
| &#187; | the winsch(3X) function returns an error. |
The Single Unix Specification, Version 2 states that insnstr and winsnstr perform wrapping. This is probably an error, since it makes this group of functions inconsistent. Also, no implementation of curses documents this inconsistency.
X/Open states that the entire string is inserted if n is less than 1. This is probably an error, because it is inconsistent with other functions, and differs from the SVr4 and X/Open implementations on Solaris.
| 2024-04-20 | curs_insstr (3X) | ncurses 6.5 |
| Main index | Section 3 | Options |
Please direct any comments about this manual page service to Ben Bullock. Privacy policy.
