projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Added psppire-dialog and psppire-buttonbox widgets.
[pspp]
/
src
/
ui
/
gui
/
syntax-editor.c
diff --git
a/src/ui/gui/syntax-editor.c
b/src/ui/gui/syntax-editor.c
index 643013a3371c90c38c6442a8ae1823c12b2742d2..a9564cb1a563fc959cee8f5c9dc80fe40d914f84 100644
(file)
--- a/
src/ui/gui/syntax-editor.c
+++ b/
src/ui/gui/syntax-editor.c
@@
-33,6
+33,7
@@
#include "window-manager.h"
#include "window-manager.h"
+#include <data/dictionary.h>
#include <language/lexer/lexer.h>
#include <language/command.h>
#include <data/procedure.h>
#include <language/lexer/lexer.h>
#include <language/command.h>
#include <data/procedure.h>
@@
-214,14
+215,16
@@
static void
execute_syntax (const struct syntax_editor *se, GtkTextIter start,
GtkTextIter stop)
{
execute_syntax (const struct syntax_editor *se, GtkTextIter start,
GtkTextIter stop)
{
+ g_return_if_fail (proc_has_source (the_dataset));
+
getl_append_source (the_source_stream,
create_syntax_editor_source (se, start, stop));
for (;;)
{
getl_append_source (the_source_stream,
create_syntax_editor_source (se, start, stop));
for (;;)
{
+ const struct dictionary *dict = dataset_dict (the_dataset);
int result = cmd_parse (se->lexer, the_dataset,
int result = cmd_parse (se->lexer, the_dataset,
- proc_has_source (the_dataset)
- ? CMD_STATE_DATA : CMD_STATE_INITIAL);
-
+ dict_get_var_cnt (dict) > 0 ?
+ CMD_STATE_DATA : CMD_STATE_INITIAL);
if (result == CMD_EOF || result == CMD_FINISH)
break;
}
if (result == CMD_EOF || result == CMD_FINISH)
break;
}