From 869d0d6a85aa1fda362c35276517c25498ffe086 Mon Sep 17 00:00:00 2001 From: Miles Bader Date: Fri, 14 Feb 1997 23:52:24 +0000 Subject: (parser_finalize, argp_version_parser): Call gettext in appropriate places. --- libshouldbeinlibc/argp-parse.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) (limited to 'libshouldbeinlibc') diff --git a/libshouldbeinlibc/argp-parse.c b/libshouldbeinlibc/argp-parse.c index a6e4edb3..66b86e66 100644 --- a/libshouldbeinlibc/argp-parse.c +++ b/libshouldbeinlibc/argp-parse.c @@ -28,6 +28,18 @@ #include #include +#ifndef _ +/* This is for other GNU distributions with internationalized messages. + When compiling libc, the _ macro is predefined. */ +#ifdef HAVE_LIBINTL_H +# include +# define _(msgid) gettext (msgid) +#else +# define _(msgid) (msgid) +# define gettext(msgid) (msgid) +#endif +#endif + #if _LIBC - 0 #include #else @@ -144,7 +156,7 @@ argp_version_parser (int key, char *arg, struct argp_state *state) else if (argp_program_version) fprintf (state->out_stream, "%s\n", argp_program_version); else - __argp_error (state, "No version known!?"); + __argp_error (state, gettext ("No version known!?")); if (! (state->flags & ARGP_NO_EXIT)) exit (0); break; @@ -596,7 +608,7 @@ parser_finalize (struct parser *parser, { if (!(parser->state.flags & ARGP_NO_ERRS) && parser->state.err_stream) fprintf (parser->state.err_stream, - "%s: Too many arguments\n", parser->state.name); + gettext ("%s: Too many arguments\n"), parser->state.name); err = EBADKEY; } -- cgit v1.2.3