Repository navigation
Expand file tree
/
Copy pathscrreg.c
More file actions
executable file
·58 lines (52 loc) · 1.83 KB
/
Copy pathscrreg.c
File metadata and controls
executable file
·58 lines (52 loc) · 1.83 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
/****************************************************************/
/* Wsetscrreg() routine of the PCcurses package */
/* */
/****************************************************************/
/* This version of curses is based on ncurses, a curses version */
/* Originally written by Pavel Curtis at Cornell University. */
/* I have made substantial changes to make it run on IBM PC's, */
/* And therefore consider myself free to make it public domain. */
/* Bjorn Larsson (...mcvax!enea!infovax!bl) */
/****************************************************************/
/* 1.0: Release: 870515 */
/****************************************************************/
/* Modified to run under the MINIX operating system by Don Cope */
/* These changes are also released into the public domain. */
/* 900906 */
/****************************************************************/
#include <curses.h>
#include "curspriv.h"
/****************************************************************/
/* Wsetscrreg() set the scrolling region of window 'win' to in- */
/* Clude all lines between 'top' and 'bottom'. */
/****************************************************************/
int wsetscrreg(win, top, bottom)
WINDOW *win;
int top;
int bottom;
{
if ((0 <= top) &&
(top <= win->_cury)
&&
(win->_cury <= bottom)
&&
(bottom <= win->_maxy)
) {
win->_regtop = top;
win->_regbottom = bottom;
return(OK);
}
/* If */
else
return(ERR);
} /* wsetscrreg */
/****************************************************************/
/* Setscrreg() set the scrolling region of stdscr to include */
/* All lines between 'top' and 'bottom'. */
/****************************************************************/
int setscrreg(top, bottom)
int top;
int bottom;
{
return(wsetscrreg(stdscr, top, bottom));
} /* setscrreg */