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

  1. echo ; /*
  2.  
  3. lc  -v -b  small5.c
  4. BLINK from lib:c.o, small5.o LIB lib:lc.lib, lib:amiga.lib SC SD ND MAP small5.map
  5.  
  6. QUIT
  7.   
  8.    The above code will compile and link this source if you EXECUTE small.c
  9.    
  10.    The difference here is that we have add the options SC SD and ND to the
  11.    Link string.  SC is the option SMALLCODE, SD is the option SMALLDATA, 
  12.    and ND is the option NODEBUG.  See your Lattice manual for details of
  13.    what each one does.      
  14.    */
  15.  
  16. #include "exec/types.h"
  17.  
  18. #include "intuition/intuition.h"
  19. #include "intuition/intuitionbase.h"
  20.  
  21. VOID MemCleanup (){}
  22.  
  23. struct  IntuitionBase *IntuitionBase;
  24.  
  25. static struct IntuiText text = {3,4,JAM1, 0, 0,NULL,"lets get small", NULL};
  26. static struct NewWindow NW = {50,50,200,40,-1,-1,CLOSEWINDOW,
  27.                               WINDOWCLOSE | WINDOWDRAG,
  28.                               NULL,NULL,"small",NULL,NULL,200,40,200,40,
  29.                               WBENCHSCREEN};
  30. static struct Window *W;
  31.  
  32. void _main ()
  33.  
  34. {
  35.    IntuitionBase = (struct IntuitionBase *) 
  36.                    OpenLibrary("intuition.library",0);
  37.  
  38.    if (IntuitionBase == NULL )
  39.       {
  40.       /* the intuition library was not opened so we exit */
  41.       _exit (FALSE);
  42.       }
  43.  
  44.    W = ( struct Window * ) OpenWindow ( &NW );    
  45.  
  46.    if ( W == NULL )
  47.       {
  48.       /* the window wasnt opend */
  49.       _exit (FALSE);
  50.       }
  51.  
  52.    PrintIText ( W->RPort, &text, 5,10 );
  53.  
  54.    Wait ( 1<<W->UserPort->mp_SigBit );
  55.  
  56.    CloseWindow ( W );
  57.  
  58.    CloseLibrary ( IntuitionBase );
  59.  
  60.    _exit(TRUE);
  61.  
  62. }
  63.  
  64.