summaryrefslogtreecommitdiff
path: root/systems/msdos/tx/src/frame.c
blob: 72cd841d2ae9cdb1ecc58acc96d115337e25ba87 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#include <conio.h>

void DrawFrame(int left, int top, int right, int bottom,int DoubleFrame)
{
  register int i ;
  int U_Left=218,Horiz=196,U_Right=191,Vert=179,L_Left=192,L_Right=217;

  if (DoubleFrame) {
    U_Left  = 201 ;
    Horiz   = 205 ;
    U_Right = 187 ;
    Vert    = 186 ;
    L_Left  = 200 ;
    L_Right = 188 ;
  }
  gotoxy(left,top) ;
  putch(U_Left);                                /* upper left corner */
  for ( i = left+1 ; i < right ; i++)
    putch(Horiz) ;                              /* horizontal stuff */
  putch(U_Right) ;                              /* upper right corner */
  for ( i = top + 1 ; i < bottom ; i++ ) {      /* vertical stuff */
    gotoxy(left,i) ; putch(Vert) ;
    gotoxy(right,i) ; putch(Vert) ;
  }
  gotoxy(left,bottom) ;
  putch(L_Left);                                /* lower left corner */
  for ( i = left+1 ; i < right ; i++)
    putch(Horiz) ;                              /* horizontal stuff */
  putch(L_Right) ;                              /* lower right corner */
}