diff options
author | Jim Meyering <jim@meyering.net> | 1997-09-01 20:26:57 +0000 |
---|---|---|
committer | Jim Meyering <jim@meyering.net> | 1997-09-01 20:26:57 +0000 |
commit | 6db9097565a5a9b092226ed75d97bd946ed8412b (patch) | |
tree | 154df476c138ca8c3ee72c6b00252bf2e5a85a4e | |
parent | dfcc40952ef816208853b54d6fb2b05b23c81a73 (diff) | |
download | idutils-6db9097565a5a9b092226ed75d97bd946ed8412b.tar.gz idutils-6db9097565a5a9b092226ed75d97bd946ed8412b.tar.bz2 idutils-6db9097565a5a9b092226ed75d97bd946ed8412b.zip |
update gettext-0.31
-rw-r--r-- | intl/ChangeLog | 47 | ||||
-rw-r--r-- | intl/Makefile.in | 4 | ||||
-rw-r--r-- | intl/VERSION | 2 | ||||
-rw-r--r-- | intl/bindtextdom.c | 6 | ||||
-rw-r--r-- | intl/cat-compat.c | 38 | ||||
-rw-r--r-- | intl/dcgettext.c | 44 | ||||
-rw-r--r-- | intl/explodename.c | 31 | ||||
-rw-r--r-- | intl/finddomain.c | 46 | ||||
-rw-r--r-- | intl/gettext.c | 26 | ||||
-rw-r--r-- | intl/gettext.h | 34 | ||||
-rw-r--r-- | intl/hash-string.h | 33 | ||||
-rw-r--r-- | intl/l10nflist.c | 47 | ||||
-rw-r--r-- | intl/libgettext.h | 30 | ||||
-rw-r--r-- | intl/loadmsgcat.c | 32 | ||||
-rw-r--r-- | intl/localealias.c | 14 | ||||
-rw-r--r-- | intl/textdomain.c | 6 |
16 files changed, 241 insertions, 199 deletions
diff --git a/intl/ChangeLog b/intl/ChangeLog index cfb34fa..91db56f 100644 --- a/intl/ChangeLog +++ b/intl/ChangeLog @@ -1,3 +1,50 @@ +1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com> + + * Makefile.in (install-data): Don't change directory to install. + +1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com> + + * cat-compat.c: Fix copyright. + + * localealias.c: Don't define strchr unless !HAVE_STRCHR. + + * loadmsgcat.c: Update copyright. Fix typos. + + * l10nflist.c: Don't define strchr unless !HAVE_STRCHR. + (_nl_make_l10nflist): Handle sponsor and revision correctly. + + * gettext.c: Update copyright. + * gettext.h: Likewise. + * hash-string.h: Likewise. + + * finddomain.c: Remoave dead code. Define strchr only if + !HAVE_STRCHR. + + * explodename.c: Include <sys/types.h>. + + * explodename.c: Reformat copyright text. + (_nl_explode_name): Fix typo. + + * dcgettext.c: Define and use __set_errno. + (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is + not defined. + + * bindtextdom.c: Pretty printing. + +1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com> + + * dcgettext.c (guess_category_value): Don't depend on + HAVE_LC_MESSAGES. We don't need the macro here. + Patch by Bruno Haible <haible@ilog.fr>. + + * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL + macro. Instead use HAVE_LOCALE_NULL and define it when using + glibc, as in dcgettext.c. + Patch by Bruno Haible <haible@ilog.fr>. + + * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois + Pinard. + Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com> * Makefile.in: Implement handling of libtool. diff --git a/intl/Makefile.in b/intl/Makefile.in index 72a697e..a41fb57 100644 --- a/intl/Makefile.in +++ b/intl/Makefile.in @@ -50,6 +50,7 @@ RANLIB = @RANLIB@ DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \ -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@ +CPPFLAGS = @CPPFLAGS@ CFLAGS = @CFLAGS@ LDFLAGS = @LDFLAGS@ @@ -130,10 +131,9 @@ install-data: all $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \ fi; \ $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \ - cd $(srcdir) && \ dists="$(DISTFILES.common)"; \ for file in $$dists; do \ - $(INSTALL_DATA) $$file $(gettextsrcdir)/$$file; \ + $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \ done; \ else \ : ; \ diff --git a/intl/VERSION b/intl/VERSION index 7d069b8..cb64869 100644 --- a/intl/VERSION +++ b/intl/VERSION @@ -1 +1 @@ -GNU gettext library from gettext-0.10.27 +GNU gettext library from gettext-0.10.31 diff --git a/intl/bindtextdom.c b/intl/bindtextdom.c index 72583f2..bc0f2c4 100644 --- a/intl/bindtextdom.c +++ b/intl/bindtextdom.c @@ -1,5 +1,5 @@ -/* bindtextdom.c -- implementation of the bindtextdomain(3) function - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Implementation of the bindtextdomain(3) function + Copyright (C) 1995, 1996, 1997 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 @@ -34,7 +34,7 @@ void free (); #else # include <strings.h> # ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num)) +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif diff --git a/intl/cat-compat.c b/intl/cat-compat.c index 4a9a1d8..867d901 100644 --- a/intl/cat-compat.c +++ b/intl/cat-compat.c @@ -1,20 +1,19 @@ /* Compatibility code for gettext-using-catgets interface. - Copyright (C) 1995 Free Software Foundation, Inc. + Copyright (C) 1995, 1997 Free Software Foundation, Inc. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 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; either version 2, or (at your option) + any later version. -The GNU C Library 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 -Library General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -40,6 +39,16 @@ char *getenv (); /* @@ end of prolog @@ */ +/* XPG3 defines the result of `setlocale (category, NULL)' as: + ``Directs `setlocale()' to query `category' and return the current + setting of `local'.'' + However it does not specify the exact format. And even worse: POSIX + defines this not at all. So we can use this feature only on selected + system (e.g. those using GNU C Library). */ +#ifdef _LIBC +# define HAVE_LOCALE_NULL +#endif + /* The catalog descriptor. */ static nl_catd catalog = (nl_catd) -1; @@ -68,7 +77,8 @@ textdomain (domainname) size_t new_name_len; char *lang; -#if HAVE_SETLOCALE && HAVE_LC_MESSAGES && HAVE_SETLOCALE_NULL +#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \ + && defined HAVE_LOCALE_NULL lang = setlocale (LC_MESSAGES, NULL); #else lang = getenv ("LC_ALL"); diff --git a/intl/dcgettext.c b/intl/dcgettext.c index 9ce1b3a..c9171de 100644 --- a/intl/dcgettext.c +++ b/intl/dcgettext.c @@ -1,19 +1,19 @@ -/* dcgettext.c -- implementation of the dcgettext(3) function - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Implementation of the dcgettext(3) function + Copyright (C) 1995, 1996, 1997 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 -the Free Software Foundation; either version 2, 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; either version 2, or (at your option) + any later version. -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 General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -42,6 +42,9 @@ char *alloca (); #ifndef errno extern int errno; #endif +#ifndef __set_errno +# define __set_errno(val) errno = (val) +#endif #if defined STDC_HEADERS || defined _LIBC # include <stdlib.h> @@ -273,13 +276,13 @@ DCGETTEXT (domainname, msgid, category) dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); - errno = 0; + __set_errno (0); while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE) { path_max += PATH_INCR; dirname = (char *) alloca (path_max + dirname_len); ADD_BLOCK (block_list, dirname); - errno = 0; + __set_errno (0); } if (ret == NULL) @@ -287,7 +290,7 @@ DCGETTEXT (domainname, msgid, category) /* We cannot get the current working directory. Don't signal an error but simply return the default string. */ FREE_BLOCKS (block_list); - errno = saved_errno; + __set_errno (saved_errno); return (char *) msgid; } @@ -329,7 +332,7 @@ DCGETTEXT (domainname, msgid, category) { /* The whole contents of CATEGORYVALUE has been searched but no valid entry has been found. We solve this situation - by implicitely appending a "C" entry, i.e. no translation + by implicitly appending a "C" entry, i.e. no translation will take place. */ single_locale[0] = 'C'; single_locale[1] = '\0'; @@ -348,7 +351,7 @@ DCGETTEXT (domainname, msgid, category) || strcmp (single_locale, "POSIX") == 0) { FREE_BLOCKS (block_list); - errno = saved_errno; + __set_errno (saved_errno); return (char *) msgid; } @@ -377,7 +380,7 @@ DCGETTEXT (domainname, msgid, category) if (retval != NULL) { FREE_BLOCKS (block_list); - errno = saved_errno; + __set_errno (saved_errno); return retval; } } @@ -538,7 +541,8 @@ category_to_name (category) } /* Guess value of current locale from value of the environment variables. */ -static const char *guess_category_value (category, categoryname) +static const char * +guess_category_value (category, categoryname) int category; const char *categoryname; { diff --git a/intl/explodename.c b/intl/explodename.c index 64b0a03..37c46e9 100644 --- a/intl/explodename.c +++ b/intl/explodename.c @@ -1,21 +1,19 @@ -/* Copyright (C) 1995, 1996 Free Software Foundation, Inc. -This file is part of the GNU C Library. -Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. +/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. + Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. -The GNU C Library is free software; you can redistribute it and/or -modify it under the terms of the GNU Library General Public License as -published by the Free Software Foundation; either version 2 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; either version 2, or (at your option) + any later version. -The GNU C Library 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 -Library General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -23,6 +21,7 @@ Boston, MA 02111-1307, USA. */ #include <stdlib.h> #include <string.h> +#include <sys/types.h> #include "loadinfo.h" @@ -164,7 +163,7 @@ _nl_explode_name (name, language, modifier, territory, codeset, } } - /* For CEN sytnax values it might be important to have the + /* For CEN syntax values it might be important to have the separator character in the file name, not for XPG syntax. */ if (syntax == xpg) { diff --git a/intl/finddomain.c b/intl/finddomain.c index 3b7861e..ec85d4d 100644 --- a/intl/finddomain.c +++ b/intl/finddomain.c @@ -1,5 +1,5 @@ -/* finddomain.c -- handle list of needed message catalogs - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify @@ -39,12 +39,14 @@ void free (); # include <string.h> #else # include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num)) -# endif #endif #if defined HAVE_UNISTD_H || defined _LIBC @@ -60,18 +62,6 @@ void free (); #endif /* @@ end of prolog @@ */ - -#ifdef _LIBC -/* Rename the non ANSI C functions. This is required by the standard - because some ANSI C functions will require linking with this object - file and the name space must not be polluted. */ -# define stpcpy(dest, src) __stpcpy(dest, src) -#else -# ifndef HAVE_STPCPY -static char *stpcpy PARAMS ((char *dest, const char *src)); -# endif -#endif - /* List of already loaded domains. */ static struct loaded_l10nfile *_nl_loaded_domains; @@ -103,7 +93,7 @@ _nl_find_domain (dirname, locale, domainname) and six parts for the CEN syntax: - language[_territory][+audience][+special][,sponsor][_revision] + language[_territory][+audience][+special][,[sponsor][_revision]] Beside the first all of them are allowed to be missing. If the full specified locale is not found, the less specific one are @@ -168,7 +158,7 @@ _nl_find_domain (dirname, locale, domainname) &sponsor, &revision); /* Create all possible locale entries which might be interested in - generalzation. */ + generalization. */ retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname, strlen (dirname) + 1, mask, language, territory, codeset, normalized_codeset, modifier, special, @@ -197,21 +187,3 @@ _nl_find_domain (dirname, locale, domainname) return retval; } - -/* @@ begin of epilog @@ */ - -/* We don't want libintl.a to depend on any other library. So we - avoid the non-standard function stpcpy. In GNU C Library this - function is available, though. Also allow the symbol HAVE_STPCPY - to be defined. */ -#if !_LIBC && !HAVE_STPCPY -static char * -stpcpy (dest, src) - char *dest; - const char *src; -{ - while ((*dest++ = *src++) != '\0') - /* Do nothing. */ ; - return dest - 1; -} -#endif diff --git a/intl/gettext.c b/intl/gettext.c index 7bed636..1336d21 100644 --- a/intl/gettext.c +++ b/intl/gettext.c @@ -1,19 +1,19 @@ -/* gettext.c -- implementation of gettext(3) function - Copyright (C) 1995 Software Foundation, Inc. +/* Implementation of gettext(3) function + Copyright (C) 1995, 1997 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 -the Free Software Foundation; either version 2, 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; either version 2, or (at your option) + any later version. -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 General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> diff --git a/intl/gettext.h b/intl/gettext.h index 5190f09..6b4b9e3 100644 --- a/intl/gettext.h +++ b/intl/gettext.h @@ -1,20 +1,20 @@ -/* gettext.h - internal header for GNU gettext internationalization functions - Copyright (C) 1995 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 -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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 General Public License for more details. - -You should have received a copy of the GNU Library General Public -License along with the GNU C Library; see the file COPYING.LIB. If -not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, -Boston, MA 02111-1307, USA. */ +/* Internal header for GNU gettext internationalization functions + Copyright (C) 1995, 1997 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifndef _GETTEXT_H #define _GETTEXT_H 1 diff --git a/intl/hash-string.h b/intl/hash-string.h index ef1f448..e66e841 100644 --- a/intl/hash-string.h +++ b/intl/hash-string.h @@ -1,19 +1,20 @@ -/* hash-string - Implements a string hashing function. - Copyright (C) 1995 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 -the Free Software Foundation; either version 2, or (at your option) -any later version. - -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 General Public License for more details. - -You should have received a copy of the GNU General Public License -along with this program; if not, write to the Free Software -Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ +/* Implements a string hashing function. + Copyright (C) 1995, 1997 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + 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 General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with the GNU C Library; see the file COPYING.LIB. If not, + write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, + Boston, MA 02111-1307, USA. */ #ifdef HAVE_VALUES_H # include <values.h> diff --git a/intl/l10nflist.c b/intl/l10nflist.c index 3611b12..4e2bc13 100644 --- a/intl/l10nflist.c +++ b/intl/l10nflist.c @@ -1,5 +1,5 @@ -/* finddomain.c -- handle list of needed message catalogs - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Handle list of needed message catalogs + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify @@ -20,6 +20,7 @@ # include <config.h> #endif + #if defined HAVE_STRING_H || defined _LIBC # ifndef _GNU_SOURCE # define _GNU_SOURCE 1 @@ -27,18 +28,21 @@ # include <string.h> #else # include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num)) -# endif #endif #if defined _LIBC || defined HAVE_ARGZ_H # include <argz.h> #endif #include <ctype.h> +#include <sys/types.h> #if defined STDC_HEADERS || defined _LIBC # include <stdlib.h> @@ -198,14 +202,16 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, + ((mask & XPG_NORM_CODESET) != 0 ? strlen (normalized_codeset) + 1 : 0) + (((mask & XPG_MODIFIER) != 0 - || (mask & CEN_AUDIENCE) != 0) ? - strlen (modifier) + 1 : 0) + || (mask & CEN_AUDIENCE) != 0) + ? strlen (modifier) + 1 : 0) + ((mask & CEN_SPECIAL) != 0 ? strlen (special) + 1 : 0) - + ((mask & CEN_SPONSOR) != 0 - ? strlen (sponsor) + 1 : 0) - + ((mask & CEN_REVISION) != 0 - ? strlen (revision) + 1 : 0) + + (((mask & CEN_SPONSOR) != 0 + || (mask & CEN_REVISION) != 0) + ? (1 + ((mask & CEN_SPONSOR) != 0 + ? strlen (sponsor) + 1 : 0) + + ((mask & CEN_REVISION) != 0 + ? strlen (revision) + 1 : 0)) : 0) + 1 + strlen (filename) + 1); if (abs_filename == NULL) @@ -248,15 +254,16 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, *cp++ = '+'; cp = stpcpy (cp, special); } - if ((mask & CEN_SPONSOR) != 0) + if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0) { *cp++ = ','; - cp = stpcpy (cp, sponsor); - } - if ((mask & CEN_REVISION) != 0) - { - *cp++ = '_'; - cp = stpcpy (cp, revision); + if ((mask & CEN_SPONSOR) != 0) + cp = stpcpy (cp, sponsor); + if ((mask & CEN_REVISION) != 0) + { + *cp++ = '_'; + cp = stpcpy (cp, revision); + } } *cp++ = '/'; @@ -313,8 +320,8 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language, } entries = 0; - /* If the DIRLIST is a real list the RETVAL entry correcponds not to - a real file. So we have to use the DIRLIST separation machanism + /* If the DIRLIST is a real list the RETVAL entry corresponds not to + a real file. So we have to use the DIRLIST separation mechanism of the inner loop. */ cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask; for (; cnt >= 0; --cnt) diff --git a/intl/libgettext.h b/intl/libgettext.h index c9212aa..0d4de4d 100644 --- a/intl/libgettext.h +++ b/intl/libgettext.h @@ -1,19 +1,19 @@ -/* libgettext.h -- Message catalogs for internationalization. - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Message catalogs for internationalization. + Copyright (C) 1995, 1996, 1997 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 -the Free Software Foundation; either version 2, 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; either version 2, or (at your option) + any later version. -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 General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* Because on some systems (e.g. Solaris) we sometimes have to include the systems libintl.h as well as this file we have more complex @@ -151,13 +151,13 @@ extern int _nl_msg_cat_cntr; if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \ { \ __translation__ = \ - dcgettext__ ((Domainname), (Msgid), (Category)); \ + dcgettext__ (Domainname, Msgid, Category); \ __catalog_counter__ = _nl_msg_cat_cntr; \ } \ __result = __translation__; \ } \ else \ - __result = dcgettext__ ((Domainname), (Msgid), (Category)); \ + __result = dcgettext__ (Domainname, Msgid, Category); \ __result; \ })) # endif diff --git a/intl/loadmsgcat.c b/intl/loadmsgcat.c index 4b98ec8..73e90a9 100644 --- a/intl/loadmsgcat.c +++ b/intl/loadmsgcat.c @@ -1,19 +1,19 @@ -/* loadmsgcat.c -- load needed message catalogs - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Load needed message catalogs + Copyright (C) 1995, 1996, 1997 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 -the Free Software Foundation; either version 2, 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; either version 2, or (at your option) + any later version. -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 General Public License for more details. + 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 General Public License for more details. -You should have received a copy of the GNU General Public License -along with this program; 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, write to the Free Software Foundation, + Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #ifdef HAVE_CONFIG_H # include <config.h> @@ -41,8 +41,8 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* @@ end of prolog @@ */ #ifdef _LIBC -/* Rename the non ANSI C functions. This is required by the standard - because some ANSI C functions will require linking with this object +/* Rename the non ISO C functions. This is required by the standard + because some ISO C functions will require linking with this object file and the name space must not be polluted. */ # define fstat __fstat # define open __open @@ -55,7 +55,7 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ /* We need a sign, whether a new catalog was loaded, which can be associated with all translations. This is important if the translations are cached by one of GCC's features. */ -int _nl_msg_cat_cntr; +int _nl_msg_cat_cntr = 0; /* Load the message catalogs specified by FILENAME. If it is no valid diff --git a/intl/localealias.c b/intl/localealias.c index a869acf..00d9194 100644 --- a/intl/localealias.c +++ b/intl/localealias.c @@ -1,5 +1,5 @@ -/* localealias.c -- handle aliases for locale names - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Handle aliases for locale names + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify @@ -59,12 +59,14 @@ void free (); # include <string.h> #else # include <strings.h> +# ifndef memcpy +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) +# endif +#endif +#if !HAVE_STRCHR && !defined _LIBC # ifndef strchr # define strchr index # endif -# ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num)) -# endif #endif #include "gettext.h" @@ -295,7 +297,7 @@ read_alias_file (fname, fname_len) } } - /* Possibily not the whole line fitted into the buffer. Ignore + /* Possibly not the whole line fits into the buffer. Ignore the rest of the line. */ while (strchr (cp, '\n') == NULL) { diff --git a/intl/textdomain.c b/intl/textdomain.c index 09530b8..2f077a0 100644 --- a/intl/textdomain.c +++ b/intl/textdomain.c @@ -1,5 +1,5 @@ -/* textdomain.c -- implementation of the textdomain(3) function - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* Implementation of the textdomain(3) function + Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc. Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995. This program is free software; you can redistribute it and/or modify @@ -29,7 +29,7 @@ #else # include <strings.h> # ifndef memcpy -# define memcpy(Dst, Src, Num) bcopy ((Src), (Dst), (Num)) +# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num) # endif #endif |