'\"macro stdmacro
.if n .pH g3x.curs_scroll @(#)curs_scroll	40.3 of 12/15/89
.\" Copyright 1989 AT&T
.\" ident	"@(#)svid_ti:ti_lib/curs_scroll	1.3"
.nr X
.if \nX=0 .ds x} curs_scroll 3X "" "\&"
.if \nX=1 .ds x} curs_scroll 3X ""
.if \nX=2 .ds x} curs_scroll 3X "" "\&"
.if \nX=3 .ds x} curs_scroll "" "" "\&"
.TH \*(x}
.SH NAME
\f4curs_scroll\f2: \f4 scroll\f1, \f4srcl\f1, \f4wscrl\f1 \- scroll a \f4curses\fP window
.SH SYNOPSIS
.nf
.ft 4
#include <curses.h>
.sp
int scroll(WINDOW *win);
.sp 0.5
int scrl(int n);
.sp 0.5
int wscrl(WINDOW *win, int n);
.ft 1
.fi
.SH DESCRIPTION
With the \f4scroll\f1 routine, the window is scrolled up one line.
This involves moving the lines in the window data structure.
As an optimization, if the
scrolling region of the window is the entire screen,
the physical screen is scrolled at the same time.
.P
With the \f4scrl\f1 and \f4wscrl\f1 routines,
for positive \f2n\f1 scroll the window up \f2n\f1 lines (line \f2i+n\f1
becomes \f2i\f1);
otherwise scroll the window down \f2n\f1 lines.
This involves moving the lines in the window character image structure.
The current cursor position is not changed.
.P
For these functions to work,
scrolling must be enabled via \f4scrollok\f1.
.SH RETURN VALUE
All routines return the integer \f4ERR\f1 upon
failure and an integer value other than \f4ERR\f1
upon successful completion.
.SH NOTES
.P
The header file \f4<curses.h>\f1 automatically includes the header files
\f4<stdio.h>\f1 and \f4<unctrl.h>\f1.
.PP
Note that \f4scrl\f1 and \f4scroll\fP may be macros.
.SH SEE ALSO
.na
\f4curses\fP(3X),
\f4curs_outopts\fP(3X).
.ad
