1 /* Boxes
2 
3  * Copyright (C) 1998 J.A. Bezemer
4  *
5  * Licensed under the terms of the GNU General Public License.
6  * ABSOLUTELY NO WARRANTY.
7  * See the file `COPYING' in this directory.
8  */
9 
10 #include "boxes.h"
11 #ifndef OLD_CURSES
12 #include <ncurses.h>
13 #else
14 #include <curses.h>
15 #endif
16 
17 
18 void
mybox(int y,int x,int h,int w)19 mybox (int y, int x, int h, int w)
20 /* Draws a box, top left = (y,x), heigth = h, width = w. */
21 {
22   mvaddch (y, x, ACS_ULCORNER);
23   mvaddch (y, x + w - 1, ACS_URCORNER);
24   mvaddch (y + h - 1, x, ACS_LLCORNER);
25   mvaddch (y + h - 1, x + w - 1, ACS_LRCORNER);
26 
27   move (y, x + 1);
28   hline (ACS_HLINE, w - 2);
29   move (y + 1, x + w - 1);
30   vline (ACS_VLINE, h - 2);
31   move (y + h - 1, x + 1);
32   hline (ACS_HLINE, w - 2);
33   move (y + 1, x);
34   vline (ACS_VLINE, h - 2);
35 }
36