
 // --------------------------- win.h -------------------------------------

 char *memory;
 void open_window(char length, char width,char *title)
    {
    static int x1,y1,x2,y2;
    x1=40-length/2;
    y1=12-width/2;
    x2=x1+length;
    y2=y1+width;
	 memory=new char[2*length*width];
    gettext(x1,y1,x2,y2,memory);
    window(x1,y1,x2,y2);
    textbackground(LIGHTGRAY);
    clrscr();
    window(1,1,80,25);
    showframe(x1,y1,x2,y2,WHITE);
    textcolor(WHITE);
    center(y1,title);
    textcolor(BLACK);
    }

 void close_window(char length, char width)
    {
    static int x1,y1,x2,y2;
    x1=40-length/2;
    y1=12-width/2;
    x2=x1+length;
    y2=y1+width;
    window(1,1,80,25);
    puttext(x1,y1,x2,y2,memory);
    delete [] memory;
    textbackground(BLACK);
    }
