projects
/
pspp-builds.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
dataset: Rename functions with "dataset_" prefix.
[pspp-builds.git]
/
src
/
ui
/
gui
/
executor.c
diff --git
a/src/ui/gui/executor.c
b/src/ui/gui/executor.c
index 24b80db2443d3163ee5978ba02b8417341fac102..07906dd1d20a027f380e32a6ab6edafd37a47c6d 100644
(file)
--- a/
src/ui/gui/executor.c
+++ b/
src/ui/gui/executor.c
@@
-1,5
+1,5
@@
/* PSPPIRE - a graphical user interface for PSPP.
/* PSPPIRE - a graphical user interface for PSPP.
- Copyright (C) 2007, 2009, 2010 Free Software Foundation
+ Copyright (C) 2007, 2009, 2010
, 2011
Free Software Foundation
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@
-18,19
+18,16
@@
#include "ui/gui/executor.h"
#include "ui/gui/executor.h"
+#include "data/dataset.h"
#include "data/lazy-casereader.h"
#include "data/lazy-casereader.h"
-#include "data/procedure.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
#include "language/command.h"
#include "language/lexer/lexer.h"
-#include "language/syntax-string-source.h"
#include "libpspp/cast.h"
#include "libpspp/cast.h"
-#include "libpspp/getl.h"
#include "output/driver.h"
#include "ui/gui/psppire-data-store.h"
#include "ui/gui/psppire-output-window.h"
extern struct dataset *the_dataset;
#include "output/driver.h"
#include "ui/gui/psppire-data-store.h"
#include "ui/gui/psppire-output-window.h"
extern struct dataset *the_dataset;
-extern struct source_stream *the_source_stream;
extern PsppireDataStore *the_data_store;
/* Lazy casereader callback function used by execute_syntax. */
extern PsppireDataStore *the_data_store;
/* Lazy casereader callback function used by execute_syntax. */
@@
-42,7
+39,7
@@
create_casereader_from_data_store (void *data_store_)
}
gboolean
}
gboolean
-execute_syntax (struct
getl_interface *sss
)
+execute_syntax (struct
lex_reader *lex_reader
)
{
struct lexer *lexer;
gboolean retval = TRUE;
{
struct lexer *lexer;
gboolean retval = TRUE;
@@
-70,13
+67,13
@@
execute_syntax (struct getl_interface *sss)
reader = lazy_casereader_create (proto, case_cnt,
create_casereader_from_data_store,
the_data_store, &lazy_serial);
reader = lazy_casereader_create (proto, case_cnt,
create_casereader_from_data_store,
the_data_store, &lazy_serial);
-
proc_set_active_file_data
(the_dataset, reader);
+
dataset_set_source
(the_dataset, reader);
- g_return_val_if_fail (
proc_has_active_fil
e (the_dataset), FALSE);
+ g_return_val_if_fail (
dataset_has_sourc
e (the_dataset), FALSE);
- lexer = lex_create (
the_source_stream
);
-
-
getl_append_source (the_source_stream, sss, GETL_BATCH, ERRMODE_CONTINUE
);
+ lexer = lex_create ();
+ psppire_set_lexer (lexer);
+
lex_append (lexer, lex_reader
);
for (;;)
{
for (;;)
{
@@
-85,8
+82,7
@@
execute_syntax (struct getl_interface *sss)
if ( cmd_result_is_failure (result))
{
retval = FALSE;
if ( cmd_result_is_failure (result))
{
retval = FALSE;
- if ( source_stream_current_error_mode (the_source_stream)
- == ERRMODE_STOP )
+ if ( lex_get_error_mode (lexer) == LEX_ERROR_STOP )
break;
}
break;
}
@@
-94,16
+90,15
@@
execute_syntax (struct getl_interface *sss)
break;
}
break;
}
- getl_abort_noninteractive (the_source_stream);
-
lex_destroy (lexer);
lex_destroy (lexer);
+ psppire_set_lexer (NULL);
proc_execute (the_dataset);
psppire_dict_replace_dictionary (the_data_store->dict,
dataset_dict (the_dataset));
proc_execute (the_dataset);
psppire_dict_replace_dictionary (the_data_store->dict,
dataset_dict (the_dataset));
- reader =
proc_extract_active_file_data
(the_dataset);
+ reader =
dataset_steal_source
(the_dataset);
if (!lazy_casereader_destroy (reader, lazy_serial))
psppire_data_store_set_reader (the_data_store, reader);
if (!lazy_casereader_destroy (reader, lazy_serial))
psppire_data_store_set_reader (the_data_store, reader);
@@
-125,5
+120,5
@@
execute_syntax_string (gchar *syntax)
void
execute_const_syntax_string (const gchar *syntax)
{
void
execute_const_syntax_string (const gchar *syntax)
{
- execute_syntax (
create_syntax_string_source
(syntax));
+ execute_syntax (
lex_reader_for_string
(syntax));
}
}