blob: 6d70a4358c4fa34e79d4c542415d74b78012cd41 [file] [log] [blame]
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05301.\"***************************************************************************
micky3879b9f5e72025-07-08 18:04:53 -04002.\" Copyright 2018-2023,2024 Thomas E. Dickey *
3.\" Copyright 1998-2007,2010 Free Software Foundation, Inc. *
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +05304.\" *
5.\" Permission is hereby granted, free of charge, to any person obtaining a *
6.\" copy of this software and associated documentation files (the *
7.\" "Software"), to deal in the Software without restriction, including *
8.\" without limitation the rights to use, copy, modify, merge, publish, *
9.\" distribute, distribute with modifications, sublicense, and/or sell *
10.\" copies of the Software, and to permit persons to whom the Software is *
11.\" furnished to do so, subject to the following conditions: *
12.\" *
13.\" The above copyright notice and this permission notice shall be included *
14.\" in all copies or substantial portions of the Software. *
15.\" *
16.\" THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
17.\" OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
18.\" MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
19.\" IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
20.\" DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
21.\" OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
22.\" THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
23.\" *
24.\" Except as contained in this notice, the name(s) of the above copyright *
25.\" holders shall not be used in advertising or otherwise to promote the *
26.\" sale, use or other dealings in this Software without prior written *
27.\" authorization. *
28.\"***************************************************************************
29.\"
micky3879b9f5e72025-07-08 18:04:53 -040030.\" $Id: curs_deleteln.3x,v 1.38 2024/04/20 21:20:07 tom Exp $
31.TH curs_deleteln 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
32.ie \n(.g \{\
33.ds `` \(lq
34.ds '' \(rq
35.\}
36.el \{\
37.ie t .ds `` ``
38.el .ds `` ""
39.ie t .ds '' ''
40.el .ds '' ""
41.\}
42.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053043.SH NAME
micky3879b9f5e72025-07-08 18:04:53 -040044\fB\%deleteln\fP,
45\fB\%wdeleteln\fP,
46\fB\%insdelln\fP,
47\fB\%winsdelln\fP,
48\fB\%insertln\fP,
49\fB\%winsertln\fP \-
50delete or insert lines in a \fIcurses\fR window
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053051.SH SYNOPSIS
micky3879b9f5e72025-07-08 18:04:53 -040052.nf
53\fB#include <curses.h>
54.PP
55\fBint deleteln(void);
56\fBint wdeleteln(WINDOW *\fIwin\fP);
57.PP
58\fBint insdelln(int \fIn\fP);
59\fBint winsdelln(WINDOW *\fIwin\fP, int \fIn\fP);
60.PP
61\fBint insertln(void);
62\fBint winsertln(WINDOW *\fIwin\fP);
63.fi
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053064.SH DESCRIPTION
micky3879b9f5e72025-07-08 18:04:53 -040065The \fBdeleteln\fP and \fBwdeleteln\fP routines delete the line under the
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053066cursor in the window; all lines below the current line are moved up one line.
micky3879b9f5e72025-07-08 18:04:53 -040067The bottom line of the window is cleared.
68The cursor position does not change.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053069.PP
micky3879b9f5e72025-07-08 18:04:53 -040070The \fBinsdelln\fP and \fBwinsdelln\fP routines, for positive \fIn\fP, insert
71\fIn\fP lines into the specified window above the current line.
72The \fIn\fP
73bottom lines are lost.
74For negative \fIn\fP, delete \fIn\fP lines (starting
75with the one under the cursor), and move the remaining lines up.
76The bottom
77\fIn\fP lines are cleared.
78The current cursor position remains the same.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053079.PP
micky3879b9f5e72025-07-08 18:04:53 -040080The \fBinsertln\fP and \fBwinsertln\fP routines insert a blank line above the
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053081current line and the bottom line is lost.
82.SH RETURN VALUE
micky3879b9f5e72025-07-08 18:04:53 -040083These routines return the integer \fBERR\fP upon failure and an \fBOK\fP
84(SVr4 specifies only
85\*(``an integer value other than \fBERR\fP\*('')
86upon successful completion.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053087.PP
88X/Open defines no error conditions.
89In this implementation,
90if the window parameter is null, an error is returned.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053091.SH NOTES
micky3879b9f5e72025-07-08 18:04:53 -040092Note that all but \fBwinsdelln\fP may be macros.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +053093.PP
94These routines do not require a hardware line delete or insert feature in the
micky3879b9f5e72025-07-08 18:04:53 -040095terminal.
96In fact, they will not use hardware line delete/insert unless
97\fBidlok(..., TRUE)\fP has been set on the current window.
98.SH PORTABILITY
99These functions are described in X/Open Curses, Issue 4.
100The
101standard specifies that they return \fBERR\fP on failure, but specifies no
102error conditions.
Amit Daniel Kachhape6a01f52011-07-20 11:45:59 +0530103.SH SEE ALSO
micky3879b9f5e72025-07-08 18:04:53 -0400104\fB\%curses\fP(3X)