xref: /OK3568_Linux_fs/yocto/poky/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools-update.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunUpdate autotools infrastructure (including gettext) to modern versions.
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunUpstream-Status: Inappropriate [upstream hasn't been active since 1998]
4*4882a593SmuzhiyunSigned-off-by: Phil Blundell <pb@pbcl.net>
5*4882a593Smuzhiyun
6*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/configure.in lrzsz-0.12.20/configure.in
7*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/configure.in	1998-12-30 07:50:07.000000000 +0000
8*4882a593Smuzhiyun+++ lrzsz-0.12.20/configure.in	2019-11-25 16:22:37.000000000 +0000
9*4882a593Smuzhiyun@@ -92,7 +92,6 @@ AC_PROG_RANLIB
10*4882a593Smuzhiyun AC_ISC_POSIX
11*4882a593Smuzhiyun AC_AIX
12*4882a593Smuzhiyun AC_MINIX
13*4882a593Smuzhiyun-AM_C_PROTOTYPES
14*4882a593Smuzhiyun AC_C_CONST
15*4882a593Smuzhiyun AC_C_INLINE
16*4882a593Smuzhiyun
17*4882a593Smuzhiyun@@ -253,18 +252,13 @@ ihave$lookup_facility
18*4882a593Smuzhiyun fi
19*4882a593Smuzhiyun
20*4882a593Smuzhiyun
21*4882a593Smuzhiyun-AC_SUBST(CFLAGS)
22*4882a593Smuzhiyun-AC_SUBST(LDFLAGS)
23*4882a593Smuzhiyun AC_SUBST(LIBS)
24*4882a593Smuzhiyun
25*4882a593Smuzhiyun-AM_GNU_GETTEXT
26*4882a593Smuzhiyun+AM_GNU_GETTEXT([external])
27*4882a593Smuzhiyun
28*4882a593Smuzhiyun-AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
29*4882a593Smuzhiyun-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
30*4882a593Smuzhiyun-
31*4882a593Smuzhiyun-AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
32*4882a593Smuzhiyun+AC_OUTPUT([Makefile lib/Makefile testsuite/Makefile \
33*4882a593Smuzhiyun man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
34*4882a593Smuzhiyun src/lrzszbug],
35*4882a593Smuzhiyun-[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
36*4882a593Smuzhiyun+[
37*4882a593Smuzhiyun chmod +x debian/rules;
38*4882a593Smuzhiyun test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
39*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/bindtextdom.c lrzsz-0.12.20/intl/bindtextdom.c
40*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/bindtextdom.c	1998-04-26 14:22:36.000000000 +0100
41*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/bindtextdom.c	1970-01-01 01:00:00.000000000 +0100
42*4882a593Smuzhiyun@@ -1,199 +0,0 @@
43*4882a593Smuzhiyun-/* Implementation of the bindtextdomain(3) function
44*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
45*4882a593Smuzhiyun-
46*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
47*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
48*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
49*4882a593Smuzhiyun-   any later version.
50*4882a593Smuzhiyun-
51*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
52*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
53*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
54*4882a593Smuzhiyun-   GNU General Public License for more details.
55*4882a593Smuzhiyun-
56*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
57*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
58*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
59*4882a593Smuzhiyun-
60*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
61*4882a593Smuzhiyun-# include <config.h>
62*4882a593Smuzhiyun-#endif
63*4882a593Smuzhiyun-
64*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
65*4882a593Smuzhiyun-# include <stdlib.h>
66*4882a593Smuzhiyun-#else
67*4882a593Smuzhiyun-# ifdef HAVE_MALLOC_H
68*4882a593Smuzhiyun-#  include <malloc.h>
69*4882a593Smuzhiyun-# else
70*4882a593Smuzhiyun-void free ();
71*4882a593Smuzhiyun-# endif
72*4882a593Smuzhiyun-#endif
73*4882a593Smuzhiyun-
74*4882a593Smuzhiyun-#if defined HAVE_STRING_H || defined _LIBC
75*4882a593Smuzhiyun-# include <string.h>
76*4882a593Smuzhiyun-#else
77*4882a593Smuzhiyun-# include <strings.h>
78*4882a593Smuzhiyun-# ifndef memcpy
79*4882a593Smuzhiyun-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
80*4882a593Smuzhiyun-# endif
81*4882a593Smuzhiyun-#endif
82*4882a593Smuzhiyun-
83*4882a593Smuzhiyun-#ifdef _LIBC
84*4882a593Smuzhiyun-# include <libintl.h>
85*4882a593Smuzhiyun-#else
86*4882a593Smuzhiyun-# include "libgettext.h"
87*4882a593Smuzhiyun-#endif
88*4882a593Smuzhiyun-#include "gettext.h"
89*4882a593Smuzhiyun-#include "gettextP.h"
90*4882a593Smuzhiyun-
91*4882a593Smuzhiyun-/* @@ end of prolog @@ */
92*4882a593Smuzhiyun-
93*4882a593Smuzhiyun-/* Contains the default location of the message catalogs.  */
94*4882a593Smuzhiyun-extern const char _nl_default_dirname[];
95*4882a593Smuzhiyun-
96*4882a593Smuzhiyun-/* List with bindings of specific domains.  */
97*4882a593Smuzhiyun-extern struct binding *_nl_domain_bindings;
98*4882a593Smuzhiyun-
99*4882a593Smuzhiyun-
100*4882a593Smuzhiyun-/* Names for the libintl functions are a problem.  They must not clash
101*4882a593Smuzhiyun-   with existing names and they should follow ANSI C.  But this source
102*4882a593Smuzhiyun-   code is also used in GNU C Library where the names have a __
103*4882a593Smuzhiyun-   prefix.  So we have to make a difference here.  */
104*4882a593Smuzhiyun-#ifdef _LIBC
105*4882a593Smuzhiyun-# define BINDTEXTDOMAIN __bindtextdomain
106*4882a593Smuzhiyun-# define strdup(str) __strdup (str)
107*4882a593Smuzhiyun-#else
108*4882a593Smuzhiyun-# define BINDTEXTDOMAIN bindtextdomain__
109*4882a593Smuzhiyun-#endif
110*4882a593Smuzhiyun-
111*4882a593Smuzhiyun-/* Specify that the DOMAINNAME message catalog will be found
112*4882a593Smuzhiyun-   in DIRNAME rather than in the system locale data base.  */
113*4882a593Smuzhiyun-char *
114*4882a593Smuzhiyun-BINDTEXTDOMAIN (domainname, dirname)
115*4882a593Smuzhiyun-     const char *domainname;
116*4882a593Smuzhiyun-     const char *dirname;
117*4882a593Smuzhiyun-{
118*4882a593Smuzhiyun-  struct binding *binding;
119*4882a593Smuzhiyun-
120*4882a593Smuzhiyun-  /* Some sanity checks.  */
121*4882a593Smuzhiyun-  if (domainname == NULL || domainname[0] == '\0')
122*4882a593Smuzhiyun-    return NULL;
123*4882a593Smuzhiyun-
124*4882a593Smuzhiyun-  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
125*4882a593Smuzhiyun-    {
126*4882a593Smuzhiyun-      int compare = strcmp (domainname, binding->domainname);
127*4882a593Smuzhiyun-      if (compare == 0)
128*4882a593Smuzhiyun-	/* We found it!  */
129*4882a593Smuzhiyun-	break;
130*4882a593Smuzhiyun-      if (compare < 0)
131*4882a593Smuzhiyun-	{
132*4882a593Smuzhiyun-	  /* It is not in the list.  */
133*4882a593Smuzhiyun-	  binding = NULL;
134*4882a593Smuzhiyun-	  break;
135*4882a593Smuzhiyun-	}
136*4882a593Smuzhiyun-    }
137*4882a593Smuzhiyun-
138*4882a593Smuzhiyun-  if (dirname == NULL)
139*4882a593Smuzhiyun-    /* The current binding has be to returned.  */
140*4882a593Smuzhiyun-    return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
141*4882a593Smuzhiyun-
142*4882a593Smuzhiyun-  if (binding != NULL)
143*4882a593Smuzhiyun-    {
144*4882a593Smuzhiyun-      /* The domain is already bound.  If the new value and the old
145*4882a593Smuzhiyun-	 one are equal we simply do nothing.  Otherwise replace the
146*4882a593Smuzhiyun-	 old binding.  */
147*4882a593Smuzhiyun-      if (strcmp (dirname, binding->dirname) != 0)
148*4882a593Smuzhiyun-	{
149*4882a593Smuzhiyun-	  char *new_dirname;
150*4882a593Smuzhiyun-
151*4882a593Smuzhiyun-	  if (strcmp (dirname, _nl_default_dirname) == 0)
152*4882a593Smuzhiyun-	    new_dirname = (char *) _nl_default_dirname;
153*4882a593Smuzhiyun-	  else
154*4882a593Smuzhiyun-	    {
155*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_STRDUP
156*4882a593Smuzhiyun-	      new_dirname = strdup (dirname);
157*4882a593Smuzhiyun-	      if (new_dirname == NULL)
158*4882a593Smuzhiyun-		return NULL;
159*4882a593Smuzhiyun-#else
160*4882a593Smuzhiyun-	      size_t len = strlen (dirname) + 1;
161*4882a593Smuzhiyun-	      new_dirname = (char *) malloc (len);
162*4882a593Smuzhiyun-	      if (new_dirname == NULL)
163*4882a593Smuzhiyun-		return NULL;
164*4882a593Smuzhiyun-
165*4882a593Smuzhiyun-	      memcpy (new_dirname, dirname, len);
166*4882a593Smuzhiyun-#endif
167*4882a593Smuzhiyun-	    }
168*4882a593Smuzhiyun-
169*4882a593Smuzhiyun-	  if (binding->dirname != _nl_default_dirname)
170*4882a593Smuzhiyun-	    free (binding->dirname);
171*4882a593Smuzhiyun-
172*4882a593Smuzhiyun-	  binding->dirname = new_dirname;
173*4882a593Smuzhiyun-	}
174*4882a593Smuzhiyun-    }
175*4882a593Smuzhiyun-  else
176*4882a593Smuzhiyun-    {
177*4882a593Smuzhiyun-      /* We have to create a new binding.  */
178*4882a593Smuzhiyun-      size_t len;
179*4882a593Smuzhiyun-      struct binding *new_binding =
180*4882a593Smuzhiyun-	(struct binding *) malloc (sizeof (*new_binding));
181*4882a593Smuzhiyun-
182*4882a593Smuzhiyun-      if (new_binding == NULL)
183*4882a593Smuzhiyun-	return NULL;
184*4882a593Smuzhiyun-
185*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_STRDUP
186*4882a593Smuzhiyun-      new_binding->domainname = strdup (domainname);
187*4882a593Smuzhiyun-      if (new_binding->domainname == NULL)
188*4882a593Smuzhiyun-	return NULL;
189*4882a593Smuzhiyun-#else
190*4882a593Smuzhiyun-      len = strlen (domainname) + 1;
191*4882a593Smuzhiyun-      new_binding->domainname = (char *) malloc (len);
192*4882a593Smuzhiyun-      if (new_binding->domainname == NULL)
193*4882a593Smuzhiyun-	return NULL;
194*4882a593Smuzhiyun-      memcpy (new_binding->domainname, domainname, len);
195*4882a593Smuzhiyun-#endif
196*4882a593Smuzhiyun-
197*4882a593Smuzhiyun-      if (strcmp (dirname, _nl_default_dirname) == 0)
198*4882a593Smuzhiyun-	new_binding->dirname = (char *) _nl_default_dirname;
199*4882a593Smuzhiyun-      else
200*4882a593Smuzhiyun-	{
201*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_STRDUP
202*4882a593Smuzhiyun-	  new_binding->dirname = strdup (dirname);
203*4882a593Smuzhiyun-	  if (new_binding->dirname == NULL)
204*4882a593Smuzhiyun-	    return NULL;
205*4882a593Smuzhiyun-#else
206*4882a593Smuzhiyun-	  len = strlen (dirname) + 1;
207*4882a593Smuzhiyun-	  new_binding->dirname = (char *) malloc (len);
208*4882a593Smuzhiyun-	  if (new_binding->dirname == NULL)
209*4882a593Smuzhiyun-	    return NULL;
210*4882a593Smuzhiyun-	  memcpy (new_binding->dirname, dirname, len);
211*4882a593Smuzhiyun-#endif
212*4882a593Smuzhiyun-	}
213*4882a593Smuzhiyun-
214*4882a593Smuzhiyun-      /* Now enqueue it.  */
215*4882a593Smuzhiyun-      if (_nl_domain_bindings == NULL
216*4882a593Smuzhiyun-	  || strcmp (domainname, _nl_domain_bindings->domainname) < 0)
217*4882a593Smuzhiyun-	{
218*4882a593Smuzhiyun-	  new_binding->next = _nl_domain_bindings;
219*4882a593Smuzhiyun-	  _nl_domain_bindings = new_binding;
220*4882a593Smuzhiyun-	}
221*4882a593Smuzhiyun-      else
222*4882a593Smuzhiyun-	{
223*4882a593Smuzhiyun-	  binding = _nl_domain_bindings;
224*4882a593Smuzhiyun-	  while (binding->next != NULL
225*4882a593Smuzhiyun-		 && strcmp (domainname, binding->next->domainname) > 0)
226*4882a593Smuzhiyun-	    binding = binding->next;
227*4882a593Smuzhiyun-
228*4882a593Smuzhiyun-	  new_binding->next = binding->next;
229*4882a593Smuzhiyun-	  binding->next = new_binding;
230*4882a593Smuzhiyun-	}
231*4882a593Smuzhiyun-
232*4882a593Smuzhiyun-      binding = new_binding;
233*4882a593Smuzhiyun-    }
234*4882a593Smuzhiyun-
235*4882a593Smuzhiyun-  return binding->dirname;
236*4882a593Smuzhiyun-}
237*4882a593Smuzhiyun-
238*4882a593Smuzhiyun-#ifdef _LIBC
239*4882a593Smuzhiyun-/* Alias for function name in GNU C Library.  */
240*4882a593Smuzhiyun-weak_alias (__bindtextdomain, bindtextdomain);
241*4882a593Smuzhiyun-#endif
242*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/cat-compat.c lrzsz-0.12.20/intl/cat-compat.c
243*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/cat-compat.c	1998-04-26 14:22:37.000000000 +0100
244*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/cat-compat.c	1970-01-01 01:00:00.000000000 +0100
245*4882a593Smuzhiyun@@ -1,262 +0,0 @@
246*4882a593Smuzhiyun-/* Compatibility code for gettext-using-catgets interface.
247*4882a593Smuzhiyun-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
248*4882a593Smuzhiyun-
249*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
250*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
251*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
252*4882a593Smuzhiyun-   any later version.
253*4882a593Smuzhiyun-
254*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
255*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
256*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
257*4882a593Smuzhiyun-   GNU General Public License for more details.
258*4882a593Smuzhiyun-
259*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
260*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
261*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
262*4882a593Smuzhiyun-
263*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
264*4882a593Smuzhiyun-# include <config.h>
265*4882a593Smuzhiyun-#endif
266*4882a593Smuzhiyun-
267*4882a593Smuzhiyun-#include <stdio.h>
268*4882a593Smuzhiyun-
269*4882a593Smuzhiyun-#ifdef STDC_HEADERS
270*4882a593Smuzhiyun-# include <stdlib.h>
271*4882a593Smuzhiyun-# include <string.h>
272*4882a593Smuzhiyun-#else
273*4882a593Smuzhiyun-char *getenv ();
274*4882a593Smuzhiyun-# ifdef HAVE_MALLOC_H
275*4882a593Smuzhiyun-#  include <malloc.h>
276*4882a593Smuzhiyun-# endif
277*4882a593Smuzhiyun-#endif
278*4882a593Smuzhiyun-
279*4882a593Smuzhiyun-#ifdef HAVE_NL_TYPES_H
280*4882a593Smuzhiyun-# include <nl_types.h>
281*4882a593Smuzhiyun-#endif
282*4882a593Smuzhiyun-
283*4882a593Smuzhiyun-#include "libgettext.h"
284*4882a593Smuzhiyun-
285*4882a593Smuzhiyun-/* @@ end of prolog @@ */
286*4882a593Smuzhiyun-
287*4882a593Smuzhiyun-/* XPG3 defines the result of `setlocale (category, NULL)' as:
288*4882a593Smuzhiyun-   ``Directs `setlocale()' to query `category' and return the current
289*4882a593Smuzhiyun-     setting of `local'.''
290*4882a593Smuzhiyun-   However it does not specify the exact format.  And even worse: POSIX
291*4882a593Smuzhiyun-   defines this not at all.  So we can use this feature only on selected
292*4882a593Smuzhiyun-   system (e.g. those using GNU C Library).  */
293*4882a593Smuzhiyun-#ifdef _LIBC
294*4882a593Smuzhiyun-# define HAVE_LOCALE_NULL
295*4882a593Smuzhiyun-#endif
296*4882a593Smuzhiyun-
297*4882a593Smuzhiyun-/* The catalog descriptor.  */
298*4882a593Smuzhiyun-static nl_catd catalog = (nl_catd) -1;
299*4882a593Smuzhiyun-
300*4882a593Smuzhiyun-/* Name of the default catalog.  */
301*4882a593Smuzhiyun-static const char default_catalog_name[] = "messages";
302*4882a593Smuzhiyun-
303*4882a593Smuzhiyun-/* Name of currently used catalog.  */
304*4882a593Smuzhiyun-static const char *catalog_name = default_catalog_name;
305*4882a593Smuzhiyun-
306*4882a593Smuzhiyun-/* Get ID for given string.  If not found return -1.  */
307*4882a593Smuzhiyun-static int msg_to_cat_id PARAMS ((const char *msg));
308*4882a593Smuzhiyun-
309*4882a593Smuzhiyun-/* Substitution for systems lacking this function in their C library.  */
310*4882a593Smuzhiyun-#if !_LIBC && !HAVE_STPCPY
311*4882a593Smuzhiyun-static char *stpcpy PARAMS ((char *dest, const char *src));
312*4882a593Smuzhiyun-#endif
313*4882a593Smuzhiyun-
314*4882a593Smuzhiyun-
315*4882a593Smuzhiyun-/* Set currently used domain/catalog.  */
316*4882a593Smuzhiyun-char *
317*4882a593Smuzhiyun-textdomain (domainname)
318*4882a593Smuzhiyun-     const char *domainname;
319*4882a593Smuzhiyun-{
320*4882a593Smuzhiyun-  nl_catd new_catalog;
321*4882a593Smuzhiyun-  char *new_name;
322*4882a593Smuzhiyun-  size_t new_name_len;
323*4882a593Smuzhiyun-  char *lang;
324*4882a593Smuzhiyun-
325*4882a593Smuzhiyun-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
326*4882a593Smuzhiyun-    && defined HAVE_LOCALE_NULL
327*4882a593Smuzhiyun-  lang = setlocale (LC_MESSAGES, NULL);
328*4882a593Smuzhiyun-#else
329*4882a593Smuzhiyun-  lang = getenv ("LC_ALL");
330*4882a593Smuzhiyun-  if (lang == NULL || lang[0] == '\0')
331*4882a593Smuzhiyun-    {
332*4882a593Smuzhiyun-      lang = getenv ("LC_MESSAGES");
333*4882a593Smuzhiyun-      if (lang == NULL || lang[0] == '\0')
334*4882a593Smuzhiyun-	lang = getenv ("LANG");
335*4882a593Smuzhiyun-    }
336*4882a593Smuzhiyun-#endif
337*4882a593Smuzhiyun-  if (lang == NULL || lang[0] == '\0')
338*4882a593Smuzhiyun-    lang = "C";
339*4882a593Smuzhiyun-
340*4882a593Smuzhiyun-  /* See whether name of currently used domain is asked.  */
341*4882a593Smuzhiyun-  if (domainname == NULL)
342*4882a593Smuzhiyun-    return (char *) catalog_name;
343*4882a593Smuzhiyun-
344*4882a593Smuzhiyun-  if (domainname[0] == '\0')
345*4882a593Smuzhiyun-    domainname = default_catalog_name;
346*4882a593Smuzhiyun-
347*4882a593Smuzhiyun-  /* Compute length of added path element.  */
348*4882a593Smuzhiyun-  new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
349*4882a593Smuzhiyun-		 + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
350*4882a593Smuzhiyun-		 + sizeof (".cat");
351*4882a593Smuzhiyun-
352*4882a593Smuzhiyun-  new_name = (char *) malloc (new_name_len);
353*4882a593Smuzhiyun-  if (new_name == NULL)
354*4882a593Smuzhiyun-    return NULL;
355*4882a593Smuzhiyun-
356*4882a593Smuzhiyun-  strcpy (new_name, PACKAGE);
357*4882a593Smuzhiyun-  new_catalog = catopen (new_name, 0);
358*4882a593Smuzhiyun-
359*4882a593Smuzhiyun-  if (new_catalog == (nl_catd) -1)
360*4882a593Smuzhiyun-    {
361*4882a593Smuzhiyun-      /* NLSPATH search didn't work, try absolute path */
362*4882a593Smuzhiyun-      sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
363*4882a593Smuzhiyun-	       PACKAGE);
364*4882a593Smuzhiyun-      new_catalog = catopen (new_name, 0);
365*4882a593Smuzhiyun-
366*4882a593Smuzhiyun-      if (new_catalog == (nl_catd) -1)
367*4882a593Smuzhiyun-	{
368*4882a593Smuzhiyun-	  free (new_name);
369*4882a593Smuzhiyun-	  return (char *) catalog_name;
370*4882a593Smuzhiyun-	}
371*4882a593Smuzhiyun-    }
372*4882a593Smuzhiyun-
373*4882a593Smuzhiyun-  /* Close old catalog.  */
374*4882a593Smuzhiyun-  if (catalog != (nl_catd) -1)
375*4882a593Smuzhiyun-    catclose (catalog);
376*4882a593Smuzhiyun-  if (catalog_name != default_catalog_name)
377*4882a593Smuzhiyun-    free ((char *) catalog_name);
378*4882a593Smuzhiyun-
379*4882a593Smuzhiyun-  catalog = new_catalog;
380*4882a593Smuzhiyun-  catalog_name = new_name;
381*4882a593Smuzhiyun-
382*4882a593Smuzhiyun-  return (char *) catalog_name;
383*4882a593Smuzhiyun-}
384*4882a593Smuzhiyun-
385*4882a593Smuzhiyun-char *
386*4882a593Smuzhiyun-bindtextdomain (domainname, dirname)
387*4882a593Smuzhiyun-     const char *domainname;
388*4882a593Smuzhiyun-     const char *dirname;
389*4882a593Smuzhiyun-{
390*4882a593Smuzhiyun-#if HAVE_SETENV || HAVE_PUTENV
391*4882a593Smuzhiyun-  char *old_val, *new_val, *cp;
392*4882a593Smuzhiyun-  size_t new_val_len;
393*4882a593Smuzhiyun-
394*4882a593Smuzhiyun-  /* This does not make much sense here but to be compatible do it.  */
395*4882a593Smuzhiyun-  if (domainname == NULL)
396*4882a593Smuzhiyun-    return NULL;
397*4882a593Smuzhiyun-
398*4882a593Smuzhiyun-  /* Compute length of added path element.  If we use setenv we don't need
399*4882a593Smuzhiyun-     the first byts for NLSPATH=, but why complicate the code for this
400*4882a593Smuzhiyun-     peanuts.  */
401*4882a593Smuzhiyun-  new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
402*4882a593Smuzhiyun-		+ sizeof ("/%L/LC_MESSAGES/%N.cat");
403*4882a593Smuzhiyun-
404*4882a593Smuzhiyun-  old_val = getenv ("NLSPATH");
405*4882a593Smuzhiyun-  if (old_val == NULL || old_val[0] == '\0')
406*4882a593Smuzhiyun-    {
407*4882a593Smuzhiyun-      old_val = NULL;
408*4882a593Smuzhiyun-      new_val_len += 1 + sizeof (LOCALEDIR) - 1
409*4882a593Smuzhiyun-	             + sizeof ("/%L/LC_MESSAGES/%N.cat");
410*4882a593Smuzhiyun-    }
411*4882a593Smuzhiyun-  else
412*4882a593Smuzhiyun-    new_val_len += strlen (old_val);
413*4882a593Smuzhiyun-
414*4882a593Smuzhiyun-  new_val = (char *) malloc (new_val_len);
415*4882a593Smuzhiyun-  if (new_val == NULL)
416*4882a593Smuzhiyun-    return NULL;
417*4882a593Smuzhiyun-
418*4882a593Smuzhiyun-# if HAVE_SETENV
419*4882a593Smuzhiyun-  cp = new_val;
420*4882a593Smuzhiyun-# else
421*4882a593Smuzhiyun-  cp = stpcpy (new_val, "NLSPATH=");
422*4882a593Smuzhiyun-# endif
423*4882a593Smuzhiyun-
424*4882a593Smuzhiyun-  cp = stpcpy (cp, dirname);
425*4882a593Smuzhiyun-  cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
426*4882a593Smuzhiyun-
427*4882a593Smuzhiyun-  if (old_val == NULL)
428*4882a593Smuzhiyun-    {
429*4882a593Smuzhiyun-# if __STDC__
430*4882a593Smuzhiyun-      stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
431*4882a593Smuzhiyun-# else
432*4882a593Smuzhiyun-
433*4882a593Smuzhiyun-      cp = stpcpy (cp, LOCALEDIR);
434*4882a593Smuzhiyun-      stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
435*4882a593Smuzhiyun-# endif
436*4882a593Smuzhiyun-    }
437*4882a593Smuzhiyun-  else
438*4882a593Smuzhiyun-    stpcpy (cp, old_val);
439*4882a593Smuzhiyun-
440*4882a593Smuzhiyun-# if HAVE_SETENV
441*4882a593Smuzhiyun-  setenv ("NLSPATH", new_val, 1);
442*4882a593Smuzhiyun-  free (new_val);
443*4882a593Smuzhiyun-# else
444*4882a593Smuzhiyun-  putenv (new_val);
445*4882a593Smuzhiyun-  /* Do *not* free the environment entry we just entered.  It is used
446*4882a593Smuzhiyun-     from now on.   */
447*4882a593Smuzhiyun-# endif
448*4882a593Smuzhiyun-
449*4882a593Smuzhiyun-#endif
450*4882a593Smuzhiyun-
451*4882a593Smuzhiyun-  return (char *) domainname;
452*4882a593Smuzhiyun-}
453*4882a593Smuzhiyun-
454*4882a593Smuzhiyun-#undef gettext
455*4882a593Smuzhiyun-char *
456*4882a593Smuzhiyun-gettext (msg)
457*4882a593Smuzhiyun-     const char *msg;
458*4882a593Smuzhiyun-{
459*4882a593Smuzhiyun-  int msgid;
460*4882a593Smuzhiyun-
461*4882a593Smuzhiyun-  if (msg == NULL || catalog == (nl_catd) -1)
462*4882a593Smuzhiyun-    return (char *) msg;
463*4882a593Smuzhiyun-
464*4882a593Smuzhiyun-  /* Get the message from the catalog.  We always use set number 1.
465*4882a593Smuzhiyun-     The message ID is computed by the function `msg_to_cat_id'
466*4882a593Smuzhiyun-     which works on the table generated by `po-to-tbl'.  */
467*4882a593Smuzhiyun-  msgid = msg_to_cat_id (msg);
468*4882a593Smuzhiyun-  if (msgid == -1)
469*4882a593Smuzhiyun-    return (char *) msg;
470*4882a593Smuzhiyun-
471*4882a593Smuzhiyun-  return catgets (catalog, 1, msgid, (char *) msg);
472*4882a593Smuzhiyun-}
473*4882a593Smuzhiyun-
474*4882a593Smuzhiyun-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
475*4882a593Smuzhiyun-   for the one equal to msg.  If it is found return the ID.  In case when
476*4882a593Smuzhiyun-   the string is not found return -1.  */
477*4882a593Smuzhiyun-static int
478*4882a593Smuzhiyun-msg_to_cat_id (msg)
479*4882a593Smuzhiyun-     const char *msg;
480*4882a593Smuzhiyun-{
481*4882a593Smuzhiyun-  int cnt;
482*4882a593Smuzhiyun-
483*4882a593Smuzhiyun-  for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
484*4882a593Smuzhiyun-    if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
485*4882a593Smuzhiyun-      return _msg_tbl[cnt]._msg_number;
486*4882a593Smuzhiyun-
487*4882a593Smuzhiyun-  return -1;
488*4882a593Smuzhiyun-}
489*4882a593Smuzhiyun-
490*4882a593Smuzhiyun-
491*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
492*4882a593Smuzhiyun-
493*4882a593Smuzhiyun-/* We don't want libintl.a to depend on any other library.  So we
494*4882a593Smuzhiyun-   avoid the non-standard function stpcpy.  In GNU C Library this
495*4882a593Smuzhiyun-   function is available, though.  Also allow the symbol HAVE_STPCPY
496*4882a593Smuzhiyun-   to be defined.  */
497*4882a593Smuzhiyun-#if !_LIBC && !HAVE_STPCPY
498*4882a593Smuzhiyun-static char *
499*4882a593Smuzhiyun-stpcpy (dest, src)
500*4882a593Smuzhiyun-     char *dest;
501*4882a593Smuzhiyun-     const char *src;
502*4882a593Smuzhiyun-{
503*4882a593Smuzhiyun-  while ((*dest++ = *src++) != '\0')
504*4882a593Smuzhiyun-    /* Do nothing. */ ;
505*4882a593Smuzhiyun-  return dest - 1;
506*4882a593Smuzhiyun-}
507*4882a593Smuzhiyun-#endif
508*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/ChangeLog lrzsz-0.12.20/intl/ChangeLog
509*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/ChangeLog	1998-04-26 14:22:35.000000000 +0100
510*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/ChangeLog	1970-01-01 01:00:00.000000000 +0100
511*4882a593Smuzhiyun@@ -1,1022 +0,0 @@
512*4882a593Smuzhiyun-1997-09-06 02:10  Ulrich Drepper  <drepper@cygnus.com>
513*4882a593Smuzhiyun-
514*4882a593Smuzhiyun-	* intlh.inst.in: Reformat copyright.
515*4882a593Smuzhiyun-
516*4882a593Smuzhiyun-1997-08-19 15:22  Ulrich Drepper  <drepper@cygnus.com>
517*4882a593Smuzhiyun-
518*4882a593Smuzhiyun-	* dcgettext.c (DCGETTEXT): Remove wrong comment.
519*4882a593Smuzhiyun-
520*4882a593Smuzhiyun-1997-08-16 00:13  Ulrich Drepper  <drepper@cygnus.com>
521*4882a593Smuzhiyun-
522*4882a593Smuzhiyun-	* Makefile.in (install-data): Don't change directory to install.
523*4882a593Smuzhiyun-
524*4882a593Smuzhiyun-1997-08-01 14:30  Ulrich Drepper  <drepper@cygnus.com>
525*4882a593Smuzhiyun-
526*4882a593Smuzhiyun-	* cat-compat.c: Fix copyright.
527*4882a593Smuzhiyun-
528*4882a593Smuzhiyun-	* localealias.c: Don't define strchr unless !HAVE_STRCHR.
529*4882a593Smuzhiyun-
530*4882a593Smuzhiyun-	* loadmsgcat.c: Update copyright.  Fix typos.
531*4882a593Smuzhiyun-
532*4882a593Smuzhiyun-	* l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
533*4882a593Smuzhiyun-	(_nl_make_l10nflist): Handle sponsor and revision correctly.
534*4882a593Smuzhiyun-
535*4882a593Smuzhiyun-	* gettext.c: Update copyright.
536*4882a593Smuzhiyun-	* gettext.h: Likewise.
537*4882a593Smuzhiyun-	* hash-string.h: Likewise.
538*4882a593Smuzhiyun-
539*4882a593Smuzhiyun-	* finddomain.c: Remoave dead code.  Define strchr only if
540*4882a593Smuzhiyun-	!HAVE_STRCHR.
541*4882a593Smuzhiyun-
542*4882a593Smuzhiyun-	* explodename.c: Include <sys/types.h>.
543*4882a593Smuzhiyun-
544*4882a593Smuzhiyun-	* explodename.c: Reformat copyright text.
545*4882a593Smuzhiyun-	(_nl_explode_name): Fix typo.
546*4882a593Smuzhiyun-
547*4882a593Smuzhiyun-	* dcgettext.c: Define and use __set_errno.
548*4882a593Smuzhiyun-	(guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
549*4882a593Smuzhiyun-	not defined.
550*4882a593Smuzhiyun-
551*4882a593Smuzhiyun-	* bindtextdom.c: Pretty printing.
552*4882a593Smuzhiyun-
553*4882a593Smuzhiyun-1997-05-01 02:25  Ulrich Drepper  <drepper@cygnus.com>
554*4882a593Smuzhiyun-
555*4882a593Smuzhiyun-	* dcgettext.c (guess_category_value): Don't depend on
556*4882a593Smuzhiyun-	HAVE_LC_MESSAGES.  We don't need the macro here.
557*4882a593Smuzhiyun-	Patch by Bruno Haible <haible@ilog.fr>.
558*4882a593Smuzhiyun-
559*4882a593Smuzhiyun-	* cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
560*4882a593Smuzhiyun-	macro.  Instead use HAVE_LOCALE_NULL and define it when using
561*4882a593Smuzhiyun-	glibc, as in dcgettext.c.
562*4882a593Smuzhiyun-	Patch by Bruno Haible <haible@ilog.fr>.
563*4882a593Smuzhiyun-
564*4882a593Smuzhiyun-	* Makefile.in (CPPFLAGS): New variable.  Reported by Franc,ois
565*4882a593Smuzhiyun-	Pinard.
566*4882a593Smuzhiyun-
567*4882a593Smuzhiyun-Mon Mar 10 06:51:17 1997  Ulrich Drepper  <drepper@cygnus.com>
568*4882a593Smuzhiyun-
569*4882a593Smuzhiyun-	* Makefile.in: Implement handling of libtool.
570*4882a593Smuzhiyun-
571*4882a593Smuzhiyun-	* gettextP.h: Change data structures for use of generic lowlevel
572*4882a593Smuzhiyun-	i18n file handling.
573*4882a593Smuzhiyun-
574*4882a593Smuzhiyun-Wed Dec  4 20:21:18 1996  Ulrich Drepper  <drepper@cygnus.com>
575*4882a593Smuzhiyun-
576*4882a593Smuzhiyun-	* textdomain.c: Put parentheses around arguments of memcpy macro
577*4882a593Smuzhiyun-	definition.
578*4882a593Smuzhiyun-	* localealias.c: Likewise.
579*4882a593Smuzhiyun-	* l10nflist.c: Likewise.
580*4882a593Smuzhiyun-	* finddomain.c: Likewise.
581*4882a593Smuzhiyun-	* bindtextdom.c: Likewise.
582*4882a593Smuzhiyun-	Reported by Thomas Esken.
583*4882a593Smuzhiyun-
584*4882a593Smuzhiyun-Mon Nov 25 22:57:51 1996  Ulrich Drepper  <drepper@cygnus.com>
585*4882a593Smuzhiyun-
586*4882a593Smuzhiyun-	* textdomain.c: Move definition of `memcpy` macro to right
587*4882a593Smuzhiyun-	position.
588*4882a593Smuzhiyun-
589*4882a593Smuzhiyun-Fri Nov 22 04:01:58 1996  Ulrich Drepper  <drepper@cygnus.com>
590*4882a593Smuzhiyun-
591*4882a593Smuzhiyun-	* finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
592*4882a593Smuzhiyun- 	bcopy if not already defined.  Reported by Thomas Esken.
593*4882a593Smuzhiyun-	* bindtextdom.c: Likewise.
594*4882a593Smuzhiyun-	* l10nflist.c: Likewise.
595*4882a593Smuzhiyun-	* localealias.c: Likewise.
596*4882a593Smuzhiyun-	* textdomain.c: Likewise.
597*4882a593Smuzhiyun-
598*4882a593Smuzhiyun-Tue Oct 29 11:10:27 1996  Ulrich Drepper  <drepper@cygnus.com>
599*4882a593Smuzhiyun-
600*4882a593Smuzhiyun-	* Makefile.in (libdir): Change to use exec_prefix instead of
601*4882a593Smuzhiyun- 	prefix.  Reported by Knut-H�vardAksnes <etokna@eto.ericsson.se>.
602*4882a593Smuzhiyun-
603*4882a593Smuzhiyun-Sat Aug 31 03:07:09 1996  Ulrich Drepper  <drepper@cygnus.com>
604*4882a593Smuzhiyun-
605*4882a593Smuzhiyun-	* l10nflist.c (_nl_normalize_codeset): We convert to lower case,
606*4882a593Smuzhiyun-	so don't prepend uppercase `ISO' for only numeric arg.
607*4882a593Smuzhiyun-
608*4882a593Smuzhiyun-Fri Jul 19 00:15:46 1996  Ulrich Drepper  <drepper@cygnus.com>
609*4882a593Smuzhiyun-
610*4882a593Smuzhiyun-	* l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
611*4882a593Smuzhiyun-	definition of _GNU_SOURCE.  Patch by Roland McGrath.
612*4882a593Smuzhiyun-
613*4882a593Smuzhiyun-	* Makefile.in (uninstall): Fix another bug with `for' loop and
614*4882a593Smuzhiyun-	empty arguments.  Patch by Jim Meyering.  Correct name os
615*4882a593Smuzhiyun-	uninstalled files: no intl- prefix anymore.
616*4882a593Smuzhiyun-
617*4882a593Smuzhiyun-	* Makefile.in (install-data): Again work around shells which
618*4882a593Smuzhiyun-	cannot handle mpty for list.  Reported by Jim Meyering.
619*4882a593Smuzhiyun-
620*4882a593Smuzhiyun-Sat Jul 13 18:11:35 1996  Ulrich Drepper  <drepper@cygnus.com>
621*4882a593Smuzhiyun-
622*4882a593Smuzhiyun-	* Makefile.in (install): Split goal.  Now depend on install-exec
623*4882a593Smuzhiyun-        and install-data.
624*4882a593Smuzhiyun-	(install-exec, install-data): New goals.  Created from former
625*4882a593Smuzhiyun-	install goal.
626*4882a593Smuzhiyun-	Reported by Karl Berry.
627*4882a593Smuzhiyun-
628*4882a593Smuzhiyun-Sat Jun 22 04:58:14 1996  Ulrich Drepper  <drepper@cygnus.com>
629*4882a593Smuzhiyun-
630*4882a593Smuzhiyun-	* Makefile.in (MKINSTALLDIRS): New variable.  Path to
631*4882a593Smuzhiyun-        mkinstalldirs script.
632*4882a593Smuzhiyun-	(install): use MKINSTALLDIRS variable or if the script is not present
633*4882a593Smuzhiyun-	try to find it in the $top_scrdir).
634*4882a593Smuzhiyun-
635*4882a593Smuzhiyun-Wed Jun 19 02:56:56 1996  Ulrich Drepper  <drepper@cygnus.com>
636*4882a593Smuzhiyun-
637*4882a593Smuzhiyun-	* l10nflist.c: Linux libc *partly* includes the argz_* functions.
638*4882a593Smuzhiyun-	Grr.  Work around by renaming the static version and use macros
639*4882a593Smuzhiyun-	for renaming.
640*4882a593Smuzhiyun-
641*4882a593Smuzhiyun-Tue Jun 18 20:11:17 1996  Ulrich Drepper  <drepper@cygnus.com>
642*4882a593Smuzhiyun-
643*4882a593Smuzhiyun-	* l10nflist.c: Correct presence test macros of __argz_* functions.
644*4882a593Smuzhiyun-
645*4882a593Smuzhiyun-	* l10nflist.c: Include <argz.h> based on test of it instead when
646*4882a593Smuzhiyun-	__argz_* functions are available.
647*4882a593Smuzhiyun-	Reported by Andreas Schwab.
648*4882a593Smuzhiyun-
649*4882a593Smuzhiyun-Thu Jun 13 15:17:44 1996  Ulrich Drepper  <drepper@cygnus.com>
650*4882a593Smuzhiyun-
651*4882a593Smuzhiyun-	* explodename.c, l10nflist.c: Define NULL for dumb systems.
652*4882a593Smuzhiyun-
653*4882a593Smuzhiyun-Tue Jun 11 17:05:13 1996  Ulrich Drepper  <drepper@cygnus.com>
654*4882a593Smuzhiyun-
655*4882a593Smuzhiyun-	* intlh.inst.in, libgettext.h (dcgettext): Rename local variable
656*4882a593Smuzhiyun-	result to __result to prevent name clash.
657*4882a593Smuzhiyun-
658*4882a593Smuzhiyun-	* l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
659*4882a593Smuzhiyun-        get prototype for stpcpy and strcasecmp.
660*4882a593Smuzhiyun-
661*4882a593Smuzhiyun-	* intlh.inst.in, libgettext.h: Move declaration of
662*4882a593Smuzhiyun-	`_nl_msg_cat_cntr' outside __extension__ block to prevent warning
663*4882a593Smuzhiyun-	from gcc's -Wnested-extern option.
664*4882a593Smuzhiyun-
665*4882a593Smuzhiyun-Fri Jun  7 01:58:00 1996  Ulrich Drepper  <drepper@cygnus.com>
666*4882a593Smuzhiyun-
667*4882a593Smuzhiyun-	* Makefile.in (install): Remove comment.
668*4882a593Smuzhiyun-
669*4882a593Smuzhiyun-Thu Jun  6 17:28:17 1996  Ulrich Drepper  <drepper@cygnus.com>
670*4882a593Smuzhiyun-
671*4882a593Smuzhiyun-	* Makefile.in (install): Work around for another Buglix stupidity.
672*4882a593Smuzhiyun-	Always use an `else' close for `if's.  Reported by Nelson Beebe.
673*4882a593Smuzhiyun-
674*4882a593Smuzhiyun-	* Makefile.in (intlh.inst): Correct typo in phony rule.
675*4882a593Smuzhiyun-	Reported by Nelson Beebe.
676*4882a593Smuzhiyun-
677*4882a593Smuzhiyun-Thu Jun  6 01:49:52 1996  Ulrich Drepper  <drepper@cygnus.com>
678*4882a593Smuzhiyun-
679*4882a593Smuzhiyun-	* dcgettext.c (read_alias_file): Rename variable alloca_list to
680*4882a593Smuzhiyun-	block_list as the macro calls assume.
681*4882a593Smuzhiyun-	Patch by Eric Backus.
682*4882a593Smuzhiyun-
683*4882a593Smuzhiyun-	* localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
684*4882a593Smuzhiyun-        malloc.
685*4882a593Smuzhiyun-	(read_alias_file): Rename varriabe alloca_list to block_list as the
686*4882a593Smuzhiyun-	macro calls assume.
687*4882a593Smuzhiyun-	Patch by Eric Backus.
688*4882a593Smuzhiyun-
689*4882a593Smuzhiyun-	* l10nflist.c: Correct conditional for <argz.h> inclusion.
690*4882a593Smuzhiyun-	Reported by Roland McGrath.
691*4882a593Smuzhiyun-
692*4882a593Smuzhiyun-	* Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
693*4882a593Smuzhiyun-        all-@USE_NLS@.
694*4882a593Smuzhiyun-
695*4882a593Smuzhiyun-	* Makefile.in (install): intlh.inst comes from local dir, not
696*4882a593Smuzhiyun-        $(srcdir).
697*4882a593Smuzhiyun-
698*4882a593Smuzhiyun-	* Makefile.in (intlh.inst): Special handling of this goal.  If
699*4882a593Smuzhiyun-	used in gettext, this is really a rul to construct this file.  If
700*4882a593Smuzhiyun-	used in any other package it is defined as a .PHONY rule with
701*4882a593Smuzhiyun-	empty body.
702*4882a593Smuzhiyun-
703*4882a593Smuzhiyun-	* finddomain.c: Extract locale file information handling into
704*4882a593Smuzhiyun-	l10nfile.c.  Rename local stpcpy__ function to stpcpy.
705*4882a593Smuzhiyun-
706*4882a593Smuzhiyun-	* dcgettext.c (stpcpy): Add local definition.
707*4882a593Smuzhiyun-
708*4882a593Smuzhiyun-	* l10nflist.c: Solve some portability problems.  Patches partly by
709*4882a593Smuzhiyun-	Thomas Esken.  Add local definition of stpcpy.
710*4882a593Smuzhiyun-
711*4882a593Smuzhiyun-Tue Jun  4 02:47:49 1996  Ulrich Drepper  <drepper@cygnus.com>
712*4882a593Smuzhiyun-
713*4882a593Smuzhiyun-	* intlh.inst.in: Don't depend including <locale.h> on
714*4882a593Smuzhiyun-	HAVE_LOCALE_H.  Instead configure must rewrite this fiile
715*4882a593Smuzhiyun-	depending on the result of the configure run.
716*4882a593Smuzhiyun-
717*4882a593Smuzhiyun-	* Makefile.in (install): libintl.inst is now called intlh.inst.
718*4882a593Smuzhiyun-	Add rules for updating intlh.inst from intlh.inst.in.
719*4882a593Smuzhiyun-
720*4882a593Smuzhiyun-	* libintl.inst: Renamed to intlh.inst.in.
721*4882a593Smuzhiyun-
722*4882a593Smuzhiyun-	* localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
723*4882a593Smuzhiyun-        because gcc has __buitlin_alloca.
724*4882a593Smuzhiyun-	Reported by Roland McGrath.
725*4882a593Smuzhiyun-
726*4882a593Smuzhiyun-Mon Jun  3 00:32:16 1996  Ulrich Drepper  <drepper@cygnus.com>
727*4882a593Smuzhiyun-
728*4882a593Smuzhiyun-	* Makefile.in (installcheck): New goal to fulfill needs of
729*4882a593Smuzhiyun-        automake's distcheck.
730*4882a593Smuzhiyun-
731*4882a593Smuzhiyun-	* Makefile.in (install): Reorder commands so that VERSION is
732*4882a593Smuzhiyun-        found.
733*4882a593Smuzhiyun-
734*4882a593Smuzhiyun-	* Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
735*4882a593Smuzhiyun-        @datadir@/gettext.
736*4882a593Smuzhiyun-	(COMSRCS): Add l10nfile.c.
737*4882a593Smuzhiyun-	(OBJECTS): Add l10nfile.o.
738*4882a593Smuzhiyun-	(DISTFILES): Rename to DISTFILE.normal.  Remove $(DISTFILES.common).
739*4882a593Smuzhiyun-	(DISTFILE.gettext): Remove $(DISTFILES.common).
740*4882a593Smuzhiyun-	(all-gettext): Remove goal.
741*4882a593Smuzhiyun-	(install): If $(PACKAGE) = gettext install, otherwose do nothing.  No
742*4882a593Smuzhiyun-	package but gettext itself should install libintl.h + headers.
743*4882a593Smuzhiyun-	(dist): Extend goal to work for gettext, too.
744*4882a593Smuzhiyun-	(dist-gettext): Remove goal.
745*4882a593Smuzhiyun-
746*4882a593Smuzhiyun-	* dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
747*4882a593Smuzhiyun-
748*4882a593Smuzhiyun-Sun Jun  2 17:33:06 1996  Ulrich Drepper  <drepper@cygnus.com>
749*4882a593Smuzhiyun-
750*4882a593Smuzhiyun-	* loadmsgcat.c (_nl_load_domain): Parameter is now comes from
751*4882a593Smuzhiyun-        find_l10nfile.
752*4882a593Smuzhiyun-
753*4882a593Smuzhiyun-Sat Jun  1 02:23:03 1996  Ulrich Drepper  <drepper@cygnus.com>
754*4882a593Smuzhiyun-
755*4882a593Smuzhiyun-	* l10nflist.c (__argz_next): Add definition.
756*4882a593Smuzhiyun-
757*4882a593Smuzhiyun-	* dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
758*4882a593Smuzhiyun-	code.  Use new l10nfile handling.
759*4882a593Smuzhiyun-
760*4882a593Smuzhiyun-	* localealias.c [!HAVE_ALLOCA]: Add code for handling missing
761*4882a593Smuzhiyun-        alloca code.
762*4882a593Smuzhiyun-
763*4882a593Smuzhiyun-	* l10nflist.c: Initial revision.
764*4882a593Smuzhiyun-
765*4882a593Smuzhiyun-Tue Apr  2 18:51:18 1996  Ulrich Drepper  <drepper@myware>
766*4882a593Smuzhiyun-
767*4882a593Smuzhiyun-	* Makefile.in (all-gettext): New goal.  Same as all-yes.
768*4882a593Smuzhiyun-
769*4882a593Smuzhiyun-Thu Mar 28 23:01:22 1996  Karl Eichwalder  <ke@ke.central.de>
770*4882a593Smuzhiyun-
771*4882a593Smuzhiyun-	* Makefile.in (gettextsrcdir): Define using @datadir@.
772*4882a593Smuzhiyun-
773*4882a593Smuzhiyun-Tue Mar 26 12:39:14 1996  Ulrich Drepper  <drepper@myware>
774*4882a593Smuzhiyun-
775*4882a593Smuzhiyun-	* finddomain.c: Include <ctype.h>.  Reported by Roland McGrath.
776*4882a593Smuzhiyun-
777*4882a593Smuzhiyun-Sat Mar 23 02:00:35 1996  Ulrich Drepper  <drepper@myware>
778*4882a593Smuzhiyun-
779*4882a593Smuzhiyun-	* finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
780*4882a593Smuzhiyun-        with external declaration.
781*4882a593Smuzhiyun-
782*4882a593Smuzhiyun-Sat Mar  2 00:47:09 1996  Ulrich Drepper  <drepper@myware>
783*4882a593Smuzhiyun-
784*4882a593Smuzhiyun-	* Makefile.in (all-no): Rename from all_no.
785*4882a593Smuzhiyun-
786*4882a593Smuzhiyun-Sat Feb 17 00:25:59 1996  Ulrich Drepper  <drepper@myware>
787*4882a593Smuzhiyun-
788*4882a593Smuzhiyun-	* gettextP.h [loaded_domain]: Array `successor' must now contain up
789*4882a593Smuzhiyun-        to 63 elements (because of codeset name normalization).
790*4882a593Smuzhiyun-
791*4882a593Smuzhiyun-	* finddomain.c: Implement codeset name normalization.
792*4882a593Smuzhiyun-
793*4882a593Smuzhiyun-Thu Feb 15 04:39:09 1996  Ulrich Drepper  <drepper@myware>
794*4882a593Smuzhiyun-
795*4882a593Smuzhiyun-	* Makefile.in (all): Define to `all-@USE_NLS@'.
796*4882a593Smuzhiyun-	(all-yes, all_no): New goals.  `all-no' is noop, `all-yes'
797*4882a593Smuzhiyun-	is former all.
798*4882a593Smuzhiyun-
799*4882a593Smuzhiyun-Mon Jan 15 21:46:01 1996  Howard Gayle  <howard@hal.com>
800*4882a593Smuzhiyun-
801*4882a593Smuzhiyun-	* localealias.c (alias_compare): Increment string pointers in loop
802*4882a593Smuzhiyun-        of strcasecmp replacement.
803*4882a593Smuzhiyun-
804*4882a593Smuzhiyun-Fri Dec 29 21:16:34 1995  Ulrich Drepper  <drepper@myware>
805*4882a593Smuzhiyun-
806*4882a593Smuzhiyun-	* Makefile.in (install-src): Who commented this goal out ? :-)
807*4882a593Smuzhiyun-
808*4882a593Smuzhiyun-Fri Dec 29 15:08:16 1995  Ulrich Drepper  <drepper@myware>
809*4882a593Smuzhiyun-
810*4882a593Smuzhiyun-	* dcgettext.c (DCGETTEXT): Save `errno'.  Failing system calls
811*4882a593Smuzhiyun-	should not effect it because a missing catalog is no error.
812*4882a593Smuzhiyun-	Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
813*4882a593Smuzhiyun-
814*4882a593Smuzhiyun-Tue Dec 19 22:09:13 1995  Ulrich Drepper  <drepper@myware>
815*4882a593Smuzhiyun-
816*4882a593Smuzhiyun-	* Makefile.in (Makefile): Explicitly use $(SHELL) for running
817*4882a593Smuzhiyun-        shell scripts.
818*4882a593Smuzhiyun-
819*4882a593Smuzhiyun-Fri Dec 15 17:34:59 1995  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
820*4882a593Smuzhiyun-
821*4882a593Smuzhiyun-	* Makefile.in (install-src): Only install library and header when
822*4882a593Smuzhiyun-	we use the own implementation.  Don't do it when using the
823*4882a593Smuzhiyun-	system's gettext or catgets functions.
824*4882a593Smuzhiyun-
825*4882a593Smuzhiyun-	* dcgettext.c (find_msg): Must not swap domain->hash_size here.
826*4882a593Smuzhiyun-
827*4882a593Smuzhiyun-Sat Dec  9 16:24:37 1995  Ulrich Drepper  <drepper@myware>
828*4882a593Smuzhiyun-
829*4882a593Smuzhiyun-	* localealias.c, libintl.inst, libgettext.h, hash-string.h,
830*4882a593Smuzhiyun-	gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
831*4882a593Smuzhiyun-	Use PARAMS instead of __P.  Suggested by Roland McGrath.
832*4882a593Smuzhiyun-
833*4882a593Smuzhiyun-Tue Dec  5 11:39:14 1995  Larry Schwimmer  <rosebud@cyclone.stanford.edu>
834*4882a593Smuzhiyun-
835*4882a593Smuzhiyun-	* libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
836*4882a593Smuzhiyun-	!_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
837*4882a593Smuzhiyun-
838*4882a593Smuzhiyun-Mon Dec  4 15:42:07 1995  Ulrich Drepper  <drepper@myware>
839*4882a593Smuzhiyun-
840*4882a593Smuzhiyun-	* Makefile.in (install-src):
841*4882a593Smuzhiyun-	Install libintl.inst instead of libintl.h.install.
842*4882a593Smuzhiyun-
843*4882a593Smuzhiyun-Sat Dec  2 22:51:38 1995  Marcus Daniels  <marcus@sysc.pdx.edu>
844*4882a593Smuzhiyun-
845*4882a593Smuzhiyun-	* cat-compat.c (textdomain):
846*4882a593Smuzhiyun-	Reverse order in which files are tried you load.  First
847*4882a593Smuzhiyun-	try local file, when this failed absolute path.
848*4882a593Smuzhiyun-
849*4882a593Smuzhiyun-Wed Nov 29 02:03:53 1995  Nelson H. F. Beebe  <beebe@math.utah.edu>
850*4882a593Smuzhiyun-
851*4882a593Smuzhiyun-	* cat-compat.c (bindtextdomain): Add missing { }.
852*4882a593Smuzhiyun-
853*4882a593Smuzhiyun-Sun Nov 26 18:21:41 1995  Ulrich Drepper  <drepper@myware>
854*4882a593Smuzhiyun-
855*4882a593Smuzhiyun-	* libintl.inst: Add missing __P definition.  Reported by Nelson Beebe.
856*4882a593Smuzhiyun-
857*4882a593Smuzhiyun-	* Makefile.in:
858*4882a593Smuzhiyun-	Add dummy `all' and `dvi' goals.  Reported by Tom Tromey.
859*4882a593Smuzhiyun-
860*4882a593Smuzhiyun-Sat Nov 25 16:12:01 1995  Franc,ois Pinard  <pinard@iro.umontreal.ca>
861*4882a593Smuzhiyun-
862*4882a593Smuzhiyun-	* hash-string.h: Capitalize arguments of macros.
863*4882a593Smuzhiyun-
864*4882a593Smuzhiyun-Sat Nov 25 12:01:36 1995  Ulrich Drepper  <drepper@myware>
865*4882a593Smuzhiyun-
866*4882a593Smuzhiyun-	* Makefile.in (DISTFILES): Prevent files names longer than 13
867*4882a593Smuzhiyun-	characters.  libintl.h.glibc->libintl.glibc,
868*4882a593Smuzhiyun-	libintl.h.install->libintl.inst.  Reported by Joshua R. Poulson.
869*4882a593Smuzhiyun-
870*4882a593Smuzhiyun-Sat Nov 25 11:31:12 1995  Eric Backus  <ericb@lsid.hp.com>
871*4882a593Smuzhiyun-
872*4882a593Smuzhiyun-	* dcgettext.c: Fix bug in preprocessor conditionals.
873*4882a593Smuzhiyun-
874*4882a593Smuzhiyun-Sat Nov 25 02:35:27 1995  Nelson H. F. Beebe  <beebe@math.utah.edu>
875*4882a593Smuzhiyun-
876*4882a593Smuzhiyun-	* libgettext.h: Solaris cc does not understand
877*4882a593Smuzhiyun-	 #if !SYMBOL1 && !SYMBOL2.  Sad	but true.
878*4882a593Smuzhiyun-
879*4882a593Smuzhiyun-Thu Nov 23 16:22:14 1995  Ulrich Drepper  <drepper@myware>
880*4882a593Smuzhiyun-
881*4882a593Smuzhiyun-	* hash-string.h (hash_string):
882*4882a593Smuzhiyun-	Fix for machine with >32 bit `unsigned long's.
883*4882a593Smuzhiyun-
884*4882a593Smuzhiyun-	* dcgettext.c (DCGETTEXT):
885*4882a593Smuzhiyun-	Fix horrible bug in loop for alternative translation.
886*4882a593Smuzhiyun-
887*4882a593Smuzhiyun-Thu Nov 23 01:45:29 1995  Ulrich Drepper  <drepper@myware>
888*4882a593Smuzhiyun-
889*4882a593Smuzhiyun-	* po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
890*4882a593Smuzhiyun-	Some further simplifications in message number generation.
891*4882a593Smuzhiyun-
892*4882a593Smuzhiyun-Mon Nov 20 21:08:43 1995  Ulrich Drepper  <drepper@myware>
893*4882a593Smuzhiyun-
894*4882a593Smuzhiyun-	* libintl.h.glibc: Use __const instead of const in prototypes.
895*4882a593Smuzhiyun-
896*4882a593Smuzhiyun-	* Makefile.in (install-src):
897*4882a593Smuzhiyun-	Install libintl.h.install instead of libintl.h.  This
898*4882a593Smuzhiyun-	is a stripped-down version.  Suggested by Peter Miller.
899*4882a593Smuzhiyun-
900*4882a593Smuzhiyun-	* libintl.h.install, libintl.h.glibc: Initial revision.
901*4882a593Smuzhiyun-
902*4882a593Smuzhiyun-	* localealias.c (_nl_expand_alias, read_alias_file):
903*4882a593Smuzhiyun-	Protect prototypes in type casts by __P.
904*4882a593Smuzhiyun-
905*4882a593Smuzhiyun-Tue Nov 14 16:43:58 1995  Ulrich Drepper  <drepper@myware>
906*4882a593Smuzhiyun-
907*4882a593Smuzhiyun-	* hash-string.h: Correct prototype for hash_string.
908*4882a593Smuzhiyun-
909*4882a593Smuzhiyun-Sun Nov 12 12:42:30 1995  Ulrich Drepper  <drepper@myware>
910*4882a593Smuzhiyun-
911*4882a593Smuzhiyun-	* hash-string.h (hash_string): Add prototype.
912*4882a593Smuzhiyun-
913*4882a593Smuzhiyun-	* gettextP.h: Fix copyright.
914*4882a593Smuzhiyun-	(SWAP): Add prototype.
915*4882a593Smuzhiyun-
916*4882a593Smuzhiyun-Wed Nov  8 22:56:33 1995  Ulrich Drepper  <drepper@myware>
917*4882a593Smuzhiyun-
918*4882a593Smuzhiyun-	* localealias.c (read_alias_file): Forgot sizeof.
919*4882a593Smuzhiyun-	Avoid calling *printf function.  This introduces a big overhead.
920*4882a593Smuzhiyun-	Patch by Roland McGrath.
921*4882a593Smuzhiyun-
922*4882a593Smuzhiyun-Tue Nov  7 14:21:08 1995  Ulrich Drepper  <drepper@myware>
923*4882a593Smuzhiyun-
924*4882a593Smuzhiyun-	* finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
925*4882a593Smuzhiyun-
926*4882a593Smuzhiyun-	* finddomain.c (stpcpy):
927*4882a593Smuzhiyun-	Define substitution function local.  The macro was to flaky.
928*4882a593Smuzhiyun-
929*4882a593Smuzhiyun-	* cat-compat.c: Fix typo.
930*4882a593Smuzhiyun-
931*4882a593Smuzhiyun-	* xopen-msg.sed, linux-msg.sed:
932*4882a593Smuzhiyun-	While bringing message number to right place only accept digits.
933*4882a593Smuzhiyun-
934*4882a593Smuzhiyun-	* linux-msg.sed, xopen-msg.sed: Now that the counter does not have
935*4882a593Smuzhiyun-	leading 0s we don't need to remove them.  Reported by Marcus
936*4882a593Smuzhiyun-	Daniels.
937*4882a593Smuzhiyun-
938*4882a593Smuzhiyun-	* Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
939*4882a593Smuzhiyun-	dependency.  Reported by Marcus Daniels.
940*4882a593Smuzhiyun-
941*4882a593Smuzhiyun-	* cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
942*4882a593Smuzhiyun-	Generally cleanup using #if instead of #ifndef.
943*4882a593Smuzhiyun-
944*4882a593Smuzhiyun-	* Makefile.in: Correct typos in comment.  By Franc,ois Pinard.
945*4882a593Smuzhiyun-
946*4882a593Smuzhiyun-Mon Nov  6 00:27:02 1995  Ulrich Drepper  <drepper@myware>
947*4882a593Smuzhiyun-
948*4882a593Smuzhiyun-	* Makefile.in (install-src): Don't install libintl.h and libintl.a
949*4882a593Smuzhiyun-	if we use an available gettext implementation.
950*4882a593Smuzhiyun-
951*4882a593Smuzhiyun-Sun Nov  5 22:02:08 1995  Ulrich Drepper  <drepper@myware>
952*4882a593Smuzhiyun-
953*4882a593Smuzhiyun-	* libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS.  Reported
954*4882a593Smuzhiyun-	by Franc,ois Pinard.
955*4882a593Smuzhiyun-
956*4882a593Smuzhiyun-	* libgettext.h: Use #if instead of #ifdef/#ifndef.
957*4882a593Smuzhiyun-
958*4882a593Smuzhiyun-	* finddomain.c:
959*4882a593Smuzhiyun-	Comments describing what has to be done should start with FIXME.
960*4882a593Smuzhiyun-
961*4882a593Smuzhiyun-Sun Nov  5 19:38:01 1995  Ulrich Drepper  <drepper@myware>
962*4882a593Smuzhiyun-
963*4882a593Smuzhiyun-	* Makefile.in (DISTFILES): Split.  Use DISTFILES with normal meaning.
964*4882a593Smuzhiyun-	DISTFILES.common names the files common to both dist goals.
965*4882a593Smuzhiyun-	DISTFILES.gettext are the files only distributed in GNU gettext.
966*4882a593Smuzhiyun-
967*4882a593Smuzhiyun-Sun Nov  5 17:32:54 1995  Ulrich Drepper  <drepper@myware>
968*4882a593Smuzhiyun-
969*4882a593Smuzhiyun-	* dcgettext.c (DCGETTEXT): Correct searching in derived locales.
970*4882a593Smuzhiyun-	This was necessary since a change in _nl_find_msg several weeks
971*4882a593Smuzhiyun-	ago.  I really don't know this is still not fixed.
972*4882a593Smuzhiyun-
973*4882a593Smuzhiyun-Sun Nov  5 12:43:12 1995  Ulrich Drepper  <drepper@myware>
974*4882a593Smuzhiyun-
975*4882a593Smuzhiyun-	* loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL.  This
976*4882a593Smuzhiyun-	might mark a special condition.
977*4882a593Smuzhiyun-
978*4882a593Smuzhiyun-	* finddomain.c (make_entry_rec): Don't make illegal entry as decided.
979*4882a593Smuzhiyun-
980*4882a593Smuzhiyun-	* Makefile.in (dist): Suppress error message when ln failed.
981*4882a593Smuzhiyun-	Get files from $(srcdir) explicitly.
982*4882a593Smuzhiyun-
983*4882a593Smuzhiyun-	* libgettext.h (gettext_const): Rename to gettext_noop.
984*4882a593Smuzhiyun-
985*4882a593Smuzhiyun-Fri Nov  3 07:36:50 1995  Ulrich Drepper  <drepper@myware>
986*4882a593Smuzhiyun-
987*4882a593Smuzhiyun-	* finddomain.c (make_entry_rec):
988*4882a593Smuzhiyun-	Protect against wrong locale names by testing mask.
989*4882a593Smuzhiyun-
990*4882a593Smuzhiyun-	* libgettext.h (gettext_const): Add macro definition.
991*4882a593Smuzhiyun-	Capitalize macro arguments.
992*4882a593Smuzhiyun-
993*4882a593Smuzhiyun-Thu Nov  2 23:15:51 1995  Ulrich Drepper  <drepper@myware>
994*4882a593Smuzhiyun-
995*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain):
996*4882a593Smuzhiyun-	Test for pointer != NULL before accessing value.
997*4882a593Smuzhiyun-	Reported by Tom Tromey.
998*4882a593Smuzhiyun-
999*4882a593Smuzhiyun-	* gettext.c (NULL):
1000*4882a593Smuzhiyun-	Define as (void*)0 instad of 0.  Reported by Franc,ois Pinard.
1001*4882a593Smuzhiyun-
1002*4882a593Smuzhiyun-Mon Oct 30 21:28:52 1995  Ulrich Drepper  <drepper@myware>
1003*4882a593Smuzhiyun-
1004*4882a593Smuzhiyun-	* po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
1005*4882a593Smuzhiyun-
1006*4882a593Smuzhiyun-Sat Oct 28 23:20:47 1995  Ulrich Drepper  <drepper@myware>
1007*4882a593Smuzhiyun-
1008*4882a593Smuzhiyun-	* libgettext.h: Disable dcgettext optimization for Solaris 2.3.
1009*4882a593Smuzhiyun-
1010*4882a593Smuzhiyun-	* localealias.c (alias_compare):
1011*4882a593Smuzhiyun-	Peter Miller reported that tolower in some systems is
1012*4882a593Smuzhiyun-	even dumber than I thought.  Protect call by `isupper'.
1013*4882a593Smuzhiyun-
1014*4882a593Smuzhiyun-Fri Oct 27 22:22:51 1995  Ulrich Drepper  <drepper@myware>
1015*4882a593Smuzhiyun-
1016*4882a593Smuzhiyun-	* Makefile.in (libdir, includedir): New variables.
1017*4882a593Smuzhiyun-	(install-src): Install libintl.a and libintl.h in correct dirs.
1018*4882a593Smuzhiyun-
1019*4882a593Smuzhiyun-Fri Oct 27 22:07:29 1995  Ulrich Drepper  <drepper@myware>
1020*4882a593Smuzhiyun-
1021*4882a593Smuzhiyun-	* Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
1022*4882a593Smuzhiyun-
1023*4882a593Smuzhiyun-	* po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
1024*4882a593Smuzhiyun-
1025*4882a593Smuzhiyun-	* localealias.c:
1026*4882a593Smuzhiyun-	Fix typo and superflous test.  Reported by Christian von Roques.
1027*4882a593Smuzhiyun-
1028*4882a593Smuzhiyun-Fri Oct  6 11:52:05 1995  Ulrich Drepper  <drepper@myware>
1029*4882a593Smuzhiyun-
1030*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain):
1031*4882a593Smuzhiyun-	Correct some remainder from the pre-CEN syntax.  Now
1032*4882a593Smuzhiyun-	we don't have a constant number of successors anymore.
1033*4882a593Smuzhiyun-
1034*4882a593Smuzhiyun-Wed Sep 27 21:41:13 1995  Ulrich Drepper  <drepper@myware>
1035*4882a593Smuzhiyun-
1036*4882a593Smuzhiyun-	* Makefile.in (DISTFILES): Add libintl.h.glibc.
1037*4882a593Smuzhiyun-
1038*4882a593Smuzhiyun-	* Makefile.in (dist-libc): Add goal for packing sources for glibc.
1039*4882a593Smuzhiyun-	(COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
1040*4882a593Smuzhiyun-
1041*4882a593Smuzhiyun-	* loadmsgcat.c: Forget to continue #if line.
1042*4882a593Smuzhiyun-
1043*4882a593Smuzhiyun-	* localealias.c:
1044*4882a593Smuzhiyun-	[_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
1045*4882a593Smuzhiyun-	space clean.
1046*4882a593Smuzhiyun-
1047*4882a593Smuzhiyun-	* dcgettext.c, finddomain.c: Better comment to last change.
1048*4882a593Smuzhiyun-
1049*4882a593Smuzhiyun-	* loadmsgcat.c:
1050*4882a593Smuzhiyun-	[_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
1051*4882a593Smuzhiyun-	__fstat, __open, __close, __read, __mmap, and __munmap resp
1052*4882a593Smuzhiyun-	to keep ANSI C name space clean.
1053*4882a593Smuzhiyun-
1054*4882a593Smuzhiyun-	* finddomain.c:
1055*4882a593Smuzhiyun-	[_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
1056*4882a593Smuzhiyun-
1057*4882a593Smuzhiyun-	* dcgettext.c:
1058*4882a593Smuzhiyun-	[_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
1059*4882a593Smuzhiyun-	keep ANSI C name space clean.
1060*4882a593Smuzhiyun-
1061*4882a593Smuzhiyun-	* libgettext.h:
1062*4882a593Smuzhiyun-	Include sys/types.h for those old SysV systems out there.
1063*4882a593Smuzhiyun-	Reported by Francesco Potorti`.
1064*4882a593Smuzhiyun-
1065*4882a593Smuzhiyun-	* loadmsgcat.c (use_mmap): Define if compiled for glibc.
1066*4882a593Smuzhiyun-
1067*4882a593Smuzhiyun-	* bindtextdom.c: Include all those standard headers
1068*4882a593Smuzhiyun-	unconditionally if _LIBC is defined.
1069*4882a593Smuzhiyun-
1070*4882a593Smuzhiyun-	* finddomain.c: Fix 2 times defiend -> defined.
1071*4882a593Smuzhiyun-
1072*4882a593Smuzhiyun-	* textdomain.c: Include libintl.h instead of libgettext.h when
1073*4882a593Smuzhiyun-	compiling for glibc.  Include all those standard headers
1074*4882a593Smuzhiyun-	unconditionally if _LIBC is defined.
1075*4882a593Smuzhiyun-
1076*4882a593Smuzhiyun-	* localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
1077*4882a593Smuzhiyun-
1078*4882a593Smuzhiyun-	* gettext.c:
1079*4882a593Smuzhiyun-	Include libintl.h instead of libgettext.h when compiling for glibc.
1080*4882a593Smuzhiyun-	Get NULL from stddef.h if we compile for glibc.
1081*4882a593Smuzhiyun-
1082*4882a593Smuzhiyun-	* finddomain.c: Include libintl.h instead of libgettext.h when
1083*4882a593Smuzhiyun-	compiling for glibc.  Include all those standard headers
1084*4882a593Smuzhiyun-	unconditionally if _LIBC is defined.
1085*4882a593Smuzhiyun-
1086*4882a593Smuzhiyun-	* dcgettext.c: Include all those standard headers unconditionally
1087*4882a593Smuzhiyun-	if _LIBC is defined.
1088*4882a593Smuzhiyun-
1089*4882a593Smuzhiyun-	* dgettext.c: If compiled in glibc include libintl.h instead of
1090*4882a593Smuzhiyun-	libgettext.h.
1091*4882a593Smuzhiyun-	(locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
1092*4882a593Smuzhiyun-
1093*4882a593Smuzhiyun-	* dcgettext.c: If compiled in glibc include libintl.h instead of
1094*4882a593Smuzhiyun-	libgettext.h.
1095*4882a593Smuzhiyun-	(getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
1096*4882a593Smuzhiyun-
1097*4882a593Smuzhiyun-	* bindtextdom.c:
1098*4882a593Smuzhiyun-	If compiled in glibc include libintl.h instead of libgettext.h.
1099*4882a593Smuzhiyun-
1100*4882a593Smuzhiyun-Mon Sep 25 22:23:06 1995  Ulrich Drepper  <drepper@myware>
1101*4882a593Smuzhiyun-
1102*4882a593Smuzhiyun-	* localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
1103*4882a593Smuzhiyun-	Reported by Marcus Daniels.
1104*4882a593Smuzhiyun-
1105*4882a593Smuzhiyun-	* cat-compat.c (bindtextdomain):
1106*4882a593Smuzhiyun-	String used in putenv must not be recycled.
1107*4882a593Smuzhiyun-	Reported by Marcus Daniels.
1108*4882a593Smuzhiyun-
1109*4882a593Smuzhiyun-	* libgettext.h (__USE_GNU_GETTEXT):
1110*4882a593Smuzhiyun-	Additional symbol to signal that we use GNU gettext
1111*4882a593Smuzhiyun-	library.
1112*4882a593Smuzhiyun-
1113*4882a593Smuzhiyun-	* cat-compat.c (bindtextdomain):
1114*4882a593Smuzhiyun-	Fix bug with the strange stpcpy replacement.
1115*4882a593Smuzhiyun-	Reported by Nelson Beebe.
1116*4882a593Smuzhiyun-
1117*4882a593Smuzhiyun-Sat Sep 23 08:23:51 1995  Ulrich Drepper  <drepper@myware>
1118*4882a593Smuzhiyun-
1119*4882a593Smuzhiyun-	* cat-compat.c: Include <string.h> for stpcpy prototype.
1120*4882a593Smuzhiyun-
1121*4882a593Smuzhiyun-	* localealias.c (read_alias_file):
1122*4882a593Smuzhiyun-	While expand strdup code temporary variable `cp' hided
1123*4882a593Smuzhiyun-	higher level variable with same name.  Rename to `tp'.
1124*4882a593Smuzhiyun-
1125*4882a593Smuzhiyun-	* textdomain.c (textdomain):
1126*4882a593Smuzhiyun-	Avoid warning by using temporary variable in strdup code.
1127*4882a593Smuzhiyun-
1128*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain): Remove unused variable `application'.
1129*4882a593Smuzhiyun-
1130*4882a593Smuzhiyun-Thu Sep 21 15:51:44 1995  Ulrich Drepper  <drepper@myware>
1131*4882a593Smuzhiyun-
1132*4882a593Smuzhiyun-	* localealias.c (alias_compare):
1133*4882a593Smuzhiyun-	Use strcasecmp() only if available.  Else use
1134*4882a593Smuzhiyun-	implementation in place.
1135*4882a593Smuzhiyun-
1136*4882a593Smuzhiyun-	* intl-compat.c:
1137*4882a593Smuzhiyun-	Wrapper functions now call *__ functions instead of __*.
1138*4882a593Smuzhiyun-
1139*4882a593Smuzhiyun-	* libgettext.h: Declare prototypes for *__ functions instead for __*.
1140*4882a593Smuzhiyun-
1141*4882a593Smuzhiyun-	* cat-compat.c, loadmsgcat.c:
1142*4882a593Smuzhiyun-	Don't use xmalloc, xstrdup, and stpcpy.  These functions are not part
1143*4882a593Smuzhiyun-	of the standard libc and so prevent libintl.a from being used
1144*4882a593Smuzhiyun-	standalone.
1145*4882a593Smuzhiyun-
1146*4882a593Smuzhiyun-	* bindtextdom.c:
1147*4882a593Smuzhiyun-	Don't use xmalloc, xstrdup, and stpcpy.  These functions are not part
1148*4882a593Smuzhiyun-	of the standard libc and so prevent libintl.a from being used
1149*4882a593Smuzhiyun-	standalone.
1150*4882a593Smuzhiyun-	Rename to bindtextdomain__ if not used in GNU C Library.
1151*4882a593Smuzhiyun-
1152*4882a593Smuzhiyun-	* dgettext.c:
1153*4882a593Smuzhiyun-	Rename function to dgettext__ if not used in GNU C Library.
1154*4882a593Smuzhiyun-
1155*4882a593Smuzhiyun-	* gettext.c:
1156*4882a593Smuzhiyun-	Don't use xmalloc, xstrdup, and stpcpy.  These functions are not part
1157*4882a593Smuzhiyun-	of the standard libc and so prevent libintl.a from being used
1158*4882a593Smuzhiyun-	standalone.
1159*4882a593Smuzhiyun-	Functions now called gettext__ if not used in GNU C Library.
1160*4882a593Smuzhiyun-
1161*4882a593Smuzhiyun-	* dcgettext.c, localealias.c, textdomain.c, finddomain.c:
1162*4882a593Smuzhiyun-	Don't use xmalloc, xstrdup, and stpcpy.  These functions are not part
1163*4882a593Smuzhiyun-	of the standard libc and so prevent libintl.a from being used
1164*4882a593Smuzhiyun-	standalone.
1165*4882a593Smuzhiyun-
1166*4882a593Smuzhiyun-Sun Sep 17 23:14:49 1995  Ulrich Drepper  <drepper@myware>
1167*4882a593Smuzhiyun-
1168*4882a593Smuzhiyun-	* finddomain.c: Correct some bugs in handling of CEN standard
1169*4882a593Smuzhiyun- 	locale definitions.
1170*4882a593Smuzhiyun-
1171*4882a593Smuzhiyun-Thu Sep  7 01:49:28 1995  Ulrich Drepper  <drepper@myware>
1172*4882a593Smuzhiyun-
1173*4882a593Smuzhiyun-	* finddomain.c: Implement CEN syntax.
1174*4882a593Smuzhiyun-
1175*4882a593Smuzhiyun-	* gettextP.h (loaded_domain): Extend number of successors to 31.
1176*4882a593Smuzhiyun-
1177*4882a593Smuzhiyun-Sat Aug 19 19:25:29 1995  Ulrich Drepper  <drepper@myware>
1178*4882a593Smuzhiyun-
1179*4882a593Smuzhiyun-	* Makefile.in (aliaspath): Remove path to X11 locale dir.
1180*4882a593Smuzhiyun-
1181*4882a593Smuzhiyun-	* Makefile.in: Make install-src depend on install.  This helps
1182*4882a593Smuzhiyun- 	gettext to install the sources and other packages can use the
1183*4882a593Smuzhiyun- 	install goal.
1184*4882a593Smuzhiyun-
1185*4882a593Smuzhiyun-Sat Aug 19 15:19:33 1995  Ulrich Drepper  <drepper@myware>
1186*4882a593Smuzhiyun-
1187*4882a593Smuzhiyun-	* Makefile.in (uninstall): Remove stuff installed by install-src.
1188*4882a593Smuzhiyun-
1189*4882a593Smuzhiyun-Tue Aug 15 13:13:53 1995  Ulrich Drepper  <drepper@myware>
1190*4882a593Smuzhiyun-
1191*4882a593Smuzhiyun-	* VERSION.in: Initial revision.
1192*4882a593Smuzhiyun-
1193*4882a593Smuzhiyun-	* Makefile.in (DISTFILES):
1194*4882a593Smuzhiyun-	Add VERSION file.  This is not necessary for gettext, but
1195*4882a593Smuzhiyun-	for other packages using this library.
1196*4882a593Smuzhiyun-
1197*4882a593Smuzhiyun-Tue Aug 15 06:16:44 1995  Ulrich Drepper  <drepper@myware>
1198*4882a593Smuzhiyun-
1199*4882a593Smuzhiyun-	* gettextP.h (_nl_find_domain):
1200*4882a593Smuzhiyun-	New prototype after changing search strategy.
1201*4882a593Smuzhiyun-
1202*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain):
1203*4882a593Smuzhiyun-	We now try only to find a specified catalog.  Fall back to other
1204*4882a593Smuzhiyun-	catalogs listed in the locale list is now done in __dcgettext.
1205*4882a593Smuzhiyun-
1206*4882a593Smuzhiyun-	* dcgettext.c (__dcgettext):
1207*4882a593Smuzhiyun-	Now we provide message fall back even to different languages.
1208*4882a593Smuzhiyun-	I.e. if a message is not available in one language all the other
1209*4882a593Smuzhiyun- 	in the locale list a tried.  Formerly fall back was only possible
1210*4882a593Smuzhiyun- 	within one language.  Implemented by moving one loop from
1211*4882a593Smuzhiyun- 	_nl_find_domain to here.
1212*4882a593Smuzhiyun-
1213*4882a593Smuzhiyun-Mon Aug 14 23:45:50 1995  Ulrich Drepper  <drepper@myware>
1214*4882a593Smuzhiyun-
1215*4882a593Smuzhiyun-	* Makefile.in (gettextsrcdir):
1216*4882a593Smuzhiyun-	Directory where source of GNU gettext library are made
1217*4882a593Smuzhiyun-	available.
1218*4882a593Smuzhiyun-	(INSTALL, INSTALL_DATA): Programs used for installing sources.
1219*4882a593Smuzhiyun-	(gettext-src): New.  Rule to install GNU gettext sources for use in
1220*4882a593Smuzhiyun-	gettextize shell script.
1221*4882a593Smuzhiyun-
1222*4882a593Smuzhiyun-Sun Aug 13 14:40:48 1995  Ulrich Drepper  <drepper@myware>
1223*4882a593Smuzhiyun-
1224*4882a593Smuzhiyun-	* loadmsgcat.c (_nl_load_domain):
1225*4882a593Smuzhiyun-	Use mmap for loading only when munmap function is
1226*4882a593Smuzhiyun-	also available.
1227*4882a593Smuzhiyun-
1228*4882a593Smuzhiyun-	* Makefile.in (install): Depend on `all' goal.
1229*4882a593Smuzhiyun-
1230*4882a593Smuzhiyun-Wed Aug  9 11:04:33 1995  Ulrich Drepper  <drepper@myware>
1231*4882a593Smuzhiyun-
1232*4882a593Smuzhiyun-	* localealias.c (read_alias_file):
1233*4882a593Smuzhiyun-	Do not overwrite '\n' when terminating alias value string.
1234*4882a593Smuzhiyun-
1235*4882a593Smuzhiyun-	* localealias.c (read_alias_file):
1236*4882a593Smuzhiyun-	Handle long lines.  Ignore the rest not fitting in
1237*4882a593Smuzhiyun-	the buffer after the initial `fgets' call.
1238*4882a593Smuzhiyun-
1239*4882a593Smuzhiyun-Wed Aug  9 00:54:29 1995  Ulrich Drepper  <drepper@myware>
1240*4882a593Smuzhiyun-
1241*4882a593Smuzhiyun-	* gettextP.h (_nl_load_domain):
1242*4882a593Smuzhiyun-	Add prototype, replacing prototype for _nl_load_msg_cat.
1243*4882a593Smuzhiyun-
1244*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain):
1245*4882a593Smuzhiyun-	Remove unneeded variable filename and filename_len.
1246*4882a593Smuzhiyun-	(expand_alias): Remove prototype because functions does not
1247*4882a593Smuzhiyun- 	exist anymore.
1248*4882a593Smuzhiyun-
1249*4882a593Smuzhiyun-	* localealias.c (read_alias_file):
1250*4882a593Smuzhiyun-	Change type of fname_len parameter to int.
1251*4882a593Smuzhiyun-	(xmalloc): Add prototype.
1252*4882a593Smuzhiyun-
1253*4882a593Smuzhiyun-	* loadmsgcat.c: Better prototypes for xmalloc.
1254*4882a593Smuzhiyun-
1255*4882a593Smuzhiyun-Tue Aug  8 22:30:39 1995  Ulrich Drepper  <drepper@myware>
1256*4882a593Smuzhiyun-
1257*4882a593Smuzhiyun-	* finddomain.c (_nl_find_domain):
1258*4882a593Smuzhiyun-	Allow alias name to be constructed from the four components.
1259*4882a593Smuzhiyun-
1260*4882a593Smuzhiyun-	* Makefile.in (aliaspath): New variable.  Set to preliminary value.
1261*4882a593Smuzhiyun-	(SOURCES): Add localealias.c.
1262*4882a593Smuzhiyun-	(OBJECTS): Add localealias.o.
1263*4882a593Smuzhiyun-
1264*4882a593Smuzhiyun-	* gettextP.h: Add prototype for _nl_expand_alias.
1265*4882a593Smuzhiyun-
1266*4882a593Smuzhiyun-	* finddomain.c: Aliasing handled in intl/localealias.c.
1267*4882a593Smuzhiyun-
1268*4882a593Smuzhiyun-	* localealias.c: Aliasing for locale names.
1269*4882a593Smuzhiyun-
1270*4882a593Smuzhiyun-	* bindtextdom.c: Better prototypes for xmalloc and xstrdup.
1271*4882a593Smuzhiyun-
1272*4882a593Smuzhiyun-Mon Aug  7 23:47:42 1995  Ulrich Drepper  <drepper@myware>
1273*4882a593Smuzhiyun-
1274*4882a593Smuzhiyun-	* Makefile.in (DISTFILES): gettext.perl is now found in misc/.
1275*4882a593Smuzhiyun-
1276*4882a593Smuzhiyun-	* cat-compat.c (bindtextdomain):
1277*4882a593Smuzhiyun-	Correct implementation.  dirname parameter was not used.
1278*4882a593Smuzhiyun-	Reported by Marcus Daniels.
1279*4882a593Smuzhiyun-
1280*4882a593Smuzhiyun-	* gettextP.h (loaded_domain):
1281*4882a593Smuzhiyun-	New fields `successor' and `decided' for oo, lazy
1282*4882a593Smuzhiyun-	message handling implementation.
1283*4882a593Smuzhiyun-
1284*4882a593Smuzhiyun-	* dcgettext.c:
1285*4882a593Smuzhiyun-	Adopt for oo, lazy message handliing.
1286*4882a593Smuzhiyun-  	Now we can inherit translations from less specific locales.
1287*4882a593Smuzhiyun-	(find_msg): New function.
1288*4882a593Smuzhiyun-
1289*4882a593Smuzhiyun-	* loadmsgcat.c, finddomain.c:
1290*4882a593Smuzhiyun-	Complete rewrite.  Implement oo, lazy message handling :-).
1291*4882a593Smuzhiyun-  	We now have an additional environment variable `LANGUAGE' with
1292*4882a593Smuzhiyun- 	a higher priority than LC_ALL for the LC_MESSAGE locale.
1293*4882a593Smuzhiyun-  	Here we can set a colon separated list of specifications each
1294*4882a593Smuzhiyun- 	of the form `language[_territory[.codeset]][@modifier]'.
1295*4882a593Smuzhiyun-
1296*4882a593Smuzhiyun-Sat Aug  5 09:55:42 1995  Ulrich Drepper  <drepper@myware>
1297*4882a593Smuzhiyun-
1298*4882a593Smuzhiyun-	* finddomain.c (unistd.h):
1299*4882a593Smuzhiyun-	Include to get _PC_PATH_MAX defined on system having it.
1300*4882a593Smuzhiyun-
1301*4882a593Smuzhiyun-Fri Aug  4 22:42:00 1995  Ulrich Drepper  <drepper@myware>
1302*4882a593Smuzhiyun-
1303*4882a593Smuzhiyun-	* finddomain.c (stpcpy): Include prototype.
1304*4882a593Smuzhiyun-
1305*4882a593Smuzhiyun-	* Makefile.in (dist): Remove `copying instead' message.
1306*4882a593Smuzhiyun-
1307*4882a593Smuzhiyun-Wed Aug  2 18:52:03 1995  Ulrich Drepper  <drepper@myware>
1308*4882a593Smuzhiyun-
1309*4882a593Smuzhiyun-	* Makefile.in (ID, TAGS): Do not use $^.
1310*4882a593Smuzhiyun-
1311*4882a593Smuzhiyun-Tue Aug  1 20:07:11 1995  Ulrich Drepper  <drepper@myware>
1312*4882a593Smuzhiyun-
1313*4882a593Smuzhiyun-	* Makefile.in (TAGS, ID): Use $^ as command argument.
1314*4882a593Smuzhiyun-	(TAGS): Give etags -o option t write to current directory,
1315*4882a593Smuzhiyun- 	not $(srcdir).
1316*4882a593Smuzhiyun-	(ID): Use $(srcdir) instead os $(top_srcdir)/src.
1317*4882a593Smuzhiyun-	(distclean): Remove ID.
1318*4882a593Smuzhiyun-
1319*4882a593Smuzhiyun-Sun Jul 30 11:51:46 1995  Ulrich Drepper  <drepper@myware>
1320*4882a593Smuzhiyun-
1321*4882a593Smuzhiyun-	* Makefile.in (gnulocaledir):
1322*4882a593Smuzhiyun-	New variable, always using share/ for data directory.
1323*4882a593Smuzhiyun-	(DEFS): Add GNULOCALEDIR, used in finddomain.c.
1324*4882a593Smuzhiyun-
1325*4882a593Smuzhiyun-	* finddomain.c (_nl_default_dirname):
1326*4882a593Smuzhiyun-	Set to GNULOCALEDIR, because it always has to point
1327*4882a593Smuzhiyun-	to the directory where GNU gettext Library writes it to.
1328*4882a593Smuzhiyun-
1329*4882a593Smuzhiyun-	* intl-compat.c (textdomain, bindtextdomain):
1330*4882a593Smuzhiyun-	Undefine macros before function definition.
1331*4882a593Smuzhiyun-
1332*4882a593Smuzhiyun-Sat Jul 22 01:10:02 1995  Ulrich Drepper  <drepper@myware>
1333*4882a593Smuzhiyun-
1334*4882a593Smuzhiyun-	* libgettext.h (_LIBINTL_H):
1335*4882a593Smuzhiyun-	Protect definition in case where this file is included as
1336*4882a593Smuzhiyun-	libgettext.h on Solaris machines.  Add comment about this.
1337*4882a593Smuzhiyun-
1338*4882a593Smuzhiyun-Wed Jul 19 02:36:42 1995  Ulrich Drepper  <drepper@myware>
1339*4882a593Smuzhiyun-
1340*4882a593Smuzhiyun-	* intl-compat.c (textdomain): Correct typo.
1341*4882a593Smuzhiyun-
1342*4882a593Smuzhiyun-Wed Jul 19 01:51:35 1995  Ulrich Drepper  <drepper@myware>
1343*4882a593Smuzhiyun-
1344*4882a593Smuzhiyun-	* dcgettext.c (dcgettext): Function now called __dcgettext.
1345*4882a593Smuzhiyun-
1346*4882a593Smuzhiyun-	* dgettext.c (dgettext): Now called __dgettext and calls
1347*4882a593Smuzhiyun- 	__dcgettext.
1348*4882a593Smuzhiyun-
1349*4882a593Smuzhiyun-	* gettext.c (gettext):
1350*4882a593Smuzhiyun-	Function now called __gettext and calls __dgettext.
1351*4882a593Smuzhiyun-
1352*4882a593Smuzhiyun-	* textdomain.c (textdomain): Function now called __textdomain.
1353*4882a593Smuzhiyun-
1354*4882a593Smuzhiyun-	* bindtextdom.c (bindtextdomain): Function now called
1355*4882a593Smuzhiyun- 	__bindtextdomain.
1356*4882a593Smuzhiyun-
1357*4882a593Smuzhiyun-	* intl-compat.c: Initial revision.
1358*4882a593Smuzhiyun-
1359*4882a593Smuzhiyun-	* Makefile.in (SOURCES): Add intl-compat.c.
1360*4882a593Smuzhiyun-	(OBJECTS): We always compile the GNU gettext library functions.
1361*4882a593Smuzhiyun-  	OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
1362*4882a593Smuzhiyun- 	and intl-compat.o.
1363*4882a593Smuzhiyun-  	(GETTOBJS): Contains now only intl-compat.o.
1364*4882a593Smuzhiyun-
1365*4882a593Smuzhiyun-	* libgettext.h:
1366*4882a593Smuzhiyun-	Re-include protection matches dualistic character of libgettext.h.
1367*4882a593Smuzhiyun-	For all functions in GNU gettext library define __ counter part.
1368*4882a593Smuzhiyun-
1369*4882a593Smuzhiyun-	* finddomain.c (strchr): Define as index if not found in C library.
1370*4882a593Smuzhiyun-	(_nl_find_domain): For relative paths paste / in between.
1371*4882a593Smuzhiyun-
1372*4882a593Smuzhiyun-Tue Jul 18 16:37:45 1995  Ulrich Drepper  <drepper@myware>
1373*4882a593Smuzhiyun-
1374*4882a593Smuzhiyun-	* loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
1375*4882a593Smuzhiyun-
1376*4882a593Smuzhiyun-	* xopen-msg.sed: Fix bug with `msgstr ""' lines.
1377*4882a593Smuzhiyun-	A little bit better comments.
1378*4882a593Smuzhiyun-
1379*4882a593Smuzhiyun-Tue Jul 18 01:18:27 1995  Ulrich Drepper  <drepper@myware>
1380*4882a593Smuzhiyun-
1381*4882a593Smuzhiyun-	* Makefile.in:
1382*4882a593Smuzhiyun-	po-mode.el, makelinks, combine-sh are now found in ../misc.
1383*4882a593Smuzhiyun-
1384*4882a593Smuzhiyun-	* po-mode.el, makelinks, combine-sh, elisp-comp:
1385*4882a593Smuzhiyun-	Moved to ../misc/.
1386*4882a593Smuzhiyun-
1387*4882a593Smuzhiyun-	* libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
1388*4882a593Smuzhiyun-
1389*4882a593Smuzhiyun-Sun Jul 16 22:33:02 1995  Ulrich Drepper  <drepper@myware>
1390*4882a593Smuzhiyun-
1391*4882a593Smuzhiyun-	* Makefile.in (INSTALL, INSTALL_DATA): New variables.
1392*4882a593Smuzhiyun-	(install-data, uninstall): Install/uninstall .elc file.
1393*4882a593Smuzhiyun-
1394*4882a593Smuzhiyun-	* po-mode.el (Installation comment):
1395*4882a593Smuzhiyun-	Add .pox as possible extension of .po files.
1396*4882a593Smuzhiyun-
1397*4882a593Smuzhiyun-Sun Jul 16 13:23:27 1995  Ulrich Drepper  <drepper@myware>
1398*4882a593Smuzhiyun-
1399*4882a593Smuzhiyun-	* elisp-comp: Complete new version by Franc,ois: This does not
1400*4882a593Smuzhiyun- 	fail when not compiling in the source directory.
1401*4882a593Smuzhiyun-
1402*4882a593Smuzhiyun-Sun Jul 16 00:12:17 1995  Ulrich Drepper  <drepper@myware>
1403*4882a593Smuzhiyun-
1404*4882a593Smuzhiyun-	* Makefile.in (../po/cat-id-tbl.o):
1405*4882a593Smuzhiyun-	Use $(MAKE) instead of make for recursive make.
1406*4882a593Smuzhiyun-
1407*4882a593Smuzhiyun-	* Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
1408*4882a593Smuzhiyun-	(install-exec): Add missing dummy goal.
1409*4882a593Smuzhiyun-	(install-data, uninstall): @ in multi-line shell command at
1410*4882a593Smuzhiyun- 	beginning, not in front of echo.  Reported by Eric Backus.
1411*4882a593Smuzhiyun-
1412*4882a593Smuzhiyun-Sat Jul 15 00:21:28 1995  Ulrich Drepper  <drepper@myware>
1413*4882a593Smuzhiyun-
1414*4882a593Smuzhiyun-	* Makefile.in (DISTFILES):
1415*4882a593Smuzhiyun-	Rename libgettext.perl to gettext.perl to fit in 14 chars
1416*4882a593Smuzhiyun-	file systems.
1417*4882a593Smuzhiyun-
1418*4882a593Smuzhiyun-	* gettext.perl:
1419*4882a593Smuzhiyun- 	Rename to gettext.perl to fit in 14 chars file systems.
1420*4882a593Smuzhiyun-
1421*4882a593Smuzhiyun-Thu Jul 13 23:17:20 1995  Ulrich Drepper  <drepper@myware>
1422*4882a593Smuzhiyun-
1423*4882a593Smuzhiyun-	* cat-compat.c: If !STDC_HEADERS try to include malloc.h.
1424*4882a593Smuzhiyun-
1425*4882a593Smuzhiyun-Thu Jul 13 20:55:02 1995  Ulrich Drepper  <drepper@myware>
1426*4882a593Smuzhiyun-
1427*4882a593Smuzhiyun-	* po2tbl.sed.in: Pretty printing.
1428*4882a593Smuzhiyun-
1429*4882a593Smuzhiyun-	* linux-msg.sed, xopen-msg.sed:
1430*4882a593Smuzhiyun-	Correct bugs with handling substitute flags in branches.
1431*4882a593Smuzhiyun-
1432*4882a593Smuzhiyun-	* hash-string.h (hash_string):
1433*4882a593Smuzhiyun-	Old K&R compilers don't under stand `unsigned char'.
1434*4882a593Smuzhiyun-
1435*4882a593Smuzhiyun-	* gettext.h (nls_uint32):
1436*4882a593Smuzhiyun-	Some old K&R compilers (eg HP) don't understand `unsigned int'.
1437*4882a593Smuzhiyun-
1438*4882a593Smuzhiyun-	* cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
1439*4882a593Smuzhiyun-
1440*4882a593Smuzhiyun-Thu Jul 13 01:34:33 1995  Ulrich Drepper  <drepper@myware>
1441*4882a593Smuzhiyun-
1442*4882a593Smuzhiyun-	* Makefile.in (ELCFILES): New variable.
1443*4882a593Smuzhiyun-	(DISTFILES): Add elisp-comp.
1444*4882a593Smuzhiyun-	Add implicit rule for .el -> .elc compilation.
1445*4882a593Smuzhiyun-	(install-data): install $ELCFILES
1446*4882a593Smuzhiyun-	(clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
1447*4882a593Smuzhiyun-
1448*4882a593Smuzhiyun-	* elisp-comp: Initial revision
1449*4882a593Smuzhiyun-
1450*4882a593Smuzhiyun-Wed Jul 12 16:14:52 1995  Ulrich Drepper  <drepper@myware>
1451*4882a593Smuzhiyun-
1452*4882a593Smuzhiyun-	* Makefile.in:
1453*4882a593Smuzhiyun-	cat-id-tbl.c is now found in po/.  This enables us to use an identical
1454*4882a593Smuzhiyun-	intl/ directory in all packages.
1455*4882a593Smuzhiyun-
1456*4882a593Smuzhiyun-	* dcgettext.c (dcgettext): hashing does not work for table size <= 2.
1457*4882a593Smuzhiyun-
1458*4882a593Smuzhiyun-	* textdomain.c: fix typo (#if def -> #if defined)
1459*4882a593Smuzhiyun-
1460*4882a593Smuzhiyun-Tue Jul 11 18:44:43 1995  Ulrich Drepper  <drepper@myware>
1461*4882a593Smuzhiyun-
1462*4882a593Smuzhiyun-	* Makefile.in (stamp-cat-id): use top_srcdir to address source files
1463*4882a593Smuzhiyun-	(DISTFILES,distclean): move tupdate.perl to src/
1464*4882a593Smuzhiyun-
1465*4882a593Smuzhiyun-	* po-to-tbl.sed.in:
1466*4882a593Smuzhiyun-	add additional jump to clear change flag to recognize multiline strings
1467*4882a593Smuzhiyun-
1468*4882a593Smuzhiyun-Tue Jul 11 01:32:50 1995  Ulrich Drepper  <drepper@myware>
1469*4882a593Smuzhiyun-
1470*4882a593Smuzhiyun-	* textdomain.c: Protect inclusion of stdlib.h and string.h.
1471*4882a593Smuzhiyun-
1472*4882a593Smuzhiyun-	* loadmsgcat.c: Protect inclusion of stdlib.h.
1473*4882a593Smuzhiyun-
1474*4882a593Smuzhiyun-	* libgettext.h: Protect inclusion of locale.h.
1475*4882a593Smuzhiyun-	Allow use in C++ programs.
1476*4882a593Smuzhiyun-	Define NULL is not happened already.
1477*4882a593Smuzhiyun-
1478*4882a593Smuzhiyun-	* Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
1479*4882a593Smuzhiyun-	po-to-tbl.sed.
1480*4882a593Smuzhiyun-	(distclean): remove po-to-tbl.sed and tupdate.perl.
1481*4882a593Smuzhiyun-
1482*4882a593Smuzhiyun-	* tupdate.perl.in: Substitute Perl path even in exec line.
1483*4882a593Smuzhiyun-	Don't include entries without translation from old .po file.
1484*4882a593Smuzhiyun-
1485*4882a593Smuzhiyun-Tue Jul  4 00:41:51 1995  Ulrich Drepper  <drepper@myware>
1486*4882a593Smuzhiyun-
1487*4882a593Smuzhiyun-	* tupdate.perl.in: use "Updated: " in msgid "".
1488*4882a593Smuzhiyun-
1489*4882a593Smuzhiyun-	* cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
1490*4882a593Smuzhiyun- 	Define getenv if !__STDC__.
1491*4882a593Smuzhiyun-
1492*4882a593Smuzhiyun-	* bindtextdom.c: Protect stdlib.h and string.h inclusion.
1493*4882a593Smuzhiyun- 	Define free if !__STDC__.
1494*4882a593Smuzhiyun-
1495*4882a593Smuzhiyun-	* finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
1496*4882a593Smuzhiyun- 	Define free if !__STDC__.
1497*4882a593Smuzhiyun-
1498*4882a593Smuzhiyun-	* cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
1499*4882a593Smuzhiyun-
1500*4882a593Smuzhiyun-Mon Jul  3 23:56:30 1995  Ulrich Drepper  <drepper@myware>
1501*4882a593Smuzhiyun-
1502*4882a593Smuzhiyun-	* Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
1503*4882a593Smuzhiyun-	Remove unneeded $(srcdir) from Makefile.in dependency.
1504*4882a593Smuzhiyun-
1505*4882a593Smuzhiyun-	* makelinks: Add copyright and short description.
1506*4882a593Smuzhiyun-
1507*4882a593Smuzhiyun-	* po-mode.el: Last version for 0.7.
1508*4882a593Smuzhiyun-
1509*4882a593Smuzhiyun-	* tupdate.perl.in: Fix die message.
1510*4882a593Smuzhiyun-
1511*4882a593Smuzhiyun-	* dcgettext.c: Protect include of string.h.
1512*4882a593Smuzhiyun-
1513*4882a593Smuzhiyun-	* gettext.c: Protect include of stdlib.h and further tries to get NULL.
1514*4882a593Smuzhiyun-
1515*4882a593Smuzhiyun-	* finddomain.c: Some corrections in includes.
1516*4882a593Smuzhiyun-
1517*4882a593Smuzhiyun-	* Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
1518*4882a593Smuzhiyun-
1519*4882a593Smuzhiyun-	* po-to-tbl.sed: Adopt for new .po file format.
1520*4882a593Smuzhiyun-
1521*4882a593Smuzhiyun-	* linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
1522*4882a593Smuzhiyun-
1523*4882a593Smuzhiyun-Sun Jul  2 23:55:03 1995  Ulrich Drepper  <drepper@myware>
1524*4882a593Smuzhiyun-
1525*4882a593Smuzhiyun-	* tupdate.perl.in: Complete rewrite for new .po file format.
1526*4882a593Smuzhiyun-
1527*4882a593Smuzhiyun-Sun Jul  2 02:06:50 1995  Ulrich Drepper  <drepper@myware>
1528*4882a593Smuzhiyun-
1529*4882a593Smuzhiyun-	* First official release.  This directory contains all the code
1530*4882a593Smuzhiyun-	needed to internationalize own packages.  It provides functions
1531*4882a593Smuzhiyun-	which allow to use the X/Open catgets function with an interface
1532*4882a593Smuzhiyun-	like the Uniforum gettext function.  For system which does not
1533*4882a593Smuzhiyun-	have neither of those a complete implementation is provided.
1534*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/dcgettext.c lrzsz-0.12.20/intl/dcgettext.c
1535*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/dcgettext.c	1998-04-26 14:22:36.000000000 +0100
1536*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/dcgettext.c	1970-01-01 01:00:00.000000000 +0100
1537*4882a593Smuzhiyun@@ -1,593 +0,0 @@
1538*4882a593Smuzhiyun-/* Implementation of the dcgettext(3) function
1539*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
1540*4882a593Smuzhiyun-
1541*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
1542*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
1543*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
1544*4882a593Smuzhiyun-   any later version.
1545*4882a593Smuzhiyun-
1546*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
1547*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
1548*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
1549*4882a593Smuzhiyun-   GNU General Public License for more details.
1550*4882a593Smuzhiyun-
1551*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
1552*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
1553*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
1554*4882a593Smuzhiyun-
1555*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
1556*4882a593Smuzhiyun-# include <config.h>
1557*4882a593Smuzhiyun-#endif
1558*4882a593Smuzhiyun-
1559*4882a593Smuzhiyun-#include <sys/types.h>
1560*4882a593Smuzhiyun-
1561*4882a593Smuzhiyun-#ifdef __GNUC__
1562*4882a593Smuzhiyun-# define alloca __builtin_alloca
1563*4882a593Smuzhiyun-# define HAVE_ALLOCA 1
1564*4882a593Smuzhiyun-#else
1565*4882a593Smuzhiyun-# if defined HAVE_ALLOCA_H || defined _LIBC
1566*4882a593Smuzhiyun-#  include <alloca.h>
1567*4882a593Smuzhiyun-# else
1568*4882a593Smuzhiyun-#  ifdef _AIX
1569*4882a593Smuzhiyun- #pragma alloca
1570*4882a593Smuzhiyun-#  else
1571*4882a593Smuzhiyun-#   ifndef alloca
1572*4882a593Smuzhiyun-char *alloca ();
1573*4882a593Smuzhiyun-#   endif
1574*4882a593Smuzhiyun-#  endif
1575*4882a593Smuzhiyun-# endif
1576*4882a593Smuzhiyun-#endif
1577*4882a593Smuzhiyun-
1578*4882a593Smuzhiyun-#include <errno.h>
1579*4882a593Smuzhiyun-#ifndef errno
1580*4882a593Smuzhiyun-extern int errno;
1581*4882a593Smuzhiyun-#endif
1582*4882a593Smuzhiyun-#ifndef __set_errno
1583*4882a593Smuzhiyun-# define __set_errno(val) errno = (val)
1584*4882a593Smuzhiyun-#endif
1585*4882a593Smuzhiyun-
1586*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
1587*4882a593Smuzhiyun-# include <stdlib.h>
1588*4882a593Smuzhiyun-#else
1589*4882a593Smuzhiyun-char *getenv ();
1590*4882a593Smuzhiyun-# ifdef HAVE_MALLOC_H
1591*4882a593Smuzhiyun-#  include <malloc.h>
1592*4882a593Smuzhiyun-# else
1593*4882a593Smuzhiyun-void free ();
1594*4882a593Smuzhiyun-# endif
1595*4882a593Smuzhiyun-#endif
1596*4882a593Smuzhiyun-
1597*4882a593Smuzhiyun-#if defined HAVE_STRING_H || defined _LIBC
1598*4882a593Smuzhiyun-# ifndef _GNU_SOURCE
1599*4882a593Smuzhiyun-#  define _GNU_SOURCE	1
1600*4882a593Smuzhiyun-# endif
1601*4882a593Smuzhiyun-# include <string.h>
1602*4882a593Smuzhiyun-#else
1603*4882a593Smuzhiyun-# include <strings.h>
1604*4882a593Smuzhiyun-#endif
1605*4882a593Smuzhiyun-#if !HAVE_STRCHR && !defined _LIBC
1606*4882a593Smuzhiyun-# ifndef strchr
1607*4882a593Smuzhiyun-#  define strchr index
1608*4882a593Smuzhiyun-# endif
1609*4882a593Smuzhiyun-#endif
1610*4882a593Smuzhiyun-
1611*4882a593Smuzhiyun-#if defined HAVE_UNISTD_H || defined _LIBC
1612*4882a593Smuzhiyun-# include <unistd.h>
1613*4882a593Smuzhiyun-#endif
1614*4882a593Smuzhiyun-
1615*4882a593Smuzhiyun-#include "gettext.h"
1616*4882a593Smuzhiyun-#include "gettextP.h"
1617*4882a593Smuzhiyun-#ifdef _LIBC
1618*4882a593Smuzhiyun-# include <libintl.h>
1619*4882a593Smuzhiyun-#else
1620*4882a593Smuzhiyun-# include "libgettext.h"
1621*4882a593Smuzhiyun-#endif
1622*4882a593Smuzhiyun-#include "hash-string.h"
1623*4882a593Smuzhiyun-
1624*4882a593Smuzhiyun-/* @@ end of prolog @@ */
1625*4882a593Smuzhiyun-
1626*4882a593Smuzhiyun-#ifdef _LIBC
1627*4882a593Smuzhiyun-/* Rename the non ANSI C functions.  This is required by the standard
1628*4882a593Smuzhiyun-   because some ANSI C functions will require linking with this object
1629*4882a593Smuzhiyun-   file and the name space must not be polluted.  */
1630*4882a593Smuzhiyun-# define getcwd __getcwd
1631*4882a593Smuzhiyun-# define stpcpy __stpcpy
1632*4882a593Smuzhiyun-#else
1633*4882a593Smuzhiyun-# if !defined HAVE_GETCWD
1634*4882a593Smuzhiyun-char *getwd ();
1635*4882a593Smuzhiyun-#  define getcwd(buf, max) getwd (buf)
1636*4882a593Smuzhiyun-# else
1637*4882a593Smuzhiyun-char *getcwd ();
1638*4882a593Smuzhiyun-# endif
1639*4882a593Smuzhiyun-# ifndef HAVE_STPCPY
1640*4882a593Smuzhiyun-static char *stpcpy PARAMS ((char *dest, const char *src));
1641*4882a593Smuzhiyun-# endif
1642*4882a593Smuzhiyun-#endif
1643*4882a593Smuzhiyun-
1644*4882a593Smuzhiyun-/* Amount to increase buffer size by in each try.  */
1645*4882a593Smuzhiyun-#define PATH_INCR 32
1646*4882a593Smuzhiyun-
1647*4882a593Smuzhiyun-/* The following is from pathmax.h.  */
1648*4882a593Smuzhiyun-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
1649*4882a593Smuzhiyun-   PATH_MAX but might cause redefinition warnings when sys/param.h is
1650*4882a593Smuzhiyun-   later included (as on MORE/BSD 4.3).  */
1651*4882a593Smuzhiyun-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
1652*4882a593Smuzhiyun-# include <limits.h>
1653*4882a593Smuzhiyun-#endif
1654*4882a593Smuzhiyun-
1655*4882a593Smuzhiyun-#ifndef _POSIX_PATH_MAX
1656*4882a593Smuzhiyun-# define _POSIX_PATH_MAX 255
1657*4882a593Smuzhiyun-#endif
1658*4882a593Smuzhiyun-
1659*4882a593Smuzhiyun-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
1660*4882a593Smuzhiyun-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
1661*4882a593Smuzhiyun-#endif
1662*4882a593Smuzhiyun-
1663*4882a593Smuzhiyun-/* Don't include sys/param.h if it already has been.  */
1664*4882a593Smuzhiyun-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
1665*4882a593Smuzhiyun-# include <sys/param.h>
1666*4882a593Smuzhiyun-#endif
1667*4882a593Smuzhiyun-
1668*4882a593Smuzhiyun-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
1669*4882a593Smuzhiyun-# define PATH_MAX MAXPATHLEN
1670*4882a593Smuzhiyun-#endif
1671*4882a593Smuzhiyun-
1672*4882a593Smuzhiyun-#ifndef PATH_MAX
1673*4882a593Smuzhiyun-# define PATH_MAX _POSIX_PATH_MAX
1674*4882a593Smuzhiyun-#endif
1675*4882a593Smuzhiyun-
1676*4882a593Smuzhiyun-/* XPG3 defines the result of `setlocale (category, NULL)' as:
1677*4882a593Smuzhiyun-   ``Directs `setlocale()' to query `category' and return the current
1678*4882a593Smuzhiyun-     setting of `local'.''
1679*4882a593Smuzhiyun-   However it does not specify the exact format.  And even worse: POSIX
1680*4882a593Smuzhiyun-   defines this not at all.  So we can use this feature only on selected
1681*4882a593Smuzhiyun-   system (e.g. those using GNU C Library).  */
1682*4882a593Smuzhiyun-#ifdef _LIBC
1683*4882a593Smuzhiyun-# define HAVE_LOCALE_NULL
1684*4882a593Smuzhiyun-#endif
1685*4882a593Smuzhiyun-
1686*4882a593Smuzhiyun-/* Name of the default domain used for gettext(3) prior any call to
1687*4882a593Smuzhiyun-   textdomain(3).  The default value for this is "messages".  */
1688*4882a593Smuzhiyun-const char _nl_default_default_domain[] = "messages";
1689*4882a593Smuzhiyun-
1690*4882a593Smuzhiyun-/* Value used as the default domain for gettext(3).  */
1691*4882a593Smuzhiyun-const char *_nl_current_default_domain = _nl_default_default_domain;
1692*4882a593Smuzhiyun-
1693*4882a593Smuzhiyun-/* Contains the default location of the message catalogs.  */
1694*4882a593Smuzhiyun-const char _nl_default_dirname[] = GNULOCALEDIR;
1695*4882a593Smuzhiyun-
1696*4882a593Smuzhiyun-/* List with bindings of specific domains created by bindtextdomain()
1697*4882a593Smuzhiyun-   calls.  */
1698*4882a593Smuzhiyun-struct binding *_nl_domain_bindings;
1699*4882a593Smuzhiyun-
1700*4882a593Smuzhiyun-/* Prototypes for local functions.  */
1701*4882a593Smuzhiyun-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
1702*4882a593Smuzhiyun-			       const char *msgid));
1703*4882a593Smuzhiyun-static const char *category_to_name PARAMS ((int category));
1704*4882a593Smuzhiyun-static const char *guess_category_value PARAMS ((int category,
1705*4882a593Smuzhiyun-						 const char *categoryname));
1706*4882a593Smuzhiyun-
1707*4882a593Smuzhiyun-
1708*4882a593Smuzhiyun-/* For those loosing systems which don't have `alloca' we have to add
1709*4882a593Smuzhiyun-   some additional code emulating it.  */
1710*4882a593Smuzhiyun-#ifdef HAVE_ALLOCA
1711*4882a593Smuzhiyun-/* Nothing has to be done.  */
1712*4882a593Smuzhiyun-# define ADD_BLOCK(list, address) /* nothing */
1713*4882a593Smuzhiyun-# define FREE_BLOCKS(list) /* nothing */
1714*4882a593Smuzhiyun-#else
1715*4882a593Smuzhiyun-struct block_list
1716*4882a593Smuzhiyun-{
1717*4882a593Smuzhiyun-  void *address;
1718*4882a593Smuzhiyun-  struct block_list *next;
1719*4882a593Smuzhiyun-};
1720*4882a593Smuzhiyun-# define ADD_BLOCK(list, addr)						      \
1721*4882a593Smuzhiyun-  do {									      \
1722*4882a593Smuzhiyun-    struct block_list *newp = (struct block_list *) malloc (sizeof (*newp));  \
1723*4882a593Smuzhiyun-    /* If we cannot get a free block we cannot add the new element to	      \
1724*4882a593Smuzhiyun-       the list.  */							      \
1725*4882a593Smuzhiyun-    if (newp != NULL) {							      \
1726*4882a593Smuzhiyun-      newp->address = (addr);						      \
1727*4882a593Smuzhiyun-      newp->next = (list);						      \
1728*4882a593Smuzhiyun-      (list) = newp;							      \
1729*4882a593Smuzhiyun-    }									      \
1730*4882a593Smuzhiyun-  } while (0)
1731*4882a593Smuzhiyun-# define FREE_BLOCKS(list)						      \
1732*4882a593Smuzhiyun-  do {									      \
1733*4882a593Smuzhiyun-    while (list != NULL) {						      \
1734*4882a593Smuzhiyun-      struct block_list *old = list;					      \
1735*4882a593Smuzhiyun-      list = list->next;						      \
1736*4882a593Smuzhiyun-      free (old);							      \
1737*4882a593Smuzhiyun-    }									      \
1738*4882a593Smuzhiyun-  } while (0)
1739*4882a593Smuzhiyun-# undef alloca
1740*4882a593Smuzhiyun-# define alloca(size) (malloc (size))
1741*4882a593Smuzhiyun-#endif	/* have alloca */
1742*4882a593Smuzhiyun-
1743*4882a593Smuzhiyun-
1744*4882a593Smuzhiyun-/* Names for the libintl functions are a problem.  They must not clash
1745*4882a593Smuzhiyun-   with existing names and they should follow ANSI C.  But this source
1746*4882a593Smuzhiyun-   code is also used in GNU C Library where the names have a __
1747*4882a593Smuzhiyun-   prefix.  So we have to make a difference here.  */
1748*4882a593Smuzhiyun-#ifdef _LIBC
1749*4882a593Smuzhiyun-# define DCGETTEXT __dcgettext
1750*4882a593Smuzhiyun-#else
1751*4882a593Smuzhiyun-# define DCGETTEXT dcgettext__
1752*4882a593Smuzhiyun-#endif
1753*4882a593Smuzhiyun-
1754*4882a593Smuzhiyun-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
1755*4882a593Smuzhiyun-   locale.  */
1756*4882a593Smuzhiyun-char *
1757*4882a593Smuzhiyun-DCGETTEXT (domainname, msgid, category)
1758*4882a593Smuzhiyun-     const char *domainname;
1759*4882a593Smuzhiyun-     const char *msgid;
1760*4882a593Smuzhiyun-     int category;
1761*4882a593Smuzhiyun-{
1762*4882a593Smuzhiyun-#ifndef HAVE_ALLOCA
1763*4882a593Smuzhiyun-  struct block_list *block_list = NULL;
1764*4882a593Smuzhiyun-#endif
1765*4882a593Smuzhiyun-  struct loaded_l10nfile *domain;
1766*4882a593Smuzhiyun-  struct binding *binding;
1767*4882a593Smuzhiyun-  const char *categoryname;
1768*4882a593Smuzhiyun-  const char *categoryvalue;
1769*4882a593Smuzhiyun-  char *dirname, *xdomainname;
1770*4882a593Smuzhiyun-  char *single_locale;
1771*4882a593Smuzhiyun-  char *retval;
1772*4882a593Smuzhiyun-  int saved_errno = errno;
1773*4882a593Smuzhiyun-
1774*4882a593Smuzhiyun-  /* If no real MSGID is given return NULL.  */
1775*4882a593Smuzhiyun-  if (msgid == NULL)
1776*4882a593Smuzhiyun-    return NULL;
1777*4882a593Smuzhiyun-
1778*4882a593Smuzhiyun-  /* If DOMAINNAME is NULL, we are interested in the default domain.  If
1779*4882a593Smuzhiyun-     CATEGORY is not LC_MESSAGES this might not make much sense but the
1780*4882a593Smuzhiyun-     defintion left this undefined.  */
1781*4882a593Smuzhiyun-  if (domainname == NULL)
1782*4882a593Smuzhiyun-    domainname = _nl_current_default_domain;
1783*4882a593Smuzhiyun-
1784*4882a593Smuzhiyun-  /* First find matching binding.  */
1785*4882a593Smuzhiyun-  for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
1786*4882a593Smuzhiyun-    {
1787*4882a593Smuzhiyun-      int compare = strcmp (domainname, binding->domainname);
1788*4882a593Smuzhiyun-      if (compare == 0)
1789*4882a593Smuzhiyun-	/* We found it!  */
1790*4882a593Smuzhiyun-	break;
1791*4882a593Smuzhiyun-      if (compare < 0)
1792*4882a593Smuzhiyun-	{
1793*4882a593Smuzhiyun-	  /* It is not in the list.  */
1794*4882a593Smuzhiyun-	  binding = NULL;
1795*4882a593Smuzhiyun-	  break;
1796*4882a593Smuzhiyun-	}
1797*4882a593Smuzhiyun-    }
1798*4882a593Smuzhiyun-
1799*4882a593Smuzhiyun-  if (binding == NULL)
1800*4882a593Smuzhiyun-    dirname = (char *) _nl_default_dirname;
1801*4882a593Smuzhiyun-  else if (binding->dirname[0] == '/')
1802*4882a593Smuzhiyun-    dirname = binding->dirname;
1803*4882a593Smuzhiyun-  else
1804*4882a593Smuzhiyun-    {
1805*4882a593Smuzhiyun-      /* We have a relative path.  Make it absolute now.  */
1806*4882a593Smuzhiyun-      size_t dirname_len = strlen (binding->dirname) + 1;
1807*4882a593Smuzhiyun-      size_t path_max;
1808*4882a593Smuzhiyun-      char *ret;
1809*4882a593Smuzhiyun-
1810*4882a593Smuzhiyun-      path_max = (unsigned) PATH_MAX;
1811*4882a593Smuzhiyun-      path_max += 2;		/* The getcwd docs say to do this.  */
1812*4882a593Smuzhiyun-
1813*4882a593Smuzhiyun-      dirname = (char *) alloca (path_max + dirname_len);
1814*4882a593Smuzhiyun-      ADD_BLOCK (block_list, dirname);
1815*4882a593Smuzhiyun-
1816*4882a593Smuzhiyun-      __set_errno (0);
1817*4882a593Smuzhiyun-      while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
1818*4882a593Smuzhiyun-	{
1819*4882a593Smuzhiyun-	  path_max += PATH_INCR;
1820*4882a593Smuzhiyun-	  dirname = (char *) alloca (path_max + dirname_len);
1821*4882a593Smuzhiyun-	  ADD_BLOCK (block_list, dirname);
1822*4882a593Smuzhiyun-	  __set_errno (0);
1823*4882a593Smuzhiyun-	}
1824*4882a593Smuzhiyun-
1825*4882a593Smuzhiyun-      if (ret == NULL)
1826*4882a593Smuzhiyun-	{
1827*4882a593Smuzhiyun-	  /* We cannot get the current working directory.  Don't signal an
1828*4882a593Smuzhiyun-	     error but simply return the default string.  */
1829*4882a593Smuzhiyun-	  FREE_BLOCKS (block_list);
1830*4882a593Smuzhiyun-	  __set_errno (saved_errno);
1831*4882a593Smuzhiyun-	  return (char *) msgid;
1832*4882a593Smuzhiyun-	}
1833*4882a593Smuzhiyun-
1834*4882a593Smuzhiyun-      stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
1835*4882a593Smuzhiyun-    }
1836*4882a593Smuzhiyun-
1837*4882a593Smuzhiyun-  /* Now determine the symbolic name of CATEGORY and its value.  */
1838*4882a593Smuzhiyun-  categoryname = category_to_name (category);
1839*4882a593Smuzhiyun-  categoryvalue = guess_category_value (category, categoryname);
1840*4882a593Smuzhiyun-
1841*4882a593Smuzhiyun-  xdomainname = (char *) alloca (strlen (categoryname)
1842*4882a593Smuzhiyun-				 + strlen (domainname) + 5);
1843*4882a593Smuzhiyun-  ADD_BLOCK (block_list, xdomainname);
1844*4882a593Smuzhiyun-
1845*4882a593Smuzhiyun-  stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
1846*4882a593Smuzhiyun-		  domainname),
1847*4882a593Smuzhiyun-	  ".mo");
1848*4882a593Smuzhiyun-
1849*4882a593Smuzhiyun-  /* Creating working area.  */
1850*4882a593Smuzhiyun-  single_locale = (char *) alloca (strlen (categoryvalue) + 1);
1851*4882a593Smuzhiyun-  ADD_BLOCK (block_list, single_locale);
1852*4882a593Smuzhiyun-
1853*4882a593Smuzhiyun-
1854*4882a593Smuzhiyun-  /* Search for the given string.  This is a loop because we perhaps
1855*4882a593Smuzhiyun-     got an ordered list of languages to consider for th translation.  */
1856*4882a593Smuzhiyun-  while (1)
1857*4882a593Smuzhiyun-    {
1858*4882a593Smuzhiyun-      /* Make CATEGORYVALUE point to the next element of the list.  */
1859*4882a593Smuzhiyun-      while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
1860*4882a593Smuzhiyun-	++categoryvalue;
1861*4882a593Smuzhiyun-      if (categoryvalue[0] == '\0')
1862*4882a593Smuzhiyun-	{
1863*4882a593Smuzhiyun-	  /* The whole contents of CATEGORYVALUE has been searched but
1864*4882a593Smuzhiyun-	     no valid entry has been found.  We solve this situation
1865*4882a593Smuzhiyun-	     by implicitly appending a "C" entry, i.e. no translation
1866*4882a593Smuzhiyun-	     will take place.  */
1867*4882a593Smuzhiyun-	  single_locale[0] = 'C';
1868*4882a593Smuzhiyun-	  single_locale[1] = '\0';
1869*4882a593Smuzhiyun-	}
1870*4882a593Smuzhiyun-      else
1871*4882a593Smuzhiyun-	{
1872*4882a593Smuzhiyun-	  char *cp = single_locale;
1873*4882a593Smuzhiyun-	  while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
1874*4882a593Smuzhiyun-	    *cp++ = *categoryvalue++;
1875*4882a593Smuzhiyun-	  *cp = '\0';
1876*4882a593Smuzhiyun-	}
1877*4882a593Smuzhiyun-
1878*4882a593Smuzhiyun-      /* If the current locale value is C (or POSIX) we don't load a
1879*4882a593Smuzhiyun-	 domain.  Return the MSGID.  */
1880*4882a593Smuzhiyun-      if (strcmp (single_locale, "C") == 0
1881*4882a593Smuzhiyun-	  || strcmp (single_locale, "POSIX") == 0)
1882*4882a593Smuzhiyun-	{
1883*4882a593Smuzhiyun-	  FREE_BLOCKS (block_list);
1884*4882a593Smuzhiyun-	  __set_errno (saved_errno);
1885*4882a593Smuzhiyun-	  return (char *) msgid;
1886*4882a593Smuzhiyun-	}
1887*4882a593Smuzhiyun-
1888*4882a593Smuzhiyun-
1889*4882a593Smuzhiyun-      /* Find structure describing the message catalog matching the
1890*4882a593Smuzhiyun-	 DOMAINNAME and CATEGORY.  */
1891*4882a593Smuzhiyun-      domain = _nl_find_domain (dirname, single_locale, xdomainname);
1892*4882a593Smuzhiyun-
1893*4882a593Smuzhiyun-      if (domain != NULL)
1894*4882a593Smuzhiyun-	{
1895*4882a593Smuzhiyun-	  retval = find_msg (domain, msgid);
1896*4882a593Smuzhiyun-
1897*4882a593Smuzhiyun-	  if (retval == NULL)
1898*4882a593Smuzhiyun-	    {
1899*4882a593Smuzhiyun-	      int cnt;
1900*4882a593Smuzhiyun-
1901*4882a593Smuzhiyun-	      for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
1902*4882a593Smuzhiyun-		{
1903*4882a593Smuzhiyun-		  retval = find_msg (domain->successor[cnt], msgid);
1904*4882a593Smuzhiyun-
1905*4882a593Smuzhiyun-		  if (retval != NULL)
1906*4882a593Smuzhiyun-		    break;
1907*4882a593Smuzhiyun-		}
1908*4882a593Smuzhiyun-	    }
1909*4882a593Smuzhiyun-
1910*4882a593Smuzhiyun-	  if (retval != NULL)
1911*4882a593Smuzhiyun-	    {
1912*4882a593Smuzhiyun-	      FREE_BLOCKS (block_list);
1913*4882a593Smuzhiyun-	      __set_errno (saved_errno);
1914*4882a593Smuzhiyun-	      return retval;
1915*4882a593Smuzhiyun-	    }
1916*4882a593Smuzhiyun-	}
1917*4882a593Smuzhiyun-    }
1918*4882a593Smuzhiyun-  /* NOTREACHED */
1919*4882a593Smuzhiyun-}
1920*4882a593Smuzhiyun-
1921*4882a593Smuzhiyun-#ifdef _LIBC
1922*4882a593Smuzhiyun-/* Alias for function name in GNU C Library.  */
1923*4882a593Smuzhiyun-weak_alias (__dcgettext, dcgettext);
1924*4882a593Smuzhiyun-#endif
1925*4882a593Smuzhiyun-
1926*4882a593Smuzhiyun-
1927*4882a593Smuzhiyun-static char *
1928*4882a593Smuzhiyun-find_msg (domain_file, msgid)
1929*4882a593Smuzhiyun-     struct loaded_l10nfile *domain_file;
1930*4882a593Smuzhiyun-     const char *msgid;
1931*4882a593Smuzhiyun-{
1932*4882a593Smuzhiyun-  size_t top, act, bottom;
1933*4882a593Smuzhiyun-  struct loaded_domain *domain;
1934*4882a593Smuzhiyun-
1935*4882a593Smuzhiyun-  if (domain_file->decided == 0)
1936*4882a593Smuzhiyun-    _nl_load_domain (domain_file);
1937*4882a593Smuzhiyun-
1938*4882a593Smuzhiyun-  if (domain_file->data == NULL)
1939*4882a593Smuzhiyun-    return NULL;
1940*4882a593Smuzhiyun-
1941*4882a593Smuzhiyun-  domain = (struct loaded_domain *) domain_file->data;
1942*4882a593Smuzhiyun-
1943*4882a593Smuzhiyun-  /* Locate the MSGID and its translation.  */
1944*4882a593Smuzhiyun-  if (domain->hash_size > 2 && domain->hash_tab != NULL)
1945*4882a593Smuzhiyun-    {
1946*4882a593Smuzhiyun-      /* Use the hashing table.  */
1947*4882a593Smuzhiyun-      nls_uint32 len = strlen (msgid);
1948*4882a593Smuzhiyun-      nls_uint32 hash_val = hash_string (msgid);
1949*4882a593Smuzhiyun-      nls_uint32 idx = hash_val % domain->hash_size;
1950*4882a593Smuzhiyun-      nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
1951*4882a593Smuzhiyun-      nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
1952*4882a593Smuzhiyun-
1953*4882a593Smuzhiyun-      if (nstr == 0)
1954*4882a593Smuzhiyun-	/* Hash table entry is empty.  */
1955*4882a593Smuzhiyun-	return NULL;
1956*4882a593Smuzhiyun-
1957*4882a593Smuzhiyun-      if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
1958*4882a593Smuzhiyun-	  && strcmp (msgid,
1959*4882a593Smuzhiyun-		     domain->data + W (domain->must_swap,
1960*4882a593Smuzhiyun-				       domain->orig_tab[nstr - 1].offset)) == 0)
1961*4882a593Smuzhiyun-	return (char *) domain->data + W (domain->must_swap,
1962*4882a593Smuzhiyun-					  domain->trans_tab[nstr - 1].offset);
1963*4882a593Smuzhiyun-
1964*4882a593Smuzhiyun-      while (1)
1965*4882a593Smuzhiyun-	{
1966*4882a593Smuzhiyun-	  if (idx >= domain->hash_size - incr)
1967*4882a593Smuzhiyun-	    idx -= domain->hash_size - incr;
1968*4882a593Smuzhiyun-	  else
1969*4882a593Smuzhiyun-	    idx += incr;
1970*4882a593Smuzhiyun-
1971*4882a593Smuzhiyun-	  nstr = W (domain->must_swap, domain->hash_tab[idx]);
1972*4882a593Smuzhiyun-	  if (nstr == 0)
1973*4882a593Smuzhiyun-	    /* Hash table entry is empty.  */
1974*4882a593Smuzhiyun-	    return NULL;
1975*4882a593Smuzhiyun-
1976*4882a593Smuzhiyun-	  if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
1977*4882a593Smuzhiyun-	      && strcmp (msgid,
1978*4882a593Smuzhiyun-			 domain->data + W (domain->must_swap,
1979*4882a593Smuzhiyun-					   domain->orig_tab[nstr - 1].offset))
1980*4882a593Smuzhiyun-	         == 0)
1981*4882a593Smuzhiyun-	    return (char *) domain->data
1982*4882a593Smuzhiyun-	      + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
1983*4882a593Smuzhiyun-	}
1984*4882a593Smuzhiyun-      /* NOTREACHED */
1985*4882a593Smuzhiyun-    }
1986*4882a593Smuzhiyun-
1987*4882a593Smuzhiyun-  /* Now we try the default method:  binary search in the sorted
1988*4882a593Smuzhiyun-     array of messages.  */
1989*4882a593Smuzhiyun-  bottom = 0;
1990*4882a593Smuzhiyun-  top = domain->nstrings;
1991*4882a593Smuzhiyun-  while (bottom < top)
1992*4882a593Smuzhiyun-    {
1993*4882a593Smuzhiyun-      int cmp_val;
1994*4882a593Smuzhiyun-
1995*4882a593Smuzhiyun-      act = (bottom + top) / 2;
1996*4882a593Smuzhiyun-      cmp_val = strcmp (msgid, domain->data
1997*4882a593Smuzhiyun-			       + W (domain->must_swap,
1998*4882a593Smuzhiyun-				    domain->orig_tab[act].offset));
1999*4882a593Smuzhiyun-      if (cmp_val < 0)
2000*4882a593Smuzhiyun-	top = act;
2001*4882a593Smuzhiyun-      else if (cmp_val > 0)
2002*4882a593Smuzhiyun-	bottom = act + 1;
2003*4882a593Smuzhiyun-      else
2004*4882a593Smuzhiyun-	break;
2005*4882a593Smuzhiyun-    }
2006*4882a593Smuzhiyun-
2007*4882a593Smuzhiyun-  /* If an translation is found return this.  */
2008*4882a593Smuzhiyun-  return bottom >= top ? NULL : (char *) domain->data
2009*4882a593Smuzhiyun-                                + W (domain->must_swap,
2010*4882a593Smuzhiyun-				     domain->trans_tab[act].offset);
2011*4882a593Smuzhiyun-}
2012*4882a593Smuzhiyun-
2013*4882a593Smuzhiyun-
2014*4882a593Smuzhiyun-/* Return string representation of locale CATEGORY.  */
2015*4882a593Smuzhiyun-static const char *
2016*4882a593Smuzhiyun-category_to_name (category)
2017*4882a593Smuzhiyun-     int category;
2018*4882a593Smuzhiyun-{
2019*4882a593Smuzhiyun-  const char *retval;
2020*4882a593Smuzhiyun-
2021*4882a593Smuzhiyun-  switch (category)
2022*4882a593Smuzhiyun-  {
2023*4882a593Smuzhiyun-#ifdef LC_COLLATE
2024*4882a593Smuzhiyun-  case LC_COLLATE:
2025*4882a593Smuzhiyun-    retval = "LC_COLLATE";
2026*4882a593Smuzhiyun-    break;
2027*4882a593Smuzhiyun-#endif
2028*4882a593Smuzhiyun-#ifdef LC_CTYPE
2029*4882a593Smuzhiyun-  case LC_CTYPE:
2030*4882a593Smuzhiyun-    retval = "LC_CTYPE";
2031*4882a593Smuzhiyun-    break;
2032*4882a593Smuzhiyun-#endif
2033*4882a593Smuzhiyun-#ifdef LC_MONETARY
2034*4882a593Smuzhiyun-  case LC_MONETARY:
2035*4882a593Smuzhiyun-    retval = "LC_MONETARY";
2036*4882a593Smuzhiyun-    break;
2037*4882a593Smuzhiyun-#endif
2038*4882a593Smuzhiyun-#ifdef LC_NUMERIC
2039*4882a593Smuzhiyun-  case LC_NUMERIC:
2040*4882a593Smuzhiyun-    retval = "LC_NUMERIC";
2041*4882a593Smuzhiyun-    break;
2042*4882a593Smuzhiyun-#endif
2043*4882a593Smuzhiyun-#ifdef LC_TIME
2044*4882a593Smuzhiyun-  case LC_TIME:
2045*4882a593Smuzhiyun-    retval = "LC_TIME";
2046*4882a593Smuzhiyun-    break;
2047*4882a593Smuzhiyun-#endif
2048*4882a593Smuzhiyun-#ifdef LC_MESSAGES
2049*4882a593Smuzhiyun-  case LC_MESSAGES:
2050*4882a593Smuzhiyun-    retval = "LC_MESSAGES";
2051*4882a593Smuzhiyun-    break;
2052*4882a593Smuzhiyun-#endif
2053*4882a593Smuzhiyun-#ifdef LC_RESPONSE
2054*4882a593Smuzhiyun-  case LC_RESPONSE:
2055*4882a593Smuzhiyun-    retval = "LC_RESPONSE";
2056*4882a593Smuzhiyun-    break;
2057*4882a593Smuzhiyun-#endif
2058*4882a593Smuzhiyun-#ifdef LC_ALL
2059*4882a593Smuzhiyun-  case LC_ALL:
2060*4882a593Smuzhiyun-    /* This might not make sense but is perhaps better than any other
2061*4882a593Smuzhiyun-       value.  */
2062*4882a593Smuzhiyun-    retval = "LC_ALL";
2063*4882a593Smuzhiyun-    break;
2064*4882a593Smuzhiyun-#endif
2065*4882a593Smuzhiyun-  default:
2066*4882a593Smuzhiyun-    /* If you have a better idea for a default value let me know.  */
2067*4882a593Smuzhiyun-    retval = "LC_XXX";
2068*4882a593Smuzhiyun-  }
2069*4882a593Smuzhiyun-
2070*4882a593Smuzhiyun-  return retval;
2071*4882a593Smuzhiyun-}
2072*4882a593Smuzhiyun-
2073*4882a593Smuzhiyun-/* Guess value of current locale from value of the environment variables.  */
2074*4882a593Smuzhiyun-static const char *
2075*4882a593Smuzhiyun-guess_category_value (category, categoryname)
2076*4882a593Smuzhiyun-     int category;
2077*4882a593Smuzhiyun-     const char *categoryname;
2078*4882a593Smuzhiyun-{
2079*4882a593Smuzhiyun-  const char *retval;
2080*4882a593Smuzhiyun-
2081*4882a593Smuzhiyun-  /* The highest priority value is the `LANGUAGE' environment
2082*4882a593Smuzhiyun-     variable.  This is a GNU extension.  */
2083*4882a593Smuzhiyun-  retval = getenv ("LANGUAGE");
2084*4882a593Smuzhiyun-  if (retval != NULL && retval[0] != '\0')
2085*4882a593Smuzhiyun-    return retval;
2086*4882a593Smuzhiyun-
2087*4882a593Smuzhiyun-  /* `LANGUAGE' is not set.  So we have to proceed with the POSIX
2088*4882a593Smuzhiyun-     methods of looking to `LC_ALL', `LC_xxx', and `LANG'.  On some
2089*4882a593Smuzhiyun-     systems this can be done by the `setlocale' function itself.  */
2090*4882a593Smuzhiyun-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
2091*4882a593Smuzhiyun-  return setlocale (category, NULL);
2092*4882a593Smuzhiyun-#else
2093*4882a593Smuzhiyun-  /* Setting of LC_ALL overwrites all other.  */
2094*4882a593Smuzhiyun-  retval = getenv ("LC_ALL");
2095*4882a593Smuzhiyun-  if (retval != NULL && retval[0] != '\0')
2096*4882a593Smuzhiyun-    return retval;
2097*4882a593Smuzhiyun-
2098*4882a593Smuzhiyun-  /* Next comes the name of the desired category.  */
2099*4882a593Smuzhiyun-  retval = getenv (categoryname);
2100*4882a593Smuzhiyun-  if (retval != NULL && retval[0] != '\0')
2101*4882a593Smuzhiyun-    return retval;
2102*4882a593Smuzhiyun-
2103*4882a593Smuzhiyun-  /* Last possibility is the LANG environment variable.  */
2104*4882a593Smuzhiyun-  retval = getenv ("LANG");
2105*4882a593Smuzhiyun-  if (retval != NULL && retval[0] != '\0')
2106*4882a593Smuzhiyun-    return retval;
2107*4882a593Smuzhiyun-
2108*4882a593Smuzhiyun-  /* We use C as the default domain.  POSIX says this is implementation
2109*4882a593Smuzhiyun-     defined.  */
2110*4882a593Smuzhiyun-  return "C";
2111*4882a593Smuzhiyun-#endif
2112*4882a593Smuzhiyun-}
2113*4882a593Smuzhiyun-
2114*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
2115*4882a593Smuzhiyun-
2116*4882a593Smuzhiyun-/* We don't want libintl.a to depend on any other library.  So we
2117*4882a593Smuzhiyun-   avoid the non-standard function stpcpy.  In GNU C Library this
2118*4882a593Smuzhiyun-   function is available, though.  Also allow the symbol HAVE_STPCPY
2119*4882a593Smuzhiyun-   to be defined.  */
2120*4882a593Smuzhiyun-#if !_LIBC && !HAVE_STPCPY
2121*4882a593Smuzhiyun-static char *
2122*4882a593Smuzhiyun-stpcpy (dest, src)
2123*4882a593Smuzhiyun-     char *dest;
2124*4882a593Smuzhiyun-     const char *src;
2125*4882a593Smuzhiyun-{
2126*4882a593Smuzhiyun-  while ((*dest++ = *src++) != '\0')
2127*4882a593Smuzhiyun-    /* Do nothing. */ ;
2128*4882a593Smuzhiyun-  return dest - 1;
2129*4882a593Smuzhiyun-}
2130*4882a593Smuzhiyun-#endif
2131*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/dgettext.c lrzsz-0.12.20/intl/dgettext.c
2132*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/dgettext.c	1998-04-26 14:20:52.000000000 +0100
2133*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/dgettext.c	1970-01-01 01:00:00.000000000 +0100
2134*4882a593Smuzhiyun@@ -1,59 +0,0 @@
2135*4882a593Smuzhiyun-/* dgettext.c -- implementation of the dgettext(3) function
2136*4882a593Smuzhiyun-   Copyright (C) 1995 Software Foundation, Inc.
2137*4882a593Smuzhiyun-
2138*4882a593Smuzhiyun-This program is free software; you can redistribute it and/or modify
2139*4882a593Smuzhiyun-it under the terms of the GNU General Public License as published by
2140*4882a593Smuzhiyun-the Free Software Foundation; either version 2, or (at your option)
2141*4882a593Smuzhiyun-any later version.
2142*4882a593Smuzhiyun-
2143*4882a593Smuzhiyun-This program is distributed in the hope that it will be useful,
2144*4882a593Smuzhiyun-but WITHOUT ANY WARRANTY; without even the implied warranty of
2145*4882a593Smuzhiyun-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2146*4882a593Smuzhiyun-GNU General Public License for more details.
2147*4882a593Smuzhiyun-
2148*4882a593Smuzhiyun-You should have received a copy of the GNU General Public License
2149*4882a593Smuzhiyun-along with this program; if not, write to the Free Software
2150*4882a593Smuzhiyun-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2151*4882a593Smuzhiyun-
2152*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
2153*4882a593Smuzhiyun-# include <config.h>
2154*4882a593Smuzhiyun-#endif
2155*4882a593Smuzhiyun-
2156*4882a593Smuzhiyun-#if defined HAVE_LOCALE_H || defined _LIBC
2157*4882a593Smuzhiyun-# include <locale.h>
2158*4882a593Smuzhiyun-#endif
2159*4882a593Smuzhiyun-
2160*4882a593Smuzhiyun-#ifdef _LIBC
2161*4882a593Smuzhiyun-# include <libintl.h>
2162*4882a593Smuzhiyun-#else
2163*4882a593Smuzhiyun-# include "libgettext.h"
2164*4882a593Smuzhiyun-#endif
2165*4882a593Smuzhiyun-
2166*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2167*4882a593Smuzhiyun-
2168*4882a593Smuzhiyun-/* Names for the libintl functions are a problem.  They must not clash
2169*4882a593Smuzhiyun-   with existing names and they should follow ANSI C.  But this source
2170*4882a593Smuzhiyun-   code is also used in GNU C Library where the names have a __
2171*4882a593Smuzhiyun-   prefix.  So we have to make a difference here.  */
2172*4882a593Smuzhiyun-#ifdef _LIBC
2173*4882a593Smuzhiyun-# define DGETTEXT __dgettext
2174*4882a593Smuzhiyun-# define DCGETTEXT __dcgettext
2175*4882a593Smuzhiyun-#else
2176*4882a593Smuzhiyun-# define DGETTEXT dgettext__
2177*4882a593Smuzhiyun-# define DCGETTEXT dcgettext__
2178*4882a593Smuzhiyun-#endif
2179*4882a593Smuzhiyun-
2180*4882a593Smuzhiyun-/* Look up MSGID in the DOMAINNAME message catalog of the current
2181*4882a593Smuzhiyun-   LC_MESSAGES locale.  */
2182*4882a593Smuzhiyun-char *
2183*4882a593Smuzhiyun-DGETTEXT (domainname, msgid)
2184*4882a593Smuzhiyun-     const char *domainname;
2185*4882a593Smuzhiyun-     const char *msgid;
2186*4882a593Smuzhiyun-{
2187*4882a593Smuzhiyun-  return DCGETTEXT (domainname, msgid, LC_MESSAGES);
2188*4882a593Smuzhiyun-}
2189*4882a593Smuzhiyun-
2190*4882a593Smuzhiyun-#ifdef _LIBC
2191*4882a593Smuzhiyun-/* Alias for function name in GNU C Library.  */
2192*4882a593Smuzhiyun-weak_alias (__dgettext, dgettext);
2193*4882a593Smuzhiyun-#endif
2194*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/explodename.c lrzsz-0.12.20/intl/explodename.c
2195*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/explodename.c	1998-04-26 14:22:37.000000000 +0100
2196*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/explodename.c	1970-01-01 01:00:00.000000000 +0100
2197*4882a593Smuzhiyun@@ -1,181 +0,0 @@
2198*4882a593Smuzhiyun-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2199*4882a593Smuzhiyun-   Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
2200*4882a593Smuzhiyun-
2201*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2202*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2203*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2204*4882a593Smuzhiyun-   any later version.
2205*4882a593Smuzhiyun-
2206*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2207*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2208*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2209*4882a593Smuzhiyun-   GNU General Public License for more details.
2210*4882a593Smuzhiyun-
2211*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
2212*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
2213*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2214*4882a593Smuzhiyun-
2215*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
2216*4882a593Smuzhiyun-# include <config.h>
2217*4882a593Smuzhiyun-#endif
2218*4882a593Smuzhiyun-
2219*4882a593Smuzhiyun-#include <stdlib.h>
2220*4882a593Smuzhiyun-#include <string.h>
2221*4882a593Smuzhiyun-#include <sys/types.h>
2222*4882a593Smuzhiyun-
2223*4882a593Smuzhiyun-#include "loadinfo.h"
2224*4882a593Smuzhiyun-
2225*4882a593Smuzhiyun-/* On some strange systems still no definition of NULL is found.  Sigh!  */
2226*4882a593Smuzhiyun-#ifndef NULL
2227*4882a593Smuzhiyun-# if defined __STDC__ && __STDC__
2228*4882a593Smuzhiyun-#  define NULL ((void *) 0)
2229*4882a593Smuzhiyun-# else
2230*4882a593Smuzhiyun-#  define NULL 0
2231*4882a593Smuzhiyun-# endif
2232*4882a593Smuzhiyun-#endif
2233*4882a593Smuzhiyun-
2234*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2235*4882a593Smuzhiyun-
2236*4882a593Smuzhiyun-int
2237*4882a593Smuzhiyun-_nl_explode_name (name, language, modifier, territory, codeset,
2238*4882a593Smuzhiyun-		  normalized_codeset, special, sponsor, revision)
2239*4882a593Smuzhiyun-     char *name;
2240*4882a593Smuzhiyun-     const char **language;
2241*4882a593Smuzhiyun-     const char **modifier;
2242*4882a593Smuzhiyun-     const char **territory;
2243*4882a593Smuzhiyun-     const char **codeset;
2244*4882a593Smuzhiyun-     const char **normalized_codeset;
2245*4882a593Smuzhiyun-     const char **special;
2246*4882a593Smuzhiyun-     const char **sponsor;
2247*4882a593Smuzhiyun-     const char **revision;
2248*4882a593Smuzhiyun-{
2249*4882a593Smuzhiyun-  enum { undecided, xpg, cen } syntax;
2250*4882a593Smuzhiyun-  char *cp;
2251*4882a593Smuzhiyun-  int mask;
2252*4882a593Smuzhiyun-
2253*4882a593Smuzhiyun-  *modifier = NULL;
2254*4882a593Smuzhiyun-  *territory = NULL;
2255*4882a593Smuzhiyun-  *codeset = NULL;
2256*4882a593Smuzhiyun-  *normalized_codeset = NULL;
2257*4882a593Smuzhiyun-  *special = NULL;
2258*4882a593Smuzhiyun-  *sponsor = NULL;
2259*4882a593Smuzhiyun-  *revision = NULL;
2260*4882a593Smuzhiyun-
2261*4882a593Smuzhiyun-  /* Now we determine the single parts of the locale name.  First
2262*4882a593Smuzhiyun-     look for the language.  Termination symbols are `_' and `@' if
2263*4882a593Smuzhiyun-     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
2264*4882a593Smuzhiyun-  mask = 0;
2265*4882a593Smuzhiyun-  syntax = undecided;
2266*4882a593Smuzhiyun-  *language = cp = name;
2267*4882a593Smuzhiyun-  while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
2268*4882a593Smuzhiyun-	 && cp[0] != '+' && cp[0] != ',')
2269*4882a593Smuzhiyun-    ++cp;
2270*4882a593Smuzhiyun-
2271*4882a593Smuzhiyun-  if (*language == cp)
2272*4882a593Smuzhiyun-    /* This does not make sense: language has to be specified.  Use
2273*4882a593Smuzhiyun-       this entry as it is without exploding.  Perhaps it is an alias.  */
2274*4882a593Smuzhiyun-    cp = strchr (*language, '\0');
2275*4882a593Smuzhiyun-  else if (cp[0] == '_')
2276*4882a593Smuzhiyun-    {
2277*4882a593Smuzhiyun-      /* Next is the territory.  */
2278*4882a593Smuzhiyun-      cp[0] = '\0';
2279*4882a593Smuzhiyun-      *territory = ++cp;
2280*4882a593Smuzhiyun-
2281*4882a593Smuzhiyun-      while (cp[0] != '\0' && cp[0] != '.' && cp[0] != '@'
2282*4882a593Smuzhiyun-	     && cp[0] != '+' && cp[0] != ',' && cp[0] != '_')
2283*4882a593Smuzhiyun-	++cp;
2284*4882a593Smuzhiyun-
2285*4882a593Smuzhiyun-      mask |= TERRITORY;
2286*4882a593Smuzhiyun-
2287*4882a593Smuzhiyun-      if (cp[0] == '.')
2288*4882a593Smuzhiyun-	{
2289*4882a593Smuzhiyun-	  /* Next is the codeset.  */
2290*4882a593Smuzhiyun-	  syntax = xpg;
2291*4882a593Smuzhiyun-	  cp[0] = '\0';
2292*4882a593Smuzhiyun-	  *codeset = ++cp;
2293*4882a593Smuzhiyun-
2294*4882a593Smuzhiyun-	  while (cp[0] != '\0' && cp[0] != '@')
2295*4882a593Smuzhiyun-	    ++cp;
2296*4882a593Smuzhiyun-
2297*4882a593Smuzhiyun-	  mask |= XPG_CODESET;
2298*4882a593Smuzhiyun-
2299*4882a593Smuzhiyun-	  if (*codeset != cp && (*codeset)[0] != '\0')
2300*4882a593Smuzhiyun-	    {
2301*4882a593Smuzhiyun-	      *normalized_codeset = _nl_normalize_codeset (*codeset,
2302*4882a593Smuzhiyun-							   cp - *codeset);
2303*4882a593Smuzhiyun-	      if (strcmp (*codeset, *normalized_codeset) == 0)
2304*4882a593Smuzhiyun-		free ((char *) *normalized_codeset);
2305*4882a593Smuzhiyun-	      else
2306*4882a593Smuzhiyun-		mask |= XPG_NORM_CODESET;
2307*4882a593Smuzhiyun-	    }
2308*4882a593Smuzhiyun-	}
2309*4882a593Smuzhiyun-    }
2310*4882a593Smuzhiyun-
2311*4882a593Smuzhiyun-  if (cp[0] == '@' || (syntax != xpg && cp[0] == '+'))
2312*4882a593Smuzhiyun-    {
2313*4882a593Smuzhiyun-      /* Next is the modifier.  */
2314*4882a593Smuzhiyun-      syntax = cp[0] == '@' ? xpg : cen;
2315*4882a593Smuzhiyun-      cp[0] = '\0';
2316*4882a593Smuzhiyun-      *modifier = ++cp;
2317*4882a593Smuzhiyun-
2318*4882a593Smuzhiyun-      while (syntax == cen && cp[0] != '\0' && cp[0] != '+'
2319*4882a593Smuzhiyun-	     && cp[0] != ',' && cp[0] != '_')
2320*4882a593Smuzhiyun-	++cp;
2321*4882a593Smuzhiyun-
2322*4882a593Smuzhiyun-      mask |= XPG_MODIFIER | CEN_AUDIENCE;
2323*4882a593Smuzhiyun-    }
2324*4882a593Smuzhiyun-
2325*4882a593Smuzhiyun-  if (syntax != xpg && (cp[0] == '+' || cp[0] == ',' || cp[0] == '_'))
2326*4882a593Smuzhiyun-    {
2327*4882a593Smuzhiyun-      syntax = cen;
2328*4882a593Smuzhiyun-
2329*4882a593Smuzhiyun-      if (cp[0] == '+')
2330*4882a593Smuzhiyun-	{
2331*4882a593Smuzhiyun- 	  /* Next is special application (CEN syntax).  */
2332*4882a593Smuzhiyun-	  cp[0] = '\0';
2333*4882a593Smuzhiyun-	  *special = ++cp;
2334*4882a593Smuzhiyun-
2335*4882a593Smuzhiyun-	  while (cp[0] != '\0' && cp[0] != ',' && cp[0] != '_')
2336*4882a593Smuzhiyun-	    ++cp;
2337*4882a593Smuzhiyun-
2338*4882a593Smuzhiyun-	  mask |= CEN_SPECIAL;
2339*4882a593Smuzhiyun-	}
2340*4882a593Smuzhiyun-
2341*4882a593Smuzhiyun-      if (cp[0] == ',')
2342*4882a593Smuzhiyun-	{
2343*4882a593Smuzhiyun- 	  /* Next is sponsor (CEN syntax).  */
2344*4882a593Smuzhiyun-	  cp[0] = '\0';
2345*4882a593Smuzhiyun-	  *sponsor = ++cp;
2346*4882a593Smuzhiyun-
2347*4882a593Smuzhiyun-	  while (cp[0] != '\0' && cp[0] != '_')
2348*4882a593Smuzhiyun-	    ++cp;
2349*4882a593Smuzhiyun-
2350*4882a593Smuzhiyun-	  mask |= CEN_SPONSOR;
2351*4882a593Smuzhiyun-	}
2352*4882a593Smuzhiyun-
2353*4882a593Smuzhiyun-      if (cp[0] == '_')
2354*4882a593Smuzhiyun-	{
2355*4882a593Smuzhiyun- 	  /* Next is revision (CEN syntax).  */
2356*4882a593Smuzhiyun-	  cp[0] = '\0';
2357*4882a593Smuzhiyun-	  *revision = ++cp;
2358*4882a593Smuzhiyun-
2359*4882a593Smuzhiyun-	  mask |= CEN_REVISION;
2360*4882a593Smuzhiyun-	}
2361*4882a593Smuzhiyun-    }
2362*4882a593Smuzhiyun-
2363*4882a593Smuzhiyun-  /* For CEN syntax values it might be important to have the
2364*4882a593Smuzhiyun-     separator character in the file name, not for XPG syntax.  */
2365*4882a593Smuzhiyun-  if (syntax == xpg)
2366*4882a593Smuzhiyun-    {
2367*4882a593Smuzhiyun-      if (*territory != NULL && (*territory)[0] == '\0')
2368*4882a593Smuzhiyun-	mask &= ~TERRITORY;
2369*4882a593Smuzhiyun-
2370*4882a593Smuzhiyun-      if (*codeset != NULL && (*codeset)[0] == '\0')
2371*4882a593Smuzhiyun-	mask &= ~XPG_CODESET;
2372*4882a593Smuzhiyun-
2373*4882a593Smuzhiyun-      if (*modifier != NULL && (*modifier)[0] == '\0')
2374*4882a593Smuzhiyun-	mask &= ~XPG_MODIFIER;
2375*4882a593Smuzhiyun-    }
2376*4882a593Smuzhiyun-
2377*4882a593Smuzhiyun-  return mask;
2378*4882a593Smuzhiyun-}
2379*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/finddomain.c lrzsz-0.12.20/intl/finddomain.c
2380*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/finddomain.c	1998-04-26 14:22:36.000000000 +0100
2381*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/finddomain.c	1970-01-01 01:00:00.000000000 +0100
2382*4882a593Smuzhiyun@@ -1,189 +0,0 @@
2383*4882a593Smuzhiyun-/* Handle list of needed message catalogs
2384*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2385*4882a593Smuzhiyun-   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
2386*4882a593Smuzhiyun-
2387*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2388*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2389*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2390*4882a593Smuzhiyun-   any later version.
2391*4882a593Smuzhiyun-
2392*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2393*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2394*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2395*4882a593Smuzhiyun-   GNU General Public License for more details.
2396*4882a593Smuzhiyun-
2397*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
2398*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
2399*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2400*4882a593Smuzhiyun-
2401*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
2402*4882a593Smuzhiyun-# include <config.h>
2403*4882a593Smuzhiyun-#endif
2404*4882a593Smuzhiyun-
2405*4882a593Smuzhiyun-#include <ctype.h>
2406*4882a593Smuzhiyun-#include <errno.h>
2407*4882a593Smuzhiyun-#include <stdio.h>
2408*4882a593Smuzhiyun-#include <sys/types.h>
2409*4882a593Smuzhiyun-
2410*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
2411*4882a593Smuzhiyun-# include <stdlib.h>
2412*4882a593Smuzhiyun-#else
2413*4882a593Smuzhiyun-# ifdef HAVE_MALLOC_H
2414*4882a593Smuzhiyun-#  include <malloc.h>
2415*4882a593Smuzhiyun-# else
2416*4882a593Smuzhiyun-void free ();
2417*4882a593Smuzhiyun-# endif
2418*4882a593Smuzhiyun-#endif
2419*4882a593Smuzhiyun-
2420*4882a593Smuzhiyun-#if defined HAVE_STRING_H || defined _LIBC
2421*4882a593Smuzhiyun-# include <string.h>
2422*4882a593Smuzhiyun-#else
2423*4882a593Smuzhiyun-# include <strings.h>
2424*4882a593Smuzhiyun-# ifndef memcpy
2425*4882a593Smuzhiyun-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
2426*4882a593Smuzhiyun-# endif
2427*4882a593Smuzhiyun-#endif
2428*4882a593Smuzhiyun-#if !HAVE_STRCHR && !defined _LIBC
2429*4882a593Smuzhiyun-# ifndef strchr
2430*4882a593Smuzhiyun-#  define strchr index
2431*4882a593Smuzhiyun-# endif
2432*4882a593Smuzhiyun-#endif
2433*4882a593Smuzhiyun-
2434*4882a593Smuzhiyun-#if defined HAVE_UNISTD_H || defined _LIBC
2435*4882a593Smuzhiyun-# include <unistd.h>
2436*4882a593Smuzhiyun-#endif
2437*4882a593Smuzhiyun-
2438*4882a593Smuzhiyun-#include "gettext.h"
2439*4882a593Smuzhiyun-#include "gettextP.h"
2440*4882a593Smuzhiyun-#ifdef _LIBC
2441*4882a593Smuzhiyun-# include <libintl.h>
2442*4882a593Smuzhiyun-#else
2443*4882a593Smuzhiyun-# include "libgettext.h"
2444*4882a593Smuzhiyun-#endif
2445*4882a593Smuzhiyun-
2446*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2447*4882a593Smuzhiyun-/* List of already loaded domains.  */
2448*4882a593Smuzhiyun-static struct loaded_l10nfile *_nl_loaded_domains;
2449*4882a593Smuzhiyun-
2450*4882a593Smuzhiyun-
2451*4882a593Smuzhiyun-/* Return a data structure describing the message catalog described by
2452*4882a593Smuzhiyun-   the DOMAINNAME and CATEGORY parameters with respect to the currently
2453*4882a593Smuzhiyun-   established bindings.  */
2454*4882a593Smuzhiyun-struct loaded_l10nfile *
2455*4882a593Smuzhiyun-_nl_find_domain (dirname, locale, domainname)
2456*4882a593Smuzhiyun-     const char *dirname;
2457*4882a593Smuzhiyun-     char *locale;
2458*4882a593Smuzhiyun-     const char *domainname;
2459*4882a593Smuzhiyun-{
2460*4882a593Smuzhiyun-  struct loaded_l10nfile *retval;
2461*4882a593Smuzhiyun-  const char *language;
2462*4882a593Smuzhiyun-  const char *modifier;
2463*4882a593Smuzhiyun-  const char *territory;
2464*4882a593Smuzhiyun-  const char *codeset;
2465*4882a593Smuzhiyun-  const char *normalized_codeset;
2466*4882a593Smuzhiyun-  const char *special;
2467*4882a593Smuzhiyun-  const char *sponsor;
2468*4882a593Smuzhiyun-  const char *revision;
2469*4882a593Smuzhiyun-  const char *alias_value;
2470*4882a593Smuzhiyun-  int mask;
2471*4882a593Smuzhiyun-
2472*4882a593Smuzhiyun-  /* LOCALE can consist of up to four recognized parts for the XPG syntax:
2473*4882a593Smuzhiyun-
2474*4882a593Smuzhiyun-		language[_territory[.codeset]][@modifier]
2475*4882a593Smuzhiyun-
2476*4882a593Smuzhiyun-     and six parts for the CEN syntax:
2477*4882a593Smuzhiyun-
2478*4882a593Smuzhiyun-	language[_territory][+audience][+special][,[sponsor][_revision]]
2479*4882a593Smuzhiyun-
2480*4882a593Smuzhiyun-     Beside the first all of them are allowed to be missing.  If the
2481*4882a593Smuzhiyun-     full specified locale is not found, the less specific one are
2482*4882a593Smuzhiyun-     looked for.  The various part will be stripped of according to
2483*4882a593Smuzhiyun-     the following order:
2484*4882a593Smuzhiyun-		(1) revision
2485*4882a593Smuzhiyun-		(2) sponsor
2486*4882a593Smuzhiyun-		(3) special
2487*4882a593Smuzhiyun-		(4) codeset
2488*4882a593Smuzhiyun-		(5) normalized codeset
2489*4882a593Smuzhiyun-		(6) territory
2490*4882a593Smuzhiyun-		(7) audience/modifier
2491*4882a593Smuzhiyun-   */
2492*4882a593Smuzhiyun-
2493*4882a593Smuzhiyun-  /* If we have already tested for this locale entry there has to
2494*4882a593Smuzhiyun-     be one data set in the list of loaded domains.  */
2495*4882a593Smuzhiyun-  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
2496*4882a593Smuzhiyun-			       strlen (dirname) + 1, 0, locale, NULL, NULL,
2497*4882a593Smuzhiyun-			       NULL, NULL, NULL, NULL, NULL, domainname, 0);
2498*4882a593Smuzhiyun-  if (retval != NULL)
2499*4882a593Smuzhiyun-    {
2500*4882a593Smuzhiyun-      /* We know something about this locale.  */
2501*4882a593Smuzhiyun-      int cnt;
2502*4882a593Smuzhiyun-
2503*4882a593Smuzhiyun-      if (retval->decided == 0)
2504*4882a593Smuzhiyun-	_nl_load_domain (retval);
2505*4882a593Smuzhiyun-
2506*4882a593Smuzhiyun-      if (retval->data != NULL)
2507*4882a593Smuzhiyun-	return retval;
2508*4882a593Smuzhiyun-
2509*4882a593Smuzhiyun-      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
2510*4882a593Smuzhiyun-	{
2511*4882a593Smuzhiyun-	  if (retval->successor[cnt]->decided == 0)
2512*4882a593Smuzhiyun-	    _nl_load_domain (retval->successor[cnt]);
2513*4882a593Smuzhiyun-
2514*4882a593Smuzhiyun-	  if (retval->successor[cnt]->data != NULL)
2515*4882a593Smuzhiyun-	    break;
2516*4882a593Smuzhiyun-	}
2517*4882a593Smuzhiyun-      return cnt >= 0 ? retval : NULL;
2518*4882a593Smuzhiyun-      /* NOTREACHED */
2519*4882a593Smuzhiyun-    }
2520*4882a593Smuzhiyun-
2521*4882a593Smuzhiyun-  /* See whether the locale value is an alias.  If yes its value
2522*4882a593Smuzhiyun-     *overwrites* the alias name.  No test for the original value is
2523*4882a593Smuzhiyun-     done.  */
2524*4882a593Smuzhiyun-  alias_value = _nl_expand_alias (locale);
2525*4882a593Smuzhiyun-  if (alias_value != NULL)
2526*4882a593Smuzhiyun-    {
2527*4882a593Smuzhiyun-      size_t len = strlen (alias_value) + 1;
2528*4882a593Smuzhiyun-      locale = (char *) malloc (len);
2529*4882a593Smuzhiyun-      if (locale == NULL)
2530*4882a593Smuzhiyun-	return NULL;
2531*4882a593Smuzhiyun-
2532*4882a593Smuzhiyun-      memcpy (locale, alias_value, len);
2533*4882a593Smuzhiyun-    }
2534*4882a593Smuzhiyun-
2535*4882a593Smuzhiyun-  /* Now we determine the single parts of the locale name.  First
2536*4882a593Smuzhiyun-     look for the language.  Termination symbols are `_' and `@' if
2537*4882a593Smuzhiyun-     we use XPG4 style, and `_', `+', and `,' if we use CEN syntax.  */
2538*4882a593Smuzhiyun-  mask = _nl_explode_name (locale, &language, &modifier, &territory,
2539*4882a593Smuzhiyun-			   &codeset, &normalized_codeset, &special,
2540*4882a593Smuzhiyun-			   &sponsor, &revision);
2541*4882a593Smuzhiyun-
2542*4882a593Smuzhiyun-  /* Create all possible locale entries which might be interested in
2543*4882a593Smuzhiyun-     generalization.  */
2544*4882a593Smuzhiyun-  retval = _nl_make_l10nflist (&_nl_loaded_domains, dirname,
2545*4882a593Smuzhiyun-			       strlen (dirname) + 1, mask, language, territory,
2546*4882a593Smuzhiyun-			       codeset, normalized_codeset, modifier, special,
2547*4882a593Smuzhiyun-			       sponsor, revision, domainname, 1);
2548*4882a593Smuzhiyun-  if (retval == NULL)
2549*4882a593Smuzhiyun-    /* This means we are out of core.  */
2550*4882a593Smuzhiyun-    return NULL;
2551*4882a593Smuzhiyun-
2552*4882a593Smuzhiyun-  if (retval->decided == 0)
2553*4882a593Smuzhiyun-    _nl_load_domain (retval);
2554*4882a593Smuzhiyun-  if (retval->data == NULL)
2555*4882a593Smuzhiyun-    {
2556*4882a593Smuzhiyun-      int cnt;
2557*4882a593Smuzhiyun-      for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
2558*4882a593Smuzhiyun-	{
2559*4882a593Smuzhiyun-	  if (retval->successor[cnt]->decided == 0)
2560*4882a593Smuzhiyun-	    _nl_load_domain (retval->successor[cnt]);
2561*4882a593Smuzhiyun-	  if (retval->successor[cnt]->data != NULL)
2562*4882a593Smuzhiyun-	    break;
2563*4882a593Smuzhiyun-	}
2564*4882a593Smuzhiyun-    }
2565*4882a593Smuzhiyun-
2566*4882a593Smuzhiyun-  /* The room for an alias was dynamically allocated.  Free it now.  */
2567*4882a593Smuzhiyun-  if (alias_value != NULL)
2568*4882a593Smuzhiyun-    free (locale);
2569*4882a593Smuzhiyun-
2570*4882a593Smuzhiyun-  return retval;
2571*4882a593Smuzhiyun-}
2572*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/gettext.c lrzsz-0.12.20/intl/gettext.c
2573*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/gettext.c	1998-04-26 14:22:36.000000000 +0100
2574*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/gettext.c	1970-01-01 01:00:00.000000000 +0100
2575*4882a593Smuzhiyun@@ -1,70 +0,0 @@
2576*4882a593Smuzhiyun-/* Implementation of gettext(3) function
2577*4882a593Smuzhiyun-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
2578*4882a593Smuzhiyun-
2579*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2580*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2581*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2582*4882a593Smuzhiyun-   any later version.
2583*4882a593Smuzhiyun-
2584*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2585*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2586*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2587*4882a593Smuzhiyun-   GNU General Public License for more details.
2588*4882a593Smuzhiyun-
2589*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
2590*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
2591*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2592*4882a593Smuzhiyun-
2593*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
2594*4882a593Smuzhiyun-# include <config.h>
2595*4882a593Smuzhiyun-#endif
2596*4882a593Smuzhiyun-
2597*4882a593Smuzhiyun-#ifdef _LIBC
2598*4882a593Smuzhiyun-# define __need_NULL
2599*4882a593Smuzhiyun-# include <stddef.h>
2600*4882a593Smuzhiyun-#else
2601*4882a593Smuzhiyun-# ifdef STDC_HEADERS
2602*4882a593Smuzhiyun-#  include <stdlib.h>		/* Just for NULL.  */
2603*4882a593Smuzhiyun-# else
2604*4882a593Smuzhiyun-#  ifdef HAVE_STRING_H
2605*4882a593Smuzhiyun-#   include <string.h>
2606*4882a593Smuzhiyun-#  else
2607*4882a593Smuzhiyun-#   define NULL ((void *) 0)
2608*4882a593Smuzhiyun-#  endif
2609*4882a593Smuzhiyun-# endif
2610*4882a593Smuzhiyun-#endif
2611*4882a593Smuzhiyun-
2612*4882a593Smuzhiyun-#ifdef _LIBC
2613*4882a593Smuzhiyun-# include <libintl.h>
2614*4882a593Smuzhiyun-#else
2615*4882a593Smuzhiyun-# include "libgettext.h"
2616*4882a593Smuzhiyun-#endif
2617*4882a593Smuzhiyun-
2618*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2619*4882a593Smuzhiyun-
2620*4882a593Smuzhiyun-/* Names for the libintl functions are a problem.  They must not clash
2621*4882a593Smuzhiyun-   with existing names and they should follow ANSI C.  But this source
2622*4882a593Smuzhiyun-   code is also used in GNU C Library where the names have a __
2623*4882a593Smuzhiyun-   prefix.  So we have to make a difference here.  */
2624*4882a593Smuzhiyun-#ifdef _LIBC
2625*4882a593Smuzhiyun-# define GETTEXT __gettext
2626*4882a593Smuzhiyun-# define DGETTEXT __dgettext
2627*4882a593Smuzhiyun-#else
2628*4882a593Smuzhiyun-# define GETTEXT gettext__
2629*4882a593Smuzhiyun-# define DGETTEXT dgettext__
2630*4882a593Smuzhiyun-#endif
2631*4882a593Smuzhiyun-
2632*4882a593Smuzhiyun-/* Look up MSGID in the current default message catalog for the current
2633*4882a593Smuzhiyun-   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
2634*4882a593Smuzhiyun-   text).  */
2635*4882a593Smuzhiyun-char *
2636*4882a593Smuzhiyun-GETTEXT (msgid)
2637*4882a593Smuzhiyun-     const char *msgid;
2638*4882a593Smuzhiyun-{
2639*4882a593Smuzhiyun-  return DGETTEXT (NULL, msgid);
2640*4882a593Smuzhiyun-}
2641*4882a593Smuzhiyun-
2642*4882a593Smuzhiyun-#ifdef _LIBC
2643*4882a593Smuzhiyun-/* Alias for function name in GNU C Library.  */
2644*4882a593Smuzhiyun-weak_alias (__gettext, gettext);
2645*4882a593Smuzhiyun-#endif
2646*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/gettext.h lrzsz-0.12.20/intl/gettext.h
2647*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/gettext.h	1998-04-26 14:22:35.000000000 +0100
2648*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/gettext.h	1970-01-01 01:00:00.000000000 +0100
2649*4882a593Smuzhiyun@@ -1,105 +0,0 @@
2650*4882a593Smuzhiyun-/* Internal header for GNU gettext internationalization functions
2651*4882a593Smuzhiyun-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
2652*4882a593Smuzhiyun-
2653*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2654*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2655*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2656*4882a593Smuzhiyun-   any later version.
2657*4882a593Smuzhiyun-
2658*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2659*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2660*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2661*4882a593Smuzhiyun-   GNU General Public License for more details.
2662*4882a593Smuzhiyun-
2663*4882a593Smuzhiyun-   You should have received a copy of the GNU Library General Public
2664*4882a593Smuzhiyun-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
2665*4882a593Smuzhiyun-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2666*4882a593Smuzhiyun-   Boston, MA 02111-1307, USA.  */
2667*4882a593Smuzhiyun-
2668*4882a593Smuzhiyun-#ifndef _GETTEXT_H
2669*4882a593Smuzhiyun-#define _GETTEXT_H 1
2670*4882a593Smuzhiyun-
2671*4882a593Smuzhiyun-#include <stdio.h>
2672*4882a593Smuzhiyun-
2673*4882a593Smuzhiyun-#if HAVE_LIMITS_H || _LIBC
2674*4882a593Smuzhiyun-# include <limits.h>
2675*4882a593Smuzhiyun-#endif
2676*4882a593Smuzhiyun-
2677*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2678*4882a593Smuzhiyun-
2679*4882a593Smuzhiyun-/* The magic number of the GNU message catalog format.  */
2680*4882a593Smuzhiyun-#define _MAGIC 0x950412de
2681*4882a593Smuzhiyun-#define _MAGIC_SWAPPED 0xde120495
2682*4882a593Smuzhiyun-
2683*4882a593Smuzhiyun-/* Revision number of the currently used .mo (binary) file format.  */
2684*4882a593Smuzhiyun-#define MO_REVISION_NUMBER 0
2685*4882a593Smuzhiyun-
2686*4882a593Smuzhiyun-/* The following contortions are an attempt to use the C preprocessor
2687*4882a593Smuzhiyun-   to determine an unsigned integral type that is 32 bits wide.  An
2688*4882a593Smuzhiyun-   alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
2689*4882a593Smuzhiyun-   doing that would require that the configure script compile and *run*
2690*4882a593Smuzhiyun-   the resulting executable.  Locally running cross-compiled executables
2691*4882a593Smuzhiyun-   is usually not possible.  */
2692*4882a593Smuzhiyun-
2693*4882a593Smuzhiyun-#if __STDC__
2694*4882a593Smuzhiyun-# define UINT_MAX_32_BITS 4294967295U
2695*4882a593Smuzhiyun-#else
2696*4882a593Smuzhiyun-# define UINT_MAX_32_BITS 0xFFFFFFFF
2697*4882a593Smuzhiyun-#endif
2698*4882a593Smuzhiyun-
2699*4882a593Smuzhiyun-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
2700*4882a593Smuzhiyun-   This should be valid for all systems GNU cares about because
2701*4882a593Smuzhiyun-   that doesn't include 16-bit systems, and only modern systems
2702*4882a593Smuzhiyun-   (that certainly have <limits.h>) have 64+-bit integral types.  */
2703*4882a593Smuzhiyun-
2704*4882a593Smuzhiyun-#ifndef UINT_MAX
2705*4882a593Smuzhiyun-# define UINT_MAX UINT_MAX_32_BITS
2706*4882a593Smuzhiyun-#endif
2707*4882a593Smuzhiyun-
2708*4882a593Smuzhiyun-#if UINT_MAX == UINT_MAX_32_BITS
2709*4882a593Smuzhiyun-typedef unsigned nls_uint32;
2710*4882a593Smuzhiyun-#else
2711*4882a593Smuzhiyun-# if USHRT_MAX == UINT_MAX_32_BITS
2712*4882a593Smuzhiyun-typedef unsigned short nls_uint32;
2713*4882a593Smuzhiyun-# else
2714*4882a593Smuzhiyun-#  if ULONG_MAX == UINT_MAX_32_BITS
2715*4882a593Smuzhiyun-typedef unsigned long nls_uint32;
2716*4882a593Smuzhiyun-#  else
2717*4882a593Smuzhiyun-  /* The following line is intended to throw an error.  Using #error is
2718*4882a593Smuzhiyun-     not portable enough.  */
2719*4882a593Smuzhiyun-  "Cannot determine unsigned 32-bit data type."
2720*4882a593Smuzhiyun-#  endif
2721*4882a593Smuzhiyun-# endif
2722*4882a593Smuzhiyun-#endif
2723*4882a593Smuzhiyun-
2724*4882a593Smuzhiyun-
2725*4882a593Smuzhiyun-/* Header for binary .mo file format.  */
2726*4882a593Smuzhiyun-struct mo_file_header
2727*4882a593Smuzhiyun-{
2728*4882a593Smuzhiyun-  /* The magic number.  */
2729*4882a593Smuzhiyun-  nls_uint32 magic;
2730*4882a593Smuzhiyun-  /* The revision number of the file format.  */
2731*4882a593Smuzhiyun-  nls_uint32 revision;
2732*4882a593Smuzhiyun-  /* The number of strings pairs.  */
2733*4882a593Smuzhiyun-  nls_uint32 nstrings;
2734*4882a593Smuzhiyun-  /* Offset of table with start offsets of original strings.  */
2735*4882a593Smuzhiyun-  nls_uint32 orig_tab_offset;
2736*4882a593Smuzhiyun-  /* Offset of table with start offsets of translation strings.  */
2737*4882a593Smuzhiyun-  nls_uint32 trans_tab_offset;
2738*4882a593Smuzhiyun-  /* Size of hashing table.  */
2739*4882a593Smuzhiyun-  nls_uint32 hash_tab_size;
2740*4882a593Smuzhiyun-  /* Offset of first hashing entry.  */
2741*4882a593Smuzhiyun-  nls_uint32 hash_tab_offset;
2742*4882a593Smuzhiyun-};
2743*4882a593Smuzhiyun-
2744*4882a593Smuzhiyun-struct string_desc
2745*4882a593Smuzhiyun-{
2746*4882a593Smuzhiyun-  /* Length of addressed string.  */
2747*4882a593Smuzhiyun-  nls_uint32 length;
2748*4882a593Smuzhiyun-  /* Offset of string in file.  */
2749*4882a593Smuzhiyun-  nls_uint32 offset;
2750*4882a593Smuzhiyun-};
2751*4882a593Smuzhiyun-
2752*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
2753*4882a593Smuzhiyun-
2754*4882a593Smuzhiyun-#endif	/* gettext.h  */
2755*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/gettextP.h lrzsz-0.12.20/intl/gettextP.h
2756*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/gettextP.h	1998-04-26 14:22:35.000000000 +0100
2757*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/gettextP.h	1970-01-01 01:00:00.000000000 +0100
2758*4882a593Smuzhiyun@@ -1,73 +0,0 @@
2759*4882a593Smuzhiyun-/* Header describing internals of gettext library
2760*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2761*4882a593Smuzhiyun-
2762*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2763*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2764*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2765*4882a593Smuzhiyun-   any later version.
2766*4882a593Smuzhiyun-
2767*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2768*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2769*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2770*4882a593Smuzhiyun-   GNU General Public License for more details.
2771*4882a593Smuzhiyun-
2772*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
2773*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
2774*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2775*4882a593Smuzhiyun-
2776*4882a593Smuzhiyun-#ifndef _GETTEXTP_H
2777*4882a593Smuzhiyun-#define _GETTEXTP_H
2778*4882a593Smuzhiyun-
2779*4882a593Smuzhiyun-#include "loadinfo.h"
2780*4882a593Smuzhiyun-
2781*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2782*4882a593Smuzhiyun-
2783*4882a593Smuzhiyun-#ifndef PARAMS
2784*4882a593Smuzhiyun-# if __STDC__
2785*4882a593Smuzhiyun-#  define PARAMS(args) args
2786*4882a593Smuzhiyun-# else
2787*4882a593Smuzhiyun-#  define PARAMS(args) ()
2788*4882a593Smuzhiyun-# endif
2789*4882a593Smuzhiyun-#endif
2790*4882a593Smuzhiyun-
2791*4882a593Smuzhiyun-#ifndef W
2792*4882a593Smuzhiyun-# define W(flag, data) ((flag) ? SWAP (data) : (data))
2793*4882a593Smuzhiyun-#endif
2794*4882a593Smuzhiyun-
2795*4882a593Smuzhiyun-
2796*4882a593Smuzhiyun-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
2797*4882a593Smuzhiyun-
2798*4882a593Smuzhiyun-static inline nls_uint32
2799*4882a593Smuzhiyun-SWAP (i)
2800*4882a593Smuzhiyun-     nls_uint32 i;
2801*4882a593Smuzhiyun-{
2802*4882a593Smuzhiyun-  return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
2803*4882a593Smuzhiyun-}
2804*4882a593Smuzhiyun-
2805*4882a593Smuzhiyun-
2806*4882a593Smuzhiyun-struct loaded_domain
2807*4882a593Smuzhiyun-{
2808*4882a593Smuzhiyun-  const char *data;
2809*4882a593Smuzhiyun-  int must_swap;
2810*4882a593Smuzhiyun-  nls_uint32 nstrings;
2811*4882a593Smuzhiyun-  struct string_desc *orig_tab;
2812*4882a593Smuzhiyun-  struct string_desc *trans_tab;
2813*4882a593Smuzhiyun-  nls_uint32 hash_size;
2814*4882a593Smuzhiyun-  nls_uint32 *hash_tab;
2815*4882a593Smuzhiyun-};
2816*4882a593Smuzhiyun-
2817*4882a593Smuzhiyun-struct binding
2818*4882a593Smuzhiyun-{
2819*4882a593Smuzhiyun-  struct binding *next;
2820*4882a593Smuzhiyun-  char *domainname;
2821*4882a593Smuzhiyun-  char *dirname;
2822*4882a593Smuzhiyun-};
2823*4882a593Smuzhiyun-
2824*4882a593Smuzhiyun-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
2825*4882a593Smuzhiyun-						 char *__locale,
2826*4882a593Smuzhiyun-						 const char *__domainname));
2827*4882a593Smuzhiyun-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
2828*4882a593Smuzhiyun-
2829*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
2830*4882a593Smuzhiyun-
2831*4882a593Smuzhiyun-#endif /* gettextP.h  */
2832*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/hash-string.h lrzsz-0.12.20/intl/hash-string.h
2833*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/hash-string.h	1998-04-26 14:22:36.000000000 +0100
2834*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/hash-string.h	1970-01-01 01:00:00.000000000 +0100
2835*4882a593Smuzhiyun@@ -1,63 +0,0 @@
2836*4882a593Smuzhiyun-/* Implements a string hashing function.
2837*4882a593Smuzhiyun-   Copyright (C) 1995, 1997 Free Software Foundation, Inc.
2838*4882a593Smuzhiyun-
2839*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2840*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2841*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2842*4882a593Smuzhiyun-   any later version.
2843*4882a593Smuzhiyun-
2844*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2845*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2846*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2847*4882a593Smuzhiyun-   GNU General Public License for more details.
2848*4882a593Smuzhiyun-
2849*4882a593Smuzhiyun-   You should have received a copy of the GNU Library General Public
2850*4882a593Smuzhiyun-   License along with the GNU C Library; see the file COPYING.LIB.  If not,
2851*4882a593Smuzhiyun-   write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
2852*4882a593Smuzhiyun-   Boston, MA 02111-1307, USA.  */
2853*4882a593Smuzhiyun-
2854*4882a593Smuzhiyun-#ifdef HAVE_VALUES_H
2855*4882a593Smuzhiyun-# include <values.h>
2856*4882a593Smuzhiyun-#endif
2857*4882a593Smuzhiyun-
2858*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2859*4882a593Smuzhiyun-
2860*4882a593Smuzhiyun-#ifndef PARAMS
2861*4882a593Smuzhiyun-# if __STDC__
2862*4882a593Smuzhiyun-#  define PARAMS(Args) Args
2863*4882a593Smuzhiyun-# else
2864*4882a593Smuzhiyun-#  define PARAMS(Args) ()
2865*4882a593Smuzhiyun-# endif
2866*4882a593Smuzhiyun-#endif
2867*4882a593Smuzhiyun-
2868*4882a593Smuzhiyun-/* We assume to have `unsigned long int' value with at least 32 bits.  */
2869*4882a593Smuzhiyun-#define HASHWORDBITS 32
2870*4882a593Smuzhiyun-
2871*4882a593Smuzhiyun-
2872*4882a593Smuzhiyun-/* Defines the so called `hashpjw' function by P.J. Weinberger
2873*4882a593Smuzhiyun-   [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
2874*4882a593Smuzhiyun-   1986, 1987 Bell Telephone Laboratories, Inc.]  */
2875*4882a593Smuzhiyun-static unsigned long hash_string PARAMS ((const char *__str_param));
2876*4882a593Smuzhiyun-
2877*4882a593Smuzhiyun-static inline unsigned long
2878*4882a593Smuzhiyun-hash_string (str_param)
2879*4882a593Smuzhiyun-     const char *str_param;
2880*4882a593Smuzhiyun-{
2881*4882a593Smuzhiyun-  unsigned long int hval, g;
2882*4882a593Smuzhiyun-  const char *str = str_param;
2883*4882a593Smuzhiyun-
2884*4882a593Smuzhiyun-  /* Compute the hash value for the given string.  */
2885*4882a593Smuzhiyun-  hval = 0;
2886*4882a593Smuzhiyun-  while (*str != '\0')
2887*4882a593Smuzhiyun-    {
2888*4882a593Smuzhiyun-      hval <<= 4;
2889*4882a593Smuzhiyun-      hval += (unsigned long) *str++;
2890*4882a593Smuzhiyun-      g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
2891*4882a593Smuzhiyun-      if (g != 0)
2892*4882a593Smuzhiyun-	{
2893*4882a593Smuzhiyun-	  hval ^= g >> (HASHWORDBITS - 8);
2894*4882a593Smuzhiyun-	  hval ^= g;
2895*4882a593Smuzhiyun-	}
2896*4882a593Smuzhiyun-    }
2897*4882a593Smuzhiyun-  return hval;
2898*4882a593Smuzhiyun-}
2899*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/intl-compat.c lrzsz-0.12.20/intl/intl-compat.c
2900*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/intl-compat.c	1998-04-26 14:20:52.000000000 +0100
2901*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/intl-compat.c	1970-01-01 01:00:00.000000000 +0100
2902*4882a593Smuzhiyun@@ -1,76 +0,0 @@
2903*4882a593Smuzhiyun-/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
2904*4882a593Smuzhiyun-   Library.
2905*4882a593Smuzhiyun-   Copyright (C) 1995 Software Foundation, Inc.
2906*4882a593Smuzhiyun-
2907*4882a593Smuzhiyun-This program is free software; you can redistribute it and/or modify
2908*4882a593Smuzhiyun-it under the terms of the GNU General Public License as published by
2909*4882a593Smuzhiyun-the Free Software Foundation; either version 2, or (at your option)
2910*4882a593Smuzhiyun-any later version.
2911*4882a593Smuzhiyun-
2912*4882a593Smuzhiyun-This program is distributed in the hope that it will be useful,
2913*4882a593Smuzhiyun-but WITHOUT ANY WARRANTY; without even the implied warranty of
2914*4882a593Smuzhiyun-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2915*4882a593Smuzhiyun-GNU General Public License for more details.
2916*4882a593Smuzhiyun-
2917*4882a593Smuzhiyun-You should have received a copy of the GNU General Public License
2918*4882a593Smuzhiyun-along with this program; if not, write to the Free Software
2919*4882a593Smuzhiyun-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
2920*4882a593Smuzhiyun-
2921*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
2922*4882a593Smuzhiyun-# include <config.h>
2923*4882a593Smuzhiyun-#endif
2924*4882a593Smuzhiyun-
2925*4882a593Smuzhiyun-#include "libgettext.h"
2926*4882a593Smuzhiyun-
2927*4882a593Smuzhiyun-/* @@ end of prolog @@ */
2928*4882a593Smuzhiyun-
2929*4882a593Smuzhiyun-
2930*4882a593Smuzhiyun-#undef gettext
2931*4882a593Smuzhiyun-#undef dgettext
2932*4882a593Smuzhiyun-#undef dcgettext
2933*4882a593Smuzhiyun-#undef textdomain
2934*4882a593Smuzhiyun-#undef bindtextdomain
2935*4882a593Smuzhiyun-
2936*4882a593Smuzhiyun-
2937*4882a593Smuzhiyun-char *
2938*4882a593Smuzhiyun-bindtextdomain (domainname, dirname)
2939*4882a593Smuzhiyun-     const char *domainname;
2940*4882a593Smuzhiyun-     const char *dirname;
2941*4882a593Smuzhiyun-{
2942*4882a593Smuzhiyun-  return bindtextdomain__ (domainname, dirname);
2943*4882a593Smuzhiyun-}
2944*4882a593Smuzhiyun-
2945*4882a593Smuzhiyun-
2946*4882a593Smuzhiyun-char *
2947*4882a593Smuzhiyun-dcgettext (domainname, msgid, category)
2948*4882a593Smuzhiyun-     const char *domainname;
2949*4882a593Smuzhiyun-     const char *msgid;
2950*4882a593Smuzhiyun-     int category;
2951*4882a593Smuzhiyun-{
2952*4882a593Smuzhiyun-  return dcgettext__ (domainname, msgid, category);
2953*4882a593Smuzhiyun-}
2954*4882a593Smuzhiyun-
2955*4882a593Smuzhiyun-
2956*4882a593Smuzhiyun-char *
2957*4882a593Smuzhiyun-dgettext (domainname, msgid)
2958*4882a593Smuzhiyun-     const char *domainname;
2959*4882a593Smuzhiyun-     const char *msgid;
2960*4882a593Smuzhiyun-{
2961*4882a593Smuzhiyun-  return dgettext__ (domainname, msgid);
2962*4882a593Smuzhiyun-}
2963*4882a593Smuzhiyun-
2964*4882a593Smuzhiyun-
2965*4882a593Smuzhiyun-char *
2966*4882a593Smuzhiyun-gettext (msgid)
2967*4882a593Smuzhiyun-     const char *msgid;
2968*4882a593Smuzhiyun-{
2969*4882a593Smuzhiyun-  return gettext__ (msgid);
2970*4882a593Smuzhiyun-}
2971*4882a593Smuzhiyun-
2972*4882a593Smuzhiyun-
2973*4882a593Smuzhiyun-char *
2974*4882a593Smuzhiyun-textdomain (domainname)
2975*4882a593Smuzhiyun-     const char *domainname;
2976*4882a593Smuzhiyun-{
2977*4882a593Smuzhiyun-  return textdomain__ (domainname);
2978*4882a593Smuzhiyun-}
2979*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/l10nflist.c lrzsz-0.12.20/intl/l10nflist.c
2980*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/l10nflist.c	1998-04-26 14:22:37.000000000 +0100
2981*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/l10nflist.c	1970-01-01 01:00:00.000000000 +0100
2982*4882a593Smuzhiyun@@ -1,409 +0,0 @@
2983*4882a593Smuzhiyun-/* Handle list of needed message catalogs
2984*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
2985*4882a593Smuzhiyun-   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
2986*4882a593Smuzhiyun-
2987*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
2988*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
2989*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
2990*4882a593Smuzhiyun-   any later version.
2991*4882a593Smuzhiyun-
2992*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
2993*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
2994*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
2995*4882a593Smuzhiyun-   GNU General Public License for more details.
2996*4882a593Smuzhiyun-
2997*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
2998*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
2999*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
3000*4882a593Smuzhiyun-
3001*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
3002*4882a593Smuzhiyun-# include <config.h>
3003*4882a593Smuzhiyun-#endif
3004*4882a593Smuzhiyun-
3005*4882a593Smuzhiyun-
3006*4882a593Smuzhiyun-#if defined HAVE_STRING_H || defined _LIBC
3007*4882a593Smuzhiyun-# ifndef _GNU_SOURCE
3008*4882a593Smuzhiyun-#  define _GNU_SOURCE	1
3009*4882a593Smuzhiyun-# endif
3010*4882a593Smuzhiyun-# include <string.h>
3011*4882a593Smuzhiyun-#else
3012*4882a593Smuzhiyun-# include <strings.h>
3013*4882a593Smuzhiyun-# ifndef memcpy
3014*4882a593Smuzhiyun-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
3015*4882a593Smuzhiyun-# endif
3016*4882a593Smuzhiyun-#endif
3017*4882a593Smuzhiyun-#if !HAVE_STRCHR && !defined _LIBC
3018*4882a593Smuzhiyun-# ifndef strchr
3019*4882a593Smuzhiyun-#  define strchr index
3020*4882a593Smuzhiyun-# endif
3021*4882a593Smuzhiyun-#endif
3022*4882a593Smuzhiyun-
3023*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_ARGZ_H
3024*4882a593Smuzhiyun-# include <argz.h>
3025*4882a593Smuzhiyun-#endif
3026*4882a593Smuzhiyun-#include <ctype.h>
3027*4882a593Smuzhiyun-#include <sys/types.h>
3028*4882a593Smuzhiyun-
3029*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
3030*4882a593Smuzhiyun-# include <stdlib.h>
3031*4882a593Smuzhiyun-#endif
3032*4882a593Smuzhiyun-
3033*4882a593Smuzhiyun-#include "loadinfo.h"
3034*4882a593Smuzhiyun-
3035*4882a593Smuzhiyun-/* On some strange systems still no definition of NULL is found.  Sigh!  */
3036*4882a593Smuzhiyun-#ifndef NULL
3037*4882a593Smuzhiyun-# if defined __STDC__ && __STDC__
3038*4882a593Smuzhiyun-#  define NULL ((void *) 0)
3039*4882a593Smuzhiyun-# else
3040*4882a593Smuzhiyun-#  define NULL 0
3041*4882a593Smuzhiyun-# endif
3042*4882a593Smuzhiyun-#endif
3043*4882a593Smuzhiyun-
3044*4882a593Smuzhiyun-/* @@ end of prolog @@ */
3045*4882a593Smuzhiyun-
3046*4882a593Smuzhiyun-#ifdef _LIBC
3047*4882a593Smuzhiyun-/* Rename the non ANSI C functions.  This is required by the standard
3048*4882a593Smuzhiyun-   because some ANSI C functions will require linking with this object
3049*4882a593Smuzhiyun-   file and the name space must not be polluted.  */
3050*4882a593Smuzhiyun-# define stpcpy(dest, src) __stpcpy(dest, src)
3051*4882a593Smuzhiyun-#else
3052*4882a593Smuzhiyun-# ifndef HAVE_STPCPY
3053*4882a593Smuzhiyun-static char *stpcpy PARAMS ((char *dest, const char *src));
3054*4882a593Smuzhiyun-# endif
3055*4882a593Smuzhiyun-#endif
3056*4882a593Smuzhiyun-
3057*4882a593Smuzhiyun-/* Define function which are usually not available.  */
3058*4882a593Smuzhiyun-
3059*4882a593Smuzhiyun-#if !defined _LIBC && !defined HAVE___ARGZ_COUNT
3060*4882a593Smuzhiyun-/* Returns the number of strings in ARGZ.  */
3061*4882a593Smuzhiyun-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
3062*4882a593Smuzhiyun-
3063*4882a593Smuzhiyun-static size_t
3064*4882a593Smuzhiyun-argz_count__ (argz, len)
3065*4882a593Smuzhiyun-     const char *argz;
3066*4882a593Smuzhiyun-     size_t len;
3067*4882a593Smuzhiyun-{
3068*4882a593Smuzhiyun-  size_t count = 0;
3069*4882a593Smuzhiyun-  while (len > 0)
3070*4882a593Smuzhiyun-    {
3071*4882a593Smuzhiyun-      size_t part_len = strlen (argz);
3072*4882a593Smuzhiyun-      argz += part_len + 1;
3073*4882a593Smuzhiyun-      len -= part_len + 1;
3074*4882a593Smuzhiyun-      count++;
3075*4882a593Smuzhiyun-    }
3076*4882a593Smuzhiyun-  return count;
3077*4882a593Smuzhiyun-}
3078*4882a593Smuzhiyun-# undef __argz_count
3079*4882a593Smuzhiyun-# define __argz_count(argz, len) argz_count__ (argz, len)
3080*4882a593Smuzhiyun-#endif	/* !_LIBC && !HAVE___ARGZ_COUNT */
3081*4882a593Smuzhiyun-
3082*4882a593Smuzhiyun-#if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
3083*4882a593Smuzhiyun-/* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
3084*4882a593Smuzhiyun-   except the last into the character SEP.  */
3085*4882a593Smuzhiyun-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
3086*4882a593Smuzhiyun-
3087*4882a593Smuzhiyun-static void
3088*4882a593Smuzhiyun-argz_stringify__ (argz, len, sep)
3089*4882a593Smuzhiyun-     char *argz;
3090*4882a593Smuzhiyun-     size_t len;
3091*4882a593Smuzhiyun-     int sep;
3092*4882a593Smuzhiyun-{
3093*4882a593Smuzhiyun-  while (len > 0)
3094*4882a593Smuzhiyun-    {
3095*4882a593Smuzhiyun-      size_t part_len = strlen (argz);
3096*4882a593Smuzhiyun-      argz += part_len;
3097*4882a593Smuzhiyun-      len -= part_len + 1;
3098*4882a593Smuzhiyun-      if (len > 0)
3099*4882a593Smuzhiyun-	*argz++ = sep;
3100*4882a593Smuzhiyun-    }
3101*4882a593Smuzhiyun-}
3102*4882a593Smuzhiyun-# undef __argz_stringify
3103*4882a593Smuzhiyun-# define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
3104*4882a593Smuzhiyun-#endif	/* !_LIBC && !HAVE___ARGZ_STRINGIFY */
3105*4882a593Smuzhiyun-
3106*4882a593Smuzhiyun-#if !defined _LIBC && !defined HAVE___ARGZ_NEXT
3107*4882a593Smuzhiyun-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
3108*4882a593Smuzhiyun-				  const char *entry));
3109*4882a593Smuzhiyun-
3110*4882a593Smuzhiyun-static char *
3111*4882a593Smuzhiyun-argz_next__ (argz, argz_len, entry)
3112*4882a593Smuzhiyun-     char *argz;
3113*4882a593Smuzhiyun-     size_t argz_len;
3114*4882a593Smuzhiyun-     const char *entry;
3115*4882a593Smuzhiyun-{
3116*4882a593Smuzhiyun-  if (entry)
3117*4882a593Smuzhiyun-    {
3118*4882a593Smuzhiyun-      if (entry < argz + argz_len)
3119*4882a593Smuzhiyun-        entry = strchr (entry, '\0') + 1;
3120*4882a593Smuzhiyun-
3121*4882a593Smuzhiyun-      return entry >= argz + argz_len ? NULL : (char *) entry;
3122*4882a593Smuzhiyun-    }
3123*4882a593Smuzhiyun-  else
3124*4882a593Smuzhiyun-    if (argz_len > 0)
3125*4882a593Smuzhiyun-      return argz;
3126*4882a593Smuzhiyun-    else
3127*4882a593Smuzhiyun-      return 0;
3128*4882a593Smuzhiyun-}
3129*4882a593Smuzhiyun-# undef __argz_next
3130*4882a593Smuzhiyun-# define __argz_next(argz, len, entry) argz_next__ (argz, len, entry)
3131*4882a593Smuzhiyun-#endif	/* !_LIBC && !HAVE___ARGZ_NEXT */
3132*4882a593Smuzhiyun-
3133*4882a593Smuzhiyun-
3134*4882a593Smuzhiyun-/* Return number of bits set in X.  */
3135*4882a593Smuzhiyun-static int pop PARAMS ((int x));
3136*4882a593Smuzhiyun-
3137*4882a593Smuzhiyun-static inline int
3138*4882a593Smuzhiyun-pop (x)
3139*4882a593Smuzhiyun-     int x;
3140*4882a593Smuzhiyun-{
3141*4882a593Smuzhiyun-  /* We assume that no more than 16 bits are used.  */
3142*4882a593Smuzhiyun-  x = ((x & ~0x5555) >> 1) + (x & 0x5555);
3143*4882a593Smuzhiyun-  x = ((x & ~0x3333) >> 2) + (x & 0x3333);
3144*4882a593Smuzhiyun-  x = ((x >> 4) + x) & 0x0f0f;
3145*4882a593Smuzhiyun-  x = ((x >> 8) + x) & 0xff;
3146*4882a593Smuzhiyun-
3147*4882a593Smuzhiyun-  return x;
3148*4882a593Smuzhiyun-}
3149*4882a593Smuzhiyun-
3150*4882a593Smuzhiyun-
3151*4882a593Smuzhiyun-struct loaded_l10nfile *
3152*4882a593Smuzhiyun-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
3153*4882a593Smuzhiyun-		    territory, codeset, normalized_codeset, modifier, special,
3154*4882a593Smuzhiyun-		    sponsor, revision, filename, do_allocate)
3155*4882a593Smuzhiyun-     struct loaded_l10nfile **l10nfile_list;
3156*4882a593Smuzhiyun-     const char *dirlist;
3157*4882a593Smuzhiyun-     size_t dirlist_len;
3158*4882a593Smuzhiyun-     int mask;
3159*4882a593Smuzhiyun-     const char *language;
3160*4882a593Smuzhiyun-     const char *territory;
3161*4882a593Smuzhiyun-     const char *codeset;
3162*4882a593Smuzhiyun-     const char *normalized_codeset;
3163*4882a593Smuzhiyun-     const char *modifier;
3164*4882a593Smuzhiyun-     const char *special;
3165*4882a593Smuzhiyun-     const char *sponsor;
3166*4882a593Smuzhiyun-     const char *revision;
3167*4882a593Smuzhiyun-     const char *filename;
3168*4882a593Smuzhiyun-     int do_allocate;
3169*4882a593Smuzhiyun-{
3170*4882a593Smuzhiyun-  char *abs_filename;
3171*4882a593Smuzhiyun-  struct loaded_l10nfile *last = NULL;
3172*4882a593Smuzhiyun-  struct loaded_l10nfile *retval;
3173*4882a593Smuzhiyun-  char *cp;
3174*4882a593Smuzhiyun-  size_t entries;
3175*4882a593Smuzhiyun-  int cnt;
3176*4882a593Smuzhiyun-
3177*4882a593Smuzhiyun-  /* Allocate room for the full file name.  */
3178*4882a593Smuzhiyun-  abs_filename = (char *) malloc (dirlist_len
3179*4882a593Smuzhiyun-				  + strlen (language)
3180*4882a593Smuzhiyun-				  + ((mask & TERRITORY) != 0
3181*4882a593Smuzhiyun-				     ? strlen (territory) + 1 : 0)
3182*4882a593Smuzhiyun-				  + ((mask & XPG_CODESET) != 0
3183*4882a593Smuzhiyun-				     ? strlen (codeset) + 1 : 0)
3184*4882a593Smuzhiyun-				  + ((mask & XPG_NORM_CODESET) != 0
3185*4882a593Smuzhiyun-				     ? strlen (normalized_codeset) + 1 : 0)
3186*4882a593Smuzhiyun-				  + (((mask & XPG_MODIFIER) != 0
3187*4882a593Smuzhiyun-				      || (mask & CEN_AUDIENCE) != 0)
3188*4882a593Smuzhiyun-				     ? strlen (modifier) + 1 : 0)
3189*4882a593Smuzhiyun-				  + ((mask & CEN_SPECIAL) != 0
3190*4882a593Smuzhiyun-				     ? strlen (special) + 1 : 0)
3191*4882a593Smuzhiyun-				  + (((mask & CEN_SPONSOR) != 0
3192*4882a593Smuzhiyun-				      || (mask & CEN_REVISION) != 0)
3193*4882a593Smuzhiyun-				     ? (1 + ((mask & CEN_SPONSOR) != 0
3194*4882a593Smuzhiyun-					     ? strlen (sponsor) + 1 : 0)
3195*4882a593Smuzhiyun-					+ ((mask & CEN_REVISION) != 0
3196*4882a593Smuzhiyun-					   ? strlen (revision) + 1 : 0)) : 0)
3197*4882a593Smuzhiyun-				  + 1 + strlen (filename) + 1);
3198*4882a593Smuzhiyun-
3199*4882a593Smuzhiyun-  if (abs_filename == NULL)
3200*4882a593Smuzhiyun-    return NULL;
3201*4882a593Smuzhiyun-
3202*4882a593Smuzhiyun-  retval = NULL;
3203*4882a593Smuzhiyun-  last = NULL;
3204*4882a593Smuzhiyun-
3205*4882a593Smuzhiyun-  /* Construct file name.  */
3206*4882a593Smuzhiyun-  memcpy (abs_filename, dirlist, dirlist_len);
3207*4882a593Smuzhiyun-  __argz_stringify (abs_filename, dirlist_len, ':');
3208*4882a593Smuzhiyun-  cp = abs_filename + (dirlist_len - 1);
3209*4882a593Smuzhiyun-  *cp++ = '/';
3210*4882a593Smuzhiyun-  cp = stpcpy (cp, language);
3211*4882a593Smuzhiyun-
3212*4882a593Smuzhiyun-  if ((mask & TERRITORY) != 0)
3213*4882a593Smuzhiyun-    {
3214*4882a593Smuzhiyun-      *cp++ = '_';
3215*4882a593Smuzhiyun-      cp = stpcpy (cp, territory);
3216*4882a593Smuzhiyun-    }
3217*4882a593Smuzhiyun-  if ((mask & XPG_CODESET) != 0)
3218*4882a593Smuzhiyun-    {
3219*4882a593Smuzhiyun-      *cp++ = '.';
3220*4882a593Smuzhiyun-      cp = stpcpy (cp, codeset);
3221*4882a593Smuzhiyun-    }
3222*4882a593Smuzhiyun-  if ((mask & XPG_NORM_CODESET) != 0)
3223*4882a593Smuzhiyun-    {
3224*4882a593Smuzhiyun-      *cp++ = '.';
3225*4882a593Smuzhiyun-      cp = stpcpy (cp, normalized_codeset);
3226*4882a593Smuzhiyun-    }
3227*4882a593Smuzhiyun-  if ((mask & (XPG_MODIFIER | CEN_AUDIENCE)) != 0)
3228*4882a593Smuzhiyun-    {
3229*4882a593Smuzhiyun-      /* This component can be part of both syntaces but has different
3230*4882a593Smuzhiyun-	 leading characters.  For CEN we use `+', else `@'.  */
3231*4882a593Smuzhiyun-      *cp++ = (mask & CEN_AUDIENCE) != 0 ? '+' : '@';
3232*4882a593Smuzhiyun-      cp = stpcpy (cp, modifier);
3233*4882a593Smuzhiyun-    }
3234*4882a593Smuzhiyun-  if ((mask & CEN_SPECIAL) != 0)
3235*4882a593Smuzhiyun-    {
3236*4882a593Smuzhiyun-      *cp++ = '+';
3237*4882a593Smuzhiyun-      cp = stpcpy (cp, special);
3238*4882a593Smuzhiyun-    }
3239*4882a593Smuzhiyun-  if ((mask & (CEN_SPONSOR | CEN_REVISION)) != 0)
3240*4882a593Smuzhiyun-    {
3241*4882a593Smuzhiyun-      *cp++ = ',';
3242*4882a593Smuzhiyun-      if ((mask & CEN_SPONSOR) != 0)
3243*4882a593Smuzhiyun-	cp = stpcpy (cp, sponsor);
3244*4882a593Smuzhiyun-      if ((mask & CEN_REVISION) != 0)
3245*4882a593Smuzhiyun-	{
3246*4882a593Smuzhiyun-	  *cp++ = '_';
3247*4882a593Smuzhiyun-	  cp = stpcpy (cp, revision);
3248*4882a593Smuzhiyun-	}
3249*4882a593Smuzhiyun-    }
3250*4882a593Smuzhiyun-
3251*4882a593Smuzhiyun-  *cp++ = '/';
3252*4882a593Smuzhiyun-  stpcpy (cp, filename);
3253*4882a593Smuzhiyun-
3254*4882a593Smuzhiyun-  /* Look in list of already loaded domains whether it is already
3255*4882a593Smuzhiyun-     available.  */
3256*4882a593Smuzhiyun-  last = NULL;
3257*4882a593Smuzhiyun-  for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
3258*4882a593Smuzhiyun-    if (retval->filename != NULL)
3259*4882a593Smuzhiyun-      {
3260*4882a593Smuzhiyun-	int compare = strcmp (retval->filename, abs_filename);
3261*4882a593Smuzhiyun-	if (compare == 0)
3262*4882a593Smuzhiyun-	  /* We found it!  */
3263*4882a593Smuzhiyun-	  break;
3264*4882a593Smuzhiyun-	if (compare < 0)
3265*4882a593Smuzhiyun-	  {
3266*4882a593Smuzhiyun-	    /* It's not in the list.  */
3267*4882a593Smuzhiyun-	    retval = NULL;
3268*4882a593Smuzhiyun-	    break;
3269*4882a593Smuzhiyun-	  }
3270*4882a593Smuzhiyun-
3271*4882a593Smuzhiyun-	last = retval;
3272*4882a593Smuzhiyun-      }
3273*4882a593Smuzhiyun-
3274*4882a593Smuzhiyun-  if (retval != NULL || do_allocate == 0)
3275*4882a593Smuzhiyun-    {
3276*4882a593Smuzhiyun-      free (abs_filename);
3277*4882a593Smuzhiyun-      return retval;
3278*4882a593Smuzhiyun-    }
3279*4882a593Smuzhiyun-
3280*4882a593Smuzhiyun-  retval = (struct loaded_l10nfile *)
3281*4882a593Smuzhiyun-    malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
3282*4882a593Smuzhiyun-				* (1 << pop (mask))
3283*4882a593Smuzhiyun-				* sizeof (struct loaded_l10nfile *)));
3284*4882a593Smuzhiyun-  if (retval == NULL)
3285*4882a593Smuzhiyun-    return NULL;
3286*4882a593Smuzhiyun-
3287*4882a593Smuzhiyun-  retval->filename = abs_filename;
3288*4882a593Smuzhiyun-  retval->decided = (__argz_count (dirlist, dirlist_len) != 1
3289*4882a593Smuzhiyun-		     || ((mask & XPG_CODESET) != 0
3290*4882a593Smuzhiyun-			 && (mask & XPG_NORM_CODESET) != 0));
3291*4882a593Smuzhiyun-  retval->data = NULL;
3292*4882a593Smuzhiyun-
3293*4882a593Smuzhiyun-  if (last == NULL)
3294*4882a593Smuzhiyun-    {
3295*4882a593Smuzhiyun-      retval->next = *l10nfile_list;
3296*4882a593Smuzhiyun-      *l10nfile_list = retval;
3297*4882a593Smuzhiyun-    }
3298*4882a593Smuzhiyun-  else
3299*4882a593Smuzhiyun-    {
3300*4882a593Smuzhiyun-      retval->next = last->next;
3301*4882a593Smuzhiyun-      last->next = retval;
3302*4882a593Smuzhiyun-    }
3303*4882a593Smuzhiyun-
3304*4882a593Smuzhiyun-  entries = 0;
3305*4882a593Smuzhiyun-  /* If the DIRLIST is a real list the RETVAL entry corresponds not to
3306*4882a593Smuzhiyun-     a real file.  So we have to use the DIRLIST separation mechanism
3307*4882a593Smuzhiyun-     of the inner loop.  */
3308*4882a593Smuzhiyun-  cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
3309*4882a593Smuzhiyun-  for (; cnt >= 0; --cnt)
3310*4882a593Smuzhiyun-    if ((cnt & ~mask) == 0
3311*4882a593Smuzhiyun-	&& ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
3312*4882a593Smuzhiyun-	&& ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
3313*4882a593Smuzhiyun-      {
3314*4882a593Smuzhiyun-	/* Iterate over all elements of the DIRLIST.  */
3315*4882a593Smuzhiyun-	char *dir = NULL;
3316*4882a593Smuzhiyun-
3317*4882a593Smuzhiyun-	while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
3318*4882a593Smuzhiyun-	       != NULL)
3319*4882a593Smuzhiyun-	  retval->successor[entries++]
3320*4882a593Smuzhiyun-	    = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
3321*4882a593Smuzhiyun-				  language, territory, codeset,
3322*4882a593Smuzhiyun-				  normalized_codeset, modifier, special,
3323*4882a593Smuzhiyun-				  sponsor, revision, filename, 1);
3324*4882a593Smuzhiyun-      }
3325*4882a593Smuzhiyun-  retval->successor[entries] = NULL;
3326*4882a593Smuzhiyun-
3327*4882a593Smuzhiyun-  return retval;
3328*4882a593Smuzhiyun-}
3329*4882a593Smuzhiyun-
3330*4882a593Smuzhiyun-/* Normalize codeset name.  There is no standard for the codeset
3331*4882a593Smuzhiyun-   names.  Normalization allows the user to use any of the common
3332*4882a593Smuzhiyun-   names.  */
3333*4882a593Smuzhiyun-const char *
3334*4882a593Smuzhiyun-_nl_normalize_codeset (codeset, name_len)
3335*4882a593Smuzhiyun-     const char *codeset;
3336*4882a593Smuzhiyun-     size_t name_len;
3337*4882a593Smuzhiyun-{
3338*4882a593Smuzhiyun-  int len = 0;
3339*4882a593Smuzhiyun-  int only_digit = 1;
3340*4882a593Smuzhiyun-  char *retval;
3341*4882a593Smuzhiyun-  char *wp;
3342*4882a593Smuzhiyun-  size_t cnt;
3343*4882a593Smuzhiyun-
3344*4882a593Smuzhiyun-  for (cnt = 0; cnt < name_len; ++cnt)
3345*4882a593Smuzhiyun-    if (isalnum (codeset[cnt]))
3346*4882a593Smuzhiyun-      {
3347*4882a593Smuzhiyun-	++len;
3348*4882a593Smuzhiyun-
3349*4882a593Smuzhiyun-	if (isalpha (codeset[cnt]))
3350*4882a593Smuzhiyun-	  only_digit = 0;
3351*4882a593Smuzhiyun-      }
3352*4882a593Smuzhiyun-
3353*4882a593Smuzhiyun-  retval = (char *) malloc ((only_digit ? 3 : 0) + len + 1);
3354*4882a593Smuzhiyun-
3355*4882a593Smuzhiyun-  if (retval != NULL)
3356*4882a593Smuzhiyun-    {
3357*4882a593Smuzhiyun-      if (only_digit)
3358*4882a593Smuzhiyun-	wp = stpcpy (retval, "iso");
3359*4882a593Smuzhiyun-      else
3360*4882a593Smuzhiyun-	wp = retval;
3361*4882a593Smuzhiyun-
3362*4882a593Smuzhiyun-      for (cnt = 0; cnt < name_len; ++cnt)
3363*4882a593Smuzhiyun-	if (isalpha (codeset[cnt]))
3364*4882a593Smuzhiyun-	  *wp++ = tolower (codeset[cnt]);
3365*4882a593Smuzhiyun-	else if (isdigit (codeset[cnt]))
3366*4882a593Smuzhiyun-	  *wp++ = codeset[cnt];
3367*4882a593Smuzhiyun-
3368*4882a593Smuzhiyun-      *wp = '\0';
3369*4882a593Smuzhiyun-    }
3370*4882a593Smuzhiyun-
3371*4882a593Smuzhiyun-  return (const char *) retval;
3372*4882a593Smuzhiyun-}
3373*4882a593Smuzhiyun-
3374*4882a593Smuzhiyun-
3375*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
3376*4882a593Smuzhiyun-
3377*4882a593Smuzhiyun-/* We don't want libintl.a to depend on any other library.  So we
3378*4882a593Smuzhiyun-   avoid the non-standard function stpcpy.  In GNU C Library this
3379*4882a593Smuzhiyun-   function is available, though.  Also allow the symbol HAVE_STPCPY
3380*4882a593Smuzhiyun-   to be defined.  */
3381*4882a593Smuzhiyun-#if !_LIBC && !HAVE_STPCPY
3382*4882a593Smuzhiyun-static char *
3383*4882a593Smuzhiyun-stpcpy (dest, src)
3384*4882a593Smuzhiyun-     char *dest;
3385*4882a593Smuzhiyun-     const char *src;
3386*4882a593Smuzhiyun-{
3387*4882a593Smuzhiyun-  while ((*dest++ = *src++) != '\0')
3388*4882a593Smuzhiyun-    /* Do nothing. */ ;
3389*4882a593Smuzhiyun-  return dest - 1;
3390*4882a593Smuzhiyun-}
3391*4882a593Smuzhiyun-#endif
3392*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/libgettext.h lrzsz-0.12.20/intl/libgettext.h
3393*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/libgettext.h	1998-04-26 14:22:36.000000000 +0100
3394*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/libgettext.h	1970-01-01 01:00:00.000000000 +0100
3395*4882a593Smuzhiyun@@ -1,182 +0,0 @@
3396*4882a593Smuzhiyun-/* Message catalogs for internationalization.
3397*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3398*4882a593Smuzhiyun-
3399*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
3400*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
3401*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
3402*4882a593Smuzhiyun-   any later version.
3403*4882a593Smuzhiyun-
3404*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
3405*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
3406*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3407*4882a593Smuzhiyun-   GNU General Public License for more details.
3408*4882a593Smuzhiyun-
3409*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
3410*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
3411*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
3412*4882a593Smuzhiyun-
3413*4882a593Smuzhiyun-/* Because on some systems (e.g. Solaris) we sometimes have to include
3414*4882a593Smuzhiyun-   the systems libintl.h as well as this file we have more complex
3415*4882a593Smuzhiyun-   include protection above.  But the systems header might perhaps also
3416*4882a593Smuzhiyun-   define _LIBINTL_H and therefore we have to protect the definition here.  */
3417*4882a593Smuzhiyun-
3418*4882a593Smuzhiyun-#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
3419*4882a593Smuzhiyun-#if !defined (_LIBINTL_H)
3420*4882a593Smuzhiyun-# define _LIBINTL_H	1
3421*4882a593Smuzhiyun-#endif
3422*4882a593Smuzhiyun-#define _LIBGETTEXT_H	1
3423*4882a593Smuzhiyun-
3424*4882a593Smuzhiyun-/* We define an additional symbol to signal that we use the GNU
3425*4882a593Smuzhiyun-   implementation of gettext.  */
3426*4882a593Smuzhiyun-#define __USE_GNU_GETTEXT 1
3427*4882a593Smuzhiyun-
3428*4882a593Smuzhiyun-#include <sys/types.h>
3429*4882a593Smuzhiyun-
3430*4882a593Smuzhiyun-#if HAVE_LOCALE_H
3431*4882a593Smuzhiyun-# include <locale.h>
3432*4882a593Smuzhiyun-#endif
3433*4882a593Smuzhiyun-
3434*4882a593Smuzhiyun-
3435*4882a593Smuzhiyun-#ifdef __cplusplus
3436*4882a593Smuzhiyun-extern "C" {
3437*4882a593Smuzhiyun-#endif
3438*4882a593Smuzhiyun-
3439*4882a593Smuzhiyun-/* @@ end of prolog @@ */
3440*4882a593Smuzhiyun-
3441*4882a593Smuzhiyun-#ifndef PARAMS
3442*4882a593Smuzhiyun-# if __STDC__
3443*4882a593Smuzhiyun-#  define PARAMS(args) args
3444*4882a593Smuzhiyun-# else
3445*4882a593Smuzhiyun-#  define PARAMS(args) ()
3446*4882a593Smuzhiyun-# endif
3447*4882a593Smuzhiyun-#endif
3448*4882a593Smuzhiyun-
3449*4882a593Smuzhiyun-#ifndef NULL
3450*4882a593Smuzhiyun-# if !defined __cplusplus || defined __GNUC__
3451*4882a593Smuzhiyun-#  define NULL ((void *) 0)
3452*4882a593Smuzhiyun-# else
3453*4882a593Smuzhiyun-#  define NULL (0)
3454*4882a593Smuzhiyun-# endif
3455*4882a593Smuzhiyun-#endif
3456*4882a593Smuzhiyun-
3457*4882a593Smuzhiyun-#if !HAVE_LC_MESSAGES
3458*4882a593Smuzhiyun-/* This value determines the behaviour of the gettext() and dgettext()
3459*4882a593Smuzhiyun-   function.  But some system does not have this defined.  Define it
3460*4882a593Smuzhiyun-   to a default value.  */
3461*4882a593Smuzhiyun-# define LC_MESSAGES (-1)
3462*4882a593Smuzhiyun-#endif
3463*4882a593Smuzhiyun-
3464*4882a593Smuzhiyun-
3465*4882a593Smuzhiyun-/* Declarations for gettext-using-catgets interface.  Derived from
3466*4882a593Smuzhiyun-   Jim Meyering's libintl.h.  */
3467*4882a593Smuzhiyun-struct _msg_ent
3468*4882a593Smuzhiyun-{
3469*4882a593Smuzhiyun-  const char *_msg;
3470*4882a593Smuzhiyun-  int _msg_number;
3471*4882a593Smuzhiyun-};
3472*4882a593Smuzhiyun-
3473*4882a593Smuzhiyun-
3474*4882a593Smuzhiyun-#if HAVE_CATGETS
3475*4882a593Smuzhiyun-/* These two variables are defined in the automatically by po-to-tbl.sed
3476*4882a593Smuzhiyun-   generated file `cat-id-tbl.c'.  */
3477*4882a593Smuzhiyun-extern const struct _msg_ent _msg_tbl[];
3478*4882a593Smuzhiyun-extern int _msg_tbl_length;
3479*4882a593Smuzhiyun-#endif
3480*4882a593Smuzhiyun-
3481*4882a593Smuzhiyun-
3482*4882a593Smuzhiyun-/* For automatical extraction of messages sometimes no real
3483*4882a593Smuzhiyun-   translation is needed.  Instead the string itself is the result.  */
3484*4882a593Smuzhiyun-#define gettext_noop(Str) (Str)
3485*4882a593Smuzhiyun-
3486*4882a593Smuzhiyun-/* Look up MSGID in the current default message catalog for the current
3487*4882a593Smuzhiyun-   LC_MESSAGES locale.  If not found, returns MSGID itself (the default
3488*4882a593Smuzhiyun-   text).  */
3489*4882a593Smuzhiyun-extern char *gettext PARAMS ((const char *__msgid));
3490*4882a593Smuzhiyun-extern char *gettext__ PARAMS ((const char *__msgid));
3491*4882a593Smuzhiyun-
3492*4882a593Smuzhiyun-/* Look up MSGID in the DOMAINNAME message catalog for the current
3493*4882a593Smuzhiyun-   LC_MESSAGES locale.  */
3494*4882a593Smuzhiyun-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
3495*4882a593Smuzhiyun-extern char *dgettext__ PARAMS ((const char *__domainname,
3496*4882a593Smuzhiyun-				 const char *__msgid));
3497*4882a593Smuzhiyun-
3498*4882a593Smuzhiyun-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
3499*4882a593Smuzhiyun-   locale.  */
3500*4882a593Smuzhiyun-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
3501*4882a593Smuzhiyun-				int __category));
3502*4882a593Smuzhiyun-extern char *dcgettext__ PARAMS ((const char *__domainname,
3503*4882a593Smuzhiyun-				  const char *__msgid, int __category));
3504*4882a593Smuzhiyun-
3505*4882a593Smuzhiyun-
3506*4882a593Smuzhiyun-/* Set the current default message catalog to DOMAINNAME.
3507*4882a593Smuzhiyun-   If DOMAINNAME is null, return the current default.
3508*4882a593Smuzhiyun-   If DOMAINNAME is "", reset to the default of "messages".  */
3509*4882a593Smuzhiyun-extern char *textdomain PARAMS ((const char *__domainname));
3510*4882a593Smuzhiyun-extern char *textdomain__ PARAMS ((const char *__domainname));
3511*4882a593Smuzhiyun-
3512*4882a593Smuzhiyun-/* Specify that the DOMAINNAME message catalog will be found
3513*4882a593Smuzhiyun-   in DIRNAME rather than in the system locale data base.  */
3514*4882a593Smuzhiyun-extern char *bindtextdomain PARAMS ((const char *__domainname,
3515*4882a593Smuzhiyun-				  const char *__dirname));
3516*4882a593Smuzhiyun-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
3517*4882a593Smuzhiyun-				    const char *__dirname));
3518*4882a593Smuzhiyun-
3519*4882a593Smuzhiyun-#if ENABLE_NLS
3520*4882a593Smuzhiyun-
3521*4882a593Smuzhiyun-/* Solaris 2.3 has the gettext function but dcgettext is missing.
3522*4882a593Smuzhiyun-   So we omit this optimization for Solaris 2.3.  BTW, Solaris 2.4
3523*4882a593Smuzhiyun-   has dcgettext.  */
3524*4882a593Smuzhiyun-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
3525*4882a593Smuzhiyun-
3526*4882a593Smuzhiyun-#  define gettext(Msgid)						      \
3527*4882a593Smuzhiyun-     dgettext (NULL, Msgid)
3528*4882a593Smuzhiyun-
3529*4882a593Smuzhiyun-#  define dgettext(Domainname, Msgid)					      \
3530*4882a593Smuzhiyun-     dcgettext (Domainname, Msgid, LC_MESSAGES)
3531*4882a593Smuzhiyun-
3532*4882a593Smuzhiyun-#  if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
3533*4882a593Smuzhiyun-/* This global variable is defined in loadmsgcat.c.  We need a sign,
3534*4882a593Smuzhiyun-   whether a new catalog was loaded, which can be associated with all
3535*4882a593Smuzhiyun-   translations.  */
3536*4882a593Smuzhiyun-extern int _nl_msg_cat_cntr;
3537*4882a593Smuzhiyun-
3538*4882a593Smuzhiyun-#   define dcgettext(Domainname, Msgid, Category)			      \
3539*4882a593Smuzhiyun-  (__extension__							      \
3540*4882a593Smuzhiyun-   ({									      \
3541*4882a593Smuzhiyun-     char *__result;							      \
3542*4882a593Smuzhiyun-     if (__builtin_constant_p (Msgid))					      \
3543*4882a593Smuzhiyun-       {								      \
3544*4882a593Smuzhiyun-	 static char *__translation__;					      \
3545*4882a593Smuzhiyun-	 static int __catalog_counter__;				      \
3546*4882a593Smuzhiyun-	 if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr)    \
3547*4882a593Smuzhiyun-	   {								      \
3548*4882a593Smuzhiyun-	     __translation__ =						      \
3549*4882a593Smuzhiyun-	       dcgettext__ (Domainname, Msgid, Category);		      \
3550*4882a593Smuzhiyun-	     __catalog_counter__ = _nl_msg_cat_cntr;			      \
3551*4882a593Smuzhiyun-	   }								      \
3552*4882a593Smuzhiyun-	 __result = __translation__;					      \
3553*4882a593Smuzhiyun-       }								      \
3554*4882a593Smuzhiyun-     else								      \
3555*4882a593Smuzhiyun-       __result = dcgettext__ (Domainname, Msgid, Category);		      \
3556*4882a593Smuzhiyun-     __result;								      \
3557*4882a593Smuzhiyun-    }))
3558*4882a593Smuzhiyun-#  endif
3559*4882a593Smuzhiyun-# endif
3560*4882a593Smuzhiyun-
3561*4882a593Smuzhiyun-#else
3562*4882a593Smuzhiyun-
3563*4882a593Smuzhiyun-# define gettext(Msgid) (Msgid)
3564*4882a593Smuzhiyun-# define dgettext(Domainname, Msgid) (Msgid)
3565*4882a593Smuzhiyun-# define dcgettext(Domainname, Msgid, Category) (Msgid)
3566*4882a593Smuzhiyun-# define textdomain(Domainname) while (0) /* nothing */
3567*4882a593Smuzhiyun-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
3568*4882a593Smuzhiyun-
3569*4882a593Smuzhiyun-#endif
3570*4882a593Smuzhiyun-
3571*4882a593Smuzhiyun-/* @@ begin of epilog @@ */
3572*4882a593Smuzhiyun-
3573*4882a593Smuzhiyun-#ifdef __cplusplus
3574*4882a593Smuzhiyun-}
3575*4882a593Smuzhiyun-#endif
3576*4882a593Smuzhiyun-
3577*4882a593Smuzhiyun-#endif
3578*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/linux-msg.sed lrzsz-0.12.20/intl/linux-msg.sed
3579*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/linux-msg.sed	1998-04-26 14:20:52.000000000 +0100
3580*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/linux-msg.sed	1970-01-01 01:00:00.000000000 +0100
3581*4882a593Smuzhiyun@@ -1,100 +0,0 @@
3582*4882a593Smuzhiyun-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
3583*4882a593Smuzhiyun-# Copyright (C) 1995 Free Software Foundation, Inc.
3584*4882a593Smuzhiyun-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
3585*4882a593Smuzhiyun-#
3586*4882a593Smuzhiyun-# This program is free software; you can redistribute it and/or modify
3587*4882a593Smuzhiyun-# it under the terms of the GNU General Public License as published by
3588*4882a593Smuzhiyun-# the Free Software Foundation; either version 2, or (at your option)
3589*4882a593Smuzhiyun-# any later version.
3590*4882a593Smuzhiyun-#
3591*4882a593Smuzhiyun-# This program is distributed in the hope that it will be useful,
3592*4882a593Smuzhiyun-# but WITHOUT ANY WARRANTY; without even the implied warranty of
3593*4882a593Smuzhiyun-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3594*4882a593Smuzhiyun-# GNU General Public License for more details.
3595*4882a593Smuzhiyun-#
3596*4882a593Smuzhiyun-# You should have received a copy of the GNU General Public License
3597*4882a593Smuzhiyun-# along with this program; if not, write to the Free Software
3598*4882a593Smuzhiyun-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
3599*4882a593Smuzhiyun-#
3600*4882a593Smuzhiyun-#
3601*4882a593Smuzhiyun-# The first directive in the .msg should be the definition of the
3602*4882a593Smuzhiyun-# message set number.  We use always set number 1.
3603*4882a593Smuzhiyun-#
3604*4882a593Smuzhiyun-1 {
3605*4882a593Smuzhiyun-  i\
3606*4882a593Smuzhiyun-$set 1 # Automatically created by po2msg.sed
3607*4882a593Smuzhiyun-  h
3608*4882a593Smuzhiyun-  s/.*/0/
3609*4882a593Smuzhiyun-  x
3610*4882a593Smuzhiyun-}
3611*4882a593Smuzhiyun-#
3612*4882a593Smuzhiyun-# Mitch's old catalog format does not allow comments.
3613*4882a593Smuzhiyun-#
3614*4882a593Smuzhiyun-# We copy the original message as a comment into the .msg file.
3615*4882a593Smuzhiyun-#
3616*4882a593Smuzhiyun-/^msgid/ {
3617*4882a593Smuzhiyun-  s/msgid[ 	]*"//
3618*4882a593Smuzhiyun-#
3619*4882a593Smuzhiyun-# This does not work now with the new format.
3620*4882a593Smuzhiyun-# /"$/! {
3621*4882a593Smuzhiyun-#   s/\\$//
3622*4882a593Smuzhiyun-#   s/$/ ... (more lines following)"/
3623*4882a593Smuzhiyun-# }
3624*4882a593Smuzhiyun-  x
3625*4882a593Smuzhiyun-# The following nice solution is by
3626*4882a593Smuzhiyun-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
3627*4882a593Smuzhiyun-  td
3628*4882a593Smuzhiyun-# Increment a decimal number in pattern space.
3629*4882a593Smuzhiyun-# First hide trailing `9' digits.
3630*4882a593Smuzhiyun-  :d
3631*4882a593Smuzhiyun-  s/9\(_*\)$/_\1/
3632*4882a593Smuzhiyun-  td
3633*4882a593Smuzhiyun-# Assure at least one digit is available.
3634*4882a593Smuzhiyun-  s/^\(_*\)$/0\1/
3635*4882a593Smuzhiyun-# Increment the last digit.
3636*4882a593Smuzhiyun-  s/8\(_*\)$/9\1/
3637*4882a593Smuzhiyun-  s/7\(_*\)$/8\1/
3638*4882a593Smuzhiyun-  s/6\(_*\)$/7\1/
3639*4882a593Smuzhiyun-  s/5\(_*\)$/6\1/
3640*4882a593Smuzhiyun-  s/4\(_*\)$/5\1/
3641*4882a593Smuzhiyun-  s/3\(_*\)$/4\1/
3642*4882a593Smuzhiyun-  s/2\(_*\)$/3\1/
3643*4882a593Smuzhiyun-  s/1\(_*\)$/2\1/
3644*4882a593Smuzhiyun-  s/0\(_*\)$/1\1/
3645*4882a593Smuzhiyun-# Convert the hidden `9' digits to `0's.
3646*4882a593Smuzhiyun-  s/_/0/g
3647*4882a593Smuzhiyun-  x
3648*4882a593Smuzhiyun-  G
3649*4882a593Smuzhiyun-  s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
3650*4882a593Smuzhiyun-}
3651*4882a593Smuzhiyun-#
3652*4882a593Smuzhiyun-# The .msg file contains, other then the .po file, only the translations
3653*4882a593Smuzhiyun-# but each given a unique ID.  Starting from 1 and incrementing by 1 for
3654*4882a593Smuzhiyun-# each message we assign them to the messages.
3655*4882a593Smuzhiyun-# It is important that the .po file used to generate the cat-id-tbl.c file
3656*4882a593Smuzhiyun-# (with po-to-tbl) is the same as the one used here.  (At least the order
3657*4882a593Smuzhiyun-# of declarations must not be changed.)
3658*4882a593Smuzhiyun-#
3659*4882a593Smuzhiyun-/^msgstr/ {
3660*4882a593Smuzhiyun-  s/msgstr[ 	]*"\(.*\)"/# \1/
3661*4882a593Smuzhiyun-# Clear substitution flag.
3662*4882a593Smuzhiyun-  tb
3663*4882a593Smuzhiyun-# Append the next line.
3664*4882a593Smuzhiyun-  :b
3665*4882a593Smuzhiyun-  N
3666*4882a593Smuzhiyun-# Look whether second part is continuation line.
3667*4882a593Smuzhiyun-  s/\(.*\n\)"\(.*\)"/\1\2/
3668*4882a593Smuzhiyun-# Yes, then branch.
3669*4882a593Smuzhiyun-  ta
3670*4882a593Smuzhiyun-  P
3671*4882a593Smuzhiyun-  D
3672*4882a593Smuzhiyun-# Note that D includes a jump to the start!!
3673*4882a593Smuzhiyun-# We found a continuation line.  But before printing insert '\'.
3674*4882a593Smuzhiyun-  :a
3675*4882a593Smuzhiyun-  s/\(.*\)\(\n.*\)/\1\\\2/
3676*4882a593Smuzhiyun-  P
3677*4882a593Smuzhiyun-# We cannot use D here.
3678*4882a593Smuzhiyun-  s/.*\n\(.*\)/\1/
3679*4882a593Smuzhiyun-  tb
3680*4882a593Smuzhiyun-}
3681*4882a593Smuzhiyun-d
3682*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/loadinfo.h lrzsz-0.12.20/intl/loadinfo.h
3683*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/loadinfo.h	1998-04-26 14:20:52.000000000 +0100
3684*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/loadinfo.h	1970-01-01 01:00:00.000000000 +0100
3685*4882a593Smuzhiyun@@ -1,58 +0,0 @@
3686*4882a593Smuzhiyun-#ifndef PARAMS
3687*4882a593Smuzhiyun-# if __STDC__
3688*4882a593Smuzhiyun-#  define PARAMS(args) args
3689*4882a593Smuzhiyun-# else
3690*4882a593Smuzhiyun-#  define PARAMS(args) ()
3691*4882a593Smuzhiyun-# endif
3692*4882a593Smuzhiyun-#endif
3693*4882a593Smuzhiyun-
3694*4882a593Smuzhiyun-/* Encoding of locale name parts.  */
3695*4882a593Smuzhiyun-#define CEN_REVISION		1
3696*4882a593Smuzhiyun-#define CEN_SPONSOR		2
3697*4882a593Smuzhiyun-#define CEN_SPECIAL		4
3698*4882a593Smuzhiyun-#define XPG_NORM_CODESET	8
3699*4882a593Smuzhiyun-#define XPG_CODESET		16
3700*4882a593Smuzhiyun-#define TERRITORY		32
3701*4882a593Smuzhiyun-#define CEN_AUDIENCE		64
3702*4882a593Smuzhiyun-#define XPG_MODIFIER		128
3703*4882a593Smuzhiyun-
3704*4882a593Smuzhiyun-#define CEN_SPECIFIC	(CEN_REVISION|CEN_SPONSOR|CEN_SPECIAL|CEN_AUDIENCE)
3705*4882a593Smuzhiyun-#define XPG_SPECIFIC	(XPG_CODESET|XPG_NORM_CODESET|XPG_MODIFIER)
3706*4882a593Smuzhiyun-
3707*4882a593Smuzhiyun-
3708*4882a593Smuzhiyun-struct loaded_l10nfile
3709*4882a593Smuzhiyun-{
3710*4882a593Smuzhiyun-  const char *filename;
3711*4882a593Smuzhiyun-  int decided;
3712*4882a593Smuzhiyun-
3713*4882a593Smuzhiyun-  const void *data;
3714*4882a593Smuzhiyun-
3715*4882a593Smuzhiyun-  struct loaded_l10nfile *next;
3716*4882a593Smuzhiyun-  struct loaded_l10nfile *successor[1];
3717*4882a593Smuzhiyun-};
3718*4882a593Smuzhiyun-
3719*4882a593Smuzhiyun-
3720*4882a593Smuzhiyun-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
3721*4882a593Smuzhiyun-						  size_t name_len));
3722*4882a593Smuzhiyun-
3723*4882a593Smuzhiyun-extern struct loaded_l10nfile *
3724*4882a593Smuzhiyun-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
3725*4882a593Smuzhiyun-			    const char *dirlist, size_t dirlist_len, int mask,
3726*4882a593Smuzhiyun-			    const char *language, const char *territory,
3727*4882a593Smuzhiyun-			    const char *codeset,
3728*4882a593Smuzhiyun-			    const char *normalized_codeset,
3729*4882a593Smuzhiyun-			    const char *modifier, const char *special,
3730*4882a593Smuzhiyun-			    const char *sponsor, const char *revision,
3731*4882a593Smuzhiyun-			    const char *filename, int do_allocate));
3732*4882a593Smuzhiyun-
3733*4882a593Smuzhiyun-
3734*4882a593Smuzhiyun-extern const char *_nl_expand_alias PARAMS ((const char *name));
3735*4882a593Smuzhiyun-
3736*4882a593Smuzhiyun-extern int _nl_explode_name PARAMS ((char *name, const char **language,
3737*4882a593Smuzhiyun-				     const char **modifier,
3738*4882a593Smuzhiyun-				     const char **territory,
3739*4882a593Smuzhiyun-				     const char **codeset,
3740*4882a593Smuzhiyun-				     const char **normalized_codeset,
3741*4882a593Smuzhiyun-				     const char **special,
3742*4882a593Smuzhiyun-				     const char **sponsor,
3743*4882a593Smuzhiyun-				     const char **revision));
3744*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/loadmsgcat.c lrzsz-0.12.20/intl/loadmsgcat.c
3745*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/loadmsgcat.c	1998-04-26 14:22:37.000000000 +0100
3746*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/loadmsgcat.c	1970-01-01 01:00:00.000000000 +0100
3747*4882a593Smuzhiyun@@ -1,199 +0,0 @@
3748*4882a593Smuzhiyun-/* Load needed message catalogs
3749*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3750*4882a593Smuzhiyun-
3751*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
3752*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
3753*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
3754*4882a593Smuzhiyun-   any later version.
3755*4882a593Smuzhiyun-
3756*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
3757*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
3758*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3759*4882a593Smuzhiyun-   GNU General Public License for more details.
3760*4882a593Smuzhiyun-
3761*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
3762*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
3763*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
3764*4882a593Smuzhiyun-
3765*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
3766*4882a593Smuzhiyun-# include <config.h>
3767*4882a593Smuzhiyun-#endif
3768*4882a593Smuzhiyun-
3769*4882a593Smuzhiyun-#include <fcntl.h>
3770*4882a593Smuzhiyun-#include <sys/types.h>
3771*4882a593Smuzhiyun-#include <sys/stat.h>
3772*4882a593Smuzhiyun-
3773*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
3774*4882a593Smuzhiyun-# include <stdlib.h>
3775*4882a593Smuzhiyun-#endif
3776*4882a593Smuzhiyun-
3777*4882a593Smuzhiyun-#if defined HAVE_UNISTD_H || defined _LIBC
3778*4882a593Smuzhiyun-# include <unistd.h>
3779*4882a593Smuzhiyun-#endif
3780*4882a593Smuzhiyun-
3781*4882a593Smuzhiyun-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
3782*4882a593Smuzhiyun-# include <sys/mman.h>
3783*4882a593Smuzhiyun-#endif
3784*4882a593Smuzhiyun-
3785*4882a593Smuzhiyun-#include "gettext.h"
3786*4882a593Smuzhiyun-#include "gettextP.h"
3787*4882a593Smuzhiyun-
3788*4882a593Smuzhiyun-/* @@ end of prolog @@ */
3789*4882a593Smuzhiyun-
3790*4882a593Smuzhiyun-#ifdef _LIBC
3791*4882a593Smuzhiyun-/* Rename the non ISO C functions.  This is required by the standard
3792*4882a593Smuzhiyun-   because some ISO C functions will require linking with this object
3793*4882a593Smuzhiyun-   file and the name space must not be polluted.  */
3794*4882a593Smuzhiyun-# define fstat  __fstat
3795*4882a593Smuzhiyun-# define open   __open
3796*4882a593Smuzhiyun-# define close  __close
3797*4882a593Smuzhiyun-# define read   __read
3798*4882a593Smuzhiyun-# define mmap   __mmap
3799*4882a593Smuzhiyun-# define munmap __munmap
3800*4882a593Smuzhiyun-#endif
3801*4882a593Smuzhiyun-
3802*4882a593Smuzhiyun-/* We need a sign, whether a new catalog was loaded, which can be associated
3803*4882a593Smuzhiyun-   with all translations.  This is important if the translations are
3804*4882a593Smuzhiyun-   cached by one of GCC's features.  */
3805*4882a593Smuzhiyun-int _nl_msg_cat_cntr = 0;
3806*4882a593Smuzhiyun-
3807*4882a593Smuzhiyun-
3808*4882a593Smuzhiyun-/* Load the message catalogs specified by FILENAME.  If it is no valid
3809*4882a593Smuzhiyun-   message catalog do nothing.  */
3810*4882a593Smuzhiyun-void
3811*4882a593Smuzhiyun-_nl_load_domain (domain_file)
3812*4882a593Smuzhiyun-     struct loaded_l10nfile *domain_file;
3813*4882a593Smuzhiyun-{
3814*4882a593Smuzhiyun-  int fd;
3815*4882a593Smuzhiyun-  struct stat st;
3816*4882a593Smuzhiyun-  struct mo_file_header *data = (struct mo_file_header *) -1;
3817*4882a593Smuzhiyun-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
3818*4882a593Smuzhiyun-    || defined _LIBC
3819*4882a593Smuzhiyun-  int use_mmap = 0;
3820*4882a593Smuzhiyun-#endif
3821*4882a593Smuzhiyun-  struct loaded_domain *domain;
3822*4882a593Smuzhiyun-
3823*4882a593Smuzhiyun-  domain_file->decided = 1;
3824*4882a593Smuzhiyun-  domain_file->data = NULL;
3825*4882a593Smuzhiyun-
3826*4882a593Smuzhiyun-  /* If the record does not represent a valid locale the FILENAME
3827*4882a593Smuzhiyun-     might be NULL.  This can happen when according to the given
3828*4882a593Smuzhiyun-     specification the locale file name is different for XPG and CEN
3829*4882a593Smuzhiyun-     syntax.  */
3830*4882a593Smuzhiyun-  if (domain_file->filename == NULL)
3831*4882a593Smuzhiyun-    return;
3832*4882a593Smuzhiyun-
3833*4882a593Smuzhiyun-  /* Try to open the addressed file.  */
3834*4882a593Smuzhiyun-  fd = open (domain_file->filename, O_RDONLY);
3835*4882a593Smuzhiyun-  if (fd == -1)
3836*4882a593Smuzhiyun-    return;
3837*4882a593Smuzhiyun-
3838*4882a593Smuzhiyun-  /* We must know about the size of the file.  */
3839*4882a593Smuzhiyun-  if (fstat (fd, &st) != 0
3840*4882a593Smuzhiyun-      && st.st_size < (off_t) sizeof (struct mo_file_header))
3841*4882a593Smuzhiyun-    {
3842*4882a593Smuzhiyun-      /* Something went wrong.  */
3843*4882a593Smuzhiyun-      close (fd);
3844*4882a593Smuzhiyun-      return;
3845*4882a593Smuzhiyun-    }
3846*4882a593Smuzhiyun-
3847*4882a593Smuzhiyun-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
3848*4882a593Smuzhiyun-    || defined _LIBC
3849*4882a593Smuzhiyun-  /* Now we are ready to load the file.  If mmap() is available we try
3850*4882a593Smuzhiyun-     this first.  If not available or it failed we try to load it.  */
3851*4882a593Smuzhiyun-  data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
3852*4882a593Smuzhiyun-					 MAP_PRIVATE, fd, 0);
3853*4882a593Smuzhiyun-
3854*4882a593Smuzhiyun-  if (data != (struct mo_file_header *) -1)
3855*4882a593Smuzhiyun-    {
3856*4882a593Smuzhiyun-      /* mmap() call was successful.  */
3857*4882a593Smuzhiyun-      close (fd);
3858*4882a593Smuzhiyun-      use_mmap = 1;
3859*4882a593Smuzhiyun-    }
3860*4882a593Smuzhiyun-#endif
3861*4882a593Smuzhiyun-
3862*4882a593Smuzhiyun-  /* If the data is not yet available (i.e. mmap'ed) we try to load
3863*4882a593Smuzhiyun-     it manually.  */
3864*4882a593Smuzhiyun-  if (data == (struct mo_file_header *) -1)
3865*4882a593Smuzhiyun-    {
3866*4882a593Smuzhiyun-      off_t to_read;
3867*4882a593Smuzhiyun-      char *read_ptr;
3868*4882a593Smuzhiyun-
3869*4882a593Smuzhiyun-      data = (struct mo_file_header *) malloc (st.st_size);
3870*4882a593Smuzhiyun-      if (data == NULL)
3871*4882a593Smuzhiyun-	return;
3872*4882a593Smuzhiyun-
3873*4882a593Smuzhiyun-      to_read = st.st_size;
3874*4882a593Smuzhiyun-      read_ptr = (char *) data;
3875*4882a593Smuzhiyun-      do
3876*4882a593Smuzhiyun-	{
3877*4882a593Smuzhiyun-	  long int nb = (long int) read (fd, read_ptr, to_read);
3878*4882a593Smuzhiyun-	  if (nb == -1)
3879*4882a593Smuzhiyun-	    {
3880*4882a593Smuzhiyun-	      close (fd);
3881*4882a593Smuzhiyun-	      return;
3882*4882a593Smuzhiyun-	    }
3883*4882a593Smuzhiyun-
3884*4882a593Smuzhiyun-	  read_ptr += nb;
3885*4882a593Smuzhiyun-	  to_read -= nb;
3886*4882a593Smuzhiyun-	}
3887*4882a593Smuzhiyun-      while (to_read > 0);
3888*4882a593Smuzhiyun-
3889*4882a593Smuzhiyun-      close (fd);
3890*4882a593Smuzhiyun-    }
3891*4882a593Smuzhiyun-
3892*4882a593Smuzhiyun-  /* Using the magic number we can test whether it really is a message
3893*4882a593Smuzhiyun-     catalog file.  */
3894*4882a593Smuzhiyun-  if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
3895*4882a593Smuzhiyun-    {
3896*4882a593Smuzhiyun-      /* The magic number is wrong: not a message catalog file.  */
3897*4882a593Smuzhiyun-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
3898*4882a593Smuzhiyun-    || defined _LIBC
3899*4882a593Smuzhiyun-      if (use_mmap)
3900*4882a593Smuzhiyun-	munmap ((caddr_t) data, st.st_size);
3901*4882a593Smuzhiyun-      else
3902*4882a593Smuzhiyun-#endif
3903*4882a593Smuzhiyun-	free (data);
3904*4882a593Smuzhiyun-      return;
3905*4882a593Smuzhiyun-    }
3906*4882a593Smuzhiyun-
3907*4882a593Smuzhiyun-  domain_file->data
3908*4882a593Smuzhiyun-    = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
3909*4882a593Smuzhiyun-  if (domain_file->data == NULL)
3910*4882a593Smuzhiyun-    return;
3911*4882a593Smuzhiyun-
3912*4882a593Smuzhiyun-  domain = (struct loaded_domain *) domain_file->data;
3913*4882a593Smuzhiyun-  domain->data = (char *) data;
3914*4882a593Smuzhiyun-  domain->must_swap = data->magic != _MAGIC;
3915*4882a593Smuzhiyun-
3916*4882a593Smuzhiyun-  /* Fill in the information about the available tables.  */
3917*4882a593Smuzhiyun-  switch (W (domain->must_swap, data->revision))
3918*4882a593Smuzhiyun-    {
3919*4882a593Smuzhiyun-    case 0:
3920*4882a593Smuzhiyun-      domain->nstrings = W (domain->must_swap, data->nstrings);
3921*4882a593Smuzhiyun-      domain->orig_tab = (struct string_desc *)
3922*4882a593Smuzhiyun-	((char *) data + W (domain->must_swap, data->orig_tab_offset));
3923*4882a593Smuzhiyun-      domain->trans_tab = (struct string_desc *)
3924*4882a593Smuzhiyun-	((char *) data + W (domain->must_swap, data->trans_tab_offset));
3925*4882a593Smuzhiyun-      domain->hash_size = W (domain->must_swap, data->hash_tab_size);
3926*4882a593Smuzhiyun-      domain->hash_tab = (nls_uint32 *)
3927*4882a593Smuzhiyun-	((char *) data + W (domain->must_swap, data->hash_tab_offset));
3928*4882a593Smuzhiyun-      break;
3929*4882a593Smuzhiyun-    default:
3930*4882a593Smuzhiyun-      /* This is an illegal revision.  */
3931*4882a593Smuzhiyun-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
3932*4882a593Smuzhiyun-    || defined _LIBC
3933*4882a593Smuzhiyun-      if (use_mmap)
3934*4882a593Smuzhiyun-	munmap ((caddr_t) data, st.st_size);
3935*4882a593Smuzhiyun-      else
3936*4882a593Smuzhiyun-#endif
3937*4882a593Smuzhiyun-	free (data);
3938*4882a593Smuzhiyun-      free (domain);
3939*4882a593Smuzhiyun-      domain_file->data = NULL;
3940*4882a593Smuzhiyun-      return;
3941*4882a593Smuzhiyun-    }
3942*4882a593Smuzhiyun-
3943*4882a593Smuzhiyun-  /* Show that one domain is changed.  This might make some cached
3944*4882a593Smuzhiyun-     translations invalid.  */
3945*4882a593Smuzhiyun-  ++_nl_msg_cat_cntr;
3946*4882a593Smuzhiyun-}
3947*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/localealias.c lrzsz-0.12.20/intl/localealias.c
3948*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/localealias.c	1998-04-26 14:22:37.000000000 +0100
3949*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/localealias.c	1970-01-01 01:00:00.000000000 +0100
3950*4882a593Smuzhiyun@@ -1,378 +0,0 @@
3951*4882a593Smuzhiyun-/* Handle aliases for locale names
3952*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3953*4882a593Smuzhiyun-   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
3954*4882a593Smuzhiyun-
3955*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
3956*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
3957*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
3958*4882a593Smuzhiyun-   any later version.
3959*4882a593Smuzhiyun-
3960*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
3961*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
3962*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
3963*4882a593Smuzhiyun-   GNU General Public License for more details.
3964*4882a593Smuzhiyun-
3965*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
3966*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
3967*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
3968*4882a593Smuzhiyun-
3969*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
3970*4882a593Smuzhiyun-# include <config.h>
3971*4882a593Smuzhiyun-#endif
3972*4882a593Smuzhiyun-
3973*4882a593Smuzhiyun-#include <ctype.h>
3974*4882a593Smuzhiyun-#include <stdio.h>
3975*4882a593Smuzhiyun-#include <sys/types.h>
3976*4882a593Smuzhiyun-
3977*4882a593Smuzhiyun-#ifdef __GNUC__
3978*4882a593Smuzhiyun-# define alloca __builtin_alloca
3979*4882a593Smuzhiyun-# define HAVE_ALLOCA 1
3980*4882a593Smuzhiyun-#else
3981*4882a593Smuzhiyun-# if defined HAVE_ALLOCA_H || defined _LIBC
3982*4882a593Smuzhiyun-#  include <alloca.h>
3983*4882a593Smuzhiyun-# else
3984*4882a593Smuzhiyun-#  ifdef _AIX
3985*4882a593Smuzhiyun- #pragma alloca
3986*4882a593Smuzhiyun-#  else
3987*4882a593Smuzhiyun-#   ifndef alloca
3988*4882a593Smuzhiyun-char *alloca ();
3989*4882a593Smuzhiyun-#   endif
3990*4882a593Smuzhiyun-#  endif
3991*4882a593Smuzhiyun-# endif
3992*4882a593Smuzhiyun-#endif
3993*4882a593Smuzhiyun-
3994*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
3995*4882a593Smuzhiyun-# include <stdlib.h>
3996*4882a593Smuzhiyun-#else
3997*4882a593Smuzhiyun-char *getenv ();
3998*4882a593Smuzhiyun-# ifdef HAVE_MALLOC_H
3999*4882a593Smuzhiyun-#  include <malloc.h>
4000*4882a593Smuzhiyun-# else
4001*4882a593Smuzhiyun-void free ();
4002*4882a593Smuzhiyun-# endif
4003*4882a593Smuzhiyun-#endif
4004*4882a593Smuzhiyun-
4005*4882a593Smuzhiyun-#if defined HAVE_STRING_H || defined _LIBC
4006*4882a593Smuzhiyun-# ifndef _GNU_SOURCE
4007*4882a593Smuzhiyun-#  define _GNU_SOURCE	1
4008*4882a593Smuzhiyun-# endif
4009*4882a593Smuzhiyun-# include <string.h>
4010*4882a593Smuzhiyun-#else
4011*4882a593Smuzhiyun-# include <strings.h>
4012*4882a593Smuzhiyun-# ifndef memcpy
4013*4882a593Smuzhiyun-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
4014*4882a593Smuzhiyun-# endif
4015*4882a593Smuzhiyun-#endif
4016*4882a593Smuzhiyun-#if !HAVE_STRCHR && !defined _LIBC
4017*4882a593Smuzhiyun-# ifndef strchr
4018*4882a593Smuzhiyun-#  define strchr index
4019*4882a593Smuzhiyun-# endif
4020*4882a593Smuzhiyun-#endif
4021*4882a593Smuzhiyun-
4022*4882a593Smuzhiyun-#include "gettext.h"
4023*4882a593Smuzhiyun-#include "gettextP.h"
4024*4882a593Smuzhiyun-
4025*4882a593Smuzhiyun-/* @@ end of prolog @@ */
4026*4882a593Smuzhiyun-
4027*4882a593Smuzhiyun-#ifdef _LIBC
4028*4882a593Smuzhiyun-/* Rename the non ANSI C functions.  This is required by the standard
4029*4882a593Smuzhiyun-   because some ANSI C functions will require linking with this object
4030*4882a593Smuzhiyun-   file and the name space must not be polluted.  */
4031*4882a593Smuzhiyun-# define strcasecmp __strcasecmp
4032*4882a593Smuzhiyun-#endif
4033*4882a593Smuzhiyun-
4034*4882a593Smuzhiyun-
4035*4882a593Smuzhiyun-/* For those loosing systems which don't have `alloca' we have to add
4036*4882a593Smuzhiyun-   some additional code emulating it.  */
4037*4882a593Smuzhiyun-#ifdef HAVE_ALLOCA
4038*4882a593Smuzhiyun-/* Nothing has to be done.  */
4039*4882a593Smuzhiyun-# define ADD_BLOCK(list, address) /* nothing */
4040*4882a593Smuzhiyun-# define FREE_BLOCKS(list) /* nothing */
4041*4882a593Smuzhiyun-#else
4042*4882a593Smuzhiyun-struct block_list
4043*4882a593Smuzhiyun-{
4044*4882a593Smuzhiyun-  void *address;
4045*4882a593Smuzhiyun-  struct block_list *next;
4046*4882a593Smuzhiyun-};
4047*4882a593Smuzhiyun-# define ADD_BLOCK(list, addr)						      \
4048*4882a593Smuzhiyun-  do {									      \
4049*4882a593Smuzhiyun-    struct block_list *newp = (struct block_list *) malloc (sizeof (*newp));  \
4050*4882a593Smuzhiyun-    /* If we cannot get a free block we cannot add the new element to	      \
4051*4882a593Smuzhiyun-       the list.  */							      \
4052*4882a593Smuzhiyun-    if (newp != NULL) {							      \
4053*4882a593Smuzhiyun-      newp->address = (addr);						      \
4054*4882a593Smuzhiyun-      newp->next = (list);						      \
4055*4882a593Smuzhiyun-      (list) = newp;							      \
4056*4882a593Smuzhiyun-    }									      \
4057*4882a593Smuzhiyun-  } while (0)
4058*4882a593Smuzhiyun-# define FREE_BLOCKS(list)						      \
4059*4882a593Smuzhiyun-  do {									      \
4060*4882a593Smuzhiyun-    while (list != NULL) {						      \
4061*4882a593Smuzhiyun-      struct block_list *old = list;					      \
4062*4882a593Smuzhiyun-      list = list->next;						      \
4063*4882a593Smuzhiyun-      free (old);							      \
4064*4882a593Smuzhiyun-    }									      \
4065*4882a593Smuzhiyun-  } while (0)
4066*4882a593Smuzhiyun-# undef alloca
4067*4882a593Smuzhiyun-# define alloca(size) (malloc (size))
4068*4882a593Smuzhiyun-#endif	/* have alloca */
4069*4882a593Smuzhiyun-
4070*4882a593Smuzhiyun-
4071*4882a593Smuzhiyun-struct alias_map
4072*4882a593Smuzhiyun-{
4073*4882a593Smuzhiyun-  const char *alias;
4074*4882a593Smuzhiyun-  const char *value;
4075*4882a593Smuzhiyun-};
4076*4882a593Smuzhiyun-
4077*4882a593Smuzhiyun-
4078*4882a593Smuzhiyun-static struct alias_map *map;
4079*4882a593Smuzhiyun-static size_t nmap = 0;
4080*4882a593Smuzhiyun-static size_t maxmap = 0;
4081*4882a593Smuzhiyun-
4082*4882a593Smuzhiyun-
4083*4882a593Smuzhiyun-/* Prototypes for local functions.  */
4084*4882a593Smuzhiyun-static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
4085*4882a593Smuzhiyun-static void extend_alias_table PARAMS ((void));
4086*4882a593Smuzhiyun-static int alias_compare PARAMS ((const struct alias_map *map1,
4087*4882a593Smuzhiyun-				  const struct alias_map *map2));
4088*4882a593Smuzhiyun-
4089*4882a593Smuzhiyun-
4090*4882a593Smuzhiyun-const char *
4091*4882a593Smuzhiyun-_nl_expand_alias (name)
4092*4882a593Smuzhiyun-    const char *name;
4093*4882a593Smuzhiyun-{
4094*4882a593Smuzhiyun-  static const char *locale_alias_path = LOCALE_ALIAS_PATH;
4095*4882a593Smuzhiyun-  struct alias_map *retval;
4096*4882a593Smuzhiyun-  size_t added;
4097*4882a593Smuzhiyun-
4098*4882a593Smuzhiyun-  do
4099*4882a593Smuzhiyun-    {
4100*4882a593Smuzhiyun-      struct alias_map item;
4101*4882a593Smuzhiyun-
4102*4882a593Smuzhiyun-      item.alias = name;
4103*4882a593Smuzhiyun-
4104*4882a593Smuzhiyun-      if (nmap > 0)
4105*4882a593Smuzhiyun-	retval = (struct alias_map *) bsearch (&item, map, nmap,
4106*4882a593Smuzhiyun-					       sizeof (struct alias_map),
4107*4882a593Smuzhiyun-					       (int (*) PARAMS ((const void *,
4108*4882a593Smuzhiyun-								 const void *))
4109*4882a593Smuzhiyun-						) alias_compare);
4110*4882a593Smuzhiyun-      else
4111*4882a593Smuzhiyun-	retval = NULL;
4112*4882a593Smuzhiyun-
4113*4882a593Smuzhiyun-      /* We really found an alias.  Return the value.  */
4114*4882a593Smuzhiyun-      if (retval != NULL)
4115*4882a593Smuzhiyun-	return retval->value;
4116*4882a593Smuzhiyun-
4117*4882a593Smuzhiyun-      /* Perhaps we can find another alias file.  */
4118*4882a593Smuzhiyun-      added = 0;
4119*4882a593Smuzhiyun-      while (added == 0 && locale_alias_path[0] != '\0')
4120*4882a593Smuzhiyun-	{
4121*4882a593Smuzhiyun-	  const char *start;
4122*4882a593Smuzhiyun-
4123*4882a593Smuzhiyun-	  while (locale_alias_path[0] == ':')
4124*4882a593Smuzhiyun-	    ++locale_alias_path;
4125*4882a593Smuzhiyun-	  start = locale_alias_path;
4126*4882a593Smuzhiyun-
4127*4882a593Smuzhiyun-	  while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
4128*4882a593Smuzhiyun-	    ++locale_alias_path;
4129*4882a593Smuzhiyun-
4130*4882a593Smuzhiyun-	  if (start < locale_alias_path)
4131*4882a593Smuzhiyun-	    added = read_alias_file (start, locale_alias_path - start);
4132*4882a593Smuzhiyun-	}
4133*4882a593Smuzhiyun-    }
4134*4882a593Smuzhiyun-  while (added != 0);
4135*4882a593Smuzhiyun-
4136*4882a593Smuzhiyun-  return NULL;
4137*4882a593Smuzhiyun-}
4138*4882a593Smuzhiyun-
4139*4882a593Smuzhiyun-
4140*4882a593Smuzhiyun-static size_t
4141*4882a593Smuzhiyun-read_alias_file (fname, fname_len)
4142*4882a593Smuzhiyun-     const char *fname;
4143*4882a593Smuzhiyun-     int fname_len;
4144*4882a593Smuzhiyun-{
4145*4882a593Smuzhiyun-#ifndef HAVE_ALLOCA
4146*4882a593Smuzhiyun-  struct block_list *block_list = NULL;
4147*4882a593Smuzhiyun-#endif
4148*4882a593Smuzhiyun-  FILE *fp;
4149*4882a593Smuzhiyun-  char *full_fname;
4150*4882a593Smuzhiyun-  size_t added;
4151*4882a593Smuzhiyun-  static const char aliasfile[] = "/locale.alias";
4152*4882a593Smuzhiyun-
4153*4882a593Smuzhiyun-  full_fname = (char *) alloca (fname_len + sizeof aliasfile);
4154*4882a593Smuzhiyun-  ADD_BLOCK (block_list, full_fname);
4155*4882a593Smuzhiyun-  memcpy (full_fname, fname, fname_len);
4156*4882a593Smuzhiyun-  memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
4157*4882a593Smuzhiyun-
4158*4882a593Smuzhiyun-  fp = fopen (full_fname, "r");
4159*4882a593Smuzhiyun-  if (fp == NULL)
4160*4882a593Smuzhiyun-    {
4161*4882a593Smuzhiyun-      FREE_BLOCKS (block_list);
4162*4882a593Smuzhiyun-      return 0;
4163*4882a593Smuzhiyun-    }
4164*4882a593Smuzhiyun-
4165*4882a593Smuzhiyun-  added = 0;
4166*4882a593Smuzhiyun-  while (!feof (fp))
4167*4882a593Smuzhiyun-    {
4168*4882a593Smuzhiyun-      /* It is a reasonable approach to use a fix buffer here because
4169*4882a593Smuzhiyun-	 a) we are only interested in the first two fields
4170*4882a593Smuzhiyun-	 b) these fields must be usable as file names and so must not
4171*4882a593Smuzhiyun-	    be that long
4172*4882a593Smuzhiyun-       */
4173*4882a593Smuzhiyun-      char buf[BUFSIZ];
4174*4882a593Smuzhiyun-      char *alias;
4175*4882a593Smuzhiyun-      char *value;
4176*4882a593Smuzhiyun-      char *cp;
4177*4882a593Smuzhiyun-
4178*4882a593Smuzhiyun-      if (fgets (buf, BUFSIZ, fp) == NULL)
4179*4882a593Smuzhiyun-	/* EOF reached.  */
4180*4882a593Smuzhiyun-	break;
4181*4882a593Smuzhiyun-
4182*4882a593Smuzhiyun-      cp = buf;
4183*4882a593Smuzhiyun-      /* Ignore leading white space.  */
4184*4882a593Smuzhiyun-      while (isspace (cp[0]))
4185*4882a593Smuzhiyun-	++cp;
4186*4882a593Smuzhiyun-
4187*4882a593Smuzhiyun-      /* A leading '#' signals a comment line.  */
4188*4882a593Smuzhiyun-      if (cp[0] != '\0' && cp[0] != '#')
4189*4882a593Smuzhiyun-	{
4190*4882a593Smuzhiyun-	  alias = cp++;
4191*4882a593Smuzhiyun-	  while (cp[0] != '\0' && !isspace (cp[0]))
4192*4882a593Smuzhiyun-	    ++cp;
4193*4882a593Smuzhiyun-	  /* Terminate alias name.  */
4194*4882a593Smuzhiyun-	  if (cp[0] != '\0')
4195*4882a593Smuzhiyun-	    *cp++ = '\0';
4196*4882a593Smuzhiyun-
4197*4882a593Smuzhiyun-	  /* Now look for the beginning of the value.  */
4198*4882a593Smuzhiyun-	  while (isspace (cp[0]))
4199*4882a593Smuzhiyun-	    ++cp;
4200*4882a593Smuzhiyun-
4201*4882a593Smuzhiyun-	  if (cp[0] != '\0')
4202*4882a593Smuzhiyun-	    {
4203*4882a593Smuzhiyun-	      char *tp;
4204*4882a593Smuzhiyun-	      size_t len;
4205*4882a593Smuzhiyun-
4206*4882a593Smuzhiyun-	      value = cp++;
4207*4882a593Smuzhiyun-	      while (cp[0] != '\0' && !isspace (cp[0]))
4208*4882a593Smuzhiyun-		++cp;
4209*4882a593Smuzhiyun-	      /* Terminate value.  */
4210*4882a593Smuzhiyun-	      if (cp[0] == '\n')
4211*4882a593Smuzhiyun-		{
4212*4882a593Smuzhiyun-		  /* This has to be done to make the following test
4213*4882a593Smuzhiyun-		     for the end of line possible.  We are looking for
4214*4882a593Smuzhiyun-		     the terminating '\n' which do not overwrite here.  */
4215*4882a593Smuzhiyun-		  *cp++ = '\0';
4216*4882a593Smuzhiyun-		  *cp = '\n';
4217*4882a593Smuzhiyun-		}
4218*4882a593Smuzhiyun-	      else if (cp[0] != '\0')
4219*4882a593Smuzhiyun-		*cp++ = '\0';
4220*4882a593Smuzhiyun-
4221*4882a593Smuzhiyun-	      if (nmap >= maxmap)
4222*4882a593Smuzhiyun-		extend_alias_table ();
4223*4882a593Smuzhiyun-
4224*4882a593Smuzhiyun-	      /* We cannot depend on strdup available in the libc.  Sigh!  */
4225*4882a593Smuzhiyun-	      len = strlen (alias) + 1;
4226*4882a593Smuzhiyun-	      tp = (char *) malloc (len);
4227*4882a593Smuzhiyun-	      if (tp == NULL)
4228*4882a593Smuzhiyun-		{
4229*4882a593Smuzhiyun-		  FREE_BLOCKS (block_list);
4230*4882a593Smuzhiyun-		  return added;
4231*4882a593Smuzhiyun-		}
4232*4882a593Smuzhiyun-	      memcpy (tp, alias, len);
4233*4882a593Smuzhiyun-	      map[nmap].alias = tp;
4234*4882a593Smuzhiyun-
4235*4882a593Smuzhiyun-	      len = strlen (value) + 1;
4236*4882a593Smuzhiyun-	      tp = (char *) malloc (len);
4237*4882a593Smuzhiyun-	      if (tp == NULL)
4238*4882a593Smuzhiyun-		{
4239*4882a593Smuzhiyun-		  FREE_BLOCKS (block_list);
4240*4882a593Smuzhiyun-		  return added;
4241*4882a593Smuzhiyun-		}
4242*4882a593Smuzhiyun-	      memcpy (tp, value, len);
4243*4882a593Smuzhiyun-	      map[nmap].value = tp;
4244*4882a593Smuzhiyun-
4245*4882a593Smuzhiyun-	      ++nmap;
4246*4882a593Smuzhiyun-	      ++added;
4247*4882a593Smuzhiyun-	    }
4248*4882a593Smuzhiyun-	}
4249*4882a593Smuzhiyun-
4250*4882a593Smuzhiyun-      /* Possibly not the whole line fits into the buffer.  Ignore
4251*4882a593Smuzhiyun-	 the rest of the line.  */
4252*4882a593Smuzhiyun-      while (strchr (cp, '\n') == NULL)
4253*4882a593Smuzhiyun-	{
4254*4882a593Smuzhiyun-	  cp = buf;
4255*4882a593Smuzhiyun-	  if (fgets (buf, BUFSIZ, fp) == NULL)
4256*4882a593Smuzhiyun-	    /* Make sure the inner loop will be left.  The outer loop
4257*4882a593Smuzhiyun-	       will exit at the `feof' test.  */
4258*4882a593Smuzhiyun-	    *cp = '\n';
4259*4882a593Smuzhiyun-	}
4260*4882a593Smuzhiyun-    }
4261*4882a593Smuzhiyun-
4262*4882a593Smuzhiyun-  /* Should we test for ferror()?  I think we have to silently ignore
4263*4882a593Smuzhiyun-     errors.  --drepper  */
4264*4882a593Smuzhiyun-  fclose (fp);
4265*4882a593Smuzhiyun-
4266*4882a593Smuzhiyun-  if (added > 0)
4267*4882a593Smuzhiyun-    qsort (map, nmap, sizeof (struct alias_map),
4268*4882a593Smuzhiyun-	   (int (*) PARAMS ((const void *, const void *))) alias_compare);
4269*4882a593Smuzhiyun-
4270*4882a593Smuzhiyun-  FREE_BLOCKS (block_list);
4271*4882a593Smuzhiyun-  return added;
4272*4882a593Smuzhiyun-}
4273*4882a593Smuzhiyun-
4274*4882a593Smuzhiyun-
4275*4882a593Smuzhiyun-static void
4276*4882a593Smuzhiyun-extend_alias_table ()
4277*4882a593Smuzhiyun-{
4278*4882a593Smuzhiyun-  size_t new_size;
4279*4882a593Smuzhiyun-  struct alias_map *new_map;
4280*4882a593Smuzhiyun-
4281*4882a593Smuzhiyun-  new_size = maxmap == 0 ? 100 : 2 * maxmap;
4282*4882a593Smuzhiyun-  new_map = (struct alias_map *) malloc (new_size
4283*4882a593Smuzhiyun-					 * sizeof (struct alias_map));
4284*4882a593Smuzhiyun-  if (new_map == NULL)
4285*4882a593Smuzhiyun-    /* Simply don't extend: we don't have any more core.  */
4286*4882a593Smuzhiyun-    return;
4287*4882a593Smuzhiyun-
4288*4882a593Smuzhiyun-  memcpy (new_map, map, nmap * sizeof (struct alias_map));
4289*4882a593Smuzhiyun-
4290*4882a593Smuzhiyun-  if (maxmap != 0)
4291*4882a593Smuzhiyun-    free (map);
4292*4882a593Smuzhiyun-
4293*4882a593Smuzhiyun-  map = new_map;
4294*4882a593Smuzhiyun-  maxmap = new_size;
4295*4882a593Smuzhiyun-}
4296*4882a593Smuzhiyun-
4297*4882a593Smuzhiyun-
4298*4882a593Smuzhiyun-static int
4299*4882a593Smuzhiyun-alias_compare (map1, map2)
4300*4882a593Smuzhiyun-     const struct alias_map *map1;
4301*4882a593Smuzhiyun-     const struct alias_map *map2;
4302*4882a593Smuzhiyun-{
4303*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_STRCASECMP
4304*4882a593Smuzhiyun-  return strcasecmp (map1->alias, map2->alias);
4305*4882a593Smuzhiyun-#else
4306*4882a593Smuzhiyun-  const unsigned char *p1 = (const unsigned char *) map1->alias;
4307*4882a593Smuzhiyun-  const unsigned char *p2 = (const unsigned char *) map2->alias;
4308*4882a593Smuzhiyun-  unsigned char c1, c2;
4309*4882a593Smuzhiyun-
4310*4882a593Smuzhiyun-  if (p1 == p2)
4311*4882a593Smuzhiyun-    return 0;
4312*4882a593Smuzhiyun-
4313*4882a593Smuzhiyun-  do
4314*4882a593Smuzhiyun-    {
4315*4882a593Smuzhiyun-      /* I know this seems to be odd but the tolower() function in
4316*4882a593Smuzhiyun-	 some systems libc cannot handle nonalpha characters.  */
4317*4882a593Smuzhiyun-      c1 = isupper (*p1) ? tolower (*p1) : *p1;
4318*4882a593Smuzhiyun-      c2 = isupper (*p2) ? tolower (*p2) : *p2;
4319*4882a593Smuzhiyun-      if (c1 == '\0')
4320*4882a593Smuzhiyun-	break;
4321*4882a593Smuzhiyun-      ++p1;
4322*4882a593Smuzhiyun-      ++p2;
4323*4882a593Smuzhiyun-    }
4324*4882a593Smuzhiyun-  while (c1 == c2);
4325*4882a593Smuzhiyun-
4326*4882a593Smuzhiyun-  return c1 - c2;
4327*4882a593Smuzhiyun-#endif
4328*4882a593Smuzhiyun-}
4329*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/Makefile.in lrzsz-0.12.20/intl/Makefile.in
4330*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/Makefile.in	1998-04-26 14:22:35.000000000 +0100
4331*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/Makefile.in	1970-01-01 01:00:00.000000000 +0100
4332*4882a593Smuzhiyun@@ -1,214 +0,0 @@
4333*4882a593Smuzhiyun-# Makefile for directory with message catalog handling in GNU NLS Utilities.
4334*4882a593Smuzhiyun-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
4335*4882a593Smuzhiyun-#
4336*4882a593Smuzhiyun-# This program is free software; you can redistribute it and/or modify
4337*4882a593Smuzhiyun-# it under the terms of the GNU General Public License as published by
4338*4882a593Smuzhiyun-# the Free Software Foundation; either version 2, or (at your option)
4339*4882a593Smuzhiyun-# any later version.
4340*4882a593Smuzhiyun-#
4341*4882a593Smuzhiyun-# This program is distributed in the hope that it will be useful,
4342*4882a593Smuzhiyun-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4343*4882a593Smuzhiyun-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4344*4882a593Smuzhiyun-# GNU General Public License for more details.
4345*4882a593Smuzhiyun-#
4346*4882a593Smuzhiyun-# You should have received a copy of the GNU General Public License
4347*4882a593Smuzhiyun-# along with this program; if not, write to the Free Software
4348*4882a593Smuzhiyun-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4349*4882a593Smuzhiyun-
4350*4882a593Smuzhiyun-PACKAGE = @PACKAGE@
4351*4882a593Smuzhiyun-VERSION = @VERSION@
4352*4882a593Smuzhiyun-
4353*4882a593Smuzhiyun-SHELL = /bin/sh
4354*4882a593Smuzhiyun-
4355*4882a593Smuzhiyun-srcdir = @srcdir@
4356*4882a593Smuzhiyun-top_srcdir = @top_srcdir@
4357*4882a593Smuzhiyun-top_builddir = ..
4358*4882a593Smuzhiyun-VPATH = @srcdir@
4359*4882a593Smuzhiyun-
4360*4882a593Smuzhiyun-prefix = @prefix@
4361*4882a593Smuzhiyun-exec_prefix = @exec_prefix@
4362*4882a593Smuzhiyun-transform = @program_transform_name@
4363*4882a593Smuzhiyun-libdir = $(exec_prefix)/lib
4364*4882a593Smuzhiyun-includedir = $(prefix)/include
4365*4882a593Smuzhiyun-datadir = $(prefix)/@DATADIRNAME@
4366*4882a593Smuzhiyun-localedir = $(datadir)/locale
4367*4882a593Smuzhiyun-gnulocaledir = $(prefix)/share/locale
4368*4882a593Smuzhiyun-gettextsrcdir = @datadir@/gettext/intl
4369*4882a593Smuzhiyun-aliaspath = $(localedir):.
4370*4882a593Smuzhiyun-subdir = intl
4371*4882a593Smuzhiyun-
4372*4882a593Smuzhiyun-INSTALL = @INSTALL@
4373*4882a593Smuzhiyun-INSTALL_DATA = @INSTALL_DATA@
4374*4882a593Smuzhiyun-MKINSTALLDIRS = @MKINSTALLDIRS@
4375*4882a593Smuzhiyun-
4376*4882a593Smuzhiyun-l = @l@
4377*4882a593Smuzhiyun-
4378*4882a593Smuzhiyun-AR = ar
4379*4882a593Smuzhiyun-CC = @CC@
4380*4882a593Smuzhiyun-LIBTOOL = @LIBTOOL@
4381*4882a593Smuzhiyun-RANLIB = @RANLIB@
4382*4882a593Smuzhiyun-
4383*4882a593Smuzhiyun-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
4384*4882a593Smuzhiyun--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
4385*4882a593Smuzhiyun-CPPFLAGS = @CPPFLAGS@
4386*4882a593Smuzhiyun-CFLAGS = @CFLAGS@
4387*4882a593Smuzhiyun-LDFLAGS = @LDFLAGS@
4388*4882a593Smuzhiyun-
4389*4882a593Smuzhiyun-COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
4390*4882a593Smuzhiyun-
4391*4882a593Smuzhiyun-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
4392*4882a593Smuzhiyun-COMHDRS = gettext.h gettextP.h hash-string.h
4393*4882a593Smuzhiyun-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
4394*4882a593Smuzhiyun-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
4395*4882a593Smuzhiyun-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
4396*4882a593Smuzhiyun-explodename.c
4397*4882a593Smuzhiyun-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
4398*4882a593Smuzhiyun-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
4399*4882a593Smuzhiyun-explodename.$lo
4400*4882a593Smuzhiyun-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
4401*4882a593Smuzhiyun-GETTOBJS = intl-compat.$lo
4402*4882a593Smuzhiyun-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
4403*4882a593Smuzhiyun-xopen-msg.sed $(HEADERS) $(SOURCES)
4404*4882a593Smuzhiyun-DISTFILES.normal = VERSION
4405*4882a593Smuzhiyun-DISTFILES.gettext = libintl.glibc intlh.inst.in
4406*4882a593Smuzhiyun-
4407*4882a593Smuzhiyun-.SUFFIXES:
4408*4882a593Smuzhiyun-.SUFFIXES: .c .o .lo
4409*4882a593Smuzhiyun-.c.o:
4410*4882a593Smuzhiyun-	$(COMPILE) $<
4411*4882a593Smuzhiyun-.c.lo:
4412*4882a593Smuzhiyun-	$(LIBTOOL) --mode=compile $(COMPILE) $<
4413*4882a593Smuzhiyun-
4414*4882a593Smuzhiyun-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
4415*4882a593Smuzhiyun-
4416*4882a593Smuzhiyun-all: all-@USE_INCLUDED_LIBINTL@
4417*4882a593Smuzhiyun-
4418*4882a593Smuzhiyun-all-yes: libintl.$la intlh.inst
4419*4882a593Smuzhiyun-all-no:
4420*4882a593Smuzhiyun-
4421*4882a593Smuzhiyun-libintl.a: $(OBJECTS)
4422*4882a593Smuzhiyun-	rm -f $@
4423*4882a593Smuzhiyun-	$(AR) cru $@ $(OBJECTS)
4424*4882a593Smuzhiyun-	$(RANLIB) $@
4425*4882a593Smuzhiyun-
4426*4882a593Smuzhiyun-libintl.la: $(OBJECTS)
4427*4882a593Smuzhiyun-	$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
4428*4882a593Smuzhiyun-		   -version-info 1:0 -rpath $(libdir)
4429*4882a593Smuzhiyun-
4430*4882a593Smuzhiyun-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
4431*4882a593Smuzhiyun-	cd ../po && $(MAKE) cat-id-tbl.$lo
4432*4882a593Smuzhiyun-
4433*4882a593Smuzhiyun-check: all
4434*4882a593Smuzhiyun-
4435*4882a593Smuzhiyun-# This installation goal is only used in GNU gettext.  Packages which
4436*4882a593Smuzhiyun-# only use the library should use install instead.
4437*4882a593Smuzhiyun-
4438*4882a593Smuzhiyun-# We must not install the libintl.h/libintl.a files if we are on a
4439*4882a593Smuzhiyun-# system which has the gettext() function in its C library or in a
4440*4882a593Smuzhiyun-# separate library or use the catgets interface.  A special case is
4441*4882a593Smuzhiyun-# where configure found a previously installed GNU gettext library.
4442*4882a593Smuzhiyun-# If you want to use the one which comes with this version of the
4443*4882a593Smuzhiyun-# package, you have to use `configure --with-included-gettext'.
4444*4882a593Smuzhiyun-install: install-exec install-data
4445*4882a593Smuzhiyun-install-exec: all
4446*4882a593Smuzhiyun-	if test "$(PACKAGE)" = "gettext" \
4447*4882a593Smuzhiyun-	   && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
4448*4882a593Smuzhiyun-	  if test -r $(MKINSTALLDIRS); then \
4449*4882a593Smuzhiyun-	    $(MKINSTALLDIRS) $(libdir) $(includedir); \
4450*4882a593Smuzhiyun-	  else \
4451*4882a593Smuzhiyun-	    $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
4452*4882a593Smuzhiyun-	  fi; \
4453*4882a593Smuzhiyun-	  $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
4454*4882a593Smuzhiyun-	  $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
4455*4882a593Smuzhiyun-	else \
4456*4882a593Smuzhiyun-	  : ; \
4457*4882a593Smuzhiyun-	fi
4458*4882a593Smuzhiyun-install-data: all
4459*4882a593Smuzhiyun-	if test "$(PACKAGE)" = "gettext"; then \
4460*4882a593Smuzhiyun-	  if test -r $(MKINSTALLDIRS); then \
4461*4882a593Smuzhiyun-	    $(MKINSTALLDIRS) $(gettextsrcdir); \
4462*4882a593Smuzhiyun-	  else \
4463*4882a593Smuzhiyun-	    $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
4464*4882a593Smuzhiyun-	  fi; \
4465*4882a593Smuzhiyun-	  $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
4466*4882a593Smuzhiyun-	  dists="$(DISTFILES.common)"; \
4467*4882a593Smuzhiyun-	  for file in $$dists; do \
4468*4882a593Smuzhiyun-	    $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
4469*4882a593Smuzhiyun-	  done; \
4470*4882a593Smuzhiyun-	else \
4471*4882a593Smuzhiyun-	  : ; \
4472*4882a593Smuzhiyun-	fi
4473*4882a593Smuzhiyun-
4474*4882a593Smuzhiyun-# Define this as empty until I found a useful application.
4475*4882a593Smuzhiyun-installcheck:
4476*4882a593Smuzhiyun-
4477*4882a593Smuzhiyun-uninstall:
4478*4882a593Smuzhiyun-	dists="$(DISTFILES.common)"; \
4479*4882a593Smuzhiyun-	for file in $$dists; do \
4480*4882a593Smuzhiyun-	  rm -f $(gettextsrcdir)/$$file; \
4481*4882a593Smuzhiyun-	done
4482*4882a593Smuzhiyun-
4483*4882a593Smuzhiyun-info dvi:
4484*4882a593Smuzhiyun-
4485*4882a593Smuzhiyun-$(OBJECTS): ../config.h libgettext.h
4486*4882a593Smuzhiyun-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
4487*4882a593Smuzhiyun-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
4488*4882a593Smuzhiyun-
4489*4882a593Smuzhiyun-tags: TAGS
4490*4882a593Smuzhiyun-
4491*4882a593Smuzhiyun-TAGS: $(HEADERS) $(SOURCES)
4492*4882a593Smuzhiyun-	here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
4493*4882a593Smuzhiyun-
4494*4882a593Smuzhiyun-id: ID
4495*4882a593Smuzhiyun-
4496*4882a593Smuzhiyun-ID: $(HEADERS) $(SOURCES)
4497*4882a593Smuzhiyun-	here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
4498*4882a593Smuzhiyun-
4499*4882a593Smuzhiyun-
4500*4882a593Smuzhiyun-mostlyclean:
4501*4882a593Smuzhiyun-	rm -f *.a *.o *.lo core core.*
4502*4882a593Smuzhiyun-
4503*4882a593Smuzhiyun-clean: mostlyclean
4504*4882a593Smuzhiyun-
4505*4882a593Smuzhiyun-distclean: clean
4506*4882a593Smuzhiyun-	rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
4507*4882a593Smuzhiyun-
4508*4882a593Smuzhiyun-maintainer-clean: distclean
4509*4882a593Smuzhiyun-	@echo "This command is intended for maintainers to use;"
4510*4882a593Smuzhiyun-	@echo "it deletes files that may require special tools to rebuild."
4511*4882a593Smuzhiyun-
4512*4882a593Smuzhiyun-
4513*4882a593Smuzhiyun-# GNU gettext needs not contain the file `VERSION' but contains some
4514*4882a593Smuzhiyun-# other files which should not be distributed in other packages.
4515*4882a593Smuzhiyun-distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
4516*4882a593Smuzhiyun-dist distdir: Makefile $(DISTFILES)
4517*4882a593Smuzhiyun-	if test "$(PACKAGE)" = gettext; then \
4518*4882a593Smuzhiyun-	  additional="$(DISTFILES.gettext)"; \
4519*4882a593Smuzhiyun-	else \
4520*4882a593Smuzhiyun-	  additional="$(DISTFILES.normal)"; \
4521*4882a593Smuzhiyun-	fi; \
4522*4882a593Smuzhiyun-	for file in $(DISTFILES.common) $$additional; do \
4523*4882a593Smuzhiyun-	  ln $(srcdir)/$$file $(distdir) 2> /dev/null \
4524*4882a593Smuzhiyun-	    || cp -p $(srcdir)/$$file $(distdir); \
4525*4882a593Smuzhiyun-	done
4526*4882a593Smuzhiyun-
4527*4882a593Smuzhiyun-dist-libc:
4528*4882a593Smuzhiyun-	tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
4529*4882a593Smuzhiyun-
4530*4882a593Smuzhiyun-Makefile: Makefile.in ../config.status
4531*4882a593Smuzhiyun-	cd .. \
4532*4882a593Smuzhiyun-	  && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
4533*4882a593Smuzhiyun-
4534*4882a593Smuzhiyun-# The dependency for intlh.inst is different in gettext and all other
4535*4882a593Smuzhiyun-# packages.  Because we cannot you GNU make features we have to solve
4536*4882a593Smuzhiyun-# the problem while rewriting Makefile.in.
4537*4882a593Smuzhiyun-@GT_YES@intlh.inst: intlh.inst.in ../config.status
4538*4882a593Smuzhiyun-@GT_YES@	cd .. \
4539*4882a593Smuzhiyun-@GT_YES@	&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
4540*4882a593Smuzhiyun-@GT_YES@	  $(SHELL) ./config.status
4541*4882a593Smuzhiyun-@GT_NO@.PHONY: intlh.inst
4542*4882a593Smuzhiyun-@GT_NO@intlh.inst:
4543*4882a593Smuzhiyun-
4544*4882a593Smuzhiyun-# Tell versions [3.59,3.63) of GNU make not to export all variables.
4545*4882a593Smuzhiyun-# Otherwise a system limit (for SysV at least) may be exceeded.
4546*4882a593Smuzhiyun-.NOEXPORT:
4547*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/po2tbl.sed.in lrzsz-0.12.20/intl/po2tbl.sed.in
4548*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/po2tbl.sed.in	1998-04-26 14:20:52.000000000 +0100
4549*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/po2tbl.sed.in	1970-01-01 01:00:00.000000000 +0100
4550*4882a593Smuzhiyun@@ -1,102 +0,0 @@
4551*4882a593Smuzhiyun-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
4552*4882a593Smuzhiyun-# Copyright (C) 1995 Free Software Foundation, Inc.
4553*4882a593Smuzhiyun-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
4554*4882a593Smuzhiyun-#
4555*4882a593Smuzhiyun-# This program is free software; you can redistribute it and/or modify
4556*4882a593Smuzhiyun-# it under the terms of the GNU General Public License as published by
4557*4882a593Smuzhiyun-# the Free Software Foundation; either version 2, or (at your option)
4558*4882a593Smuzhiyun-# any later version.
4559*4882a593Smuzhiyun-#
4560*4882a593Smuzhiyun-# This program is distributed in the hope that it will be useful,
4561*4882a593Smuzhiyun-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4562*4882a593Smuzhiyun-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4563*4882a593Smuzhiyun-# GNU General Public License for more details.
4564*4882a593Smuzhiyun-#
4565*4882a593Smuzhiyun-# You should have received a copy of the GNU General Public License
4566*4882a593Smuzhiyun-# along with this program; if not, write to the Free Software
4567*4882a593Smuzhiyun-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4568*4882a593Smuzhiyun-#
4569*4882a593Smuzhiyun-1 {
4570*4882a593Smuzhiyun-  i\
4571*4882a593Smuzhiyun-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot.  */\
4572*4882a593Smuzhiyun-\
4573*4882a593Smuzhiyun-#if HAVE_CONFIG_H\
4574*4882a593Smuzhiyun-# include <config.h>\
4575*4882a593Smuzhiyun-#endif\
4576*4882a593Smuzhiyun-\
4577*4882a593Smuzhiyun-#include "libgettext.h"\
4578*4882a593Smuzhiyun-\
4579*4882a593Smuzhiyun-const struct _msg_ent _msg_tbl[] = {
4580*4882a593Smuzhiyun-  h
4581*4882a593Smuzhiyun-  s/.*/0/
4582*4882a593Smuzhiyun-  x
4583*4882a593Smuzhiyun-}
4584*4882a593Smuzhiyun-#
4585*4882a593Smuzhiyun-# Write msgid entries in C array form.
4586*4882a593Smuzhiyun-#
4587*4882a593Smuzhiyun-/^msgid/ {
4588*4882a593Smuzhiyun-  s/msgid[ 	]*\(".*"\)/  {\1/
4589*4882a593Smuzhiyun-  tb
4590*4882a593Smuzhiyun-# Append the next line
4591*4882a593Smuzhiyun-  :b
4592*4882a593Smuzhiyun-  N
4593*4882a593Smuzhiyun-# Look whether second part is continuation line.
4594*4882a593Smuzhiyun-  s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
4595*4882a593Smuzhiyun-# Yes, then branch.
4596*4882a593Smuzhiyun-  ta
4597*4882a593Smuzhiyun-# Because we assume that the input file correctly formed the line
4598*4882a593Smuzhiyun-# just read cannot be again be a msgid line.  So it's safe to ignore
4599*4882a593Smuzhiyun-# it.
4600*4882a593Smuzhiyun-  s/\(.*\)\n.*/\1/
4601*4882a593Smuzhiyun-  bc
4602*4882a593Smuzhiyun-# We found a continuation line.  But before printing insert '\'.
4603*4882a593Smuzhiyun-  :a
4604*4882a593Smuzhiyun-  s/\(.*\)\(\n.*\)/\1\\\2/
4605*4882a593Smuzhiyun-  P
4606*4882a593Smuzhiyun-# We cannot use D here.
4607*4882a593Smuzhiyun-  s/.*\n\(.*\)/\1/
4608*4882a593Smuzhiyun-# Some buggy seds do not clear the `successful substitution since last ``t'''
4609*4882a593Smuzhiyun-# flag on `N', so we do a `t' here to clear it.
4610*4882a593Smuzhiyun-  tb
4611*4882a593Smuzhiyun-# Not reached
4612*4882a593Smuzhiyun-  :c
4613*4882a593Smuzhiyun-  x
4614*4882a593Smuzhiyun-# The following nice solution is by
4615*4882a593Smuzhiyun-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
4616*4882a593Smuzhiyun-  td
4617*4882a593Smuzhiyun-# Increment a decimal number in pattern space.
4618*4882a593Smuzhiyun-# First hide trailing `9' digits.
4619*4882a593Smuzhiyun-  :d
4620*4882a593Smuzhiyun-  s/9\(_*\)$/_\1/
4621*4882a593Smuzhiyun-  td
4622*4882a593Smuzhiyun-# Assure at least one digit is available.
4623*4882a593Smuzhiyun-  s/^\(_*\)$/0\1/
4624*4882a593Smuzhiyun-# Increment the last digit.
4625*4882a593Smuzhiyun-  s/8\(_*\)$/9\1/
4626*4882a593Smuzhiyun-  s/7\(_*\)$/8\1/
4627*4882a593Smuzhiyun-  s/6\(_*\)$/7\1/
4628*4882a593Smuzhiyun-  s/5\(_*\)$/6\1/
4629*4882a593Smuzhiyun-  s/4\(_*\)$/5\1/
4630*4882a593Smuzhiyun-  s/3\(_*\)$/4\1/
4631*4882a593Smuzhiyun-  s/2\(_*\)$/3\1/
4632*4882a593Smuzhiyun-  s/1\(_*\)$/2\1/
4633*4882a593Smuzhiyun-  s/0\(_*\)$/1\1/
4634*4882a593Smuzhiyun-# Convert the hidden `9' digits to `0's.
4635*4882a593Smuzhiyun-  s/_/0/g
4636*4882a593Smuzhiyun-  x
4637*4882a593Smuzhiyun-  G
4638*4882a593Smuzhiyun-  s/\(.*\)\n\([0-9]*\)/\1, \2},/
4639*4882a593Smuzhiyun-  s/\(.*\)"$/\1/
4640*4882a593Smuzhiyun-  p
4641*4882a593Smuzhiyun-}
4642*4882a593Smuzhiyun-#
4643*4882a593Smuzhiyun-# Last line.
4644*4882a593Smuzhiyun-#
4645*4882a593Smuzhiyun-$ {
4646*4882a593Smuzhiyun-  i\
4647*4882a593Smuzhiyun-};\
4648*4882a593Smuzhiyun-
4649*4882a593Smuzhiyun-  g
4650*4882a593Smuzhiyun-  s/0*\(.*\)/int _msg_tbl_length = \1;/p
4651*4882a593Smuzhiyun-}
4652*4882a593Smuzhiyun-d
4653*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/textdomain.c lrzsz-0.12.20/intl/textdomain.c
4654*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/textdomain.c	1998-04-26 14:22:37.000000000 +0100
4655*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/textdomain.c	1970-01-01 01:00:00.000000000 +0100
4656*4882a593Smuzhiyun@@ -1,106 +0,0 @@
4657*4882a593Smuzhiyun-/* Implementation of the textdomain(3) function
4658*4882a593Smuzhiyun-   Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
4659*4882a593Smuzhiyun-   Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
4660*4882a593Smuzhiyun-
4661*4882a593Smuzhiyun-   This program is free software; you can redistribute it and/or modify
4662*4882a593Smuzhiyun-   it under the terms of the GNU General Public License as published by
4663*4882a593Smuzhiyun-   the Free Software Foundation; either version 2, or (at your option)
4664*4882a593Smuzhiyun-   any later version.
4665*4882a593Smuzhiyun-
4666*4882a593Smuzhiyun-   This program is distributed in the hope that it will be useful,
4667*4882a593Smuzhiyun-   but WITHOUT ANY WARRANTY; without even the implied warranty of
4668*4882a593Smuzhiyun-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4669*4882a593Smuzhiyun-   GNU General Public License for more details.
4670*4882a593Smuzhiyun-
4671*4882a593Smuzhiyun-   You should have received a copy of the GNU General Public License
4672*4882a593Smuzhiyun-   along with this program; if not, write to the Free Software Foundation,
4673*4882a593Smuzhiyun-   Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
4674*4882a593Smuzhiyun-
4675*4882a593Smuzhiyun-#ifdef HAVE_CONFIG_H
4676*4882a593Smuzhiyun-# include <config.h>
4677*4882a593Smuzhiyun-#endif
4678*4882a593Smuzhiyun-
4679*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined _LIBC
4680*4882a593Smuzhiyun-# include <stdlib.h>
4681*4882a593Smuzhiyun-#endif
4682*4882a593Smuzhiyun-
4683*4882a593Smuzhiyun-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
4684*4882a593Smuzhiyun-# include <string.h>
4685*4882a593Smuzhiyun-#else
4686*4882a593Smuzhiyun-# include <strings.h>
4687*4882a593Smuzhiyun-# ifndef memcpy
4688*4882a593Smuzhiyun-#  define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
4689*4882a593Smuzhiyun-# endif
4690*4882a593Smuzhiyun-#endif
4691*4882a593Smuzhiyun-
4692*4882a593Smuzhiyun-#ifdef _LIBC
4693*4882a593Smuzhiyun-# include <libintl.h>
4694*4882a593Smuzhiyun-#else
4695*4882a593Smuzhiyun-# include "libgettext.h"
4696*4882a593Smuzhiyun-#endif
4697*4882a593Smuzhiyun-
4698*4882a593Smuzhiyun-/* @@ end of prolog @@ */
4699*4882a593Smuzhiyun-
4700*4882a593Smuzhiyun-/* Name of the default text domain.  */
4701*4882a593Smuzhiyun-extern const char _nl_default_default_domain[];
4702*4882a593Smuzhiyun-
4703*4882a593Smuzhiyun-/* Default text domain in which entries for gettext(3) are to be found.  */
4704*4882a593Smuzhiyun-extern const char *_nl_current_default_domain;
4705*4882a593Smuzhiyun-
4706*4882a593Smuzhiyun-
4707*4882a593Smuzhiyun-/* Names for the libintl functions are a problem.  They must not clash
4708*4882a593Smuzhiyun-   with existing names and they should follow ANSI C.  But this source
4709*4882a593Smuzhiyun-   code is also used in GNU C Library where the names have a __
4710*4882a593Smuzhiyun-   prefix.  So we have to make a difference here.  */
4711*4882a593Smuzhiyun-#ifdef _LIBC
4712*4882a593Smuzhiyun-# define TEXTDOMAIN __textdomain
4713*4882a593Smuzhiyun-# define strdup(str) __strdup (str)
4714*4882a593Smuzhiyun-#else
4715*4882a593Smuzhiyun-# define TEXTDOMAIN textdomain__
4716*4882a593Smuzhiyun-#endif
4717*4882a593Smuzhiyun-
4718*4882a593Smuzhiyun-/* Set the current default message catalog to DOMAINNAME.
4719*4882a593Smuzhiyun-   If DOMAINNAME is null, return the current default.
4720*4882a593Smuzhiyun-   If DOMAINNAME is "", reset to the default of "messages".  */
4721*4882a593Smuzhiyun-char *
4722*4882a593Smuzhiyun-TEXTDOMAIN (domainname)
4723*4882a593Smuzhiyun-     const char *domainname;
4724*4882a593Smuzhiyun-{
4725*4882a593Smuzhiyun-  char *old;
4726*4882a593Smuzhiyun-
4727*4882a593Smuzhiyun-  /* A NULL pointer requests the current setting.  */
4728*4882a593Smuzhiyun-  if (domainname == NULL)
4729*4882a593Smuzhiyun-    return (char *) _nl_current_default_domain;
4730*4882a593Smuzhiyun-
4731*4882a593Smuzhiyun-  old = (char *) _nl_current_default_domain;
4732*4882a593Smuzhiyun-
4733*4882a593Smuzhiyun-  /* If domain name is the null string set to default domain "messages".  */
4734*4882a593Smuzhiyun-  if (domainname[0] == '\0'
4735*4882a593Smuzhiyun-      || strcmp (domainname, _nl_default_default_domain) == 0)
4736*4882a593Smuzhiyun-    _nl_current_default_domain = _nl_default_default_domain;
4737*4882a593Smuzhiyun-  else
4738*4882a593Smuzhiyun-    {
4739*4882a593Smuzhiyun-      /* If the following malloc fails `_nl_current_default_domain'
4740*4882a593Smuzhiyun-	 will be NULL.  This value will be returned and so signals we
4741*4882a593Smuzhiyun-	 are out of core.  */
4742*4882a593Smuzhiyun-#if defined _LIBC || defined HAVE_STRDUP
4743*4882a593Smuzhiyun-      _nl_current_default_domain = strdup (domainname);
4744*4882a593Smuzhiyun-#else
4745*4882a593Smuzhiyun-      size_t len = strlen (domainname) + 1;
4746*4882a593Smuzhiyun-      char *cp = (char *) malloc (len);
4747*4882a593Smuzhiyun-      if (cp != NULL)
4748*4882a593Smuzhiyun-	memcpy (cp, domainname, len);
4749*4882a593Smuzhiyun-      _nl_current_default_domain = cp;
4750*4882a593Smuzhiyun-#endif
4751*4882a593Smuzhiyun-    }
4752*4882a593Smuzhiyun-
4753*4882a593Smuzhiyun-  if (old != _nl_default_default_domain)
4754*4882a593Smuzhiyun-    free (old);
4755*4882a593Smuzhiyun-
4756*4882a593Smuzhiyun-  return (char *) _nl_current_default_domain;
4757*4882a593Smuzhiyun-}
4758*4882a593Smuzhiyun-
4759*4882a593Smuzhiyun-#ifdef _LIBC
4760*4882a593Smuzhiyun-/* Alias for function name in GNU C Library.  */
4761*4882a593Smuzhiyun-weak_alias (__textdomain, textdomain);
4762*4882a593Smuzhiyun-#endif
4763*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/VERSION lrzsz-0.12.20/intl/VERSION
4764*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/VERSION	1998-04-26 14:22:37.000000000 +0100
4765*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/VERSION	1970-01-01 01:00:00.000000000 +0100
4766*4882a593Smuzhiyun@@ -1 +0,0 @@
4767*4882a593Smuzhiyun-GNU gettext library from gettext-0.10.32
4768*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/intl/xopen-msg.sed lrzsz-0.12.20/intl/xopen-msg.sed
4769*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/intl/xopen-msg.sed	1998-04-26 14:20:52.000000000 +0100
4770*4882a593Smuzhiyun+++ lrzsz-0.12.20/intl/xopen-msg.sed	1970-01-01 01:00:00.000000000 +0100
4771*4882a593Smuzhiyun@@ -1,104 +0,0 @@
4772*4882a593Smuzhiyun-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
4773*4882a593Smuzhiyun-# Copyright (C) 1995 Free Software Foundation, Inc.
4774*4882a593Smuzhiyun-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
4775*4882a593Smuzhiyun-#
4776*4882a593Smuzhiyun-# This program is free software; you can redistribute it and/or modify
4777*4882a593Smuzhiyun-# it under the terms of the GNU General Public License as published by
4778*4882a593Smuzhiyun-# the Free Software Foundation; either version 2, or (at your option)
4779*4882a593Smuzhiyun-# any later version.
4780*4882a593Smuzhiyun-#
4781*4882a593Smuzhiyun-# This program is distributed in the hope that it will be useful,
4782*4882a593Smuzhiyun-# but WITHOUT ANY WARRANTY; without even the implied warranty of
4783*4882a593Smuzhiyun-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
4784*4882a593Smuzhiyun-# GNU General Public License for more details.
4785*4882a593Smuzhiyun-#
4786*4882a593Smuzhiyun-# You should have received a copy of the GNU General Public License
4787*4882a593Smuzhiyun-# along with this program; if not, write to the Free Software
4788*4882a593Smuzhiyun-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
4789*4882a593Smuzhiyun-#
4790*4882a593Smuzhiyun-#
4791*4882a593Smuzhiyun-# The first directive in the .msg should be the definition of the
4792*4882a593Smuzhiyun-# message set number.  We use always set number 1.
4793*4882a593Smuzhiyun-#
4794*4882a593Smuzhiyun-1 {
4795*4882a593Smuzhiyun-  i\
4796*4882a593Smuzhiyun-$set 1 # Automatically created by po2msg.sed
4797*4882a593Smuzhiyun-  h
4798*4882a593Smuzhiyun-  s/.*/0/
4799*4882a593Smuzhiyun-  x
4800*4882a593Smuzhiyun-}
4801*4882a593Smuzhiyun-#
4802*4882a593Smuzhiyun-# We copy all comments into the .msg file.  Perhaps they can help.
4803*4882a593Smuzhiyun-#
4804*4882a593Smuzhiyun-/^#/ s/^#[ 	]*/$ /p
4805*4882a593Smuzhiyun-#
4806*4882a593Smuzhiyun-# We copy the original message as a comment into the .msg file.
4807*4882a593Smuzhiyun-#
4808*4882a593Smuzhiyun-/^msgid/ {
4809*4882a593Smuzhiyun-# Does not work now
4810*4882a593Smuzhiyun-#  /"$/! {
4811*4882a593Smuzhiyun-#    s/\\$//
4812*4882a593Smuzhiyun-#    s/$/ ... (more lines following)"/
4813*4882a593Smuzhiyun-#  }
4814*4882a593Smuzhiyun-  s/^msgid[ 	]*"\(.*\)"$/$ Original Message: \1/
4815*4882a593Smuzhiyun-  p
4816*4882a593Smuzhiyun-}
4817*4882a593Smuzhiyun-#
4818*4882a593Smuzhiyun-# The .msg file contains, other then the .po file, only the translations
4819*4882a593Smuzhiyun-# but each given a unique ID.  Starting from 1 and incrementing by 1 for
4820*4882a593Smuzhiyun-# each message we assign them to the messages.
4821*4882a593Smuzhiyun-# It is important that the .po file used to generate the cat-id-tbl.c file
4822*4882a593Smuzhiyun-# (with po-to-tbl) is the same as the one used here.  (At least the order
4823*4882a593Smuzhiyun-# of declarations must not be changed.)
4824*4882a593Smuzhiyun-#
4825*4882a593Smuzhiyun-/^msgstr/ {
4826*4882a593Smuzhiyun-  s/msgstr[ 	]*"\(.*\)"/\1/
4827*4882a593Smuzhiyun-  x
4828*4882a593Smuzhiyun-# The following nice solution is by
4829*4882a593Smuzhiyun-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
4830*4882a593Smuzhiyun-  td
4831*4882a593Smuzhiyun-# Increment a decimal number in pattern space.
4832*4882a593Smuzhiyun-# First hide trailing `9' digits.
4833*4882a593Smuzhiyun-  :d
4834*4882a593Smuzhiyun-  s/9\(_*\)$/_\1/
4835*4882a593Smuzhiyun-  td
4836*4882a593Smuzhiyun-# Assure at least one digit is available.
4837*4882a593Smuzhiyun-  s/^\(_*\)$/0\1/
4838*4882a593Smuzhiyun-# Increment the last digit.
4839*4882a593Smuzhiyun-  s/8\(_*\)$/9\1/
4840*4882a593Smuzhiyun-  s/7\(_*\)$/8\1/
4841*4882a593Smuzhiyun-  s/6\(_*\)$/7\1/
4842*4882a593Smuzhiyun-  s/5\(_*\)$/6\1/
4843*4882a593Smuzhiyun-  s/4\(_*\)$/5\1/
4844*4882a593Smuzhiyun-  s/3\(_*\)$/4\1/
4845*4882a593Smuzhiyun-  s/2\(_*\)$/3\1/
4846*4882a593Smuzhiyun-  s/1\(_*\)$/2\1/
4847*4882a593Smuzhiyun-  s/0\(_*\)$/1\1/
4848*4882a593Smuzhiyun-# Convert the hidden `9' digits to `0's.
4849*4882a593Smuzhiyun-  s/_/0/g
4850*4882a593Smuzhiyun-  x
4851*4882a593Smuzhiyun-# Bring the line in the format `<number> <message>'
4852*4882a593Smuzhiyun-  G
4853*4882a593Smuzhiyun-  s/^[^\n]*$/& /
4854*4882a593Smuzhiyun-  s/\(.*\)\n\([0-9]*\)/\2 \1/
4855*4882a593Smuzhiyun-# Clear flag from last substitution.
4856*4882a593Smuzhiyun-  tb
4857*4882a593Smuzhiyun-# Append the next line.
4858*4882a593Smuzhiyun-  :b
4859*4882a593Smuzhiyun-  N
4860*4882a593Smuzhiyun-# Look whether second part is a continuation line.
4861*4882a593Smuzhiyun-  s/\(.*\n\)"\(.*\)"/\1\2/
4862*4882a593Smuzhiyun-# Yes, then branch.
4863*4882a593Smuzhiyun-  ta
4864*4882a593Smuzhiyun-  P
4865*4882a593Smuzhiyun-  D
4866*4882a593Smuzhiyun-# Note that `D' includes a jump to the start!!
4867*4882a593Smuzhiyun-# We found a continuation line.  But before printing insert '\'.
4868*4882a593Smuzhiyun-  :a
4869*4882a593Smuzhiyun-  s/\(.*\)\(\n.*\)/\1\\\2/
4870*4882a593Smuzhiyun-  P
4871*4882a593Smuzhiyun-# We cannot use the sed command `D' here
4872*4882a593Smuzhiyun-  s/.*\n\(.*\)/\1/
4873*4882a593Smuzhiyun-  tb
4874*4882a593Smuzhiyun-}
4875*4882a593Smuzhiyun-d
4876*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/lib/Makefile.am lrzsz-0.12.20/lib/Makefile.am
4877*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/lib/Makefile.am	1998-12-27 16:25:26.000000000 +0000
4878*4882a593Smuzhiyun+++ lrzsz-0.12.20/lib/Makefile.am	2019-11-25 16:22:34.000000000 +0000
4879*4882a593Smuzhiyun@@ -1,6 +1,4 @@
4880*4882a593Smuzhiyun noinst_LIBRARIES=libzmodem.a
4881*4882a593Smuzhiyun-CFLAGS=@CFLAGS@
4882*4882a593Smuzhiyun-AUTOMAKE_OPTIONS=ansi2knr
4883*4882a593Smuzhiyun
4884*4882a593Smuzhiyun EXTRA_DIST = alloca.c ansi2knr.1 ansi2knr.c \
4885*4882a593Smuzhiyun 	getopt.c getopt1.c mkdir.c mktime.c \
4886*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/Makefile.am lrzsz-0.12.20/Makefile.am
4887*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/Makefile.am	1998-12-30 11:19:40.000000000 +0000
4888*4882a593Smuzhiyun+++ lrzsz-0.12.20/Makefile.am	2019-11-26 11:47:29.000000000 +0000
4889*4882a593Smuzhiyun@@ -1,5 +1,5 @@
4890*4882a593Smuzhiyun-SUBDIRS = lib intl src po man testsuite
4891*4882a593Smuzhiyun-EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
4892*4882a593Smuzhiyun+SUBDIRS = lib src po man testsuite
4893*4882a593Smuzhiyun+EXTRA_DIST = config.rpath m4/ChangeLog  check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
4894*4882a593Smuzhiyun 	README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
4895*4882a593Smuzhiyun 	beos-runpiped.c fastcheck.beos
4896*4882a593Smuzhiyun noinst_SCRIPTS=systype
4897*4882a593Smuzhiyun@@ -7,7 +7,6 @@ PR=@PACKAGE@-@VERSION@
4898*4882a593Smuzhiyun CLEAN_FILES=fastcheck.done
4899*4882a593Smuzhiyun
4900*4882a593Smuzhiyun dist-hook:
4901*4882a593Smuzhiyun-	mkdir $(distdir)/debian
4902*4882a593Smuzhiyun 	cp -fa $(srcdir)/debian/changelog  $(distdir)/debian/
4903*4882a593Smuzhiyun 	cp -fa $(srcdir)/debian/control  $(distdir)/debian/
4904*4882a593Smuzhiyun 	cp -fa $(srcdir)/debian/copyright  $(distdir)/debian/
4905*4882a593Smuzhiyun@@ -83,3 +82,5 @@ cvs-dist:
4906*4882a593Smuzhiyun rpm: $(PR).tar.gz Specfile
4907*4882a593Smuzhiyun 	$(srcdir)/buildrpm $(srcdir)
4908*4882a593Smuzhiyun
4909*4882a593Smuzhiyun+
4910*4882a593Smuzhiyun+ACLOCAL_AMFLAGS = -I m4
4911*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/cat-id-tbl.c lrzsz-0.12.20/po/cat-id-tbl.c
4912*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/cat-id-tbl.c	1998-12-29 09:24:24.000000000 +0000
4913*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/cat-id-tbl.c	1970-01-01 01:00:00.000000000 +0100
4914*4882a593Smuzhiyun@@ -1,234 +0,0 @@
4915*4882a593Smuzhiyun-/* Automatically generated by po2tbl.sed from lrzsz.pot.  */
4916*4882a593Smuzhiyun-
4917*4882a593Smuzhiyun-#if HAVE_CONFIG_H
4918*4882a593Smuzhiyun-# include <config.h>
4919*4882a593Smuzhiyun-#endif
4920*4882a593Smuzhiyun-
4921*4882a593Smuzhiyun-#include "libgettext.h"
4922*4882a593Smuzhiyun-
4923*4882a593Smuzhiyun-const struct _msg_ent _msg_tbl[] = {
4924*4882a593Smuzhiyun-  {"", 1},
4925*4882a593Smuzhiyun-  {"io_mode(,2) in rbsb.c not implemented\n", 2},
4926*4882a593Smuzhiyun-  {"caught signal %d; exiting", 3},
4927*4882a593Smuzhiyun-  {"command tries", 4},
4928*4882a593Smuzhiyun-  {"packetlength", 5},
4929*4882a593Smuzhiyun-  {"packetlength out of range 24..%ld", 6},
4930*4882a593Smuzhiyun-  {"framelength", 7},
4931*4882a593Smuzhiyun-  {"framelength out of range 32..%ld", 8},
4932*4882a593Smuzhiyun-  {"min_bps", 9},
4933*4882a593Smuzhiyun-  {"min_bps must be >= 0", 10},
4934*4882a593Smuzhiyun-  {"min_bps_time", 11},
4935*4882a593Smuzhiyun-  {"min_bps_time must be > 1", 12},
4936*4882a593Smuzhiyun-  {"hour to large (0..23)", 13},
4937*4882a593Smuzhiyun-  {"unparsable stop time\n", 14},
4938*4882a593Smuzhiyun-  {"minute to large (0..59)", 15},
4939*4882a593Smuzhiyun-  {"stop time to small", 16},
4940*4882a593Smuzhiyun-  {"stop-at", 17},
4941*4882a593Smuzhiyun-  {"timeout", 18},
4942*4882a593Smuzhiyun-  {"timeout out of range 10..1000", 19},
4943*4882a593Smuzhiyun-  {"security violation: can't do that under restricted shell\n", 20},
4944*4882a593Smuzhiyun-  {"window size", 21},
4945*4882a593Smuzhiyun-  {"cannot turnoff syslog", 22},
4946*4882a593Smuzhiyun-  {"startup delay", 23},
4947*4882a593Smuzhiyun-  {"out of memory", 24},
4948*4882a593Smuzhiyun-  {"this program was never intended to be used setuid\n", 25},
4949*4882a593Smuzhiyun-  {"need at least one file to send", 26},
4950*4882a593Smuzhiyun-  {"Can't send command in restricted mode\n", 27},
4951*4882a593Smuzhiyun-  {"hostname too long\n", 28},
4952*4882a593Smuzhiyun-  {"illegal server address\n", 29},
4953*4882a593Smuzhiyun-  {"can read only one file from stdin", 30},
4954*4882a593Smuzhiyun-  {"Transfer incomplete\n", 31},
4955*4882a593Smuzhiyun-  {"Transfer complete\n", 32},
4956*4882a593Smuzhiyun-  {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
4957*4882a593Smuzhiyun-  {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
4958*4882a593Smuzhiyun-  {"send_pseudo %s: avoiding symlink trap", 35},
4959*4882a593Smuzhiyun-  {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
4960*4882a593Smuzhiyun-  {"send_pseudo %s: failed", 37},
4961*4882a593Smuzhiyun-  {"send_pseudo %s: ok", 38},
4962*4882a593Smuzhiyun-  {"tcp protocol init failed\n", 39},
4963*4882a593Smuzhiyun-  {"Answering TIMESYNC at %s", 40},
4964*4882a593Smuzhiyun-  {"timezone", 41},
4965*4882a593Smuzhiyun-  {"timezone unknown", 42},
4966*4882a593Smuzhiyun-  {"Can't open any requested files.", 43},
4967*4882a593Smuzhiyun-  {"security violation: not allowed to upload from %s", 44},
4968*4882a593Smuzhiyun-  {"cannot open %s", 45},
4969*4882a593Smuzhiyun-  {"is not a file: %s", 46},
4970*4882a593Smuzhiyun-  {"%s/%s: error occured", 47},
4971*4882a593Smuzhiyun-  {"skipped: %s", 48},
4972*4882a593Smuzhiyun-  {"%s/%s: skipped", 49},
4973*4882a593Smuzhiyun-  {"Bytes Sent:%7ld   BPS:%-8ld                        \n", 50},
4974*4882a593Smuzhiyun-  {"Sending %s, %ld blocks: ", 51},
4975*4882a593Smuzhiyun-  {"Give your local XMODEM receive command now.", 52},
4976*4882a593Smuzhiyun-  {"Sending: %s\n", 53},
4977*4882a593Smuzhiyun-  {"Timeout on pathname", 54},
4978*4882a593Smuzhiyun-  {"Receiver Cancelled", 55},
4979*4882a593Smuzhiyun-  {"No ACK on EOT", 56},
4980*4882a593Smuzhiyun-  {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
4981*4882a593Smuzhiyun-  {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
4982*4882a593Smuzhiyun-  {"Cancelled", 59},
4983*4882a593Smuzhiyun-  {"Timeout on sector ACK", 60},
4984*4882a593Smuzhiyun-  {"NAK on sector", 61},
4985*4882a593Smuzhiyun-  {"Got burst for sector ACK", 62},
4986*4882a593Smuzhiyun-  {"Got %02x for sector ACK", 63},
4987*4882a593Smuzhiyun-  {"Retry Count Exceeded", 64},
4988*4882a593Smuzhiyun-  {"Try `%s --help' for more information.\n", 65},
4989*4882a593Smuzhiyun-  {"%s version %s\n", 66},
4990*4882a593Smuzhiyun-  {"Usage: %s [options] file ...\n", 67},
4991*4882a593Smuzhiyun-  {"   or: %s [options] -{c|i} COMMAND\n", 68},
4992*4882a593Smuzhiyun-  {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
4993*4882a593Smuzhiyun-  {"\
4994*4882a593Smuzhiyun-    (X) = option applies to XMODEM only\n\
4995*4882a593Smuzhiyun-    (Y) = option applies to YMODEM only\n\
4996*4882a593Smuzhiyun-    (Z) = option applies to ZMODEM only\n", 70},
4997*4882a593Smuzhiyun-  {"\
4998*4882a593Smuzhiyun-  -+, --append                append to existing destination file (Z)\n\
4999*4882a593Smuzhiyun-  -2, --twostop               use 2 stop bits\n\
5000*4882a593Smuzhiyun-  -4, --try-4k                go up to 4K blocksize\n\
5001*4882a593Smuzhiyun-      --start-4k              start with 4K blocksize (doesn't try 8)\n\
5002*4882a593Smuzhiyun-  -8, --try-8k                go up to 8K blocksize\n\
5003*4882a593Smuzhiyun-      --start-8k              start with 8K blocksize\n\
5004*4882a593Smuzhiyun-  -a, --ascii                 ASCII transfer (change CR/LF to LF)\n\
5005*4882a593Smuzhiyun-  -b, --binary                binary transfer\n\
5006*4882a593Smuzhiyun-  -B, --bufsize N             buffer N bytes (N==auto: buffer whole file)\n\
5007*4882a593Smuzhiyun-  -c, --command COMMAND       execute remote command COMMAND (Z)\n\
5008*4882a593Smuzhiyun-  -C, --command-tries N       try N times to execute a command (Z)\n\
5009*4882a593Smuzhiyun-  -d, --dot-to-slash          change '.' to '/' in pathnames (Y/Z)\n\
5010*4882a593Smuzhiyun-      --delay-startup N       sleep N seconds before doing anything\n\
5011*4882a593Smuzhiyun-  -e, --escape                escape all control characters (Z)\n\
5012*4882a593Smuzhiyun-  -E, --rename                force receiver to rename files it already has\n\
5013*4882a593Smuzhiyun-  -f, --full-path             send full pathname (Y/Z)\n\
5014*4882a593Smuzhiyun-  -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
5015*4882a593Smuzhiyun-  -h, --help                  print this usage message\n\
5016*4882a593Smuzhiyun-  -k, --1k                    send 1024 byte packets (X)\n\
5017*4882a593Smuzhiyun-  -L, --packetlen N           limit subpacket length to N bytes (Z)\n\
5018*4882a593Smuzhiyun-  -l, --framelen N            limit frame length to N bytes (l>=L) (Z)\n\
5019*4882a593Smuzhiyun-  -m, --min-bps N             stop transmission if BPS below N\n\
5020*4882a593Smuzhiyun-  -M, --min-bps-time N          for at least N seconds (default: 120)\n", 71},
5021*4882a593Smuzhiyun-  {"\
5022*4882a593Smuzhiyun-  -n, --newer                 send file if source newer (Z)\n\
5023*4882a593Smuzhiyun-  -N, --newer-or-longer       send file if source newer or longer (Z)\n\
5024*4882a593Smuzhiyun-  -o, --16-bit-crc            use 16 bit CRC instead of 32 bit CRC (Z)\n\
5025*4882a593Smuzhiyun-  -O, --disable-timeouts      disable timeout code, wait forever\n\
5026*4882a593Smuzhiyun-  -p, --protect               protect existing destination file (Z)\n\
5027*4882a593Smuzhiyun-  -r, --resume                resume interrupted file transfer (Z)\n\
5028*4882a593Smuzhiyun-  -R, --restricted            restricted, more secure mode\n\
5029*4882a593Smuzhiyun-  -q, --quiet                 quiet (no progress reports)\n\
5030*4882a593Smuzhiyun-  -s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds\n\
5031*4882a593Smuzhiyun-      --tcp                   build a TCP connection to transmit files\n\
5032*4882a593Smuzhiyun-      --tcp-server            open socket, wait for connection\n\
5033*4882a593Smuzhiyun-  -u, --unlink                unlink file after transmission\n\
5034*4882a593Smuzhiyun-  -U, --unrestrict            turn off restricted mode (if allowed to)\n\
5035*4882a593Smuzhiyun-  -v, --verbose               be verbose, provide debugging information\n\
5036*4882a593Smuzhiyun-  -w, --windowsize N          Window is N bytes (Z)\n\
5037*4882a593Smuzhiyun-  -X, --xmodem                use XMODEM protocol\n\
5038*4882a593Smuzhiyun-  -y, --overwrite             overwrite existing files\n\
5039*4882a593Smuzhiyun-  -Y, --overwrite-or-skip     overwrite existing files, else skip\n\
5040*4882a593Smuzhiyun-      --ymodem                use YMODEM protocol\n\
5041*4882a593Smuzhiyun-  -Z, --zmodem                use ZMODEM protocol\n\
5042*4882a593Smuzhiyun-\n\
5043*4882a593Smuzhiyun-short options use the same arguments as the long ones\n", 72},
5044*4882a593Smuzhiyun-  {"got ZRQINIT", 73},
5045*4882a593Smuzhiyun-  {"got ZCAN", 74},
5046*4882a593Smuzhiyun-  {"blklen now %d\n", 75},
5047*4882a593Smuzhiyun-  {"zsendfdata: bps rate %ld below min %ld", 76},
5048*4882a593Smuzhiyun-  {"zsendfdata: reached stop time", 77},
5049*4882a593Smuzhiyun-  {"Bytes Sent:%7ld/%7ld   BPS:%-8ld ETA %02d:%02d  ", 78},
5050*4882a593Smuzhiyun-  {"calc_blklen: reduced to %d due to error\n", 79},
5051*4882a593Smuzhiyun-  {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
5052*4882a593Smuzhiyun-  {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
5053*4882a593Smuzhiyun-  {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
5054*4882a593Smuzhiyun-  {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
5055*4882a593Smuzhiyun-  {"calc_blklen: returned %d as best\n", 84},
5056*4882a593Smuzhiyun-  {"\
5057*4882a593Smuzhiyun-\n\
5058*4882a593Smuzhiyun-countem: Total %d %ld\n", 85},
5059*4882a593Smuzhiyun-  {"Bad escape sequence %x", 86},
5060*4882a593Smuzhiyun-  {"Sender Canceled", 87},
5061*4882a593Smuzhiyun-  {"TIMEOUT", 88},
5062*4882a593Smuzhiyun-  {"Bad data subpacket", 89},
5063*4882a593Smuzhiyun-  {"Data subpacket too long", 90},
5064*4882a593Smuzhiyun-  {"Garbage count exceeded", 91},
5065*4882a593Smuzhiyun-  {"Got %s", 92},
5066*4882a593Smuzhiyun-  {"Retry %d: ", 93},
5067*4882a593Smuzhiyun-  {"don't have settimeofday, will not set time\n", 94},
5068*4882a593Smuzhiyun-  {"not running as root (this is good!), can not set time\n", 95},
5069*4882a593Smuzhiyun-  {"bytes_per_error", 96},
5070*4882a593Smuzhiyun-  {"bytes-per-error should be >100", 97},
5071*4882a593Smuzhiyun-  {"O_SYNC not supported by the kernel", 98},
5072*4882a593Smuzhiyun-  {"garbage on commandline", 99},
5073*4882a593Smuzhiyun-  {"Usage: %s [options] [filename.if.xmodem]\n", 100},
5074*4882a593Smuzhiyun-  {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
5075*4882a593Smuzhiyun-  {"\
5076*4882a593Smuzhiyun-  -+, --append                append to existing files\n\
5077*4882a593Smuzhiyun-  -a, --ascii                 ASCII transfer (change CR/LF to LF)\n\
5078*4882a593Smuzhiyun-  -b, --binary                binary transfer\n\
5079*4882a593Smuzhiyun-  -B, --bufsize N             buffer N bytes (N==auto: buffer whole file)\n\
5080*4882a593Smuzhiyun-  -c, --with-crc              Use 16 bit CRC (X)\n\
5081*4882a593Smuzhiyun-  -C, --allow-remote-commands allow execution of remote commands (Z)\n\
5082*4882a593Smuzhiyun-  -D, --null                  write all received data to /dev/null\n\
5083*4882a593Smuzhiyun-      --delay-startup N       sleep N seconds before doing anything\n\
5084*4882a593Smuzhiyun-  -e, --escape                Escape control characters (Z)\n\
5085*4882a593Smuzhiyun-  -E, --rename                rename any files already existing\n\
5086*4882a593Smuzhiyun-      --errors N              generate CRC error every N bytes (debugging)\n\
5087*4882a593Smuzhiyun-  -h, --help                  Help, print this usage message\n\
5088*4882a593Smuzhiyun-  -m, --min-bps N             stop transmission if BPS below N\n\
5089*4882a593Smuzhiyun-  -M, --min-bps-time N          for at least N seconds (default: 120)\n\
5090*4882a593Smuzhiyun-  -O, --disable-timeouts      disable timeout code, wait forever for data\n\
5091*4882a593Smuzhiyun-      --o-sync                open output file(s) in synchronous write mode\n\
5092*4882a593Smuzhiyun-  -p, --protect               protect existing files\n\
5093*4882a593Smuzhiyun-  -q, --quiet                 quiet, no progress reports\n\
5094*4882a593Smuzhiyun-  -r, --resume                try to resume interrupted file transfer (Z)\n\
5095*4882a593Smuzhiyun-  -R, --restricted            restricted, more secure mode\n\
5096*4882a593Smuzhiyun-  -s, --stop-at {HH:MM|+N}    stop transmission at HH:MM or in N seconds\n\
5097*4882a593Smuzhiyun-  -S, --timesync              request remote time (twice: set local time)\n\
5098*4882a593Smuzhiyun-      --syslog[=off]          turn syslog on or off, if possible\n\
5099*4882a593Smuzhiyun-  -t, --timeout N             set timeout to N tenths of a second\n\
5100*4882a593Smuzhiyun-  -u, --keep-uppercase        keep upper case filenames\n\
5101*4882a593Smuzhiyun-  -U, --unrestrict            disable restricted mode (if allowed to)\n\
5102*4882a593Smuzhiyun-  -v, --verbose               be verbose, provide debugging information\n\
5103*4882a593Smuzhiyun-  -w, --windowsize N          Window is N bytes (Z)\n\
5104*4882a593Smuzhiyun-  -X  --xmodem                use XMODEM protocol\n\
5105*4882a593Smuzhiyun-  -y, --overwrite             Yes, clobber existing file if any\n\
5106*4882a593Smuzhiyun-      --ymodem                use YMODEM protocol\n\
5107*4882a593Smuzhiyun-  -Z, --zmodem                use ZMODEM protocol\n\
5108*4882a593Smuzhiyun-\n\
5109*4882a593Smuzhiyun-short options use the same arguments as the long ones\n", 102},
5110*4882a593Smuzhiyun-  {"%s waiting to receive.", 103},
5111*4882a593Smuzhiyun-  {"\rBytes received: %7ld/%7ld   BPS:%-6ld                \r\n", 104},
5112*4882a593Smuzhiyun-  {"%s: ready to receive %s", 105},
5113*4882a593Smuzhiyun-  {"\rBytes received: %7ld   BPS:%-6ld                \r\n", 106},
5114*4882a593Smuzhiyun-  {"\
5115*4882a593Smuzhiyun-\r\n\
5116*4882a593Smuzhiyun-%s: %s removed.\r\n", 107},
5117*4882a593Smuzhiyun-  {"Pathname fetch returned EOT", 108},
5118*4882a593Smuzhiyun-  {"Received dup Sector", 109},
5119*4882a593Smuzhiyun-  {"Sync Error", 110},
5120*4882a593Smuzhiyun-  {"CRC", 111},
5121*4882a593Smuzhiyun-  {"Checksum", 112},
5122*4882a593Smuzhiyun-  {"Sector number garbled", 113},
5123*4882a593Smuzhiyun-  {"Sender Cancelled", 114},
5124*4882a593Smuzhiyun-  {"Got 0%o sector header", 115},
5125*4882a593Smuzhiyun-  {"file name ends with a /, skipped: %s\n", 116},
5126*4882a593Smuzhiyun-  {"zmanag=%d, Lzmanag=%d\n", 117},
5127*4882a593Smuzhiyun-  {"zconv=%d\n", 118},
5128*4882a593Smuzhiyun-  {"file exists, skipped: %s\n", 119},
5129*4882a593Smuzhiyun-  {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
5130*4882a593Smuzhiyun-  {"TIMESYNC: cannot set time: %s\n", 121},
5131*4882a593Smuzhiyun-  {"cannot tmpfile() for tcp protocol synchronization", 122},
5132*4882a593Smuzhiyun-  {"Topipe", 123},
5133*4882a593Smuzhiyun-  {"Receiving: %s\n", 124},
5134*4882a593Smuzhiyun-  {"Blocks received: %d", 125},
5135*4882a593Smuzhiyun-  {"%s: %s exists\n", 126},
5136*4882a593Smuzhiyun-  {"%s:\tSecurity Violation", 127},
5137*4882a593Smuzhiyun-  {"remote command execution requested", 128},
5138*4882a593Smuzhiyun-  {"not executed", 129},
5139*4882a593Smuzhiyun-  {"got ZRINIT", 130},
5140*4882a593Smuzhiyun-  {"Skipped", 131},
5141*4882a593Smuzhiyun-  {"rzfile: bps rate %ld below min %ld", 132},
5142*4882a593Smuzhiyun-  {"rzfile: reached stop time", 133},
5143*4882a593Smuzhiyun-  {"\rBytes received: %7ld/%7ld   BPS:%-6ld ETA %02d:%02d  ", 134},
5144*4882a593Smuzhiyun-  {"fgets for tcp protocol synchronization failed: ", 135},
5145*4882a593Smuzhiyun-  {"file close error", 136},
5146*4882a593Smuzhiyun-};
5147*4882a593Smuzhiyun-
5148*4882a593Smuzhiyun-int _msg_tbl_length = 136;
5149*4882a593SmuzhiyunBinary files clean/lrzsz-0.12.20/po/de.gmo and lrzsz-0.12.20/po/de.gmo differ
5150*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/de.po lrzsz-0.12.20/po/de.po
5151*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/de.po	1998-12-30 16:31:46.000000000 +0000
5152*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/de.po	2019-11-26 11:42:07.000000000 +0000
5153*4882a593Smuzhiyun@@ -6,10 +6,12 @@
5154*4882a593Smuzhiyun msgid ""
5155*4882a593Smuzhiyun msgstr ""
5156*4882a593Smuzhiyun "Project-Id-Version: PACKAGE VERSION\n"
5157*4882a593Smuzhiyun-"POT-Creation-Date: 1998-12-30 08:49+0100\n"
5158*4882a593Smuzhiyun+"Report-Msgid-Bugs-To: \n"
5159*4882a593Smuzhiyun+"POT-Creation-Date: 2019-11-26 11:39+0000\n"
5160*4882a593Smuzhiyun "PO-Revision-Date: 1997-06-01 19:00+0200\n"
5161*4882a593Smuzhiyun "Last-Translator: FULL NAME <uwe@ohse.de>\n"
5162*4882a593Smuzhiyun "Language-Team: none. try <uwe@ohse.de>\n"
5163*4882a593Smuzhiyun+"Language: de\n"
5164*4882a593Smuzhiyun "MIME-Version: 1.0\n"
5165*4882a593Smuzhiyun "Content-Type: text/plain; charset=iso-8859-1\n"
5166*4882a593Smuzhiyun "Content-Transfer-Encoding: 8bit\n"
5167*4882a593Smuzhiyun@@ -18,7 +20,7 @@ msgstr ""
5168*4882a593Smuzhiyun msgid "io_mode(,2) in rbsb.c not implemented\n"
5169*4882a593Smuzhiyun msgstr "io_mode(2) in rbsb.c nicht implementiert\n"
5170*4882a593Smuzhiyun
5171*4882a593Smuzhiyun-#: src/lrz.c:201 src/lsz.c:230
5172*4882a593Smuzhiyun+#: src/lsz.c:230 src/lrz.c:201
5173*4882a593Smuzhiyun #, c-format
5174*4882a593Smuzhiyun msgid "caught signal %d; exiting"
5175*4882a593Smuzhiyun msgstr "erhielt Signal %d; Programmabbruch"
5176*4882a593Smuzhiyun@@ -45,7 +47,7 @@ msgstr "Framel�nge"
5177*4882a593Smuzhiyun msgid "framelength out of range 32..%ld"
5178*4882a593Smuzhiyun msgstr "Argument der Option l au�erhalb des Bereichs 32..%ld"
5179*4882a593Smuzhiyun
5180*4882a593Smuzhiyun-#: src/lrz.c:323 src/lsz.c:450
5181*4882a593Smuzhiyun+#: src/lsz.c:450 src/lrz.c:323
5182*4882a593Smuzhiyun msgid "min_bps"
5183*4882a593Smuzhiyun msgstr "minimale BPS-Rate"
5184*4882a593Smuzhiyun
5185*4882a593Smuzhiyun@@ -53,65 +55,65 @@ msgstr "minimale BPS-Rate"
5186*4882a593Smuzhiyun msgid "min_bps must be >= 0"
5187*4882a593Smuzhiyun msgstr "minimale BPS-Rate mu� >= 0 sein"
5188*4882a593Smuzhiyun
5189*4882a593Smuzhiyun-#: src/lrz.c:329 src/lsz.c:458
5190*4882a593Smuzhiyun+#: src/lsz.c:458 src/lrz.c:329
5191*4882a593Smuzhiyun msgid "min_bps_time"
5192*4882a593Smuzhiyun msgstr ""
5193*4882a593Smuzhiyun
5194*4882a593Smuzhiyun-#: src/lrz.c:331 src/lsz.c:460
5195*4882a593Smuzhiyun+#: src/lsz.c:460 src/lrz.c:331
5196*4882a593Smuzhiyun msgid "min_bps_time must be > 1"
5197*4882a593Smuzhiyun msgstr "Zeitfenster f�r minimale BPS-Rate mu� > 1 Sekunde sein"
5198*4882a593Smuzhiyun
5199*4882a593Smuzhiyun-#: src/lrz.c:347 src/lsz.c:484
5200*4882a593Smuzhiyun+#: src/lsz.c:484 src/lrz.c:347
5201*4882a593Smuzhiyun msgid "hour to large (0..23)"
5202*4882a593Smuzhiyun msgstr "Stunde zu gross (0..23)"
5203*4882a593Smuzhiyun
5204*4882a593Smuzhiyun-#: src/lrz.c:349 src/lsz.c:486
5205*4882a593Smuzhiyun+#: src/lsz.c:486 src/lrz.c:349
5206*4882a593Smuzhiyun msgid "unparsable stop time\n"
5207*4882a593Smuzhiyun msgstr "unparsbare Endzeit\n"
5208*4882a593Smuzhiyun
5209*4882a593Smuzhiyun-#: src/lrz.c:353 src/lsz.c:490
5210*4882a593Smuzhiyun+#: src/lsz.c:490 src/lrz.c:353
5211*4882a593Smuzhiyun msgid "minute to large (0..59)"
5212*4882a593Smuzhiyun msgstr "Minute zu gro� (0..59)"
5213*4882a593Smuzhiyun
5214*4882a593Smuzhiyun-#: src/lrz.c:363 src/lrz.c:370 src/lsz.c:500 src/lsz.c:507
5215*4882a593Smuzhiyun+#: src/lsz.c:500 src/lsz.c:507 src/lrz.c:363 src/lrz.c:370
5216*4882a593Smuzhiyun msgid "stop time to small"
5217*4882a593Smuzhiyun msgstr "Stopzeit zu kurz"
5218*4882a593Smuzhiyun
5219*4882a593Smuzhiyun-#: src/lrz.c:368 src/lsz.c:505
5220*4882a593Smuzhiyun+#: src/lsz.c:505 src/lrz.c:368
5221*4882a593Smuzhiyun msgid "stop-at"
5222*4882a593Smuzhiyun msgstr ""
5223*4882a593Smuzhiyun
5224*4882a593Smuzhiyun-#: src/lrz.c:399 src/lsz.c:516
5225*4882a593Smuzhiyun+#: src/lsz.c:516 src/lrz.c:399
5226*4882a593Smuzhiyun msgid "timeout"
5227*4882a593Smuzhiyun msgstr "Timeout"
5228*4882a593Smuzhiyun
5229*4882a593Smuzhiyun-#: src/lrz.c:401 src/lsz.c:518
5230*4882a593Smuzhiyun+#: src/lsz.c:518 src/lrz.c:401
5231*4882a593Smuzhiyun msgid "timeout out of range 10..1000"
5232*4882a593Smuzhiyun msgstr "Argument der Option t au�erhalb des Bereichs 10..1000"
5233*4882a593Smuzhiyun
5234*4882a593Smuzhiyun-#: src/lrz.c:417 src/lsz.c:526
5235*4882a593Smuzhiyun+#: src/lsz.c:526 src/lrz.c:417
5236*4882a593Smuzhiyun msgid "security violation: can't do that under restricted shell\n"
5237*4882a593Smuzhiyun msgstr "Sicherheitsversto�: Ausf�hrung unter eingeschr�nkter Shell verboten\n"
5238*4882a593Smuzhiyun
5239*4882a593Smuzhiyun-#: src/lrz.c:407 src/lsz.c:533
5240*4882a593Smuzhiyun+#: src/lsz.c:533 src/lrz.c:407
5241*4882a593Smuzhiyun msgid "window size"
5242*4882a593Smuzhiyun msgstr "Fenstergr��e"
5243*4882a593Smuzhiyun
5244*4882a593Smuzhiyun-#: src/lrz.c:432 src/lrz.c:439 src/lsz.c:556 src/lsz.c:563
5245*4882a593Smuzhiyun+#: src/lsz.c:556 src/lsz.c:563 src/lrz.c:432 src/lrz.c:439
5246*4882a593Smuzhiyun msgid "cannot turnoff syslog"
5247*4882a593Smuzhiyun msgstr "kann syslogging nicht abschalten"
5248*4882a593Smuzhiyun
5249*4882a593Smuzhiyun-#: src/lrz.c:454 src/lsz.c:571
5250*4882a593Smuzhiyun+#: src/lsz.c:571 src/lrz.c:454
5251*4882a593Smuzhiyun msgid "startup delay"
5252*4882a593Smuzhiyun msgstr "Startverz�gerung"
5253*4882a593Smuzhiyun
5254*4882a593Smuzhiyun+#: src/lsz.c:583 src/lsz.c:692 src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
5255*4882a593Smuzhiyun #: src/lrz.c:470 src/lrz.c:755 src/lrz.c:1117 src/lrz.c:1243 src/lrz.c:1300
5256*4882a593Smuzhiyun-#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431 src/lsz.c:583 src/lsz.c:692
5257*4882a593Smuzhiyun-#: src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
5258*4882a593Smuzhiyun+#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431
5259*4882a593Smuzhiyun msgid "out of memory"
5260*4882a593Smuzhiyun msgstr "Kein Speicher mehr frei"
5261*4882a593Smuzhiyun
5262*4882a593Smuzhiyun-#: src/lrz.c:480 src/lsz.c:595
5263*4882a593Smuzhiyun+#: src/lsz.c:595 src/lrz.c:480
5264*4882a593Smuzhiyun msgid "this program was never intended to be used setuid\n"
5265*4882a593Smuzhiyun msgstr "dieses Programm darf nicht setuid laufen\n"
5266*4882a593Smuzhiyun
5267*4882a593Smuzhiyun@@ -120,14 +122,15 @@ msgid "need at least one file to send"
5268*4882a593Smuzhiyun msgstr "es mu� mindestens ein Name einer zu sendenden Datei angegeben werden"
5269*4882a593Smuzhiyun
5270*4882a593Smuzhiyun #: src/lsz.c:628
5271*4882a593Smuzhiyun+#, c-format
5272*4882a593Smuzhiyun msgid "Can't send command in restricted mode\n"
5273*4882a593Smuzhiyun msgstr "Im eingeschr�nkten Modus ist das Senden von Kommandos verboten\n"
5274*4882a593Smuzhiyun
5275*4882a593Smuzhiyun-#: src/lrz.c:524 src/lsz.c:655
5276*4882a593Smuzhiyun+#: src/lsz.c:655 src/lrz.c:524
5277*4882a593Smuzhiyun msgid "hostname too long\n"
5278*4882a593Smuzhiyun msgstr "Hostname zu lang\n"
5279*4882a593Smuzhiyun
5280*4882a593Smuzhiyun-#: src/lrz.c:539 src/lsz.c:670
5281*4882a593Smuzhiyun+#: src/lsz.c:670 src/lrz.c:539
5282*4882a593Smuzhiyun msgid "illegal server address\n"
5283*4882a593Smuzhiyun msgstr "Illegale Serveraddresse\n"
5284*4882a593Smuzhiyun
5285*4882a593Smuzhiyun@@ -135,11 +138,11 @@ msgstr "Illegale Serveraddresse\n"
5286*4882a593Smuzhiyun msgid "can read only one file from stdin"
5287*4882a593Smuzhiyun msgstr "kann nur eine Datei von der Standardeingabe lesen"
5288*4882a593Smuzhiyun
5289*4882a593Smuzhiyun-#: src/lrz.c:571 src/lsz.c:806
5290*4882a593Smuzhiyun+#: src/lsz.c:806 src/lrz.c:571
5291*4882a593Smuzhiyun msgid "Transfer incomplete\n"
5292*4882a593Smuzhiyun msgstr "�bertragung nicht abgeschlossen\n"
5293*4882a593Smuzhiyun
5294*4882a593Smuzhiyun-#: src/lrz.c:573 src/lsz.c:808
5295*4882a593Smuzhiyun+#: src/lsz.c:808 src/lrz.c:573
5296*4882a593Smuzhiyun msgid "Transfer complete\n"
5297*4882a593Smuzhiyun msgstr "�bertragung abgeschlossen\n"
5298*4882a593Smuzhiyun
5299*4882a593Smuzhiyun@@ -197,9 +200,9 @@ msgstr "Kann keine der angeforderten Dat
5300*4882a593Smuzhiyun #: src/lsz.c:1028
5301*4882a593Smuzhiyun #, c-format
5302*4882a593Smuzhiyun msgid "security violation: not allowed to upload from %s"
5303*4882a593Smuzhiyun-msgstr "Sicherheitsversto�: Ausf�hrung unter eingeschr�nkter Shell verboten"
5304*4882a593Smuzhiyun+msgstr "Sicherheitsversto�: Ausf�hrung unter %s verboten"
5305*4882a593Smuzhiyun
5306*4882a593Smuzhiyun-#: src/lrz.c:1392 src/lsz.c:1046
5307*4882a593Smuzhiyun+#: src/lsz.c:1046 src/lrz.c:1392
5308*4882a593Smuzhiyun #, c-format
5309*4882a593Smuzhiyun msgid "cannot open %s"
5310*4882a593Smuzhiyun msgstr "kann %s nicht �ffnen"
5311*4882a593Smuzhiyun@@ -290,12 +293,12 @@ msgstr "Erhielt %02x als Sektorbest�tigu
5312*4882a593Smuzhiyun msgid "Retry Count Exceeded"
5313*4882a593Smuzhiyun msgstr "Maximale Wiederholungsanzahl �berschritten"
5314*4882a593Smuzhiyun
5315*4882a593Smuzhiyun-#: src/lrz.c:593 src/lsz.c:1521
5316*4882a593Smuzhiyun+#: src/lsz.c:1521 src/lrz.c:593
5317*4882a593Smuzhiyun #, c-format
5318*4882a593Smuzhiyun msgid "Try `%s --help' for more information.\n"
5319*4882a593Smuzhiyun msgstr "`%s --help' gibt weitere Informationen.\n"
5320*4882a593Smuzhiyun
5321*4882a593Smuzhiyun-#: src/lrz.c:598 src/lsz.c:1526
5322*4882a593Smuzhiyun+#: src/lsz.c:1526 src/lrz.c:598
5323*4882a593Smuzhiyun #, c-format
5324*4882a593Smuzhiyun msgid "%s version %s\n"
5325*4882a593Smuzhiyun msgstr "%s Version %s\n"
5326*4882a593Smuzhiyun@@ -315,7 +318,7 @@ msgid "Send file(s) with ZMODEM/YMODEM/X
5327*4882a593Smuzhiyun msgstr "Dateien mit ZMODEM/YMODEM/XMODEM �bertragen\n"
5328*4882a593Smuzhiyun
5329*4882a593Smuzhiyun # src/lrz.c:475 src/lsz.c:1330 xx
5330*4882a593Smuzhiyun-#: src/lrz.c:604 src/lsz.c:1534
5331*4882a593Smuzhiyun+#: src/lsz.c:1534 src/lrz.c:604
5332*4882a593Smuzhiyun msgid ""
5333*4882a593Smuzhiyun "    (X) = option applies to XMODEM only\n"
5334*4882a593Smuzhiyun "    (Y) = option applies to YMODEM only\n"
5335*4882a593Smuzhiyun@@ -431,7 +434,7 @@ msgstr ""
5336*4882a593Smuzhiyun msgid "got ZRQINIT"
5337*4882a593Smuzhiyun msgstr "erhielt ZRQINIT"
5338*4882a593Smuzhiyun
5339*4882a593Smuzhiyun-#: src/lrz.c:1074 src/lrz.c:1787 src/lsz.c:1792
5340*4882a593Smuzhiyun+#: src/lsz.c:1792 src/lrz.c:1074 src/lrz.c:1787
5341*4882a593Smuzhiyun msgid "got ZCAN"
5342*4882a593Smuzhiyun msgstr "erhielt ZCAN"
5343*4882a593Smuzhiyun
5344*4882a593Smuzhiyun@@ -472,7 +475,7 @@ msgstr "calc_blklen: alt %ld, neu %ld, D
5345*4882a593Smuzhiyun #: src/lsz.c:2272
5346*4882a593Smuzhiyun #, c-format
5347*4882a593Smuzhiyun msgid "calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n"
5348*4882a593Smuzhiyun-msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%le, ec=%ld\n"
5349*4882a593Smuzhiyun+msgstr "calc_blklen: kalkuliere gesamt_bytes=%ld, bpe=%ld, ec=%ld\n"
5350*4882a593Smuzhiyun
5351*4882a593Smuzhiyun #: src/lsz.c:2283
5352*4882a593Smuzhiyun #, c-format
5353*4882a593Smuzhiyun@@ -493,6 +496,10 @@ msgstr ""
5354*4882a593Smuzhiyun "\n"
5355*4882a593Smuzhiyun "countem: Gesamt %d %ld\n"
5356*4882a593Smuzhiyun
5357*4882a593Smuzhiyun+#: src/zm.c:91
5358*4882a593Smuzhiyun+msgid "Bad CRC"
5359*4882a593Smuzhiyun+msgstr ""
5360*4882a593Smuzhiyun+
5361*4882a593Smuzhiyun #: src/zm.c:244
5362*4882a593Smuzhiyun #, c-format
5363*4882a593Smuzhiyun msgid "Bad escape sequence %x"
5364*4882a593Smuzhiyun@@ -502,7 +509,7 @@ msgstr "Falsche Escapesequenz %x"
5365*4882a593Smuzhiyun msgid "Sender Canceled"
5366*4882a593Smuzhiyun msgstr "Sender brach ab"
5367*4882a593Smuzhiyun
5368*4882a593Smuzhiyun-#: src/lrz.c:997 src/zm.c:585 src/zm.c:644
5369*4882a593Smuzhiyun+#: src/zm.c:585 src/zm.c:644 src/lrz.c:997
5370*4882a593Smuzhiyun msgid "TIMEOUT"
5371*4882a593Smuzhiyun msgstr "TIMEOUT"
5372*4882a593Smuzhiyun
5373*4882a593Smuzhiyun@@ -772,13 +779,11 @@ msgstr "Erhielt unerwartetes ZRINIT"
5374*4882a593Smuzhiyun msgid "Skipped"
5375*4882a593Smuzhiyun msgstr "�bersprungen"
5376*4882a593Smuzhiyun
5377*4882a593Smuzhiyun-#. too bad
5378*4882a593Smuzhiyun #: src/lrz.c:2064
5379*4882a593Smuzhiyun #, c-format
5380*4882a593Smuzhiyun msgid "rzfile: bps rate %ld below min %ld"
5381*4882a593Smuzhiyun msgstr "rzfile: BPS-Rate %ld unter Minimum %ld"
5382*4882a593Smuzhiyun
5383*4882a593Smuzhiyun-#. too bad
5384*4882a593Smuzhiyun #: src/lrz.c:2079
5385*4882a593Smuzhiyun msgid "rzfile: reached stop time"
5386*4882a593Smuzhiyun msgstr "rzfile: Abbruchzeit erreicht"
5387*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/lrzsz.pot lrzsz-0.12.20/po/lrzsz.pot
5388*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/lrzsz.pot	1998-12-30 07:50:00.000000000 +0000
5389*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/lrzsz.pot	2019-11-26 11:39:12.000000000 +0000
5390*4882a593Smuzhiyun@@ -1,24 +1,27 @@
5391*4882a593Smuzhiyun # SOME DESCRIPTIVE TITLE.
5392*4882a593Smuzhiyun # Copyright (C) YEAR Free Software Foundation, Inc.
5393*4882a593Smuzhiyun+# This file is distributed under the same license as the lrzsz package.
5394*4882a593Smuzhiyun # FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
5395*4882a593Smuzhiyun #
5396*4882a593Smuzhiyun #, fuzzy
5397*4882a593Smuzhiyun msgid ""
5398*4882a593Smuzhiyun msgstr ""
5399*4882a593Smuzhiyun-"Project-Id-Version: PACKAGE VERSION\n"
5400*4882a593Smuzhiyun-"POT-Creation-Date: 1998-12-30 08:49+0100\n"
5401*4882a593Smuzhiyun+"Project-Id-Version: lrzsz 0.12.20\n"
5402*4882a593Smuzhiyun+"Report-Msgid-Bugs-To: \n"
5403*4882a593Smuzhiyun+"POT-Creation-Date: 2019-11-26 11:39+0000\n"
5404*4882a593Smuzhiyun "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
5405*4882a593Smuzhiyun "Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
5406*4882a593Smuzhiyun "Language-Team: LANGUAGE <LL@li.org>\n"
5407*4882a593Smuzhiyun+"Language: \n"
5408*4882a593Smuzhiyun "MIME-Version: 1.0\n"
5409*4882a593Smuzhiyun "Content-Type: text/plain; charset=CHARSET\n"
5410*4882a593Smuzhiyun-"Content-Transfer-Encoding: ENCODING\n"
5411*4882a593Smuzhiyun+"Content-Transfer-Encoding: 8bit\n"
5412*4882a593Smuzhiyun
5413*4882a593Smuzhiyun #: src/lsz.c:228
5414*4882a593Smuzhiyun msgid "io_mode(,2) in rbsb.c not implemented\n"
5415*4882a593Smuzhiyun msgstr ""
5416*4882a593Smuzhiyun
5417*4882a593Smuzhiyun-#: src/lrz.c:201 src/lsz.c:230
5418*4882a593Smuzhiyun+#: src/lsz.c:230 src/lrz.c:201
5419*4882a593Smuzhiyun #, c-format
5420*4882a593Smuzhiyun msgid "caught signal %d; exiting"
5421*4882a593Smuzhiyun msgstr ""
5422*4882a593Smuzhiyun@@ -45,7 +48,7 @@ msgstr ""
5423*4882a593Smuzhiyun msgid "framelength out of range 32..%ld"
5424*4882a593Smuzhiyun msgstr ""
5425*4882a593Smuzhiyun
5426*4882a593Smuzhiyun-#: src/lrz.c:323 src/lsz.c:450
5427*4882a593Smuzhiyun+#: src/lsz.c:450 src/lrz.c:323
5428*4882a593Smuzhiyun msgid "min_bps"
5429*4882a593Smuzhiyun msgstr ""
5430*4882a593Smuzhiyun
5431*4882a593Smuzhiyun@@ -53,65 +56,65 @@ msgstr ""
5432*4882a593Smuzhiyun msgid "min_bps must be >= 0"
5433*4882a593Smuzhiyun msgstr ""
5434*4882a593Smuzhiyun
5435*4882a593Smuzhiyun-#: src/lrz.c:329 src/lsz.c:458
5436*4882a593Smuzhiyun+#: src/lsz.c:458 src/lrz.c:329
5437*4882a593Smuzhiyun msgid "min_bps_time"
5438*4882a593Smuzhiyun msgstr ""
5439*4882a593Smuzhiyun
5440*4882a593Smuzhiyun-#: src/lrz.c:331 src/lsz.c:460
5441*4882a593Smuzhiyun+#: src/lsz.c:460 src/lrz.c:331
5442*4882a593Smuzhiyun msgid "min_bps_time must be > 1"
5443*4882a593Smuzhiyun msgstr ""
5444*4882a593Smuzhiyun
5445*4882a593Smuzhiyun-#: src/lrz.c:347 src/lsz.c:484
5446*4882a593Smuzhiyun+#: src/lsz.c:484 src/lrz.c:347
5447*4882a593Smuzhiyun msgid "hour to large (0..23)"
5448*4882a593Smuzhiyun msgstr ""
5449*4882a593Smuzhiyun
5450*4882a593Smuzhiyun-#: src/lrz.c:349 src/lsz.c:486
5451*4882a593Smuzhiyun+#: src/lsz.c:486 src/lrz.c:349
5452*4882a593Smuzhiyun msgid "unparsable stop time\n"
5453*4882a593Smuzhiyun msgstr ""
5454*4882a593Smuzhiyun
5455*4882a593Smuzhiyun-#: src/lrz.c:353 src/lsz.c:490
5456*4882a593Smuzhiyun+#: src/lsz.c:490 src/lrz.c:353
5457*4882a593Smuzhiyun msgid "minute to large (0..59)"
5458*4882a593Smuzhiyun msgstr ""
5459*4882a593Smuzhiyun
5460*4882a593Smuzhiyun-#: src/lrz.c:363 src/lrz.c:370 src/lsz.c:500 src/lsz.c:507
5461*4882a593Smuzhiyun+#: src/lsz.c:500 src/lsz.c:507 src/lrz.c:363 src/lrz.c:370
5462*4882a593Smuzhiyun msgid "stop time to small"
5463*4882a593Smuzhiyun msgstr ""
5464*4882a593Smuzhiyun
5465*4882a593Smuzhiyun-#: src/lrz.c:368 src/lsz.c:505
5466*4882a593Smuzhiyun+#: src/lsz.c:505 src/lrz.c:368
5467*4882a593Smuzhiyun msgid "stop-at"
5468*4882a593Smuzhiyun msgstr ""
5469*4882a593Smuzhiyun
5470*4882a593Smuzhiyun-#: src/lrz.c:399 src/lsz.c:516
5471*4882a593Smuzhiyun+#: src/lsz.c:516 src/lrz.c:399
5472*4882a593Smuzhiyun msgid "timeout"
5473*4882a593Smuzhiyun msgstr ""
5474*4882a593Smuzhiyun
5475*4882a593Smuzhiyun-#: src/lrz.c:401 src/lsz.c:518
5476*4882a593Smuzhiyun+#: src/lsz.c:518 src/lrz.c:401
5477*4882a593Smuzhiyun msgid "timeout out of range 10..1000"
5478*4882a593Smuzhiyun msgstr ""
5479*4882a593Smuzhiyun
5480*4882a593Smuzhiyun-#: src/lrz.c:417 src/lsz.c:526
5481*4882a593Smuzhiyun+#: src/lsz.c:526 src/lrz.c:417
5482*4882a593Smuzhiyun msgid "security violation: can't do that under restricted shell\n"
5483*4882a593Smuzhiyun msgstr ""
5484*4882a593Smuzhiyun
5485*4882a593Smuzhiyun-#: src/lrz.c:407 src/lsz.c:533
5486*4882a593Smuzhiyun+#: src/lsz.c:533 src/lrz.c:407
5487*4882a593Smuzhiyun msgid "window size"
5488*4882a593Smuzhiyun msgstr ""
5489*4882a593Smuzhiyun
5490*4882a593Smuzhiyun-#: src/lrz.c:432 src/lrz.c:439 src/lsz.c:556 src/lsz.c:563
5491*4882a593Smuzhiyun+#: src/lsz.c:556 src/lsz.c:563 src/lrz.c:432 src/lrz.c:439
5492*4882a593Smuzhiyun msgid "cannot turnoff syslog"
5493*4882a593Smuzhiyun msgstr ""
5494*4882a593Smuzhiyun
5495*4882a593Smuzhiyun-#: src/lrz.c:454 src/lsz.c:571
5496*4882a593Smuzhiyun+#: src/lsz.c:571 src/lrz.c:454
5497*4882a593Smuzhiyun msgid "startup delay"
5498*4882a593Smuzhiyun msgstr ""
5499*4882a593Smuzhiyun
5500*4882a593Smuzhiyun+#: src/lsz.c:583 src/lsz.c:692 src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
5501*4882a593Smuzhiyun #: src/lrz.c:470 src/lrz.c:755 src/lrz.c:1117 src/lrz.c:1243 src/lrz.c:1300
5502*4882a593Smuzhiyun-#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431 src/lsz.c:583 src/lsz.c:692
5503*4882a593Smuzhiyun-#: src/lsz.c:831 src/lsz.c:1080 src/zreadline.c:127
5504*4882a593Smuzhiyun+#: src/lrz.c:1317 src/lrz.c:1332 src/lrz.c:1431
5505*4882a593Smuzhiyun msgid "out of memory"
5506*4882a593Smuzhiyun msgstr ""
5507*4882a593Smuzhiyun
5508*4882a593Smuzhiyun-#: src/lrz.c:480 src/lsz.c:595
5509*4882a593Smuzhiyun+#: src/lsz.c:595 src/lrz.c:480
5510*4882a593Smuzhiyun msgid "this program was never intended to be used setuid\n"
5511*4882a593Smuzhiyun msgstr ""
5512*4882a593Smuzhiyun
5513*4882a593Smuzhiyun@@ -120,14 +123,15 @@ msgid "need at least one file to send"
5514*4882a593Smuzhiyun msgstr ""
5515*4882a593Smuzhiyun
5516*4882a593Smuzhiyun #: src/lsz.c:628
5517*4882a593Smuzhiyun+#, c-format
5518*4882a593Smuzhiyun msgid "Can't send command in restricted mode\n"
5519*4882a593Smuzhiyun msgstr ""
5520*4882a593Smuzhiyun
5521*4882a593Smuzhiyun-#: src/lrz.c:524 src/lsz.c:655
5522*4882a593Smuzhiyun+#: src/lsz.c:655 src/lrz.c:524
5523*4882a593Smuzhiyun msgid "hostname too long\n"
5524*4882a593Smuzhiyun msgstr ""
5525*4882a593Smuzhiyun
5526*4882a593Smuzhiyun-#: src/lrz.c:539 src/lsz.c:670
5527*4882a593Smuzhiyun+#: src/lsz.c:670 src/lrz.c:539
5528*4882a593Smuzhiyun msgid "illegal server address\n"
5529*4882a593Smuzhiyun msgstr ""
5530*4882a593Smuzhiyun
5531*4882a593Smuzhiyun@@ -135,11 +139,11 @@ msgstr ""
5532*4882a593Smuzhiyun msgid "can read only one file from stdin"
5533*4882a593Smuzhiyun msgstr ""
5534*4882a593Smuzhiyun
5535*4882a593Smuzhiyun-#: src/lrz.c:571 src/lsz.c:806
5536*4882a593Smuzhiyun+#: src/lsz.c:806 src/lrz.c:571
5537*4882a593Smuzhiyun msgid "Transfer incomplete\n"
5538*4882a593Smuzhiyun msgstr ""
5539*4882a593Smuzhiyun
5540*4882a593Smuzhiyun-#: src/lrz.c:573 src/lsz.c:808
5541*4882a593Smuzhiyun+#: src/lsz.c:808 src/lrz.c:573
5542*4882a593Smuzhiyun msgid "Transfer complete\n"
5543*4882a593Smuzhiyun msgstr ""
5544*4882a593Smuzhiyun
5545*4882a593Smuzhiyun@@ -199,7 +203,7 @@ msgstr ""
5546*4882a593Smuzhiyun msgid "security violation: not allowed to upload from %s"
5547*4882a593Smuzhiyun msgstr ""
5548*4882a593Smuzhiyun
5549*4882a593Smuzhiyun-#: src/lrz.c:1392 src/lsz.c:1046
5550*4882a593Smuzhiyun+#: src/lsz.c:1046 src/lrz.c:1392
5551*4882a593Smuzhiyun #, c-format
5552*4882a593Smuzhiyun msgid "cannot open %s"
5553*4882a593Smuzhiyun msgstr ""
5554*4882a593Smuzhiyun@@ -290,12 +294,12 @@ msgstr ""
5555*4882a593Smuzhiyun msgid "Retry Count Exceeded"
5556*4882a593Smuzhiyun msgstr ""
5557*4882a593Smuzhiyun
5558*4882a593Smuzhiyun-#: src/lrz.c:593 src/lsz.c:1521
5559*4882a593Smuzhiyun+#: src/lsz.c:1521 src/lrz.c:593
5560*4882a593Smuzhiyun #, c-format
5561*4882a593Smuzhiyun msgid "Try `%s --help' for more information.\n"
5562*4882a593Smuzhiyun msgstr ""
5563*4882a593Smuzhiyun
5564*4882a593Smuzhiyun-#: src/lrz.c:598 src/lsz.c:1526
5565*4882a593Smuzhiyun+#: src/lsz.c:1526 src/lrz.c:598
5566*4882a593Smuzhiyun #, c-format
5567*4882a593Smuzhiyun msgid "%s version %s\n"
5568*4882a593Smuzhiyun msgstr ""
5569*4882a593Smuzhiyun@@ -314,7 +318,7 @@ msgstr ""
5570*4882a593Smuzhiyun msgid "Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n"
5571*4882a593Smuzhiyun msgstr ""
5572*4882a593Smuzhiyun
5573*4882a593Smuzhiyun-#: src/lrz.c:604 src/lsz.c:1534
5574*4882a593Smuzhiyun+#: src/lsz.c:1534 src/lrz.c:604
5575*4882a593Smuzhiyun msgid ""
5576*4882a593Smuzhiyun "    (X) = option applies to XMODEM only\n"
5577*4882a593Smuzhiyun "    (Y) = option applies to YMODEM only\n"
5578*4882a593Smuzhiyun@@ -378,7 +382,7 @@ msgstr ""
5579*4882a593Smuzhiyun msgid "got ZRQINIT"
5580*4882a593Smuzhiyun msgstr ""
5581*4882a593Smuzhiyun
5582*4882a593Smuzhiyun-#: src/lrz.c:1074 src/lrz.c:1787 src/lsz.c:1792
5583*4882a593Smuzhiyun+#: src/lsz.c:1792 src/lrz.c:1074 src/lrz.c:1787
5584*4882a593Smuzhiyun msgid "got ZCAN"
5585*4882a593Smuzhiyun msgstr ""
5586*4882a593Smuzhiyun
5587*4882a593Smuzhiyun@@ -438,6 +442,10 @@ msgid ""
5588*4882a593Smuzhiyun "countem: Total %d %ld\n"
5589*4882a593Smuzhiyun msgstr ""
5590*4882a593Smuzhiyun
5591*4882a593Smuzhiyun+#: src/zm.c:91
5592*4882a593Smuzhiyun+msgid "Bad CRC"
5593*4882a593Smuzhiyun+msgstr ""
5594*4882a593Smuzhiyun+
5595*4882a593Smuzhiyun #: src/zm.c:244
5596*4882a593Smuzhiyun #, c-format
5597*4882a593Smuzhiyun msgid "Bad escape sequence %x"
5598*4882a593Smuzhiyun@@ -447,7 +455,7 @@ msgstr ""
5599*4882a593Smuzhiyun msgid "Sender Canceled"
5600*4882a593Smuzhiyun msgstr ""
5601*4882a593Smuzhiyun
5602*4882a593Smuzhiyun-#: src/lrz.c:997 src/zm.c:585 src/zm.c:644
5603*4882a593Smuzhiyun+#: src/zm.c:585 src/zm.c:644 src/lrz.c:997
5604*4882a593Smuzhiyun msgid "TIMEOUT"
5605*4882a593Smuzhiyun msgstr ""
5606*4882a593Smuzhiyun
5607*4882a593Smuzhiyun@@ -678,13 +686,11 @@ msgstr ""
5608*4882a593Smuzhiyun msgid "Skipped"
5609*4882a593Smuzhiyun msgstr ""
5610*4882a593Smuzhiyun
5611*4882a593Smuzhiyun-#. too bad
5612*4882a593Smuzhiyun #: src/lrz.c:2064
5613*4882a593Smuzhiyun #, c-format
5614*4882a593Smuzhiyun msgid "rzfile: bps rate %ld below min %ld"
5615*4882a593Smuzhiyun msgstr ""
5616*4882a593Smuzhiyun
5617*4882a593Smuzhiyun-#. too bad
5618*4882a593Smuzhiyun #: src/lrz.c:2079
5619*4882a593Smuzhiyun msgid "rzfile: reached stop time"
5620*4882a593Smuzhiyun msgstr ""
5621*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/Makevars lrzsz-0.12.20/po/Makevars
5622*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/Makevars	1970-01-01 01:00:00.000000000 +0100
5623*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/Makevars	2019-11-25 18:09:52.000000000 +0000
5624*4882a593Smuzhiyun@@ -0,0 +1,78 @@
5625*4882a593Smuzhiyun+# Makefile variables for PO directory in any package using GNU gettext.
5626*4882a593Smuzhiyun+
5627*4882a593Smuzhiyun+# Usually the message domain is the same as the package name.
5628*4882a593Smuzhiyun+DOMAIN = $(PACKAGE)
5629*4882a593Smuzhiyun+
5630*4882a593Smuzhiyun+# These two variables depend on the location of this directory.
5631*4882a593Smuzhiyun+subdir = po
5632*4882a593Smuzhiyun+top_builddir = ..
5633*4882a593Smuzhiyun+
5634*4882a593Smuzhiyun+# These options get passed to xgettext.
5635*4882a593Smuzhiyun+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
5636*4882a593Smuzhiyun+
5637*4882a593Smuzhiyun+# This is the copyright holder that gets inserted into the header of the
5638*4882a593Smuzhiyun+# $(DOMAIN).pot file.  Set this to the copyright holder of the surrounding
5639*4882a593Smuzhiyun+# package.  (Note that the msgstr strings, extracted from the package's
5640*4882a593Smuzhiyun+# sources, belong to the copyright holder of the package.)  Translators are
5641*4882a593Smuzhiyun+# expected to transfer the copyright for their translations to this person
5642*4882a593Smuzhiyun+# or entity, or to disclaim their copyright.  The empty string stands for
5643*4882a593Smuzhiyun+# the public domain; in this case the translators are expected to disclaim
5644*4882a593Smuzhiyun+# their copyright.
5645*4882a593Smuzhiyun+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
5646*4882a593Smuzhiyun+
5647*4882a593Smuzhiyun+# This tells whether or not to prepend "GNU " prefix to the package
5648*4882a593Smuzhiyun+# name that gets inserted into the header of the $(DOMAIN).pot file.
5649*4882a593Smuzhiyun+# Possible values are "yes", "no", or empty.  If it is empty, try to
5650*4882a593Smuzhiyun+# detect it automatically by scanning the files in $(top_srcdir) for
5651*4882a593Smuzhiyun+# "GNU packagename" string.
5652*4882a593Smuzhiyun+PACKAGE_GNU =
5653*4882a593Smuzhiyun+
5654*4882a593Smuzhiyun+# This is the email address or URL to which the translators shall report
5655*4882a593Smuzhiyun+# bugs in the untranslated strings:
5656*4882a593Smuzhiyun+# - Strings which are not entire sentences, see the maintainer guidelines
5657*4882a593Smuzhiyun+#   in the GNU gettext documentation, section 'Preparing Strings'.
5658*4882a593Smuzhiyun+# - Strings which use unclear terms or require additional context to be
5659*4882a593Smuzhiyun+#   understood.
5660*4882a593Smuzhiyun+# - Strings which make invalid assumptions about notation of date, time or
5661*4882a593Smuzhiyun+#   money.
5662*4882a593Smuzhiyun+# - Pluralisation problems.
5663*4882a593Smuzhiyun+# - Incorrect English spelling.
5664*4882a593Smuzhiyun+# - Incorrect formatting.
5665*4882a593Smuzhiyun+# It can be your email address, or a mailing list address where translators
5666*4882a593Smuzhiyun+# can write to without being subscribed, or the URL of a web page through
5667*4882a593Smuzhiyun+# which the translators can contact you.
5668*4882a593Smuzhiyun+MSGID_BUGS_ADDRESS =
5669*4882a593Smuzhiyun+
5670*4882a593Smuzhiyun+# This is the list of locale categories, beyond LC_MESSAGES, for which the
5671*4882a593Smuzhiyun+# message catalogs shall be used.  It is usually empty.
5672*4882a593Smuzhiyun+EXTRA_LOCALE_CATEGORIES =
5673*4882a593Smuzhiyun+
5674*4882a593Smuzhiyun+# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
5675*4882a593Smuzhiyun+# context.  Possible values are "yes" and "no".  Set this to yes if the
5676*4882a593Smuzhiyun+# package uses functions taking also a message context, like pgettext(), or
5677*4882a593Smuzhiyun+# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
5678*4882a593Smuzhiyun+USE_MSGCTXT = no
5679*4882a593Smuzhiyun+
5680*4882a593Smuzhiyun+# These options get passed to msgmerge.
5681*4882a593Smuzhiyun+# Useful options are in particular:
5682*4882a593Smuzhiyun+#   --previous            to keep previous msgids of translated messages,
5683*4882a593Smuzhiyun+#   --quiet               to reduce the verbosity.
5684*4882a593Smuzhiyun+MSGMERGE_OPTIONS =
5685*4882a593Smuzhiyun+
5686*4882a593Smuzhiyun+# These options get passed to msginit.
5687*4882a593Smuzhiyun+# If you want to disable line wrapping when writing PO files, add
5688*4882a593Smuzhiyun+# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
5689*4882a593Smuzhiyun+# MSGINIT_OPTIONS.
5690*4882a593Smuzhiyun+MSGINIT_OPTIONS =
5691*4882a593Smuzhiyun+
5692*4882a593Smuzhiyun+# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
5693*4882a593Smuzhiyun+# has changed.  Possible values are "yes" and "no".  Set this to no if
5694*4882a593Smuzhiyun+# the POT file is checked in the repository and the version control
5695*4882a593Smuzhiyun+# program ignores timestamps.
5696*4882a593Smuzhiyun+PO_DEPENDS_ON_POT = yes
5697*4882a593Smuzhiyun+
5698*4882a593Smuzhiyun+# This tells whether or not to forcibly update $(DOMAIN).pot and
5699*4882a593Smuzhiyun+# regenerate PO files on "make dist".  Possible values are "yes" and
5700*4882a593Smuzhiyun+# "no".  Set this to no if the POT file and PO files are maintained
5701*4882a593Smuzhiyun+# externally.
5702*4882a593Smuzhiyun+DIST_DEPENDS_ON_UPDATE_PO = yes
5703*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/stamp-cat-id lrzsz-0.12.20/po/stamp-cat-id
5704*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/stamp-cat-id	1998-12-30 07:50:01.000000000 +0000
5705*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/stamp-cat-id	1970-01-01 01:00:00.000000000 +0100
5706*4882a593Smuzhiyun@@ -1 +0,0 @@
5707*4882a593Smuzhiyun-timestamp
5708*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/po/stamp-po lrzsz-0.12.20/po/stamp-po
5709*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/po/stamp-po	1970-01-01 01:00:00.000000000 +0100
5710*4882a593Smuzhiyun+++ lrzsz-0.12.20/po/stamp-po	2019-11-26 11:42:09.000000000 +0000
5711*4882a593Smuzhiyun@@ -0,0 +1 @@
5712*4882a593Smuzhiyun+timestamp
5713*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/src/Makefile.am lrzsz-0.12.20/src/Makefile.am
5714*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/src/Makefile.am	1998-12-28 08:38:47.000000000 +0000
5715*4882a593Smuzhiyun+++ lrzsz-0.12.20/src/Makefile.am	2019-11-25 16:22:49.000000000 +0000
5716*4882a593Smuzhiyun@@ -2,13 +2,11 @@ bin_PROGRAMS=lrz lsz
5717*4882a593Smuzhiyun lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
5718*4882a593Smuzhiyun lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
5719*4882a593Smuzhiyun noinst_HEADERS = timing.h zglobal.h zmodem.h
5720*4882a593Smuzhiyun-datadir = $(prefix)/@DATADIRNAME@
5721*4882a593Smuzhiyun+datadir = $(prefix)/share
5722*4882a593Smuzhiyun localedir = $(datadir)/locale
5723*4882a593Smuzhiyun-CFLAGS=@CFLAGS@
5724*4882a593Smuzhiyun DISTCLEAN_FILES=lrzszbug
5725*4882a593Smuzhiyun
5726*4882a593Smuzhiyun-LDADD = ../lib/libzmodem.a @INTLLIBS@
5727*4882a593Smuzhiyun-AUTOMAKE_OPTIONS=ansi2knr
5728*4882a593Smuzhiyun+LDADD = ../lib/libzmodem.a @LIBINTL@
5729*4882a593Smuzhiyun EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
5730*4882a593Smuzhiyun INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
5731*4882a593Smuzhiyun #DEFS = -DLOCALEDIR=\"$(localedir)\" -DOS=\"@host_os@\" -DCPU=\"@host_cpu@\"
5732*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/src/zglobal.h lrzsz-0.12.20/src/zglobal.h
5733*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/src/zglobal.h	1998-12-29 12:34:59.000000000 +0000
5734*4882a593Smuzhiyun+++ lrzsz-0.12.20/src/zglobal.h	2019-11-25 16:32:42.000000000 +0000
5735*4882a593Smuzhiyun@@ -180,9 +180,6 @@ struct termios;
5736*4882a593Smuzhiyun #if HAVE_LOCALE_H
5737*4882a593Smuzhiyun # include <locale.h>
5738*4882a593Smuzhiyun #endif
5739*4882a593Smuzhiyun-#if !HAVE_SETLOCALE
5740*4882a593Smuzhiyun-# define setlocale(Category, Locale) /* empty */
5741*4882a593Smuzhiyun-#endif
5742*4882a593Smuzhiyun
5743*4882a593Smuzhiyun #if ENABLE_NLS
5744*4882a593Smuzhiyun # include <libintl.h>
5745*4882a593Smuzhiyundiff -uprN clean/lrzsz-0.12.20/stamp-h.in lrzsz-0.12.20/stamp-h.in
5746*4882a593Smuzhiyun--- clean/lrzsz-0.12.20/stamp-h.in	1998-12-30 07:51:07.000000000 +0000
5747*4882a593Smuzhiyun+++ lrzsz-0.12.20/stamp-h.in	1970-01-01 01:00:00.000000000 +0100
5748*4882a593Smuzhiyun@@ -1 +0,0 @@
5749*4882a593Smuzhiyun-timestamp
5750