ripoffline Subroutine

Purpose

Reserves a line for a dedicated purpose.

Library

Curses Library (libcurses.a)

Syntax

#include 
<curses.h>

int 
ripoffline(int line,
int (*init)(WINDOW *win,
int columns));

Description

The ripoffline subroutine reserves a screen line for use by the application.

Any call to the ripoffline subroutine must precede the call to the initscr or newterm subroutine. If line is positive, one line is removed from the beginning of stdstr; if line is negative, one line is removed from the end. Removal occurs during the subsequent call to the initscr or newterm subroutine. When the subsequent call is made, the subroutine pointed to by init is called with two arguments: a WINDOW pointer to the one-line window that has been allocated and an integer with the number of columns in the window. The initialisation subroutine cannot use the LINES and COLS external variables and cannot call the wrefresh or doupdate subroutine, but may call the wnoutrefresh subroutine.

Up to five lines can be ripped off. Calls to the ripoffline subroutine above this limit have no effect, but report success.

Parameters

Item Description
line  
*init  
columns  
*win  

Return Values

The ripoffline subroutine returns OK.

Example

To remove three lines from the top of the screen, enter:

#include <curses.h>
ripoffline(1,initfunc);
ripoffline(1,initfunc);
ripoffline(1,initfunc);
 
initscr();