Adopt use of gnulib for portability.
[pspp-builds.git] / src / autorecode.c
index a7f4febcb7033fcefb1edeb48d78ed96c0bec676..1f0fd8a3d6943581c3a91b56d619cf609b0b53a5 100644 (file)
@@ -32,6 +32,9 @@
 #include "var.h"
 #include "vfm.h"
 
+#include "gettext.h"
+#define _(msgid) gettext (msgid)
+
 /* FIXME: Implement PRINT subcommand. */
 
 /* Explains how to recode one value.  `from' must be first element.  */
@@ -151,7 +154,7 @@ cmd_autorecode (void)
          goto lossage;
        }
       for (j = 0; j < i; j++)
-       if (!strcmp (arc.dst_names[i], arc.dst_names[j]))
+       if (!strcasecmp (arc.dst_names[i], arc.dst_names[j]))
          {
            msg (SE, _("Duplicate variable name %s among target variables."),
                 arc.dst_names[i]);
@@ -232,7 +235,7 @@ recode (const struct autorecode_pgm *arc)
   for (i = 0; i < arc->var_cnt; i++)
     {
       struct arc_spec *spec = &t->specs[i];
-      void **p = hsh_sort (arc->src_values[i]);
+      void *const *p = hsh_sort (arc->src_values[i]);
       int count = hsh_count (arc->src_values[i]);
       int j;