projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
lexer: Reimplement for better testability and internationalization.
[pspp-builds.git]
/
src
/
ui
/
gui
/
psppire-data-window.c
diff --git
a/src/ui/gui/psppire-data-window.c
b/src/ui/gui/psppire-data-window.c
index b01582bb8f0969be2352b2614babcfd132e1ff86..6dcb8c69c10f4ddc1cfe0586c5177ded574eaba3 100644
(file)
--- 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 "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"
#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;
load_file (PsppireWindow *de, const gchar *file_name)
{
gchar *native_file_name;
- struct getl_interface *sss;
struct string filename;
struct string filename;
+ gchar *syntax;
+ bool ok;
ds_init_empty (&filename);
ds_init_empty (&filename);
@@
-364,15
+365,12
@@
load_file (PsppireWindow *de, const gchar *file_name)
g_free (native_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);
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 *
}
static GtkWidget *