home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
ftp.barnyard.co.uk
/
2015.02.ftp.barnyard.co.uk.tar
/
ftp.barnyard.co.uk
/
cpm
/
walnut-creek-CDROM
/
MBUG
/
MBUG005.ARC
/
TEST.C
< prev
next >
Wrap
Text File
|
1979-12-31
|
2KB
|
49 lines
#include "bdscio.h"
#include "wdefines.h"
/*---------------------------------------------------------------------------*/
main()
{ char *string, *Wgets();
char target[128];
int a,b,c,d,e,f,i;
struct Window another[5],fullscrn, *window;
/* first initialise the Screen structure */
putchar(26);
Winitial(TRUE,TRUE,TRUE,TRUE);
/* next set a window for the full screen */
window = &fullscrn;
window->Column = 0; window->Row = 0;
window->Width = 80; window->Depth = 24;
window->Fore = 7; window->Back = 3;
window->CursX = 0; window->CursY = 0;
Wdisplay(window); /* TEST */
/* clear the window */
Wputchar(window,26);
/* now set up the windows */
for (i=0; i<=5; i++)
{ Wputs(window,"\15enter Column Row Width Depth Fore Back");
sprintf(target," for window %d \24\15\024", i);
Wputs(window,target);
scanf(" %d %d %d %d %d %d ", &a, &b, &c, &d, &e, &f);
window = &another[i];
window->Column = a;
window->Row = b;
window->Width = c;
window->Depth = d;
window->Fore = e;
window->Back = f;
Wputchar(window,26);
}
/* now get a window number and the string to display */
loop:
for (i=0; i<6; i++)
{ window = &another[i];
Wputs(window,"\24\15enter string to be displayed\24\15");
Wputs(window,Wgets(window,TRUE));
}
goto loop;
}
/*---------------------------------------------------------------------------*/
/* include window.c somewhere OUTSIDE a function */
#include "windows.c"