home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
rtsi.com
/
2014.01.www.rtsi.com.tar
/
www.rtsi.com
/
OS9
/
TOP
/
USR
/
SRC
/
yahtzee.t.Z
/
yahtzee.t
/
boxup.c
< prev
next >
Wrap
Text File
|
1988-07-28
|
956b
|
47 lines
/* This thing turns on standout mode, draws a box, then turns
* standout mode off. Sys5.2 curses box() doesn't draw boxes in
* standout mode, and other curses box() don't allow for corner
* characters.
*/
#include <curses.h>
#define SideWall '|'
#define TopWall '-'
#define TopLeftCorner '.'
#define TopRightCorner '.'
#define BottomLeftCorner '`'
#define BottomRightCorner '\''
extern int BadStandout;
BoxUp(AWindow, Y, X)
WINDOW *AWindow;
int Y, X;
{
int i;
--Y;
--X;
if (! BadStandout)
wstandout(AWindow);
mvwaddch(AWindow, 0, 0, TopLeftCorner);
mvwaddch(AWindow, 0, X, TopRightCorner);
mvwaddch(AWindow, Y, 0, BottomLeftCorner);
mvwaddch(AWindow, Y, X, BottomRightCorner);
for (i = 1; i < Y; ++i)
{
mvwaddch(AWindow, i, 0, SideWall);
mvwaddch(AWindow, i, X, SideWall);
}
for (i = 1; i < X; ++i)
{
mvwaddch(AWindow, 0, i, TopWall);
mvwaddch(AWindow, Y, i, TopWall);
}
if (! BadStandout)
wstandend(AWindow);
}