Rewrite output-viewer.c --> psppire-output-window.c
[pspp-builds.git] / src / ui / gui / psppire.c
index b1551fbb15f137f81cc548cc48f3f49a80f70fb3..77d550a15e040af8258eb8bc42b7bca357aac4d9 100644 (file)
@@ -53,7 +53,8 @@
 #include "message-dialog.h"
 #include <ui/syntax-gen.h>
 
-#include "output-viewer.h"
+
+#include "psppire-output-window.h"
 
 #include <data/sys-file-reader.h>
 #include <data/por-file-reader.h>
@@ -72,9 +73,7 @@ struct dataset * the_dataset = NULL;
 static void
 replace_casereader (struct casereader *s)
 {
-  PsppireCaseFile *pcf = psppire_case_file_new (s);
-
-  psppire_data_store_set_case_file (the_data_store, pcf);
+  psppire_data_store_set_reader (the_data_store, s);
 }
 
 #define _(msgid) gettext (msgid)
@@ -263,7 +262,13 @@ parse_non_options (int key, char *arg, struct argp_state *state)
        if (pfm_detect (fp))
          {
            ds_init_cstr (&syntax, "IMPORT FILE=");
+           goto close;
          }
+
+       fclose (fp);
+       msg (ME, _("%s is neither a system nor portable file"), arg);
+       break;
+
       close:
        fclose (fp);