From 2769926e6e7cac7d7020bd38be90ff2fd4cbb602 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 21 Jan 2001 16:12:24 +0000 Subject: Assume , , , exist. --- src/ChangeLog | 18 ++++++++++++++++++ src/dir-list.c | 6 ++---- src/gettextp.c | 14 +++----------- src/message.c | 9 ++------- src/msgcmp.c | 12 +++--------- src/msgcomm.c | 11 +++-------- src/msgfmt.c | 10 ++-------- src/msgmerge.c | 19 ++++--------------- src/msgunfmt.c | 10 ++-------- src/open-po.c | 14 +++----------- src/po.c | 7 ++----- src/setlocale.c | 33 ++++----------------------------- src/str-list.h | 9 ++------- src/xget-lex.c | 5 +---- src/xgettext.c | 10 ++-------- 15 files changed, 53 insertions(+), 134 deletions(-) (limited to 'src') diff --git a/src/ChangeLog b/src/ChangeLog index 5272f63..e761eca 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,21 @@ +2001-01-07 Bruno Haible + + Assume , , , exist. + * dir-list.c: Likewise. + * gettextp.c: Likewise. + * message.c: Likewise. + * msgcmp.c: Likewise. + * msgcomm.c: Likewise. + * msgfmt.c: Likewise. + * msgmerge.c: Likewise. + * msgunfmt.c: Likewise. + * open-po.c: Likewise. + * po.c: Likewise. + * setlocale.c: Likewise. + * str-list.h: Likewise. + * xget-lex.c: Likewise. + * xgettext.c: Likewise. + 2001-01-06 Bruno Haible * Makefile.am (datadir): Assume DATADIRNAME = share. diff --git a/src/dir-list.c b/src/dir-list.c index 9173bb5..f1e5fe4 100644 --- a/src/dir-list.c +++ b/src/dir-list.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1996, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1996, 1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller @@ -22,9 +22,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include "config.h" #endif -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "system.h" #include "dir-list.h" diff --git a/src/gettextp.c b/src/gettextp.c index 6b6d107..e747567 100644 --- a/src/gettextp.c +++ b/src/gettextp.c @@ -1,5 +1,5 @@ /* gettext - retrieve text string from message catalog and print it. - Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , May 1995. This program is free software; you can redistribute it and/or modify @@ -22,16 +22,8 @@ #include #include - -#ifdef HAVE_STDLIB_H -# include -#else -char *getenv (); -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif +#include +#include #include "error.h" #include "system.h" diff --git a/src/message.c b/src/message.c index 5749a6e..4d52742 100644 --- a/src/message.c +++ b/src/message.c @@ -29,13 +29,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ # include #endif -#ifdef HAVE_LOCALE_H -# include -#endif - -#ifdef STDC_HEADERS -# include -#endif +#include +#include #include "fstrcmp.h" #include "message.h" diff --git a/src/msgcmp.c b/src/msgcmp.c index 059849e..9be13bb 100644 --- a/src/msgcmp.c +++ b/src/msgcmp.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller This program is free software; you can redistribute it and/or modify @@ -22,14 +22,8 @@ #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif +#include +#include #include "dir-list.h" #include "error.h" diff --git a/src/msgcomm.c b/src/msgcomm.c index 95d7c88..8dcc4e2 100644 --- a/src/msgcomm.c +++ b/src/msgcomm.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1997-1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller @@ -25,18 +25,13 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif +#include #ifdef HAVE_LIMITS_H # include #endif -#ifdef HAVE_LOCALE_H -# include -#endif +#include #ifdef HAVE_UNISTD_H # include diff --git a/src/msgfmt.c b/src/msgfmt.c index 97a76b8..46ace8e 100644 --- a/src/msgfmt.c +++ b/src/msgfmt.c @@ -26,14 +26,8 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif +#include +#include #include "hash.h" diff --git a/src/msgmerge.c b/src/msgmerge.c index 4f38857..1732c18 100644 --- a/src/msgmerge.c +++ b/src/msgmerge.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1996, 1997, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller This program is free software; you can redistribute it and/or modify @@ -23,20 +23,9 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#if HAVE_STRING_H -# include -#else -# include -#endif - -#if HAVE_LOCALE_H -# include -#endif +#include +#include +#include #include "dir-list.h" #include "error.h" diff --git a/src/msgunfmt.c b/src/msgunfmt.c index 48f41a5..6842a08 100644 --- a/src/msgunfmt.c +++ b/src/msgunfmt.c @@ -26,14 +26,8 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif +#include +#include #include "hash.h" diff --git a/src/open-po.c b/src/open-po.c index 1954b02..0bf4379 100644 --- a/src/open-po.c +++ b/src/open-po.c @@ -1,5 +1,5 @@ /* open-po - search for .po file along search path list and open for reading - Copyright (C) 1995, 1996, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 2000, 2001 Free Software Foundation, Inc. Written by Ulrich Drepper , April 1995. This program is free software; you can redistribute it and/or modify @@ -23,16 +23,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#ifdef HAVE_STRING_H -# include -#else -# include -#endif +#include +#include #include "open-po.h" #include "dir-list.h" diff --git a/src/po.c b/src/po.c index a74fda9..0e1ab86 100644 --- a/src/po.c +++ b/src/po.c @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1996, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995-1996, 1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller @@ -24,10 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include #include - -#ifdef HAVE_STDLIB_H -# include -#endif +#include #include "po.h" #include "po-hash.h" diff --git a/src/setlocale.c b/src/setlocale.c index eed05a1..71d2637 100644 --- a/src/setlocale.c +++ b/src/setlocale.c @@ -19,22 +19,9 @@ # include #endif -#ifdef HAVE_STDLIB_H -# include -#else -# ifdef HAVE_MALLOC_H -# include -# endif -extern char *getenv (); -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif - -#ifdef HAVE_STRING_H -# include -#endif +#include +#include +#include /* Return string representation of locale CATEGORY. */ static const char * @@ -103,10 +90,8 @@ setlocale (category, locale) int category; SETLOCALE_CONST char *locale; { - char *retval; static char C_string[] = "C"; static char *current_locale = C_string; -#ifdef HAVE_LOCALE_H struct list { int category; @@ -115,6 +100,7 @@ setlocale (category, locale) }; static struct list *facets = NULL; struct list *facetp; + char *retval; if (locale != NULL) { @@ -162,17 +148,6 @@ setlocale (category, locale) retval = facetp->current_locale; break; } -#else - if (locale != NULL) - { - if (current_locale != C_string) - free (current_locale); - current_locale = (char *) malloc (strlen (locale) + 1); - strcpy (current_locale, locale); - } - - retval = current_locale; -#endif if (retval[0] == '\0') { diff --git a/src/str-list.h b/src/str-list.h index cecee48..def4f52 100644 --- a/src/str-list.h +++ b/src/str-list.h @@ -1,5 +1,5 @@ /* GNU gettext - internationalization aids - Copyright (C) 1995, 1996, 1998, 2000 Free Software Foundation, Inc. + Copyright (C) 1995, 1996, 1998, 2000, 2001 Free Software Foundation, Inc. This file was written by Peter Miller @@ -21,12 +21,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define SRC_STR_LIST_H 1 /* Get size_t and NULL. */ -#ifdef HAVE_STDDEF_H -# include -#else -# include -# include -#endif +#include /* Type describing list of immutable strings, implemented using a dynamic array. */ diff --git a/src/xget-lex.c b/src/xget-lex.c index b86fbd0..6aa5ae3 100644 --- a/src/xget-lex.c +++ b/src/xget-lex.c @@ -24,10 +24,7 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif +#include #include "dir-list.h" #include "error.h" diff --git a/src/xgettext.c b/src/xgettext.c index 0ccabd4..e4da03f 100644 --- a/src/xgettext.c +++ b/src/xgettext.c @@ -28,14 +28,8 @@ #include #include #include - -#ifdef STDC_HEADERS -# include -#endif - -#ifdef HAVE_LOCALE_H -# include -#endif +#include +#include #ifdef HAVE_UNISTD_H # include -- cgit v1.1