home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 092.lha / Small / small4.c < prev    next >
Encoding:
C/C++ Source or Header  |  1986-11-21  |  1.2 KB  |  59 lines

  1. echo ; /*
  2.  
  3. lc -L -v small4.c
  4. QUIT
  5.   
  6.    The above code will compile and link this source if you EXECUTE small.c
  7.          
  8.    The differences here are the inclusion of a compile option.
  9.    -v disables stack checking. */
  10.  
  11. #include "exec/types.h"
  12.  
  13. #include "intuition/intuition.h"
  14. #include "intuition/intuitionbase.h"
  15.  
  16. VOID MemCleanup (){}
  17.  
  18. struct  IntuitionBase *IntuitionBase;
  19.  
  20. static struct IntuiText text = {3,4,JAM1, 0, 0,NULL,"lets get small", NULL};
  21. static struct NewWindow NW = {50,50,200,40,-1,-1,CLOSEWINDOW,
  22.                               WINDOWCLOSE | WINDOWDRAG,
  23.                               NULL,NULL,"small",NULL,NULL,200,40,200,40,
  24.                               WBENCHSCREEN};
  25. static struct Window *W;
  26.  
  27. void _main ()
  28.  
  29. {
  30.    IntuitionBase = (struct IntuitionBase *) 
  31.                    OpenLibrary("intuition.library",0);
  32.  
  33.    if (IntuitionBase == NULL )
  34.       {
  35.       /* the intuition library was not opened so we exit */
  36.       _exit (FALSE);
  37.       }
  38.  
  39.    W = ( struct Window * ) OpenWindow ( &NW );    
  40.  
  41.    if ( W == NULL )
  42.       {
  43.       /* the window wasnt opend */
  44.       _exit (FALSE);
  45.       }
  46.  
  47.    PrintIText ( W->RPort, &text, 5,10 );
  48.  
  49.    Wait ( 1<<W->UserPort->mp_SigBit );
  50.  
  51.    CloseWindow ( W );
  52.  
  53.    CloseLibrary ( IntuitionBase );
  54.  
  55.    _exit(TRUE);
  56.  
  57. }
  58.  
  59.