8354 sync regcomp(3C) with upstream (fix make catalog)
[unleashed/tickless.git] / usr / src / man / man3xcurses / insnstr.3xcurses
blobf9f9c84b244e404d5152b59b3f531f2db3506f86
1 '\" te
2 .\"  Copyright (c) 1990, 1995 by Mortice Kern Systems Inc.  All Rights Reserved  Portions Copyright (c) 1996, Sun Microsystems, Inc.  All Rights Reserved
3 .\" The contents of this file are subject to the terms of the Common Development and Distribution License (the "License").  You may not use this file except in compliance with the License.
4 .\" You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing.  See the License for the specific language governing permissions and limitations under the License.
5 .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE.  If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner]
6 .TH INSNSTR 3XCURSES "Jun 5, 2002"
7 .SH NAME
8 insnstr, insstr, mvinsnstr, mvinsstr, mvwinsnstr, mvwinsstr, winsnstr, winsstr
9 \- insert a multibyte character string
10 .SH SYNOPSIS
11 .LP
12 .nf
13 \fBcc\fR [ \fIflag\fR... ] \fIfile\fR... \fB-I\fR /usr/xpg4/include \fB -L \fR /usr/xpg4/lib \e
14 \fB -R \fR /usr/xpg4/lib \fB -lcurses \fR [ \fIlibrary\fR... ]
16 \fBc89\fR [ \fIflag\fR... ] \fIfile\fR... \fB-lcurses\fR [ \fIlibrary\fR... ]
18 #include <curses.h>
20 \fBint\fR \fBinsnstr\fR(\fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
21 .fi
23 .LP
24 .nf
25 \fBint\fR \fBinsstr\fR(\fBconst char *\fR\fIstr\fR);
26 .fi
28 .LP
29 .nf
30 \fBint\fR \fBmvinsnstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
31 .fi
33 .LP
34 .nf
35 \fBint\fR \fBmvinsstr\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR);
36 .fi
38 .LP
39 .nf
40 \fBint\fR \fBmvwinsnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
41 .fi
43 .LP
44 .nf
45 \fBint\fR \fBmvwinsstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst char *\fR\fIstr\fR);
46 .fi
48 .LP
49 .nf
50 \fBint\fR \fBwinsnstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBconst char *\fR\fIstr\fR, \fBint\fR \fIn\fR);
51 .fi
53 .LP
54 .nf
55 \fBint\fR \fBwinsstr\fR(\fBWINDOW *\fR\fIwin\fR, \fBconst char *\fR\fIstr\fR);
56 .fi
58 .SH PARAMETERS
59 .sp
60 .ne 2
61 .na
62 \fB\fIstr\fR\fR
63 .ad
64 .RS 7n
65 Is a pointer to the string to be inserted.
66 .RE
68 .sp
69 .ne 2
70 .na
71 \fB\fIn\fR\fR
72 .ad
73 .RS 7n
74 Is the number of characters not to exceed when inserting \fIstr\fR.   If
75 \fIn\fR is less than 1, the entire string is inserted.
76 .RE
78 .sp
79 .ne 2
80 .na
81 \fB\fIy\fR\fR
82 .ad
83 .RS 7n
84 Is the y (row) coordinate of the starting position of the string.
85 .RE
87 .sp
88 .ne 2
89 .na
90 \fB\fIx\fR\fR
91 .ad
92 .RS 7n
93 Is the x (column) coordinate of the starting position of the string.
94 .RE
96 .sp
97 .ne 2
98 .na
99 \fB\fIwin\fR\fR
101 .RS 7n
102 Is a pointer to the window in which the string is to be inserted.
105 .SH DESCRIPTION
108 The \fBinsstr()\fR function inserts \fIstr\fR at the current cursor position
109 of the \fBstdscr\fR window. The \fBwinsstr()\fR function performs the identical
110 action, but in window  \fIwin\fR.  The \fBmvinsstr()\fR and \fBmvwinsstr()\fR
111 functions insert the character  string at the starting position indicated by
112 the \fIx\fR (column) and \fIy\fR  (row) parameters (the former to the
113 \fBstdscr\fR window; the latter to window \fIwin\fR).
116 The \fBinsnstr()\fR, \fBwinsnstr()\fR, \fBmvinsnstr()\fR, and
117 \fBmvwinsnstr()\fR functions insert \fIn\fR characters to the window or as
118 many as will fit on the line. If \fIn\fR is less than 1, the entire string is
119 inserted or as much of it as  fits on the line.  The former two functions place
120 the string at the current cursor position; the  latter two commands use the
121 position specified by the \fIx\fR and \fIy\fR parameters.
124 All characters to the right of inserted characters are moved to the right.
125 Characters that don't fit on the current line are discarded. The cursor is left
126 at the point of insertion.
129 If a character in \fIstr\fR is a newline, carriage return, backspace, or tab,
130 the cursor is moved appropriately.  The cursor is moved to the next tab stop
131 for each tab character (by default, tabs are eight characters apart). If the
132 character is a control character other than those previously mentioned, the
133 character is inserted using \fB^\fR\fIx\fR notation, where \fIx\fR is a
134 printable character.  \fBclrtoeol\fR(3XCURSES) is automatically done before a
135 newline.
136 .SH RETURN VALUES
139 On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR.
140 .SH ERRORS
143 None.
144 .SH ATTRIBUTES
147 See \fBattributes\fR(5) for descriptions of the following attributes:
152 box;
153 c | c
154 l | l .
155 ATTRIBUTE TYPE  ATTRIBUTE VALUE
157 Interface Stability     Standard
159 MT-Level        Unsafe
162 .SH SEE ALSO
165 \fBaddchstr\fR(3XCURSES), \fBaddstr\fR(3XCURSES), \fBclrtoeol\fR(3XCURSES),
166 \fBins_nwstr\fR(3XCURSES), \fBinsch\fR(3XCURSES), \fBlibcurses\fR(3XCURSES),
167 \fBattributes\fR(5), \fBstandards\fR(5)