xref: /csrg-svn/old/lib2648/areaclear.c (revision 18800)
1*18800Sdist /*
2*18800Sdist  * Copyright (c) 1980 Regents of the University of California.
3*18800Sdist  * All rights reserved.  The Berkeley software License Agreement
4*18800Sdist  * specifies the terms and conditions for redistribution.
5*18800Sdist  */
611461Sralph 
7*18800Sdist #ifndef lint
8*18800Sdist static char sccsid[] = "@(#)areaclear.c	5.1 (Berkeley) 04/26/85";
9*18800Sdist #endif not lint
10*18800Sdist 
1111461Sralph #include "2648.h"
1211461Sralph 
areaclear(rmin,cmin,rmax,cmax)1311461Sralph areaclear(rmin, cmin, rmax, cmax)
1411461Sralph int rmin, cmin, rmax, cmax;
1511461Sralph {
1611461Sralph 	int osm;
1711461Sralph 	char mes[20];
1811461Sralph 	register int i;
1911461Sralph 
2011461Sralph #ifdef TRACE
2111461Sralph 	if (trace)
2211461Sralph 		fprintf(trace, "areaclear(%d, %d, %d, %d)\n", rmin, cmin, rmax, cmax);
2311461Sralph #endif
2411461Sralph 	osm = _supsmode;
2511461Sralph 	setclear();
2611461Sralph 	sync();
2711461Sralph #ifdef notdef
2811461Sralph 	/* old kludge because I couldn't get area fill to work */
2911461Sralph 	for (i=rmax; i>=rmin; i--) {
3011461Sralph 		move(cmin, i);
3111461Sralph 		draw(cmax, i);
3211461Sralph 	}
3311461Sralph #endif
3411461Sralph 	sprintf(mes, "%da1b%d %d %d %de", (_video==NORMAL) ? 1 : 2, cmin, rmin, cmax, rmax);
3511461Sralph 	escseq(ESCM);
3611461Sralph 	outstr(mes);
3711461Sralph 	_supsmode = osm;
3811461Sralph }
39