[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]

Technical Reference: Base Operating System and Extensions , Volume 2

scrl, scroll, wscrl Subroutine


Scrolls a Curses window.


Curses Library (libcurses.a)


#include <curses.h>

int scrl
(int n);

int scroll
(WINDOW *win);

int wscrl
(WINDOW *win,
int n);


The scroll subroutine scrolls win one line in the direction of the first line

The scrl and wscrl subroutines scroll the current or specified window. If n is positive, the window scrolls n lines toward the first line. Otherwise, the window scrolls -n lines toward the last line.

Theses subroutines do not change the cursor position. If scrolling is disabled for the current or specified window, these subroutines have no effect. The interaction of these subroutines with the setsccreg subroutine is currently unspecified.


*win Specifies the window to scroll.

Return Values

Upon successful completion, these subroutines return OK. Otherwise, they return ERR.


To scroll the user-defined window my_window up one line, enter:

WINDOW *my_window;

Implementation Specifics

This subroutine is part of Base Operating System (BOS) Runtime.

Related Information

The scrollok (scrollok Subroutine) subroutine.

Curses Overview for Programming, List of Curses Subroutines, Manipulating Characters with Curses in AIX 5L Version 5.1 General Programming Concepts: Writing and Debugging Programs.

[ Previous | Next | Table of Contents | Index | Library Home | Legal | Search ]