int main(int argc, char * argv[]) { try { ParseCommandLine(argc,argv); if (g_whatToConvert == db) { ConvertDb(); } else if (g_whatToConvert == files) { ConvertFiles(); } } catch (const std::exception & exc) { std::wcout << "Caught exception: " << exc.what() << std::endl; return 1; } return 0; }
int main( int argc, const char * argv[] ) /***************************************/ { int error; /* 1 if an error has occured, 0 otherwise */ bool contok; /* true if OK to continue after scanning arg */ TRMemOpen(); contok = ScanParams( argc, argv ); if( CmdLineParms.PrintHelp ) { PrintUsageMesage( argv[0] ); } if( contok ) { error = ConvertFiles(); } else { error = 1; } TRMemClose(); return( error ); }