home *** CD-ROM | disk | FTP | other *** search
/ Amiga ISO Collection / AmigaUtilCD2.iso / Programming / Misc / M2V11-1.LHA / modula / lib / m2_main.c next >
Encoding:
C/C++ Source or Header  |  1994-09-22  |  547 b   |  27 lines

  1. /* NOTE: A m2_main.o file in your working directory will be linked */
  2. /*  instead of the one in MODULA:lib (this one).           */
  3.  
  4. extern int MAIN_BEGIN( ) ;
  5.  
  6. char wbStarted ; /* boolean (0,1) */
  7. int argc ;
  8. char **argv ;
  9.  
  10. int _m2_safeStack ; /* The stack is reset back to this if CheckStack( ) fails */
  11.  
  12. int main( int ac, char**av )
  13. {
  14.   _m2_safeStack = _m2_GetSP( ) ;
  15.   wbStarted = 0 ;
  16.   argc = ac ; argv = av ;
  17.   return( MAIN_BEGIN( ) ) ;
  18. }
  19.  
  20. int wbmain( void *msg )
  21. {
  22.   _m2_safeStack = _m2_GetSP( ) ;
  23.   wbStarted = 1 ;
  24.   return( MAIN_BEGIN( ) ) ;
  25. }
  26.  
  27.