aboutsummaryrefslogtreecommitdiff
path: root/contrib/ncurses/ncurses/base/lib_scroll.c
diff options
context:
space:
mode:
authorPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
committerPeter Wemm <peter@FreeBSD.org>2001-05-17 08:21:06 +0000
commit7a69bbfb278952228c9aa1eca241e65fcdef425e (patch)
treee83b2ef47811e687a6c54035c9af6d4a2b7f14e1 /contrib/ncurses/ncurses/base/lib_scroll.c
parent18259542b2f8fa7e3f76f4bb0dd37995dfd424aa (diff)
downloadsrc-7a69bbfb278952228c9aa1eca241e65fcdef425e.tar.gz
src-7a69bbfb278952228c9aa1eca241e65fcdef425e.zip
Import ncurses-5.2-20010512 onto the vendor branch
Obtained from: ftp://dickey.his.com/ncurses/
Notes
Notes: svn path=/vendor/ncurses/dist/; revision=76726
Diffstat (limited to 'contrib/ncurses/ncurses/base/lib_scroll.c')
-rw-r--r--contrib/ncurses/ncurses/base/lib_scroll.c28
1 files changed, 15 insertions, 13 deletions
diff --git a/contrib/ncurses/ncurses/base/lib_scroll.c b/contrib/ncurses/ncurses/base/lib_scroll.c
index c2e3831da255..dcde0fc3f7e4 100644
--- a/contrib/ncurses/ncurses/base/lib_scroll.c
+++ b/contrib/ncurses/ncurses/base/lib_scroll.c
@@ -42,11 +42,12 @@
#include <curses.priv.h>
-MODULE_ID("$Id: lib_scroll.c,v 1.17 2000/04/29 21:10:51 tom Exp $")
+MODULE_ID("$Id: lib_scroll.c,v 1.20 2000/12/10 02:54:03 tom Exp $")
-void
-_nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top,
- NCURSES_SIZE_T const bottom, chtype blank)
+NCURSES_EXPORT(void)
+_nc_scroll_window
+(WINDOW *win, int const n, NCURSES_SIZE_T const top,
+ NCURSES_SIZE_T const bottom, chtype blank)
{
int line, j;
size_t to_copy = (size_t) (sizeof(chtype) * (win->_maxx + 1));
@@ -68,10 +69,11 @@ _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top,
if (n < 0) {
for (line = bottom; line >= top - n; line--) {
memcpy(win->_line[line].text,
- win->_line[line + n].text,
- to_copy);
- if_USE_SCROLL_HINTS(win->_line[line].oldindex = win->_line[line
- + n].oldindex);
+ win->_line[line + n].text,
+ to_copy);
+ if_USE_SCROLL_HINTS(
+ win->_line[line].oldindex =
+ win->_line[line + n].oldindex);
}
for (line = top; line < top - n; line++) {
for (j = 0; j <= win->_maxx; j++)
@@ -84,10 +86,10 @@ _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top,
if (n > 0) {
for (line = top; line <= bottom - n; line++) {
memcpy(win->_line[line].text,
- win->_line[line + n].text,
- to_copy);
- if_USE_SCROLL_HINTS(win->_line[line].oldindex = win->_line[line
- + n].oldindex);
+ win->_line[line + n].text,
+ to_copy);
+ if_USE_SCROLL_HINTS(win->_line[line].oldindex =
+ win->_line[line + n].oldindex);
}
for (line = bottom; line > bottom - n; line--) {
for (j = 0; j <= win->_maxx; j++)
@@ -98,7 +100,7 @@ _nc_scroll_window(WINDOW *win, int const n, NCURSES_SIZE_T const top,
touchline(win, top, bottom - top + 1);
}
-int
+NCURSES_EXPORT(int)
wscrl(WINDOW *win, int n)
{
T((T_CALLED("wscrl(%p,%d)"), win, n));