AUTORECODE: Fix indentation.
[pspp] / src / language / stats / autorecode.c
index de9416821c15bf5fa8c37d5e9a241d7a647fd804..194f9ca6bb2340ca46f9e91e64ae2ff48a35cec9 100644 (file)
@@ -1,5 +1,5 @@
 /* PSPP - a program for statistical analysis.
-   Copyright (C) 1997-9, 2000, 2009 Free Software Foundation, Inc.
+   Copyright (C) 1997-9, 2000, 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
@@ -121,8 +121,7 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds)
   lex_match_id (lexer, "VARIABLES");
   lex_match (lexer, '=');
   if (!parse_variables_const (lexer, dataset_dict (ds), &arc.src_vars,
-                             &arc.var_cnt,
-                        PV_NO_DUPLICATE))
+                             &arc.var_cnt, PV_NO_DUPLICATE))
     goto lossage;
   if (!lex_force_match_id (lexer, "INTO"))
     goto lossage;
@@ -179,14 +178,14 @@ cmd_autorecode (struct lexer *lexer, struct dataset *ds)
   arc.src_values = xnmalloc (arc.var_cnt, sizeof *arc.src_values);
   for (i = 0; i < dst_cnt; i++)
     {
-       /* FIXME: consolodate this hsh_create */
-    if (var_is_alpha (arc.src_vars[i]))
-      arc.src_values[i] = hsh_create (10, compare_alpha_value,
-                                      hash_alpha_value, NULL, arc.src_vars[i]);
-    else
-      arc.src_values[i] = hsh_create (10, compare_numeric_value,
-                                      hash_numeric_value, NULL, NULL);
-   }
+      /* FIXME: consolodate this hsh_create */
+      if (var_is_alpha (arc.src_vars[i]))
+        arc.src_values[i] = hsh_create (10, compare_alpha_value,
+                                        hash_alpha_value, NULL, arc.src_vars[i]);
+      else
+        arc.src_values[i] = hsh_create (10, compare_numeric_value,
+                                        hash_numeric_value, NULL, NULL);
+    }
 
   input = proc_open (ds);
   for (; (c = casereader_read (input)) != NULL; case_unref (c))
@@ -355,7 +354,7 @@ hash_alpha_value (const void *a_, const void *v_)
   const union arc_value *a = a_;
   const struct variable *v = v_;
 
-  return hsh_hash_bytes (a->c, var_get_width (v));
+  return hash_bytes (a->c, var_get_width (v), 0);
 }
 
 static int
@@ -372,5 +371,5 @@ hash_numeric_value (const void *a_, const void *aux UNUSED)
 {
   const union arc_value *a = a_;
 
-  return hsh_hash_double (a->f);
+  return hash_double (a->f, 0);
 }