X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fterminal%2Fmain.c;h=1366bd7aad307090b7118c1473771b37a5905f7c;hb=dfd1972f7bcb550a4fc3b05dbe7e71d12334b0a7;hp=e37cace39ec05af2527c6e23493689b46e75d75b;hpb=7fbfc32fc3c636959b0a25b3e76609f86519e84a;p=pspp diff --git a/src/ui/terminal/main.c b/src/ui/terminal/main.c index e37cace39e..1366bd7aad 100644 --- a/src/ui/terminal/main.c +++ b/src/ui/terminal/main.c @@ -16,7 +16,6 @@ #include -#include #include #include #include @@ -30,6 +29,8 @@ #include #endif + +#include #include #include #include @@ -45,7 +46,7 @@ #include #include #include -#include +#include #include #include #include @@ -56,12 +57,12 @@ #include "fatal-signal.h" #include "progname.h" +#include "relocatable.h" #include "gettext.h" #define _(msgid) gettext (msgid) -static void i18n_init (void); static void fpu_init (void); static void clean_up (void); @@ -95,7 +96,6 @@ main (int argc, char **argv) fpu_init (); gsl_set_error_handler_off (); - outp_init (); fn_init (); fh_init (); the_source_stream = @@ -119,7 +119,7 @@ main (int argc, char **argv) _("Options affecting input and output locations:"), the_source_stream); command_line_processor_add_options (clp, &test_argp, - _("Diagnositic options:"), the_source_stream); + _("Diagnostic options:"), the_source_stream); command_line_processor_add_options (clp, &post_init_argp, _("Options affecting syntax and behavior:"), the_source_stream); @@ -128,20 +128,6 @@ main (int argc, char **argv) msg_ui_init (the_source_stream); - if (!settings_get_testing_mode ()) - { - outp_read_devices (); - } - else - { - outp_configure_driver_line - ( - ss_cstr ("raw-ascii:ascii:listing:width=9999 length=9999 " - "output-file=\"pspp.list\" emphasis=none " - "headers=off paginate=off squeeze=on " - "top-margin=0 bottom-margin=0")); - } - the_lexer = lex_create (the_source_stream); for (;;) @@ -166,20 +152,6 @@ main (int argc, char **argv) return any_errors (); } -static void -i18n_init (void) -{ -#if ENABLE_NLS -#if HAVE_LC_MESSAGES - setlocale (LC_MESSAGES, ""); -#endif -#if HAVE_LC_PAPER - setlocale (LC_PAPER, ""); -#endif - bindtextdomain (PACKAGE, locale_dir); - textdomain (PACKAGE); -#endif /* ENABLE_NLS */ -} static void fpu_init (void) @@ -232,7 +204,8 @@ clean_up (void) destroy_source_stream (the_source_stream); prompt_done (); readln_uninitialize (); - outp_done (); + output_close (); msg_ui_done (); + i18n_done (); } }