[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Pspp-cvs] pspp/src procedure.c data/ChangeLog data/dictio...
From: |
Ben Pfaff |
Subject: |
[Pspp-cvs] pspp/src procedure.c data/ChangeLog data/dictio... |
Date: |
Wed, 26 Apr 2006 22:00:29 +0000 |
CVSROOT: /cvsroot/pspp
Module name: pspp
Branch:
Changes by: Ben Pfaff <address@hidden> 06/04/26 22:00:29
Modified files:
src : procedure.c
src/data : ChangeLog dictionary.c variable.h
src/language/data-io: data-list.c
src/language/dictionary: numeric.c
src/language/stats: aggregate.c autorecode.c descriptives.c
Log message:
Remove `init' member from struct variable, which was essentially
unused.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/procedure.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/ChangeLog.diff?tr1=1.20&tr2=1.21&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/dictionary.c.diff?tr1=1.5&tr2=1.6&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/data/variable.h.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/data-io/data-list.c.diff?tr1=1.10&tr2=1.11&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/dictionary/numeric.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/stats/aggregate.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/stats/autorecode.c.diff?tr1=1.3&tr2=1.4&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/pspp/pspp/src/language/stats/descriptives.c.diff?tr1=1.4&tr2=1.5&r1=text&r2=text
Patches:
Index: pspp/src/data/ChangeLog
diff -u pspp/src/data/ChangeLog:1.20 pspp/src/data/ChangeLog:1.21
--- pspp/src/data/ChangeLog:1.20 Mon Apr 24 05:10:00 2006
+++ pspp/src/data/ChangeLog Wed Apr 26 22:00:29 2006
@@ -1,3 +1,11 @@
+Wed Apr 26 14:55:19 2006 Ben Pfaff <address@hidden>
+
+ * variable.h: (struct variable) Remove `init' member and all
+ references to it from other files. It was initialized in several
+ places, but nothing really ever used it for anything worthwhile.
+ Thanks to Jason Stover for pointing out how confusing this
+ member is.
+
Sun Apr 23 22:04:45 2006 Ben Pfaff <address@hidden>
Continue reforming error message support. In this phase, get rid
Index: pspp/src/data/dictionary.c
diff -u pspp/src/data/dictionary.c:1.5 pspp/src/data/dictionary.c:1.6
--- pspp/src/data/dictionary.c:1.5 Fri Mar 17 04:58:25 2006
+++ pspp/src/data/dictionary.c Wed Apr 26 22:00:29 2006
@@ -282,7 +282,6 @@
v->width = width;
v->fv = d->next_value_idx;
v->nv = width == 0 ? 1 : DIV_RND_UP (width, 8);
- v->init = 1;
v->reinit = dict_class_from_id (v->name) != DC_SCRATCH;
v->index = d->var_cnt;
mv_init (&v->miss, width);
@@ -359,7 +358,6 @@
short_name[] is intentionally not copied, because there is
no reason to give a new variable with potentially a new name
the same short name. */
- nv->init = 1;
nv->reinit = ov->reinit;
mv_copy (&nv->miss, &ov->miss);
nv->print = ov->print;
Index: pspp/src/data/variable.h
diff -u pspp/src/data/variable.h:1.4 pspp/src/data/variable.h:1.5
--- pspp/src/data/variable.h:1.4 Sun Apr 16 02:55:39 2006
+++ pspp/src/data/variable.h Wed Apr 26 22:00:29 2006
@@ -64,7 +64,6 @@
/* Case information. */
int fv, nv; /* Index into `value's, number of
values. */
- bool init; /* True if needs init and possibly reinit. */
bool reinit; /* True: reinitialize; false: leave. */
/* Data for use by containing dictionary. */
Index: pspp/src/language/data-io/data-list.c
diff -u pspp/src/language/data-io/data-list.c:1.10
pspp/src/language/data-io/data-list.c:1.11
--- pspp/src/language/data-io/data-list.c:1.10 Wed Apr 26 20:54:08 2006
+++ pspp/src/language/data-io/data-list.c Wed Apr 26 22:00:29 2006
@@ -545,8 +545,6 @@
{
convert_fmt_ItoO (&input, &v->print);
v->write = v->print;
- if (!in_input_program () && !in_file_type ())
- v->init = 0;
}
else
{
@@ -653,9 +651,6 @@
return 0;
}
- if (!in_input_program () && !in_file_type ())
- v->init = 0;
-
spec = xmalloc (sizeof *spec);
spec->v = v;
spec->input = f->f;
@@ -862,9 +857,6 @@
}
v->print = v->write = output;
- if (!in_input_program () && !in_file_type ())
- v->init = 0;
-
spec = xmalloc (sizeof *spec);
spec->input = input;
spec->v = v;
Index: pspp/src/language/dictionary/numeric.c
diff -u pspp/src/language/dictionary/numeric.c:1.4
pspp/src/language/dictionary/numeric.c:1.5
--- pspp/src/language/dictionary/numeric.c:1.4 Wed Apr 26 20:54:08 2006
+++ pspp/src/language/dictionary/numeric.c Wed Apr 26 22:00:29 2006
@@ -196,7 +196,6 @@
if (!v[i]->reinit)
continue;
v[i]->reinit = 0;
- v[i]->init = 1;
}
free (v);
Index: pspp/src/language/stats/aggregate.c
diff -u pspp/src/language/stats/aggregate.c:1.3
pspp/src/language/stats/aggregate.c:1.4
--- pspp/src/language/stats/aggregate.c:1.3 Sun Apr 16 01:05:15 2006
+++ pspp/src/language/stats/aggregate.c Wed Apr 26 22:00:29 2006
@@ -591,7 +591,6 @@
}
free (dest[i]);
- destvar->init = 0;
if (dest_label[i])
{
destvar->label = dest_label[i];
Index: pspp/src/language/stats/autorecode.c
diff -u pspp/src/language/stats/autorecode.c:1.3
pspp/src/language/stats/autorecode.c:1.4
--- pspp/src/language/stats/autorecode.c:1.3 Wed Mar 15 03:29:11 2006
+++ pspp/src/language/stats/autorecode.c Wed Apr 26 22:00:29 2006
@@ -178,11 +178,8 @@
ok = procedure (autorecode_proc_func, &arc);
for (i = 0; i < arc.var_cnt; i++)
- {
- arc.dst_vars[i] = dict_create_var_assert (default_dict,
- arc.dst_names[i], 0);
- arc.dst_vars[i]->init = 0;
- }
+ arc.dst_vars[i] = dict_create_var_assert (default_dict,
+ arc.dst_names[i], 0);
recode (&arc);
arc_free (&arc);
Index: pspp/src/language/stats/descriptives.c
diff -u pspp/src/language/stats/descriptives.c:1.4
pspp/src/language/stats/descriptives.c:1.5
--- pspp/src/language/stats/descriptives.c:1.4 Mon Apr 3 20:07:54 2006
+++ pspp/src/language/stats/descriptives.c Wed Apr 26 22:00:29 2006
@@ -661,7 +661,6 @@
struct variable *dst_var;
dst_var = dict_create_var_assert (default_dict, dv->z_name, 0);
- dst_var->init = 0;
if (dv->v->label)
{
dst_var->label = xmalloc (strlen (dv->v->label) + 12);
Index: pspp/src/procedure.c
diff -u pspp/src/procedure.c:1.5 pspp/src/procedure.c:1.6
--- pspp/src/procedure.c:1.5 Wed Apr 26 20:54:08 2006
+++ pspp/src/procedure.c Wed Apr 26 22:00:29 2006
@@ -421,7 +421,7 @@
for (i = 0; i < var_cnt; i++)
{
struct variable *v = dict_get_var (default_dict, i);
- if (v->init && v->reinit)
+ if (v->reinit)
{
if (v->type == NUMERIC)
case_data_rw (c, v->fv)->f = SYSMIS;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Pspp-cvs] pspp/src procedure.c data/ChangeLog data/dictio...,
Ben Pfaff <=