Debian Codegraph @

upstream/opensuse-leap-16-1/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.53 2025/04/05 22:00:17 tom Exp $
31 .TH deleteln 3NCURSES 2025-04-05 "ncurses 6.5" "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 <ncursesw/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 .SH RETURN VALUE
100 These functions return
101 .B OK
102 on success and
103 .B ERR
104 on failure.
105 .PP
106 In
107 .IR \%ncurses ","
108 they fail if
109 .I win
110 is
111 .IR NULL "."
112 .SH NOTES
113 All of these functions except
114 .B \%winsdelln
115 may be implemented as macros.
116 .PP
117 These functions do not require the terminal
118 to possess hardware line deletion or insertion capabilities.
119 Even if available,
120 by default
121 .I curses
122 does not use them;
123 see \fB\%idlok\fP(3NCURSES).
124 .SH PORTABILITY
125 X/Open Curses Issue\ 4 describes these functions.
126 It specifies no error conditions for them.
127 .PP
128 SVr4 describes a successful return value only as
129 \*(``an integer value other than
130 .IR ERR \*(''. \" Courier roman in source; SVID 4, vol. 3, p. 490
131 .SH HISTORY
132 4BSD (1980)
133 introduced
134 .IR \%deleteln ","
135 .IR \%wdeleteln ","
136 .IR \%insertln ","
137 and
138 .IR \%winsertln "."
139 .PP
140 SVr3.1 (1987)
141 added
142 .I \%insdelln
143 and
144 .IR \%winsdelln "."
145 .SH SEE ALSO
146 \fB\%ncurses\fP(3NCURSES)