[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src ChangeLog procedure.c
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src ChangeLog procedure.c |
Date: |
Thu, 27 Apr 2006 02:51:13 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Branch:
Changes by: Ben Pfaff <address@hidden> 06/04/27 02:51:13
Modified files:
src : ChangeLog procedure.c
Log message:
Continue reforming procedure execution. In this phase, assert that
add_transformation() is not called during procedure execution. Thanks
to John Darrington for the suggestion.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/ChangeLog.diff?tr1=1.281&tr2=1.282&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/procedure.c.diff?tr1=1.9&tr2=1.10&r1=text&r2=text
Patches:
Index: pspp/src/ChangeLog
diff -u pspp/src/ChangeLog:1.281 pspp/src/ChangeLog:1.282
--- pspp/src/ChangeLog:1.281 Thu Apr 27 02:42:01 2006
+++ pspp/src/ChangeLog Thu Apr 27 02:51:12 2006
@@ -1,3 +1,18 @@
+Wed Apr 26 19:48:52 2006 Ben Pfaff <address@hidden>
+
+ Continue reforming procedure execution. In this phase, assert
+ that add_transformation() is not called during procedure
+ execution. Thanks to John Darrington for the suggestion.
+
+ * procedure.c: (static var in_procedure) New var.
+ (internal_procedure) Get rid of recursive_call local var and
+ logic.
+ (open_active_file) Set in_procedure and make sure it wasn't
+ already set.
+ (close_active_file) Reset in_procedure and make sure it was
+ already set.
+ (add_transformation) Make sure we're not in a procedure.
+
Wed Apr 26 19:33:52 2006 Ben Pfaff <address@hidden>
Continue reforming procedure execution. In this phase, break
Index: pspp/src/procedure.c
diff -u pspp/src/procedure.c:1.9 pspp/src/procedure.c:1.10
--- pspp/src/procedure.c:1.9 Thu Apr 27 02:45:18 2006
+++ pspp/src/procedure.c Thu Apr 27 02:51:13 2006
@@ -85,6 +85,10 @@
/* Time at which vfm was last invoked. */
static time_t last_vfm_invocation;
+/* Whether we're inside a procedure.
+ For debugging purposes only. */
+static bool in_procedure;
+
/* Lag queue. */
int n_lag; /* Number of cases to lag. */
static int lag_count; /* Number of cases in lag_queue so far. */
@@ -178,12 +182,9 @@
static bool
internal_procedure (bool (*proc_func) (struct ccase *, void *), void *aux)
{
- static int recursive_call;
struct write_case_data wc_data;
bool ok;
- assert (++recursive_call == 1);
-
wc_data.proc_func = proc_func;
wc_data.aux = aux;
create_trns_case (&wc_data.trns_case, default_dict);
@@ -200,8 +201,6 @@
case_destroy (&wc_data.sink_case);
case_destroy (&wc_data.trns_case);
- assert (--recursive_call == 0);
-
return ok;
}
@@ -239,6 +238,9 @@
static void
open_active_file (void)
{
+ assert (!in_procedure);
+ in_procedure = true;
+
/* Make temp_dict refer to the dictionary right before data
reaches the sink */
if (!temporary)
@@ -483,6 +485,10 @@
process_if_expr = NULL;
dict_set_case_limit (default_dict, 0);
dict_clear_vectors (default_dict);
+
+ assert (in_procedure);
+ in_procedure = false;
+
return cancel_transformations ();
}
@@ -511,6 +517,9 @@
add_transformation (trns_proc_func *proc, trns_free_func *free, void *private)
{
struct transformation *trns;
+
+ assert (!in_procedure);
+
if (n_trns >= m_trns)
t_trns = x2nrealloc (t_trns, &m_trns, sizeof *t_trns);
trns = &t_trns[n_trns++];
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src ChangeLog procedure.c,
Ben Pfaff <=