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 ADDCH 3XCURSES "Jun 5, 2002"
8 addch, mvaddch, mvwaddch, waddch \- add a character (with rendition) to a
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 ... ]
20 \fBint\fR \fBaddch\fR(\fBconst chtype\fR \fIch\fR);
25 \fBint\fR \fBmvaddch\fR(\fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst chtype\fR \fIch\fR);
30 \fBint\fR \fBmvwaddch\fR(\fBWINDOW *\fR\fIwin\fR, \fBint\fR \fIy\fR, \fBint\fR \fIx\fR, \fBconst chtype\fR \fIch\fR);
35 \fBint\fR \fBwaddch\fR(\fBWINDOW *\fR\fIwin\fR, \fBconst chtype\fR \fIch\fR);
41 The \fBaddch()\fR function writes a character to the \fBstdscr\fR window at
42 the current cursor position. The \fBmvaddch()\fR and \fBmvwaddch()\fR
43 functions write the character to the position indicated by the \fIx\fR
44 (column) and \fIy\fR (row) parameters. The \fBmvaddch()\fR function writes the
45 character to the \fBstdscr\fR window, while \fBmvwaddch()\fR writes the
46 character to the window specified by \fIwin\fR. The \fBwaddch()\fR function is
47 identical to \fBaddch()\fR, but writes the character to the window specified
51 These functions advance the cursor after writing the character. Characters that
52 do not fit on the end of the current line are wrapped to the beginning of the
53 next line unless the current line is the last line of the window and scrolling
54 is disabled. In that situation, characters which extend beyond the end of the
58 When \fIch\fR is a backspace, carriage return, newline, or tab, X/Open Curses
59 moves the cursor appropriately. Each tab character moves the cursor to the next
60 tab stop. By default, tab stops occur every eight columns. When \fIch\fR is a
61 control character other than backspace, carriage return, newline, or tab, it
62 is written using \fB^\fR\fIx\fR notation, where \fIx\fR is a printable
63 character. When X/Open Curses writes \fIch\fR to the last character position
64 on a line, it automatically generates a newline. When \fIch\fR is written to
65 the last character position of a scrolling region and \fBscrollok()\fR is
66 enabled, X/Open Curses scrolls the scrolling region up one line (see
67 \fBclearok\fR(3XCURSES)).
75 Is a pointer to the \fBcchar_t\fR string to be copied to the window.
84 Is the maximum number of characters to be copied from \fIwchstr\fR. If
85 \fIn\fR is less than 0, the entire string is written or as much of it as fits
95 Is the y (row) coordinate of the starting position of \fIwchstr\fR in the
105 Is the x (column) coordinate of the starting position of \fIwchstr\fR in the
115 Is a pointer to the window to which the string is to be copied.
121 On success, these functions return \fBOK\fR. Otherwise, they return \fBERR\fR.
129 See \fBattributes\fR(5) for descriptions of the following attributes:
137 ATTRIBUTE TYPE ATTRIBUTE VALUE
139 Interface Stability Standard
147 \fBattroff\fR(3XCURSES), \fBbkgdset\fR(3XCURSES), \fBdoupdate\fR(3XCURSES),
148 \fBinch\fR(3XCURSES), \fBinsch\fR(3XCURSES), \fBlibcurses\fR(3XCURSES),
149 \fBnl\fR(3XCURSES), \fBprintw\fR(3XCURSES), \fBscrollok\fR(3XCURSES),
150 \fBscrl\fR(3XCURSES), \fBterminfo\fR(4), \fBattributes\fR(5),