#include <stdlib.h>
#include "data/any-reader.h"
-#include "data/procedure.h"
-#include "language/syntax-string-source.h"
+#include "data/dataset.h"
+#include "language/lexer/lexer.h"
#include "libpspp/message.h"
-#include "ui/gui/help-menu.h"
+#include "ui/gui/aggregate-dialog.h"
#include "ui/gui/binomial-dialog.h"
+#include "ui/gui/chi-square-dialog.h"
#include "ui/gui/comments-dialog.h"
#include "ui/gui/compute-dialog.h"
#include "ui/gui/correlation-dialog.h"
-#include "ui/gui/chi-square-dialog.h"
#include "ui/gui/crosstabs-dialog.h"
#include "ui/gui/descriptives-dialog.h"
#include "ui/gui/examine-dialog.h"
#include "ui/gui/factor-dialog.h"
#include "ui/gui/find-dialog.h"
#include "ui/gui/frequencies-dialog.h"
-#include "ui/gui/k-related-dialog.h"
#include "ui/gui/goto-case-dialog.h"
+#include "ui/gui/help-menu.h"
#include "ui/gui/helper.h"
+#include "ui/gui/k-related-dialog.h"
#include "ui/gui/oneway-anova-dialog.h"
#include "ui/gui/psppire-data-window.h"
#include "ui/gui/psppire-syntax-window.h"
#include "ui/gui/t-test-paired-samples.h"
#include "ui/gui/text-data-import-dialog.h"
#include "ui/gui/transpose-dialog.h"
-#include "ui/gui/aggregate-dialog.h"
#include "ui/gui/variable-info-dialog.h"
#include "ui/gui/weight-cases-dialog.h"
#include "ui/syntax-gen.h"
load_file (PsppireWindow *de, const gchar *file_name)
{
gchar *native_file_name;
- struct getl_interface *sss;
struct string filename;
+ gchar *syntax;
+ bool ok;
ds_init_empty (&filename);
g_free (native_file_name);
- sss = create_syntax_format_source ("GET FILE=%s.",
- ds_cstr (&filename));
-
+ syntax = g_strdup_printf ("GET FILE=%s.", ds_cstr (&filename));
ds_destroy (&filename);
- if (execute_syntax (sss) )
- return TRUE;
-
- return FALSE;
+ ok = execute_syntax (lex_reader_for_string (syntax));
+ g_free (syntax);
+ return ok;
}
static GtkWidget *