home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
C!T ROM 2
/
ctrom_ii_b.zip
/
ctrom_ii_b
/
PROGRAM
/
C
/
AECUR101
/
BOXWIN.C
< prev
next >
Wrap
C/C++ Source or Header
|
1990-03-08
|
881b
|
41 lines
/*----------------------------------------------------------------------
*
* boxwin.c
*
* copyright (c) 1987,88,89,90 J. Alan Eldridge
*
* display a boxed window on the screen
*
*----------------------------------------------------------------------
*/
#include "curses.h"
int
boxwin(wptrs, lines, cols, orgy, orgx, v, h)
WINDOW *wptrs[2];
int lines, cols, orgy, orgx, v, h;
{
WINDOW *frame,
*win;
frame = newwin(lines + 2, cols + 2, orgy - 1, orgx - 1);
if (frame)
win = subwin(frame, lines, cols, orgy, orgx);
else
return ERR;
if (win) {
box(frame, v, h);
wrefresh(frame);
wptrs[0] = frame;
wptrs[1] = win;
return OK;
} else {
delwin(frame);
wptrs[0] = wptrs[1] = NULL;
return ERR;
}
}