-/* Copyright (C) 1996-2002, 2003 Free Software Foundation, Inc.
+/* Copyright (C) 1996-2018 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@redhat.com>, 1996.
- The GNU C Library is free software; you can redistribute it and/or
- modify it under the terms of the GNU Lesser General Public
- License as published by the Free Software Foundation; either
- version 2.1 of the License, or (at your option) any later version.
+ 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 the Free Software Foundation; version 2 of the License, or
+ (at your option) any later version.
- The GNU C Library is distributed in the hope that it will be useful,
+ This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- Lesser General Public License for more details.
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
- You should have received a copy of the GNU Lesser General Public
- License along with the GNU C Library; if not, write to the Free
- Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
- 02111-1307 USA. */
+ You should have received a copy of the GNU General Public License
+ along with this program; if not, see <http://www.gnu.org/licenses/>. */
#ifdef HAVE_CONFIG_H
-# include <config.h>
+# include "config.h"
#endif
#include <argp.h>
/* Wrapper functions with error checking for standard functions. */
-extern void *xmalloc (size_t n);
-extern void *xcalloc (size_t n, size_t s);
-extern void *xrealloc (void *o, size_t n);
-extern char *xstrdup (const char *);
+#include <programs/xmalloc.h>
/* Prototypes for local functions. */
static void error_print (void);
static char *
more_help (int key, const char *text, void *input)
{
+ char *tp = NULL;
switch (key)
{
case ARGP_KEY_HELP_EXTRA:
/* We print some extra information. */
- return strdup (gettext ("\
-Report bugs using the `glibcbug' script to <bugs@gnu.org>.\n"));
+ if (asprintf (&tp, gettext ("\
+For bug reporting instructions, please see:\n\
+%s.\n"), REPORT_BUGS_TO) < 0)
+ return NULL;
+ return tp;
default:
break;
}
static void
print_version (FILE *stream, struct argp_state *state)
{
- fprintf (stream, "gencat (GNU %s) %s\n", PACKAGE, VERSION);
+ fprintf (stream, "gencat %s%s\n", PKGVERSION, VERSION);
fprintf (stream, gettext ("\
Copyright (C) %s Free Software Foundation, Inc.\n\
This is free software; see the source for copying conditions. There is NO\n\
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n\
-"), "2003");
+"), "2017");
fprintf (stream, gettext ("Written by %s.\n"), "Ulrich Drepper");
}
/* The address of this function will be assigned to the hook in the
error functions. */
static void
-error_print ()
+error_print (void)
{
/* We don't want the program name to be printed in messages. Emacs'
compile.el does not like this. */
continued = !continued;
}
while (temp_act_len > 0 && buf[temp_act_len - 1] == '\\');
- }
- if (continued)
- --act_len;
+ if (continued)
+ --act_len;
+ }
}
/* Append to currently selected line. */
else if (strncmp (&this_line[1], "delset", 6) == 0)
{
int cnt = sizeof ("delset");
- size_t set_number;
while (isspace (this_line[cnt]))
++cnt;
++cnt;
if (cnt == start)
- {
- error_at_line (0, 0, fname, start_line,
- gettext ("illegal set number"));
- set_number = 0;
- }
+ error_at_line (0, 0, fname, start_line,
+ gettext ("illegal set number"));
else
{
const char *symbol;
/* We have a symbolic set name. This name must
appear somewhere else in the catalogs read so
far. */
- set_number = 0;
for (runp = current->all_sets; runp != NULL;
runp = runp->next)
{
else if (ident[0] != '\0')
{
struct message_list *runp;
- struct message_list *lastp;
/* Test whether the symbolic name was not used for
another message in this message set. */
runp = current->current_set->messages;
- lastp = NULL;
while (runp != NULL)
if (runp->symbol != NULL && strcmp (ident, runp->symbol) == 0)
break;