diff options
author | Bruno Haible <bruno@clisp.org> | 2001-01-21 16:12:24 +0000 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2001-01-21 16:12:24 +0000 |
commit | 2769926e6e7cac7d7020bd38be90ff2fd4cbb602 (patch) | |
tree | 15913890385723aaa21e7d11a4239411f19911be /src | |
parent | 697735b2b75d59341cc2cbed2f4bf7a0ee73547c (diff) | |
download | external_gettext-2769926e6e7cac7d7020bd38be90ff2fd4cbb602.zip external_gettext-2769926e6e7cac7d7020bd38be90ff2fd4cbb602.tar.gz external_gettext-2769926e6e7cac7d7020bd38be90ff2fd4cbb602.tar.bz2 |
Assume <stddef.h>, <stdlib.h>, <string.h>, <locale.h> exist.
Diffstat (limited to 'src')
-rw-r--r-- | src/ChangeLog | 18 | ||||
-rw-r--r-- | src/dir-list.c | 6 | ||||
-rw-r--r-- | src/gettextp.c | 14 | ||||
-rw-r--r-- | src/message.c | 9 | ||||
-rw-r--r-- | src/msgcmp.c | 12 | ||||
-rw-r--r-- | src/msgcomm.c | 11 | ||||
-rw-r--r-- | src/msgfmt.c | 10 | ||||
-rw-r--r-- | src/msgmerge.c | 19 | ||||
-rw-r--r-- | src/msgunfmt.c | 10 | ||||
-rw-r--r-- | src/open-po.c | 14 | ||||
-rw-r--r-- | src/po.c | 7 | ||||
-rw-r--r-- | src/setlocale.c | 33 | ||||
-rw-r--r-- | src/str-list.h | 9 | ||||
-rw-r--r-- | src/xget-lex.c | 5 | ||||
-rw-r--r-- | src/xgettext.c | 10 |
15 files changed, 53 insertions, 134 deletions
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 <haible@clisp.cons.org> + + Assume <stddef.h>, <stdlib.h>, <string.h>, <locale.h> 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 <haible@clisp.cons.org> * 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 <millerp@canb.auug.org.au> @@ -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 <stdlib.h> -#endif +#include <stdlib.h> #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 <drepper@gnu.ai.mit.edu>, May 1995. This program is free software; you can redistribute it and/or modify @@ -22,16 +22,8 @@ #include <getopt.h> #include <stdio.h> - -#ifdef HAVE_STDLIB_H -# include <stdlib.h> -#else -char *getenv (); -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <locale.h> #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 <limits.h> #endif -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif +#include <locale.h> +#include <stdlib.h> #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 <millerp@canb.auug.org.au> This program is free software; you can redistribute it and/or modify @@ -22,14 +22,8 @@ #include <getopt.h> #include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <locale.h> #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 <millerp@canb.auug.org.au> @@ -25,18 +25,13 @@ #include <getopt.h> #include <stdio.h> #include <sys/types.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif +#include <stdlib.h> #ifdef HAVE_LIMITS_H # include <limits.h> #endif -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <locale.h> #ifdef HAVE_UNISTD_H # include <unistd.h> 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 <stdio.h> #include <sys/param.h> #include <sys/types.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <locale.h> #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 <millerp@canb.auug.org.au> This program is free software; you can redistribute it and/or modify @@ -23,20 +23,9 @@ #include <getopt.h> #include <limits.h> #include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#if HAVE_STRING_H -# include <string.h> -#else -# include <strings.h> -#endif - -#if HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <string.h> +#include <locale.h> #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 <stdio.h> #include <sys/param.h> #include <sys/types.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <locale.h> #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 <drepper@gnu.ai.mit.edu>, 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 <errno.h> #include <stdio.h> #include <sys/types.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#ifdef HAVE_STRING_H -# include <string.h> -#else -# include <strings.h> -#endif +#include <stdlib.h> +#include <string.h> #include "open-po.h" #include "dir-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 <millerp@canb.auug.org.au> @@ -24,10 +24,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include <ctype.h> #include <stdio.h> - -#ifdef HAVE_STDLIB_H -# include <stdlib.h> -#endif +#include <stdlib.h> #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 <config.h> #endif -#ifdef HAVE_STDLIB_H -# include <stdlib.h> -#else -# ifdef HAVE_MALLOC_H -# include <malloc.h> -# endif -extern char *getenv (); -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif - -#ifdef HAVE_STRING_H -# include <string.h> -#endif +#include <stdlib.h> +#include <locale.h> +#include <string.h> /* 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 <millerp@canb.auug.org.au> @@ -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 <stddef.h> -#else -# include <sys/types.h> -# include <stdio.h> -#endif +#include <stddef.h> /* 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 <ctype.h> #include <errno.h> #include <stdio.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif +#include <stdlib.h> #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 <stdio.h> #include <time.h> #include <sys/types.h> - -#ifdef STDC_HEADERS -# include <stdlib.h> -#endif - -#ifdef HAVE_LOCALE_H -# include <locale.h> -#endif +#include <stdlib.h> +#include <locale.h> #ifdef HAVE_UNISTD_H # include <unistd.h> |