home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / ocl150a.zip / OCL / Samples / GTakPM / Source / GTPMMain.cpp < prev    next >
C/C++ Source or Header  |  1996-08-12  |  1KB  |  60 lines

  1. // GTakPM
  2. // (c) Benjamin Stein 1994
  3. // All Rights Reserved
  4. // GTPMMain.cpp
  5.  
  6. // $Header: W:/Projects/OCL/Samples/GTakPM/Source/rcs/GTPMMain.cpp 1.50 1996/08/11 23:48:08 B.STEIN Release $
  7.  
  8. #define __OCL_RESOLVE_TEMPLATES__
  9.  
  10. #include "..\Source\GTakPM.hpp"
  11.  
  12.  
  13. #ifdef __EMX__
  14.   template class OList<DirItem>;
  15.   template class OContainer<DirInfo, RECORDCORE>;
  16.   template class OContainer<FileInfo, MINIRECORDCORE>;
  17.   template class OThread<FilesCnr>;
  18.   template class OThread<DrivesCnr>;
  19.   template class OThread<GTPMApp>;
  20.   template class OThread<GTPMWin>;
  21. #endif
  22.  
  23.  
  24.  
  25. void main(int argc, char *argv[])
  26. {
  27.  GTPMApp       *app;
  28.  OXCPTRECORD   exceptionRecord;
  29.  SystemHandler except;
  30.  
  31.  except.setHandler(exceptionRecord); // set system exception handler
  32.  
  33.  try
  34.   {
  35.    app = new GTPMApp(argc, argv); 
  36.   }
  37.  
  38.  catch(OPMException ex)
  39.   {
  40.    except.unsetHandler();           // release system exception handler
  41.    _exit(ex.rc); 
  42.   }
  43.  
  44.  catch(...) 
  45.   {
  46.    except.unsetHandler();           // release system exception handler
  47.    _exit(1); 
  48.   }
  49.  
  50.  OApp::current().run();
  51.  
  52.  delete app;
  53.  
  54.  except.unsetHandler();             // release system exception handler
  55.  
  56.  _exit(0);
  57. }
  58.  
  59. // end of source
  60.