/* Convert using charmaps and possibly iconv().
- Copyright (C) 2001-2016 Free Software Foundation, Inc.
+ Copyright (C) 2001-2024 Free Software Foundation, Inc.
This file is part of the GNU C Library.
- Contributed by Ulrich Drepper <drepper@redhat.com>, 2001.
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
- along with this program; if not, see <http://www.gnu.org/licenses/>. */
+ along with this program; if not, see <https://www.gnu.org/licenses/>. */
#include <assert.h>
#include <errno.h>
return (struct convtable *) xcalloc (1, sizeof (struct convtable));
}
+static inline void
+free_table (struct convtable *tbl)
+{
+ free (tbl);
+}
+
static inline int
is_term (struct convtable *tbl, unsigned int idx)
while (++remaining < argc);
/* All done. */
+ if (output != stdout)
+ fclose (output);
+ free_table (cvtbl);
return status;
}
ignoring errors. Otherwise punt. */
if (! omit_invalid)
{
- error (0, 0, _("illegal input sequence at position %Zd"), n);
+ error (0, 0, _("illegal input sequence at position %zd"), n);
return -1;
}