Debian Codegraph @

upstream/debian-unstable/man3/deleteln.3ncurses

raw
1 .\"***************************************************************************
2 .\" Copyright 2018-2024,2025 Thomas E. Dickey *
3 .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. *
4 .\" *
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 .\"
30 .\" $Id: curs_deleteln.3x,v 1.55 2025/07/05 12:46:36 tom Exp $
31 .TH deleteln 3NCURSES 2025-07-05 "ncurses 6.6" "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 .
43 .SH NAME
44 \fB\%deleteln\fP,
45 \fB\%wdeleteln\fP,
46 \fB\%insertln\fP,
47 \fB\%winsertln\fP,
48 \fB\%insdelln\fP,
49 \fB\%winsdelln\fP \-
50 delete or insert lines in a \fIcurses\fR window
51 .SH SYNOPSIS
52 .nf
53 \fB#include <curses.h>
54 .PP
55 \fBint deleteln(void);
56 \fBint wdeleteln(WINDOW * \fIwin\fP);
57 .PP
58 \fBint insertln(void);
59 \fBint winsertln(WINDOW * \fIwin\fP);
60 .PP
61 \fBint insdelln(int \fIn\fP);
62 \fBint winsdelln(WINDOW * \fIwin\fP, int \fIn\fP);
63 .fi
64 .SH DESCRIPTION
65 .B \%wdeleteln
66 deletes the line at the cursor in
67 .IR win ;
68 all lines below it move up one line.
69 .I curses
70 then fills the bottom line of
71 .I win
72 with the background character
73 configured by \fB\%wbkgdset\fP(3NCURSES)
74 (wide-character API users: \fB\%wbkgrndset\fP(3NCURSES)).
75 The cursor position does not change.
76 .PP
77 .B \%winsertln
78 inserts a new, empty line of characters above the line at the cursor in
79 .IR win ,
80 shifting the existing lines down by one.
81 The content of the window's bottom line is lost;
82 .I curses
83 fills the new line with the background character.
84 The cursor position does not change.
85 .PP
86 .B \%winsdelln
87 inserts or deletes
88 .IR n\ lines
89 in
90 .I win
91 as
92 .I n
93 is positive or negative,
94 respectively,
95 as if by repeatedly calling
96 .B \%winsertln
97 or
98 .BR \%wdeleteln "."
99 .BR \%winsdelln( ".\|.\|." ", 0)"
100 performs no operation.
101 .SH RETURN VALUE
102 These functions return
103 .B OK
104 on success and
105 .B ERR
106 on failure.
107 .PP
108 In
109 .IR \%ncurses ","
110 they fail if
111 .I win
112 is
113 .IR NULL "."
114 .SH NOTES
115 All of these functions except
116 .B \%winsdelln
117 may be implemented as macros.
118 .PP
119 These functions do not require the terminal
120 to possess hardware line deletion or insertion capabilities.
121 Even if available,
122 by default
123 .I curses
124 does not use them;
125 see \fB\%idlok\fP(3NCURSES).
126 .SH PORTABILITY
127 X/Open Curses Issue\ 4 describes these functions.
128 It specifies no error conditions for them.
129 .PP
130 SVr4 describes a successful return value only as
131 \*(``an integer value other than
132 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 490
133 .SH HISTORY
134 4BSD (1980)
135 introduced
136 .IR \%deleteln ","
137 .IR \%wdeleteln ","
138 .IR \%insertln ","
139 and
140 .IR \%winsertln "."
141 .PP
142 SVr3.1 (1987)
143 added
144 .I \%insdelln
145 and
146 .IR \%winsdelln "."
147 .SH SEE ALSO
148 \fB\%ncurses\fP(3NCURSES)