From: John Darrington Date: Wed, 19 Sep 2007 06:21:19 +0000 (+0000) Subject: Remove callbacks from struct dataset. Closes patch #6075 X-Git-Tag: v0.6.0~263 X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d96e59d1c5f17bd3b4b3b757640851731fde3c78;p=pspp-builds.git Remove callbacks from struct dataset. Closes patch #6075 --- diff --git a/po/de.po b/po/de.po index fd38d3ff..eb415402 100644 --- a/po/de.po +++ b/po/de.po @@ -10,7 +10,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-09-15 09:11+0800\n" +"POT-Creation-Date: 2007-09-19 14:15+0800\n" "PO-Revision-Date: 2006-07-28 19:32+0800\n" "Last-Translator: John Darrington \n" "Language-Team: German \n" @@ -4799,16 +4799,11 @@ msgstr "_Kein Lösewerten" msgid "_Discrete missing values" msgstr "_Diskret Lösewerten" -#: src/ui/gui/find-dialog.c:658 -#, c-format -msgid "Bad regular expression: %s" -msgstr "" - -#: src/ui/gui/helper.c:135 +#: src/ui/gui/helper.c:140 msgid "Sorry. The help system hasn't yet been implemented." msgstr "Es gibt noch nicht kein Helpsysteme. Schade!" -#: src/ui/gui/helper.c:158 +#: src/ui/gui/helper.c:163 #, c-format msgid "Cannot open reference manual: %s" msgstr "" @@ -4903,11 +4898,11 @@ msgstr "" msgid "Paste" msgstr "Datum" -#: src/ui/gui/psppire-data-store.c:810 +#: src/ui/gui/psppire-data-store.c:816 msgid "var" msgstr "" -#: src/ui/gui/psppire-data-store.c:931 src/ui/gui/psppire-var-store.c:710 +#: src/ui/gui/psppire-data-store.c:937 src/ui/gui/psppire-var-store.c:710 #, c-format msgid "%ld" msgstr "" diff --git a/po/en_GB.po b/po/en_GB.po index c54e45d4..cf34ac1e 100644 --- a/po/en_GB.po +++ b/po/en_GB.po @@ -7,7 +7,7 @@ msgid "" msgstr "" "Project-Id-Version: PSPP 0.4.3\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-09-15 09:11+0800\n" +"POT-Creation-Date: 2007-09-19 14:15+0800\n" "PO-Revision-Date: 2007-09-15 08:29+0800\n" "Last-Translator: John Darrington \n" "MIME-Version: 1.0\n" @@ -4761,16 +4761,11 @@ msgstr "" msgid "_Discrete missing values" msgstr "" -#: src/ui/gui/find-dialog.c:658 -#, c-format -msgid "Bad regular expression: %s" -msgstr "" - -#: src/ui/gui/helper.c:135 +#: src/ui/gui/helper.c:140 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" -#: src/ui/gui/helper.c:158 +#: src/ui/gui/helper.c:163 #, c-format msgid "Cannot open reference manual: %s" msgstr "" @@ -4862,11 +4857,11 @@ msgstr "" msgid "Paste" msgstr "" -#: src/ui/gui/psppire-data-store.c:810 +#: src/ui/gui/psppire-data-store.c:816 msgid "var" msgstr "" -#: src/ui/gui/psppire-data-store.c:931 src/ui/gui/psppire-var-store.c:710 +#: src/ui/gui/psppire-data-store.c:937 src/ui/gui/psppire-var-store.c:710 #, c-format msgid "%ld" msgstr "" diff --git a/po/pspp.pot b/po/pspp.pot index 0bc95c66..79baa253 100644 --- a/po/pspp.pot +++ b/po/pspp.pot @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: pspp-dev@gnu.org\n" -"POT-Creation-Date: 2007-09-15 09:11+0800\n" +"POT-Creation-Date: 2007-09-19 14:15+0800\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -4764,16 +4764,11 @@ msgstr "" msgid "_Discrete missing values" msgstr "" -#: src/ui/gui/find-dialog.c:658 -#, c-format -msgid "Bad regular expression: %s" -msgstr "" - -#: src/ui/gui/helper.c:135 +#: src/ui/gui/helper.c:140 msgid "Sorry. The help system hasn't yet been implemented." msgstr "" -#: src/ui/gui/helper.c:158 +#: src/ui/gui/helper.c:163 #, c-format msgid "Cannot open reference manual: %s" msgstr "" @@ -4865,11 +4860,11 @@ msgstr "" msgid "Paste" msgstr "" -#: src/ui/gui/psppire-data-store.c:810 +#: src/ui/gui/psppire-data-store.c:816 msgid "var" msgstr "" -#: src/ui/gui/psppire-data-store.c:931 src/ui/gui/psppire-var-store.c:710 +#: src/ui/gui/psppire-data-store.c:937 src/ui/gui/psppire-var-store.c:710 #, c-format msgid "%ld" msgstr "" diff --git a/src/data/procedure.c b/src/data/procedure.c index b237c68b..f280b682 100644 --- a/src/data/procedure.c +++ b/src/data/procedure.c @@ -56,13 +56,6 @@ struct dataset { struct trns_chain *temporary_trns_chain; struct dictionary *dict; - /* Callback which occurs when a procedure provides a new source for - the dataset */ - replace_source_callback *replace_source ; - - /* Callback which occurs whenever the DICT is replaced by a new one */ - replace_dictionary_callback *replace_dict; - /* Callback which occurs whenever the transformation chain(s) have been modified */ transformation_change_callback_func *xform_callback; @@ -341,7 +334,6 @@ proc_commit (struct dataset *ds) ds->discard_output = false; } ds->sink = NULL; - if ( ds->replace_source) ds->replace_source (ds->source); caseinit_clear (ds->caseinit); caseinit_mark_as_preinited (ds->caseinit, ds->dict); @@ -498,7 +490,6 @@ proc_cancel_temporary_transformations (struct dataset *ds) dict_destroy (ds->dict); ds->dict = ds->permanent_dict; ds->permanent_dict = NULL; - if (ds->replace_dict) ds->replace_dict (ds->dict); trns_chain_destroy (ds->temporary_trns_chain); ds->temporary_trns_chain = NULL; @@ -532,13 +523,11 @@ proc_cancel_all_transformations (struct dataset *ds) /* Initializes procedure handling. */ struct dataset * -create_dataset (transformation_change_callback_func *cb, void *aux) +create_dataset (void) { struct dataset *ds = xzalloc (sizeof(*ds)); ds->dict = dict_create (); ds->caseinit = caseinit_create (); - ds->xform_callback = cb; - ds->xform_callback_aux = aux; proc_cancel_all_transformations (ds); return ds; } @@ -589,7 +578,6 @@ proc_discard_active_file (struct dataset *ds) casereader_destroy (ds->source); ds->source = NULL; - if ( ds->replace_source) ds->replace_source (NULL); proc_cancel_all_transformations (ds); } @@ -608,7 +596,6 @@ proc_set_active_file (struct dataset *ds, dict_destroy (ds->dict); ds->dict = dict; - if ( ds->replace_dict) ds->replace_dict (dict); proc_set_active_file_data (ds, source); } @@ -620,7 +607,6 @@ proc_set_active_file_data (struct dataset *ds, struct casereader *reader) { casereader_destroy (ds->source); ds->source = reader; - if (ds->replace_source) ds->replace_source (reader); caseinit_clear (ds->caseinit); caseinit_mark_as_preinited (ds->caseinit, ds->dict); @@ -643,7 +629,6 @@ proc_extract_active_file_data (struct dataset *ds) { struct casereader *reader = ds->source; ds->source = NULL; - if (ds->replace_source) ds->replace_source (reader); return reader; } diff --git a/src/data/procedure.h b/src/data/procedure.h index 9ad36429..336725df 100644 --- a/src/data/procedure.h +++ b/src/data/procedure.h @@ -53,7 +53,8 @@ typedef void replace_dictionary_callback (struct dictionary *); typedef void transformation_change_callback_func (bool non_empty, void *aux); -struct dataset * create_dataset (transformation_change_callback_func *, void *); +struct dataset * create_dataset (void); + void destroy_dataset (struct dataset *); void dataset_add_transform_change_callback (struct dataset *, diff --git a/src/language/expressions/evaluate.c b/src/language/expressions/evaluate.c index 6e3315c3..10759b97 100644 --- a/src/language/expressions/evaluate.c +++ b/src/language/expressions/evaluate.c @@ -156,7 +156,7 @@ cmd_debug_evaluate (struct lexer *lexer, struct dataset *dsother UNUSED) if ( ds == NULL ) { - ds = create_dataset (NULL, NULL); + ds = create_dataset (); d = dataset_dict (ds); } diff --git a/src/ui/gui/psppire.c b/src/ui/gui/psppire.c index 739fb191..ff155d68 100644 --- a/src/ui/gui/psppire.c +++ b/src/ui/gui/psppire.c @@ -92,7 +92,7 @@ initialize (void) fn_getenv_default ("STAT_INCLUDE_PATH", include_path) ); - the_dataset = create_dataset (NULL, NULL); + the_dataset = create_dataset (); message_dialog_init (the_source_stream); diff --git a/src/ui/terminal/main.c b/src/ui/terminal/main.c index 9375ffc6..66fedf04 100644 --- a/src/ui/terminal/main.c +++ b/src/ui/terminal/main.c @@ -107,7 +107,7 @@ main (int argc, char **argv) settings_init (); random_init (); - the_dataset = create_dataset (NULL, NULL); + the_dataset = create_dataset (); if (parse_command_line (argc, argv, the_source_stream)) {