Adopt use of gnulib for portability.
[pspp-builds.git] / src / autorecode.c
index a28b13bdcac0e8c3cd2a6257f4019de448324a6f..1f0fd8a3d6943581c3a91b56d619cf609b0b53a5 100644 (file)
@@ -14,8 +14,8 @@
 
    You should have received a copy of the GNU General Public License
    along with this program; if not, write to the Free Software
-   Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
-   02111-1307, USA. */
+   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA
+   02110-1301, USA. */
 
 #include <config.h>
 #include "error.h"
@@ -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;