Use exit-status macros for compatibility 3/3
This commit is contained in:
parent
e76e18af96
commit
8f9a1e1cf4
@ -90,7 +90,7 @@ ActionManager::load_menus (const string& menus_file)
|
||||
if (!loaded) {
|
||||
cerr << string_compose (_("%1 will not work without a valid menu definition file"), PROGRAM_NAME) << endl;
|
||||
error << string_compose (_("%1 will not work without a valid menu definition file"), PROGRAM_NAME) << endmsg;
|
||||
exit(1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -351,7 +351,7 @@ ARDOUR_UI::ARDOUR_UI (int *argcp, char **argvp[], const char* localedir)
|
||||
MessageDialog msg (string_compose (_("Your configuration files were copied. You can now restart %1."), PROGRAM_NAME), true);
|
||||
msg.run ();
|
||||
/* configuration was modified, exit immediately */
|
||||
_exit (0);
|
||||
_exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
|
||||
@ -739,7 +739,7 @@ ARDOUR_UI::post_engine ()
|
||||
|
||||
halt_connection.disconnect ();
|
||||
AudioEngine::instance()->stop ();
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
|
||||
}
|
||||
|
||||
@ -816,7 +816,7 @@ ARDOUR_UI::post_engine ()
|
||||
|
||||
halt_connection.disconnect ();
|
||||
AudioEngine::instance()->stop ();
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
/* this being a GUI and all, we want peakfiles */
|
||||
@ -1261,7 +1261,7 @@ ARDOUR_UI::starting ()
|
||||
c.signal_toggled().connect (sigc::hide_return (sigc::bind (sigc::ptr_fun (toggle_file_existence), path)));
|
||||
|
||||
if (d.run () != RESPONSE_OK) {
|
||||
_exit (0);
|
||||
_exit (EXIT_SUCCESS);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
@ -1878,7 +1878,7 @@ ARDOUR_UI::open_recent_session ()
|
||||
recent_session_dialog.hide();
|
||||
return;
|
||||
} else {
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3242,7 +3242,7 @@ ARDOUR_UI::load_from_application_api (const std::string& path)
|
||||
ARDOUR_COMMAND_LINE::session_name = "";
|
||||
|
||||
if (get_session_parameters (true, false)) {
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -3483,12 +3483,12 @@ ARDOUR_UI::get_session_parameters (bool quit_on_cancel, bool should_be_new, stri
|
||||
|
||||
if (ret == -2) {
|
||||
/* not connected to the AudioEngine, so quit to avoid an infinite loop */
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (!ARDOUR_COMMAND_LINE::immediate_save.empty()) {
|
||||
_session->save_state (ARDOUR_COMMAND_LINE::immediate_save, false);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
/* clear this to avoid endless attempts to load the
|
||||
@ -3518,7 +3518,7 @@ ARDOUR_UI::close_session()
|
||||
ARDOUR_COMMAND_LINE::session_name = "";
|
||||
|
||||
if (get_session_parameters (true, false)) {
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
}
|
||||
|
||||
@ -3582,7 +3582,7 @@ ARDOUR_UI::load_session (const std::string& path, const std::string& snap_name,
|
||||
|
||||
switch (response) {
|
||||
case RESPONSE_CANCEL:
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
@ -5577,7 +5577,7 @@ ARDOUR_UI::audioengine_became_silent ()
|
||||
case Gtk::RESPONSE_NO:
|
||||
/* save and quit */
|
||||
save_state_canfail ("");
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
break;
|
||||
|
||||
case Gtk::RESPONSE_CANCEL:
|
||||
|
@ -149,7 +149,7 @@ This could be due to misconfiguration or to an error inside %2.\n\
|
||||
Click OK to exit %1."), PROGRAM_NAME, AudioEngine::instance()->current_backend_name()));
|
||||
|
||||
msg.run ();
|
||||
_exit (0);
|
||||
_exit (EXIT_SUCCESS);
|
||||
|
||||
} else {
|
||||
|
||||
@ -355,7 +355,7 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (parse_opts (argc, argv)) {
|
||||
command_line_parse_error (&argc, &argv);
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
cout << PROGRAM_NAME
|
||||
@ -369,7 +369,7 @@ int main (int argc, char *argv[])
|
||||
<< endl;
|
||||
|
||||
if (just_version) {
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
|
||||
if (no_splash) {
|
||||
@ -390,7 +390,7 @@ int main (int argc, char *argv[])
|
||||
"Run %1 from a commandline for more information."), PROGRAM_NAME),
|
||||
false, Gtk::MESSAGE_ERROR , Gtk::BUTTONS_OK, true);
|
||||
msg.run ();
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
if (curvetest_file) {
|
||||
@ -407,14 +407,14 @@ int main (int argc, char *argv[])
|
||||
|
||||
if (UIConfiguration::instance().pre_gui_init ()) {
|
||||
error << _("Could not complete pre-GUI initialization") << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
try {
|
||||
ui = new ARDOUR_UI (&argc, &argv, localedir.c_str());
|
||||
} catch (failed_constructor& err) {
|
||||
error << string_compose (_("could not create %1 GUI"), PROGRAM_NAME) << endmsg;
|
||||
exit (1);
|
||||
exit (EXIT_FAILURE);
|
||||
}
|
||||
|
||||
#ifndef NDEBUG
|
||||
|
@ -158,7 +158,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||
|
||||
case 'h':
|
||||
print_help (execname);
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
break;
|
||||
case 'H':
|
||||
#ifndef NDEBUG
|
||||
@ -187,7 +187,7 @@ ARDOUR_COMMAND_LINE::parse_opts (int argc, char *argv[])
|
||||
|
||||
case 'D':
|
||||
if (PBD::parse_debug_options (optarg)) {
|
||||
exit (0);
|
||||
exit (EXIT_SUCCESS);
|
||||
}
|
||||
break;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user