1*51ffecc1SBen Gras.\" $NetBSD: curses_insertln.3,v 1.4 2006/02/05 17:07:13 jdc Exp $ 2*51ffecc1SBen Gras.\" 3*51ffecc1SBen Gras.\" Copyright (c) 2002 4*51ffecc1SBen Gras.\" Brett Lymn (blymn@NetBSD.org, brett_lymn@yahoo.com.au) 5*51ffecc1SBen Gras.\" 6*51ffecc1SBen Gras.\" This code is donated to the NetBSD Foundation by the Author. 7*51ffecc1SBen Gras.\" 8*51ffecc1SBen Gras.\" Redistribution and use in source and binary forms, with or without 9*51ffecc1SBen Gras.\" modification, are permitted provided that the following conditions 10*51ffecc1SBen Gras.\" are met: 11*51ffecc1SBen Gras.\" 1. Redistributions of source code must retain the above copyright 12*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer. 13*51ffecc1SBen Gras.\" 2. Redistributions in binary form must reproduce the above copyright 14*51ffecc1SBen Gras.\" notice, this list of conditions and the following disclaimer in the 15*51ffecc1SBen Gras.\" documentation and/or other materials provided with the distribution. 16*51ffecc1SBen Gras.\" 3. The name of the Author may not be used to endorse or promote 17*51ffecc1SBen Gras.\" products derived from this software without specific prior written 18*51ffecc1SBen Gras.\" permission. 19*51ffecc1SBen Gras.\" 20*51ffecc1SBen Gras.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND 21*51ffecc1SBen Gras.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22*51ffecc1SBen Gras.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23*51ffecc1SBen Gras.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE 24*51ffecc1SBen Gras.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25*51ffecc1SBen Gras.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26*51ffecc1SBen Gras.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27*51ffecc1SBen Gras.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28*51ffecc1SBen Gras.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29*51ffecc1SBen Gras.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30*51ffecc1SBen Gras.\" SUCH DAMAGE. 31*51ffecc1SBen Gras.\" 32*51ffecc1SBen Gras.\" 33*51ffecc1SBen Gras.Dd February 5, 2006 34*51ffecc1SBen Gras.Dt CURSES_INSERTLN 3 35*51ffecc1SBen Gras.Os 36*51ffecc1SBen Gras.Sh NAME 37*51ffecc1SBen Gras.Nm curses_insertln , 38*51ffecc1SBen Gras.Nm insertln , 39*51ffecc1SBen Gras.Nm winsertln 40*51ffecc1SBen Gras.Nd curses insert single line routines 41*51ffecc1SBen Gras.Sh LIBRARY 42*51ffecc1SBen Gras.Lb libcurses 43*51ffecc1SBen Gras.Sh SYNOPSIS 44*51ffecc1SBen Gras.In curses.h 45*51ffecc1SBen Gras.Ft int 46*51ffecc1SBen Gras.Fn insertln "void" 47*51ffecc1SBen Gras.Ft int 48*51ffecc1SBen Gras.Fn winsertln "WINDOW *win" 49*51ffecc1SBen Gras.Sh DESCRIPTION 50*51ffecc1SBen GrasThese functions insert a single line on 51*51ffecc1SBen Gras.Dv stdscr 52*51ffecc1SBen Grasor on the specified window. 53*51ffecc1SBen Gras.Pp 54*51ffecc1SBen GrasThe 55*51ffecc1SBen Gras.Fn insertln 56*51ffecc1SBen Grasfunction inserts a blank line before the current line on 57*51ffecc1SBen Gras.Dv stdscr . 58*51ffecc1SBen GrasThe current line and all lines below are moved down one line away from 59*51ffecc1SBen Grasthe cursor and the bottom line of the window is lost. 60*51ffecc1SBen Gras.Pp 61*51ffecc1SBen GrasThe 62*51ffecc1SBen Gras.Fn winsertln 63*51ffecc1SBen Grasfunction is the same as the 64*51ffecc1SBen Gras.Fn insertln 65*51ffecc1SBen Grasfunction, excepting that the line is inserted on the window 66*51ffecc1SBen Gras.Fa win . 67*51ffecc1SBen Gras.Pp 68*51ffecc1SBen GrasIf a scrolling region has been set with the 69*51ffecc1SBen Gras.Fn setscrreg 70*51ffecc1SBen Grasor 71*51ffecc1SBen Gras.Fn wsetscrreg 72*51ffecc1SBen Grasfunctions and the current cursor position is inside the scrolling region, 73*51ffecc1SBen Grasthen only the lines from the current line to the bottom of the scrolling 74*51ffecc1SBen Grasregion are moved down and the bottom line of the scrolling region lost. 75*51ffecc1SBen Gras.Pp 76*51ffecc1SBen GrasThe functions 77*51ffecc1SBen Gras.Fn insertln 78*51ffecc1SBen Grasand 79*51ffecc1SBen Gras.Fn winsertln win 80*51ffecc1SBen Grasare equivalent to 81*51ffecc1SBen Gras.Fn insdelln 1 82*51ffecc1SBen Grasand 83*51ffecc1SBen Gras.Fn winsdelln win 1 , 84*51ffecc1SBen Grasrespectively. 85*51ffecc1SBen Gras.Sh RETURN VALUES 86*51ffecc1SBen GrasFunctions returning pointers will return 87*51ffecc1SBen Gras.Dv NULL 88*51ffecc1SBen Grasif an error is detected. 89*51ffecc1SBen GrasThe functions that return an int will return one of the following 90*51ffecc1SBen Grasvalues: 91*51ffecc1SBen Gras.Pp 92*51ffecc1SBen Gras.Bl -tag -width ERR -compact 93*51ffecc1SBen Gras.It Er OK 94*51ffecc1SBen GrasThe function completed successfully. 95*51ffecc1SBen Gras.It Er ERR 96*51ffecc1SBen GrasAn error occurred in the function. 97*51ffecc1SBen Gras.El 98*51ffecc1SBen Gras.Sh SEE ALSO 99*51ffecc1SBen Gras.Xr curses_deleteln 3 , 100*51ffecc1SBen Gras.Xr curses_insdelln 3 , 101*51ffecc1SBen Gras.Xr curses_scroll 3 102*51ffecc1SBen Gras.Sh STANDARDS 103*51ffecc1SBen GrasThe 104*51ffecc1SBen Gras.Nx 105*51ffecc1SBen GrasCurses library complies with the X/Open Curses specification, part of 106*51ffecc1SBen Grasthe Single Unix Specification. 107*51ffecc1SBen Gras.Sh HISTORY 108*51ffecc1SBen GrasThe Curses package appeared in 109*51ffecc1SBen Gras.Bx 4.0 . 110