From: Bruno Haible Date: Tue, 5 Nov 2002 16:00:40 +0000 (+0000) Subject: Use gettext.h. X-Git-Tag: v0.12~1228 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b5908a3eb0708251c11388a7b0b3cffe53d87d34;p=thirdparty%2Fgettext.git Use gettext.h. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 505da9236..5b3b72929 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,10 @@ +2002-11-05 Bruno Haible + + * argmatch.c: Include gettext.h instead of . + * error.c [!_LIBC]: Include gettext.h instead of . + * getopt.c [!_LIBC]: Include gettext.h instead of . + * obstack.c [!_LIBC]: Include gettext.h instead of . + 2002-11-04 Bruno Haible * getopt.c: Don't test HAVE_LIBINTL_H. diff --git a/lib/argmatch.c b/lib/argmatch.c index f6ff44f09..79607ec4c 100644 --- a/lib/argmatch.c +++ b/lib/argmatch.c @@ -1,5 +1,5 @@ /* argmatch.c -- find a match for a string in an array - Copyright (C) 1990, 1998, 1999, 2001 Free Software Foundation, Inc. + Copyright (C) 1990, 1998, 1999, 2001, 2002 Free Software Foundation, Inc. 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 @@ -27,12 +27,8 @@ #include -#if ENABLE_NLS -# include -# define _(Text) gettext (Text) -#else -# define _(Text) Text -#endif +#include "gettext.h" +#define _(msgid) gettext (msgid) #include "error.h" #include "exit.h" diff --git a/lib/error.c b/lib/error.c index 64504afa5..1e899ed06 100644 --- a/lib/error.c +++ b/lib/error.c @@ -51,16 +51,12 @@ void exit (); #include "error.h" -#ifndef _ -# if ENABLE_NLS || defined _LIBC -# include -# ifndef _ -# define _(Str) gettext (Str) -# endif -# else -# define _(Str) (Str) -# endif +#ifdef _LIBC +# include +#else +# include "gettext.h" #endif +#define _(msgid) gettext (msgid) /* If NULL, error will flush stdout, then print on stderr the program name, a colon and a space. Otherwise, error will call this diff --git a/lib/getopt.c b/lib/getopt.c index 98dba583a..9917d9a64 100644 --- a/lib/getopt.c +++ b/lib/getopt.c @@ -76,19 +76,16 @@ # endif #endif -#ifndef _ +#ifdef _LIBC +# include +#else /* This is for other GNU distributions with internationalized messages. */ -# if ENABLE_NLS || defined _LIBC -# include -# ifndef _ -# define _(msgid) gettext (msgid) -# endif -# else -# define _(msgid) (msgid) -# endif -# if defined _LIBC && defined USE_IN_LIBIO -# include -# endif +# include "gettext.h" +#endif +#define _(msgid) gettext (msgid) + +#if defined _LIBC && defined USE_IN_LIBIO +# include #endif #ifndef attribute_hidden diff --git a/lib/obstack.c b/lib/obstack.c index 243d8f3c5..bf00cefd2 100644 --- a/lib/obstack.c +++ b/lib/obstack.c @@ -1,5 +1,5 @@ /* obstack.c - subroutines used implicitly by object stack macros - Copyright (C) 1988,89,90,91,92,93,94,96,97 Free Software Foundation, Inc. + Copyright (C) 1988-1994, 1996-1997, 2002 Free Software Foundation, Inc. NOTE: The canonical source of this file is maintained with the GNU C Library. @@ -457,16 +457,12 @@ _obstack_memory_used (h) } /* Define the error handler. */ -#ifndef _ -# if ENABLE_NLS || defined _LIBC -# include -# ifndef _ -# define _(Str) gettext (Str) -# endif -# else -# define _(Str) (Str) -# endif +#ifdef _LIBC +# include +#else +# include "gettext.h" #endif +#define _(msgid) gettext (msgid) static void print_and_abort ()