char bar[] = "��������������������������������������������������������������������������������";
char spc[] = " ";
box(int x1,int y1,int x2,int y2,int attr)
{
int i,j;
char fmt[5];
char s[3];
strcpy(fmt,"%.");
itoa(x2-x1-2,s,10);
strcat(fmt,s);
strcat(fmt,"s");
textattr(attr);
gotoxy(x1,y1);
putch('�');
cprintf(fmt,bar);
putch('�');
for(j=y1+1;j<y2;j++) {
gotoxy(x1,j);
putch('�');
cprintf(fmt,spc);
putch('�');
}
gotoxy(x1,y2);
putch('�');
cprintf(fmt,bar);
putch('�');
}