home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / mbug / mbug005.arc / TEST.C < prev    next >
Text File  |  1979-12-31  |  2KB  |  49 lines

  1. #include "bdscio.h"
  2. #include "wdefines.h"
  3.  
  4. /*---------------------------------------------------------------------------*/
  5. main()
  6. {    char    *string, *Wgets();
  7.     char    target[128];
  8.     int    a,b,c,d,e,f,i;
  9.     struct     Window     another[5],fullscrn, *window;
  10. /* first initialise the Screen structure */
  11.     putchar(26);
  12.     Winitial(TRUE,TRUE,TRUE,TRUE);
  13. /* next set a window for the full screen */
  14.     window = &fullscrn;
  15.     window->Column = 0;    window->Row = 0;
  16.     window->Width = 80;    window->Depth = 24;
  17.     window->Fore = 7;    window->Back = 3;
  18.     window->CursX = 0;    window->CursY = 0;
  19.     Wdisplay(window);        /* TEST */
  20. /* clear the window */
  21.     Wputchar(window,26);
  22. /* now set up the windows */
  23.     for (i=0; i<=5; i++)
  24.     {     Wputs(window,"\15enter Column Row Width Depth Fore Back");
  25.         sprintf(target," for window %d \24\15\024", i);
  26.         Wputs(window,target);
  27.         scanf(" %d %d %d %d %d %d ", &a, &b, &c, &d, &e, &f);
  28.         window = &another[i];
  29.         window->Column = a;
  30.         window->Row = b;
  31.         window->Width = c;
  32.         window->Depth = d;
  33.         window->Fore = e;
  34.         window->Back = f;
  35.         Wputchar(window,26);
  36.     }
  37. /* now get a window number and the string to display */
  38. loop:    
  39.     for (i=0; i<6; i++)
  40.     {    window = &another[i];
  41.         Wputs(window,"\24\15enter string to be displayed\24\15");
  42.         Wputs(window,Wgets(window,TRUE));
  43.     }
  44.     goto loop;
  45. }
  46. /*---------------------------------------------------------------------------*/
  47. /* include window.c somewhere OUTSIDE a function */
  48. #include "windows.c"
  49.