projects
/
pspp
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
CROSSTABS: Initialize hash tables for every split, not just once overall.
[pspp]
/
src
/
language
/
stats
/
crosstabs.q
diff --git
a/src/language/stats/crosstabs.q
b/src/language/stats/crosstabs.q
index bb4acafa62c6cd279bb7622dc4ff18206bd415e3..fcc8dd12c67a2374735625fc421fa6ef07a0451f 100644
(file)
--- a/
src/language/stats/crosstabs.q
+++ b/
src/language/stats/crosstabs.q
@@
-1,5
+1,5
@@
/* PSPP - a program for statistical analysis.
/* PSPP - a program for statistical analysis.
- Copyright (C) 1997-9, 2000, 2006, 2009 Free Software Foundation, Inc.
+ Copyright (C) 1997-9, 2000, 2006, 2009
, 2010
Free Software Foundation, Inc.
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
@@
-345,6
+345,10
@@
internal_cmd_crosstabs (struct lexer *lexer, struct dataset *ds,
case_unref (c);
}
case_unref (c);
}
+ /* Initialize hash tables. */
+ for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++)
+ hmap_init (&pt->data);
+
/* Tabulate. */
for (; (c = casereader_read (group)) != NULL; case_unref (c))
for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++)
/* Tabulate. */
for (; (c = casereader_read (group)) != NULL; case_unref (c))
for (pt = &proc->pivots[0]; pt < &proc->pivots[proc->n_pivots]; pt++)
@@
-444,9
+448,6
@@
crs_custom_tables (struct lexer *lexer, struct dataset *ds,
pt->n_consts = 0;
pt->const_vars = NULL;
pt->const_values = NULL;
pt->n_consts = 0;
pt->const_vars = NULL;
pt->const_values = NULL;
- hmap_init (&pt->data);
- pt->entries = NULL;
- pt->n_entries = 0;
for (j = 0; j < n_by; j++)
pt->vars[j] = by[j][by_iter[j]];
for (j = 0; j < n_by; j++)
pt->vars[j] = by[j][by_iter[j]];