int CLIB_ROUTINE main(int argc, char* argv[]) { /************************************** * * m a i n * ************************************** * * Functional description * Invoke real gsec main function * **************************************/ #ifdef HAVE_LOCALE_H // Pick up the system locale to allow SYSTEM<->UTF8 conversions setlocale(LC_CTYPE, ""); #endif int exitCode = 1; try { Firebird::AutoPtr<Firebird::UtilSvc> uSvc(Firebird::UtilSvc::createStandalone(argc, argv)); exitCode = gsec(uSvc); } catch (const Firebird::Exception& ex) { Firebird::StaticStatusVector st; ex.stuffException(st); isc_print_status(st.begin()); } fb_shutdown(0, fb_shutrsn_app_stopped); return exitCode; }
int CLIB_ROUTINE main(int argc, char* argv[]) { /************************************** * * m a i n * ************************************** * * Functional description * Invoke real nbackup main function * **************************************/ try { Firebird::AutoPtr<Firebird::UtilSvc> uSvc(Firebird::UtilSvc::createStandalone(argc, argv)); nbackup(uSvc); } catch (const Firebird::Exception&) { // should be already printed, no need to print once more here return FINI_ERROR; } return FINI_OK; }
int CLIB_ROUTINE main(int argc, char* argv[]) { /************************************** * * m a i n * ************************************** * * Functional description * Invoke real nbackup main function * **************************************/ #ifdef HAVE_LOCALE_H // Pick up the system locale to allow SYSTEM<->UTF8 conversions setlocale(LC_CTYPE, ""); #endif try { Firebird::AutoPtr<Firebird::UtilSvc> uSvc(Firebird::UtilSvc::createStandalone(argc, argv)); nbackup(uSvc); } catch (const Firebird::Exception&) { // should be already printed, no need to print once more here return FINI_ERROR; } return FINI_OK; }