From: Ben Pfaff Date: Mon, 11 Oct 2010 04:15:19 +0000 (-0700) Subject: pspp: Get rid of clean_up() function now that it has only one caller. X-Git-Tag: v0.7.6~53 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d1c4655e2d9b739bc4f542c5c143172e3481f16;p=pspp-builds.git pspp: Get rid of clean_up() function now that it has only one caller. --- diff --git a/src/ui/terminal/main.c b/src/ui/terminal/main.c index 478c2fd5..64a7d2ec 100644 --- a/src/ui/terminal/main.c +++ b/src/ui/terminal/main.c @@ -72,7 +72,6 @@ static void add_syntax_file (struct source_stream *, enum syntax_mode, const char *file_name); static void bug_handler(int sig); static void fpu_init (void); -static void clean_up (void); /* Program entry point. */ int @@ -153,7 +152,19 @@ main (int argc, char **argv) } - clean_up (); + destroy_dataset (the_dataset); + + random_done (); + settings_done (); + fh_done (); + lex_destroy (the_lexer); + destroy_source_stream (the_source_stream); + prompt_done (); + readln_uninitialize (); + output_close (); + msg_ui_done (); + i18n_done (); + return msg_ui_any_errors (); } @@ -201,30 +212,6 @@ bug_handler(int sig) raise (sig); } -/* Clean up PSPP in preparation for termination. */ -static void -clean_up (void) -{ - static bool terminating = false; - if (!terminating) - { - terminating = true; - - destroy_dataset (the_dataset); - - random_done (); - settings_done (); - fh_done (); - lex_destroy (the_lexer); - destroy_source_stream (the_source_stream); - prompt_done (); - readln_uninitialize (); - output_close (); - msg_ui_done (); - i18n_done (); - } -} - static void add_syntax_file (struct source_stream *ss, enum syntax_mode syntax_mode, const char *file_name)