Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
| 2 | .\" Copyright (c) 1998-2005,2006 Free Software Foundation, Inc. * |
| 3 | .\" * |
| 4 | .\" Permission is hereby granted, free of charge, to any person obtaining a * |
| 5 | .\" copy of this software and associated documentation files (the * |
| 6 | .\" "Software"), to deal in the Software without restriction, including * |
| 7 | .\" without limitation the rights to use, copy, modify, merge, publish, * |
| 8 | .\" distribute, distribute with modifications, sublicense, and/or sell * |
| 9 | .\" copies of the Software, and to permit persons to whom the Software is * |
| 10 | .\" furnished to do so, subject to the following conditions: * |
| 11 | .\" * |
| 12 | .\" The above copyright notice and this permission notice shall be included * |
| 13 | .\" in all copies or substantial portions of the Software. * |
| 14 | .\" * |
| 15 | .\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS * |
| 16 | .\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF * |
| 17 | .\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. * |
| 18 | .\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, * |
| 19 | .\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR * |
| 20 | .\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR * |
| 21 | .\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. * |
| 22 | .\" * |
| 23 | .\" Except as contained in this notice, the name(s) of the above copyright * |
| 24 | .\" holders shall not be used in advertising or otherwise to promote the * |
| 25 | .\" sale, use or other dealings in this Software without prior written * |
| 26 | .\" authorization. * |
| 27 | .\"*************************************************************************** |
| 28 | .\" |
| 29 | .\" $Id: curs_addchstr.3x,v 1.12 2006/12/02 17:02:45 tom Exp $ |
| 30 | .TH curs_addchstr 3X "" |
| 31 | .na |
| 32 | .hy 0 |
| 33 | .SH NAME |
| 34 | \fBaddchstr\fR, |
| 35 | \fBaddchnstr\fR, |
| 36 | \fBwaddchstr\fR, |
| 37 | \fBwaddchnstr\fR, |
| 38 | \fBmvaddchstr\fR, |
| 39 | \fBmvaddchnstr\fR, |
| 40 | \fBmvwaddchstr\fR, |
| 41 | \fBmvwaddchnstr\fR - add a string of characters (and attributes) to a \fBcurses\fR window |
| 42 | .ad |
| 43 | .hy |
| 44 | .SH SYNOPSIS |
| 45 | \fB#include <curses.h>\fR |
| 46 | .PP |
| 47 | \fBint addchstr(const chtype *chstr);\fR |
| 48 | .br |
| 49 | \fBint addchnstr(const chtype *chstr, int n);\fR |
| 50 | .br |
| 51 | \fBint waddchstr(WINDOW *win, const chtype *chstr);\fR |
| 52 | .br |
| 53 | \fBint waddchnstr(WINDOW *win, const chtype *chstr, int n);\fR |
| 54 | .br |
| 55 | \fBint mvaddchstr(int y, int x, const chtype *chstr);\fR |
| 56 | .br |
| 57 | \fBint mvaddchnstr(int y, int x, const chtype *chstr, int n);\fR |
| 58 | .br |
| 59 | \fBint mvwaddchstr(WINDOW *win, int y, int x, const chtype *chstr);\fR |
| 60 | .br |
| 61 | \fBint mvwaddchnstr(WINDOW *win, int y, int x, const chtype *chstr, int n);\fR |
| 62 | .SH DESCRIPTION |
| 63 | These routines copy \fIchstr\fR into the window image structure at and after |
| 64 | the current cursor position. The four routines with \fIn\fR as the last |
| 65 | argument copy at most \fIn\fR elements, but no more than will fit on the line. |
| 66 | If \fBn\fR=\fB-1\fR then the whole string is copied, to the maximum number of |
| 67 | characters that will fit on the line. |
| 68 | .PP |
| 69 | The window cursor is \fInot\fR advanced, and these routines work faster than |
| 70 | \fBwaddnstr\fR. On the other hand, they do not perform any kind of checking |
| 71 | (such as for the newline, backspace, or carriage return characters), they do not |
| 72 | advance the current cursor position, they do not expand other control characters |
| 73 | to ^-escapes, and they truncate the string if it crosses the right margin, |
| 74 | rather than wrapping it around to the new line. |
| 75 | .SH RETURN VALUES |
| 76 | All routines return the integer \fBERR\fR upon failure and \fBOK\fR on success |
| 77 | (the SVr4 manuals specify only "an integer value other than \fBERR\fR") upon |
| 78 | successful completion, unless otherwise noted in the preceding routine |
| 79 | descriptions. |
| 80 | .PP |
| 81 | X/Open does not define any error conditions. |
| 82 | This implementation returns an error |
| 83 | if the window pointer is null. |
| 84 | .SH NOTES |
| 85 | Note that all routines except \fBwaddchnstr\fR may be macros. |
| 86 | .SH PORTABILITY |
| 87 | These entry points are described in the XSI Curses standard, Issue 4. |
| 88 | .SH SEE ALSO |
| 89 | \fBcurses\fR(3X). |
| 90 | .PP |
| 91 | Comparable functions in the wide-character (ncursesw) library are |
| 92 | described in |
| 93 | \fBcurs_add_wchstr\fR(3X). |
| 94 | .\"# |
| 95 | .\"# The following sets edit modes for GNU EMACS |
| 96 | .\"# Local Variables: |
| 97 | .\"# mode:nroff |
| 98 | .\"# fill-column:79 |
| 99 | .\"# End: |