1994-10-07 08:58:58 +00:00
|
|
|
|
|
|
|
/* This work is copyrighted. See COPYRIGHT.OLD & COPYRIGHT.NEW for *
|
|
|
|
* details. If they are missing then this copy is in violation of *
|
|
|
|
* the copyright conditions. */
|
|
|
|
|
|
|
|
/*
|
|
|
|
** lib_insdel.c
|
|
|
|
**
|
|
|
|
** The routine winsdel(win, n).
|
|
|
|
** positive n insert n lines above current line
|
1995-05-30 05:51:47 +00:00
|
|
|
** negative n delete n lines starting from current line
|
1994-10-07 08:58:58 +00:00
|
|
|
**
|
|
|
|
*/
|
|
|
|
|
|
|
|
#include "curses.priv.h"
|
|
|
|
|
|
|
|
int
|
1994-12-02 06:40:24 +00:00
|
|
|
winsdelln(WINDOW *win, int n)
|
1994-10-07 08:58:58 +00:00
|
|
|
{
|
1998-01-02 04:36:51 +00:00
|
|
|
int code = ERR;
|
1994-10-07 08:58:58 +00:00
|
|
|
|
|
|
|
T(("winsdel(%x,%d) called", win, n));
|
|
|
|
|
1998-01-02 04:36:51 +00:00
|
|
|
if (win) {
|
|
|
|
if (n != 0) {
|
|
|
|
_nc_scroll_window(win, -n, win->_cury, win->_maxy, _nc_background(win));
|
|
|
|
}
|
|
|
|
code = OK;
|
|
|
|
}
|
|
|
|
return code;
|
1994-10-07 08:58:58 +00:00
|
|
|
}
|