wilcoxon: Drop now-unnecessary timer support.
[pspp-builds.git] / src / ui / gui / psppire.c
index 02415d68bc3df8a6250d0a115f622c52de6c787f..9dd3b71372f6334fea60115c325aa35724353f06 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPPIRE - a graphical user interface for PSPP.
-   Copyright (C) 2004, 2005, 2006  Free Software Foundation
+   Copyright (C) 2004, 2005, 2006, 2009  Free Software Foundation
 
    This program is free software: you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
@@ -20,7 +20,6 @@
 #include <assert.h>
 #include <libintl.h>
 #include <gsl/gsl_errno.h>
-#include <signal.h>
 
 #include <argp.h>
 #include <ui/command-line.h>
@@ -121,20 +120,29 @@ initialize (struct command_line_processor *clp, int argc, char **argv)
 
   create_icon_factory ();
 
-  outp_configure_driver_line (
-    ss_cstr ("gui:ascii:screen:squeeze=on headers=off top-margin=0 "
-             "bottom-margin=0 paginate=off length=auto width=auto "
-            "emphasis=none "
-             "output-file=\"" OUTPUT_FILE_NAME "\" append=yes"));
+  {
+    const char *filename = output_file_name ();
+
+    struct string config_string;
+
+    ds_init_empty (&config_string);
+
+    ds_put_format (&config_string,
+                  "gui:ascii:screen:squeeze=on headers=off top-margin=0 "
+                  "bottom-margin=0 paginate=off length=auto width=auto "
+                  "emphasis=none "
+                  "output-file=\"%s\" append=yes", filename);
 
-  unlink (OUTPUT_FILE_NAME);
+    outp_configure_driver_line (ds_ss (&config_string));
+
+    unlink (filename);
+
+    ds_destroy (&config_string);
+  }
 
   journal_enable ();
   textdomain (PACKAGE);
 
-  /* Ignore alarm clock signals */
-  signal (SIGALRM, SIG_IGN);
-
   command_line_processor_replace_aux (clp, &post_init_argp, the_source_stream);
   command_line_processor_replace_aux (clp, &non_option_argp, the_source_stream);