xref: /freebsd/contrib/ncurses/man/curs_deleteln.3x (revision b59017c5cad90d0f09a59e68c00457b7faf93e7c)
***************************************************************************
Copyright 2018-2023,2024 Thomas E. Dickey *
Copyright 1998-2007,2010 Free Software Foundation, Inc. *
*
Permission is hereby granted, free of charge, to any person obtaining a *
copy of this software and associated documentation files (the *
"Software"), to deal in the Software without restriction, including *
without limitation the rights to use, copy, modify, merge, publish, *
distribute, distribute with modifications, sublicense, and/or sell *
copies of the Software, and to permit persons to whom the Software is *
furnished to do so, subject to the following conditions: *
*
The above copyright notice and this permission notice shall be included *
in all copies or substantial portions of the Software. *
*
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS *
OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF *
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. *
IN NO EVENT SHALL THE ABOVE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, *
DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR *
OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR *
THE USE OR OTHER DEALINGS IN THE SOFTWARE. *
*
Except as contained in this notice, the name(s) of the above copyright *
holders shall not be used in advertising or otherwise to promote the *
sale, use or other dealings in this Software without prior written *
authorization. *
***************************************************************************

$Id: curs_deleteln.3x,v 1.38 2024/04/20 21:20:07 tom Exp $
curs_deleteln 3X 2024-04-20 "ncurses @NCURSES_MAJOR@.@NCURSES_MINOR@" "Library calls"
.\} .\} .
NAME
\%deleteln, \%wdeleteln, \%insdelln, \%winsdelln, \%insertln, \%winsertln - delete or insert lines in a curses window
SYNOPSIS
#include <curses.h>

int deleteln(void); int wdeleteln(WINDOW *win);

int insdelln(int n); int winsdelln(WINDOW *win, int n);

int insertln(void); int winsertln(WINDOW *win);

DESCRIPTION
The deleteln and wdeleteln routines delete the line under the cursor in the window; all lines below the current line are moved up one line. The bottom line of the window is cleared. The cursor position does not change.

The insdelln and winsdelln routines, for positive n, insert n lines into the specified window above the current line. The n bottom lines are lost. For negative n, delete n lines (starting with the one under the cursor), and move the remaining lines up. The bottom n lines are cleared. The current cursor position remains the same.

The insertln and winsertln routines insert a blank line above the current line and the bottom line is lost.

RETURN VALUE
These routines return the integer ERR upon failure and an OK (SVr4 specifies only \*(``an integer value other than ERR\*('') upon successful completion.

X/Open defines no error conditions. In this implementation, if the window parameter is null, an error is returned.

NOTES
Note that all but winsdelln may be macros.

These routines do not require a hardware line delete or insert feature in the terminal. In fact, they will not use hardware line delete/insert unless idlok(..., TRUE) has been set on the current window.

PORTABILITY
These functions are described in X/Open Curses, Issue 4. The standard specifies that they return ERR on failure, but specifies no error conditions.
SEE ALSO
\%curses(3X)