projects
/
pspp
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
26684c5
)
Rename section_value to occurrence.
author
Ben Pfaff
<bpfaff@vmware.com>
Thu, 24 Feb 2022 00:25:29 +0000
(16:25 -0800)
committer
Ben Pfaff
<bpfaff@vmware.com>
Thu, 24 Feb 2022 00:25:29 +0000
(16:25 -0800)
src/language/stats/ctables.c
patch
|
blob
|
history
diff --git
a/src/language/stats/ctables.c
b/src/language/stats/ctables.c
index bf3425b49e67c369dc0847fabae2e56ed706afef..05fb957439772a87d4ee66f02d7ba86592f49bc9 100644
(file)
--- a/
src/language/stats/ctables.c
+++ b/
src/language/stats/ctables.c
@@
-358,7
+358,7
@@
struct ctables_value
int leaf;
};
int leaf;
};
-struct ctables_
section_valu
e
+struct ctables_
occurrenc
e
{
struct hmap_node node;
union value value;
{
struct hmap_node node;
union value value;
@@
-2904,15
+2904,15
@@
ctables_add_occurrence (const struct variable *var,
int width = var_get_width (var);
unsigned int hash = value_hash (value, width, 0);
int width = var_get_width (var);
unsigned int hash = value_hash (value, width, 0);
- struct ctables_
section_value *sv
;
- HMAP_FOR_EACH_WITH_HASH (
sv, struct ctables_section_valu
e, node, hash,
+ struct ctables_
occurrence *o
;
+ HMAP_FOR_EACH_WITH_HASH (
o, struct ctables_occurrenc
e, node, hash,
occurrences)
occurrences)
- if (value_equal (value, &
sv
->value, width))
+ if (value_equal (value, &
o
->value, width))
return;
return;
-
sv = xmalloc (sizeof *sv
);
- value_clone (&
sv
->value, value, width);
- hmap_insert (occurrences, &
sv
->node, hash);
+
o = xmalloc (sizeof *o
);
+ value_clone (&
o
->value, value, width);
+ hmap_insert (occurrences, &
o
->node, hash);
}
static void
}
static void
@@
-3952,12
+3952,12
@@
ctables_section_recurse_add_empty_categories (
var_get_dict_index (var)];
int width = var_get_width (var);
const struct hmap *occurrences = &s->occurrences[a][a_idx];
var_get_dict_index (var)];
int width = var_get_width (var);
const struct hmap *occurrences = &s->occurrences[a][a_idx];
- const struct ctables_
section_value *sv
;
- HMAP_FOR_EACH (
sv, struct ctables_section_valu
e, node, occurrences)
+ const struct ctables_
occurrence *o
;
+ HMAP_FOR_EACH (
o, struct ctables_occurrenc
e, node, occurrences)
{
union value *value = case_data_rw (c, var);
value_destroy (value, width);
{
union value *value = case_data_rw (c, var);
value_destroy (value, width);
- value_clone (value, &
sv
->value, width);
+ value_clone (value, &
o
->value, width);
cats[a][a_idx] = ctables_categories_match (categories, value, var);
assert (cats[a][a_idx] != NULL);
ctables_section_recurse_add_empty_categories (s, cats, c, a, a_idx + 1);
cats[a][a_idx] = ctables_categories_match (categories, value, var);
assert (cats[a][a_idx] != NULL);
ctables_section_recurse_add_empty_categories (s, cats, c, a, a_idx + 1);