X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=src%2Fautorecode.c;h=27fe0db2ded776f463442aa0fe8c6eaaf235409d;hb=1f8a2f2be1bdfcbc0c85319da83c46d2e142e32b;hp=488361dd17c85b23eff3f9d94ef345e9d572715a;hpb=3a7fba81ceae5b049d0f7d671e9e3c3c43bbf703;p=pspp diff --git a/src/autorecode.c b/src/autorecode.c index 488361dd17..27fe0db2de 100644 --- a/src/autorecode.c +++ b/src/autorecode.c @@ -74,9 +74,9 @@ static struct pool *hash_pool; static int descend; static int print; -static int autorecode_trns_proc (struct trns_header *, struct ccase *); -static void autorecode_trns_free (struct trns_header *); -static int autorecode_proc_func (struct ccase *); +static trns_proc_func autorecode_trns_proc; +static trns_free_func autorecode_trns_free; +static int autorecode_proc_func (struct ccase *, void *); static hsh_compare_func compare_alpha_value, compare_numeric_value; static hsh_hash_func hash_alpha_value, hash_numeric_value; static void recode (void); @@ -153,12 +153,12 @@ cmd_autorecode (void) h_trans[i] = hsh_create (10, compare_numeric_value, hash_numeric_value, NULL, NULL); - procedure (NULL, autorecode_proc_func, NULL); + procedure (NULL, autorecode_proc_func, NULL, NULL); for (i = 0; i < nv_dest; i++) { - v_dest[i] = dict_create_var (default_dict, n_dest[i], 0); - assert (v_dest[i] != NULL); + v_dest[i] = dict_create_var_assert (default_dict, n_dest[i], 0); + v_dest[i]->init = 0; free (n_dest[i]); } free (n_dest); @@ -235,7 +235,8 @@ recode (void) } static int -autorecode_trns_proc (struct trns_header * trns, struct ccase * c) +autorecode_trns_proc (struct trns_header * trns, struct ccase * c, + int case_num UNUSED) { struct autorecode_trns *t = (struct autorecode_trns *) trns; int i; @@ -292,7 +293,7 @@ hash_alpha_value (const void *a_, void *v_) } static int -compare_numeric_value (const void *a_, const void *b_, void *foo unused) +compare_numeric_value (const void *a_, const void *b_, void *foo UNUSED) { const union value *a = a_; const union value *b = b_; @@ -301,7 +302,7 @@ compare_numeric_value (const void *a_, const void *b_, void *foo unused) } static unsigned -hash_numeric_value (const void *a_, void *foo unused) +hash_numeric_value (const void *a_, void *foo UNUSED) { const union value *a = a_; @@ -309,7 +310,7 @@ hash_numeric_value (const void *a_, void *foo unused) } static int -autorecode_proc_func (struct ccase * c) +autorecode_proc_func (struct ccase *c, void *aux UNUSED) { int i;