xref: /original-bsd/old/lib2648/drawbox.c (revision 1d5898a5)
1 /*
2  * Copyright (c) 1980 Regents of the University of California.
3  * All rights reserved.  The Berkeley software License Agreement
4  * specifies the terms and conditions for redistribution.
5  */
6 
7 #ifndef lint
8 static char sccsid[] = "@(#)drawbox.c	5.1 (Berkeley) 04/30/85";
9 #endif not lint
10 
11 /*
12  * Draw a box around a window.  The lower left corner of the box is at (r, c).
13  * Color is 1 for drawing a box, 0 for erasing.
14  * The box is nrow by ncol.
15  */
16 
17 #include "2648.h"
18 
drawbox(r,c,color,nrow,ncol)19 drawbox(r, c, color, nrow, ncol)
20 int r, c, color, nrow, ncol;
21 {
22 	if (color)
23 		setset();
24 	else
25 		setclear();
26 	move(c, r);
27 	draw(c+ncol-1, r);
28 	draw(c+ncol-1, r+nrow-1);
29 	draw(c, r+nrow-1);
30 	draw(c, r);
31 }
32