home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 9 Archive / 09-Archive.zip / unzip540.zip / beos / beosmain.cpp < prev    next >
C/C++ Source or Header  |  1998-11-02  |  966b  |  37 lines

  1. // -*- C++ -*-
  2. //
  3. // WARNING: This is C++, not C!  GNU C is not supported here!
  4. //
  5. // beos_init.cpp
  6. //
  7. // BeOS-specific C++ routines for use with Info-ZIP's UnZip 5.30 or later.
  8. //
  9. // This is necessary because we need to have an app_server connection to be
  10. // able to ask the system to assign a MIME type to an un-typed file.  Strange
  11. // but true (the update_mime_info() call needs to send/receive messages).
  12. //
  13. // If you're writing your own Zip application, you probably DO NOT want to
  14. // include this file!
  15.  
  16. #include <app/Application.h>
  17.  
  18. #ifdef SFX
  19. const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZipSFX";
  20. #else
  21. const static char *unzip_signature = "application/x-vnd.Info-ZIP.UnZip";
  22. #endif
  23.  
  24. extern "C" int main_stub( int argc, char *argv[] );
  25.  
  26. int main( int argc, char **argv )
  27. {
  28.     BApplication app( unzip_signature );
  29.  
  30.     int retval = main_stub( argc, argv );
  31.  
  32.     app.PostMessage( B_QUIT_REQUESTED );
  33.     app.Run();
  34.  
  35.     return retval;
  36. }
  37.