+ terminate (err_error_count == 0);
+ abort ();
+}
+
+/* Terminate PSPP. SUCCESS should be true to exit successfully,
+ false to exit as a failure. */
+void
+terminate (bool success)
+{
+ static bool terminating = false;
+ if (terminating)
+ return;
+ terminating = true;
+
+ err_done ();
+ outp_done ();
+
+ cancel_transformations ();
+ dict_destroy (default_dict);
+
+ random_done ();
+ settings_done ();
+ fh_done ();
+ lex_done ();
+ getl_uninitialize ();
+
+ exit (success ? EXIT_SUCCESS : EXIT_FAILURE);