Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 1 | .\"*************************************************************************** |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 2 | .\" Copyright 2018-2023,2024 Thomas E. Dickey * |
| 3 | .\" Copyright 1998-2007,2010 Free Software Foundation, Inc. * |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 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 | .\" |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 30 | .\" $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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 43 | .SH NAME |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 44 | \fB\%deleteln\fP, |
| 45 | \fB\%wdeleteln\fP, |
| 46 | \fB\%insdelln\fP, |
| 47 | \fB\%winsdelln\fP, |
| 48 | \fB\%insertln\fP, |
| 49 | \fB\%winsertln\fP \- |
| 50 | delete or insert lines in a \fIcurses\fR window |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 51 | .SH SYNOPSIS |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 52 | .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 Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 64 | .SH DESCRIPTION |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 65 | The \fBdeleteln\fP and \fBwdeleteln\fP routines delete the line under the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 66 | cursor in the window; all lines below the current line are moved up one line. |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 67 | The bottom line of the window is cleared. |
| 68 | The cursor position does not change. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 69 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 70 | The \fBinsdelln\fP and \fBwinsdelln\fP routines, for positive \fIn\fP, insert |
| 71 | \fIn\fP lines into the specified window above the current line. |
| 72 | The \fIn\fP |
| 73 | bottom lines are lost. |
| 74 | For negative \fIn\fP, delete \fIn\fP lines (starting |
| 75 | with the one under the cursor), and move the remaining lines up. |
| 76 | The bottom |
| 77 | \fIn\fP lines are cleared. |
| 78 | The current cursor position remains the same. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 79 | .PP |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 80 | The \fBinsertln\fP and \fBwinsertln\fP routines insert a blank line above the |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 81 | current line and the bottom line is lost. |
| 82 | .SH RETURN VALUE |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 83 | These routines return the integer \fBERR\fP upon failure and an \fBOK\fP |
| 84 | (SVr4 specifies only |
| 85 | \*(``an integer value other than \fBERR\fP\*('') |
| 86 | upon successful completion. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 87 | .PP |
| 88 | X/Open defines no error conditions. |
| 89 | In this implementation, |
| 90 | if the window parameter is null, an error is returned. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 91 | .SH NOTES |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 92 | Note that all but \fBwinsdelln\fP may be macros. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 93 | .PP |
| 94 | These routines do not require a hardware line delete or insert feature in the |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 95 | terminal. |
| 96 | In fact, they will not use hardware line delete/insert unless |
| 97 | \fBidlok(..., TRUE)\fP has been set on the current window. |
| 98 | .SH PORTABILITY |
| 99 | These functions are described in X/Open Curses, Issue 4. |
| 100 | The |
| 101 | standard specifies that they return \fBERR\fP on failure, but specifies no |
| 102 | error conditions. |
Amit Daniel Kachhap | e6a01f5 | 2011-07-20 11:45:59 +0530 | [diff] [blame] | 103 | .SH SEE ALSO |
micky387 | 9b9f5e7 | 2025-07-08 18:04:53 -0400 | [diff] [blame] | 104 | \fB\%curses\fP(3X) |