#include "deftype.h"

void popud3s(sx,sy,ex,ey,wcol,wt,mode,func)
int sx,sy,ex,ey,wcol,wt,mode;
void (*func)();
/* ˜gopen/close by each pattern */
{
unint xs,ys,xe,ye;
	xe=xs=sx+(ex-sx)/2;
	ye=ys=sy+(ey-sy)/2;
	switch (mode) {
		case 1:	xs=sx;
			xe=ex;
			break;
		case 2:	xs=sx;
			ys=sy;
			xe=ex;
			ye=sy;
			break;
		case 4:	xs=sx;
			ys=sy;
			xe=sx;
			ye=sy;
			break;
		case 5:	ys=sy;
			ye=ey;
			break;
	}
	func(xs,ys,xe,ye,sx,sy,ex,ey,wcol,wt);
}
