X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fui%2Fgui%2Fpsppire-data-window.c;h=6dcb8c69c10f4ddc1cfe0586c5177ded574eaba3;hb=9ade26c8349b4434008c46cf09bc7473ec743972;hp=b01582bb8f0969be2352b2614babcfd132e1ff86;hpb=afdf3096926b561f4e6511c10fcf73fc6796b9d2;p=pspp-builds.git diff --git a/src/ui/gui/psppire-data-window.c b/src/ui/gui/psppire-data-window.c index b01582bb..6dcb8c69 100644 --- a/src/ui/gui/psppire-data-window.c +++ b/src/ui/gui/psppire-data-window.c @@ -22,7 +22,7 @@ #include "data/any-reader.h" #include "data/procedure.h" -#include "language/syntax-string-source.h" +#include "language/lexer/lexer.h" #include "libpspp/message.h" #include "ui/gui/help-menu.h" #include "ui/gui/binomial-dialog.h" @@ -352,8 +352,9 @@ static gboolean 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); @@ -364,15 +365,12 @@ load_file (PsppireWindow *de, const gchar *file_name) 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 *