blob: 1a24a1f05e76d3a2820af738acba6b6431a79adc [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001Upstream-Status: Inappropriate [configuration]
2
3--- lrzsz-0.12.20.safe/ABOUT-NLS 1998-04-26 09:22:30.000000000 -0400
4+++ lrzsz-0.12.20/ABOUT-NLS 2004-09-12 14:40:34.323752952 -0400
5@@ -1,14 +1,14 @@
6 Notes on the Free Translation Project
7 *************************************
8
9- Free software is going international! The Free Translation Project
10-is a way to get maintainers of free software, translators, and users all
11+Free software is going international! The Free Translation Project is
12+a way to get maintainers of free software, translators, and users all
13 together, so that will gradually become able to speak many languages.
14 A few packages already provide translations for their messages.
15
16 If you found this `ABOUT-NLS' file inside a distribution, you may
17 assume that the distributed package does use GNU `gettext' internally,
18-itself available at your nearest GNU archive site. But you do *not*
19+itself available at your nearest GNU archive site. But you do _not_
20 need to install GNU `gettext' prior to configuring, installing or using
21 this package with messages translated.
22
23@@ -22,10 +22,10 @@
24 `gettext' which is used. The information can be found in the
25 `intl/VERSION' file, in internationalized packages.
26
27-One advise in advance
28-=====================
29+Quick configuration advice
30+==========================
31
32- If you want to exploit the full power of internationalization, you
33+If you want to exploit the full power of internationalization, you
34 should configure it using
35
36 ./configure --with-included-gettext
37@@ -34,42 +34,40 @@
38 package, despite the existence of internationalizing capabilities in the
39 operating system where this package is being installed. So far, only
40 the `gettext' implementation in the GNU C library version 2 provides as
41-many features (such as locale alias or message inheritance) as the
42-implementation here. It is also not possible to offer this additional
43-functionality on top of a `catgets' implementation. Future versions of
44-GNU `gettext' will very likely convey even more functionality. So it
45-might be a good idea to change to GNU `gettext' as soon as possible.
46+many features (such as locale alias, message inheritance, automatic
47+charset conversion or plural form handling) as the implementation here.
48+It is also not possible to offer this additional functionality on top
49+of a `catgets' implementation. Future versions of GNU `gettext' will
50+very likely convey even more functionality. So it might be a good idea
51+to change to GNU `gettext' as soon as possible.
52
53- So you need not provide this option if you are using GNU libc 2 or
54+ So you need _not_ provide this option if you are using GNU libc 2 or
55 you have installed a recent copy of the GNU gettext package with the
56 included `libintl'.
57
58 INSTALL Matters
59 ===============
60
61- Some packages are "localizable" when properly installed; the
62-programs they contain can be made to speak your own native language.
63-Most such packages use GNU `gettext'. Other packages have their own
64-ways to internationalization, predating GNU `gettext'.
65+Some packages are "localizable" when properly installed; the programs
66+they contain can be made to speak your own native language. Most such
67+packages use GNU `gettext'. Other packages have their own ways to
68+internationalization, predating GNU `gettext'.
69
70 By default, this package will be installed to allow translation of
71-messages. It will automatically detect whether the system provides
72-usable `catgets' (if using this is selected by the installer) or
73-`gettext' functions. If neither is available, the GNU `gettext' own
74+messages. It will automatically detect whether the system already
75+provides the GNU `gettext' functions. If not, the GNU `gettext' own
76 library will be used. This library is wholly contained within this
77 package, usually in the `intl/' subdirectory, so prior installation of
78-the GNU `gettext' package is *not* required. Installers may use
79+the GNU `gettext' package is _not_ required. Installers may use
80 special options at configuration time for changing the default
81 behaviour. The commands:
82
83 ./configure --with-included-gettext
84- ./configure --with-catgets
85 ./configure --disable-nls
86
87-will respectively bypass any pre-existing `catgets' or `gettext' to use
88-the internationalizing routines provided within this package, enable
89-the use of the `catgets' functions (if found on the locale system), or
90-else, *totally* disable translation of messages.
91+will respectively bypass any pre-existing `gettext' to use the
92+internationalizing routines provided within this package, or else,
93+_totally_ disable translation of messages.
94
95 When you already have GNU `gettext' installed on your system and run
96 configure without an option for your new package, `configure' will
97@@ -83,18 +81,10 @@
98
99 to prevent auto-detection.
100
101- By default the configuration process will not test for the `catgets'
102-function and therefore they will not be used. The reasons are already
103-given above: the emulation on top of `catgets' cannot provide all the
104-extensions provided by the GNU `gettext' library. If you nevertheless
105-want to use the `catgets' functions use
106-
107- ./configure --with-catgets
108-
109-to enable the test for `catgets' (this causes no harm if `catgets' is
110-not available on your system). If you really select this option we
111-would like to hear about the reasons because we cannot think of any
112-good one ourself.
113+ The configuration process will not test for the `catgets' function
114+and therefore it will not be used. The reason is that even an
115+emulation of `gettext' on top of `catgets' could not provide all the
116+extensions of the GNU `gettext' library.
117
118 Internationalized packages have usually many `po/LL.po' files, where
119 LL gives an ISO 639 two-letter code identifying the language. Unless
120@@ -108,57 +98,73 @@
121 Using This Package
122 ==================
123
124- As a user, if your language has been installed for this package, you
125+As a user, if your language has been installed for this package, you
126 only have to set the `LANG' environment variable to the appropriate
127-ISO 639 `LL' two-letter code prior to using the programs in the
128-package. For example, let's suppose that you speak German. At the
129-shell prompt, merely execute `setenv LANG de' (in `csh'),
130-`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
131-can be done from your `.login' or `.profile' file, once and for all.
132+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
133+and `CC' is an ISO 3166 two-letter country code. For example, let's
134+suppose that you speak German and live in Germany. At the shell
135+prompt, merely execute `setenv LANG de_DE' (in `csh'),
136+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
137+This can be done from your `.login' or `.profile' file, once and for
138+all.
139
140- An operating system might already offer message localization for
141-many of its programs, while other programs have been installed locally
142-with the full capabilities of GNU `gettext'. Just using `gettext'
143-extended syntax for `LANG' would break proper localization of already
144-available operating system programs. In this case, users should set
145-both `LANGUAGE' and `LANG' variables in their environment, as programs
146-using GNU `gettext' give preference to `LANGUAGE'. For example, some
147-Swedish users would rather read translations in German than English for
148-when Swedish is not available. This is easily accomplished by setting
149-`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
150+ You might think that the country code specification is redundant.
151+But in fact, some languages have dialects in different countries. For
152+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
153+country code serves to distinguish the dialects.
154+
155+ The locale naming convention of `LL_CC', with `LL' denoting the
156+language and `CC' denoting the country, is the one use on systems based
157+on GNU libc. On other systems, some variations of this scheme are
158+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
159+locales supported by your system for your country by running the command
160+`locale -a | grep '^LL''.
161+
162+ Not all programs have translations for all languages. By default, an
163+English message is shown in place of a nonexistent translation. If you
164+understand other languages, you can set up a priority list of languages.
165+This is done through a different environment variable, called
166+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
167+for the purpose of message handling, but you still need to have `LANG'
168+set to the primary language; this is required by other parts of the
169+system libraries. For example, some Swedish users who would rather
170+read translations in German than English for when Swedish is not
171+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
172+
173+ Special advice for Norwegian users: The language code for Norwegian
174+bokma*l changed from `no' to `nb' recently (in 2003). During the
175+transition period, while some message catalogs for this language are
176+installed under `nb' and some older ones under `no', it's recommended
177+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
178+older translations are used.
179+
180+ In the `LANGUAGE' environment variable, but not in the `LANG'
181+environment variable, `LL_CC' combinations can be abbreviated as `LL'
182+to denote the language's main dialect. For example, `de' is equivalent
183+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
184+(Portuguese as spoken in Portugal) in this context.
185
186 Translating Teams
187 =================
188
189- For the Free Translation Project to be a success, we need interested
190+For the Free Translation Project to be a success, we need interested
191 people who like their own language and write it well, and who are also
192 able to synergize with other translators speaking the same language.
193-Each translation team has its own mailing list, courtesy of Linux
194-International. You may reach your translation team at the address
195-`LL@li.org', replacing LL by the two-letter ISO 639 code for your
196-language. Language codes are *not* the same as the country codes given
197-in ISO 3166. The following translation teams exist, as of August 1997:
198-
199- Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
200- Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
201- `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
202- Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
203- `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
204- Swedish `sv', and Turkish `tr'.
205-
206-For example, you may reach the Chinese translation team by writing to
207-`zh@li.org'.
208+Each translation team has its own mailing list. The up-to-date list of
209+teams can be found at the Free Translation Project's homepage,
210+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
211+area.
212
213- If you'd like to volunteer to *work* at translating messages, you
214+ If you'd like to volunteer to _work_ at translating messages, you
215 should become a member of the translating team for your own language.
216-The subscribing address is *not* the same as the list itself, it has
217+The subscribing address is _not_ the same as the list itself, it has
218 `-request' appended. For example, speakers of Swedish can send a
219 message to `sv-request@li.org', having this message body:
220
221 subscribe
222
223 Keep in mind that team members are expected to participate
224-*actively* in translations, or at solving translational difficulties,
225+_actively_ in translations, or at solving translational difficulties,
226 rather than merely lurking around. If your team does not exist yet and
227 you want to start one, or if you are unsure about what to do or how to
228 get started, please write to `translation@iro.umontreal.ca' to reach the
229@@ -171,43 +177,559 @@
230 Available Packages
231 ==================
232
233- Languages are not equally supported in all packages. The following
234-matrix shows the current state of internationalization, as of August
235-1997. The matrix shows, in regard of each package, for which languages
236-PO files have been submitted to translation coordination.
237+Languages are not equally supported in all packages. The following
238+matrix shows the current state of internationalization, as of January
239+2004. The matrix shows, in regard of each package, for which languages
240+PO files have been submitted to translation coordination, with a
241+translation percentage of at least 50%.
242
243- Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
244- .-------------------------------------------------.
245- bash | [] [] [] | 3
246- bison | [] [] [] | 3
247- clisp | [] [] [] [] | 4
248- cpio | [] [] [] [] [] | 5
249- diffutils | [] [] [] [] [] | 5
250- enscript | [] [] [] [] [] [] | 6
251- fileutils | [] [] [] [] [] [] [] [] [] [] | 10
252- findutils | [] [] [] [] [] [] [] [] | 8
253- flex | [] [] [] [] | 4
254- gcal | [] [] [] [] [] | 5
255- gettext | [] [] [] [] [] [] [] [] [] [] | 11
256- grep | [] [] [] [] [] [] [] [] [] | 9
257- hello | [] [] [] [] [] [] [] [] [] [] | 10
258- id-utils | [] [] [] | 3
259- indent | [] [] [] [] | 4
260- libc | [] [] [] [] [] [] [] | 7
261- m4 | [] [] [] [] [] | 5
262- make | [] [] [] [] [] [] | 6
263- music | [] [] | 2
264- ptx | [] [] [] [] [] [] [] [] | 8
265- recode | [] [] [] [] [] [] [] [] [] | 9
266- sh-utils | [] [] [] [] [] [] [] | 7
267- sharutils | [] [] [] [] [] | 5
268- tar | [] [] [] [] [] [] [] [] [] [] | 10
269- texinfo | [] | 1
270- textutils | [] [] [] [] [] [] [] [] [] | 9
271- wdiff | [] [] [] [] [] [] [] [] | 8
272- `-------------------------------------------------'
273- 16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
274- 27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
275+ Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
276+ +----------------------------------------------------+
277+ a2ps | [] [] [] [] |
278+ aegis | () |
279+ ant-phone | () |
280+ anubis | |
281+ ap-utils | |
282+ aspell | [] |
283+ bash | [] [] [] [] |
284+ batchelor | |
285+ bfd | [] [] |
286+ binutils | [] [] |
287+ bison | [] [] [] |
288+ bluez-pin | [] [] [] |
289+ clisp | |
290+ clisp | [] [] [] |
291+ console-tools | [] [] |
292+ coreutils | [] [] [] [] |
293+ cpio | [] [] [] |
294+ darkstat | [] () [] |
295+ diffutils | [] [] [] [] [] [] [] |
296+ e2fsprogs | [] [] [] |
297+ enscript | [] [] [] [] |
298+ error | [] [] [] [] [] |
299+ fetchmail | [] () [] [] [] [] |
300+ fileutils | [] [] [] |
301+ findutils | [] [] [] [] [] [] [] |
302+ flex | [] [] [] [] |
303+ fslint | |
304+ gas | [] |
305+ gawk | [] [] [] [] |
306+ gbiff | [] |
307+ gcal | [] |
308+ gcc | [] [] |
309+ gettext | [] [] [] [] [] |
310+ gettext-examples | [] [] [] [] |
311+ gettext-runtime | [] [] [] [] [] |
312+ gettext-tools | [] [] [] |
313+ gimp-print | [] [] [] [] [] |
314+ gliv | |
315+ glunarclock | [] [] |
316+ gnubiff | [] |
317+ gnucash | [] () [] [] |
318+ gnucash-glossary | [] () [] |
319+ gnupg | [] () [] [] [] [] |
320+ gpe-aerial | [] |
321+ gpe-beam | [] [] |
322+ gpe-calendar | [] [] |
323+ gpe-clock | [] [] |
324+ gpe-conf | [] [] |
325+ gpe-contacts | [] [] |
326+ gpe-edit | [] |
327+ gpe-go | [] |
328+ gpe-login | [] [] |
329+ gpe-ownerinfo | [] [] |
330+ gpe-sketchbook | [] [] |
331+ gpe-su | [] [] |
332+ gpe-taskmanager | [] [] |
333+ gpe-timesheet | [] |
334+ gpe-today | [] [] |
335+ gpe-todo | [] [] |
336+ gphoto2 | [] [] [] [] |
337+ gprof | [] [] [] |
338+ gpsdrive | () () () |
339+ gramadoir | [] |
340+ grep | [] [] [] [] [] [] |
341+ gretl | [] |
342+ gtick | [] () |
343+ hello | [] [] [] [] [] [] |
344+ id-utils | [] [] |
345+ indent | [] [] [] [] |
346+ iso_3166 | [] [] [] [] [] [] [] [] [] [] |
347+ iso_3166_1 | [] [] [] [] [] [] |
348+ iso_3166_2 | |
349+ iso_3166_3 | [] |
350+ iso_4217 | [] [] [] [] |
351+ iso_639 | |
352+ jpilot | [] [] [] |
353+ jtag | |
354+ jwhois | [] |
355+ kbd | [] [] [] [] [] |
356+ latrine | () |
357+ ld | [] [] |
358+ libc | [] [] [] [] [] [] |
359+ libgpewidget | [] [] |
360+ libiconv | [] [] [] [] [] |
361+ lifelines | [] () |
362+ lilypond | [] |
363+ lingoteach | |
364+ lingoteach_lessons | () () |
365+ lynx | [] [] [] [] |
366+ m4 | [] [] [] [] |
367+ mailutils | [] [] |
368+ make | [] [] [] |
369+ man-db | [] () [] [] () |
370+ minicom | [] [] [] |
371+ mysecretdiary | [] [] [] |
372+ nano | [] () [] [] [] |
373+ nano_1_0 | [] () [] [] [] |
374+ opcodes | [] |
375+ parted | [] [] [] [] [] |
376+ ptx | [] [] [] [] [] |
377+ python | |
378+ radius | [] |
379+ recode | [] [] [] [] [] [] [] |
380+ rpm | [] [] |
381+ screem | |
382+ scrollkeeper | [] [] [] [] [] [] |
383+ sed | [] [] [] [] [] [] |
384+ sh-utils | [] [] [] |
385+ shared-mime-info | |
386+ sharutils | [] [] [] [] [] [] |
387+ silky | () |
388+ skencil | [] () [] |
389+ sketch | [] () [] |
390+ soundtracker | [] [] [] |
391+ sp | [] |
392+ tar | [] [] [] [] |
393+ texinfo | [] [] [] |
394+ textutils | [] [] [] [] |
395+ tin | () () |
396+ tp-robot | |
397+ tuxpaint | [] [] [] [] [] [] [] |
398+ unicode-han-tra... | |
399+ unicode-transla... | |
400+ util-linux | [] [] [] [] [] |
401+ vorbis-tools | [] [] [] [] |
402+ wastesedge | () |
403+ wdiff | [] [] [] [] |
404+ wget | [] [] [] [] [] [] |
405+ xchat | [] [] [] [] |
406+ xfree86_xkb_xml | [] [] |
407+ xpad | [] |
408+ +----------------------------------------------------+
409+ af am ar az be bg bs ca cs da de el en en_GB eo es
410+ 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
411+
412+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
413+ +-------------------------------------------------+
414+ a2ps | [] [] [] () () |
415+ aegis | |
416+ ant-phone | [] |
417+ anubis | [] |
418+ ap-utils | [] |
419+ aspell | [] [] |
420+ bash | [] [] |
421+ batchelor | [] [] |
422+ bfd | [] |
423+ binutils | [] [] |
424+ bison | [] [] [] [] |
425+ bluez-pin | [] [] [] [] [] |
426+ clisp | |
427+ clisp | [] |
428+ console-tools | |
429+ coreutils | [] [] [] [] [] [] |
430+ cpio | [] [] [] [] |
431+ darkstat | () [] [] [] |
432+ diffutils | [] [] [] [] [] [] [] |
433+ e2fsprogs | |
434+ enscript | [] [] |
435+ error | [] [] [] [] |
436+ fetchmail | [] |
437+ fileutils | [] [] [] [] [] [] |
438+ findutils | [] [] [] [] [] [] [] [] [] [] [] |
439+ flex | [] [] [] |
440+ fslint | [] |
441+ gas | [] |
442+ gawk | [] [] [] |
443+ gbiff | [] |
444+ gcal | [] |
445+ gcc | [] |
446+ gettext | [] [] [] |
447+ gettext-examples | [] [] |
448+ gettext-runtime | [] [] [] [] [] |
449+ gettext-tools | [] [] [] |
450+ gimp-print | [] [] |
451+ gliv | () |
452+ glunarclock | [] [] [] [] |
453+ gnubiff | [] |
454+ gnucash | () [] |
455+ gnucash-glossary | [] |
456+ gnupg | [] [] [] [] [] [] [] |
457+ gpe-aerial | [] |
458+ gpe-beam | [] |
459+ gpe-calendar | [] [] [] |
460+ gpe-clock | [] |
461+ gpe-conf | [] |
462+ gpe-contacts | [] [] |
463+ gpe-edit | [] [] |
464+ gpe-go | [] |
465+ gpe-login | [] [] |
466+ gpe-ownerinfo | [] [] [] |
467+ gpe-sketchbook | [] |
468+ gpe-su | [] |
469+ gpe-taskmanager | [] |
470+ gpe-timesheet | [] [] [] |
471+ gpe-today | [] [] |
472+ gpe-todo | [] [] |
473+ gphoto2 | [] [] [] |
474+ gprof | [] [] |
475+ gpsdrive | () () () |
476+ gramadoir | [] [] |
477+ grep | [] [] [] [] [] [] [] [] [] [] [] |
478+ gretl | [] [] |
479+ gtick | [] [] [] |
480+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
481+ id-utils | [] [] [] [] |
482+ indent | [] [] [] [] [] [] [] [] [] |
483+ iso_3166 | [] [] [] [] [] [] [] |
484+ iso_3166_1 | [] [] [] [] [] |
485+ iso_3166_2 | |
486+ iso_3166_3 | |
487+ iso_4217 | [] [] [] [] [] [] |
488+ iso_639 | |
489+ jpilot | [] () |
490+ jtag | [] |
491+ jwhois | [] [] [] [] |
492+ kbd | [] |
493+ latrine | [] |
494+ ld | [] |
495+ libc | [] [] [] [] [] [] |
496+ libgpewidget | [] [] [] [] |
497+ libiconv | [] [] [] [] [] [] [] [] [] |
498+ lifelines | () |
499+ lilypond | [] |
500+ lingoteach | [] [] |
501+ lingoteach_lessons | |
502+ lynx | [] [] [] [] |
503+ m4 | [] [] [] [] |
504+ mailutils | |
505+ make | [] [] [] [] [] [] |
506+ man-db | () () |
507+ minicom | [] [] [] [] |
508+ mysecretdiary | [] [] |
509+ nano | [] [] [] [] |
510+ nano_1_0 | [] [] [] [] |
511+ opcodes | [] |
512+ parted | [] [] [] |
513+ ptx | [] [] [] [] [] [] [] |
514+ python | |
515+ radius | [] |
516+ recode | [] [] [] [] [] [] |
517+ rpm | [] [] |
518+ screem | |
519+ scrollkeeper | [] |
520+ sed | [] [] [] [] [] [] [] [] [] |
521+ sh-utils | [] [] [] [] [] [] [] |
522+ shared-mime-info | [] [] [] |
523+ sharutils | [] [] [] [] [] |
524+ silky | () [] () () |
525+ skencil | [] |
526+ sketch | [] |
527+ soundtracker | [] [] |
528+ sp | [] () |
529+ tar | [] [] [] [] [] [] [] [] [] |
530+ texinfo | [] [] [] [] |
531+ textutils | [] [] [] [] [] [] |
532+ tin | [] () |
533+ tp-robot | [] |
534+ tuxpaint | [] [] [] [] [] [] [] [] [] |
535+ unicode-han-tra... | |
536+ unicode-transla... | [] [] |
537+ util-linux | [] [] [] [] () [] |
538+ vorbis-tools | [] |
539+ wastesedge | () |
540+ wdiff | [] [] [] [] [] [] |
541+ wget | [] [] [] [] [] [] [] |
542+ xchat | [] [] [] |
543+ xfree86_xkb_xml | [] [] |
544+ xpad | [] [] |
545+ +-------------------------------------------------+
546+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
547+ 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
548+
549+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
550+ +-----------------------------------------------------+
551+ a2ps | [] [] () () [] [] [] |
552+ aegis | () () () |
553+ ant-phone | [] [] |
554+ anubis | [] [] [] [] [] [] |
555+ ap-utils | [] () [] |
556+ aspell | [] |
557+ bash | [] [] [] |
558+ batchelor | [] |
559+ bfd | [] |
560+ binutils | [] |
561+ bison | [] [] [] [] [] |
562+ bluez-pin | [] [] [] |
563+ clisp | |
564+ clisp | [] |
565+ console-tools | [] |
566+ coreutils | [] [] |
567+ cpio | [] [] [] [] [] |
568+ darkstat | [] [] [] [] |
569+ diffutils | [] [] [] [] [] [] |
570+ e2fsprogs | [] |
571+ enscript | [] [] [] [] |
572+ error | [] [] [] |
573+ fetchmail | [] [] () [] |
574+ fileutils | [] [] [] |
575+ findutils | [] [] [] [] [] |
576+ flex | [] [] [] [] |
577+ fslint | [] [] |
578+ gas | |
579+ gawk | [] [] [] |
580+ gbiff | [] [] |
581+ gcal | |
582+ gcc | |
583+ gettext | [] [] [] |
584+ gettext-examples | [] [] [] |
585+ gettext-runtime | [] [] [] [] |
586+ gettext-tools | [] [] |
587+ gimp-print | [] |
588+ gliv | [] [] [] |
589+ glunarclock | [] [] [] [] |
590+ gnubiff | [] |
591+ gnucash | [] [] () [] |
592+ gnucash-glossary | [] [] |
593+ gnupg | [] |
594+ gpe-aerial | [] [] [] [] |
595+ gpe-beam | [] [] [] [] |
596+ gpe-calendar | [] [] [] [] |
597+ gpe-clock | [] [] [] [] |
598+ gpe-conf | [] [] [] [] |
599+ gpe-contacts | [] [] [] [] |
600+ gpe-edit | [] [] [] [] |
601+ gpe-go | [] [] [] |
602+ gpe-login | [] [] [] [] |
603+ gpe-ownerinfo | [] [] [] [] |
604+ gpe-sketchbook | [] [] [] [] |
605+ gpe-su | [] [] [] [] |
606+ gpe-taskmanager | [] [] [] [] |
607+ gpe-timesheet | [] [] [] [] |
608+ gpe-today | [] [] [] [] |
609+ gpe-todo | [] [] [] [] |
610+ gphoto2 | [] |
611+ gprof | [] [] |
612+ gpsdrive | () () [] |
613+ gramadoir | () [] |
614+ grep | [] [] [] [] [] |
615+ gretl | |
616+ gtick | [] [] [] |
617+ hello | [] [] [] [] [] [] [] [] [] [] |
618+ id-utils | [] [] [] [] |
619+ indent | [] [] [] [] |
620+ iso_3166 | [] [] [] |
621+ iso_3166_1 | [] [] |
622+ iso_3166_2 | |
623+ iso_3166_3 | [] |
624+ iso_4217 | [] [] [] [] [] [] [] [] |
625+ iso_639 | [] |
626+ jpilot | () () |
627+ jtag | |
628+ jwhois | [] [] [] [] () |
629+ kbd | [] [] [] |
630+ latrine | [] |
631+ ld | |
632+ libc | [] [] [] [] |
633+ libgpewidget | [] [] [] |
634+ libiconv | [] [] [] [] [] |
635+ lifelines | |
636+ lilypond | |
637+ lingoteach | |
638+ lingoteach_lessons | |
639+ lynx | [] [] [] |
640+ m4 | [] [] [] [] [] |
641+ mailutils | [] [] [] |
642+ make | [] [] [] [] |
643+ man-db | [] |
644+ minicom | [] [] [] [] |
645+ mysecretdiary | [] [] [] |
646+ nano | [] [] [] [] [] |
647+ nano_1_0 | [] [] [] [] [] [] |
648+ opcodes | [] [] |
649+ parted | [] [] [] [] |
650+ ptx | [] [] [] [] [] [] [] [] |
651+ python | |
652+ radius | [] [] |
653+ recode | [] [] [] [] |
654+ rpm | [] [] [] |
655+ screem | |
656+ scrollkeeper | [] [] [] [] [] |
657+ sed | [] [] [] |
658+ sh-utils | [] [] |
659+ shared-mime-info | [] [] |
660+ sharutils | [] [] |
661+ silky | () |
662+ skencil | [] [] |
663+ sketch | [] [] |
664+ soundtracker | |
665+ sp | |
666+ tar | [] [] [] [] [] [] |
667+ texinfo | [] [] [] [] |
668+ textutils | [] [] |
669+ tin | |
670+ tp-robot | [] |
671+ tuxpaint | [] [] [] [] [] [] [] [] |
672+ unicode-han-tra... | |
673+ unicode-transla... | |
674+ util-linux | [] [] [] |
675+ vorbis-tools | [] [] [] |
676+ wastesedge | |
677+ wdiff | [] [] [] [] [] |
678+ wget | [] [] [] |
679+ xchat | [] [] [] |
680+ xfree86_xkb_xml | [] [] |
681+ xpad | [] [] |
682+ +-----------------------------------------------------+
683+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
684+ 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
685+
686+ sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
687+ +-----------------------------------------------------+
688+ a2ps | [] [] [] [] | 16
689+ aegis | | 0
690+ ant-phone | | 3
691+ anubis | [] [] | 9
692+ ap-utils | () | 3
693+ aspell | | 4
694+ bash | | 9
695+ batchelor | | 3
696+ bfd | [] [] | 6
697+ binutils | [] [] [] | 8
698+ bison | [] [] | 14
699+ bluez-pin | [] [] [] | 14
700+ clisp | | 0
701+ clisp | | 5
702+ console-tools | | 3
703+ coreutils | [] [] [] [] | 16
704+ cpio | [] [] | 14
705+ darkstat | [] [] [] () () | 12
706+ diffutils | [] [] [] | 23
707+ e2fsprogs | [] [] | 6
708+ enscript | [] [] | 12
709+ error | [] [] [] | 15
710+ fetchmail | [] [] | 11
711+ fileutils | [] [] [] [] [] | 17
712+ findutils | [] [] [] [] [] [] | 29
713+ flex | [] [] | 13
714+ fslint | | 3
715+ gas | [] | 3
716+ gawk | [] [] | 12
717+ gbiff | | 4
718+ gcal | [] [] | 4
719+ gcc | [] | 4
720+ gettext | [] [] [] [] [] | 16
721+ gettext-examples | [] [] [] [] [] | 14
722+ gettext-runtime | [] [] [] [] [] [] [] [] | 22
723+ gettext-tools | [] [] [] [] [] [] | 14
724+ gimp-print | [] [] | 10
725+ gliv | | 3
726+ glunarclock | [] [] [] | 13
727+ gnubiff | | 3
728+ gnucash | [] [] | 9
729+ gnucash-glossary | [] [] [] | 8
730+ gnupg | [] [] [] [] | 17
731+ gpe-aerial | [] | 7
732+ gpe-beam | [] | 8
733+ gpe-calendar | [] [] [] [] | 13
734+ gpe-clock | [] [] [] | 10
735+ gpe-conf | [] [] | 9
736+ gpe-contacts | [] [] [] | 11
737+ gpe-edit | [] [] [] [] [] | 12
738+ gpe-go | | 5
739+ gpe-login | [] [] [] [] [] | 13
740+ gpe-ownerinfo | [] [] [] [] | 13
741+ gpe-sketchbook | [] [] | 9
742+ gpe-su | [] [] [] | 10
743+ gpe-taskmanager | [] [] [] | 10
744+ gpe-timesheet | [] [] [] [] | 12
745+ gpe-today | [] [] [] [] [] | 13
746+ gpe-todo | [] [] [] [] | 12
747+ gphoto2 | [] [] [] | 11
748+ gprof | [] [] | 9
749+ gpsdrive | [] [] | 3
750+ gramadoir | [] | 5
751+ grep | [] [] [] [] | 26
752+ gretl | | 3
753+ gtick | | 7
754+ hello | [] [] [] [] [] | 34
755+ id-utils | [] [] | 12
756+ indent | [] [] [] [] | 21
757+ iso_3166 | [] [] [] [] [] [] [] | 27
758+ iso_3166_1 | [] [] [] | 16
759+ iso_3166_2 | | 0
760+ iso_3166_3 | | 2
761+ iso_4217 | [] [] [] [] [] [] | 24
762+ iso_639 | | 1
763+ jpilot | [] [] [] [] [] | 9
764+ jtag | [] | 2
765+ jwhois | () [] [] | 11
766+ kbd | [] [] | 11
767+ latrine | | 2
768+ ld | [] [] | 5
769+ libc | [] [] [] [] | 20
770+ libgpewidget | [] [] [] [] | 13
771+ libiconv | [] [] [] [] [] [] [] [] | 27
772+ lifelines | [] | 2
773+ lilypond | [] | 3
774+ lingoteach | | 2
775+ lingoteach_lessons | () | 0
776+ lynx | [] [] [] | 14
777+ m4 | [] [] | 15
778+ mailutils | | 5
779+ make | [] [] [] | 16
780+ man-db | [] | 5
781+ minicom | | 11
782+ mysecretdiary | [] [] | 10
783+ nano | [] [] [] [] | 17
784+ nano_1_0 | [] [] [] | 17
785+ opcodes | [] [] | 6
786+ parted | [] [] [] | 15
787+ ptx | [] [] | 22
788+ python | | 0
789+ radius | | 4
790+ recode | [] [] [] | 20
791+ rpm | [] [] | 9
792+ screem | [] [] | 2
793+ scrollkeeper | [] [] [] | 15
794+ sed | [] [] [] [] [] [] | 24
795+ sh-utils | [] [] | 14
796+ shared-mime-info | [] [] | 7
797+ sharutils | [] [] [] [] | 17
798+ silky | () | 3
799+ skencil | [] | 6
800+ sketch | [] | 6
801+ soundtracker | [] [] | 7
802+ sp | [] | 3
803+ tar | [] [] [] [] [] | 24
804+ texinfo | [] [] [] | 14
805+ textutils | [] [] [] [] | 16
806+ tin | | 1
807+ tp-robot | | 2
808+ tuxpaint | [] [] [] [] [] | 29
809+ unicode-han-tra... | | 0
810+ unicode-transla... | | 2
811+ util-linux | [] [] | 15
812+ vorbis-tools | | 8
813+ wastesedge | | 0
814+ wdiff | [] [] [] | 18
815+ wget | [] [] [] [] [] [] [] [] | 24
816+ xchat | [] [] [] [] [] | 15
817+ xfree86_xkb_xml | [] [] [] [] [] | 11
818+ xpad | | 5
819+ +-----------------------------------------------------+
820+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
821+ 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
822
823 Some counters in the preceding matrix are higher than the number of
824 visible blocks let us expect. This is because a few extra PO files are
825@@ -220,6 +742,27 @@
826 lag between the mere existence a PO file and its wide availability in a
827 distribution.
828
829- If August 1997 seems to be old, you may fetch a more recent copy of
830-this `ABOUT-NLS' file on most GNU archive sites.
831+ If January 2004 seems to be old, you may fetch a more recent copy of
832+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
833+matrix with full percentage details can be found at
834+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
835+
836+Using `gettext' in new packages
837+===============================
838+
839+If you are writing a freely available program and want to
840+internationalize it you are welcome to use GNU `gettext' in your
841+package. Of course you have to respect the GNU Library General Public
842+License which covers the use of the GNU `gettext' library. This means
843+in particular that even non-free programs can use `libintl' as a shared
844+library, whereas only free software can use `libintl' as a static
845+library or use modified versions of `libintl'.
846+
847+ Once the sources are changed appropriately and the setup can handle
848+the use of `gettext' the only thing missing are the translations. The
849+Free Translation Project is also available for packages which are not
850+developed inside the GNU project. Therefore the information given above
851+applies also for every other Free Software Project. Contact
852+`translation@iro.umontreal.ca' to make the `.pot' files available to
853+the translation teams.
854
855--- lrzsz-0.12.20.safe/ChangeLog 1998-12-29 17:49:56.000000000 -0500
856+++ lrzsz-0.12.20/ChangeLog 2004-09-12 14:40:35.846521456 -0400
857@@ -1,3 +1,11 @@
858+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
859+
860+ * Makefile.am (ACLOCAL_AMFLAGS): New variable.
861+ (EXTRA_DIST): Add config.rpath.
862+ * configure.in (AC_OUTPUT): Add m4/Makefile.
863+ (AC_OUTPUT): Remove command that created po/Makefile.
864+ (AC_LINK_FILES): Remove invocation.
865+
866 1998-12-29 Uwe Ohse <uwe@ohse.de>
867
868 * src/lrz.c: removed stpcpy call.
869--- lrzsz-0.12.20.safe/config.rpath 1969-12-31 19:00:00.000000000 -0500
870+++ lrzsz-0.12.20/config.rpath 2004-09-12 14:40:34.329752040 -0400
871@@ -0,0 +1,548 @@
872+#! /bin/sh
873+# Output a system dependent set of variables, describing how to set the
874+# run time search path of shared libraries in an executable.
875+#
876+# Copyright 1996-2003 Free Software Foundation, Inc.
877+# Taken from GNU libtool, 2001
878+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
879+#
880+# This program is free software; you can redistribute it and/or modify
881+# it under the terms of the GNU General Public License as published by
882+# the Free Software Foundation; either version 2 of the License, or
883+# (at your option) any later version.
884+#
885+# This program is distributed in the hope that it will be useful, but
886+# WITHOUT ANY WARRANTY; without even the implied warranty of
887+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
888+# General Public License for more details.
889+#
890+# You should have received a copy of the GNU General Public License
891+# along with this program; if not, write to the Free Software
892+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
893+#
894+# As a special exception to the GNU General Public License, if you
895+# distribute this file as part of a program that contains a
896+# configuration script generated by Autoconf, you may include it under
897+# the same distribution terms that you use for the rest of that program.
898+#
899+# The first argument passed to this file is the canonical host specification,
900+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
901+# or
902+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
903+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
904+# should be set by the caller.
905+#
906+# The set of defined variables is at the end of this script.
907+
908+# Known limitations:
909+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
910+# than 256 bytes, otherwise the compiler driver will dump core. The only
911+# known workaround is to choose shorter directory names for the build
912+# directory and/or the installation directory.
913+
914+# All known linkers require a `.a' archive for static linking (except M$VC,
915+# which needs '.lib').
916+libext=a
917+shrext=.so
918+
919+host="$1"
920+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
921+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
922+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
923+
924+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
925+
926+wl=
927+if test "$GCC" = yes; then
928+ wl='-Wl,'
929+else
930+ case "$host_os" in
931+ aix*)
932+ wl='-Wl,'
933+ ;;
934+ mingw* | pw32* | os2*)
935+ ;;
936+ hpux9* | hpux10* | hpux11*)
937+ wl='-Wl,'
938+ ;;
939+ irix5* | irix6* | nonstopux*)
940+ wl='-Wl,'
941+ ;;
942+ newsos6)
943+ ;;
944+ linux*)
945+ case $CC in
946+ icc|ecc)
947+ wl='-Wl,'
948+ ;;
949+ ccc)
950+ wl='-Wl,'
951+ ;;
952+ esac
953+ ;;
954+ osf3* | osf4* | osf5*)
955+ wl='-Wl,'
956+ ;;
957+ sco3.2v5*)
958+ ;;
959+ solaris*)
960+ wl='-Wl,'
961+ ;;
962+ sunos4*)
963+ wl='-Qoption ld '
964+ ;;
965+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
966+ wl='-Wl,'
967+ ;;
968+ sysv4*MP*)
969+ ;;
970+ uts4*)
971+ ;;
972+ esac
973+fi
974+
975+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
976+
977+hardcode_libdir_flag_spec=
978+hardcode_libdir_separator=
979+hardcode_direct=no
980+hardcode_minus_L=no
981+
982+case "$host_os" in
983+ cygwin* | mingw* | pw32*)
984+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
985+ # When not using gcc, we currently assume that we are using
986+ # Microsoft Visual C++.
987+ if test "$GCC" != yes; then
988+ with_gnu_ld=no
989+ fi
990+ ;;
991+ openbsd*)
992+ with_gnu_ld=no
993+ ;;
994+esac
995+
996+ld_shlibs=yes
997+if test "$with_gnu_ld" = yes; then
998+ case "$host_os" in
999+ aix3* | aix4* | aix5*)
1000+ # On AIX/PPC, the GNU linker is very broken
1001+ if test "$host_cpu" != ia64; then
1002+ ld_shlibs=no
1003+ fi
1004+ ;;
1005+ amigaos*)
1006+ hardcode_libdir_flag_spec='-L$libdir'
1007+ hardcode_minus_L=yes
1008+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1009+ # that the semantics of dynamic libraries on AmigaOS, at least up
1010+ # to version 4, is to share data among multiple programs linked
1011+ # with the same dynamic library. Since this doesn't match the
1012+ # behavior of shared libraries on other platforms, we can use
1013+ # them.
1014+ ld_shlibs=no
1015+ ;;
1016+ beos*)
1017+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1018+ :
1019+ else
1020+ ld_shlibs=no
1021+ fi
1022+ ;;
1023+ cygwin* | mingw* | pw32*)
1024+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1025+ # no search path for DLLs.
1026+ hardcode_libdir_flag_spec='-L$libdir'
1027+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
1028+ :
1029+ else
1030+ ld_shlibs=no
1031+ fi
1032+ ;;
1033+ netbsd*)
1034+ ;;
1035+ solaris* | sysv5*)
1036+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
1037+ ld_shlibs=no
1038+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1039+ :
1040+ else
1041+ ld_shlibs=no
1042+ fi
1043+ ;;
1044+ sunos4*)
1045+ hardcode_direct=yes
1046+ ;;
1047+ *)
1048+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1049+ :
1050+ else
1051+ ld_shlibs=no
1052+ fi
1053+ ;;
1054+ esac
1055+ if test "$ld_shlibs" = yes; then
1056+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
1057+ # option of GNU ld is called -rpath, not --rpath.
1058+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1059+ fi
1060+else
1061+ case "$host_os" in
1062+ aix3*)
1063+ # Note: this linker hardcodes the directories in LIBPATH if there
1064+ # are no directories specified by -L.
1065+ hardcode_minus_L=yes
1066+ if test "$GCC" = yes; then
1067+ # Neither direct hardcoding nor static linking is supported with a
1068+ # broken collect2.
1069+ hardcode_direct=unsupported
1070+ fi
1071+ ;;
1072+ aix4* | aix5*)
1073+ if test "$host_cpu" = ia64; then
1074+ # On IA64, the linker does run time linking by default, so we don't
1075+ # have to do anything special.
1076+ aix_use_runtimelinking=no
1077+ else
1078+ aix_use_runtimelinking=no
1079+ # Test if we are trying to use run time linking or normal
1080+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1081+ # need to do runtime linking.
1082+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
1083+ for ld_flag in $LDFLAGS; do
1084+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1085+ aix_use_runtimelinking=yes
1086+ break
1087+ fi
1088+ done
1089+ esac
1090+ fi
1091+ hardcode_direct=yes
1092+ hardcode_libdir_separator=':'
1093+ if test "$GCC" = yes; then
1094+ case $host_os in aix4.[012]|aix4.[012].*)
1095+ collect2name=`${CC} -print-prog-name=collect2`
1096+ if test -f "$collect2name" && \
1097+ strings "$collect2name" | grep resolve_lib_name >/dev/null
1098+ then
1099+ # We have reworked collect2
1100+ hardcode_direct=yes
1101+ else
1102+ # We have old collect2
1103+ hardcode_direct=unsupported
1104+ hardcode_minus_L=yes
1105+ hardcode_libdir_flag_spec='-L$libdir'
1106+ hardcode_libdir_separator=
1107+ fi
1108+ esac
1109+ fi
1110+ # Begin _LT_AC_SYS_LIBPATH_AIX.
1111+ echo 'int main () { return 0; }' > conftest.c
1112+ ${CC} ${LDFLAGS} conftest.c -o conftest
1113+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1114+}'`
1115+ if test -z "$aix_libpath"; then
1116+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1117+}'`
1118+ fi
1119+ if test -z "$aix_libpath"; then
1120+ aix_libpath="/usr/lib:/lib"
1121+ fi
1122+ rm -f conftest.c conftest
1123+ # End _LT_AC_SYS_LIBPATH_AIX.
1124+ if test "$aix_use_runtimelinking" = yes; then
1125+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1126+ else
1127+ if test "$host_cpu" = ia64; then
1128+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1129+ else
1130+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1131+ fi
1132+ fi
1133+ ;;
1134+ amigaos*)
1135+ hardcode_libdir_flag_spec='-L$libdir'
1136+ hardcode_minus_L=yes
1137+ # see comment about different semantics on the GNU ld section
1138+ ld_shlibs=no
1139+ ;;
1140+ bsdi4*)
1141+ ;;
1142+ cygwin* | mingw* | pw32*)
1143+ # When not using gcc, we currently assume that we are using
1144+ # Microsoft Visual C++.
1145+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1146+ # no search path for DLLs.
1147+ hardcode_libdir_flag_spec=' '
1148+ libext=lib
1149+ ;;
1150+ darwin* | rhapsody*)
1151+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1152+ hardcode_direct=no
1153+ fi
1154+ ;;
1155+ dgux*)
1156+ hardcode_libdir_flag_spec='-L$libdir'
1157+ ;;
1158+ freebsd1*)
1159+ ld_shlibs=no
1160+ ;;
1161+ freebsd2.2*)
1162+ hardcode_libdir_flag_spec='-R$libdir'
1163+ hardcode_direct=yes
1164+ ;;
1165+ freebsd2*)
1166+ hardcode_direct=yes
1167+ hardcode_minus_L=yes
1168+ ;;
1169+ freebsd*)
1170+ hardcode_libdir_flag_spec='-R$libdir'
1171+ hardcode_direct=yes
1172+ ;;
1173+ hpux9*)
1174+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1175+ hardcode_libdir_separator=:
1176+ hardcode_direct=yes
1177+ # hardcode_minus_L: Not really in the search PATH,
1178+ # but as the default location of the library.
1179+ hardcode_minus_L=yes
1180+ ;;
1181+ hpux10* | hpux11*)
1182+ if test "$with_gnu_ld" = no; then
1183+ case "$host_cpu" in
1184+ hppa*64*)
1185+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1186+ hardcode_libdir_separator=:
1187+ hardcode_direct=no
1188+ ;;
1189+ ia64*)
1190+ hardcode_libdir_flag_spec='-L$libdir'
1191+ hardcode_direct=no
1192+ # hardcode_minus_L: Not really in the search PATH,
1193+ # but as the default location of the library.
1194+ hardcode_minus_L=yes
1195+ ;;
1196+ *)
1197+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1198+ hardcode_libdir_separator=:
1199+ hardcode_direct=yes
1200+ # hardcode_minus_L: Not really in the search PATH,
1201+ # but as the default location of the library.
1202+ hardcode_minus_L=yes
1203+ ;;
1204+ esac
1205+ fi
1206+ ;;
1207+ irix5* | irix6* | nonstopux*)
1208+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1209+ hardcode_libdir_separator=:
1210+ ;;
1211+ netbsd*)
1212+ hardcode_libdir_flag_spec='-R$libdir'
1213+ hardcode_direct=yes
1214+ ;;
1215+ newsos6)
1216+ hardcode_direct=yes
1217+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1218+ hardcode_libdir_separator=:
1219+ ;;
1220+ openbsd*)
1221+ hardcode_direct=yes
1222+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1223+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1224+ else
1225+ case "$host_os" in
1226+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
1227+ hardcode_libdir_flag_spec='-R$libdir'
1228+ ;;
1229+ *)
1230+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1231+ ;;
1232+ esac
1233+ fi
1234+ ;;
1235+ os2*)
1236+ hardcode_libdir_flag_spec='-L$libdir'
1237+ hardcode_minus_L=yes
1238+ ;;
1239+ osf3*)
1240+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1241+ hardcode_libdir_separator=:
1242+ ;;
1243+ osf4* | osf5*)
1244+ if test "$GCC" = yes; then
1245+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1246+ else
1247+ # Both cc and cxx compiler support -rpath directly
1248+ hardcode_libdir_flag_spec='-rpath $libdir'
1249+ fi
1250+ hardcode_libdir_separator=:
1251+ ;;
1252+ sco3.2v5*)
1253+ ;;
1254+ solaris*)
1255+ hardcode_libdir_flag_spec='-R$libdir'
1256+ ;;
1257+ sunos4*)
1258+ hardcode_libdir_flag_spec='-L$libdir'
1259+ hardcode_direct=yes
1260+ hardcode_minus_L=yes
1261+ ;;
1262+ sysv4)
1263+ case $host_vendor in
1264+ sni)
1265+ hardcode_direct=yes # is this really true???
1266+ ;;
1267+ siemens)
1268+ hardcode_direct=no
1269+ ;;
1270+ motorola)
1271+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1272+ ;;
1273+ esac
1274+ ;;
1275+ sysv4.3*)
1276+ ;;
1277+ sysv4*MP*)
1278+ if test -d /usr/nec; then
1279+ ld_shlibs=yes
1280+ fi
1281+ ;;
1282+ sysv4.2uw2*)
1283+ hardcode_direct=yes
1284+ hardcode_minus_L=no
1285+ ;;
1286+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
1287+ ;;
1288+ sysv5*)
1289+ hardcode_libdir_flag_spec=
1290+ ;;
1291+ uts4*)
1292+ hardcode_libdir_flag_spec='-L$libdir'
1293+ ;;
1294+ *)
1295+ ld_shlibs=no
1296+ ;;
1297+ esac
1298+fi
1299+
1300+# Check dynamic linker characteristics
1301+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
1302+libname_spec='lib$name'
1303+case "$host_os" in
1304+ aix3*)
1305+ ;;
1306+ aix4* | aix5*)
1307+ ;;
1308+ amigaos*)
1309+ ;;
1310+ beos*)
1311+ ;;
1312+ bsdi4*)
1313+ ;;
1314+ cygwin* | mingw* | pw32*)
1315+ shrext=.dll
1316+ ;;
1317+ darwin* | rhapsody*)
1318+ shrext=.dylib
1319+ ;;
1320+ dgux*)
1321+ ;;
1322+ freebsd1*)
1323+ ;;
1324+ freebsd*)
1325+ ;;
1326+ gnu*)
1327+ ;;
1328+ hpux9* | hpux10* | hpux11*)
1329+ case "$host_cpu" in
1330+ ia64*)
1331+ shrext=.so
1332+ ;;
1333+ hppa*64*)
1334+ shrext=.sl
1335+ ;;
1336+ *)
1337+ shrext=.sl
1338+ ;;
1339+ esac
1340+ ;;
1341+ irix5* | irix6* | nonstopux*)
1342+ case "$host_os" in
1343+ irix5* | nonstopux*)
1344+ libsuff= shlibsuff=
1345+ ;;
1346+ *)
1347+ case $LD in
1348+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
1349+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
1350+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
1351+ *) libsuff= shlibsuff= ;;
1352+ esac
1353+ ;;
1354+ esac
1355+ ;;
1356+ linux*oldld* | linux*aout* | linux*coff*)
1357+ ;;
1358+ linux*)
1359+ ;;
1360+ netbsd*)
1361+ ;;
1362+ newsos6)
1363+ ;;
1364+ nto-qnx)
1365+ ;;
1366+ openbsd*)
1367+ ;;
1368+ os2*)
1369+ libname_spec='$name'
1370+ shrext=.dll
1371+ ;;
1372+ osf3* | osf4* | osf5*)
1373+ ;;
1374+ sco3.2v5*)
1375+ ;;
1376+ solaris*)
1377+ ;;
1378+ sunos4*)
1379+ ;;
1380+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1381+ ;;
1382+ sysv4*MP*)
1383+ ;;
1384+ uts4*)
1385+ ;;
1386+esac
1387+
1388+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
1389+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
1390+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
1391+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
1392+
1393+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
1394+
1395+# How to pass a linker flag through the compiler.
1396+wl="$escaped_wl"
1397+
1398+# Static library suffix (normally "a").
1399+libext="$libext"
1400+
1401+# Shared library suffix (normally "so").
1402+shlibext="$shlibext"
1403+
1404+# Flag to hardcode \$libdir into a binary during linking.
1405+# This must work even if \$libdir does not exist.
1406+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
1407+
1408+# Whether we need a single -rpath flag with a separated argument.
1409+hardcode_libdir_separator="$hardcode_libdir_separator"
1410+
1411+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1412+# resulting binary.
1413+hardcode_direct="$hardcode_direct"
1414+
1415+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1416+# resulting binary.
1417+hardcode_minus_L="$hardcode_minus_L"
1418+
1419+EOF
1420--- lrzsz-0.12.20.safe/configure.in 2004-09-12 14:39:55.161706488 -0400
1421+++ lrzsz-0.12.20/configure.in 2004-09-12 14:40:35.816526016 -0400
1422@@ -260,11 +260,10 @@
1423 AM_GNU_GETTEXT
1424
1425 AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
1426-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
1427
1428-AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
1429+AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile m4/Makefile \
1430 man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
1431 src/lrzszbug],
1432-[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
1433+[
1434 chmod +x debian/rules;
1435 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
1436--- lrzsz-0.12.20.safe/intl/bindtextdom.c 1998-04-26 09:22:36.000000000 -0400
1437+++ lrzsz-0.12.20/intl/bindtextdom.c 2004-09-12 14:40:34.343749912 -0400
1438@@ -1,59 +1,75 @@
1439 /* Implementation of the bindtextdomain(3) function
1440- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
1441+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
1442
1443- This program is free software; you can redistribute it and/or modify
1444- it under the terms of the GNU General Public License as published by
1445- the Free Software Foundation; either version 2, or (at your option)
1446+ This program is free software; you can redistribute it and/or modify it
1447+ under the terms of the GNU Library General Public License as published
1448+ by the Free Software Foundation; either version 2, or (at your option)
1449 any later version.
1450
1451 This program is distributed in the hope that it will be useful,
1452 but WITHOUT ANY WARRANTY; without even the implied warranty of
1453- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1454- GNU General Public License for more details.
1455+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1456+ Library General Public License for more details.
1457
1458- You should have received a copy of the GNU General Public License
1459- along with this program; if not, write to the Free Software Foundation,
1460- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1461+ You should have received a copy of the GNU Library General Public
1462+ License along with this program; if not, write to the Free Software
1463+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1464+ USA. */
1465
1466 #ifdef HAVE_CONFIG_H
1467 # include <config.h>
1468 #endif
1469
1470-#if defined STDC_HEADERS || defined _LIBC
1471-# include <stdlib.h>
1472-#else
1473-# ifdef HAVE_MALLOC_H
1474-# include <malloc.h>
1475-# else
1476-void free ();
1477-# endif
1478-#endif
1479+#include <stddef.h>
1480+#include <stdlib.h>
1481+#include <string.h>
1482
1483-#if defined HAVE_STRING_H || defined _LIBC
1484-# include <string.h>
1485+#ifdef _LIBC
1486+# include <libintl.h>
1487 #else
1488-# include <strings.h>
1489-# ifndef memcpy
1490-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
1491-# endif
1492+# include "libgnuintl.h"
1493 #endif
1494+#include "gettextP.h"
1495
1496 #ifdef _LIBC
1497-# include <libintl.h>
1498+/* We have to handle multi-threaded applications. */
1499+# include <bits/libc-lock.h>
1500 #else
1501-# include "libgettext.h"
1502+/* Provide dummy implementation if this is outside glibc. */
1503+# define __libc_rwlock_define(CLASS, NAME)
1504+# define __libc_rwlock_wrlock(NAME)
1505+# define __libc_rwlock_unlock(NAME)
1506+#endif
1507+
1508+/* The internal variables in the standalone libintl.a must have different
1509+ names than the internal variables in GNU libc, otherwise programs
1510+ using libintl.a cannot be linked statically. */
1511+#if !defined _LIBC
1512+# define _nl_default_dirname libintl_nl_default_dirname
1513+# define _nl_domain_bindings libintl_nl_domain_bindings
1514+#endif
1515+
1516+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
1517+#ifndef offsetof
1518+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
1519 #endif
1520-#include "gettext.h"
1521-#include "gettextP.h"
1522
1523 /* @@ end of prolog @@ */
1524
1525 /* Contains the default location of the message catalogs. */
1526 extern const char _nl_default_dirname[];
1527+#ifdef _LIBC
1528+extern const char _nl_default_dirname_internal[] attribute_hidden;
1529+#else
1530+# define INTUSE(name) name
1531+#endif
1532
1533 /* List with bindings of specific domains. */
1534 extern struct binding *_nl_domain_bindings;
1535
1536+/* Lock variable to protect the global data in the gettext implementation. */
1537+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
1538+
1539
1540 /* Names for the libintl functions are a problem. They must not clash
1541 with existing names and they should follow ANSI C. But this source
1542@@ -61,23 +77,41 @@
1543 prefix. So we have to make a difference here. */
1544 #ifdef _LIBC
1545 # define BINDTEXTDOMAIN __bindtextdomain
1546-# define strdup(str) __strdup (str)
1547+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
1548+# ifndef strdup
1549+# define strdup(str) __strdup (str)
1550+# endif
1551 #else
1552-# define BINDTEXTDOMAIN bindtextdomain__
1553+# define BINDTEXTDOMAIN libintl_bindtextdomain
1554+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
1555 #endif
1556
1557-/* Specify that the DOMAINNAME message catalog will be found
1558- in DIRNAME rather than in the system locale data base. */
1559-char *
1560-BINDTEXTDOMAIN (domainname, dirname)
1561- const char *domainname;
1562- const char *dirname;
1563+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
1564+ to be used for the DOMAINNAME message catalog.
1565+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
1566+ modified, only the current value is returned.
1567+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
1568+ modified nor returned. */
1569+static void
1570+set_binding_values (const char *domainname,
1571+ const char **dirnamep, const char **codesetp)
1572 {
1573 struct binding *binding;
1574+ int modified;
1575
1576 /* Some sanity checks. */
1577 if (domainname == NULL || domainname[0] == '\0')
1578- return NULL;
1579+ {
1580+ if (dirnamep)
1581+ *dirnamep = NULL;
1582+ if (codesetp)
1583+ *codesetp = NULL;
1584+ return;
1585+ }
1586+
1587+ __libc_rwlock_wrlock (_nl_state_lock);
1588+
1589+ modified = 0;
1590
1591 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
1592 {
1593@@ -93,81 +127,173 @@
1594 }
1595 }
1596
1597- if (dirname == NULL)
1598- /* The current binding has be to returned. */
1599- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
1600-
1601 if (binding != NULL)
1602 {
1603- /* The domain is already bound. If the new value and the old
1604- one are equal we simply do nothing. Otherwise replace the
1605- old binding. */
1606- if (strcmp (dirname, binding->dirname) != 0)
1607+ if (dirnamep)
1608 {
1609- char *new_dirname;
1610+ const char *dirname = *dirnamep;
1611
1612- if (strcmp (dirname, _nl_default_dirname) == 0)
1613- new_dirname = (char *) _nl_default_dirname;
1614+ if (dirname == NULL)
1615+ /* The current binding has be to returned. */
1616+ *dirnamep = binding->dirname;
1617 else
1618 {
1619+ /* The domain is already bound. If the new value and the old
1620+ one are equal we simply do nothing. Otherwise replace the
1621+ old binding. */
1622+ char *result = binding->dirname;
1623+ if (strcmp (dirname, result) != 0)
1624+ {
1625+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1626+ result = (char *) INTUSE(_nl_default_dirname);
1627+ else
1628+ {
1629 #if defined _LIBC || defined HAVE_STRDUP
1630- new_dirname = strdup (dirname);
1631- if (new_dirname == NULL)
1632- return NULL;
1633+ result = strdup (dirname);
1634 #else
1635- size_t len = strlen (dirname) + 1;
1636- new_dirname = (char *) malloc (len);
1637- if (new_dirname == NULL)
1638- return NULL;
1639-
1640- memcpy (new_dirname, dirname, len);
1641+ size_t len = strlen (dirname) + 1;
1642+ result = (char *) malloc (len);
1643+ if (__builtin_expect (result != NULL, 1))
1644+ memcpy (result, dirname, len);
1645 #endif
1646+ }
1647+
1648+ if (__builtin_expect (result != NULL, 1))
1649+ {
1650+ if (binding->dirname != INTUSE(_nl_default_dirname))
1651+ free (binding->dirname);
1652+
1653+ binding->dirname = result;
1654+ modified = 1;
1655+ }
1656+ }
1657+ *dirnamep = result;
1658 }
1659+ }
1660
1661- if (binding->dirname != _nl_default_dirname)
1662- free (binding->dirname);
1663+ if (codesetp)
1664+ {
1665+ const char *codeset = *codesetp;
1666
1667- binding->dirname = new_dirname;
1668+ if (codeset == NULL)
1669+ /* The current binding has be to returned. */
1670+ *codesetp = binding->codeset;
1671+ else
1672+ {
1673+ /* The domain is already bound. If the new value and the old
1674+ one are equal we simply do nothing. Otherwise replace the
1675+ old binding. */
1676+ char *result = binding->codeset;
1677+ if (result == NULL || strcmp (codeset, result) != 0)
1678+ {
1679+#if defined _LIBC || defined HAVE_STRDUP
1680+ result = strdup (codeset);
1681+#else
1682+ size_t len = strlen (codeset) + 1;
1683+ result = (char *) malloc (len);
1684+ if (__builtin_expect (result != NULL, 1))
1685+ memcpy (result, codeset, len);
1686+#endif
1687+
1688+ if (__builtin_expect (result != NULL, 1))
1689+ {
1690+ if (binding->codeset != NULL)
1691+ free (binding->codeset);
1692+
1693+ binding->codeset = result;
1694+ binding->codeset_cntr++;
1695+ modified = 1;
1696+ }
1697+ }
1698+ *codesetp = result;
1699+ }
1700 }
1701 }
1702+ else if ((dirnamep == NULL || *dirnamep == NULL)
1703+ && (codesetp == NULL || *codesetp == NULL))
1704+ {
1705+ /* Simply return the default values. */
1706+ if (dirnamep)
1707+ *dirnamep = INTUSE(_nl_default_dirname);
1708+ if (codesetp)
1709+ *codesetp = NULL;
1710+ }
1711 else
1712 {
1713 /* We have to create a new binding. */
1714- size_t len;
1715+ size_t len = strlen (domainname) + 1;
1716 struct binding *new_binding =
1717- (struct binding *) malloc (sizeof (*new_binding));
1718+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
1719
1720- if (new_binding == NULL)
1721- return NULL;
1722+ if (__builtin_expect (new_binding == NULL, 0))
1723+ goto failed;
1724
1725+ memcpy (new_binding->domainname, domainname, len);
1726+
1727+ if (dirnamep)
1728+ {
1729+ const char *dirname = *dirnamep;
1730+
1731+ if (dirname == NULL)
1732+ /* The default value. */
1733+ dirname = INTUSE(_nl_default_dirname);
1734+ else
1735+ {
1736+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1737+ dirname = INTUSE(_nl_default_dirname);
1738+ else
1739+ {
1740+ char *result;
1741 #if defined _LIBC || defined HAVE_STRDUP
1742- new_binding->domainname = strdup (domainname);
1743- if (new_binding->domainname == NULL)
1744- return NULL;
1745+ result = strdup (dirname);
1746+ if (__builtin_expect (result == NULL, 0))
1747+ goto failed_dirname;
1748 #else
1749- len = strlen (domainname) + 1;
1750- new_binding->domainname = (char *) malloc (len);
1751- if (new_binding->domainname == NULL)
1752- return NULL;
1753- memcpy (new_binding->domainname, domainname, len);
1754+ size_t len = strlen (dirname) + 1;
1755+ result = (char *) malloc (len);
1756+ if (__builtin_expect (result == NULL, 0))
1757+ goto failed_dirname;
1758+ memcpy (result, dirname, len);
1759 #endif
1760-
1761- if (strcmp (dirname, _nl_default_dirname) == 0)
1762- new_binding->dirname = (char *) _nl_default_dirname;
1763+ dirname = result;
1764+ }
1765+ }
1766+ *dirnamep = dirname;
1767+ new_binding->dirname = (char *) dirname;
1768+ }
1769 else
1770+ /* The default value. */
1771+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
1772+
1773+ new_binding->codeset_cntr = 0;
1774+
1775+ if (codesetp)
1776 {
1777+ const char *codeset = *codesetp;
1778+
1779+ if (codeset != NULL)
1780+ {
1781+ char *result;
1782+
1783 #if defined _LIBC || defined HAVE_STRDUP
1784- new_binding->dirname = strdup (dirname);
1785- if (new_binding->dirname == NULL)
1786- return NULL;
1787+ result = strdup (codeset);
1788+ if (__builtin_expect (result == NULL, 0))
1789+ goto failed_codeset;
1790 #else
1791- len = strlen (dirname) + 1;
1792- new_binding->dirname = (char *) malloc (len);
1793- if (new_binding->dirname == NULL)
1794- return NULL;
1795- memcpy (new_binding->dirname, dirname, len);
1796+ size_t len = strlen (codeset) + 1;
1797+ result = (char *) malloc (len);
1798+ if (__builtin_expect (result == NULL, 0))
1799+ goto failed_codeset;
1800+ memcpy (result, codeset, len);
1801 #endif
1802+ codeset = result;
1803+ new_binding->codeset_cntr++;
1804+ }
1805+ *codesetp = codeset;
1806+ new_binding->codeset = (char *) codeset;
1807 }
1808+ else
1809+ new_binding->codeset = NULL;
1810
1811 /* Now enqueue it. */
1812 if (_nl_domain_bindings == NULL
1813@@ -187,13 +313,51 @@
1814 binding->next = new_binding;
1815 }
1816
1817- binding = new_binding;
1818+ modified = 1;
1819+
1820+ /* Here we deal with memory allocation failures. */
1821+ if (0)
1822+ {
1823+ failed_codeset:
1824+ if (new_binding->dirname != INTUSE(_nl_default_dirname))
1825+ free (new_binding->dirname);
1826+ failed_dirname:
1827+ free (new_binding);
1828+ failed:
1829+ if (dirnamep)
1830+ *dirnamep = NULL;
1831+ if (codesetp)
1832+ *codesetp = NULL;
1833+ }
1834 }
1835
1836- return binding->dirname;
1837+ /* If we modified any binding, we flush the caches. */
1838+ if (modified)
1839+ ++_nl_msg_cat_cntr;
1840+
1841+ __libc_rwlock_unlock (_nl_state_lock);
1842+}
1843+
1844+/* Specify that the DOMAINNAME message catalog will be found
1845+ in DIRNAME rather than in the system locale data base. */
1846+char *
1847+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
1848+{
1849+ set_binding_values (domainname, &dirname, NULL);
1850+ return (char *) dirname;
1851+}
1852+
1853+/* Specify the character encoding in which the messages from the
1854+ DOMAINNAME message catalog will be returned. */
1855+char *
1856+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
1857+{
1858+ set_binding_values (domainname, NULL, &codeset);
1859+ return (char *) codeset;
1860 }
1861
1862 #ifdef _LIBC
1863-/* Alias for function name in GNU C Library. */
1864+/* Aliases for function names in GNU C Library. */
1865 weak_alias (__bindtextdomain, bindtextdomain);
1866+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
1867 #endif
1868--- lrzsz-0.12.20.safe/intl/cat-compat.c 1998-04-26 09:22:37.000000000 -0400
1869+++ lrzsz-0.12.20/intl/cat-compat.c 1969-12-31 19:00:00.000000000 -0500
1870@@ -1,262 +0,0 @@
1871-/* Compatibility code for gettext-using-catgets interface.
1872- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
1873-
1874- This program is free software; you can redistribute it and/or modify
1875- it under the terms of the GNU General Public License as published by
1876- the Free Software Foundation; either version 2, or (at your option)
1877- any later version.
1878-
1879- This program is distributed in the hope that it will be useful,
1880- but WITHOUT ANY WARRANTY; without even the implied warranty of
1881- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1882- GNU General Public License for more details.
1883-
1884- You should have received a copy of the GNU General Public License
1885- along with this program; if not, write to the Free Software Foundation,
1886- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1887-
1888-#ifdef HAVE_CONFIG_H
1889-# include <config.h>
1890-#endif
1891-
1892-#include <stdio.h>
1893-
1894-#ifdef STDC_HEADERS
1895-# include <stdlib.h>
1896-# include <string.h>
1897-#else
1898-char *getenv ();
1899-# ifdef HAVE_MALLOC_H
1900-# include <malloc.h>
1901-# endif
1902-#endif
1903-
1904-#ifdef HAVE_NL_TYPES_H
1905-# include <nl_types.h>
1906-#endif
1907-
1908-#include "libgettext.h"
1909-
1910-/* @@ end of prolog @@ */
1911-
1912-/* XPG3 defines the result of `setlocale (category, NULL)' as:
1913- ``Directs `setlocale()' to query `category' and return the current
1914- setting of `local'.''
1915- However it does not specify the exact format. And even worse: POSIX
1916- defines this not at all. So we can use this feature only on selected
1917- system (e.g. those using GNU C Library). */
1918-#ifdef _LIBC
1919-# define HAVE_LOCALE_NULL
1920-#endif
1921-
1922-/* The catalog descriptor. */
1923-static nl_catd catalog = (nl_catd) -1;
1924-
1925-/* Name of the default catalog. */
1926-static const char default_catalog_name[] = "messages";
1927-
1928-/* Name of currently used catalog. */
1929-static const char *catalog_name = default_catalog_name;
1930-
1931-/* Get ID for given string. If not found return -1. */
1932-static int msg_to_cat_id PARAMS ((const char *msg));
1933-
1934-/* Substitution for systems lacking this function in their C library. */
1935-#if !_LIBC && !HAVE_STPCPY
1936-static char *stpcpy PARAMS ((char *dest, const char *src));
1937-#endif
1938-
1939-
1940-/* Set currently used domain/catalog. */
1941-char *
1942-textdomain (domainname)
1943- const char *domainname;
1944-{
1945- nl_catd new_catalog;
1946- char *new_name;
1947- size_t new_name_len;
1948- char *lang;
1949-
1950-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
1951- && defined HAVE_LOCALE_NULL
1952- lang = setlocale (LC_MESSAGES, NULL);
1953-#else
1954- lang = getenv ("LC_ALL");
1955- if (lang == NULL || lang[0] == '\0')
1956- {
1957- lang = getenv ("LC_MESSAGES");
1958- if (lang == NULL || lang[0] == '\0')
1959- lang = getenv ("LANG");
1960- }
1961-#endif
1962- if (lang == NULL || lang[0] == '\0')
1963- lang = "C";
1964-
1965- /* See whether name of currently used domain is asked. */
1966- if (domainname == NULL)
1967- return (char *) catalog_name;
1968-
1969- if (domainname[0] == '\0')
1970- domainname = default_catalog_name;
1971-
1972- /* Compute length of added path element. */
1973- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
1974- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
1975- + sizeof (".cat");
1976-
1977- new_name = (char *) malloc (new_name_len);
1978- if (new_name == NULL)
1979- return NULL;
1980-
1981- strcpy (new_name, PACKAGE);
1982- new_catalog = catopen (new_name, 0);
1983-
1984- if (new_catalog == (nl_catd) -1)
1985- {
1986- /* NLSPATH search didn't work, try absolute path */
1987- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
1988- PACKAGE);
1989- new_catalog = catopen (new_name, 0);
1990-
1991- if (new_catalog == (nl_catd) -1)
1992- {
1993- free (new_name);
1994- return (char *) catalog_name;
1995- }
1996- }
1997-
1998- /* Close old catalog. */
1999- if (catalog != (nl_catd) -1)
2000- catclose (catalog);
2001- if (catalog_name != default_catalog_name)
2002- free ((char *) catalog_name);
2003-
2004- catalog = new_catalog;
2005- catalog_name = new_name;
2006-
2007- return (char *) catalog_name;
2008-}
2009-
2010-char *
2011-bindtextdomain (domainname, dirname)
2012- const char *domainname;
2013- const char *dirname;
2014-{
2015-#if HAVE_SETENV || HAVE_PUTENV
2016- char *old_val, *new_val, *cp;
2017- size_t new_val_len;
2018-
2019- /* This does not make much sense here but to be compatible do it. */
2020- if (domainname == NULL)
2021- return NULL;
2022-
2023- /* Compute length of added path element. If we use setenv we don't need
2024- the first byts for NLSPATH=, but why complicate the code for this
2025- peanuts. */
2026- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
2027- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2028-
2029- old_val = getenv ("NLSPATH");
2030- if (old_val == NULL || old_val[0] == '\0')
2031- {
2032- old_val = NULL;
2033- new_val_len += 1 + sizeof (LOCALEDIR) - 1
2034- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2035- }
2036- else
2037- new_val_len += strlen (old_val);
2038-
2039- new_val = (char *) malloc (new_val_len);
2040- if (new_val == NULL)
2041- return NULL;
2042-
2043-# if HAVE_SETENV
2044- cp = new_val;
2045-# else
2046- cp = stpcpy (new_val, "NLSPATH=");
2047-# endif
2048-
2049- cp = stpcpy (cp, dirname);
2050- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
2051-
2052- if (old_val == NULL)
2053- {
2054-# if __STDC__
2055- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
2056-# else
2057-
2058- cp = stpcpy (cp, LOCALEDIR);
2059- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
2060-# endif
2061- }
2062- else
2063- stpcpy (cp, old_val);
2064-
2065-# if HAVE_SETENV
2066- setenv ("NLSPATH", new_val, 1);
2067- free (new_val);
2068-# else
2069- putenv (new_val);
2070- /* Do *not* free the environment entry we just entered. It is used
2071- from now on. */
2072-# endif
2073-
2074-#endif
2075-
2076- return (char *) domainname;
2077-}
2078-
2079-#undef gettext
2080-char *
2081-gettext (msg)
2082- const char *msg;
2083-{
2084- int msgid;
2085-
2086- if (msg == NULL || catalog == (nl_catd) -1)
2087- return (char *) msg;
2088-
2089- /* Get the message from the catalog. We always use set number 1.
2090- The message ID is computed by the function `msg_to_cat_id'
2091- which works on the table generated by `po-to-tbl'. */
2092- msgid = msg_to_cat_id (msg);
2093- if (msgid == -1)
2094- return (char *) msg;
2095-
2096- return catgets (catalog, 1, msgid, (char *) msg);
2097-}
2098-
2099-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
2100- for the one equal to msg. If it is found return the ID. In case when
2101- the string is not found return -1. */
2102-static int
2103-msg_to_cat_id (msg)
2104- const char *msg;
2105-{
2106- int cnt;
2107-
2108- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
2109- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
2110- return _msg_tbl[cnt]._msg_number;
2111-
2112- return -1;
2113-}
2114-
2115-
2116-/* @@ begin of epilog @@ */
2117-
2118-/* We don't want libintl.a to depend on any other library. So we
2119- avoid the non-standard function stpcpy. In GNU C Library this
2120- function is available, though. Also allow the symbol HAVE_STPCPY
2121- to be defined. */
2122-#if !_LIBC && !HAVE_STPCPY
2123-static char *
2124-stpcpy (dest, src)
2125- char *dest;
2126- const char *src;
2127-{
2128- while ((*dest++ = *src++) != '\0')
2129- /* Do nothing. */ ;
2130- return dest - 1;
2131-}
2132-#endif
2133--- lrzsz-0.12.20.safe/intl/ChangeLog 1998-04-26 09:22:35.000000000 -0400
2134+++ lrzsz-0.12.20/intl/ChangeLog 2004-09-12 14:40:34.349749000 -0400
2135@@ -1,1022 +1,4 @@
2136-1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
2137-
2138- * intlh.inst.in: Reformat copyright.
2139-
2140-1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
2141-
2142- * dcgettext.c (DCGETTEXT): Remove wrong comment.
2143-
2144-1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
2145-
2146- * Makefile.in (install-data): Don't change directory to install.
2147-
2148-1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
2149-
2150- * cat-compat.c: Fix copyright.
2151-
2152- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
2153-
2154- * loadmsgcat.c: Update copyright. Fix typos.
2155-
2156- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
2157- (_nl_make_l10nflist): Handle sponsor and revision correctly.
2158-
2159- * gettext.c: Update copyright.
2160- * gettext.h: Likewise.
2161- * hash-string.h: Likewise.
2162-
2163- * finddomain.c: Remoave dead code. Define strchr only if
2164- !HAVE_STRCHR.
2165-
2166- * explodename.c: Include <sys/types.h>.
2167-
2168- * explodename.c: Reformat copyright text.
2169- (_nl_explode_name): Fix typo.
2170-
2171- * dcgettext.c: Define and use __set_errno.
2172- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
2173- not defined.
2174-
2175- * bindtextdom.c: Pretty printing.
2176-
2177-1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
2178-
2179- * dcgettext.c (guess_category_value): Don't depend on
2180- HAVE_LC_MESSAGES. We don't need the macro here.
2181- Patch by Bruno Haible <haible@ilog.fr>.
2182-
2183- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
2184- macro. Instead use HAVE_LOCALE_NULL and define it when using
2185- glibc, as in dcgettext.c.
2186- Patch by Bruno Haible <haible@ilog.fr>.
2187-
2188- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
2189- Pinard.
2190-
2191-Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
2192-
2193- * Makefile.in: Implement handling of libtool.
2194-
2195- * gettextP.h: Change data structures for use of generic lowlevel
2196- i18n file handling.
2197-
2198-Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
2199-
2200- * textdomain.c: Put parentheses around arguments of memcpy macro
2201- definition.
2202- * localealias.c: Likewise.
2203- * l10nflist.c: Likewise.
2204- * finddomain.c: Likewise.
2205- * bindtextdom.c: Likewise.
2206- Reported by Thomas Esken.
2207-
2208-Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
2209-
2210- * textdomain.c: Move definition of `memcpy` macro to right
2211- position.
2212-
2213-Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
2214-
2215- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
2216- bcopy if not already defined. Reported by Thomas Esken.
2217- * bindtextdom.c: Likewise.
2218- * l10nflist.c: Likewise.
2219- * localealias.c: Likewise.
2220- * textdomain.c: Likewise.
2221-
2222-Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
2223-
2224- * Makefile.in (libdir): Change to use exec_prefix instead of
2225- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
2226-
2227-Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
2228-
2229- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
2230- so don't prepend uppercase `ISO' for only numeric arg.
2231-
2232-Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
2233-
2234- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
2235- definition of _GNU_SOURCE. Patch by Roland McGrath.
2236-
2237- * Makefile.in (uninstall): Fix another bug with `for' loop and
2238- empty arguments. Patch by Jim Meyering. Correct name os
2239- uninstalled files: no intl- prefix anymore.
2240-
2241- * Makefile.in (install-data): Again work around shells which
2242- cannot handle mpty for list. Reported by Jim Meyering.
2243-
2244-Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
2245-
2246- * Makefile.in (install): Split goal. Now depend on install-exec
2247- and install-data.
2248- (install-exec, install-data): New goals. Created from former
2249- install goal.
2250- Reported by Karl Berry.
2251-
2252-Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
2253-
2254- * Makefile.in (MKINSTALLDIRS): New variable. Path to
2255- mkinstalldirs script.
2256- (install): use MKINSTALLDIRS variable or if the script is not present
2257- try to find it in the $top_scrdir).
2258-
2259-Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
2260-
2261- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
2262- Grr. Work around by renaming the static version and use macros
2263- for renaming.
2264-
2265-Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
2266-
2267- * l10nflist.c: Correct presence test macros of __argz_* functions.
2268-
2269- * l10nflist.c: Include <argz.h> based on test of it instead when
2270- __argz_* functions are available.
2271- Reported by Andreas Schwab.
2272-
2273-Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
2274-
2275- * explodename.c, l10nflist.c: Define NULL for dumb systems.
2276-
2277-Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
2278-
2279- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
2280- result to __result to prevent name clash.
2281-
2282- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
2283- get prototype for stpcpy and strcasecmp.
2284-
2285- * intlh.inst.in, libgettext.h: Move declaration of
2286- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
2287- from gcc's -Wnested-extern option.
2288-
2289-Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
2290-
2291- * Makefile.in (install): Remove comment.
2292-
2293-Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
2294-
2295- * Makefile.in (install): Work around for another Buglix stupidity.
2296- Always use an `else' close for `if's. Reported by Nelson Beebe.
2297-
2298- * Makefile.in (intlh.inst): Correct typo in phony rule.
2299- Reported by Nelson Beebe.
2300-
2301-Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
2302-
2303- * dcgettext.c (read_alias_file): Rename variable alloca_list to
2304- block_list as the macro calls assume.
2305- Patch by Eric Backus.
2306-
2307- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
2308- malloc.
2309- (read_alias_file): Rename varriabe alloca_list to block_list as the
2310- macro calls assume.
2311- Patch by Eric Backus.
2312-
2313- * l10nflist.c: Correct conditional for <argz.h> inclusion.
2314- Reported by Roland McGrath.
2315-
2316- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
2317- all-@USE_NLS@.
2318-
2319- * Makefile.in (install): intlh.inst comes from local dir, not
2320- $(srcdir).
2321-
2322- * Makefile.in (intlh.inst): Special handling of this goal. If
2323- used in gettext, this is really a rul to construct this file. If
2324- used in any other package it is defined as a .PHONY rule with
2325- empty body.
2326-
2327- * finddomain.c: Extract locale file information handling into
2328- l10nfile.c. Rename local stpcpy__ function to stpcpy.
2329-
2330- * dcgettext.c (stpcpy): Add local definition.
2331-
2332- * l10nflist.c: Solve some portability problems. Patches partly by
2333- Thomas Esken. Add local definition of stpcpy.
2334-
2335-Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
2336-
2337- * intlh.inst.in: Don't depend including <locale.h> on
2338- HAVE_LOCALE_H. Instead configure must rewrite this fiile
2339- depending on the result of the configure run.
2340-
2341- * Makefile.in (install): libintl.inst is now called intlh.inst.
2342- Add rules for updating intlh.inst from intlh.inst.in.
2343-
2344- * libintl.inst: Renamed to intlh.inst.in.
2345-
2346- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
2347- because gcc has __buitlin_alloca.
2348- Reported by Roland McGrath.
2349-
2350-Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
2351-
2352- * Makefile.in (installcheck): New goal to fulfill needs of
2353- automake's distcheck.
2354-
2355- * Makefile.in (install): Reorder commands so that VERSION is
2356- found.
2357-
2358- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
2359- @datadir@/gettext.
2360- (COMSRCS): Add l10nfile.c.
2361- (OBJECTS): Add l10nfile.o.
2362- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
2363- (DISTFILE.gettext): Remove $(DISTFILES.common).
2364- (all-gettext): Remove goal.
2365- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
2366- package but gettext itself should install libintl.h + headers.
2367- (dist): Extend goal to work for gettext, too.
2368- (dist-gettext): Remove goal.
2369-
2370- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
2371-
2372-Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
2373-
2374- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
2375- find_l10nfile.
2376-
2377-Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
2378-
2379- * l10nflist.c (__argz_next): Add definition.
2380-
2381- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
2382- code. Use new l10nfile handling.
2383-
2384- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
2385- alloca code.
2386-
2387- * l10nflist.c: Initial revision.
2388-
2389-Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
2390-
2391- * Makefile.in (all-gettext): New goal. Same as all-yes.
2392-
2393-Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
2394-
2395- * Makefile.in (gettextsrcdir): Define using @datadir@.
2396-
2397-Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
2398-
2399- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
2400-
2401-Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
2402-
2403- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
2404- with external declaration.
2405-
2406-Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
2407-
2408- * Makefile.in (all-no): Rename from all_no.
2409-
2410-Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
2411-
2412- * gettextP.h [loaded_domain]: Array `successor' must now contain up
2413- to 63 elements (because of codeset name normalization).
2414-
2415- * finddomain.c: Implement codeset name normalization.
2416-
2417-Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
2418-
2419- * Makefile.in (all): Define to `all-@USE_NLS@'.
2420- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
2421- is former all.
2422-
2423-Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
2424-
2425- * localealias.c (alias_compare): Increment string pointers in loop
2426- of strcasecmp replacement.
2427-
2428-Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
2429-
2430- * Makefile.in (install-src): Who commented this goal out ? :-)
2431-
2432-Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
2433-
2434- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
2435- should not effect it because a missing catalog is no error.
2436- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
2437-
2438-Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
2439-
2440- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
2441- shell scripts.
2442-
2443-Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2444-
2445- * Makefile.in (install-src): Only install library and header when
2446- we use the own implementation. Don't do it when using the
2447- system's gettext or catgets functions.
2448-
2449- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
2450-
2451-Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
2452-
2453- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
2454- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
2455- Use PARAMS instead of __P. Suggested by Roland McGrath.
2456-
2457-Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
2458-
2459- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
2460- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
2461-
2462-Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
2463-
2464- * Makefile.in (install-src):
2465- Install libintl.inst instead of libintl.h.install.
2466-
2467-Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
2468-
2469- * cat-compat.c (textdomain):
2470- Reverse order in which files are tried you load. First
2471- try local file, when this failed absolute path.
2472-
2473-Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2474-
2475- * cat-compat.c (bindtextdomain): Add missing { }.
2476-
2477-Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
2478-
2479- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
2480-
2481- * Makefile.in:
2482- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
2483-
2484-Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
2485-
2486- * hash-string.h: Capitalize arguments of macros.
2487-
2488-Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
2489-
2490- * Makefile.in (DISTFILES): Prevent files names longer than 13
2491- characters. libintl.h.glibc->libintl.glibc,
2492- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
2493-
2494-Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
2495-
2496- * dcgettext.c: Fix bug in preprocessor conditionals.
2497-
2498-Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2499-
2500- * libgettext.h: Solaris cc does not understand
2501- #if !SYMBOL1 && !SYMBOL2. Sad but true.
2502-
2503-Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
2504-
2505- * hash-string.h (hash_string):
2506- Fix for machine with >32 bit `unsigned long's.
2507-
2508- * dcgettext.c (DCGETTEXT):
2509- Fix horrible bug in loop for alternative translation.
2510-
2511-Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
2512-
2513- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
2514- Some further simplifications in message number generation.
2515-
2516-Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
2517-
2518- * libintl.h.glibc: Use __const instead of const in prototypes.
2519-
2520- * Makefile.in (install-src):
2521- Install libintl.h.install instead of libintl.h. This
2522- is a stripped-down version. Suggested by Peter Miller.
2523-
2524- * libintl.h.install, libintl.h.glibc: Initial revision.
2525-
2526- * localealias.c (_nl_expand_alias, read_alias_file):
2527- Protect prototypes in type casts by __P.
2528-
2529-Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
2530-
2531- * hash-string.h: Correct prototype for hash_string.
2532-
2533-Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
2534-
2535- * hash-string.h (hash_string): Add prototype.
2536-
2537- * gettextP.h: Fix copyright.
2538- (SWAP): Add prototype.
2539-
2540-Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
2541-
2542- * localealias.c (read_alias_file): Forgot sizeof.
2543- Avoid calling *printf function. This introduces a big overhead.
2544- Patch by Roland McGrath.
2545-
2546-Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
2547-
2548- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
2549-
2550- * finddomain.c (stpcpy):
2551- Define substitution function local. The macro was to flaky.
2552-
2553- * cat-compat.c: Fix typo.
2554-
2555- * xopen-msg.sed, linux-msg.sed:
2556- While bringing message number to right place only accept digits.
2557-
2558- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
2559- leading 0s we don't need to remove them. Reported by Marcus
2560- Daniels.
2561-
2562- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
2563- dependency. Reported by Marcus Daniels.
2564-
2565- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
2566- Generally cleanup using #if instead of #ifndef.
2567-
2568- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
2569-
2570-Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
2571-
2572- * Makefile.in (install-src): Don't install libintl.h and libintl.a
2573- if we use an available gettext implementation.
2574-
2575-Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
2576-
2577- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
2578- by Franc,ois Pinard.
2579-
2580- * libgettext.h: Use #if instead of #ifdef/#ifndef.
2581-
2582- * finddomain.c:
2583- Comments describing what has to be done should start with FIXME.
2584-
2585-Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
2586-
2587- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
2588- DISTFILES.common names the files common to both dist goals.
2589- DISTFILES.gettext are the files only distributed in GNU gettext.
2590-
2591-Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
2592-
2593- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
2594- This was necessary since a change in _nl_find_msg several weeks
2595- ago. I really don't know this is still not fixed.
2596-
2597-Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
2598-
2599- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
2600- might mark a special condition.
2601-
2602- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
2603-
2604- * Makefile.in (dist): Suppress error message when ln failed.
2605- Get files from $(srcdir) explicitly.
2606-
2607- * libgettext.h (gettext_const): Rename to gettext_noop.
2608-
2609-Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
2610-
2611- * finddomain.c (make_entry_rec):
2612- Protect against wrong locale names by testing mask.
2613-
2614- * libgettext.h (gettext_const): Add macro definition.
2615- Capitalize macro arguments.
2616-
2617-Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
2618-
2619- * finddomain.c (_nl_find_domain):
2620- Test for pointer != NULL before accessing value.
2621- Reported by Tom Tromey.
2622-
2623- * gettext.c (NULL):
2624- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
2625-
2626-Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
2627-
2628- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
2629-
2630-Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
2631-
2632- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
2633-
2634- * localealias.c (alias_compare):
2635- Peter Miller reported that tolower in some systems is
2636- even dumber than I thought. Protect call by `isupper'.
2637-
2638-Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
2639-
2640- * Makefile.in (libdir, includedir): New variables.
2641- (install-src): Install libintl.a and libintl.h in correct dirs.
2642-
2643-Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
2644-
2645- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
2646-
2647- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
2648-
2649- * localealias.c:
2650- Fix typo and superflous test. Reported by Christian von Roques.
2651-
2652-Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
2653-
2654- * finddomain.c (_nl_find_domain):
2655- Correct some remainder from the pre-CEN syntax. Now
2656- we don't have a constant number of successors anymore.
2657-
2658-Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
2659-
2660- * Makefile.in (DISTFILES): Add libintl.h.glibc.
2661-
2662- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
2663- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
2664-
2665- * loadmsgcat.c: Forget to continue #if line.
2666-
2667- * localealias.c:
2668- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
2669- space clean.
2670-
2671- * dcgettext.c, finddomain.c: Better comment to last change.
2672-
2673- * loadmsgcat.c:
2674- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
2675- __fstat, __open, __close, __read, __mmap, and __munmap resp
2676- to keep ANSI C name space clean.
2677-
2678- * finddomain.c:
2679- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
2680-
2681- * dcgettext.c:
2682- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
2683- keep ANSI C name space clean.
2684-
2685- * libgettext.h:
2686- Include sys/types.h for those old SysV systems out there.
2687- Reported by Francesco Potorti`.
2688-
2689- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
2690-
2691- * bindtextdom.c: Include all those standard headers
2692- unconditionally if _LIBC is defined.
2693-
2694- * finddomain.c: Fix 2 times defiend -> defined.
2695-
2696- * textdomain.c: Include libintl.h instead of libgettext.h when
2697- compiling for glibc. Include all those standard headers
2698- unconditionally if _LIBC is defined.
2699-
2700- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
2701-
2702- * gettext.c:
2703- Include libintl.h instead of libgettext.h when compiling for glibc.
2704- Get NULL from stddef.h if we compile for glibc.
2705-
2706- * finddomain.c: Include libintl.h instead of libgettext.h when
2707- compiling for glibc. Include all those standard headers
2708- unconditionally if _LIBC is defined.
2709-
2710- * dcgettext.c: Include all those standard headers unconditionally
2711- if _LIBC is defined.
2712-
2713- * dgettext.c: If compiled in glibc include libintl.h instead of
2714- libgettext.h.
2715- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
2716-
2717- * dcgettext.c: If compiled in glibc include libintl.h instead of
2718- libgettext.h.
2719- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
2720-
2721- * bindtextdom.c:
2722- If compiled in glibc include libintl.h instead of libgettext.h.
2723-
2724-Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
2725-
2726- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
2727- Reported by Marcus Daniels.
2728-
2729- * cat-compat.c (bindtextdomain):
2730- String used in putenv must not be recycled.
2731- Reported by Marcus Daniels.
2732-
2733- * libgettext.h (__USE_GNU_GETTEXT):
2734- Additional symbol to signal that we use GNU gettext
2735- library.
2736-
2737- * cat-compat.c (bindtextdomain):
2738- Fix bug with the strange stpcpy replacement.
2739- Reported by Nelson Beebe.
2740-
2741-Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
2742-
2743- * cat-compat.c: Include <string.h> for stpcpy prototype.
2744-
2745- * localealias.c (read_alias_file):
2746- While expand strdup code temporary variable `cp' hided
2747- higher level variable with same name. Rename to `tp'.
2748-
2749- * textdomain.c (textdomain):
2750- Avoid warning by using temporary variable in strdup code.
2751-
2752- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
2753-
2754-Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
2755-
2756- * localealias.c (alias_compare):
2757- Use strcasecmp() only if available. Else use
2758- implementation in place.
2759-
2760- * intl-compat.c:
2761- Wrapper functions now call *__ functions instead of __*.
2762-
2763- * libgettext.h: Declare prototypes for *__ functions instead for __*.
2764-
2765- * cat-compat.c, loadmsgcat.c:
2766- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2767- of the standard libc and so prevent libintl.a from being used
2768- standalone.
2769-
2770- * bindtextdom.c:
2771- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2772- of the standard libc and so prevent libintl.a from being used
2773- standalone.
2774- Rename to bindtextdomain__ if not used in GNU C Library.
2775-
2776- * dgettext.c:
2777- Rename function to dgettext__ if not used in GNU C Library.
2778-
2779- * gettext.c:
2780- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2781- of the standard libc and so prevent libintl.a from being used
2782- standalone.
2783- Functions now called gettext__ if not used in GNU C Library.
2784-
2785- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
2786- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2787- of the standard libc and so prevent libintl.a from being used
2788- standalone.
2789-
2790-Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
2791-
2792- * finddomain.c: Correct some bugs in handling of CEN standard
2793- locale definitions.
2794-
2795-Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
2796-
2797- * finddomain.c: Implement CEN syntax.
2798-
2799- * gettextP.h (loaded_domain): Extend number of successors to 31.
2800-
2801-Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
2802-
2803- * Makefile.in (aliaspath): Remove path to X11 locale dir.
2804-
2805- * Makefile.in: Make install-src depend on install. This helps
2806- gettext to install the sources and other packages can use the
2807- install goal.
2808-
2809-Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
2810-
2811- * Makefile.in (uninstall): Remove stuff installed by install-src.
2812-
2813-Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
2814-
2815- * VERSION.in: Initial revision.
2816-
2817- * Makefile.in (DISTFILES):
2818- Add VERSION file. This is not necessary for gettext, but
2819- for other packages using this library.
2820-
2821-Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
2822-
2823- * gettextP.h (_nl_find_domain):
2824- New prototype after changing search strategy.
2825-
2826- * finddomain.c (_nl_find_domain):
2827- We now try only to find a specified catalog. Fall back to other
2828- catalogs listed in the locale list is now done in __dcgettext.
2829-
2830- * dcgettext.c (__dcgettext):
2831- Now we provide message fall back even to different languages.
2832- I.e. if a message is not available in one language all the other
2833- in the locale list a tried. Formerly fall back was only possible
2834- within one language. Implemented by moving one loop from
2835- _nl_find_domain to here.
2836-
2837-Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
2838-
2839- * Makefile.in (gettextsrcdir):
2840- Directory where source of GNU gettext library are made
2841- available.
2842- (INSTALL, INSTALL_DATA): Programs used for installing sources.
2843- (gettext-src): New. Rule to install GNU gettext sources for use in
2844- gettextize shell script.
2845-
2846-Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
2847-
2848- * loadmsgcat.c (_nl_load_domain):
2849- Use mmap for loading only when munmap function is
2850- also available.
2851-
2852- * Makefile.in (install): Depend on `all' goal.
2853-
2854-Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
2855-
2856- * localealias.c (read_alias_file):
2857- Do not overwrite '\n' when terminating alias value string.
2858-
2859- * localealias.c (read_alias_file):
2860- Handle long lines. Ignore the rest not fitting in
2861- the buffer after the initial `fgets' call.
2862-
2863-Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
2864-
2865- * gettextP.h (_nl_load_domain):
2866- Add prototype, replacing prototype for _nl_load_msg_cat.
2867-
2868- * finddomain.c (_nl_find_domain):
2869- Remove unneeded variable filename and filename_len.
2870- (expand_alias): Remove prototype because functions does not
2871- exist anymore.
2872-
2873- * localealias.c (read_alias_file):
2874- Change type of fname_len parameter to int.
2875- (xmalloc): Add prototype.
2876-
2877- * loadmsgcat.c: Better prototypes for xmalloc.
2878-
2879-Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
2880-
2881- * finddomain.c (_nl_find_domain):
2882- Allow alias name to be constructed from the four components.
2883-
2884- * Makefile.in (aliaspath): New variable. Set to preliminary value.
2885- (SOURCES): Add localealias.c.
2886- (OBJECTS): Add localealias.o.
2887-
2888- * gettextP.h: Add prototype for _nl_expand_alias.
2889-
2890- * finddomain.c: Aliasing handled in intl/localealias.c.
2891-
2892- * localealias.c: Aliasing for locale names.
2893-
2894- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
2895-
2896-Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
2897-
2898- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
2899-
2900- * cat-compat.c (bindtextdomain):
2901- Correct implementation. dirname parameter was not used.
2902- Reported by Marcus Daniels.
2903-
2904- * gettextP.h (loaded_domain):
2905- New fields `successor' and `decided' for oo, lazy
2906- message handling implementation.
2907-
2908- * dcgettext.c:
2909- Adopt for oo, lazy message handliing.
2910- Now we can inherit translations from less specific locales.
2911- (find_msg): New function.
2912-
2913- * loadmsgcat.c, finddomain.c:
2914- Complete rewrite. Implement oo, lazy message handling :-).
2915- We now have an additional environment variable `LANGUAGE' with
2916- a higher priority than LC_ALL for the LC_MESSAGE locale.
2917- Here we can set a colon separated list of specifications each
2918- of the form `language[_territory[.codeset]][@modifier]'.
2919-
2920-Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
2921-
2922- * finddomain.c (unistd.h):
2923- Include to get _PC_PATH_MAX defined on system having it.
2924-
2925-Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
2926-
2927- * finddomain.c (stpcpy): Include prototype.
2928-
2929- * Makefile.in (dist): Remove `copying instead' message.
2930-
2931-Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
2932-
2933- * Makefile.in (ID, TAGS): Do not use $^.
2934-
2935-Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
2936-
2937- * Makefile.in (TAGS, ID): Use $^ as command argument.
2938- (TAGS): Give etags -o option t write to current directory,
2939- not $(srcdir).
2940- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
2941- (distclean): Remove ID.
2942-
2943-Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
2944-
2945- * Makefile.in (gnulocaledir):
2946- New variable, always using share/ for data directory.
2947- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
2948-
2949- * finddomain.c (_nl_default_dirname):
2950- Set to GNULOCALEDIR, because it always has to point
2951- to the directory where GNU gettext Library writes it to.
2952-
2953- * intl-compat.c (textdomain, bindtextdomain):
2954- Undefine macros before function definition.
2955-
2956-Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
2957-
2958- * libgettext.h (_LIBINTL_H):
2959- Protect definition in case where this file is included as
2960- libgettext.h on Solaris machines. Add comment about this.
2961-
2962-Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
2963-
2964- * intl-compat.c (textdomain): Correct typo.
2965-
2966-Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
2967-
2968- * dcgettext.c (dcgettext): Function now called __dcgettext.
2969-
2970- * dgettext.c (dgettext): Now called __dgettext and calls
2971- __dcgettext.
2972-
2973- * gettext.c (gettext):
2974- Function now called __gettext and calls __dgettext.
2975-
2976- * textdomain.c (textdomain): Function now called __textdomain.
2977-
2978- * bindtextdom.c (bindtextdomain): Function now called
2979- __bindtextdomain.
2980-
2981- * intl-compat.c: Initial revision.
2982-
2983- * Makefile.in (SOURCES): Add intl-compat.c.
2984- (OBJECTS): We always compile the GNU gettext library functions.
2985- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
2986- and intl-compat.o.
2987- (GETTOBJS): Contains now only intl-compat.o.
2988-
2989- * libgettext.h:
2990- Re-include protection matches dualistic character of libgettext.h.
2991- For all functions in GNU gettext library define __ counter part.
2992-
2993- * finddomain.c (strchr): Define as index if not found in C library.
2994- (_nl_find_domain): For relative paths paste / in between.
2995-
2996-Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
2997-
2998- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
2999-
3000- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
3001- A little bit better comments.
3002-
3003-Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
3004-
3005- * Makefile.in:
3006- po-mode.el, makelinks, combine-sh are now found in ../misc.
3007-
3008- * po-mode.el, makelinks, combine-sh, elisp-comp:
3009- Moved to ../misc/.
3010-
3011- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
3012-
3013-Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
3014-
3015- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
3016- (install-data, uninstall): Install/uninstall .elc file.
3017-
3018- * po-mode.el (Installation comment):
3019- Add .pox as possible extension of .po files.
3020-
3021-Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
3022-
3023- * elisp-comp: Complete new version by Franc,ois: This does not
3024- fail when not compiling in the source directory.
3025-
3026-Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
3027-
3028- * Makefile.in (../po/cat-id-tbl.o):
3029- Use $(MAKE) instead of make for recursive make.
3030-
3031- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
3032- (install-exec): Add missing dummy goal.
3033- (install-data, uninstall): @ in multi-line shell command at
3034- beginning, not in front of echo. Reported by Eric Backus.
3035-
3036-Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
3037-
3038- * Makefile.in (DISTFILES):
3039- Rename libgettext.perl to gettext.perl to fit in 14 chars
3040- file systems.
3041-
3042- * gettext.perl:
3043- Rename to gettext.perl to fit in 14 chars file systems.
3044-
3045-Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
3046-
3047- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
3048-
3049-Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
3050-
3051- * po2tbl.sed.in: Pretty printing.
3052-
3053- * linux-msg.sed, xopen-msg.sed:
3054- Correct bugs with handling substitute flags in branches.
3055-
3056- * hash-string.h (hash_string):
3057- Old K&R compilers don't under stand `unsigned char'.
3058-
3059- * gettext.h (nls_uint32):
3060- Some old K&R compilers (eg HP) don't understand `unsigned int'.
3061-
3062- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
3063-
3064-Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
3065-
3066- * Makefile.in (ELCFILES): New variable.
3067- (DISTFILES): Add elisp-comp.
3068- Add implicit rule for .el -> .elc compilation.
3069- (install-data): install $ELCFILES
3070- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
3071-
3072- * elisp-comp: Initial revision
3073-
3074-Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
3075-
3076- * Makefile.in:
3077- cat-id-tbl.c is now found in po/. This enables us to use an identical
3078- intl/ directory in all packages.
3079-
3080- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
3081-
3082- * textdomain.c: fix typo (#if def -> #if defined)
3083-
3084-Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
3085-
3086- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
3087- (DISTFILES,distclean): move tupdate.perl to src/
3088-
3089- * po-to-tbl.sed.in:
3090- add additional jump to clear change flag to recognize multiline strings
3091-
3092-Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
3093-
3094- * textdomain.c: Protect inclusion of stdlib.h and string.h.
3095-
3096- * loadmsgcat.c: Protect inclusion of stdlib.h.
3097-
3098- * libgettext.h: Protect inclusion of locale.h.
3099- Allow use in C++ programs.
3100- Define NULL is not happened already.
3101-
3102- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
3103- po-to-tbl.sed.
3104- (distclean): remove po-to-tbl.sed and tupdate.perl.
3105-
3106- * tupdate.perl.in: Substitute Perl path even in exec line.
3107- Don't include entries without translation from old .po file.
3108-
3109-Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
3110-
3111- * tupdate.perl.in: use "Updated: " in msgid "".
3112-
3113- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
3114- Define getenv if !__STDC__.
3115-
3116- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
3117- Define free if !__STDC__.
3118-
3119- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3120- Define free if !__STDC__.
3121-
3122- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3123-
3124-Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
3125-
3126- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
3127- Remove unneeded $(srcdir) from Makefile.in dependency.
3128-
3129- * makelinks: Add copyright and short description.
3130-
3131- * po-mode.el: Last version for 0.7.
3132-
3133- * tupdate.perl.in: Fix die message.
3134-
3135- * dcgettext.c: Protect include of string.h.
3136-
3137- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
3138-
3139- * finddomain.c: Some corrections in includes.
3140-
3141- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
3142-
3143- * po-to-tbl.sed: Adopt for new .po file format.
3144-
3145- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
3146-
3147-Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
3148-
3149- * tupdate.perl.in: Complete rewrite for new .po file format.
3150+2004-01-29 GNU <bug-gnu-gettext@gnu.org>
3151
3152-Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
3153+ * Version 0.14.1 released.
3154
3155- * First official release. This directory contains all the code
3156- needed to internationalize own packages. It provides functions
3157- which allow to use the X/Open catgets function with an interface
3158- like the Uniforum gettext function. For system which does not
3159- have neither of those a complete implementation is provided.
3160--- lrzsz-0.12.20.safe/intl/config.charset 1969-12-31 19:00:00.000000000 -0500
3161+++ lrzsz-0.12.20/intl/config.charset 2004-09-12 14:40:34.354748240 -0400
3162@@ -0,0 +1,608 @@
3163+#! /bin/sh
3164+# Output a system dependent table of character encoding aliases.
3165+#
3166+# Copyright (C) 2000-2004 Free Software Foundation, Inc.
3167+#
3168+# This program is free software; you can redistribute it and/or modify it
3169+# under the terms of the GNU Library General Public License as published
3170+# by the Free Software Foundation; either version 2, or (at your option)
3171+# any later version.
3172+#
3173+# This program is distributed in the hope that it will be useful,
3174+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3175+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3176+# Library General Public License for more details.
3177+#
3178+# You should have received a copy of the GNU Library General Public
3179+# License along with this program; if not, write to the Free Software
3180+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3181+# USA.
3182+#
3183+# The table consists of lines of the form
3184+# ALIAS CANONICAL
3185+#
3186+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
3187+# ALIAS is compared in a case sensitive way.
3188+#
3189+# CANONICAL is the GNU canonical name for this character encoding.
3190+# It must be an encoding supported by libiconv. Support by GNU libc is
3191+# also desirable. CANONICAL is case insensitive. Usually an upper case
3192+# MIME charset name is preferred.
3193+# The current list of GNU canonical charset names is as follows.
3194+#
3195+# name MIME? used by which systems
3196+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
3197+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
3198+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
3199+# ISO-8859-3 Y glibc solaris
3200+# ISO-8859-4 Y osf solaris freebsd darwin
3201+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
3202+# ISO-8859-6 Y glibc aix hpux solaris
3203+# ISO-8859-7 Y glibc aix hpux irix osf solaris
3204+# ISO-8859-8 Y glibc aix hpux osf solaris
3205+# ISO-8859-9 Y glibc aix hpux irix osf solaris
3206+# ISO-8859-13 glibc
3207+# ISO-8859-14 glibc
3208+# ISO-8859-15 glibc aix osf solaris freebsd
3209+# KOI8-R Y glibc solaris freebsd darwin
3210+# KOI8-U Y glibc freebsd darwin
3211+# KOI8-T glibc
3212+# CP437 dos
3213+# CP775 dos
3214+# CP850 aix osf dos
3215+# CP852 dos
3216+# CP855 dos
3217+# CP856 aix
3218+# CP857 dos
3219+# CP861 dos
3220+# CP862 dos
3221+# CP864 dos
3222+# CP865 dos
3223+# CP866 freebsd darwin dos
3224+# CP869 dos
3225+# CP874 woe32 dos
3226+# CP922 aix
3227+# CP932 aix woe32 dos
3228+# CP943 aix
3229+# CP949 osf woe32 dos
3230+# CP950 woe32 dos
3231+# CP1046 aix
3232+# CP1124 aix
3233+# CP1125 dos
3234+# CP1129 aix
3235+# CP1250 woe32
3236+# CP1251 glibc solaris darwin woe32
3237+# CP1252 aix woe32
3238+# CP1253 woe32
3239+# CP1254 woe32
3240+# CP1255 glibc woe32
3241+# CP1256 woe32
3242+# CP1257 woe32
3243+# GB2312 Y glibc aix hpux irix solaris freebsd darwin
3244+# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
3245+# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
3246+# EUC-TW glibc aix hpux irix osf solaris
3247+# BIG5 Y glibc aix hpux osf solaris freebsd darwin
3248+# BIG5-HKSCS glibc solaris
3249+# GBK glibc aix osf solaris woe32 dos
3250+# GB18030 glibc solaris
3251+# SHIFT_JIS Y hpux osf solaris freebsd darwin
3252+# JOHAB glibc solaris woe32
3253+# TIS-620 glibc aix hpux osf solaris
3254+# VISCII Y glibc
3255+# TCVN5712-1 glibc
3256+# GEORGIAN-PS glibc
3257+# HP-ROMAN8 hpux
3258+# HP-ARABIC8 hpux
3259+# HP-GREEK8 hpux
3260+# HP-HEBREW8 hpux
3261+# HP-TURKISH8 hpux
3262+# HP-KANA8 hpux
3263+# DEC-KANJI osf
3264+# DEC-HANYU osf
3265+# UTF-8 Y glibc aix hpux osf solaris
3266+#
3267+# Note: Names which are not marked as being a MIME name should not be used in
3268+# Internet protocols for information interchange (mail, news, etc.).
3269+#
3270+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
3271+# must understand both names and treat them as equivalent.
3272+#
3273+# The first argument passed to this file is the canonical host specification,
3274+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
3275+# or
3276+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
3277+
3278+host="$1"
3279+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
3280+echo "# This file contains a table of character encoding aliases,"
3281+echo "# suitable for operating system '${os}'."
3282+echo "# It was automatically generated from config.charset."
3283+# List of references, updated during installation:
3284+echo "# Packages using this file: "
3285+case "$os" in
3286+ linux-gnulibc1*)
3287+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
3288+ # localcharset.c falls back to using the full locale name
3289+ # from the environment variables.
3290+ echo "C ASCII"
3291+ echo "POSIX ASCII"
3292+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
3293+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
3294+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
3295+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
3296+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
3297+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
3298+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
3299+ sv_FI sv_SE; do
3300+ echo "$l ISO-8859-1"
3301+ echo "$l.iso-8859-1 ISO-8859-1"
3302+ echo "$l.iso-8859-15 ISO-8859-15"
3303+ echo "$l.iso-8859-15@euro ISO-8859-15"
3304+ echo "$l@euro ISO-8859-15"
3305+ echo "$l.cp-437 CP437"
3306+ echo "$l.cp-850 CP850"
3307+ echo "$l.cp-1252 CP1252"
3308+ echo "$l.cp-1252@euro CP1252"
3309+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
3310+ echo "$l.utf-8 UTF-8"
3311+ echo "$l.utf-8@euro UTF-8"
3312+ done
3313+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
3314+ sl_SI sr sr_CS sr_YU; do
3315+ echo "$l ISO-8859-2"
3316+ echo "$l.iso-8859-2 ISO-8859-2"
3317+ echo "$l.cp-852 CP852"
3318+ echo "$l.cp-1250 CP1250"
3319+ echo "$l.utf-8 UTF-8"
3320+ done
3321+ for l in mk mk_MK ru ru_RU; do
3322+ echo "$l ISO-8859-5"
3323+ echo "$l.iso-8859-5 ISO-8859-5"
3324+ echo "$l.koi8-r KOI8-R"
3325+ echo "$l.cp-866 CP866"
3326+ echo "$l.cp-1251 CP1251"
3327+ echo "$l.utf-8 UTF-8"
3328+ done
3329+ for l in ar ar_SA; do
3330+ echo "$l ISO-8859-6"
3331+ echo "$l.iso-8859-6 ISO-8859-6"
3332+ echo "$l.cp-864 CP864"
3333+ #echo "$l.cp-868 CP868" # not a commonly used encoding
3334+ echo "$l.cp-1256 CP1256"
3335+ echo "$l.utf-8 UTF-8"
3336+ done
3337+ for l in el el_GR gr gr_GR; do
3338+ echo "$l ISO-8859-7"
3339+ echo "$l.iso-8859-7 ISO-8859-7"
3340+ echo "$l.cp-869 CP869"
3341+ echo "$l.cp-1253 CP1253"
3342+ echo "$l.cp-1253@euro CP1253"
3343+ echo "$l.utf-8 UTF-8"
3344+ echo "$l.utf-8@euro UTF-8"
3345+ done
3346+ for l in he he_IL iw iw_IL; do
3347+ echo "$l ISO-8859-8"
3348+ echo "$l.iso-8859-8 ISO-8859-8"
3349+ echo "$l.cp-862 CP862"
3350+ echo "$l.cp-1255 CP1255"
3351+ echo "$l.utf-8 UTF-8"
3352+ done
3353+ for l in tr tr_TR; do
3354+ echo "$l ISO-8859-9"
3355+ echo "$l.iso-8859-9 ISO-8859-9"
3356+ echo "$l.cp-857 CP857"
3357+ echo "$l.cp-1254 CP1254"
3358+ echo "$l.utf-8 UTF-8"
3359+ done
3360+ for l in lt lt_LT lv lv_LV; do
3361+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
3362+ echo "$l ISO-8859-13"
3363+ done
3364+ for l in ru_UA uk uk_UA; do
3365+ echo "$l KOI8-U"
3366+ done
3367+ for l in zh zh_CN; do
3368+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
3369+ echo "$l GB2312"
3370+ done
3371+ for l in ja ja_JP ja_JP.EUC; do
3372+ echo "$l EUC-JP"
3373+ done
3374+ for l in ko ko_KR; do
3375+ echo "$l EUC-KR"
3376+ done
3377+ for l in th th_TH; do
3378+ echo "$l TIS-620"
3379+ done
3380+ for l in fa fa_IR; do
3381+ #echo "$l ISIRI-3342" # a broken encoding
3382+ echo "$l.utf-8 UTF-8"
3383+ done
3384+ ;;
3385+ linux* | *-gnu*)
3386+ # With glibc-2.1 or newer, we don't need any canonicalization,
3387+ # because glibc has iconv and both glibc and libiconv support all
3388+ # GNU canonical names directly. Therefore, the Makefile does not
3389+ # need to install the alias file at all.
3390+ # The following applies only to glibc-2.0.x and older libcs.
3391+ echo "ISO_646.IRV:1983 ASCII"
3392+ ;;
3393+ aix*)
3394+ echo "ISO8859-1 ISO-8859-1"
3395+ echo "ISO8859-2 ISO-8859-2"
3396+ echo "ISO8859-5 ISO-8859-5"
3397+ echo "ISO8859-6 ISO-8859-6"
3398+ echo "ISO8859-7 ISO-8859-7"
3399+ echo "ISO8859-8 ISO-8859-8"
3400+ echo "ISO8859-9 ISO-8859-9"
3401+ echo "ISO8859-15 ISO-8859-15"
3402+ echo "IBM-850 CP850"
3403+ echo "IBM-856 CP856"
3404+ echo "IBM-921 ISO-8859-13"
3405+ echo "IBM-922 CP922"
3406+ echo "IBM-932 CP932"
3407+ echo "IBM-943 CP943"
3408+ echo "IBM-1046 CP1046"
3409+ echo "IBM-1124 CP1124"
3410+ echo "IBM-1129 CP1129"
3411+ echo "IBM-1252 CP1252"
3412+ echo "IBM-eucCN GB2312"
3413+ echo "IBM-eucJP EUC-JP"
3414+ echo "IBM-eucKR EUC-KR"
3415+ echo "IBM-eucTW EUC-TW"
3416+ echo "big5 BIG5"
3417+ echo "GBK GBK"
3418+ echo "TIS-620 TIS-620"
3419+ echo "UTF-8 UTF-8"
3420+ ;;
3421+ hpux*)
3422+ echo "iso88591 ISO-8859-1"
3423+ echo "iso88592 ISO-8859-2"
3424+ echo "iso88595 ISO-8859-5"
3425+ echo "iso88596 ISO-8859-6"
3426+ echo "iso88597 ISO-8859-7"
3427+ echo "iso88598 ISO-8859-8"
3428+ echo "iso88599 ISO-8859-9"
3429+ echo "iso885915 ISO-8859-15"
3430+ echo "roman8 HP-ROMAN8"
3431+ echo "arabic8 HP-ARABIC8"
3432+ echo "greek8 HP-GREEK8"
3433+ echo "hebrew8 HP-HEBREW8"
3434+ echo "turkish8 HP-TURKISH8"
3435+ echo "kana8 HP-KANA8"
3436+ echo "tis620 TIS-620"
3437+ echo "big5 BIG5"
3438+ echo "eucJP EUC-JP"
3439+ echo "eucKR EUC-KR"
3440+ echo "eucTW EUC-TW"
3441+ echo "hp15CN GB2312"
3442+ #echo "ccdc ?" # what is this?
3443+ echo "SJIS SHIFT_JIS"
3444+ echo "utf8 UTF-8"
3445+ ;;
3446+ irix*)
3447+ echo "ISO8859-1 ISO-8859-1"
3448+ echo "ISO8859-2 ISO-8859-2"
3449+ echo "ISO8859-5 ISO-8859-5"
3450+ echo "ISO8859-7 ISO-8859-7"
3451+ echo "ISO8859-9 ISO-8859-9"
3452+ echo "eucCN GB2312"
3453+ echo "eucJP EUC-JP"
3454+ echo "eucKR EUC-KR"
3455+ echo "eucTW EUC-TW"
3456+ ;;
3457+ osf*)
3458+ echo "ISO8859-1 ISO-8859-1"
3459+ echo "ISO8859-2 ISO-8859-2"
3460+ echo "ISO8859-4 ISO-8859-4"
3461+ echo "ISO8859-5 ISO-8859-5"
3462+ echo "ISO8859-7 ISO-8859-7"
3463+ echo "ISO8859-8 ISO-8859-8"
3464+ echo "ISO8859-9 ISO-8859-9"
3465+ echo "ISO8859-15 ISO-8859-15"
3466+ echo "cp850 CP850"
3467+ echo "big5 BIG5"
3468+ echo "dechanyu DEC-HANYU"
3469+ echo "dechanzi GB2312"
3470+ echo "deckanji DEC-KANJI"
3471+ echo "deckorean EUC-KR"
3472+ echo "eucJP EUC-JP"
3473+ echo "eucKR EUC-KR"
3474+ echo "eucTW EUC-TW"
3475+ echo "GBK GBK"
3476+ echo "KSC5601 CP949"
3477+ echo "sdeckanji EUC-JP"
3478+ echo "SJIS SHIFT_JIS"
3479+ echo "TACTIS TIS-620"
3480+ echo "UTF-8 UTF-8"
3481+ ;;
3482+ solaris*)
3483+ echo "646 ASCII"
3484+ echo "ISO8859-1 ISO-8859-1"
3485+ echo "ISO8859-2 ISO-8859-2"
3486+ echo "ISO8859-3 ISO-8859-3"
3487+ echo "ISO8859-4 ISO-8859-4"
3488+ echo "ISO8859-5 ISO-8859-5"
3489+ echo "ISO8859-6 ISO-8859-6"
3490+ echo "ISO8859-7 ISO-8859-7"
3491+ echo "ISO8859-8 ISO-8859-8"
3492+ echo "ISO8859-9 ISO-8859-9"
3493+ echo "ISO8859-15 ISO-8859-15"
3494+ echo "koi8-r KOI8-R"
3495+ echo "ansi-1251 CP1251"
3496+ echo "BIG5 BIG5"
3497+ echo "Big5-HKSCS BIG5-HKSCS"
3498+ echo "gb2312 GB2312"
3499+ echo "GBK GBK"
3500+ echo "GB18030 GB18030"
3501+ echo "cns11643 EUC-TW"
3502+ echo "5601 EUC-KR"
3503+ echo "ko_KR.johap92 JOHAB"
3504+ echo "eucJP EUC-JP"
3505+ echo "PCK SHIFT_JIS"
3506+ echo "TIS620.2533 TIS-620"
3507+ #echo "sun_eu_greek ?" # what is this?
3508+ echo "UTF-8 UTF-8"
3509+ ;;
3510+ freebsd* | os2*)
3511+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
3512+ # localcharset.c falls back to using the full locale name
3513+ # from the environment variables.
3514+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
3515+ # reuse FreeBSD's locale data for OS/2.
3516+ echo "C ASCII"
3517+ echo "US-ASCII ASCII"
3518+ for l in la_LN lt_LN; do
3519+ echo "$l.ASCII ASCII"
3520+ done
3521+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3522+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
3523+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
3524+ echo "$l.ISO_8859-1 ISO-8859-1"
3525+ echo "$l.DIS_8859-15 ISO-8859-15"
3526+ done
3527+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
3528+ echo "$l.ISO_8859-2 ISO-8859-2"
3529+ done
3530+ for l in la_LN lt_LT; do
3531+ echo "$l.ISO_8859-4 ISO-8859-4"
3532+ done
3533+ for l in ru_RU ru_SU; do
3534+ echo "$l.KOI8-R KOI8-R"
3535+ echo "$l.ISO_8859-5 ISO-8859-5"
3536+ echo "$l.CP866 CP866"
3537+ done
3538+ echo "uk_UA.KOI8-U KOI8-U"
3539+ echo "zh_TW.BIG5 BIG5"
3540+ echo "zh_TW.Big5 BIG5"
3541+ echo "zh_CN.EUC GB2312"
3542+ echo "ja_JP.EUC EUC-JP"
3543+ echo "ja_JP.SJIS SHIFT_JIS"
3544+ echo "ja_JP.Shift_JIS SHIFT_JIS"
3545+ echo "ko_KR.EUC EUC-KR"
3546+ ;;
3547+ netbsd*)
3548+ echo "646 ASCII"
3549+ echo "ISO8859-1 ISO-8859-1"
3550+ echo "ISO8859-2 ISO-8859-2"
3551+ echo "ISO8859-4 ISO-8859-4"
3552+ echo "ISO8859-5 ISO-8859-5"
3553+ echo "ISO8859-15 ISO-8859-15"
3554+ echo "eucCN GB2312"
3555+ echo "eucJP EUC-JP"
3556+ echo "eucKR EUC-KR"
3557+ echo "eucTW EUC-TW"
3558+ echo "BIG5 BIG5"
3559+ echo "SJIS SHIFT_JIS"
3560+ ;;
3561+ darwin*)
3562+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
3563+ # localcharset.c falls back to using the full locale name
3564+ # from the environment variables.
3565+ echo "C ASCII"
3566+ for l in en_AU en_CA en_GB en_US la_LN; do
3567+ echo "$l.US-ASCII ASCII"
3568+ done
3569+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3570+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
3571+ nl_NL no_NO pt_PT sv_SE; do
3572+ echo "$l ISO-8859-1"
3573+ echo "$l.ISO8859-1 ISO-8859-1"
3574+ echo "$l.ISO8859-15 ISO-8859-15"
3575+ done
3576+ for l in la_LN; do
3577+ echo "$l.ISO8859-1 ISO-8859-1"
3578+ echo "$l.ISO8859-15 ISO-8859-15"
3579+ done
3580+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
3581+ echo "$l.ISO8859-2 ISO-8859-2"
3582+ done
3583+ for l in la_LN lt_LT; do
3584+ echo "$l.ISO8859-4 ISO-8859-4"
3585+ done
3586+ for l in ru_RU; do
3587+ echo "$l.KOI8-R KOI8-R"
3588+ echo "$l.ISO8859-5 ISO-8859-5"
3589+ echo "$l.CP866 CP866"
3590+ done
3591+ for l in bg_BG; do
3592+ echo "$l.CP1251 CP1251"
3593+ done
3594+ echo "uk_UA.KOI8-U KOI8-U"
3595+ echo "zh_TW.BIG5 BIG5"
3596+ echo "zh_TW.Big5 BIG5"
3597+ echo "zh_CN.EUC GB2312"
3598+ echo "ja_JP.EUC EUC-JP"
3599+ echo "ja_JP.SJIS SHIFT_JIS"
3600+ echo "ko_KR.EUC EUC-KR"
3601+ ;;
3602+ beos*)
3603+ # BeOS has a single locale, and it has UTF-8 encoding.
3604+ echo "* UTF-8"
3605+ ;;
3606+ msdosdjgpp*)
3607+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
3608+ # localcharset.c falls back to using the full locale name
3609+ # from the environment variables.
3610+ echo "#"
3611+ echo "# The encodings given here may not all be correct."
3612+ echo "# If you find that the encoding given for your language and"
3613+ echo "# country is not the one your DOS machine actually uses, just"
3614+ echo "# correct it in this file, and send a mail to"
3615+ echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
3616+ echo "# and Bruno Haible <bruno@clisp.org>."
3617+ echo "#"
3618+ echo "C ASCII"
3619+ # ISO-8859-1 languages
3620+ echo "ca CP850"
3621+ echo "ca_ES CP850"
3622+ echo "da CP865" # not CP850 ??
3623+ echo "da_DK CP865" # not CP850 ??
3624+ echo "de CP850"
3625+ echo "de_AT CP850"
3626+ echo "de_CH CP850"
3627+ echo "de_DE CP850"
3628+ echo "en CP850"
3629+ echo "en_AU CP850" # not CP437 ??
3630+ echo "en_CA CP850"
3631+ echo "en_GB CP850"
3632+ echo "en_NZ CP437"
3633+ echo "en_US CP437"
3634+ echo "en_ZA CP850" # not CP437 ??
3635+ echo "es CP850"
3636+ echo "es_AR CP850"
3637+ echo "es_BO CP850"
3638+ echo "es_CL CP850"
3639+ echo "es_CO CP850"
3640+ echo "es_CR CP850"
3641+ echo "es_CU CP850"
3642+ echo "es_DO CP850"
3643+ echo "es_EC CP850"
3644+ echo "es_ES CP850"
3645+ echo "es_GT CP850"
3646+ echo "es_HN CP850"
3647+ echo "es_MX CP850"
3648+ echo "es_NI CP850"
3649+ echo "es_PA CP850"
3650+ echo "es_PY CP850"
3651+ echo "es_PE CP850"
3652+ echo "es_SV CP850"
3653+ echo "es_UY CP850"
3654+ echo "es_VE CP850"
3655+ echo "et CP850"
3656+ echo "et_EE CP850"
3657+ echo "eu CP850"
3658+ echo "eu_ES CP850"
3659+ echo "fi CP850"
3660+ echo "fi_FI CP850"
3661+ echo "fr CP850"
3662+ echo "fr_BE CP850"
3663+ echo "fr_CA CP850"
3664+ echo "fr_CH CP850"
3665+ echo "fr_FR CP850"
3666+ echo "ga CP850"
3667+ echo "ga_IE CP850"
3668+ echo "gd CP850"
3669+ echo "gd_GB CP850"
3670+ echo "gl CP850"
3671+ echo "gl_ES CP850"
3672+ echo "id CP850" # not CP437 ??
3673+ echo "id_ID CP850" # not CP437 ??
3674+ echo "is CP861" # not CP850 ??
3675+ echo "is_IS CP861" # not CP850 ??
3676+ echo "it CP850"
3677+ echo "it_CH CP850"
3678+ echo "it_IT CP850"
3679+ echo "lt CP775"
3680+ echo "lt_LT CP775"
3681+ echo "lv CP775"
3682+ echo "lv_LV CP775"
3683+ echo "nb CP865" # not CP850 ??
3684+ echo "nb_NO CP865" # not CP850 ??
3685+ echo "nl CP850"
3686+ echo "nl_BE CP850"
3687+ echo "nl_NL CP850"
3688+ echo "nn CP865" # not CP850 ??
3689+ echo "nn_NO CP865" # not CP850 ??
3690+ echo "no CP865" # not CP850 ??
3691+ echo "no_NO CP865" # not CP850 ??
3692+ echo "pt CP850"
3693+ echo "pt_BR CP850"
3694+ echo "pt_PT CP850"
3695+ echo "sv CP850"
3696+ echo "sv_SE CP850"
3697+ # ISO-8859-2 languages
3698+ echo "cs CP852"
3699+ echo "cs_CZ CP852"
3700+ echo "hr CP852"
3701+ echo "hr_HR CP852"
3702+ echo "hu CP852"
3703+ echo "hu_HU CP852"
3704+ echo "pl CP852"
3705+ echo "pl_PL CP852"
3706+ echo "ro CP852"
3707+ echo "ro_RO CP852"
3708+ echo "sk CP852"
3709+ echo "sk_SK CP852"
3710+ echo "sl CP852"
3711+ echo "sl_SI CP852"
3712+ echo "sq CP852"
3713+ echo "sq_AL CP852"
3714+ echo "sr CP852" # CP852 or CP866 or CP855 ??
3715+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
3716+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
3717+ # ISO-8859-3 languages
3718+ echo "mt CP850"
3719+ echo "mt_MT CP850"
3720+ # ISO-8859-5 languages
3721+ echo "be CP866"
3722+ echo "be_BE CP866"
3723+ echo "bg CP866" # not CP855 ??
3724+ echo "bg_BG CP866" # not CP855 ??
3725+ echo "mk CP866" # not CP855 ??
3726+ echo "mk_MK CP866" # not CP855 ??
3727+ echo "ru CP866"
3728+ echo "ru_RU CP866"
3729+ echo "uk CP1125"
3730+ echo "uk_UA CP1125"
3731+ # ISO-8859-6 languages
3732+ echo "ar CP864"
3733+ echo "ar_AE CP864"
3734+ echo "ar_DZ CP864"
3735+ echo "ar_EG CP864"
3736+ echo "ar_IQ CP864"
3737+ echo "ar_IR CP864"
3738+ echo "ar_JO CP864"
3739+ echo "ar_KW CP864"
3740+ echo "ar_MA CP864"
3741+ echo "ar_OM CP864"
3742+ echo "ar_QA CP864"
3743+ echo "ar_SA CP864"
3744+ echo "ar_SY CP864"
3745+ # ISO-8859-7 languages
3746+ echo "el CP869"
3747+ echo "el_GR CP869"
3748+ # ISO-8859-8 languages
3749+ echo "he CP862"
3750+ echo "he_IL CP862"
3751+ # ISO-8859-9 languages
3752+ echo "tr CP857"
3753+ echo "tr_TR CP857"
3754+ # Japanese
3755+ echo "ja CP932"
3756+ echo "ja_JP CP932"
3757+ # Chinese
3758+ echo "zh_CN GBK"
3759+ echo "zh_TW CP950" # not CP938 ??
3760+ # Korean
3761+ echo "kr CP949" # not CP934 ??
3762+ echo "kr_KR CP949" # not CP934 ??
3763+ # Thai
3764+ echo "th CP874"
3765+ echo "th_TH CP874"
3766+ # Other
3767+ echo "eo CP850"
3768+ echo "eo_EO CP850"
3769+ ;;
3770+esac
3771--- lrzsz-0.12.20.safe/intl/dcgettext.c 1998-04-26 09:22:36.000000000 -0400
3772+++ lrzsz-0.12.20/intl/dcgettext.c 2004-09-12 14:40:34.359747480 -0400
3773@@ -1,593 +1,56 @@
3774-/* Implementation of the dcgettext(3) function
3775- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3776+/* Implementation of the dcgettext(3) function.
3777+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3778
3779- This program is free software; you can redistribute it and/or modify
3780- it under the terms of the GNU General Public License as published by
3781- the Free Software Foundation; either version 2, or (at your option)
3782+ This program is free software; you can redistribute it and/or modify it
3783+ under the terms of the GNU Library General Public License as published
3784+ by the Free Software Foundation; either version 2, or (at your option)
3785 any later version.
3786
3787 This program is distributed in the hope that it will be useful,
3788 but WITHOUT ANY WARRANTY; without even the implied warranty of
3789- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3790- GNU General Public License for more details.
3791+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3792+ Library General Public License for more details.
3793
3794- You should have received a copy of the GNU General Public License
3795- along with this program; if not, write to the Free Software Foundation,
3796- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3797+ You should have received a copy of the GNU Library General Public
3798+ License along with this program; if not, write to the Free Software
3799+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3800+ USA. */
3801
3802 #ifdef HAVE_CONFIG_H
3803 # include <config.h>
3804 #endif
3805
3806-#include <sys/types.h>
3807-
3808-#ifdef __GNUC__
3809-# define alloca __builtin_alloca
3810-# define HAVE_ALLOCA 1
3811-#else
3812-# if defined HAVE_ALLOCA_H || defined _LIBC
3813-# include <alloca.h>
3814-# else
3815-# ifdef _AIX
3816- #pragma alloca
3817-# else
3818-# ifndef alloca
3819-char *alloca ();
3820-# endif
3821-# endif
3822-# endif
3823-#endif
3824-
3825-#include <errno.h>
3826-#ifndef errno
3827-extern int errno;
3828-#endif
3829-#ifndef __set_errno
3830-# define __set_errno(val) errno = (val)
3831-#endif
3832-
3833-#if defined STDC_HEADERS || defined _LIBC
3834-# include <stdlib.h>
3835-#else
3836-char *getenv ();
3837-# ifdef HAVE_MALLOC_H
3838-# include <malloc.h>
3839-# else
3840-void free ();
3841-# endif
3842-#endif
3843-
3844-#if defined HAVE_STRING_H || defined _LIBC
3845-# ifndef _GNU_SOURCE
3846-# define _GNU_SOURCE 1
3847-# endif
3848-# include <string.h>
3849-#else
3850-# include <strings.h>
3851-#endif
3852-#if !HAVE_STRCHR && !defined _LIBC
3853-# ifndef strchr
3854-# define strchr index
3855-# endif
3856-#endif
3857-
3858-#if defined HAVE_UNISTD_H || defined _LIBC
3859-# include <unistd.h>
3860-#endif
3861-
3862-#include "gettext.h"
3863 #include "gettextP.h"
3864 #ifdef _LIBC
3865 # include <libintl.h>
3866 #else
3867-# include "libgettext.h"
3868+# include "libgnuintl.h"
3869 #endif
3870-#include "hash-string.h"
3871
3872 /* @@ end of prolog @@ */
3873
3874-#ifdef _LIBC
3875-/* Rename the non ANSI C functions. This is required by the standard
3876- because some ANSI C functions will require linking with this object
3877- file and the name space must not be polluted. */
3878-# define getcwd __getcwd
3879-# define stpcpy __stpcpy
3880-#else
3881-# if !defined HAVE_GETCWD
3882-char *getwd ();
3883-# define getcwd(buf, max) getwd (buf)
3884-# else
3885-char *getcwd ();
3886-# endif
3887-# ifndef HAVE_STPCPY
3888-static char *stpcpy PARAMS ((char *dest, const char *src));
3889-# endif
3890-#endif
3891-
3892-/* Amount to increase buffer size by in each try. */
3893-#define PATH_INCR 32
3894-
3895-/* The following is from pathmax.h. */
3896-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
3897- PATH_MAX but might cause redefinition warnings when sys/param.h is
3898- later included (as on MORE/BSD 4.3). */
3899-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
3900-# include <limits.h>
3901-#endif
3902-
3903-#ifndef _POSIX_PATH_MAX
3904-# define _POSIX_PATH_MAX 255
3905-#endif
3906-
3907-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
3908-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
3909-#endif
3910-
3911-/* Don't include sys/param.h if it already has been. */
3912-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
3913-# include <sys/param.h>
3914-#endif
3915-
3916-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
3917-# define PATH_MAX MAXPATHLEN
3918-#endif
3919-
3920-#ifndef PATH_MAX
3921-# define PATH_MAX _POSIX_PATH_MAX
3922-#endif
3923-
3924-/* XPG3 defines the result of `setlocale (category, NULL)' as:
3925- ``Directs `setlocale()' to query `category' and return the current
3926- setting of `local'.''
3927- However it does not specify the exact format. And even worse: POSIX
3928- defines this not at all. So we can use this feature only on selected
3929- system (e.g. those using GNU C Library). */
3930-#ifdef _LIBC
3931-# define HAVE_LOCALE_NULL
3932-#endif
3933-
3934-/* Name of the default domain used for gettext(3) prior any call to
3935- textdomain(3). The default value for this is "messages". */
3936-const char _nl_default_default_domain[] = "messages";
3937-
3938-/* Value used as the default domain for gettext(3). */
3939-const char *_nl_current_default_domain = _nl_default_default_domain;
3940-
3941-/* Contains the default location of the message catalogs. */
3942-const char _nl_default_dirname[] = GNULOCALEDIR;
3943-
3944-/* List with bindings of specific domains created by bindtextdomain()
3945- calls. */
3946-struct binding *_nl_domain_bindings;
3947-
3948-/* Prototypes for local functions. */
3949-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
3950- const char *msgid));
3951-static const char *category_to_name PARAMS ((int category));
3952-static const char *guess_category_value PARAMS ((int category,
3953- const char *categoryname));
3954-
3955-
3956-/* For those loosing systems which don't have `alloca' we have to add
3957- some additional code emulating it. */
3958-#ifdef HAVE_ALLOCA
3959-/* Nothing has to be done. */
3960-# define ADD_BLOCK(list, address) /* nothing */
3961-# define FREE_BLOCKS(list) /* nothing */
3962-#else
3963-struct block_list
3964-{
3965- void *address;
3966- struct block_list *next;
3967-};
3968-# define ADD_BLOCK(list, addr) \
3969- do { \
3970- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
3971- /* If we cannot get a free block we cannot add the new element to \
3972- the list. */ \
3973- if (newp != NULL) { \
3974- newp->address = (addr); \
3975- newp->next = (list); \
3976- (list) = newp; \
3977- } \
3978- } while (0)
3979-# define FREE_BLOCKS(list) \
3980- do { \
3981- while (list != NULL) { \
3982- struct block_list *old = list; \
3983- list = list->next; \
3984- free (old); \
3985- } \
3986- } while (0)
3987-# undef alloca
3988-# define alloca(size) (malloc (size))
3989-#endif /* have alloca */
3990-
3991-
3992 /* Names for the libintl functions are a problem. They must not clash
3993 with existing names and they should follow ANSI C. But this source
3994 code is also used in GNU C Library where the names have a __
3995 prefix. So we have to make a difference here. */
3996 #ifdef _LIBC
3997 # define DCGETTEXT __dcgettext
3998+# define DCIGETTEXT __dcigettext
3999 #else
4000-# define DCGETTEXT dcgettext__
4001+# define DCGETTEXT libintl_dcgettext
4002+# define DCIGETTEXT libintl_dcigettext
4003 #endif
4004
4005 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
4006 locale. */
4007 char *
4008-DCGETTEXT (domainname, msgid, category)
4009- const char *domainname;
4010- const char *msgid;
4011- int category;
4012+DCGETTEXT (const char *domainname, const char *msgid, int category)
4013 {
4014-#ifndef HAVE_ALLOCA
4015- struct block_list *block_list = NULL;
4016-#endif
4017- struct loaded_l10nfile *domain;
4018- struct binding *binding;
4019- const char *categoryname;
4020- const char *categoryvalue;
4021- char *dirname, *xdomainname;
4022- char *single_locale;
4023- char *retval;
4024- int saved_errno = errno;
4025-
4026- /* If no real MSGID is given return NULL. */
4027- if (msgid == NULL)
4028- return NULL;
4029-
4030- /* If DOMAINNAME is NULL, we are interested in the default domain. If
4031- CATEGORY is not LC_MESSAGES this might not make much sense but the
4032- defintion left this undefined. */
4033- if (domainname == NULL)
4034- domainname = _nl_current_default_domain;
4035-
4036- /* First find matching binding. */
4037- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4038- {
4039- int compare = strcmp (domainname, binding->domainname);
4040- if (compare == 0)
4041- /* We found it! */
4042- break;
4043- if (compare < 0)
4044- {
4045- /* It is not in the list. */
4046- binding = NULL;
4047- break;
4048- }
4049- }
4050-
4051- if (binding == NULL)
4052- dirname = (char *) _nl_default_dirname;
4053- else if (binding->dirname[0] == '/')
4054- dirname = binding->dirname;
4055- else
4056- {
4057- /* We have a relative path. Make it absolute now. */
4058- size_t dirname_len = strlen (binding->dirname) + 1;
4059- size_t path_max;
4060- char *ret;
4061-
4062- path_max = (unsigned) PATH_MAX;
4063- path_max += 2; /* The getcwd docs say to do this. */
4064-
4065- dirname = (char *) alloca (path_max + dirname_len);
4066- ADD_BLOCK (block_list, dirname);
4067-
4068- __set_errno (0);
4069- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
4070- {
4071- path_max += PATH_INCR;
4072- dirname = (char *) alloca (path_max + dirname_len);
4073- ADD_BLOCK (block_list, dirname);
4074- __set_errno (0);
4075- }
4076-
4077- if (ret == NULL)
4078- {
4079- /* We cannot get the current working directory. Don't signal an
4080- error but simply return the default string. */
4081- FREE_BLOCKS (block_list);
4082- __set_errno (saved_errno);
4083- return (char *) msgid;
4084- }
4085-
4086- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4087- }
4088-
4089- /* Now determine the symbolic name of CATEGORY and its value. */
4090- categoryname = category_to_name (category);
4091- categoryvalue = guess_category_value (category, categoryname);
4092-
4093- xdomainname = (char *) alloca (strlen (categoryname)
4094- + strlen (domainname) + 5);
4095- ADD_BLOCK (block_list, xdomainname);
4096-
4097- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4098- domainname),
4099- ".mo");
4100-
4101- /* Creating working area. */
4102- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4103- ADD_BLOCK (block_list, single_locale);
4104-
4105-
4106- /* Search for the given string. This is a loop because we perhaps
4107- got an ordered list of languages to consider for th translation. */
4108- while (1)
4109- {
4110- /* Make CATEGORYVALUE point to the next element of the list. */
4111- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4112- ++categoryvalue;
4113- if (categoryvalue[0] == '\0')
4114- {
4115- /* The whole contents of CATEGORYVALUE has been searched but
4116- no valid entry has been found. We solve this situation
4117- by implicitly appending a "C" entry, i.e. no translation
4118- will take place. */
4119- single_locale[0] = 'C';
4120- single_locale[1] = '\0';
4121- }
4122- else
4123- {
4124- char *cp = single_locale;
4125- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4126- *cp++ = *categoryvalue++;
4127- *cp = '\0';
4128- }
4129-
4130- /* If the current locale value is C (or POSIX) we don't load a
4131- domain. Return the MSGID. */
4132- if (strcmp (single_locale, "C") == 0
4133- || strcmp (single_locale, "POSIX") == 0)
4134- {
4135- FREE_BLOCKS (block_list);
4136- __set_errno (saved_errno);
4137- return (char *) msgid;
4138- }
4139-
4140-
4141- /* Find structure describing the message catalog matching the
4142- DOMAINNAME and CATEGORY. */
4143- domain = _nl_find_domain (dirname, single_locale, xdomainname);
4144-
4145- if (domain != NULL)
4146- {
4147- retval = find_msg (domain, msgid);
4148-
4149- if (retval == NULL)
4150- {
4151- int cnt;
4152-
4153- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
4154- {
4155- retval = find_msg (domain->successor[cnt], msgid);
4156-
4157- if (retval != NULL)
4158- break;
4159- }
4160- }
4161-
4162- if (retval != NULL)
4163- {
4164- FREE_BLOCKS (block_list);
4165- __set_errno (saved_errno);
4166- return retval;
4167- }
4168- }
4169- }
4170- /* NOTREACHED */
4171+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
4172 }
4173
4174 #ifdef _LIBC
4175 /* Alias for function name in GNU C Library. */
4176+INTDEF(__dcgettext)
4177 weak_alias (__dcgettext, dcgettext);
4178 #endif
4179-
4180-
4181-static char *
4182-find_msg (domain_file, msgid)
4183- struct loaded_l10nfile *domain_file;
4184- const char *msgid;
4185-{
4186- size_t top, act, bottom;
4187- struct loaded_domain *domain;
4188-
4189- if (domain_file->decided == 0)
4190- _nl_load_domain (domain_file);
4191-
4192- if (domain_file->data == NULL)
4193- return NULL;
4194-
4195- domain = (struct loaded_domain *) domain_file->data;
4196-
4197- /* Locate the MSGID and its translation. */
4198- if (domain->hash_size > 2 && domain->hash_tab != NULL)
4199- {
4200- /* Use the hashing table. */
4201- nls_uint32 len = strlen (msgid);
4202- nls_uint32 hash_val = hash_string (msgid);
4203- nls_uint32 idx = hash_val % domain->hash_size;
4204- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
4205- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
4206-
4207- if (nstr == 0)
4208- /* Hash table entry is empty. */
4209- return NULL;
4210-
4211- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4212- && strcmp (msgid,
4213- domain->data + W (domain->must_swap,
4214- domain->orig_tab[nstr - 1].offset)) == 0)
4215- return (char *) domain->data + W (domain->must_swap,
4216- domain->trans_tab[nstr - 1].offset);
4217-
4218- while (1)
4219- {
4220- if (idx >= domain->hash_size - incr)
4221- idx -= domain->hash_size - incr;
4222- else
4223- idx += incr;
4224-
4225- nstr = W (domain->must_swap, domain->hash_tab[idx]);
4226- if (nstr == 0)
4227- /* Hash table entry is empty. */
4228- return NULL;
4229-
4230- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4231- && strcmp (msgid,
4232- domain->data + W (domain->must_swap,
4233- domain->orig_tab[nstr - 1].offset))
4234- == 0)
4235- return (char *) domain->data
4236- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
4237- }
4238- /* NOTREACHED */
4239- }
4240-
4241- /* Now we try the default method: binary search in the sorted
4242- array of messages. */
4243- bottom = 0;
4244- top = domain->nstrings;
4245- while (bottom < top)
4246- {
4247- int cmp_val;
4248-
4249- act = (bottom + top) / 2;
4250- cmp_val = strcmp (msgid, domain->data
4251- + W (domain->must_swap,
4252- domain->orig_tab[act].offset));
4253- if (cmp_val < 0)
4254- top = act;
4255- else if (cmp_val > 0)
4256- bottom = act + 1;
4257- else
4258- break;
4259- }
4260-
4261- /* If an translation is found return this. */
4262- return bottom >= top ? NULL : (char *) domain->data
4263- + W (domain->must_swap,
4264- domain->trans_tab[act].offset);
4265-}
4266-
4267-
4268-/* Return string representation of locale CATEGORY. */
4269-static const char *
4270-category_to_name (category)
4271- int category;
4272-{
4273- const char *retval;
4274-
4275- switch (category)
4276- {
4277-#ifdef LC_COLLATE
4278- case LC_COLLATE:
4279- retval = "LC_COLLATE";
4280- break;
4281-#endif
4282-#ifdef LC_CTYPE
4283- case LC_CTYPE:
4284- retval = "LC_CTYPE";
4285- break;
4286-#endif
4287-#ifdef LC_MONETARY
4288- case LC_MONETARY:
4289- retval = "LC_MONETARY";
4290- break;
4291-#endif
4292-#ifdef LC_NUMERIC
4293- case LC_NUMERIC:
4294- retval = "LC_NUMERIC";
4295- break;
4296-#endif
4297-#ifdef LC_TIME
4298- case LC_TIME:
4299- retval = "LC_TIME";
4300- break;
4301-#endif
4302-#ifdef LC_MESSAGES
4303- case LC_MESSAGES:
4304- retval = "LC_MESSAGES";
4305- break;
4306-#endif
4307-#ifdef LC_RESPONSE
4308- case LC_RESPONSE:
4309- retval = "LC_RESPONSE";
4310- break;
4311-#endif
4312-#ifdef LC_ALL
4313- case LC_ALL:
4314- /* This might not make sense but is perhaps better than any other
4315- value. */
4316- retval = "LC_ALL";
4317- break;
4318-#endif
4319- default:
4320- /* If you have a better idea for a default value let me know. */
4321- retval = "LC_XXX";
4322- }
4323-
4324- return retval;
4325-}
4326-
4327-/* Guess value of current locale from value of the environment variables. */
4328-static const char *
4329-guess_category_value (category, categoryname)
4330- int category;
4331- const char *categoryname;
4332-{
4333- const char *retval;
4334-
4335- /* The highest priority value is the `LANGUAGE' environment
4336- variable. This is a GNU extension. */
4337- retval = getenv ("LANGUAGE");
4338- if (retval != NULL && retval[0] != '\0')
4339- return retval;
4340-
4341- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
4342- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
4343- systems this can be done by the `setlocale' function itself. */
4344-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
4345- return setlocale (category, NULL);
4346-#else
4347- /* Setting of LC_ALL overwrites all other. */
4348- retval = getenv ("LC_ALL");
4349- if (retval != NULL && retval[0] != '\0')
4350- return retval;
4351-
4352- /* Next comes the name of the desired category. */
4353- retval = getenv (categoryname);
4354- if (retval != NULL && retval[0] != '\0')
4355- return retval;
4356-
4357- /* Last possibility is the LANG environment variable. */
4358- retval = getenv ("LANG");
4359- if (retval != NULL && retval[0] != '\0')
4360- return retval;
4361-
4362- /* We use C as the default domain. POSIX says this is implementation
4363- defined. */
4364- return "C";
4365-#endif
4366-}
4367-
4368-/* @@ begin of epilog @@ */
4369-
4370-/* We don't want libintl.a to depend on any other library. So we
4371- avoid the non-standard function stpcpy. In GNU C Library this
4372- function is available, though. Also allow the symbol HAVE_STPCPY
4373- to be defined. */
4374-#if !_LIBC && !HAVE_STPCPY
4375-static char *
4376-stpcpy (dest, src)
4377- char *dest;
4378- const char *src;
4379-{
4380- while ((*dest++ = *src++) != '\0')
4381- /* Do nothing. */ ;
4382- return dest - 1;
4383-}
4384-#endif
4385--- lrzsz-0.12.20.safe/intl/dcigettext.c 1969-12-31 19:00:00.000000000 -0500
4386+++ lrzsz-0.12.20/intl/dcigettext.c 2004-09-12 14:40:34.369745960 -0400
4387@@ -0,0 +1,1219 @@
4388+/* Implementation of the internal dcigettext function.
4389+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
4390+
4391+ This program is free software; you can redistribute it and/or modify it
4392+ under the terms of the GNU Library General Public License as published
4393+ by the Free Software Foundation; either version 2, or (at your option)
4394+ any later version.
4395+
4396+ This program is distributed in the hope that it will be useful,
4397+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4398+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4399+ Library General Public License for more details.
4400+
4401+ You should have received a copy of the GNU Library General Public
4402+ License along with this program; if not, write to the Free Software
4403+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4404+ USA. */
4405+
4406+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
4407+ This must come before <config.h> because <config.h> may include
4408+ <features.h>, and once <features.h> has been included, it's too late. */
4409+#ifndef _GNU_SOURCE
4410+# define _GNU_SOURCE 1
4411+#endif
4412+
4413+#ifdef HAVE_CONFIG_H
4414+# include <config.h>
4415+#endif
4416+
4417+#include <sys/types.h>
4418+
4419+#ifdef __GNUC__
4420+# define alloca __builtin_alloca
4421+# define HAVE_ALLOCA 1
4422+#else
4423+# ifdef _MSC_VER
4424+# include <malloc.h>
4425+# define alloca _alloca
4426+# else
4427+# if defined HAVE_ALLOCA_H || defined _LIBC
4428+# include <alloca.h>
4429+# else
4430+# ifdef _AIX
4431+ #pragma alloca
4432+# else
4433+# ifndef alloca
4434+char *alloca ();
4435+# endif
4436+# endif
4437+# endif
4438+# endif
4439+#endif
4440+
4441+#include <errno.h>
4442+#ifndef errno
4443+extern int errno;
4444+#endif
4445+#ifndef __set_errno
4446+# define __set_errno(val) errno = (val)
4447+#endif
4448+
4449+#include <stddef.h>
4450+#include <stdlib.h>
4451+#include <string.h>
4452+
4453+#if defined HAVE_UNISTD_H || defined _LIBC
4454+# include <unistd.h>
4455+#endif
4456+
4457+#include <locale.h>
4458+
4459+#ifdef _LIBC
4460+ /* Guess whether integer division by zero raises signal SIGFPE.
4461+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
4462+# if defined __alpha__ || defined __arm__ || defined __i386__ \
4463+ || defined __m68k__ || defined __s390__
4464+# define INTDIV0_RAISES_SIGFPE 1
4465+# else
4466+# define INTDIV0_RAISES_SIGFPE 0
4467+# endif
4468+#endif
4469+#if !INTDIV0_RAISES_SIGFPE
4470+# include <signal.h>
4471+#endif
4472+
4473+#if defined HAVE_SYS_PARAM_H || defined _LIBC
4474+# include <sys/param.h>
4475+#endif
4476+
4477+#include "gettextP.h"
4478+#include "plural-exp.h"
4479+#ifdef _LIBC
4480+# include <libintl.h>
4481+#else
4482+# include "libgnuintl.h"
4483+#endif
4484+#include "hash-string.h"
4485+
4486+/* Thread safetyness. */
4487+#ifdef _LIBC
4488+# include <bits/libc-lock.h>
4489+#else
4490+/* Provide dummy implementation if this is outside glibc. */
4491+# define __libc_lock_define_initialized(CLASS, NAME)
4492+# define __libc_lock_lock(NAME)
4493+# define __libc_lock_unlock(NAME)
4494+# define __libc_rwlock_define_initialized(CLASS, NAME)
4495+# define __libc_rwlock_rdlock(NAME)
4496+# define __libc_rwlock_unlock(NAME)
4497+#endif
4498+
4499+/* Alignment of types. */
4500+#if defined __GNUC__ && __GNUC__ >= 2
4501+# define alignof(TYPE) __alignof__ (TYPE)
4502+#else
4503+# define alignof(TYPE) \
4504+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
4505+#endif
4506+
4507+/* The internal variables in the standalone libintl.a must have different
4508+ names than the internal variables in GNU libc, otherwise programs
4509+ using libintl.a cannot be linked statically. */
4510+#if !defined _LIBC
4511+# define _nl_default_default_domain libintl_nl_default_default_domain
4512+# define _nl_current_default_domain libintl_nl_current_default_domain
4513+# define _nl_default_dirname libintl_nl_default_dirname
4514+# define _nl_domain_bindings libintl_nl_domain_bindings
4515+#endif
4516+
4517+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
4518+#ifndef offsetof
4519+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
4520+#endif
4521+
4522+/* @@ end of prolog @@ */
4523+
4524+#ifdef _LIBC
4525+/* Rename the non ANSI C functions. This is required by the standard
4526+ because some ANSI C functions will require linking with this object
4527+ file and the name space must not be polluted. */
4528+# define getcwd __getcwd
4529+# ifndef stpcpy
4530+# define stpcpy __stpcpy
4531+# endif
4532+# define tfind __tfind
4533+#else
4534+# if !defined HAVE_GETCWD
4535+char *getwd ();
4536+# define getcwd(buf, max) getwd (buf)
4537+# else
4538+# if VMS
4539+# define getcwd(buf, max) (getcwd) (buf, max, 0)
4540+# else
4541+char *getcwd ();
4542+# endif
4543+# endif
4544+# ifndef HAVE_STPCPY
4545+static char *stpcpy (char *dest, const char *src);
4546+# endif
4547+# ifndef HAVE_MEMPCPY
4548+static void *mempcpy (void *dest, const void *src, size_t n);
4549+# endif
4550+#endif
4551+
4552+/* Amount to increase buffer size by in each try. */
4553+#define PATH_INCR 32
4554+
4555+/* The following is from pathmax.h. */
4556+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
4557+ PATH_MAX but might cause redefinition warnings when sys/param.h is
4558+ later included (as on MORE/BSD 4.3). */
4559+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
4560+# include <limits.h>
4561+#endif
4562+
4563+#ifndef _POSIX_PATH_MAX
4564+# define _POSIX_PATH_MAX 255
4565+#endif
4566+
4567+#if !defined PATH_MAX && defined _PC_PATH_MAX
4568+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
4569+#endif
4570+
4571+/* Don't include sys/param.h if it already has been. */
4572+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
4573+# include <sys/param.h>
4574+#endif
4575+
4576+#if !defined PATH_MAX && defined MAXPATHLEN
4577+# define PATH_MAX MAXPATHLEN
4578+#endif
4579+
4580+#ifndef PATH_MAX
4581+# define PATH_MAX _POSIX_PATH_MAX
4582+#endif
4583+
4584+/* Pathname support.
4585+ ISSLASH(C) tests whether C is a directory separator character.
4586+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
4587+ it may be concatenated to a directory pathname.
4588+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
4589+ */
4590+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
4591+ /* Win32, OS/2, DOS */
4592+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4593+# define HAS_DEVICE(P) \
4594+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
4595+ && (P)[1] == ':')
4596+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
4597+# define IS_PATH_WITH_DIR(P) \
4598+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
4599+#else
4600+ /* Unix */
4601+# define ISSLASH(C) ((C) == '/')
4602+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
4603+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
4604+#endif
4605+
4606+/* This is the type used for the search tree where known translations
4607+ are stored. */
4608+struct known_translation_t
4609+{
4610+ /* Domain in which to search. */
4611+ char *domainname;
4612+
4613+ /* The category. */
4614+ int category;
4615+
4616+ /* State of the catalog counter at the point the string was found. */
4617+ int counter;
4618+
4619+ /* Catalog where the string was found. */
4620+ struct loaded_l10nfile *domain;
4621+
4622+ /* And finally the translation. */
4623+ const char *translation;
4624+ size_t translation_length;
4625+
4626+ /* Pointer to the string in question. */
4627+ char msgid[ZERO];
4628+};
4629+
4630+/* Root of the search tree with known translations. We can use this
4631+ only if the system provides the `tsearch' function family. */
4632+#if defined HAVE_TSEARCH || defined _LIBC
4633+# include <search.h>
4634+
4635+static void *root;
4636+
4637+# ifdef _LIBC
4638+# define tsearch __tsearch
4639+# endif
4640+
4641+/* Function to compare two entries in the table of known translations. */
4642+static int
4643+transcmp (const void *p1, const void *p2)
4644+{
4645+ const struct known_translation_t *s1;
4646+ const struct known_translation_t *s2;
4647+ int result;
4648+
4649+ s1 = (const struct known_translation_t *) p1;
4650+ s2 = (const struct known_translation_t *) p2;
4651+
4652+ result = strcmp (s1->msgid, s2->msgid);
4653+ if (result == 0)
4654+ {
4655+ result = strcmp (s1->domainname, s2->domainname);
4656+ if (result == 0)
4657+ /* We compare the category last (though this is the cheapest
4658+ operation) since it is hopefully always the same (namely
4659+ LC_MESSAGES). */
4660+ result = s1->category - s2->category;
4661+ }
4662+
4663+ return result;
4664+}
4665+#endif
4666+
4667+#ifndef INTVARDEF
4668+# define INTVARDEF(name)
4669+#endif
4670+#ifndef INTUSE
4671+# define INTUSE(name) name
4672+#endif
4673+
4674+/* Name of the default domain used for gettext(3) prior any call to
4675+ textdomain(3). The default value for this is "messages". */
4676+const char _nl_default_default_domain[] attribute_hidden = "messages";
4677+
4678+/* Value used as the default domain for gettext(3). */
4679+const char *_nl_current_default_domain attribute_hidden
4680+ = _nl_default_default_domain;
4681+
4682+/* Contains the default location of the message catalogs. */
4683+#if defined __EMX__
4684+extern const char _nl_default_dirname[];
4685+#else
4686+const char _nl_default_dirname[] = LOCALEDIR;
4687+INTVARDEF (_nl_default_dirname)
4688+#endif
4689+
4690+/* List with bindings of specific domains created by bindtextdomain()
4691+ calls. */
4692+struct binding *_nl_domain_bindings;
4693+
4694+/* Prototypes for local functions. */
4695+static char *plural_lookup (struct loaded_l10nfile *domain,
4696+ unsigned long int n,
4697+ const char *translation, size_t translation_len)
4698+ internal_function;
4699+static const char *guess_category_value (int category,
4700+ const char *categoryname)
4701+ internal_function;
4702+#ifdef _LIBC
4703+# include "../locale/localeinfo.h"
4704+# define category_to_name(category) _nl_category_names[category]
4705+#else
4706+static const char *category_to_name (int category) internal_function;
4707+#endif
4708+
4709+
4710+/* For those loosing systems which don't have `alloca' we have to add
4711+ some additional code emulating it. */
4712+#ifdef HAVE_ALLOCA
4713+/* Nothing has to be done. */
4714+# define freea(p) /* nothing */
4715+# define ADD_BLOCK(list, address) /* nothing */
4716+# define FREE_BLOCKS(list) /* nothing */
4717+#else
4718+struct block_list
4719+{
4720+ void *address;
4721+ struct block_list *next;
4722+};
4723+# define ADD_BLOCK(list, addr) \
4724+ do { \
4725+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
4726+ /* If we cannot get a free block we cannot add the new element to \
4727+ the list. */ \
4728+ if (newp != NULL) { \
4729+ newp->address = (addr); \
4730+ newp->next = (list); \
4731+ (list) = newp; \
4732+ } \
4733+ } while (0)
4734+# define FREE_BLOCKS(list) \
4735+ do { \
4736+ while (list != NULL) { \
4737+ struct block_list *old = list; \
4738+ list = list->next; \
4739+ free (old->address); \
4740+ free (old); \
4741+ } \
4742+ } while (0)
4743+# undef alloca
4744+# define alloca(size) (malloc (size))
4745+# define freea(p) free (p)
4746+#endif /* have alloca */
4747+
4748+
4749+#ifdef _LIBC
4750+/* List of blocks allocated for translations. */
4751+typedef struct transmem_list
4752+{
4753+ struct transmem_list *next;
4754+ char data[ZERO];
4755+} transmem_block_t;
4756+static struct transmem_list *transmem_list;
4757+#else
4758+typedef unsigned char transmem_block_t;
4759+#endif
4760+
4761+
4762+/* Names for the libintl functions are a problem. They must not clash
4763+ with existing names and they should follow ANSI C. But this source
4764+ code is also used in GNU C Library where the names have a __
4765+ prefix. So we have to make a difference here. */
4766+#ifdef _LIBC
4767+# define DCIGETTEXT __dcigettext
4768+#else
4769+# define DCIGETTEXT libintl_dcigettext
4770+#endif
4771+
4772+/* Lock variable to protect the global data in the gettext implementation. */
4773+#ifdef _LIBC
4774+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
4775+#endif
4776+
4777+/* Checking whether the binaries runs SUID must be done and glibc provides
4778+ easier methods therefore we make a difference here. */
4779+#ifdef _LIBC
4780+# define ENABLE_SECURE __libc_enable_secure
4781+# define DETERMINE_SECURE
4782+#else
4783+# ifndef HAVE_GETUID
4784+# define getuid() 0
4785+# endif
4786+# ifndef HAVE_GETGID
4787+# define getgid() 0
4788+# endif
4789+# ifndef HAVE_GETEUID
4790+# define geteuid() getuid()
4791+# endif
4792+# ifndef HAVE_GETEGID
4793+# define getegid() getgid()
4794+# endif
4795+static int enable_secure;
4796+# define ENABLE_SECURE (enable_secure == 1)
4797+# define DETERMINE_SECURE \
4798+ if (enable_secure == 0) \
4799+ { \
4800+ if (getuid () != geteuid () || getgid () != getegid ()) \
4801+ enable_secure = 1; \
4802+ else \
4803+ enable_secure = -1; \
4804+ }
4805+#endif
4806+
4807+/* Get the function to evaluate the plural expression. */
4808+#include "eval-plural.h"
4809+
4810+/* Look up MSGID in the DOMAINNAME message catalog for the current
4811+ CATEGORY locale and, if PLURAL is nonzero, search over string
4812+ depending on the plural form determined by N. */
4813+char *
4814+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
4815+ int plural, unsigned long int n, int category)
4816+{
4817+#ifndef HAVE_ALLOCA
4818+ struct block_list *block_list = NULL;
4819+#endif
4820+ struct loaded_l10nfile *domain;
4821+ struct binding *binding;
4822+ const char *categoryname;
4823+ const char *categoryvalue;
4824+ char *dirname, *xdomainname;
4825+ char *single_locale;
4826+ char *retval;
4827+ size_t retlen;
4828+ int saved_errno;
4829+#if defined HAVE_TSEARCH || defined _LIBC
4830+ struct known_translation_t *search;
4831+ struct known_translation_t **foundp = NULL;
4832+ size_t msgid_len;
4833+#endif
4834+ size_t domainname_len;
4835+
4836+ /* If no real MSGID is given return NULL. */
4837+ if (msgid1 == NULL)
4838+ return NULL;
4839+
4840+#ifdef _LIBC
4841+ if (category < 0 || category >= __LC_LAST || category == LC_ALL)
4842+ /* Bogus. */
4843+ return (plural == 0
4844+ ? (char *) msgid1
4845+ /* Use the Germanic plural rule. */
4846+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
4847+#endif
4848+
4849+ __libc_rwlock_rdlock (_nl_state_lock);
4850+
4851+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
4852+ CATEGORY is not LC_MESSAGES this might not make much sense but the
4853+ definition left this undefined. */
4854+ if (domainname == NULL)
4855+ domainname = _nl_current_default_domain;
4856+
4857+ /* OS/2 specific: backward compatibility with older libintl versions */
4858+#ifdef LC_MESSAGES_COMPAT
4859+ if (category == LC_MESSAGES_COMPAT)
4860+ category = LC_MESSAGES;
4861+#endif
4862+
4863+#if defined HAVE_TSEARCH || defined _LIBC
4864+ msgid_len = strlen (msgid1) + 1;
4865+
4866+ /* Try to find the translation among those which we found at
4867+ some time. */
4868+ search = (struct known_translation_t *)
4869+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
4870+ memcpy (search->msgid, msgid1, msgid_len);
4871+ search->domainname = (char *) domainname;
4872+ search->category = category;
4873+
4874+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
4875+ freea (search);
4876+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
4877+ {
4878+ /* Now deal with plural. */
4879+ if (plural)
4880+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
4881+ (*foundp)->translation_length);
4882+ else
4883+ retval = (char *) (*foundp)->translation;
4884+
4885+ __libc_rwlock_unlock (_nl_state_lock);
4886+ return retval;
4887+ }
4888+#endif
4889+
4890+ /* Preserve the `errno' value. */
4891+ saved_errno = errno;
4892+
4893+ /* See whether this is a SUID binary or not. */
4894+ DETERMINE_SECURE;
4895+
4896+ /* First find matching binding. */
4897+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4898+ {
4899+ int compare = strcmp (domainname, binding->domainname);
4900+ if (compare == 0)
4901+ /* We found it! */
4902+ break;
4903+ if (compare < 0)
4904+ {
4905+ /* It is not in the list. */
4906+ binding = NULL;
4907+ break;
4908+ }
4909+ }
4910+
4911+ if (binding == NULL)
4912+ dirname = (char *) INTUSE(_nl_default_dirname);
4913+ else if (IS_ABSOLUTE_PATH (binding->dirname))
4914+ dirname = binding->dirname;
4915+ else
4916+ {
4917+ /* We have a relative path. Make it absolute now. */
4918+ size_t dirname_len = strlen (binding->dirname) + 1;
4919+ size_t path_max;
4920+ char *ret;
4921+
4922+ path_max = (unsigned int) PATH_MAX;
4923+ path_max += 2; /* The getcwd docs say to do this. */
4924+
4925+ for (;;)
4926+ {
4927+ dirname = (char *) alloca (path_max + dirname_len);
4928+ ADD_BLOCK (block_list, dirname);
4929+
4930+ __set_errno (0);
4931+ ret = getcwd (dirname, path_max);
4932+ if (ret != NULL || errno != ERANGE)
4933+ break;
4934+
4935+ path_max += path_max / 2;
4936+ path_max += PATH_INCR;
4937+ }
4938+
4939+ if (ret == NULL)
4940+ /* We cannot get the current working directory. Don't signal an
4941+ error but simply return the default string. */
4942+ goto return_untranslated;
4943+
4944+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4945+ }
4946+
4947+ /* Now determine the symbolic name of CATEGORY and its value. */
4948+ categoryname = category_to_name (category);
4949+ categoryvalue = guess_category_value (category, categoryname);
4950+
4951+ domainname_len = strlen (domainname);
4952+ xdomainname = (char *) alloca (strlen (categoryname)
4953+ + domainname_len + 5);
4954+ ADD_BLOCK (block_list, xdomainname);
4955+
4956+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4957+ domainname, domainname_len),
4958+ ".mo");
4959+
4960+ /* Creating working area. */
4961+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4962+ ADD_BLOCK (block_list, single_locale);
4963+
4964+
4965+ /* Search for the given string. This is a loop because we perhaps
4966+ got an ordered list of languages to consider for the translation. */
4967+ while (1)
4968+ {
4969+ /* Make CATEGORYVALUE point to the next element of the list. */
4970+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4971+ ++categoryvalue;
4972+ if (categoryvalue[0] == '\0')
4973+ {
4974+ /* The whole contents of CATEGORYVALUE has been searched but
4975+ no valid entry has been found. We solve this situation
4976+ by implicitly appending a "C" entry, i.e. no translation
4977+ will take place. */
4978+ single_locale[0] = 'C';
4979+ single_locale[1] = '\0';
4980+ }
4981+ else
4982+ {
4983+ char *cp = single_locale;
4984+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4985+ *cp++ = *categoryvalue++;
4986+ *cp = '\0';
4987+
4988+ /* When this is a SUID binary we must not allow accessing files
4989+ outside the dedicated directories. */
4990+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
4991+ /* Ingore this entry. */
4992+ continue;
4993+ }
4994+
4995+ /* If the current locale value is C (or POSIX) we don't load a
4996+ domain. Return the MSGID. */
4997+ if (strcmp (single_locale, "C") == 0
4998+ || strcmp (single_locale, "POSIX") == 0)
4999+ break;
5000+
5001+ /* Find structure describing the message catalog matching the
5002+ DOMAINNAME and CATEGORY. */
5003+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
5004+
5005+ if (domain != NULL)
5006+ {
5007+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
5008+
5009+ if (retval == NULL)
5010+ {
5011+ int cnt;
5012+
5013+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
5014+ {
5015+ retval = _nl_find_msg (domain->successor[cnt], binding,
5016+ msgid1, &retlen);
5017+
5018+ if (retval != NULL)
5019+ {
5020+ domain = domain->successor[cnt];
5021+ break;
5022+ }
5023+ }
5024+ }
5025+
5026+ if (retval != NULL)
5027+ {
5028+ /* Found the translation of MSGID1 in domain DOMAIN:
5029+ starting at RETVAL, RETLEN bytes. */
5030+ FREE_BLOCKS (block_list);
5031+#if defined HAVE_TSEARCH || defined _LIBC
5032+ if (foundp == NULL)
5033+ {
5034+ /* Create a new entry and add it to the search tree. */
5035+ struct known_translation_t *newp;
5036+
5037+ newp = (struct known_translation_t *)
5038+ malloc (offsetof (struct known_translation_t, msgid)
5039+ + msgid_len + domainname_len + 1);
5040+ if (newp != NULL)
5041+ {
5042+ newp->domainname =
5043+ mempcpy (newp->msgid, msgid1, msgid_len);
5044+ memcpy (newp->domainname, domainname, domainname_len + 1);
5045+ newp->category = category;
5046+ newp->counter = _nl_msg_cat_cntr;
5047+ newp->domain = domain;
5048+ newp->translation = retval;
5049+ newp->translation_length = retlen;
5050+
5051+ /* Insert the entry in the search tree. */
5052+ foundp = (struct known_translation_t **)
5053+ tsearch (newp, &root, transcmp);
5054+ if (foundp == NULL
5055+ || __builtin_expect (*foundp != newp, 0))
5056+ /* The insert failed. */
5057+ free (newp);
5058+ }
5059+ }
5060+ else
5061+ {
5062+ /* We can update the existing entry. */
5063+ (*foundp)->counter = _nl_msg_cat_cntr;
5064+ (*foundp)->domain = domain;
5065+ (*foundp)->translation = retval;
5066+ (*foundp)->translation_length = retlen;
5067+ }
5068+#endif
5069+ __set_errno (saved_errno);
5070+
5071+ /* Now deal with plural. */
5072+ if (plural)
5073+ retval = plural_lookup (domain, n, retval, retlen);
5074+
5075+ __libc_rwlock_unlock (_nl_state_lock);
5076+ return retval;
5077+ }
5078+ }
5079+ }
5080+
5081+ return_untranslated:
5082+ /* Return the untranslated MSGID. */
5083+ FREE_BLOCKS (block_list);
5084+ __libc_rwlock_unlock (_nl_state_lock);
5085+#ifndef _LIBC
5086+ if (!ENABLE_SECURE)
5087+ {
5088+ extern void _nl_log_untranslated (const char *logfilename,
5089+ const char *domainname,
5090+ const char *msgid1, const char *msgid2,
5091+ int plural);
5092+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
5093+
5094+ if (logfilename != NULL && logfilename[0] != '\0')
5095+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
5096+ }
5097+#endif
5098+ __set_errno (saved_errno);
5099+ return (plural == 0
5100+ ? (char *) msgid1
5101+ /* Use the Germanic plural rule. */
5102+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
5103+}
5104+
5105+
5106+char *
5107+internal_function
5108+_nl_find_msg (struct loaded_l10nfile *domain_file,
5109+ struct binding *domainbinding, const char *msgid,
5110+ size_t *lengthp)
5111+{
5112+ struct loaded_domain *domain;
5113+ nls_uint32 nstrings;
5114+ size_t act;
5115+ char *result;
5116+ size_t resultlen;
5117+
5118+ if (domain_file->decided == 0)
5119+ _nl_load_domain (domain_file, domainbinding);
5120+
5121+ if (domain_file->data == NULL)
5122+ return NULL;
5123+
5124+ domain = (struct loaded_domain *) domain_file->data;
5125+
5126+ nstrings = domain->nstrings;
5127+
5128+ /* Locate the MSGID and its translation. */
5129+ if (domain->hash_tab != NULL)
5130+ {
5131+ /* Use the hashing table. */
5132+ nls_uint32 len = strlen (msgid);
5133+ nls_uint32 hash_val = hash_string (msgid);
5134+ nls_uint32 idx = hash_val % domain->hash_size;
5135+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
5136+
5137+ while (1)
5138+ {
5139+ nls_uint32 nstr =
5140+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
5141+
5142+ if (nstr == 0)
5143+ /* Hash table entry is empty. */
5144+ return NULL;
5145+
5146+ nstr--;
5147+
5148+ /* Compare msgid with the original string at index nstr.
5149+ We compare the lengths with >=, not ==, because plural entries
5150+ are represented by strings with an embedded NUL. */
5151+ if (nstr < nstrings
5152+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
5153+ && (strcmp (msgid,
5154+ domain->data + W (domain->must_swap,
5155+ domain->orig_tab[nstr].offset))
5156+ == 0)
5157+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
5158+ && (strcmp (msgid,
5159+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
5160+ == 0))
5161+ {
5162+ act = nstr;
5163+ goto found;
5164+ }
5165+
5166+ if (idx >= domain->hash_size - incr)
5167+ idx -= domain->hash_size - incr;
5168+ else
5169+ idx += incr;
5170+ }
5171+ /* NOTREACHED */
5172+ }
5173+ else
5174+ {
5175+ /* Try the default method: binary search in the sorted array of
5176+ messages. */
5177+ size_t top, bottom;
5178+
5179+ bottom = 0;
5180+ top = nstrings;
5181+ while (bottom < top)
5182+ {
5183+ int cmp_val;
5184+
5185+ act = (bottom + top) / 2;
5186+ cmp_val = strcmp (msgid, (domain->data
5187+ + W (domain->must_swap,
5188+ domain->orig_tab[act].offset)));
5189+ if (cmp_val < 0)
5190+ top = act;
5191+ else if (cmp_val > 0)
5192+ bottom = act + 1;
5193+ else
5194+ goto found;
5195+ }
5196+ /* No translation was found. */
5197+ return NULL;
5198+ }
5199+
5200+ found:
5201+ /* The translation was found at index ACT. If we have to convert the
5202+ string to use a different character set, this is the time. */
5203+ if (act < nstrings)
5204+ {
5205+ result = (char *)
5206+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
5207+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
5208+ }
5209+ else
5210+ {
5211+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
5212+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
5213+ }
5214+
5215+#if defined _LIBC || HAVE_ICONV
5216+ if (domain->codeset_cntr
5217+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
5218+ {
5219+ /* The domain's codeset has changed through bind_textdomain_codeset()
5220+ since the message catalog was initialized or last accessed. We
5221+ have to reinitialize the converter. */
5222+ _nl_free_domain_conv (domain);
5223+ _nl_init_domain_conv (domain_file, domain, domainbinding);
5224+ }
5225+
5226+ if (
5227+# ifdef _LIBC
5228+ domain->conv != (__gconv_t) -1
5229+# else
5230+# if HAVE_ICONV
5231+ domain->conv != (iconv_t) -1
5232+# endif
5233+# endif
5234+ )
5235+ {
5236+ /* We are supposed to do a conversion. First allocate an
5237+ appropriate table with the same structure as the table
5238+ of translations in the file, where we can put the pointers
5239+ to the converted strings in.
5240+ There is a slight complication with plural entries. They
5241+ are represented by consecutive NUL terminated strings. We
5242+ handle this case by converting RESULTLEN bytes, including
5243+ NULs. */
5244+
5245+ if (domain->conv_tab == NULL
5246+ && ((domain->conv_tab =
5247+ (char **) calloc (nstrings + domain->n_sysdep_strings,
5248+ sizeof (char *)))
5249+ == NULL))
5250+ /* Mark that we didn't succeed allocating a table. */
5251+ domain->conv_tab = (char **) -1;
5252+
5253+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
5254+ /* Nothing we can do, no more memory. */
5255+ goto converted;
5256+
5257+ if (domain->conv_tab[act] == NULL)
5258+ {
5259+ /* We haven't used this string so far, so it is not
5260+ translated yet. Do this now. */
5261+ /* We use a bit more efficient memory handling.
5262+ We allocate always larger blocks which get used over
5263+ time. This is faster than many small allocations. */
5264+ __libc_lock_define_initialized (static, lock)
5265+# define INITIAL_BLOCK_SIZE 4080
5266+ static unsigned char *freemem;
5267+ static size_t freemem_size;
5268+
5269+ const unsigned char *inbuf;
5270+ unsigned char *outbuf;
5271+ int malloc_count;
5272+# ifndef _LIBC
5273+ transmem_block_t *transmem_list = NULL;
5274+# endif
5275+
5276+ __libc_lock_lock (lock);
5277+
5278+ inbuf = (const unsigned char *) result;
5279+ outbuf = freemem + sizeof (size_t);
5280+
5281+ malloc_count = 0;
5282+ while (1)
5283+ {
5284+ transmem_block_t *newmem;
5285+# ifdef _LIBC
5286+ size_t non_reversible;
5287+ int res;
5288+
5289+ if (freemem_size < sizeof (size_t))
5290+ goto resize_freemem;
5291+
5292+ res = __gconv (domain->conv,
5293+ &inbuf, inbuf + resultlen,
5294+ &outbuf,
5295+ outbuf + freemem_size - sizeof (size_t),
5296+ &non_reversible);
5297+
5298+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
5299+ break;
5300+
5301+ if (res != __GCONV_FULL_OUTPUT)
5302+ {
5303+ __libc_lock_unlock (lock);
5304+ goto converted;
5305+ }
5306+
5307+ inbuf = result;
5308+# else
5309+# if HAVE_ICONV
5310+ const char *inptr = (const char *) inbuf;
5311+ size_t inleft = resultlen;
5312+ char *outptr = (char *) outbuf;
5313+ size_t outleft;
5314+
5315+ if (freemem_size < sizeof (size_t))
5316+ goto resize_freemem;
5317+
5318+ outleft = freemem_size - sizeof (size_t);
5319+ if (iconv (domain->conv,
5320+ (ICONV_CONST char **) &inptr, &inleft,
5321+ &outptr, &outleft)
5322+ != (size_t) (-1))
5323+ {
5324+ outbuf = (unsigned char *) outptr;
5325+ break;
5326+ }
5327+ if (errno != E2BIG)
5328+ {
5329+ __libc_lock_unlock (lock);
5330+ goto converted;
5331+ }
5332+# endif
5333+# endif
5334+
5335+ resize_freemem:
5336+ /* We must allocate a new buffer or resize the old one. */
5337+ if (malloc_count > 0)
5338+ {
5339+ ++malloc_count;
5340+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
5341+ newmem = (transmem_block_t *) realloc (transmem_list,
5342+ freemem_size);
5343+# ifdef _LIBC
5344+ if (newmem != NULL)
5345+ transmem_list = transmem_list->next;
5346+ else
5347+ {
5348+ struct transmem_list *old = transmem_list;
5349+
5350+ transmem_list = transmem_list->next;
5351+ free (old);
5352+ }
5353+# endif
5354+ }
5355+ else
5356+ {
5357+ malloc_count = 1;
5358+ freemem_size = INITIAL_BLOCK_SIZE;
5359+ newmem = (transmem_block_t *) malloc (freemem_size);
5360+ }
5361+ if (__builtin_expect (newmem == NULL, 0))
5362+ {
5363+ freemem = NULL;
5364+ freemem_size = 0;
5365+ __libc_lock_unlock (lock);
5366+ goto converted;
5367+ }
5368+
5369+# ifdef _LIBC
5370+ /* Add the block to the list of blocks we have to free
5371+ at some point. */
5372+ newmem->next = transmem_list;
5373+ transmem_list = newmem;
5374+
5375+ freemem = newmem->data;
5376+ freemem_size -= offsetof (struct transmem_list, data);
5377+# else
5378+ transmem_list = newmem;
5379+ freemem = newmem;
5380+# endif
5381+
5382+ outbuf = freemem + sizeof (size_t);
5383+ }
5384+
5385+ /* We have now in our buffer a converted string. Put this
5386+ into the table of conversions. */
5387+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
5388+ domain->conv_tab[act] = (char *) freemem;
5389+ /* Shrink freemem, but keep it aligned. */
5390+ freemem_size -= outbuf - freemem;
5391+ freemem = outbuf;
5392+ freemem += freemem_size & (alignof (size_t) - 1);
5393+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
5394+
5395+ __libc_lock_unlock (lock);
5396+ }
5397+
5398+ /* Now domain->conv_tab[act] contains the translation of all
5399+ the plural variants. */
5400+ result = domain->conv_tab[act] + sizeof (size_t);
5401+ resultlen = *(size_t *) domain->conv_tab[act];
5402+ }
5403+
5404+ converted:
5405+ /* The result string is converted. */
5406+
5407+#endif /* _LIBC || HAVE_ICONV */
5408+
5409+ *lengthp = resultlen;
5410+ return result;
5411+}
5412+
5413+
5414+/* Look up a plural variant. */
5415+static char *
5416+internal_function
5417+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
5418+ const char *translation, size_t translation_len)
5419+{
5420+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
5421+ unsigned long int index;
5422+ const char *p;
5423+
5424+ index = plural_eval (domaindata->plural, n);
5425+ if (index >= domaindata->nplurals)
5426+ /* This should never happen. It means the plural expression and the
5427+ given maximum value do not match. */
5428+ index = 0;
5429+
5430+ /* Skip INDEX strings at TRANSLATION. */
5431+ p = translation;
5432+ while (index-- > 0)
5433+ {
5434+#ifdef _LIBC
5435+ p = __rawmemchr (p, '\0');
5436+#else
5437+ p = strchr (p, '\0');
5438+#endif
5439+ /* And skip over the NUL byte. */
5440+ p++;
5441+
5442+ if (p >= translation + translation_len)
5443+ /* This should never happen. It means the plural expression
5444+ evaluated to a value larger than the number of variants
5445+ available for MSGID1. */
5446+ return (char *) translation;
5447+ }
5448+ return (char *) p;
5449+}
5450+
5451+#ifndef _LIBC
5452+/* Return string representation of locale CATEGORY. */
5453+static const char *
5454+internal_function
5455+category_to_name (int category)
5456+{
5457+ const char *retval;
5458+
5459+ switch (category)
5460+ {
5461+#ifdef LC_COLLATE
5462+ case LC_COLLATE:
5463+ retval = "LC_COLLATE";
5464+ break;
5465+#endif
5466+#ifdef LC_CTYPE
5467+ case LC_CTYPE:
5468+ retval = "LC_CTYPE";
5469+ break;
5470+#endif
5471+#ifdef LC_MONETARY
5472+ case LC_MONETARY:
5473+ retval = "LC_MONETARY";
5474+ break;
5475+#endif
5476+#ifdef LC_NUMERIC
5477+ case LC_NUMERIC:
5478+ retval = "LC_NUMERIC";
5479+ break;
5480+#endif
5481+#ifdef LC_TIME
5482+ case LC_TIME:
5483+ retval = "LC_TIME";
5484+ break;
5485+#endif
5486+#ifdef LC_MESSAGES
5487+ case LC_MESSAGES:
5488+ retval = "LC_MESSAGES";
5489+ break;
5490+#endif
5491+#ifdef LC_RESPONSE
5492+ case LC_RESPONSE:
5493+ retval = "LC_RESPONSE";
5494+ break;
5495+#endif
5496+#ifdef LC_ALL
5497+ case LC_ALL:
5498+ /* This might not make sense but is perhaps better than any other
5499+ value. */
5500+ retval = "LC_ALL";
5501+ break;
5502+#endif
5503+ default:
5504+ /* If you have a better idea for a default value let me know. */
5505+ retval = "LC_XXX";
5506+ }
5507+
5508+ return retval;
5509+}
5510+#endif
5511+
5512+/* Guess value of current locale from value of the environment variables. */
5513+static const char *
5514+internal_function
5515+guess_category_value (int category, const char *categoryname)
5516+{
5517+ const char *language;
5518+ const char *retval;
5519+
5520+ /* The highest priority value is the `LANGUAGE' environment
5521+ variable. But we don't use the value if the currently selected
5522+ locale is the C locale. This is a GNU extension. */
5523+ language = getenv ("LANGUAGE");
5524+ if (language != NULL && language[0] == '\0')
5525+ language = NULL;
5526+
5527+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
5528+ `LC_xxx', and `LANG'. On some systems this can be done by the
5529+ `setlocale' function itself. */
5530+#ifdef _LIBC
5531+ retval = __current_locale_name (category);
5532+#else
5533+ retval = _nl_locale_name (category, categoryname);
5534+#endif
5535+
5536+ /* Ignore LANGUAGE if the locale is set to "C" because
5537+ 1. "C" locale usually uses the ASCII encoding, and most international
5538+ messages use non-ASCII characters. These characters get displayed
5539+ as question marks (if using glibc's iconv()) or as invalid 8-bit
5540+ characters (because other iconv()s refuse to convert most non-ASCII
5541+ characters to ASCII). In any case, the output is ugly.
5542+ 2. The precise output of some programs in the "C" locale is specified
5543+ by POSIX and should not depend on environment variables like
5544+ "LANGUAGE". We allow such programs to use gettext(). */
5545+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
5546+}
5547+
5548+/* @@ begin of epilog @@ */
5549+
5550+/* We don't want libintl.a to depend on any other library. So we
5551+ avoid the non-standard function stpcpy. In GNU C Library this
5552+ function is available, though. Also allow the symbol HAVE_STPCPY
5553+ to be defined. */
5554+#if !_LIBC && !HAVE_STPCPY
5555+static char *
5556+stpcpy (char *dest, const char *src)
5557+{
5558+ while ((*dest++ = *src++) != '\0')
5559+ /* Do nothing. */ ;
5560+ return dest - 1;
5561+}
5562+#endif
5563+
5564+#if !_LIBC && !HAVE_MEMPCPY
5565+static void *
5566+mempcpy (void *dest, const void *src, size_t n)
5567+{
5568+ return (void *) ((char *) memcpy (dest, src, n) + n);
5569+}
5570+#endif
5571+
5572+
5573+#ifdef _LIBC
5574+/* If we want to free all resources we have to do some work at
5575+ program's end. */
5576+libc_freeres_fn (free_mem)
5577+{
5578+ void *old;
5579+
5580+ while (_nl_domain_bindings != NULL)
5581+ {
5582+ struct binding *oldp = _nl_domain_bindings;
5583+ _nl_domain_bindings = _nl_domain_bindings->next;
5584+ if (oldp->dirname != INTUSE(_nl_default_dirname))
5585+ /* Yes, this is a pointer comparison. */
5586+ free (oldp->dirname);
5587+ free (oldp->codeset);
5588+ free (oldp);
5589+ }
5590+
5591+ if (_nl_current_default_domain != _nl_default_default_domain)
5592+ /* Yes, again a pointer comparison. */
5593+ free ((char *) _nl_current_default_domain);
5594+
5595+ /* Remove the search tree with the known translations. */
5596+ __tdestroy (root, free);
5597+ root = NULL;
5598+
5599+ while (transmem_list != NULL)
5600+ {
5601+ old = transmem_list;
5602+ transmem_list = transmem_list->next;
5603+ free (old);
5604+ }
5605+}
5606+#endif
5607--- lrzsz-0.12.20.safe/intl/dcngettext.c 1969-12-31 19:00:00.000000000 -0500
5608+++ lrzsz-0.12.20/intl/dcngettext.c 2004-09-12 14:40:34.375745048 -0400
5609@@ -0,0 +1,57 @@
5610+/* Implementation of the dcngettext(3) function.
5611+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
5612+
5613+ This program is free software; you can redistribute it and/or modify it
5614+ under the terms of the GNU Library General Public License as published
5615+ by the Free Software Foundation; either version 2, or (at your option)
5616+ any later version.
5617+
5618+ This program is distributed in the hope that it will be useful,
5619+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5620+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5621+ Library General Public License for more details.
5622+
5623+ You should have received a copy of the GNU Library General Public
5624+ License along with this program; if not, write to the Free Software
5625+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5626+ USA. */
5627+
5628+#ifdef HAVE_CONFIG_H
5629+# include <config.h>
5630+#endif
5631+
5632+#include "gettextP.h"
5633+#ifdef _LIBC
5634+# include <libintl.h>
5635+#else
5636+# include "libgnuintl.h"
5637+#endif
5638+
5639+/* @@ end of prolog @@ */
5640+
5641+/* Names for the libintl functions are a problem. They must not clash
5642+ with existing names and they should follow ANSI C. But this source
5643+ code is also used in GNU C Library where the names have a __
5644+ prefix. So we have to make a difference here. */
5645+#ifdef _LIBC
5646+# define DCNGETTEXT __dcngettext
5647+# define DCIGETTEXT __dcigettext
5648+#else
5649+# define DCNGETTEXT libintl_dcngettext
5650+# define DCIGETTEXT libintl_dcigettext
5651+#endif
5652+
5653+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
5654+ locale. */
5655+char *
5656+DCNGETTEXT (const char *domainname,
5657+ const char *msgid1, const char *msgid2, unsigned long int n,
5658+ int category)
5659+{
5660+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
5661+}
5662+
5663+#ifdef _LIBC
5664+/* Alias for function name in GNU C Library. */
5665+weak_alias (__dcngettext, dcngettext);
5666+#endif
5667--- lrzsz-0.12.20.safe/intl/dgettext.c 1998-04-26 09:20:52.000000000 -0400
5668+++ lrzsz-0.12.20/intl/dgettext.c 2004-09-12 14:40:34.380744288 -0400
5669@@ -1,32 +1,33 @@
5670-/* dgettext.c -- implementation of the dgettext(3) function
5671- Copyright (C) 1995 Software Foundation, Inc.
5672+/* Implementation of the dgettext(3) function.
5673+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5674
5675-This program is free software; you can redistribute it and/or modify
5676-it under the terms of the GNU General Public License as published by
5677-the Free Software Foundation; either version 2, or (at your option)
5678-any later version.
5679+ This program is free software; you can redistribute it and/or modify it
5680+ under the terms of the GNU Library General Public License as published
5681+ by the Free Software Foundation; either version 2, or (at your option)
5682+ any later version.
5683
5684-This program is distributed in the hope that it will be useful,
5685-but WITHOUT ANY WARRANTY; without even the implied warranty of
5686-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5687-GNU General Public License for more details.
5688+ This program is distributed in the hope that it will be useful,
5689+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5690+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5691+ Library General Public License for more details.
5692
5693-You should have received a copy of the GNU General Public License
5694-along with this program; if not, write to the Free Software
5695-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5696+ You should have received a copy of the GNU Library General Public
5697+ License along with this program; if not, write to the Free Software
5698+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5699+ USA. */
5700
5701 #ifdef HAVE_CONFIG_H
5702 # include <config.h>
5703 #endif
5704
5705-#if defined HAVE_LOCALE_H || defined _LIBC
5706-# include <locale.h>
5707-#endif
5708+#include "gettextP.h"
5709+
5710+#include <locale.h>
5711
5712 #ifdef _LIBC
5713 # include <libintl.h>
5714 #else
5715-# include "libgettext.h"
5716+# include "libgnuintl.h"
5717 #endif
5718
5719 /* @@ end of prolog @@ */
5720@@ -37,18 +38,16 @@
5721 prefix. So we have to make a difference here. */
5722 #ifdef _LIBC
5723 # define DGETTEXT __dgettext
5724-# define DCGETTEXT __dcgettext
5725+# define DCGETTEXT INTUSE(__dcgettext)
5726 #else
5727-# define DGETTEXT dgettext__
5728-# define DCGETTEXT dcgettext__
5729+# define DGETTEXT libintl_dgettext
5730+# define DCGETTEXT libintl_dcgettext
5731 #endif
5732
5733 /* Look up MSGID in the DOMAINNAME message catalog of the current
5734 LC_MESSAGES locale. */
5735 char *
5736-DGETTEXT (domainname, msgid)
5737- const char *domainname;
5738- const char *msgid;
5739+DGETTEXT (const char *domainname, const char *msgid)
5740 {
5741 return DCGETTEXT (domainname, msgid, LC_MESSAGES);
5742 }
5743--- lrzsz-0.12.20.safe/intl/dngettext.c 1969-12-31 19:00:00.000000000 -0500
5744+++ lrzsz-0.12.20/intl/dngettext.c 2004-09-12 14:40:34.385743528 -0400
5745@@ -0,0 +1,59 @@
5746+/* Implementation of the dngettext(3) function.
5747+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5748+
5749+ This program is free software; you can redistribute it and/or modify it
5750+ under the terms of the GNU Library General Public License as published
5751+ by the Free Software Foundation; either version 2, or (at your option)
5752+ any later version.
5753+
5754+ This program is distributed in the hope that it will be useful,
5755+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5756+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5757+ Library General Public License for more details.
5758+
5759+ You should have received a copy of the GNU Library General Public
5760+ License along with this program; if not, write to the Free Software
5761+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5762+ USA. */
5763+
5764+#ifdef HAVE_CONFIG_H
5765+# include <config.h>
5766+#endif
5767+
5768+#include "gettextP.h"
5769+
5770+#include <locale.h>
5771+
5772+#ifdef _LIBC
5773+# include <libintl.h>
5774+#else
5775+# include "libgnuintl.h"
5776+#endif
5777+
5778+/* @@ end of prolog @@ */
5779+
5780+/* Names for the libintl functions are a problem. They must not clash
5781+ with existing names and they should follow ANSI C. But this source
5782+ code is also used in GNU C Library where the names have a __
5783+ prefix. So we have to make a difference here. */
5784+#ifdef _LIBC
5785+# define DNGETTEXT __dngettext
5786+# define DCNGETTEXT __dcngettext
5787+#else
5788+# define DNGETTEXT libintl_dngettext
5789+# define DCNGETTEXT libintl_dcngettext
5790+#endif
5791+
5792+/* Look up MSGID in the DOMAINNAME message catalog of the current
5793+ LC_MESSAGES locale and skip message according to the plural form. */
5794+char *
5795+DNGETTEXT (const char *domainname,
5796+ const char *msgid1, const char *msgid2, unsigned long int n)
5797+{
5798+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
5799+}
5800+
5801+#ifdef _LIBC
5802+/* Alias for function name in GNU C Library. */
5803+weak_alias (__dngettext, dngettext);
5804+#endif
5805--- lrzsz-0.12.20.safe/intl/eval-plural.h 1969-12-31 19:00:00.000000000 -0500
5806+++ lrzsz-0.12.20/intl/eval-plural.h 2004-09-12 14:40:34.390742768 -0400
5807@@ -0,0 +1,108 @@
5808+/* Plural expression evaluation.
5809+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
5810+
5811+ This program is free software; you can redistribute it and/or modify it
5812+ under the terms of the GNU Library General Public License as published
5813+ by the Free Software Foundation; either version 2, or (at your option)
5814+ any later version.
5815+
5816+ This program is distributed in the hope that it will be useful,
5817+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5818+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5819+ Library General Public License for more details.
5820+
5821+ You should have received a copy of the GNU Library General Public
5822+ License along with this program; if not, write to the Free Software
5823+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5824+ USA. */
5825+
5826+#ifndef STATIC
5827+#define STATIC static
5828+#endif
5829+
5830+/* Evaluate the plural expression and return an index value. */
5831+STATIC
5832+unsigned long int
5833+internal_function
5834+plural_eval (struct expression *pexp, unsigned long int n)
5835+{
5836+ switch (pexp->nargs)
5837+ {
5838+ case 0:
5839+ switch (pexp->operation)
5840+ {
5841+ case var:
5842+ return n;
5843+ case num:
5844+ return pexp->val.num;
5845+ default:
5846+ break;
5847+ }
5848+ /* NOTREACHED */
5849+ break;
5850+ case 1:
5851+ {
5852+ /* pexp->operation must be lnot. */
5853+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
5854+ return ! arg;
5855+ }
5856+ case 2:
5857+ {
5858+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
5859+ if (pexp->operation == lor)
5860+ return leftarg || plural_eval (pexp->val.args[1], n);
5861+ else if (pexp->operation == land)
5862+ return leftarg && plural_eval (pexp->val.args[1], n);
5863+ else
5864+ {
5865+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
5866+
5867+ switch (pexp->operation)
5868+ {
5869+ case mult:
5870+ return leftarg * rightarg;
5871+ case divide:
5872+#if !INTDIV0_RAISES_SIGFPE
5873+ if (rightarg == 0)
5874+ raise (SIGFPE);
5875+#endif
5876+ return leftarg / rightarg;
5877+ case module:
5878+#if !INTDIV0_RAISES_SIGFPE
5879+ if (rightarg == 0)
5880+ raise (SIGFPE);
5881+#endif
5882+ return leftarg % rightarg;
5883+ case plus:
5884+ return leftarg + rightarg;
5885+ case minus:
5886+ return leftarg - rightarg;
5887+ case less_than:
5888+ return leftarg < rightarg;
5889+ case greater_than:
5890+ return leftarg > rightarg;
5891+ case less_or_equal:
5892+ return leftarg <= rightarg;
5893+ case greater_or_equal:
5894+ return leftarg >= rightarg;
5895+ case equal:
5896+ return leftarg == rightarg;
5897+ case not_equal:
5898+ return leftarg != rightarg;
5899+ default:
5900+ break;
5901+ }
5902+ }
5903+ /* NOTREACHED */
5904+ break;
5905+ }
5906+ case 3:
5907+ {
5908+ /* pexp->operation must be qmop. */
5909+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
5910+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
5911+ }
5912+ }
5913+ /* NOTREACHED */
5914+ return 0;
5915+}
5916--- lrzsz-0.12.20.safe/intl/explodename.c 1998-04-26 09:22:37.000000000 -0400
5917+++ lrzsz-0.12.20/intl/explodename.c 2004-09-12 14:40:34.395742008 -0400
5918@@ -1,19 +1,20 @@
5919-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5920+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
5921 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
5922
5923- This program is free software; you can redistribute it and/or modify
5924- it under the terms of the GNU General Public License as published by
5925- the Free Software Foundation; either version 2, or (at your option)
5926+ This program is free software; you can redistribute it and/or modify it
5927+ under the terms of the GNU Library General Public License as published
5928+ by the Free Software Foundation; either version 2, or (at your option)
5929 any later version.
5930
5931 This program is distributed in the hope that it will be useful,
5932 but WITHOUT ANY WARRANTY; without even the implied warranty of
5933- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5934- GNU General Public License for more details.
5935+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5936+ Library General Public License for more details.
5937
5938- You should have received a copy of the GNU General Public License
5939- along with this program; if not, write to the Free Software Foundation,
5940- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5941+ You should have received a copy of the GNU Library General Public
5942+ License along with this program; if not, write to the Free Software
5943+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5944+ USA. */
5945
5946 #ifdef HAVE_CONFIG_H
5947 # include <config.h>
5948@@ -36,18 +37,23 @@
5949
5950 /* @@ end of prolog @@ */
5951
5952+char *
5953+_nl_find_language (const char *name)
5954+{
5955+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
5956+ && name[0] != '+' && name[0] != ',')
5957+ ++name;
5958+
5959+ return (char *) name;
5960+}
5961+
5962+
5963 int
5964-_nl_explode_name (name, language, modifier, territory, codeset,
5965- normalized_codeset, special, sponsor, revision)
5966- char *name;
5967- const char **language;
5968- const char **modifier;
5969- const char **territory;
5970- const char **codeset;
5971- const char **normalized_codeset;
5972- const char **special;
5973- const char **sponsor;
5974- const char **revision;
5975+_nl_explode_name (char *name,
5976+ const char **language, const char **modifier,
5977+ const char **territory, const char **codeset,
5978+ const char **normalized_codeset, const char **special,
5979+ const char **sponsor, const char **revision)
5980 {
5981 enum { undecided, xpg, cen } syntax;
5982 char *cp;
5983@@ -67,9 +73,7 @@
5984 mask = 0;
5985 syntax = undecided;
5986 *language = cp = name;
5987- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
5988- && cp[0] != '+' && cp[0] != ',')
5989- ++cp;
5990+ cp = _nl_find_language (*language);
5991
5992 if (*language == cp)
5993 /* This does not make sense: language has to be specified. Use
5994--- lrzsz-0.12.20.safe/intl/finddomain.c 1998-04-26 09:22:36.000000000 -0400
5995+++ lrzsz-0.12.20/intl/finddomain.c 2004-09-12 14:40:34.415738968 -0400
5996@@ -1,64 +1,40 @@
5997 /* Handle list of needed message catalogs
5998- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5999- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
6000+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
6001+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
6002
6003- This program is free software; you can redistribute it and/or modify
6004- it under the terms of the GNU General Public License as published by
6005- the Free Software Foundation; either version 2, or (at your option)
6006+ This program is free software; you can redistribute it and/or modify it
6007+ under the terms of the GNU Library General Public License as published
6008+ by the Free Software Foundation; either version 2, or (at your option)
6009 any later version.
6010
6011 This program is distributed in the hope that it will be useful,
6012 but WITHOUT ANY WARRANTY; without even the implied warranty of
6013- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6014- GNU General Public License for more details.
6015+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6016+ Library General Public License for more details.
6017
6018- You should have received a copy of the GNU General Public License
6019- along with this program; if not, write to the Free Software Foundation,
6020- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6021+ You should have received a copy of the GNU Library General Public
6022+ License along with this program; if not, write to the Free Software
6023+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6024+ USA. */
6025
6026 #ifdef HAVE_CONFIG_H
6027 # include <config.h>
6028 #endif
6029
6030-#include <ctype.h>
6031-#include <errno.h>
6032 #include <stdio.h>
6033 #include <sys/types.h>
6034-
6035-#if defined STDC_HEADERS || defined _LIBC
6036-# include <stdlib.h>
6037-#else
6038-# ifdef HAVE_MALLOC_H
6039-# include <malloc.h>
6040-# else
6041-void free ();
6042-# endif
6043-#endif
6044-
6045-#if defined HAVE_STRING_H || defined _LIBC
6046-# include <string.h>
6047-#else
6048-# include <strings.h>
6049-# ifndef memcpy
6050-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
6051-# endif
6052-#endif
6053-#if !HAVE_STRCHR && !defined _LIBC
6054-# ifndef strchr
6055-# define strchr index
6056-# endif
6057-#endif
6058+#include <stdlib.h>
6059+#include <string.h>
6060
6061 #if defined HAVE_UNISTD_H || defined _LIBC
6062 # include <unistd.h>
6063 #endif
6064
6065-#include "gettext.h"
6066 #include "gettextP.h"
6067 #ifdef _LIBC
6068 # include <libintl.h>
6069 #else
6070-# include "libgettext.h"
6071+# include "libgnuintl.h"
6072 #endif
6073
6074 /* @@ end of prolog @@ */
6075@@ -70,10 +46,9 @@
6076 the DOMAINNAME and CATEGORY parameters with respect to the currently
6077 established bindings. */
6078 struct loaded_l10nfile *
6079-_nl_find_domain (dirname, locale, domainname)
6080- const char *dirname;
6081- char *locale;
6082- const char *domainname;
6083+internal_function
6084+_nl_find_domain (const char *dirname, char *locale,
6085+ const char *domainname, struct binding *domainbinding)
6086 {
6087 struct loaded_l10nfile *retval;
6088 const char *language;
6089@@ -95,9 +70,9 @@
6090
6091 language[_territory][+audience][+special][,[sponsor][_revision]]
6092
6093- Beside the first all of them are allowed to be missing. If the
6094- full specified locale is not found, the less specific one are
6095- looked for. The various part will be stripped of according to
6096+ Beside the first part all of them are allowed to be missing. If
6097+ the full specified locale is not found, the less specific one are
6098+ looked for. The various parts will be stripped off according to
6099 the following order:
6100 (1) revision
6101 (2) sponsor
6102@@ -119,7 +94,7 @@
6103 int cnt;
6104
6105 if (retval->decided == 0)
6106- _nl_load_domain (retval);
6107+ _nl_load_domain (retval, domainbinding);
6108
6109 if (retval->data != NULL)
6110 return retval;
6111@@ -127,7 +102,7 @@
6112 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6113 {
6114 if (retval->successor[cnt]->decided == 0)
6115- _nl_load_domain (retval->successor[cnt]);
6116+ _nl_load_domain (retval->successor[cnt], domainbinding);
6117
6118 if (retval->successor[cnt]->data != NULL)
6119 break;
6120@@ -142,12 +117,18 @@
6121 alias_value = _nl_expand_alias (locale);
6122 if (alias_value != NULL)
6123 {
6124+#if defined _LIBC || defined HAVE_STRDUP
6125+ locale = strdup (alias_value);
6126+ if (locale == NULL)
6127+ return NULL;
6128+#else
6129 size_t len = strlen (alias_value) + 1;
6130 locale = (char *) malloc (len);
6131 if (locale == NULL)
6132 return NULL;
6133
6134 memcpy (locale, alias_value, len);
6135+#endif
6136 }
6137
6138 /* Now we determine the single parts of the locale name. First
6139@@ -168,14 +149,14 @@
6140 return NULL;
6141
6142 if (retval->decided == 0)
6143- _nl_load_domain (retval);
6144+ _nl_load_domain (retval, domainbinding);
6145 if (retval->data == NULL)
6146 {
6147 int cnt;
6148 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6149 {
6150 if (retval->successor[cnt]->decided == 0)
6151- _nl_load_domain (retval->successor[cnt]);
6152+ _nl_load_domain (retval->successor[cnt], domainbinding);
6153 if (retval->successor[cnt]->data != NULL)
6154 break;
6155 }
6156@@ -185,5 +166,27 @@
6157 if (alias_value != NULL)
6158 free (locale);
6159
6160+ /* The space for normalized_codeset is dynamically allocated. Free it. */
6161+ if (mask & XPG_NORM_CODESET)
6162+ free ((void *) normalized_codeset);
6163+
6164 return retval;
6165 }
6166+
6167+
6168+#ifdef _LIBC
6169+libc_freeres_fn (free_mem)
6170+{
6171+ struct loaded_l10nfile *runp = _nl_loaded_domains;
6172+
6173+ while (runp != NULL)
6174+ {
6175+ struct loaded_l10nfile *here = runp;
6176+ if (runp->data != NULL)
6177+ _nl_unload_domain ((struct loaded_domain *) runp->data);
6178+ runp = runp->next;
6179+ free ((char *) here->filename);
6180+ free (here);
6181+ }
6182+}
6183+#endif
6184--- lrzsz-0.12.20.safe/intl/gettext.c 1998-04-26 09:22:36.000000000 -0400
6185+++ lrzsz-0.12.20/intl/gettext.c 2004-09-12 14:40:34.420738208 -0400
6186@@ -1,19 +1,20 @@
6187-/* Implementation of gettext(3) function
6188- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6189+/* Implementation of gettext(3) function.
6190+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
6191
6192- This program is free software; you can redistribute it and/or modify
6193- it under the terms of the GNU General Public License as published by
6194- the Free Software Foundation; either version 2, or (at your option)
6195+ This program is free software; you can redistribute it and/or modify it
6196+ under the terms of the GNU Library General Public License as published
6197+ by the Free Software Foundation; either version 2, or (at your option)
6198 any later version.
6199
6200 This program is distributed in the hope that it will be useful,
6201 but WITHOUT ANY WARRANTY; without even the implied warranty of
6202- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6203- GNU General Public License for more details.
6204+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6205+ Library General Public License for more details.
6206
6207- You should have received a copy of the GNU General Public License
6208- along with this program; if not, write to the Free Software Foundation,
6209- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6210+ You should have received a copy of the GNU Library General Public
6211+ License along with this program; if not, write to the Free Software
6212+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6213+ USA. */
6214
6215 #ifdef HAVE_CONFIG_H
6216 # include <config.h>
6217@@ -23,21 +24,14 @@
6218 # define __need_NULL
6219 # include <stddef.h>
6220 #else
6221-# ifdef STDC_HEADERS
6222-# include <stdlib.h> /* Just for NULL. */
6223-# else
6224-# ifdef HAVE_STRING_H
6225-# include <string.h>
6226-# else
6227-# define NULL ((void *) 0)
6228-# endif
6229-# endif
6230+# include <stdlib.h> /* Just for NULL. */
6231 #endif
6232
6233+#include "gettextP.h"
6234 #ifdef _LIBC
6235 # include <libintl.h>
6236 #else
6237-# include "libgettext.h"
6238+# include "libgnuintl.h"
6239 #endif
6240
6241 /* @@ end of prolog @@ */
6242@@ -48,20 +42,19 @@
6243 prefix. So we have to make a difference here. */
6244 #ifdef _LIBC
6245 # define GETTEXT __gettext
6246-# define DGETTEXT __dgettext
6247+# define DCGETTEXT INTUSE(__dcgettext)
6248 #else
6249-# define GETTEXT gettext__
6250-# define DGETTEXT dgettext__
6251+# define GETTEXT libintl_gettext
6252+# define DCGETTEXT libintl_dcgettext
6253 #endif
6254
6255 /* Look up MSGID in the current default message catalog for the current
6256 LC_MESSAGES locale. If not found, returns MSGID itself (the default
6257 text). */
6258 char *
6259-GETTEXT (msgid)
6260- const char *msgid;
6261+GETTEXT (const char *msgid)
6262 {
6263- return DGETTEXT (NULL, msgid);
6264+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
6265 }
6266
6267 #ifdef _LIBC
6268--- lrzsz-0.12.20.safe/intl/gettext.h 1998-04-26 09:22:35.000000000 -0400
6269+++ lrzsz-0.12.20/intl/gettext.h 1969-12-31 19:00:00.000000000 -0500
6270@@ -1,105 +0,0 @@
6271-/* Internal header for GNU gettext internationalization functions
6272- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6273-
6274- This program is free software; you can redistribute it and/or modify
6275- it under the terms of the GNU General Public License as published by
6276- the Free Software Foundation; either version 2, or (at your option)
6277- any later version.
6278-
6279- This program is distributed in the hope that it will be useful,
6280- but WITHOUT ANY WARRANTY; without even the implied warranty of
6281- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6282- GNU General Public License for more details.
6283-
6284- You should have received a copy of the GNU Library General Public
6285- License along with the GNU C Library; see the file COPYING.LIB. If not,
6286- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6287- Boston, MA 02111-1307, USA. */
6288-
6289-#ifndef _GETTEXT_H
6290-#define _GETTEXT_H 1
6291-
6292-#include <stdio.h>
6293-
6294-#if HAVE_LIMITS_H || _LIBC
6295-# include <limits.h>
6296-#endif
6297-
6298-/* @@ end of prolog @@ */
6299-
6300-/* The magic number of the GNU message catalog format. */
6301-#define _MAGIC 0x950412de
6302-#define _MAGIC_SWAPPED 0xde120495
6303-
6304-/* Revision number of the currently used .mo (binary) file format. */
6305-#define MO_REVISION_NUMBER 0
6306-
6307-/* The following contortions are an attempt to use the C preprocessor
6308- to determine an unsigned integral type that is 32 bits wide. An
6309- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6310- doing that would require that the configure script compile and *run*
6311- the resulting executable. Locally running cross-compiled executables
6312- is usually not possible. */
6313-
6314-#if __STDC__
6315-# define UINT_MAX_32_BITS 4294967295U
6316-#else
6317-# define UINT_MAX_32_BITS 0xFFFFFFFF
6318-#endif
6319-
6320-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6321- This should be valid for all systems GNU cares about because
6322- that doesn't include 16-bit systems, and only modern systems
6323- (that certainly have <limits.h>) have 64+-bit integral types. */
6324-
6325-#ifndef UINT_MAX
6326-# define UINT_MAX UINT_MAX_32_BITS
6327-#endif
6328-
6329-#if UINT_MAX == UINT_MAX_32_BITS
6330-typedef unsigned nls_uint32;
6331-#else
6332-# if USHRT_MAX == UINT_MAX_32_BITS
6333-typedef unsigned short nls_uint32;
6334-# else
6335-# if ULONG_MAX == UINT_MAX_32_BITS
6336-typedef unsigned long nls_uint32;
6337-# else
6338- /* The following line is intended to throw an error. Using #error is
6339- not portable enough. */
6340- "Cannot determine unsigned 32-bit data type."
6341-# endif
6342-# endif
6343-#endif
6344-
6345-
6346-/* Header for binary .mo file format. */
6347-struct mo_file_header
6348-{
6349- /* The magic number. */
6350- nls_uint32 magic;
6351- /* The revision number of the file format. */
6352- nls_uint32 revision;
6353- /* The number of strings pairs. */
6354- nls_uint32 nstrings;
6355- /* Offset of table with start offsets of original strings. */
6356- nls_uint32 orig_tab_offset;
6357- /* Offset of table with start offsets of translation strings. */
6358- nls_uint32 trans_tab_offset;
6359- /* Size of hashing table. */
6360- nls_uint32 hash_tab_size;
6361- /* Offset of first hashing entry. */
6362- nls_uint32 hash_tab_offset;
6363-};
6364-
6365-struct string_desc
6366-{
6367- /* Length of addressed string. */
6368- nls_uint32 length;
6369- /* Offset of string in file. */
6370- nls_uint32 offset;
6371-};
6372-
6373-/* @@ begin of epilog @@ */
6374-
6375-#endif /* gettext.h */
6376--- lrzsz-0.12.20.safe/intl/gettextP.h 1998-04-26 09:22:35.000000000 -0400
6377+++ lrzsz-0.12.20/intl/gettextP.h 2004-09-12 14:40:34.426737296 -0400
6378@@ -1,33 +1,53 @@
6379-/* Header describing internals of gettext library
6380- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
6381+/* Header describing internals of libintl library.
6382+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
6383+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
6384
6385- This program is free software; you can redistribute it and/or modify
6386- it under the terms of the GNU General Public License as published by
6387- the Free Software Foundation; either version 2, or (at your option)
6388+ This program is free software; you can redistribute it and/or modify it
6389+ under the terms of the GNU Library General Public License as published
6390+ by the Free Software Foundation; either version 2, or (at your option)
6391 any later version.
6392
6393 This program is distributed in the hope that it will be useful,
6394 but WITHOUT ANY WARRANTY; without even the implied warranty of
6395- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6396- GNU General Public License for more details.
6397+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6398+ Library General Public License for more details.
6399
6400- You should have received a copy of the GNU General Public License
6401- along with this program; if not, write to the Free Software Foundation,
6402- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6403+ You should have received a copy of the GNU Library General Public
6404+ License along with this program; if not, write to the Free Software
6405+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6406+ USA. */
6407
6408 #ifndef _GETTEXTP_H
6409 #define _GETTEXTP_H
6410
6411+#include <stddef.h> /* Get size_t. */
6412+
6413+#ifdef _LIBC
6414+# include "../iconv/gconv_int.h"
6415+#else
6416+# if HAVE_ICONV
6417+# include <iconv.h>
6418+# endif
6419+#endif
6420+
6421 #include "loadinfo.h"
6422
6423+#include "gmo.h" /* Get nls_uint32. */
6424+
6425 /* @@ end of prolog @@ */
6426
6427-#ifndef PARAMS
6428-# if __STDC__
6429-# define PARAMS(args) args
6430-# else
6431-# define PARAMS(args) ()
6432-# endif
6433+#ifndef internal_function
6434+# define internal_function
6435+#endif
6436+
6437+#ifndef attribute_hidden
6438+# define attribute_hidden
6439+#endif
6440+
6441+/* Tell the compiler when a conditional or integer expression is
6442+ almost always true or almost always false. */
6443+#ifndef HAVE_BUILTIN_EXPECT
6444+# define __builtin_expect(expr, val) (expr)
6445 #endif
6446
6447 #ifndef W
6448@@ -35,38 +55,160 @@
6449 #endif
6450
6451
6452-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
6453-
6454+#ifdef _LIBC
6455+# include <byteswap.h>
6456+# define SWAP(i) bswap_32 (i)
6457+#else
6458 static inline nls_uint32
6459 SWAP (i)
6460 nls_uint32 i;
6461 {
6462 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
6463 }
6464+#endif
6465+
6466
6467+/* In-memory representation of system dependent string. */
6468+struct sysdep_string_desc
6469+{
6470+ /* Length of addressed string, including the trailing NUL. */
6471+ size_t length;
6472+ /* Pointer to addressed string. */
6473+ const char *pointer;
6474+};
6475
6476+/* The representation of an opened message catalog. */
6477 struct loaded_domain
6478 {
6479+ /* Pointer to memory containing the .mo file. */
6480 const char *data;
6481+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
6482+ int use_mmap;
6483+ /* Size of mmap()ed memory. */
6484+ size_t mmap_size;
6485+ /* 1 if the .mo file uses a different endianness than this machine. */
6486 int must_swap;
6487+ /* Pointer to additional malloc()ed memory. */
6488+ void *malloced;
6489+
6490+ /* Number of static strings pairs. */
6491 nls_uint32 nstrings;
6492- struct string_desc *orig_tab;
6493- struct string_desc *trans_tab;
6494+ /* Pointer to descriptors of original strings in the file. */
6495+ const struct string_desc *orig_tab;
6496+ /* Pointer to descriptors of translated strings in the file. */
6497+ const struct string_desc *trans_tab;
6498+
6499+ /* Number of system dependent strings pairs. */
6500+ nls_uint32 n_sysdep_strings;
6501+ /* Pointer to descriptors of original sysdep strings. */
6502+ const struct sysdep_string_desc *orig_sysdep_tab;
6503+ /* Pointer to descriptors of translated sysdep strings. */
6504+ const struct sysdep_string_desc *trans_sysdep_tab;
6505+
6506+ /* Size of hash table. */
6507 nls_uint32 hash_size;
6508- nls_uint32 *hash_tab;
6509+ /* Pointer to hash table. */
6510+ const nls_uint32 *hash_tab;
6511+ /* 1 if the hash table uses a different endianness than this machine. */
6512+ int must_swap_hash_tab;
6513+
6514+ int codeset_cntr;
6515+#ifdef _LIBC
6516+ __gconv_t conv;
6517+#else
6518+# if HAVE_ICONV
6519+ iconv_t conv;
6520+# endif
6521+#endif
6522+ char **conv_tab;
6523+
6524+ struct expression *plural;
6525+ unsigned long int nplurals;
6526 };
6527
6528+/* We want to allocate a string at the end of the struct. But ISO C
6529+ doesn't allow zero sized arrays. */
6530+#ifdef __GNUC__
6531+# define ZERO 0
6532+#else
6533+# define ZERO 1
6534+#endif
6535+
6536+/* A set of settings bound to a message domain. Used to store settings
6537+ from bindtextdomain() and bind_textdomain_codeset(). */
6538 struct binding
6539 {
6540 struct binding *next;
6541- char *domainname;
6542 char *dirname;
6543+ int codeset_cntr; /* Incremented each time codeset changes. */
6544+ char *codeset;
6545+ char domainname[ZERO];
6546 };
6547
6548-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
6549- char *__locale,
6550- const char *__domainname));
6551-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
6552+/* A counter which is incremented each time some previous translations
6553+ become invalid.
6554+ This variable is part of the external ABI of the GNU libintl. */
6555+extern int _nl_msg_cat_cntr;
6556+
6557+#ifndef _LIBC
6558+const char *_nl_locale_name (int category, const char *categoryname);
6559+#endif
6560+
6561+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
6562+ const char *__domainname,
6563+ struct binding *__domainbinding)
6564+ internal_function;
6565+void _nl_load_domain (struct loaded_l10nfile *__domain,
6566+ struct binding *__domainbinding)
6567+ internal_function;
6568+void _nl_unload_domain (struct loaded_domain *__domain)
6569+ internal_function;
6570+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
6571+ struct loaded_domain *__domain,
6572+ struct binding *__domainbinding)
6573+ internal_function;
6574+void _nl_free_domain_conv (struct loaded_domain *__domain)
6575+ internal_function;
6576+
6577+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
6578+ struct binding *domainbinding, const char *msgid,
6579+ size_t *lengthp)
6580+ internal_function;
6581+
6582+#ifdef _LIBC
6583+extern char *__gettext (const char *__msgid);
6584+extern char *__dgettext (const char *__domainname, const char *__msgid);
6585+extern char *__dcgettext (const char *__domainname, const char *__msgid,
6586+ int __category);
6587+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
6588+ unsigned long int __n);
6589+extern char *__dngettext (const char *__domainname,
6590+ const char *__msgid1, const char *__msgid2,
6591+ unsigned long int n);
6592+extern char *__dcngettext (const char *__domainname,
6593+ const char *__msgid1, const char *__msgid2,
6594+ unsigned long int __n, int __category);
6595+extern char *__dcigettext (const char *__domainname,
6596+ const char *__msgid1, const char *__msgid2,
6597+ int __plural, unsigned long int __n,
6598+ int __category);
6599+extern char *__textdomain (const char *__domainname);
6600+extern char *__bindtextdomain (const char *__domainname,
6601+ const char *__dirname);
6602+extern char *__bind_textdomain_codeset (const char *__domainname,
6603+ const char *__codeset);
6604+#else
6605+/* Declare the exported libintl_* functions, in a way that allows us to
6606+ call them under their real name. */
6607+# undef _INTL_REDIRECT_INLINE
6608+# undef _INTL_REDIRECT_MACROS
6609+# define _INTL_REDIRECT_MACROS
6610+# include "libgnuintl.h"
6611+extern char *libintl_dcigettext (const char *__domainname,
6612+ const char *__msgid1, const char *__msgid2,
6613+ int __plural, unsigned long int __n,
6614+ int __category);
6615+#endif
6616
6617 /* @@ begin of epilog @@ */
6618
6619--- lrzsz-0.12.20.safe/intl/gmo.h 1969-12-31 19:00:00.000000000 -0500
6620+++ lrzsz-0.12.20/intl/gmo.h 2004-09-12 14:40:34.431736536 -0400
6621@@ -0,0 +1,149 @@
6622+/* Description of GNU message catalog format: general file layout.
6623+ Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
6624+
6625+ This program is free software; you can redistribute it and/or modify it
6626+ under the terms of the GNU Library General Public License as published
6627+ by the Free Software Foundation; either version 2, or (at your option)
6628+ any later version.
6629+
6630+ This program is distributed in the hope that it will be useful,
6631+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6632+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6633+ Library General Public License for more details.
6634+
6635+ You should have received a copy of the GNU Library General Public
6636+ License along with this program; if not, write to the Free Software
6637+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6638+ USA. */
6639+
6640+#ifndef _GETTEXT_H
6641+#define _GETTEXT_H 1
6642+
6643+#include <limits.h>
6644+
6645+/* @@ end of prolog @@ */
6646+
6647+/* The magic number of the GNU message catalog format. */
6648+#define _MAGIC 0x950412de
6649+#define _MAGIC_SWAPPED 0xde120495
6650+
6651+/* Revision number of the currently used .mo (binary) file format. */
6652+#define MO_REVISION_NUMBER 0
6653+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
6654+
6655+/* The following contortions are an attempt to use the C preprocessor
6656+ to determine an unsigned integral type that is 32 bits wide. An
6657+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6658+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
6659+ when cross-compiling. */
6660+
6661+#if __STDC__
6662+# define UINT_MAX_32_BITS 4294967295U
6663+#else
6664+# define UINT_MAX_32_BITS 0xFFFFFFFF
6665+#endif
6666+
6667+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6668+ This should be valid for all systems GNU cares about because
6669+ that doesn't include 16-bit systems, and only modern systems
6670+ (that certainly have <limits.h>) have 64+-bit integral types. */
6671+
6672+#ifndef UINT_MAX
6673+# define UINT_MAX UINT_MAX_32_BITS
6674+#endif
6675+
6676+#if UINT_MAX == UINT_MAX_32_BITS
6677+typedef unsigned nls_uint32;
6678+#else
6679+# if USHRT_MAX == UINT_MAX_32_BITS
6680+typedef unsigned short nls_uint32;
6681+# else
6682+# if ULONG_MAX == UINT_MAX_32_BITS
6683+typedef unsigned long nls_uint32;
6684+# else
6685+ /* The following line is intended to throw an error. Using #error is
6686+ not portable enough. */
6687+ "Cannot determine unsigned 32-bit data type."
6688+# endif
6689+# endif
6690+#endif
6691+
6692+
6693+/* Header for binary .mo file format. */
6694+struct mo_file_header
6695+{
6696+ /* The magic number. */
6697+ nls_uint32 magic;
6698+ /* The revision number of the file format. */
6699+ nls_uint32 revision;
6700+
6701+ /* The following are only used in .mo files with major revision 0 or 1. */
6702+
6703+ /* The number of strings pairs. */
6704+ nls_uint32 nstrings;
6705+ /* Offset of table with start offsets of original strings. */
6706+ nls_uint32 orig_tab_offset;
6707+ /* Offset of table with start offsets of translated strings. */
6708+ nls_uint32 trans_tab_offset;
6709+ /* Size of hash table. */
6710+ nls_uint32 hash_tab_size;
6711+ /* Offset of first hash table entry. */
6712+ nls_uint32 hash_tab_offset;
6713+
6714+ /* The following are only used in .mo files with minor revision >= 1. */
6715+
6716+ /* The number of system dependent segments. */
6717+ nls_uint32 n_sysdep_segments;
6718+ /* Offset of table describing system dependent segments. */
6719+ nls_uint32 sysdep_segments_offset;
6720+ /* The number of system dependent strings pairs. */
6721+ nls_uint32 n_sysdep_strings;
6722+ /* Offset of table with start offsets of original sysdep strings. */
6723+ nls_uint32 orig_sysdep_tab_offset;
6724+ /* Offset of table with start offsets of translated sysdep strings. */
6725+ nls_uint32 trans_sysdep_tab_offset;
6726+};
6727+
6728+/* Descriptor for static string contained in the binary .mo file. */
6729+struct string_desc
6730+{
6731+ /* Length of addressed string, not including the trailing NUL. */
6732+ nls_uint32 length;
6733+ /* Offset of string in file. */
6734+ nls_uint32 offset;
6735+};
6736+
6737+/* The following are only used in .mo files with minor revision >= 1. */
6738+
6739+/* Descriptor for system dependent string segment. */
6740+struct sysdep_segment
6741+{
6742+ /* Length of addressed string, including the trailing NUL. */
6743+ nls_uint32 length;
6744+ /* Offset of string in file. */
6745+ nls_uint32 offset;
6746+};
6747+
6748+/* Descriptor for system dependent string. */
6749+struct sysdep_string
6750+{
6751+ /* Offset of static string segments in file. */
6752+ nls_uint32 offset;
6753+ /* Alternating sequence of static and system dependent segments.
6754+ The last segment is a static segment, including the trailing NUL. */
6755+ struct segment_pair
6756+ {
6757+ /* Size of static segment. */
6758+ nls_uint32 segsize;
6759+ /* Reference to system dependent string segment, or ~0 at the end. */
6760+ nls_uint32 sysdepref;
6761+ } segments[1];
6762+};
6763+
6764+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
6765+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
6766+#define SEGMENTS_END ((nls_uint32) ~0)
6767+
6768+/* @@ begin of epilog @@ */
6769+
6770+#endif /* gettext.h */
6771--- lrzsz-0.12.20.safe/intl/hash-string.h 1998-04-26 09:22:36.000000000 -0400
6772+++ lrzsz-0.12.20/intl/hash-string.h 2004-09-12 14:40:34.436735776 -0400
6773@@ -1,35 +1,23 @@
6774-/* Implements a string hashing function.
6775- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6776+/* Description of GNU message catalog format: string hashing function.
6777+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
6778
6779- This program is free software; you can redistribute it and/or modify
6780- it under the terms of the GNU General Public License as published by
6781- the Free Software Foundation; either version 2, or (at your option)
6782+ This program is free software; you can redistribute it and/or modify it
6783+ under the terms of the GNU Library General Public License as published
6784+ by the Free Software Foundation; either version 2, or (at your option)
6785 any later version.
6786
6787 This program is distributed in the hope that it will be useful,
6788 but WITHOUT ANY WARRANTY; without even the implied warranty of
6789- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6790- GNU General Public License for more details.
6791+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6792+ Library General Public License for more details.
6793
6794 You should have received a copy of the GNU Library General Public
6795- License along with the GNU C Library; see the file COPYING.LIB. If not,
6796- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6797- Boston, MA 02111-1307, USA. */
6798-
6799-#ifdef HAVE_VALUES_H
6800-# include <values.h>
6801-#endif
6802+ License along with this program; if not, write to the Free Software
6803+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6804+ USA. */
6805
6806 /* @@ end of prolog @@ */
6807
6808-#ifndef PARAMS
6809-# if __STDC__
6810-# define PARAMS(Args) Args
6811-# else
6812-# define PARAMS(Args) ()
6813-# endif
6814-#endif
6815-
6816 /* We assume to have `unsigned long int' value with at least 32 bits. */
6817 #define HASHWORDBITS 32
6818
6819@@ -37,11 +25,8 @@
6820 /* Defines the so called `hashpjw' function by P.J. Weinberger
6821 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
6822 1986, 1987 Bell Telephone Laboratories, Inc.] */
6823-static unsigned long hash_string PARAMS ((const char *__str_param));
6824-
6825-static inline unsigned long
6826-hash_string (str_param)
6827- const char *str_param;
6828+static inline unsigned long int
6829+hash_string (const char *str_param)
6830 {
6831 unsigned long int hval, g;
6832 const char *str = str_param;
6833@@ -51,8 +36,8 @@
6834 while (*str != '\0')
6835 {
6836 hval <<= 4;
6837- hval += (unsigned long) *str++;
6838- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
6839+ hval += (unsigned char) *str++;
6840+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
6841 if (g != 0)
6842 {
6843 hval ^= g >> (HASHWORDBITS - 8);
6844--- lrzsz-0.12.20.safe/intl/intl-compat.c 1998-04-26 09:20:52.000000000 -0400
6845+++ lrzsz-0.12.20/intl/intl-compat.c 2004-09-12 14:40:34.441735016 -0400
6846@@ -1,76 +1,131 @@
6847 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
6848 Library.
6849- Copyright (C) 1995 Software Foundation, Inc.
6850+ Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
6851
6852-This program is free software; you can redistribute it and/or modify
6853-it under the terms of the GNU General Public License as published by
6854-the Free Software Foundation; either version 2, or (at your option)
6855-any later version.
6856+ This program is free software; you can redistribute it and/or modify it
6857+ under the terms of the GNU Library General Public License as published
6858+ by the Free Software Foundation; either version 2, or (at your option)
6859+ any later version.
6860
6861-This program is distributed in the hope that it will be useful,
6862-but WITHOUT ANY WARRANTY; without even the implied warranty of
6863-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6864-GNU General Public License for more details.
6865+ This program is distributed in the hope that it will be useful,
6866+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6867+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6868+ Library General Public License for more details.
6869
6870-You should have received a copy of the GNU General Public License
6871-along with this program; if not, write to the Free Software
6872-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6873+ You should have received a copy of the GNU Library General Public
6874+ License along with this program; if not, write to the Free Software
6875+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6876+ USA. */
6877
6878 #ifdef HAVE_CONFIG_H
6879 # include <config.h>
6880 #endif
6881
6882-#include "libgettext.h"
6883+#include "gettextP.h"
6884
6885 /* @@ end of prolog @@ */
6886
6887+/* This file redirects the gettext functions (without prefix) to those
6888+ defined in the included GNU libintl library (with "libintl_" prefix).
6889+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
6890+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
6891+ has the redirections primarily in the <libintl.h> include file.
6892+ It is also compiled into libgnuintl so that libgnuintl.so can be used
6893+ as LD_PRELOADable library on glibc systems, to provide the extra
6894+ features that the functions in the libc don't have (namely, logging). */
6895+
6896
6897 #undef gettext
6898 #undef dgettext
6899 #undef dcgettext
6900+#undef ngettext
6901+#undef dngettext
6902+#undef dcngettext
6903 #undef textdomain
6904 #undef bindtextdomain
6905+#undef bind_textdomain_codeset
6906+
6907+
6908+/* When building a DLL, we must export some functions. Note that because
6909+ the functions are only defined for binary backward compatibility, we
6910+ don't need to use __declspec(dllimport) in any case. */
6911+#if defined _MSC_VER && BUILDING_DLL
6912+# define DLL_EXPORTED __declspec(dllexport)
6913+#else
6914+# define DLL_EXPORTED
6915+#endif
6916
6917
6918+DLL_EXPORTED
6919 char *
6920-bindtextdomain (domainname, dirname)
6921- const char *domainname;
6922- const char *dirname;
6923+gettext (const char *msgid)
6924 {
6925- return bindtextdomain__ (domainname, dirname);
6926+ return libintl_gettext (msgid);
6927 }
6928
6929
6930+DLL_EXPORTED
6931 char *
6932-dcgettext (domainname, msgid, category)
6933- const char *domainname;
6934- const char *msgid;
6935- int category;
6936+dgettext (const char *domainname, const char *msgid)
6937 {
6938- return dcgettext__ (domainname, msgid, category);
6939+ return libintl_dgettext (domainname, msgid);
6940 }
6941
6942
6943+DLL_EXPORTED
6944 char *
6945-dgettext (domainname, msgid)
6946- const char *domainname;
6947- const char *msgid;
6948+dcgettext (const char *domainname, const char *msgid, int category)
6949 {
6950- return dgettext__ (domainname, msgid);
6951+ return libintl_dcgettext (domainname, msgid, category);
6952 }
6953
6954
6955+DLL_EXPORTED
6956 char *
6957-gettext (msgid)
6958- const char *msgid;
6959+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
6960 {
6961- return gettext__ (msgid);
6962+ return libintl_ngettext (msgid1, msgid2, n);
6963 }
6964
6965
6966+DLL_EXPORTED
6967 char *
6968-textdomain (domainname)
6969- const char *domainname;
6970+dngettext (const char *domainname,
6971+ const char *msgid1, const char *msgid2, unsigned long int n)
6972 {
6973- return textdomain__ (domainname);
6974+ return libintl_dngettext (domainname, msgid1, msgid2, n);
6975+}
6976+
6977+
6978+DLL_EXPORTED
6979+char *
6980+dcngettext (const char *domainname,
6981+ const char *msgid1, const char *msgid2, unsigned long int n,
6982+ int category)
6983+{
6984+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
6985+}
6986+
6987+
6988+DLL_EXPORTED
6989+char *
6990+textdomain (const char *domainname)
6991+{
6992+ return libintl_textdomain (domainname);
6993+}
6994+
6995+
6996+DLL_EXPORTED
6997+char *
6998+bindtextdomain (const char *domainname, const char *dirname)
6999+{
7000+ return libintl_bindtextdomain (domainname, dirname);
7001+}
7002+
7003+
7004+DLL_EXPORTED
7005+char *
7006+bind_textdomain_codeset (const char *domainname, const char *codeset)
7007+{
7008+ return libintl_bind_textdomain_codeset (domainname, codeset);
7009 }
7010--- lrzsz-0.12.20.safe/intl/l10nflist.c 1998-04-26 09:22:37.000000000 -0400
7011+++ lrzsz-0.12.20/intl/l10nflist.c 2004-09-12 14:40:34.457732584 -0400
7012@@ -1,52 +1,40 @@
7013-/* Handle list of needed message catalogs
7014- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7015- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7016+/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
7017+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7018
7019- This program is free software; you can redistribute it and/or modify
7020- it under the terms of the GNU General Public License as published by
7021- the Free Software Foundation; either version 2, or (at your option)
7022+ This program is free software; you can redistribute it and/or modify it
7023+ under the terms of the GNU Library General Public License as published
7024+ by the Free Software Foundation; either version 2, or (at your option)
7025 any later version.
7026
7027 This program is distributed in the hope that it will be useful,
7028 but WITHOUT ANY WARRANTY; without even the implied warranty of
7029- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7030- GNU General Public License for more details.
7031+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7032+ Library General Public License for more details.
7033
7034- You should have received a copy of the GNU General Public License
7035- along with this program; if not, write to the Free Software Foundation,
7036- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7037+ You should have received a copy of the GNU Library General Public
7038+ License along with this program; if not, write to the Free Software
7039+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7040+ USA. */
7041+
7042+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
7043+ This must come before <config.h> because <config.h> may include
7044+ <features.h>, and once <features.h> has been included, it's too late. */
7045+#ifndef _GNU_SOURCE
7046+# define _GNU_SOURCE 1
7047+#endif
7048
7049 #ifdef HAVE_CONFIG_H
7050 # include <config.h>
7051 #endif
7052
7053-
7054-#if defined HAVE_STRING_H || defined _LIBC
7055-# ifndef _GNU_SOURCE
7056-# define _GNU_SOURCE 1
7057-# endif
7058-# include <string.h>
7059-#else
7060-# include <strings.h>
7061-# ifndef memcpy
7062-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
7063-# endif
7064-#endif
7065-#if !HAVE_STRCHR && !defined _LIBC
7066-# ifndef strchr
7067-# define strchr index
7068-# endif
7069-#endif
7070+#include <string.h>
7071
7072 #if defined _LIBC || defined HAVE_ARGZ_H
7073 # include <argz.h>
7074 #endif
7075 #include <ctype.h>
7076 #include <sys/types.h>
7077-
7078-#if defined STDC_HEADERS || defined _LIBC
7079-# include <stdlib.h>
7080-#endif
7081+#include <stdlib.h>
7082
7083 #include "loadinfo.h"
7084
7085@@ -65,23 +53,39 @@
7086 /* Rename the non ANSI C functions. This is required by the standard
7087 because some ANSI C functions will require linking with this object
7088 file and the name space must not be polluted. */
7089-# define stpcpy(dest, src) __stpcpy(dest, src)
7090+# ifndef stpcpy
7091+# define stpcpy(dest, src) __stpcpy(dest, src)
7092+# endif
7093 #else
7094 # ifndef HAVE_STPCPY
7095-static char *stpcpy PARAMS ((char *dest, const char *src));
7096+static char *stpcpy (char *dest, const char *src);
7097 # endif
7098 #endif
7099
7100+/* Pathname support.
7101+ ISSLASH(C) tests whether C is a directory separator character.
7102+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
7103+ it may be concatenated to a directory pathname.
7104+ */
7105+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
7106+ /* Win32, OS/2, DOS */
7107+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
7108+# define HAS_DEVICE(P) \
7109+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
7110+ && (P)[1] == ':')
7111+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
7112+#else
7113+ /* Unix */
7114+# define ISSLASH(C) ((C) == '/')
7115+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
7116+#endif
7117+
7118 /* Define function which are usually not available. */
7119
7120 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
7121 /* Returns the number of strings in ARGZ. */
7122-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
7123-
7124 static size_t
7125-argz_count__ (argz, len)
7126- const char *argz;
7127- size_t len;
7128+argz_count__ (const char *argz, size_t len)
7129 {
7130 size_t count = 0;
7131 while (len > 0)
7132@@ -95,18 +99,17 @@
7133 }
7134 # undef __argz_count
7135 # define __argz_count(argz, len) argz_count__ (argz, len)
7136+#else
7137+# ifdef _LIBC
7138+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
7139+# endif
7140 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
7141
7142 #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
7143 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
7144 except the last into the character SEP. */
7145-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
7146-
7147 static void
7148-argz_stringify__ (argz, len, sep)
7149- char *argz;
7150- size_t len;
7151- int sep;
7152+argz_stringify__ (char *argz, size_t len, int sep)
7153 {
7154 while (len > 0)
7155 {
7156@@ -119,17 +122,16 @@
7157 }
7158 # undef __argz_stringify
7159 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
7160+#else
7161+# ifdef _LIBC
7162+# define __argz_stringify(argz, len, sep) \
7163+ INTUSE(__argz_stringify) (argz, len, sep)
7164+# endif
7165 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
7166
7167 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
7168-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
7169- const char *entry));
7170-
7171 static char *
7172-argz_next__ (argz, argz_len, entry)
7173- char *argz;
7174- size_t argz_len;
7175- const char *entry;
7176+argz_next__ (char *argz, size_t argz_len, const char *entry)
7177 {
7178 if (entry)
7179 {
7180@@ -150,11 +152,8 @@
7181
7182
7183 /* Return number of bits set in X. */
7184-static int pop PARAMS ((int x));
7185-
7186 static inline int
7187-pop (x)
7188- int x;
7189+pop (int x)
7190 {
7191 /* We assume that no more than 16 bits are used. */
7192 x = ((x & ~0x5555) >> 1) + (x & 0x5555);
7193@@ -167,31 +166,27 @@
7194
7195
7196 struct loaded_l10nfile *
7197-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
7198- territory, codeset, normalized_codeset, modifier, special,
7199- sponsor, revision, filename, do_allocate)
7200- struct loaded_l10nfile **l10nfile_list;
7201- const char *dirlist;
7202- size_t dirlist_len;
7203- int mask;
7204- const char *language;
7205- const char *territory;
7206- const char *codeset;
7207- const char *normalized_codeset;
7208- const char *modifier;
7209- const char *special;
7210- const char *sponsor;
7211- const char *revision;
7212- const char *filename;
7213- int do_allocate;
7214+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
7215+ const char *dirlist, size_t dirlist_len,
7216+ int mask, const char *language, const char *territory,
7217+ const char *codeset, const char *normalized_codeset,
7218+ const char *modifier, const char *special,
7219+ const char *sponsor, const char *revision,
7220+ const char *filename, int do_allocate)
7221 {
7222 char *abs_filename;
7223- struct loaded_l10nfile *last = NULL;
7224+ struct loaded_l10nfile **lastp;
7225 struct loaded_l10nfile *retval;
7226 char *cp;
7227+ size_t dirlist_count;
7228 size_t entries;
7229 int cnt;
7230
7231+ /* If LANGUAGE contains an absolute directory specification, we ignore
7232+ DIRLIST. */
7233+ if (IS_ABSOLUTE_PATH (language))
7234+ dirlist_len = 0;
7235+
7236 /* Allocate room for the full file name. */
7237 abs_filename = (char *) malloc (dirlist_len
7238 + strlen (language)
7239@@ -209,7 +204,7 @@
7240 + (((mask & CEN_SPONSOR) != 0
7241 || (mask & CEN_REVISION) != 0)
7242 ? (1 + ((mask & CEN_SPONSOR) != 0
7243- ? strlen (sponsor) + 1 : 0)
7244+ ? strlen (sponsor) : 0)
7245 + ((mask & CEN_REVISION) != 0
7246 ? strlen (revision) + 1 : 0)) : 0)
7247 + 1 + strlen (filename) + 1);
7248@@ -217,14 +212,16 @@
7249 if (abs_filename == NULL)
7250 return NULL;
7251
7252- retval = NULL;
7253- last = NULL;
7254-
7255 /* Construct file name. */
7256- memcpy (abs_filename, dirlist, dirlist_len);
7257- __argz_stringify (abs_filename, dirlist_len, ':');
7258- cp = abs_filename + (dirlist_len - 1);
7259- *cp++ = '/';
7260+ cp = abs_filename;
7261+ if (dirlist_len > 0)
7262+ {
7263+ memcpy (cp, dirlist, dirlist_len);
7264+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
7265+ cp += dirlist_len;
7266+ cp[-1] = '/';
7267+ }
7268+
7269 cp = stpcpy (cp, language);
7270
7271 if ((mask & TERRITORY) != 0)
7272@@ -271,7 +268,7 @@
7273
7274 /* Look in list of already loaded domains whether it is already
7275 available. */
7276- last = NULL;
7277+ lastp = l10nfile_list;
7278 for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
7279 if (retval->filename != NULL)
7280 {
7281@@ -286,7 +283,7 @@
7282 break;
7283 }
7284
7285- last = retval;
7286+ lastp = &retval->next;
7287 }
7288
7289 if (retval != NULL || do_allocate == 0)
7290@@ -295,48 +292,66 @@
7291 return retval;
7292 }
7293
7294- retval = (struct loaded_l10nfile *)
7295- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
7296- * (1 << pop (mask))
7297- * sizeof (struct loaded_l10nfile *)));
7298+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
7299+
7300+ /* Allocate a new loaded_l10nfile. */
7301+ retval =
7302+ (struct loaded_l10nfile *)
7303+ malloc (sizeof (*retval)
7304+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
7305+ * sizeof (struct loaded_l10nfile *)));
7306 if (retval == NULL)
7307 return NULL;
7308
7309 retval->filename = abs_filename;
7310- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
7311+
7312+ /* We set retval->data to NULL here; it is filled in later.
7313+ Setting retval->decided to 1 here means that retval does not
7314+ correspond to a real file (dirlist_count > 1) or is not worth
7315+ looking up (if an unnormalized codeset was specified). */
7316+ retval->decided = (dirlist_count > 1
7317 || ((mask & XPG_CODESET) != 0
7318 && (mask & XPG_NORM_CODESET) != 0));
7319 retval->data = NULL;
7320
7321- if (last == NULL)
7322- {
7323- retval->next = *l10nfile_list;
7324- *l10nfile_list = retval;
7325- }
7326- else
7327- {
7328- retval->next = last->next;
7329- last->next = retval;
7330- }
7331+ retval->next = *lastp;
7332+ *lastp = retval;
7333
7334 entries = 0;
7335- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
7336- a real file. So we have to use the DIRLIST separation mechanism
7337- of the inner loop. */
7338- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
7339- for (; cnt >= 0; --cnt)
7340+ /* Recurse to fill the inheritance list of RETVAL.
7341+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
7342+ entry does not correspond to a real file; retval->filename contains
7343+ colons. In this case we loop across all elements of DIRLIST and
7344+ across all bit patterns dominated by MASK.
7345+ If the DIRLIST is a single directory or entirely redundant (i.e.
7346+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
7347+ MASK, excluding MASK itself.
7348+ In either case, we loop down from MASK to 0. This has the effect
7349+ that the extra bits in the locale name are dropped in this order:
7350+ first the modifier, then the territory, then the codeset, then the
7351+ normalized_codeset. */
7352+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
7353 if ((cnt & ~mask) == 0
7354 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
7355 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
7356 {
7357- /* Iterate over all elements of the DIRLIST. */
7358- char *dir = NULL;
7359+ if (dirlist_count > 1)
7360+ {
7361+ /* Iterate over all elements of the DIRLIST. */
7362+ char *dir = NULL;
7363
7364- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7365- != NULL)
7366+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7367+ != NULL)
7368+ retval->successor[entries++]
7369+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
7370+ cnt, language, territory, codeset,
7371+ normalized_codeset, modifier, special,
7372+ sponsor, revision, filename, 1);
7373+ }
7374+ else
7375 retval->successor[entries++]
7376- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
7377- language, territory, codeset,
7378+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
7379+ cnt, language, territory, codeset,
7380 normalized_codeset, modifier, special,
7381 sponsor, revision, filename, 1);
7382 }
7383@@ -347,11 +362,10 @@
7384
7385 /* Normalize codeset name. There is no standard for the codeset
7386 names. Normalization allows the user to use any of the common
7387- names. */
7388+ names. The return value is dynamically allocated and has to be
7389+ freed by the caller. */
7390 const char *
7391-_nl_normalize_codeset (codeset, name_len)
7392- const char *codeset;
7393- size_t name_len;
7394+_nl_normalize_codeset (const char *codeset, size_t name_len)
7395 {
7396 int len = 0;
7397 int only_digit = 1;
7398@@ -360,11 +374,11 @@
7399 size_t cnt;
7400
7401 for (cnt = 0; cnt < name_len; ++cnt)
7402- if (isalnum (codeset[cnt]))
7403+ if (isalnum ((unsigned char) codeset[cnt]))
7404 {
7405 ++len;
7406
7407- if (isalpha (codeset[cnt]))
7408+ if (isalpha ((unsigned char) codeset[cnt]))
7409 only_digit = 0;
7410 }
7411
7412@@ -378,9 +392,9 @@
7413 wp = retval;
7414
7415 for (cnt = 0; cnt < name_len; ++cnt)
7416- if (isalpha (codeset[cnt]))
7417- *wp++ = tolower (codeset[cnt]);
7418- else if (isdigit (codeset[cnt]))
7419+ if (isalpha ((unsigned char) codeset[cnt]))
7420+ *wp++ = tolower ((unsigned char) codeset[cnt]);
7421+ else if (isdigit ((unsigned char) codeset[cnt]))
7422 *wp++ = codeset[cnt];
7423
7424 *wp = '\0';
7425@@ -398,9 +412,7 @@
7426 to be defined. */
7427 #if !_LIBC && !HAVE_STPCPY
7428 static char *
7429-stpcpy (dest, src)
7430- char *dest;
7431- const char *src;
7432+stpcpy (char *dest, const char *src)
7433 {
7434 while ((*dest++ = *src++) != '\0')
7435 /* Do nothing. */ ;
7436--- lrzsz-0.12.20.safe/intl/libgettext.h 1998-04-26 09:22:36.000000000 -0400
7437+++ lrzsz-0.12.20/intl/libgettext.h 1969-12-31 19:00:00.000000000 -0500
7438@@ -1,182 +0,0 @@
7439-/* Message catalogs for internationalization.
7440- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7441-
7442- This program is free software; you can redistribute it and/or modify
7443- it under the terms of the GNU General Public License as published by
7444- the Free Software Foundation; either version 2, or (at your option)
7445- any later version.
7446-
7447- This program is distributed in the hope that it will be useful,
7448- but WITHOUT ANY WARRANTY; without even the implied warranty of
7449- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7450- GNU General Public License for more details.
7451-
7452- You should have received a copy of the GNU General Public License
7453- along with this program; if not, write to the Free Software Foundation,
7454- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7455-
7456-/* Because on some systems (e.g. Solaris) we sometimes have to include
7457- the systems libintl.h as well as this file we have more complex
7458- include protection above. But the systems header might perhaps also
7459- define _LIBINTL_H and therefore we have to protect the definition here. */
7460-
7461-#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
7462-#if !defined (_LIBINTL_H)
7463-# define _LIBINTL_H 1
7464-#endif
7465-#define _LIBGETTEXT_H 1
7466-
7467-/* We define an additional symbol to signal that we use the GNU
7468- implementation of gettext. */
7469-#define __USE_GNU_GETTEXT 1
7470-
7471-#include <sys/types.h>
7472-
7473-#if HAVE_LOCALE_H
7474-# include <locale.h>
7475-#endif
7476-
7477-
7478-#ifdef __cplusplus
7479-extern "C" {
7480-#endif
7481-
7482-/* @@ end of prolog @@ */
7483-
7484-#ifndef PARAMS
7485-# if __STDC__
7486-# define PARAMS(args) args
7487-# else
7488-# define PARAMS(args) ()
7489-# endif
7490-#endif
7491-
7492-#ifndef NULL
7493-# if !defined __cplusplus || defined __GNUC__
7494-# define NULL ((void *) 0)
7495-# else
7496-# define NULL (0)
7497-# endif
7498-#endif
7499-
7500-#if !HAVE_LC_MESSAGES
7501-/* This value determines the behaviour of the gettext() and dgettext()
7502- function. But some system does not have this defined. Define it
7503- to a default value. */
7504-# define LC_MESSAGES (-1)
7505-#endif
7506-
7507-
7508-/* Declarations for gettext-using-catgets interface. Derived from
7509- Jim Meyering's libintl.h. */
7510-struct _msg_ent
7511-{
7512- const char *_msg;
7513- int _msg_number;
7514-};
7515-
7516-
7517-#if HAVE_CATGETS
7518-/* These two variables are defined in the automatically by po-to-tbl.sed
7519- generated file `cat-id-tbl.c'. */
7520-extern const struct _msg_ent _msg_tbl[];
7521-extern int _msg_tbl_length;
7522-#endif
7523-
7524-
7525-/* For automatical extraction of messages sometimes no real
7526- translation is needed. Instead the string itself is the result. */
7527-#define gettext_noop(Str) (Str)
7528-
7529-/* Look up MSGID in the current default message catalog for the current
7530- LC_MESSAGES locale. If not found, returns MSGID itself (the default
7531- text). */
7532-extern char *gettext PARAMS ((const char *__msgid));
7533-extern char *gettext__ PARAMS ((const char *__msgid));
7534-
7535-/* Look up MSGID in the DOMAINNAME message catalog for the current
7536- LC_MESSAGES locale. */
7537-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
7538-extern char *dgettext__ PARAMS ((const char *__domainname,
7539- const char *__msgid));
7540-
7541-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7542- locale. */
7543-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
7544- int __category));
7545-extern char *dcgettext__ PARAMS ((const char *__domainname,
7546- const char *__msgid, int __category));
7547-
7548-
7549-/* Set the current default message catalog to DOMAINNAME.
7550- If DOMAINNAME is null, return the current default.
7551- If DOMAINNAME is "", reset to the default of "messages". */
7552-extern char *textdomain PARAMS ((const char *__domainname));
7553-extern char *textdomain__ PARAMS ((const char *__domainname));
7554-
7555-/* Specify that the DOMAINNAME message catalog will be found
7556- in DIRNAME rather than in the system locale data base. */
7557-extern char *bindtextdomain PARAMS ((const char *__domainname,
7558- const char *__dirname));
7559-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
7560- const char *__dirname));
7561-
7562-#if ENABLE_NLS
7563-
7564-/* Solaris 2.3 has the gettext function but dcgettext is missing.
7565- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
7566- has dcgettext. */
7567-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
7568-
7569-# define gettext(Msgid) \
7570- dgettext (NULL, Msgid)
7571-
7572-# define dgettext(Domainname, Msgid) \
7573- dcgettext (Domainname, Msgid, LC_MESSAGES)
7574-
7575-# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
7576-/* This global variable is defined in loadmsgcat.c. We need a sign,
7577- whether a new catalog was loaded, which can be associated with all
7578- translations. */
7579-extern int _nl_msg_cat_cntr;
7580-
7581-# define dcgettext(Domainname, Msgid, Category) \
7582- (__extension__ \
7583- ({ \
7584- char *__result; \
7585- if (__builtin_constant_p (Msgid)) \
7586- { \
7587- static char *__translation__; \
7588- static int __catalog_counter__; \
7589- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
7590- { \
7591- __translation__ = \
7592- dcgettext__ (Domainname, Msgid, Category); \
7593- __catalog_counter__ = _nl_msg_cat_cntr; \
7594- } \
7595- __result = __translation__; \
7596- } \
7597- else \
7598- __result = dcgettext__ (Domainname, Msgid, Category); \
7599- __result; \
7600- }))
7601-# endif
7602-# endif
7603-
7604-#else
7605-
7606-# define gettext(Msgid) (Msgid)
7607-# define dgettext(Domainname, Msgid) (Msgid)
7608-# define dcgettext(Domainname, Msgid, Category) (Msgid)
7609-# define textdomain(Domainname) while (0) /* nothing */
7610-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
7611-
7612-#endif
7613-
7614-/* @@ begin of epilog @@ */
7615-
7616-#ifdef __cplusplus
7617-}
7618-#endif
7619-
7620-#endif
7621--- lrzsz-0.12.20.safe/intl/libgnuintl.h.in 1969-12-31 19:00:00.000000000 -0500
7622+++ lrzsz-0.12.20/intl/libgnuintl.h.in 2004-09-12 14:40:34.462731824 -0400
7623@@ -0,0 +1,383 @@
7624+/* Message catalogs for internationalization.
7625+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
7626+
7627+ This program is free software; you can redistribute it and/or modify it
7628+ under the terms of the GNU Library General Public License as published
7629+ by the Free Software Foundation; either version 2, or (at your option)
7630+ any later version.
7631+
7632+ This program is distributed in the hope that it will be useful,
7633+ but WITHOUT ANY WARRANTY; without even the implied warranty of
7634+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7635+ Library General Public License for more details.
7636+
7637+ You should have received a copy of the GNU Library General Public
7638+ License along with this program; if not, write to the Free Software
7639+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7640+ USA. */
7641+
7642+#ifndef _LIBINTL_H
7643+#define _LIBINTL_H 1
7644+
7645+#include <locale.h>
7646+
7647+/* The LC_MESSAGES locale category is the category used by the functions
7648+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
7649+ On systems that don't define it, use an arbitrary value instead.
7650+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
7651+ then includes <libintl.h> (i.e. this file!) and then only defines
7652+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
7653+ in this case. */
7654+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
7655+# define LC_MESSAGES 1729
7656+#endif
7657+
7658+/* We define an additional symbol to signal that we use the GNU
7659+ implementation of gettext. */
7660+#define __USE_GNU_GETTEXT 1
7661+
7662+/* Provide information about the supported file formats. Returns the
7663+ maximum minor revision number supported for a given major revision. */
7664+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
7665+ ((major) == 0 ? 1 : -1)
7666+
7667+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
7668+ precedence over _conio_gettext. */
7669+#ifdef __DJGPP__
7670+# undef gettext
7671+#endif
7672+
7673+#ifdef __cplusplus
7674+extern "C" {
7675+#endif
7676+
7677+
7678+/* We redirect the functions to those prefixed with "libintl_". This is
7679+ necessary, because some systems define gettext/textdomain/... in the C
7680+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
7681+ If we used the unprefixed names, there would be cases where the
7682+ definition in the C library would override the one in the libintl.so
7683+ shared library. Recall that on ELF systems, the symbols are looked
7684+ up in the following order:
7685+ 1. in the executable,
7686+ 2. in the shared libraries specified on the link command line, in order,
7687+ 3. in the dependencies of the shared libraries specified on the link
7688+ command line,
7689+ 4. in the dlopen()ed shared libraries, in the order in which they were
7690+ dlopen()ed.
7691+ The definition in the C library would override the one in libintl.so if
7692+ either
7693+ * -lc is given on the link command line and -lintl isn't, or
7694+ * -lc is given on the link command line before -lintl, or
7695+ * libintl.so is a dependency of a dlopen()ed shared library but not
7696+ linked to the executable at link time.
7697+ Since Solaris gettext() behaves differently than GNU gettext(), this
7698+ would be unacceptable.
7699+
7700+ The redirection happens by default through macros in C, so that &gettext
7701+ is independent of the compilation unit, but through inline functions in
7702+ C++, in order not to interfere with the name mangling of class fields or
7703+ class methods called 'gettext'. */
7704+
7705+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
7706+ If he doesn't, we choose the method. A third possible method is
7707+ _INTL_REDIRECT_ASM, supported only by GCC. */
7708+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
7709+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
7710+# define _INTL_REDIRECT_ASM
7711+# else
7712+# ifdef __cplusplus
7713+# define _INTL_REDIRECT_INLINE
7714+# else
7715+# define _INTL_REDIRECT_MACROS
7716+# endif
7717+# endif
7718+#endif
7719+/* Auxiliary macros. */
7720+#ifdef _INTL_REDIRECT_ASM
7721+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
7722+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
7723+# define _INTL_STRINGIFY(prefix) #prefix
7724+#else
7725+# define _INTL_ASM(cname)
7726+#endif
7727+
7728+/* Look up MSGID in the current default message catalog for the current
7729+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
7730+ text). */
7731+#ifdef _INTL_REDIRECT_INLINE
7732+extern char *libintl_gettext (const char *__msgid);
7733+static inline char *gettext (const char *__msgid)
7734+{
7735+ return libintl_gettext (__msgid);
7736+}
7737+#else
7738+#ifdef _INTL_REDIRECT_MACROS
7739+# define gettext libintl_gettext
7740+#endif
7741+extern char *gettext (const char *__msgid)
7742+ _INTL_ASM (libintl_gettext);
7743+#endif
7744+
7745+/* Look up MSGID in the DOMAINNAME message catalog for the current
7746+ LC_MESSAGES locale. */
7747+#ifdef _INTL_REDIRECT_INLINE
7748+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
7749+static inline char *dgettext (const char *__domainname, const char *__msgid)
7750+{
7751+ return libintl_dgettext (__domainname, __msgid);
7752+}
7753+#else
7754+#ifdef _INTL_REDIRECT_MACROS
7755+# define dgettext libintl_dgettext
7756+#endif
7757+extern char *dgettext (const char *__domainname, const char *__msgid)
7758+ _INTL_ASM (libintl_dgettext);
7759+#endif
7760+
7761+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7762+ locale. */
7763+#ifdef _INTL_REDIRECT_INLINE
7764+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
7765+ int __category);
7766+static inline char *dcgettext (const char *__domainname, const char *__msgid,
7767+ int __category)
7768+{
7769+ return libintl_dcgettext (__domainname, __msgid, __category);
7770+}
7771+#else
7772+#ifdef _INTL_REDIRECT_MACROS
7773+# define dcgettext libintl_dcgettext
7774+#endif
7775+extern char *dcgettext (const char *__domainname, const char *__msgid,
7776+ int __category)
7777+ _INTL_ASM (libintl_dcgettext);
7778+#endif
7779+
7780+
7781+/* Similar to `gettext' but select the plural form corresponding to the
7782+ number N. */
7783+#ifdef _INTL_REDIRECT_INLINE
7784+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
7785+ unsigned long int __n);
7786+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
7787+ unsigned long int __n)
7788+{
7789+ return libintl_ngettext (__msgid1, __msgid2, __n);
7790+}
7791+#else
7792+#ifdef _INTL_REDIRECT_MACROS
7793+# define ngettext libintl_ngettext
7794+#endif
7795+extern char *ngettext (const char *__msgid1, const char *__msgid2,
7796+ unsigned long int __n)
7797+ _INTL_ASM (libintl_ngettext);
7798+#endif
7799+
7800+/* Similar to `dgettext' but select the plural form corresponding to the
7801+ number N. */
7802+#ifdef _INTL_REDIRECT_INLINE
7803+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
7804+ const char *__msgid2, unsigned long int __n);
7805+static inline char *dngettext (const char *__domainname, const char *__msgid1,
7806+ const char *__msgid2, unsigned long int __n)
7807+{
7808+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
7809+}
7810+#else
7811+#ifdef _INTL_REDIRECT_MACROS
7812+# define dngettext libintl_dngettext
7813+#endif
7814+extern char *dngettext (const char *__domainname,
7815+ const char *__msgid1, const char *__msgid2,
7816+ unsigned long int __n)
7817+ _INTL_ASM (libintl_dngettext);
7818+#endif
7819+
7820+/* Similar to `dcgettext' but select the plural form corresponding to the
7821+ number N. */
7822+#ifdef _INTL_REDIRECT_INLINE
7823+extern char *libintl_dcngettext (const char *__domainname,
7824+ const char *__msgid1, const char *__msgid2,
7825+ unsigned long int __n, int __category);
7826+static inline char *dcngettext (const char *__domainname,
7827+ const char *__msgid1, const char *__msgid2,
7828+ unsigned long int __n, int __category)
7829+{
7830+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
7831+}
7832+#else
7833+#ifdef _INTL_REDIRECT_MACROS
7834+# define dcngettext libintl_dcngettext
7835+#endif
7836+extern char *dcngettext (const char *__domainname,
7837+ const char *__msgid1, const char *__msgid2,
7838+ unsigned long int __n, int __category)
7839+ _INTL_ASM (libintl_dcngettext);
7840+#endif
7841+
7842+
7843+/* Set the current default message catalog to DOMAINNAME.
7844+ If DOMAINNAME is null, return the current default.
7845+ If DOMAINNAME is "", reset to the default of "messages". */
7846+#ifdef _INTL_REDIRECT_INLINE
7847+extern char *libintl_textdomain (const char *__domainname);
7848+static inline char *textdomain (const char *__domainname)
7849+{
7850+ return libintl_textdomain (__domainname);
7851+}
7852+#else
7853+#ifdef _INTL_REDIRECT_MACROS
7854+# define textdomain libintl_textdomain
7855+#endif
7856+extern char *textdomain (const char *__domainname)
7857+ _INTL_ASM (libintl_textdomain);
7858+#endif
7859+
7860+/* Specify that the DOMAINNAME message catalog will be found
7861+ in DIRNAME rather than in the system locale data base. */
7862+#ifdef _INTL_REDIRECT_INLINE
7863+extern char *libintl_bindtextdomain (const char *__domainname,
7864+ const char *__dirname);
7865+static inline char *bindtextdomain (const char *__domainname,
7866+ const char *__dirname)
7867+{
7868+ return libintl_bindtextdomain (__domainname, __dirname);
7869+}
7870+#else
7871+#ifdef _INTL_REDIRECT_MACROS
7872+# define bindtextdomain libintl_bindtextdomain
7873+#endif
7874+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
7875+ _INTL_ASM (libintl_bindtextdomain);
7876+#endif
7877+
7878+/* Specify the character encoding in which the messages from the
7879+ DOMAINNAME message catalog will be returned. */
7880+#ifdef _INTL_REDIRECT_INLINE
7881+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
7882+ const char *__codeset);
7883+static inline char *bind_textdomain_codeset (const char *__domainname,
7884+ const char *__codeset)
7885+{
7886+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
7887+}
7888+#else
7889+#ifdef _INTL_REDIRECT_MACROS
7890+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
7891+#endif
7892+extern char *bind_textdomain_codeset (const char *__domainname,
7893+ const char *__codeset)
7894+ _INTL_ASM (libintl_bind_textdomain_codeset);
7895+#endif
7896+
7897+
7898+/* Support for format strings with positions in *printf(), following the
7899+ POSIX/XSI specification.
7900+ Note: These replacements for the *printf() functions are visible only
7901+ in source files that #include <libintl.h> or #include "gettext.h".
7902+ Packages that use *printf() in source files that don't refer to _()
7903+ or gettext() but for which the format string could be the return value
7904+ of _() or gettext() need to add this #include. Oh well. */
7905+
7906+#if !@HAVE_POSIX_PRINTF@
7907+
7908+#include <stdio.h>
7909+#include <stddef.h>
7910+
7911+/* Get va_list. */
7912+#if __STDC__ || defined __cplusplus || defined _MSC_VER
7913+# include <stdarg.h>
7914+#else
7915+# include <varargs.h>
7916+#endif
7917+
7918+#undef fprintf
7919+#define fprintf libintl_fprintf
7920+extern int fprintf (FILE *, const char *, ...);
7921+#undef vfprintf
7922+#define vfprintf libintl_vfprintf
7923+extern int vfprintf (FILE *, const char *, va_list);
7924+
7925+#undef printf
7926+#define printf libintl_printf
7927+extern int printf (const char *, ...);
7928+#undef vprintf
7929+#define vprintf libintl_vprintf
7930+extern int vprintf (const char *, va_list);
7931+
7932+#undef sprintf
7933+#define sprintf libintl_sprintf
7934+extern int sprintf (char *, const char *, ...);
7935+#undef vsprintf
7936+#define vsprintf libintl_vsprintf
7937+extern int vsprintf (char *, const char *, va_list);
7938+
7939+#if @HAVE_SNPRINTF@
7940+
7941+#undef snprintf
7942+#define snprintf libintl_snprintf
7943+extern int snprintf (char *, size_t, const char *, ...);
7944+#undef vsnprintf
7945+#define vsnprintf libintl_vsnprintf
7946+extern int vsnprintf (char *, size_t, const char *, va_list);
7947+
7948+#endif
7949+
7950+#if @HAVE_ASPRINTF@
7951+
7952+#undef asprintf
7953+#define asprintf libintl_asprintf
7954+extern int asprintf (char **, const char *, ...);
7955+#undef vasprintf
7956+#define vasprintf libintl_vasprintf
7957+extern int vasprintf (char **, const char *, va_list);
7958+
7959+#endif
7960+
7961+#if @HAVE_WPRINTF@
7962+
7963+#undef fwprintf
7964+#define fwprintf libintl_fwprintf
7965+extern int fwprintf (FILE *, const wchar_t *, ...);
7966+#undef vfwprintf
7967+#define vfwprintf libintl_vfwprintf
7968+extern int vfwprintf (FILE *, const wchar_t *, va_list);
7969+
7970+#undef wprintf
7971+#define wprintf libintl_wprintf
7972+extern int wprintf (const wchar_t *, ...);
7973+#undef vwprintf
7974+#define vwprintf libintl_vwprintf
7975+extern int vwprintf (const wchar_t *, va_list);
7976+
7977+#undef swprintf
7978+#define swprintf libintl_swprintf
7979+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
7980+#undef vswprintf
7981+#define vswprintf libintl_vswprintf
7982+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
7983+
7984+#endif
7985+
7986+#endif
7987+
7988+
7989+/* Support for relocatable packages. */
7990+
7991+/* Sets the original and the current installation prefix of the package.
7992+ Relocation simply replaces a pathname starting with the original prefix
7993+ by the corresponding pathname with the current prefix instead. Both
7994+ prefixes should be directory names without trailing slash (i.e. use ""
7995+ instead of "/"). */
7996+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
7997+extern void
7998+ libintl_set_relocation_prefix (const char *orig_prefix,
7999+ const char *curr_prefix);
8000+
8001+
8002+#ifdef __cplusplus
8003+}
8004+#endif
8005+
8006+#endif /* libintl.h */
8007--- lrzsz-0.12.20.safe/intl/linux-msg.sed 1998-04-26 09:20:52.000000000 -0400
8008+++ lrzsz-0.12.20/intl/linux-msg.sed 1969-12-31 19:00:00.000000000 -0500
8009@@ -1,100 +0,0 @@
8010-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
8011-# Copyright (C) 1995 Free Software Foundation, Inc.
8012-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
8013-#
8014-# This program is free software; you can redistribute it and/or modify
8015-# it under the terms of the GNU General Public License as published by
8016-# the Free Software Foundation; either version 2, or (at your option)
8017-# any later version.
8018-#
8019-# This program is distributed in the hope that it will be useful,
8020-# but WITHOUT ANY WARRANTY; without even the implied warranty of
8021-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8022-# GNU General Public License for more details.
8023-#
8024-# You should have received a copy of the GNU General Public License
8025-# along with this program; if not, write to the Free Software
8026-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8027-#
8028-#
8029-# The first directive in the .msg should be the definition of the
8030-# message set number. We use always set number 1.
8031-#
8032-1 {
8033- i\
8034-$set 1 # Automatically created by po2msg.sed
8035- h
8036- s/.*/0/
8037- x
8038-}
8039-#
8040-# Mitch's old catalog format does not allow comments.
8041-#
8042-# We copy the original message as a comment into the .msg file.
8043-#
8044-/^msgid/ {
8045- s/msgid[ ]*"//
8046-#
8047-# This does not work now with the new format.
8048-# /"$/! {
8049-# s/\\$//
8050-# s/$/ ... (more lines following)"/
8051-# }
8052- x
8053-# The following nice solution is by
8054-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
8055- td
8056-# Increment a decimal number in pattern space.
8057-# First hide trailing `9' digits.
8058- :d
8059- s/9\(_*\)$/_\1/
8060- td
8061-# Assure at least one digit is available.
8062- s/^\(_*\)$/0\1/
8063-# Increment the last digit.
8064- s/8\(_*\)$/9\1/
8065- s/7\(_*\)$/8\1/
8066- s/6\(_*\)$/7\1/
8067- s/5\(_*\)$/6\1/
8068- s/4\(_*\)$/5\1/
8069- s/3\(_*\)$/4\1/
8070- s/2\(_*\)$/3\1/
8071- s/1\(_*\)$/2\1/
8072- s/0\(_*\)$/1\1/
8073-# Convert the hidden `9' digits to `0's.
8074- s/_/0/g
8075- x
8076- G
8077- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
8078-}
8079-#
8080-# The .msg file contains, other then the .po file, only the translations
8081-# but each given a unique ID. Starting from 1 and incrementing by 1 for
8082-# each message we assign them to the messages.
8083-# It is important that the .po file used to generate the cat-id-tbl.c file
8084-# (with po-to-tbl) is the same as the one used here. (At least the order
8085-# of declarations must not be changed.)
8086-#
8087-/^msgstr/ {
8088- s/msgstr[ ]*"\(.*\)"/# \1/
8089-# Clear substitution flag.
8090- tb
8091-# Append the next line.
8092- :b
8093- N
8094-# Look whether second part is continuation line.
8095- s/\(.*\n\)"\(.*\)"/\1\2/
8096-# Yes, then branch.
8097- ta
8098- P
8099- D
8100-# Note that D includes a jump to the start!!
8101-# We found a continuation line. But before printing insert '\'.
8102- :a
8103- s/\(.*\)\(\n.*\)/\1\\\2/
8104- P
8105-# We cannot use D here.
8106- s/.*\n\(.*\)/\1/
8107- tb
8108-}
8109-d
8110--- lrzsz-0.12.20.safe/intl/loadinfo.h 1998-04-26 09:20:52.000000000 -0400
8111+++ lrzsz-0.12.20/intl/loadinfo.h 2004-09-12 14:40:34.468730912 -0400
8112@@ -1,9 +1,54 @@
8113-#ifndef PARAMS
8114-# if __STDC__
8115-# define PARAMS(args) args
8116-# else
8117-# define PARAMS(args) ()
8118-# endif
8119+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
8120+ This file is part of the GNU C Library.
8121+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
8122+
8123+ This program is free software; you can redistribute it and/or modify it
8124+ under the terms of the GNU Library General Public License as published
8125+ by the Free Software Foundation; either version 2, or (at your option)
8126+ any later version.
8127+
8128+ This program is distributed in the hope that it will be useful,
8129+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8130+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8131+ Library General Public License for more details.
8132+
8133+ You should have received a copy of the GNU Library General Public
8134+ License along with this program; if not, write to the Free Software
8135+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8136+ USA. */
8137+
8138+#ifndef _LOADINFO_H
8139+#define _LOADINFO_H 1
8140+
8141+/* Declarations of locale dependent catalog lookup functions.
8142+ Implemented in
8143+
8144+ localealias.c Possibly replace a locale name by another.
8145+ explodename.c Split a locale name into its various fields.
8146+ l10nflist.c Generate a list of filenames of possible message catalogs.
8147+ finddomain.c Find and open the relevant message catalogs.
8148+
8149+ The main function _nl_find_domain() in finddomain.c is declared
8150+ in gettextP.h.
8151+ */
8152+
8153+#ifndef internal_function
8154+# define internal_function
8155+#endif
8156+
8157+/* Tell the compiler when a conditional or integer expression is
8158+ almost always true or almost always false. */
8159+#ifndef HAVE_BUILTIN_EXPECT
8160+# define __builtin_expect(expr, val) (expr)
8161+#endif
8162+
8163+/* Separator in PATH like lists of pathnames. */
8164+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
8165+ /* Win32, OS/2, DOS */
8166+# define PATH_SEPARATOR ';'
8167+#else
8168+ /* Unix */
8169+# define PATH_SEPARATOR ':'
8170 #endif
8171
8172 /* Encoding of locale name parts. */
8173@@ -32,27 +77,69 @@
8174 };
8175
8176
8177-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
8178- size_t name_len));
8179+/* Normalize codeset name. There is no standard for the codeset
8180+ names. Normalization allows the user to use any of the common
8181+ names. The return value is dynamically allocated and has to be
8182+ freed by the caller. */
8183+extern const char *_nl_normalize_codeset (const char *codeset,
8184+ size_t name_len);
8185
8186+/* Lookup a locale dependent file.
8187+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
8188+ files of the same kind, sorted in decreasing order of ->filename.
8189+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
8190+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
8191+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
8192+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
8193+ produced by _nl_explode_name(). FILENAME is the filename suffix.
8194+ The return value is the lookup result, either found in *L10NFILE_LIST,
8195+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
8196+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
8197+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
8198+ furthermore its ->successor[] field contains a list of other lookup
8199+ results from which this lookup result inherits. */
8200 extern struct loaded_l10nfile *
8201-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
8202- const char *dirlist, size_t dirlist_len, int mask,
8203- const char *language, const char *territory,
8204- const char *codeset,
8205- const char *normalized_codeset,
8206- const char *modifier, const char *special,
8207- const char *sponsor, const char *revision,
8208- const char *filename, int do_allocate));
8209+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
8210+ const char *dirlist, size_t dirlist_len, int mask,
8211+ const char *language, const char *territory,
8212+ const char *codeset, const char *normalized_codeset,
8213+ const char *modifier, const char *special,
8214+ const char *sponsor, const char *revision,
8215+ const char *filename, int do_allocate);
8216
8217+/* Lookup the real locale name for a locale alias NAME, or NULL if
8218+ NAME is not a locale alias (but possibly a real locale name).
8219+ The return value is statically allocated and must not be freed. */
8220+extern const char *_nl_expand_alias (const char *name);
8221
8222-extern const char *_nl_expand_alias PARAMS ((const char *name));
8223+/* Split a locale name NAME into its pieces: language, modifier,
8224+ territory, codeset, special, sponsor, revision.
8225+ NAME gets destructively modified: NUL bytes are inserted here and
8226+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
8227+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
8228+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
8229+ gets assigned the expanded *CODESET, if it is different from *CODESET;
8230+ this one is dynamically allocated and has to be freed by the caller.
8231+ The return value is a bitmask, where each bit corresponds to one
8232+ filled-in value:
8233+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
8234+ TERRITORY for *TERRITORY,
8235+ XPG_CODESET for *CODESET,
8236+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
8237+ CEN_SPECIAL for *SPECIAL,
8238+ CEN_SPONSOR for *SPONSOR,
8239+ CEN_REVISION for *REVISION.
8240+ */
8241+extern int _nl_explode_name (char *name, const char **language,
8242+ const char **modifier, const char **territory,
8243+ const char **codeset,
8244+ const char **normalized_codeset,
8245+ const char **special, const char **sponsor,
8246+ const char **revision);
8247
8248-extern int _nl_explode_name PARAMS ((char *name, const char **language,
8249- const char **modifier,
8250- const char **territory,
8251- const char **codeset,
8252- const char **normalized_codeset,
8253- const char **special,
8254- const char **sponsor,
8255- const char **revision));
8256+/* Split a locale name NAME into a leading language part and all the
8257+ rest. Return a pointer to the first character after the language,
8258+ i.e. to the first byte of the rest. */
8259+extern char *_nl_find_language (const char *name);
8260+
8261+#endif /* loadinfo.h */
8262--- lrzsz-0.12.20.safe/intl/loadmsgcat.c 1998-04-26 09:22:37.000000000 -0400
8263+++ lrzsz-0.12.20/intl/loadmsgcat.c 2004-09-12 14:40:34.473730152 -0400
8264@@ -1,42 +1,455 @@
8265-/* Load needed message catalogs
8266- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
8267+/* Load needed message catalogs.
8268+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
8269
8270- This program is free software; you can redistribute it and/or modify
8271- it under the terms of the GNU General Public License as published by
8272- the Free Software Foundation; either version 2, or (at your option)
8273+ This program is free software; you can redistribute it and/or modify it
8274+ under the terms of the GNU Library General Public License as published
8275+ by the Free Software Foundation; either version 2, or (at your option)
8276 any later version.
8277
8278 This program is distributed in the hope that it will be useful,
8279 but WITHOUT ANY WARRANTY; without even the implied warranty of
8280- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8281- GNU General Public License for more details.
8282+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8283+ Library General Public License for more details.
8284
8285- You should have received a copy of the GNU General Public License
8286- along with this program; if not, write to the Free Software Foundation,
8287- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
8288+ You should have received a copy of the GNU Library General Public
8289+ License along with this program; if not, write to the Free Software
8290+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8291+ USA. */
8292+
8293+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
8294+ This must come before <config.h> because <config.h> may include
8295+ <features.h>, and once <features.h> has been included, it's too late. */
8296+#ifndef _GNU_SOURCE
8297+# define _GNU_SOURCE 1
8298+#endif
8299
8300 #ifdef HAVE_CONFIG_H
8301 # include <config.h>
8302 #endif
8303
8304+#include <ctype.h>
8305+#include <errno.h>
8306 #include <fcntl.h>
8307 #include <sys/types.h>
8308 #include <sys/stat.h>
8309
8310-#if defined STDC_HEADERS || defined _LIBC
8311-# include <stdlib.h>
8312+#ifdef __GNUC__
8313+# undef alloca
8314+# define alloca __builtin_alloca
8315+# define HAVE_ALLOCA 1
8316+#else
8317+# ifdef _MSC_VER
8318+# include <malloc.h>
8319+# define alloca _alloca
8320+# else
8321+# if defined HAVE_ALLOCA_H || defined _LIBC
8322+# include <alloca.h>
8323+# else
8324+# ifdef _AIX
8325+ #pragma alloca
8326+# else
8327+# ifndef alloca
8328+char *alloca ();
8329+# endif
8330+# endif
8331+# endif
8332+# endif
8333 #endif
8334
8335+#include <stdlib.h>
8336+#include <string.h>
8337+
8338 #if defined HAVE_UNISTD_H || defined _LIBC
8339 # include <unistd.h>
8340 #endif
8341
8342-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
8343+#ifdef _LIBC
8344+# include <langinfo.h>
8345+# include <locale.h>
8346+#endif
8347+
8348+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
8349+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
8350 # include <sys/mman.h>
8351+# undef HAVE_MMAP
8352+# define HAVE_MMAP 1
8353+#else
8354+# undef HAVE_MMAP
8355 #endif
8356
8357-#include "gettext.h"
8358+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
8359+# include <stdint.h>
8360+#endif
8361+#if defined HAVE_INTTYPES_H || defined _LIBC
8362+# include <inttypes.h>
8363+#endif
8364+
8365+#include "gmo.h"
8366 #include "gettextP.h"
8367+#include "hash-string.h"
8368+#include "plural-exp.h"
8369+
8370+#ifdef _LIBC
8371+# include "../locale/localeinfo.h"
8372+#endif
8373+
8374+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
8375+ Note that our fallback values need not be literal strings, because we don't
8376+ use them with preprocessor string concatenation. */
8377+#if !defined PRId8 || PRI_MACROS_BROKEN
8378+# undef PRId8
8379+# define PRId8 "d"
8380+#endif
8381+#if !defined PRIi8 || PRI_MACROS_BROKEN
8382+# undef PRIi8
8383+# define PRIi8 "i"
8384+#endif
8385+#if !defined PRIo8 || PRI_MACROS_BROKEN
8386+# undef PRIo8
8387+# define PRIo8 "o"
8388+#endif
8389+#if !defined PRIu8 || PRI_MACROS_BROKEN
8390+# undef PRIu8
8391+# define PRIu8 "u"
8392+#endif
8393+#if !defined PRIx8 || PRI_MACROS_BROKEN
8394+# undef PRIx8
8395+# define PRIx8 "x"
8396+#endif
8397+#if !defined PRIX8 || PRI_MACROS_BROKEN
8398+# undef PRIX8
8399+# define PRIX8 "X"
8400+#endif
8401+#if !defined PRId16 || PRI_MACROS_BROKEN
8402+# undef PRId16
8403+# define PRId16 "d"
8404+#endif
8405+#if !defined PRIi16 || PRI_MACROS_BROKEN
8406+# undef PRIi16
8407+# define PRIi16 "i"
8408+#endif
8409+#if !defined PRIo16 || PRI_MACROS_BROKEN
8410+# undef PRIo16
8411+# define PRIo16 "o"
8412+#endif
8413+#if !defined PRIu16 || PRI_MACROS_BROKEN
8414+# undef PRIu16
8415+# define PRIu16 "u"
8416+#endif
8417+#if !defined PRIx16 || PRI_MACROS_BROKEN
8418+# undef PRIx16
8419+# define PRIx16 "x"
8420+#endif
8421+#if !defined PRIX16 || PRI_MACROS_BROKEN
8422+# undef PRIX16
8423+# define PRIX16 "X"
8424+#endif
8425+#if !defined PRId32 || PRI_MACROS_BROKEN
8426+# undef PRId32
8427+# define PRId32 "d"
8428+#endif
8429+#if !defined PRIi32 || PRI_MACROS_BROKEN
8430+# undef PRIi32
8431+# define PRIi32 "i"
8432+#endif
8433+#if !defined PRIo32 || PRI_MACROS_BROKEN
8434+# undef PRIo32
8435+# define PRIo32 "o"
8436+#endif
8437+#if !defined PRIu32 || PRI_MACROS_BROKEN
8438+# undef PRIu32
8439+# define PRIu32 "u"
8440+#endif
8441+#if !defined PRIx32 || PRI_MACROS_BROKEN
8442+# undef PRIx32
8443+# define PRIx32 "x"
8444+#endif
8445+#if !defined PRIX32 || PRI_MACROS_BROKEN
8446+# undef PRIX32
8447+# define PRIX32 "X"
8448+#endif
8449+#if !defined PRId64 || PRI_MACROS_BROKEN
8450+# undef PRId64
8451+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
8452+#endif
8453+#if !defined PRIi64 || PRI_MACROS_BROKEN
8454+# undef PRIi64
8455+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
8456+#endif
8457+#if !defined PRIo64 || PRI_MACROS_BROKEN
8458+# undef PRIo64
8459+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
8460+#endif
8461+#if !defined PRIu64 || PRI_MACROS_BROKEN
8462+# undef PRIu64
8463+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
8464+#endif
8465+#if !defined PRIx64 || PRI_MACROS_BROKEN
8466+# undef PRIx64
8467+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
8468+#endif
8469+#if !defined PRIX64 || PRI_MACROS_BROKEN
8470+# undef PRIX64
8471+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
8472+#endif
8473+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
8474+# undef PRIdLEAST8
8475+# define PRIdLEAST8 "d"
8476+#endif
8477+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
8478+# undef PRIiLEAST8
8479+# define PRIiLEAST8 "i"
8480+#endif
8481+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
8482+# undef PRIoLEAST8
8483+# define PRIoLEAST8 "o"
8484+#endif
8485+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
8486+# undef PRIuLEAST8
8487+# define PRIuLEAST8 "u"
8488+#endif
8489+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
8490+# undef PRIxLEAST8
8491+# define PRIxLEAST8 "x"
8492+#endif
8493+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
8494+# undef PRIXLEAST8
8495+# define PRIXLEAST8 "X"
8496+#endif
8497+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
8498+# undef PRIdLEAST16
8499+# define PRIdLEAST16 "d"
8500+#endif
8501+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
8502+# undef PRIiLEAST16
8503+# define PRIiLEAST16 "i"
8504+#endif
8505+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
8506+# undef PRIoLEAST16
8507+# define PRIoLEAST16 "o"
8508+#endif
8509+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
8510+# undef PRIuLEAST16
8511+# define PRIuLEAST16 "u"
8512+#endif
8513+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
8514+# undef PRIxLEAST16
8515+# define PRIxLEAST16 "x"
8516+#endif
8517+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
8518+# undef PRIXLEAST16
8519+# define PRIXLEAST16 "X"
8520+#endif
8521+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
8522+# undef PRIdLEAST32
8523+# define PRIdLEAST32 "d"
8524+#endif
8525+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
8526+# undef PRIiLEAST32
8527+# define PRIiLEAST32 "i"
8528+#endif
8529+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
8530+# undef PRIoLEAST32
8531+# define PRIoLEAST32 "o"
8532+#endif
8533+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
8534+# undef PRIuLEAST32
8535+# define PRIuLEAST32 "u"
8536+#endif
8537+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
8538+# undef PRIxLEAST32
8539+# define PRIxLEAST32 "x"
8540+#endif
8541+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
8542+# undef PRIXLEAST32
8543+# define PRIXLEAST32 "X"
8544+#endif
8545+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
8546+# undef PRIdLEAST64
8547+# define PRIdLEAST64 PRId64
8548+#endif
8549+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
8550+# undef PRIiLEAST64
8551+# define PRIiLEAST64 PRIi64
8552+#endif
8553+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
8554+# undef PRIoLEAST64
8555+# define PRIoLEAST64 PRIo64
8556+#endif
8557+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
8558+# undef PRIuLEAST64
8559+# define PRIuLEAST64 PRIu64
8560+#endif
8561+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
8562+# undef PRIxLEAST64
8563+# define PRIxLEAST64 PRIx64
8564+#endif
8565+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
8566+# undef PRIXLEAST64
8567+# define PRIXLEAST64 PRIX64
8568+#endif
8569+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
8570+# undef PRIdFAST8
8571+# define PRIdFAST8 "d"
8572+#endif
8573+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
8574+# undef PRIiFAST8
8575+# define PRIiFAST8 "i"
8576+#endif
8577+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
8578+# undef PRIoFAST8
8579+# define PRIoFAST8 "o"
8580+#endif
8581+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
8582+# undef PRIuFAST8
8583+# define PRIuFAST8 "u"
8584+#endif
8585+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
8586+# undef PRIxFAST8
8587+# define PRIxFAST8 "x"
8588+#endif
8589+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
8590+# undef PRIXFAST8
8591+# define PRIXFAST8 "X"
8592+#endif
8593+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
8594+# undef PRIdFAST16
8595+# define PRIdFAST16 "d"
8596+#endif
8597+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
8598+# undef PRIiFAST16
8599+# define PRIiFAST16 "i"
8600+#endif
8601+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
8602+# undef PRIoFAST16
8603+# define PRIoFAST16 "o"
8604+#endif
8605+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
8606+# undef PRIuFAST16
8607+# define PRIuFAST16 "u"
8608+#endif
8609+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
8610+# undef PRIxFAST16
8611+# define PRIxFAST16 "x"
8612+#endif
8613+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
8614+# undef PRIXFAST16
8615+# define PRIXFAST16 "X"
8616+#endif
8617+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
8618+# undef PRIdFAST32
8619+# define PRIdFAST32 "d"
8620+#endif
8621+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
8622+# undef PRIiFAST32
8623+# define PRIiFAST32 "i"
8624+#endif
8625+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
8626+# undef PRIoFAST32
8627+# define PRIoFAST32 "o"
8628+#endif
8629+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
8630+# undef PRIuFAST32
8631+# define PRIuFAST32 "u"
8632+#endif
8633+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
8634+# undef PRIxFAST32
8635+# define PRIxFAST32 "x"
8636+#endif
8637+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
8638+# undef PRIXFAST32
8639+# define PRIXFAST32 "X"
8640+#endif
8641+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
8642+# undef PRIdFAST64
8643+# define PRIdFAST64 PRId64
8644+#endif
8645+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
8646+# undef PRIiFAST64
8647+# define PRIiFAST64 PRIi64
8648+#endif
8649+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
8650+# undef PRIoFAST64
8651+# define PRIoFAST64 PRIo64
8652+#endif
8653+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
8654+# undef PRIuFAST64
8655+# define PRIuFAST64 PRIu64
8656+#endif
8657+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
8658+# undef PRIxFAST64
8659+# define PRIxFAST64 PRIx64
8660+#endif
8661+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
8662+# undef PRIXFAST64
8663+# define PRIXFAST64 PRIX64
8664+#endif
8665+#if !defined PRIdMAX || PRI_MACROS_BROKEN
8666+# undef PRIdMAX
8667+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
8668+#endif
8669+#if !defined PRIiMAX || PRI_MACROS_BROKEN
8670+# undef PRIiMAX
8671+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
8672+#endif
8673+#if !defined PRIoMAX || PRI_MACROS_BROKEN
8674+# undef PRIoMAX
8675+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
8676+#endif
8677+#if !defined PRIuMAX || PRI_MACROS_BROKEN
8678+# undef PRIuMAX
8679+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
8680+#endif
8681+#if !defined PRIxMAX || PRI_MACROS_BROKEN
8682+# undef PRIxMAX
8683+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
8684+#endif
8685+#if !defined PRIXMAX || PRI_MACROS_BROKEN
8686+# undef PRIXMAX
8687+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
8688+#endif
8689+#if !defined PRIdPTR || PRI_MACROS_BROKEN
8690+# undef PRIdPTR
8691+# define PRIdPTR \
8692+ (sizeof (void *) == sizeof (long) ? "ld" : \
8693+ sizeof (void *) == sizeof (int) ? "d" : \
8694+ "lld")
8695+#endif
8696+#if !defined PRIiPTR || PRI_MACROS_BROKEN
8697+# undef PRIiPTR
8698+# define PRIiPTR \
8699+ (sizeof (void *) == sizeof (long) ? "li" : \
8700+ sizeof (void *) == sizeof (int) ? "i" : \
8701+ "lli")
8702+#endif
8703+#if !defined PRIoPTR || PRI_MACROS_BROKEN
8704+# undef PRIoPTR
8705+# define PRIoPTR \
8706+ (sizeof (void *) == sizeof (long) ? "lo" : \
8707+ sizeof (void *) == sizeof (int) ? "o" : \
8708+ "llo")
8709+#endif
8710+#if !defined PRIuPTR || PRI_MACROS_BROKEN
8711+# undef PRIuPTR
8712+# define PRIuPTR \
8713+ (sizeof (void *) == sizeof (long) ? "lu" : \
8714+ sizeof (void *) == sizeof (int) ? "u" : \
8715+ "llu")
8716+#endif
8717+#if !defined PRIxPTR || PRI_MACROS_BROKEN
8718+# undef PRIxPTR
8719+# define PRIxPTR \
8720+ (sizeof (void *) == sizeof (long) ? "lx" : \
8721+ sizeof (void *) == sizeof (int) ? "x" : \
8722+ "llx")
8723+#endif
8724+#if !defined PRIXPTR || PRI_MACROS_BROKEN
8725+# undef PRIXPTR
8726+# define PRIXPTR \
8727+ (sizeof (void *) == sizeof (long) ? "lX" : \
8728+ sizeof (void *) == sizeof (int) ? "X" : \
8729+ "llX")
8730+#endif
8731
8732 /* @@ end of prolog @@ */
8733
8734@@ -44,7 +457,6 @@
8735 /* Rename the non ISO C functions. This is required by the standard
8736 because some ISO C functions will require linking with this object
8737 file and the name space must not be polluted. */
8738-# define fstat __fstat
8739 # define open __open
8740 # define close __close
8741 # define read __read
8742@@ -52,30 +464,471 @@
8743 # define munmap __munmap
8744 #endif
8745
8746+/* For those losing systems which don't have `alloca' we have to add
8747+ some additional code emulating it. */
8748+#ifdef HAVE_ALLOCA
8749+# define freea(p) /* nothing */
8750+#else
8751+# define alloca(n) malloc (n)
8752+# define freea(p) free (p)
8753+#endif
8754+
8755+/* For systems that distinguish between text and binary I/O.
8756+ O_BINARY is usually declared in <fcntl.h>. */
8757+#if !defined O_BINARY && defined _O_BINARY
8758+ /* For MSC-compatible compilers. */
8759+# define O_BINARY _O_BINARY
8760+# define O_TEXT _O_TEXT
8761+#endif
8762+#ifdef __BEOS__
8763+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
8764+# undef O_BINARY
8765+# undef O_TEXT
8766+#endif
8767+/* On reasonable systems, binary I/O is the default. */
8768+#ifndef O_BINARY
8769+# define O_BINARY 0
8770+#endif
8771+
8772+
8773 /* We need a sign, whether a new catalog was loaded, which can be associated
8774 with all translations. This is important if the translations are
8775 cached by one of GCC's features. */
8776-int _nl_msg_cat_cntr = 0;
8777+int _nl_msg_cat_cntr;
8778
8779
8780+/* Expand a system dependent string segment. Return NULL if unsupported. */
8781+static const char *
8782+get_sysdep_segment_value (const char *name)
8783+{
8784+ /* Test for an ISO C 99 section 7.8.1 format string directive.
8785+ Syntax:
8786+ P R I { d | i | o | u | x | X }
8787+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
8788+ /* We don't use a table of 14 times 6 'const char *' strings here, because
8789+ data relocations cost startup time. */
8790+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
8791+ {
8792+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
8793+ || name[3] == 'x' || name[3] == 'X')
8794+ {
8795+ if (name[4] == '8' && name[5] == '\0')
8796+ {
8797+ if (name[3] == 'd')
8798+ return PRId8;
8799+ if (name[3] == 'i')
8800+ return PRIi8;
8801+ if (name[3] == 'o')
8802+ return PRIo8;
8803+ if (name[3] == 'u')
8804+ return PRIu8;
8805+ if (name[3] == 'x')
8806+ return PRIx8;
8807+ if (name[3] == 'X')
8808+ return PRIX8;
8809+ abort ();
8810+ }
8811+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
8812+ {
8813+ if (name[3] == 'd')
8814+ return PRId16;
8815+ if (name[3] == 'i')
8816+ return PRIi16;
8817+ if (name[3] == 'o')
8818+ return PRIo16;
8819+ if (name[3] == 'u')
8820+ return PRIu16;
8821+ if (name[3] == 'x')
8822+ return PRIx16;
8823+ if (name[3] == 'X')
8824+ return PRIX16;
8825+ abort ();
8826+ }
8827+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
8828+ {
8829+ if (name[3] == 'd')
8830+ return PRId32;
8831+ if (name[3] == 'i')
8832+ return PRIi32;
8833+ if (name[3] == 'o')
8834+ return PRIo32;
8835+ if (name[3] == 'u')
8836+ return PRIu32;
8837+ if (name[3] == 'x')
8838+ return PRIx32;
8839+ if (name[3] == 'X')
8840+ return PRIX32;
8841+ abort ();
8842+ }
8843+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
8844+ {
8845+ if (name[3] == 'd')
8846+ return PRId64;
8847+ if (name[3] == 'i')
8848+ return PRIi64;
8849+ if (name[3] == 'o')
8850+ return PRIo64;
8851+ if (name[3] == 'u')
8852+ return PRIu64;
8853+ if (name[3] == 'x')
8854+ return PRIx64;
8855+ if (name[3] == 'X')
8856+ return PRIX64;
8857+ abort ();
8858+ }
8859+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
8860+ && name[7] == 'S' && name[8] == 'T')
8861+ {
8862+ if (name[9] == '8' && name[10] == '\0')
8863+ {
8864+ if (name[3] == 'd')
8865+ return PRIdLEAST8;
8866+ if (name[3] == 'i')
8867+ return PRIiLEAST8;
8868+ if (name[3] == 'o')
8869+ return PRIoLEAST8;
8870+ if (name[3] == 'u')
8871+ return PRIuLEAST8;
8872+ if (name[3] == 'x')
8873+ return PRIxLEAST8;
8874+ if (name[3] == 'X')
8875+ return PRIXLEAST8;
8876+ abort ();
8877+ }
8878+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
8879+ {
8880+ if (name[3] == 'd')
8881+ return PRIdLEAST16;
8882+ if (name[3] == 'i')
8883+ return PRIiLEAST16;
8884+ if (name[3] == 'o')
8885+ return PRIoLEAST16;
8886+ if (name[3] == 'u')
8887+ return PRIuLEAST16;
8888+ if (name[3] == 'x')
8889+ return PRIxLEAST16;
8890+ if (name[3] == 'X')
8891+ return PRIXLEAST16;
8892+ abort ();
8893+ }
8894+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
8895+ {
8896+ if (name[3] == 'd')
8897+ return PRIdLEAST32;
8898+ if (name[3] == 'i')
8899+ return PRIiLEAST32;
8900+ if (name[3] == 'o')
8901+ return PRIoLEAST32;
8902+ if (name[3] == 'u')
8903+ return PRIuLEAST32;
8904+ if (name[3] == 'x')
8905+ return PRIxLEAST32;
8906+ if (name[3] == 'X')
8907+ return PRIXLEAST32;
8908+ abort ();
8909+ }
8910+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
8911+ {
8912+ if (name[3] == 'd')
8913+ return PRIdLEAST64;
8914+ if (name[3] == 'i')
8915+ return PRIiLEAST64;
8916+ if (name[3] == 'o')
8917+ return PRIoLEAST64;
8918+ if (name[3] == 'u')
8919+ return PRIuLEAST64;
8920+ if (name[3] == 'x')
8921+ return PRIxLEAST64;
8922+ if (name[3] == 'X')
8923+ return PRIXLEAST64;
8924+ abort ();
8925+ }
8926+ }
8927+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
8928+ && name[7] == 'T')
8929+ {
8930+ if (name[8] == '8' && name[9] == '\0')
8931+ {
8932+ if (name[3] == 'd')
8933+ return PRIdFAST8;
8934+ if (name[3] == 'i')
8935+ return PRIiFAST8;
8936+ if (name[3] == 'o')
8937+ return PRIoFAST8;
8938+ if (name[3] == 'u')
8939+ return PRIuFAST8;
8940+ if (name[3] == 'x')
8941+ return PRIxFAST8;
8942+ if (name[3] == 'X')
8943+ return PRIXFAST8;
8944+ abort ();
8945+ }
8946+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
8947+ {
8948+ if (name[3] == 'd')
8949+ return PRIdFAST16;
8950+ if (name[3] == 'i')
8951+ return PRIiFAST16;
8952+ if (name[3] == 'o')
8953+ return PRIoFAST16;
8954+ if (name[3] == 'u')
8955+ return PRIuFAST16;
8956+ if (name[3] == 'x')
8957+ return PRIxFAST16;
8958+ if (name[3] == 'X')
8959+ return PRIXFAST16;
8960+ abort ();
8961+ }
8962+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
8963+ {
8964+ if (name[3] == 'd')
8965+ return PRIdFAST32;
8966+ if (name[3] == 'i')
8967+ return PRIiFAST32;
8968+ if (name[3] == 'o')
8969+ return PRIoFAST32;
8970+ if (name[3] == 'u')
8971+ return PRIuFAST32;
8972+ if (name[3] == 'x')
8973+ return PRIxFAST32;
8974+ if (name[3] == 'X')
8975+ return PRIXFAST32;
8976+ abort ();
8977+ }
8978+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
8979+ {
8980+ if (name[3] == 'd')
8981+ return PRIdFAST64;
8982+ if (name[3] == 'i')
8983+ return PRIiFAST64;
8984+ if (name[3] == 'o')
8985+ return PRIoFAST64;
8986+ if (name[3] == 'u')
8987+ return PRIuFAST64;
8988+ if (name[3] == 'x')
8989+ return PRIxFAST64;
8990+ if (name[3] == 'X')
8991+ return PRIXFAST64;
8992+ abort ();
8993+ }
8994+ }
8995+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
8996+ && name[7] == '\0')
8997+ {
8998+ if (name[3] == 'd')
8999+ return PRIdMAX;
9000+ if (name[3] == 'i')
9001+ return PRIiMAX;
9002+ if (name[3] == 'o')
9003+ return PRIoMAX;
9004+ if (name[3] == 'u')
9005+ return PRIuMAX;
9006+ if (name[3] == 'x')
9007+ return PRIxMAX;
9008+ if (name[3] == 'X')
9009+ return PRIXMAX;
9010+ abort ();
9011+ }
9012+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
9013+ && name[7] == '\0')
9014+ {
9015+ if (name[3] == 'd')
9016+ return PRIdPTR;
9017+ if (name[3] == 'i')
9018+ return PRIiPTR;
9019+ if (name[3] == 'o')
9020+ return PRIoPTR;
9021+ if (name[3] == 'u')
9022+ return PRIuPTR;
9023+ if (name[3] == 'x')
9024+ return PRIxPTR;
9025+ if (name[3] == 'X')
9026+ return PRIXPTR;
9027+ abort ();
9028+ }
9029+ }
9030+ }
9031+ /* Test for a glibc specific printf() format directive flag. */
9032+ if (name[0] == 'I' && name[1] == '\0')
9033+ {
9034+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
9035+ /* The 'I' flag, in numeric format directives, replaces ASCII digits
9036+ with the 'outdigits' defined in the LC_CTYPE locale facet. This is
9037+ used for Farsi (Persian) and maybe Arabic. */
9038+ return "I";
9039+#else
9040+ return "";
9041+#endif
9042+ }
9043+ /* Other system dependent strings are not valid. */
9044+ return NULL;
9045+}
9046+
9047+/* Initialize the codeset dependent parts of an opened message catalog.
9048+ Return the header entry. */
9049+const char *
9050+internal_function
9051+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
9052+ struct loaded_domain *domain,
9053+ struct binding *domainbinding)
9054+{
9055+ /* Find out about the character set the file is encoded with.
9056+ This can be found (in textual form) in the entry "". If this
9057+ entry does not exist or if this does not contain the `charset='
9058+ information, we will assume the charset matches the one the
9059+ current locale and we don't have to perform any conversion. */
9060+ char *nullentry;
9061+ size_t nullentrylen;
9062+
9063+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
9064+ domain->codeset_cntr =
9065+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
9066+#ifdef _LIBC
9067+ domain->conv = (__gconv_t) -1;
9068+#else
9069+# if HAVE_ICONV
9070+ domain->conv = (iconv_t) -1;
9071+# endif
9072+#endif
9073+ domain->conv_tab = NULL;
9074+
9075+ /* Get the header entry. */
9076+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
9077+
9078+ if (nullentry != NULL)
9079+ {
9080+#if defined _LIBC || HAVE_ICONV
9081+ const char *charsetstr;
9082+
9083+ charsetstr = strstr (nullentry, "charset=");
9084+ if (charsetstr != NULL)
9085+ {
9086+ size_t len;
9087+ char *charset;
9088+ const char *outcharset;
9089+
9090+ charsetstr += strlen ("charset=");
9091+ len = strcspn (charsetstr, " \t\n");
9092+
9093+ charset = (char *) alloca (len + 1);
9094+# if defined _LIBC || HAVE_MEMPCPY
9095+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
9096+# else
9097+ memcpy (charset, charsetstr, len);
9098+ charset[len] = '\0';
9099+# endif
9100+
9101+ /* The output charset should normally be determined by the
9102+ locale. But sometimes the locale is not used or not correctly
9103+ set up, so we provide a possibility for the user to override
9104+ this. Moreover, the value specified through
9105+ bind_textdomain_codeset overrides both. */
9106+ if (domainbinding != NULL && domainbinding->codeset != NULL)
9107+ outcharset = domainbinding->codeset;
9108+ else
9109+ {
9110+ outcharset = getenv ("OUTPUT_CHARSET");
9111+ if (outcharset == NULL || outcharset[0] == '\0')
9112+ {
9113+# ifdef _LIBC
9114+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
9115+# else
9116+# if HAVE_ICONV
9117+ extern const char *locale_charset (void);
9118+ outcharset = locale_charset ();
9119+# endif
9120+# endif
9121+ }
9122+ }
9123+
9124+# ifdef _LIBC
9125+ /* We always want to use transliteration. */
9126+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
9127+ charset = norm_add_slashes (charset, NULL);
9128+ if (__gconv_open (outcharset, charset, &domain->conv,
9129+ GCONV_AVOID_NOCONV)
9130+ != __GCONV_OK)
9131+ domain->conv = (__gconv_t) -1;
9132+# else
9133+# if HAVE_ICONV
9134+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
9135+ we want to use transliteration. */
9136+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
9137+ || _LIBICONV_VERSION >= 0x0105
9138+ if (strchr (outcharset, '/') == NULL)
9139+ {
9140+ char *tmp;
9141+
9142+ len = strlen (outcharset);
9143+ tmp = (char *) alloca (len + 10 + 1);
9144+ memcpy (tmp, outcharset, len);
9145+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
9146+ outcharset = tmp;
9147+
9148+ domain->conv = iconv_open (outcharset, charset);
9149+
9150+ freea (outcharset);
9151+ }
9152+ else
9153+# endif
9154+ domain->conv = iconv_open (outcharset, charset);
9155+# endif
9156+# endif
9157+
9158+ freea (charset);
9159+ }
9160+#endif /* _LIBC || HAVE_ICONV */
9161+ }
9162+
9163+ return nullentry;
9164+}
9165+
9166+/* Frees the codeset dependent parts of an opened message catalog. */
9167+void
9168+internal_function
9169+_nl_free_domain_conv (struct loaded_domain *domain)
9170+{
9171+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
9172+ free (domain->conv_tab);
9173+
9174+#ifdef _LIBC
9175+ if (domain->conv != (__gconv_t) -1)
9176+ __gconv_close (domain->conv);
9177+#else
9178+# if HAVE_ICONV
9179+ if (domain->conv != (iconv_t) -1)
9180+ iconv_close (domain->conv);
9181+# endif
9182+#endif
9183+}
9184+
9185 /* Load the message catalogs specified by FILENAME. If it is no valid
9186 message catalog do nothing. */
9187 void
9188-_nl_load_domain (domain_file)
9189- struct loaded_l10nfile *domain_file;
9190+internal_function
9191+_nl_load_domain (struct loaded_l10nfile *domain_file,
9192+ struct binding *domainbinding)
9193 {
9194 int fd;
9195+ size_t size;
9196+#ifdef _LIBC
9197+ struct stat64 st;
9198+#else
9199 struct stat st;
9200+#endif
9201 struct mo_file_header *data = (struct mo_file_header *) -1;
9202-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9203- || defined _LIBC
9204 int use_mmap = 0;
9205-#endif
9206 struct loaded_domain *domain;
9207+ int revision;
9208+ const char *nullentry;
9209
9210 domain_file->decided = 1;
9211 domain_file->data = NULL;
9212
9213+ /* Note that it would be useless to store domainbinding in domain_file
9214+ because domainbinding might be == NULL now but != NULL later (after
9215+ a call to bind_textdomain_codeset). */
9216+
9217 /* If the record does not represent a valid locale the FILENAME
9218 might be NULL. This can happen when according to the given
9219 specification the locale file name is different for XPG and CEN
9220@@ -84,27 +937,32 @@
9221 return;
9222
9223 /* Try to open the addressed file. */
9224- fd = open (domain_file->filename, O_RDONLY);
9225+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
9226 if (fd == -1)
9227 return;
9228
9229 /* We must know about the size of the file. */
9230- if (fstat (fd, &st) != 0
9231- && st.st_size < (off_t) sizeof (struct mo_file_header))
9232+ if (
9233+#ifdef _LIBC
9234+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
9235+#else
9236+ __builtin_expect (fstat (fd, &st) != 0, 0)
9237+#endif
9238+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
9239+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
9240 {
9241 /* Something went wrong. */
9242 close (fd);
9243 return;
9244 }
9245
9246-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9247- || defined _LIBC
9248+#ifdef HAVE_MMAP
9249 /* Now we are ready to load the file. If mmap() is available we try
9250 this first. If not available or it failed we try to load it. */
9251- data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
9252+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
9253 MAP_PRIVATE, fd, 0);
9254
9255- if (data != (struct mo_file_header *) -1)
9256+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
9257 {
9258 /* mmap() call was successful. */
9259 close (fd);
9260@@ -116,24 +974,27 @@
9261 it manually. */
9262 if (data == (struct mo_file_header *) -1)
9263 {
9264- off_t to_read;
9265+ size_t to_read;
9266 char *read_ptr;
9267
9268- data = (struct mo_file_header *) malloc (st.st_size);
9269+ data = (struct mo_file_header *) malloc (size);
9270 if (data == NULL)
9271 return;
9272
9273- to_read = st.st_size;
9274+ to_read = size;
9275 read_ptr = (char *) data;
9276 do
9277 {
9278 long int nb = (long int) read (fd, read_ptr, to_read);
9279- if (nb == -1)
9280+ if (nb <= 0)
9281 {
9282+#ifdef EINTR
9283+ if (nb == -1 && errno == EINTR)
9284+ continue;
9285+#endif
9286 close (fd);
9287 return;
9288 }
9289-
9290 read_ptr += nb;
9291 to_read -= nb;
9292 }
9293@@ -144,47 +1005,378 @@
9294
9295 /* Using the magic number we can test whether it really is a message
9296 catalog file. */
9297- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
9298+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
9299+ 0))
9300 {
9301 /* The magic number is wrong: not a message catalog file. */
9302-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9303- || defined _LIBC
9304+#ifdef HAVE_MMAP
9305 if (use_mmap)
9306- munmap ((caddr_t) data, st.st_size);
9307+ munmap ((caddr_t) data, size);
9308 else
9309 #endif
9310 free (data);
9311 return;
9312 }
9313
9314- domain_file->data
9315- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9316- if (domain_file->data == NULL)
9317+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9318+ if (domain == NULL)
9319 return;
9320+ domain_file->data = domain;
9321
9322- domain = (struct loaded_domain *) domain_file->data;
9323 domain->data = (char *) data;
9324+ domain->use_mmap = use_mmap;
9325+ domain->mmap_size = size;
9326 domain->must_swap = data->magic != _MAGIC;
9327+ domain->malloced = NULL;
9328
9329 /* Fill in the information about the available tables. */
9330- switch (W (domain->must_swap, data->revision))
9331+ revision = W (domain->must_swap, data->revision);
9332+ /* We support only the major revisions 0 and 1. */
9333+ switch (revision >> 16)
9334 {
9335 case 0:
9336+ case 1:
9337 domain->nstrings = W (domain->must_swap, data->nstrings);
9338- domain->orig_tab = (struct string_desc *)
9339+ domain->orig_tab = (const struct string_desc *)
9340 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
9341- domain->trans_tab = (struct string_desc *)
9342+ domain->trans_tab = (const struct string_desc *)
9343 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
9344 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
9345- domain->hash_tab = (nls_uint32 *)
9346- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
9347+ domain->hash_tab =
9348+ (domain->hash_size > 2
9349+ ? (const nls_uint32 *)
9350+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
9351+ : NULL);
9352+ domain->must_swap_hash_tab = domain->must_swap;
9353+
9354+ /* Now dispatch on the minor revision. */
9355+ switch (revision & 0xffff)
9356+ {
9357+ case 0:
9358+ domain->n_sysdep_strings = 0;
9359+ domain->orig_sysdep_tab = NULL;
9360+ domain->trans_sysdep_tab = NULL;
9361+ break;
9362+ case 1:
9363+ default:
9364+ {
9365+ nls_uint32 n_sysdep_strings;
9366+
9367+ if (domain->hash_tab == NULL)
9368+ /* This is invalid. These minor revisions need a hash table. */
9369+ goto invalid;
9370+
9371+ n_sysdep_strings =
9372+ W (domain->must_swap, data->n_sysdep_strings);
9373+ if (n_sysdep_strings > 0)
9374+ {
9375+ nls_uint32 n_sysdep_segments;
9376+ const struct sysdep_segment *sysdep_segments;
9377+ const char **sysdep_segment_values;
9378+ const nls_uint32 *orig_sysdep_tab;
9379+ const nls_uint32 *trans_sysdep_tab;
9380+ nls_uint32 n_inmem_sysdep_strings;
9381+ size_t memneed;
9382+ char *mem;
9383+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
9384+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
9385+ nls_uint32 *inmem_hash_tab;
9386+ unsigned int i, j;
9387+
9388+ /* Get the values of the system dependent segments. */
9389+ n_sysdep_segments =
9390+ W (domain->must_swap, data->n_sysdep_segments);
9391+ sysdep_segments = (const struct sysdep_segment *)
9392+ ((char *) data
9393+ + W (domain->must_swap, data->sysdep_segments_offset));
9394+ sysdep_segment_values =
9395+ alloca (n_sysdep_segments * sizeof (const char *));
9396+ for (i = 0; i < n_sysdep_segments; i++)
9397+ {
9398+ const char *name =
9399+ (char *) data
9400+ + W (domain->must_swap, sysdep_segments[i].offset);
9401+ nls_uint32 namelen =
9402+ W (domain->must_swap, sysdep_segments[i].length);
9403+
9404+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
9405+ {
9406+ freea (sysdep_segment_values);
9407+ goto invalid;
9408+ }
9409+
9410+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
9411+ }
9412+
9413+ orig_sysdep_tab = (const nls_uint32 *)
9414+ ((char *) data
9415+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
9416+ trans_sysdep_tab = (const nls_uint32 *)
9417+ ((char *) data
9418+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
9419+
9420+ /* Compute the amount of additional memory needed for the
9421+ system dependent strings and the augmented hash table.
9422+ At the same time, also drop string pairs which refer to
9423+ an undefined system dependent segment. */
9424+ n_inmem_sysdep_strings = 0;
9425+ memneed = domain->hash_size * sizeof (nls_uint32);
9426+ for (i = 0; i < n_sysdep_strings; i++)
9427+ {
9428+ int valid = 1;
9429+ size_t needs[2];
9430+
9431+ for (j = 0; j < 2; j++)
9432+ {
9433+ const struct sysdep_string *sysdep_string =
9434+ (const struct sysdep_string *)
9435+ ((char *) data
9436+ + W (domain->must_swap,
9437+ j == 0
9438+ ? orig_sysdep_tab[i]
9439+ : trans_sysdep_tab[i]));
9440+ size_t need = 0;
9441+ const struct segment_pair *p = sysdep_string->segments;
9442+
9443+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
9444+ for (p = sysdep_string->segments;; p++)
9445+ {
9446+ nls_uint32 sysdepref;
9447+
9448+ need += W (domain->must_swap, p->segsize);
9449+
9450+ sysdepref = W (domain->must_swap, p->sysdepref);
9451+ if (sysdepref == SEGMENTS_END)
9452+ break;
9453+
9454+ if (sysdepref >= n_sysdep_segments)
9455+ {
9456+ /* Invalid. */
9457+ freea (sysdep_segment_values);
9458+ goto invalid;
9459+ }
9460+
9461+ if (sysdep_segment_values[sysdepref] == NULL)
9462+ {
9463+ /* This particular string pair is invalid. */
9464+ valid = 0;
9465+ break;
9466+ }
9467+
9468+ need += strlen (sysdep_segment_values[sysdepref]);
9469+ }
9470+
9471+ needs[j] = need;
9472+ if (!valid)
9473+ break;
9474+ }
9475+
9476+ if (valid)
9477+ {
9478+ n_inmem_sysdep_strings++;
9479+ memneed += needs[0] + needs[1];
9480+ }
9481+ }
9482+ memneed += 2 * n_inmem_sysdep_strings
9483+ * sizeof (struct sysdep_string_desc);
9484+
9485+ if (n_inmem_sysdep_strings > 0)
9486+ {
9487+ unsigned int k;
9488+
9489+ /* Allocate additional memory. */
9490+ mem = (char *) malloc (memneed);
9491+ if (mem == NULL)
9492+ goto invalid;
9493+
9494+ domain->malloced = mem;
9495+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
9496+ mem += n_inmem_sysdep_strings
9497+ * sizeof (struct sysdep_string_desc);
9498+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
9499+ mem += n_inmem_sysdep_strings
9500+ * sizeof (struct sysdep_string_desc);
9501+ inmem_hash_tab = (nls_uint32 *) mem;
9502+ mem += domain->hash_size * sizeof (nls_uint32);
9503+
9504+ /* Compute the system dependent strings. */
9505+ k = 0;
9506+ for (i = 0; i < n_sysdep_strings; i++)
9507+ {
9508+ int valid = 1;
9509+
9510+ for (j = 0; j < 2; j++)
9511+ {
9512+ const struct sysdep_string *sysdep_string =
9513+ (const struct sysdep_string *)
9514+ ((char *) data
9515+ + W (domain->must_swap,
9516+ j == 0
9517+ ? orig_sysdep_tab[i]
9518+ : trans_sysdep_tab[i]));
9519+ const struct segment_pair *p =
9520+ sysdep_string->segments;
9521+
9522+ if (W (domain->must_swap, p->sysdepref)
9523+ != SEGMENTS_END)
9524+ for (p = sysdep_string->segments;; p++)
9525+ {
9526+ nls_uint32 sysdepref;
9527+
9528+ sysdepref =
9529+ W (domain->must_swap, p->sysdepref);
9530+ if (sysdepref == SEGMENTS_END)
9531+ break;
9532+
9533+ if (sysdep_segment_values[sysdepref] == NULL)
9534+ {
9535+ /* This particular string pair is
9536+ invalid. */
9537+ valid = 0;
9538+ break;
9539+ }
9540+ }
9541+
9542+ if (!valid)
9543+ break;
9544+ }
9545+
9546+ if (valid)
9547+ {
9548+ for (j = 0; j < 2; j++)
9549+ {
9550+ const struct sysdep_string *sysdep_string =
9551+ (const struct sysdep_string *)
9552+ ((char *) data
9553+ + W (domain->must_swap,
9554+ j == 0
9555+ ? orig_sysdep_tab[i]
9556+ : trans_sysdep_tab[i]));
9557+ const char *static_segments =
9558+ (char *) data
9559+ + W (domain->must_swap, sysdep_string->offset);
9560+ const struct segment_pair *p =
9561+ sysdep_string->segments;
9562+
9563+ /* Concatenate the segments, and fill
9564+ inmem_orig_sysdep_tab[k] (for j == 0) and
9565+ inmem_trans_sysdep_tab[k] (for j == 1). */
9566+
9567+ struct sysdep_string_desc *inmem_tab_entry =
9568+ (j == 0
9569+ ? inmem_orig_sysdep_tab
9570+ : inmem_trans_sysdep_tab)
9571+ + k;
9572+
9573+ if (W (domain->must_swap, p->sysdepref)
9574+ == SEGMENTS_END)
9575+ {
9576+ /* Only one static segment. */
9577+ inmem_tab_entry->length =
9578+ W (domain->must_swap, p->segsize);
9579+ inmem_tab_entry->pointer = static_segments;
9580+ }
9581+ else
9582+ {
9583+ inmem_tab_entry->pointer = mem;
9584+
9585+ for (p = sysdep_string->segments;; p++)
9586+ {
9587+ nls_uint32 segsize =
9588+ W (domain->must_swap, p->segsize);
9589+ nls_uint32 sysdepref =
9590+ W (domain->must_swap, p->sysdepref);
9591+ size_t n;
9592+
9593+ if (segsize > 0)
9594+ {
9595+ memcpy (mem, static_segments, segsize);
9596+ mem += segsize;
9597+ static_segments += segsize;
9598+ }
9599+
9600+ if (sysdepref == SEGMENTS_END)
9601+ break;
9602+
9603+ n = strlen (sysdep_segment_values[sysdepref]);
9604+ memcpy (mem, sysdep_segment_values[sysdepref], n);
9605+ mem += n;
9606+ }
9607+
9608+ inmem_tab_entry->length =
9609+ mem - inmem_tab_entry->pointer;
9610+ }
9611+ }
9612+
9613+ k++;
9614+ }
9615+ }
9616+ if (k != n_inmem_sysdep_strings)
9617+ abort ();
9618+
9619+ /* Compute the augmented hash table. */
9620+ for (i = 0; i < domain->hash_size; i++)
9621+ inmem_hash_tab[i] =
9622+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
9623+ for (i = 0; i < n_inmem_sysdep_strings; i++)
9624+ {
9625+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
9626+ nls_uint32 hash_val = hash_string (msgid);
9627+ nls_uint32 idx = hash_val % domain->hash_size;
9628+ nls_uint32 incr =
9629+ 1 + (hash_val % (domain->hash_size - 2));
9630+
9631+ for (;;)
9632+ {
9633+ if (inmem_hash_tab[idx] == 0)
9634+ {
9635+ /* Hash table entry is empty. Use it. */
9636+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
9637+ break;
9638+ }
9639+
9640+ if (idx >= domain->hash_size - incr)
9641+ idx -= domain->hash_size - incr;
9642+ else
9643+ idx += incr;
9644+ }
9645+ }
9646+
9647+ domain->n_sysdep_strings = n_inmem_sysdep_strings;
9648+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
9649+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
9650+
9651+ domain->hash_tab = inmem_hash_tab;
9652+ domain->must_swap_hash_tab = 0;
9653+ }
9654+ else
9655+ {
9656+ domain->n_sysdep_strings = 0;
9657+ domain->orig_sysdep_tab = NULL;
9658+ domain->trans_sysdep_tab = NULL;
9659+ }
9660+
9661+ freea (sysdep_segment_values);
9662+ }
9663+ else
9664+ {
9665+ domain->n_sysdep_strings = 0;
9666+ domain->orig_sysdep_tab = NULL;
9667+ domain->trans_sysdep_tab = NULL;
9668+ }
9669+ }
9670+ break;
9671+ }
9672 break;
9673 default:
9674- /* This is an illegal revision. */
9675-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9676- || defined _LIBC
9677+ /* This is an invalid revision. */
9678+ invalid:
9679+ /* This is an invalid .mo file. */
9680+ if (domain->malloced)
9681+ free (domain->malloced);
9682+#ifdef HAVE_MMAP
9683 if (use_mmap)
9684- munmap ((caddr_t) data, st.st_size);
9685+ munmap ((caddr_t) data, size);
9686 else
9687 #endif
9688 free (data);
9689@@ -193,7 +1385,36 @@
9690 return;
9691 }
9692
9693- /* Show that one domain is changed. This might make some cached
9694- translations invalid. */
9695- ++_nl_msg_cat_cntr;
9696+ /* Now initialize the character set converter from the character set
9697+ the file is encoded with (found in the header entry) to the domain's
9698+ specified character set or the locale's character set. */
9699+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
9700+
9701+ /* Also look for a plural specification. */
9702+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
9703 }
9704+
9705+
9706+#ifdef _LIBC
9707+void
9708+internal_function
9709+_nl_unload_domain (struct loaded_domain *domain)
9710+{
9711+ if (domain->plural != &__gettext_germanic_plural)
9712+ __gettext_free_exp (domain->plural);
9713+
9714+ _nl_free_domain_conv (domain);
9715+
9716+ if (domain->malloced)
9717+ free (domain->malloced);
9718+
9719+# ifdef _POSIX_MAPPED_FILES
9720+ if (domain->use_mmap)
9721+ munmap ((caddr_t) domain->data, domain->mmap_size);
9722+ else
9723+# endif /* _POSIX_MAPPED_FILES */
9724+ free ((void *) domain->data);
9725+
9726+ free (domain);
9727+}
9728+#endif
9729--- lrzsz-0.12.20.safe/intl/localcharset.c 1969-12-31 19:00:00.000000000 -0500
9730+++ lrzsz-0.12.20/intl/localcharset.c 2004-09-12 14:40:34.478729392 -0400
9731@@ -0,0 +1,398 @@
9732+/* Determine a canonical name for the current locale's character encoding.
9733+
9734+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
9735+
9736+ This program is free software; you can redistribute it and/or modify it
9737+ under the terms of the GNU Library General Public License as published
9738+ by the Free Software Foundation; either version 2, or (at your option)
9739+ any later version.
9740+
9741+ This program is distributed in the hope that it will be useful,
9742+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9743+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9744+ Library General Public License for more details.
9745+
9746+ You should have received a copy of the GNU Library General Public
9747+ License along with this program; if not, write to the Free Software
9748+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9749+ USA. */
9750+
9751+/* Written by Bruno Haible <bruno@clisp.org>. */
9752+
9753+#ifdef HAVE_CONFIG_H
9754+# include <config.h>
9755+#endif
9756+
9757+/* Specification. */
9758+#include "localcharset.h"
9759+
9760+#if HAVE_STDDEF_H
9761+# include <stddef.h>
9762+#endif
9763+
9764+#include <stdio.h>
9765+#if HAVE_STRING_H
9766+# include <string.h>
9767+#else
9768+# include <strings.h>
9769+#endif
9770+#if HAVE_STDLIB_H
9771+# include <stdlib.h>
9772+#endif
9773+
9774+#if defined _WIN32 || defined __WIN32__
9775+# undef WIN32 /* avoid warning on mingw32 */
9776+# define WIN32
9777+#endif
9778+
9779+#if defined __EMX__
9780+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
9781+# define OS2
9782+#endif
9783+
9784+#if !defined WIN32
9785+# if HAVE_LANGINFO_CODESET
9786+# include <langinfo.h>
9787+# else
9788+# if HAVE_SETLOCALE
9789+# include <locale.h>
9790+# endif
9791+# endif
9792+#elif defined WIN32
9793+# define WIN32_LEAN_AND_MEAN
9794+# include <windows.h>
9795+#endif
9796+#if defined OS2
9797+# define INCL_DOS
9798+# include <os2.h>
9799+#endif
9800+
9801+#if ENABLE_RELOCATABLE
9802+# include "relocatable.h"
9803+#else
9804+# define relocate(pathname) (pathname)
9805+#endif
9806+
9807+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
9808+ /* Win32, OS/2, DOS */
9809+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
9810+#endif
9811+
9812+#ifndef DIRECTORY_SEPARATOR
9813+# define DIRECTORY_SEPARATOR '/'
9814+#endif
9815+
9816+#ifndef ISSLASH
9817+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
9818+#endif
9819+
9820+#if HAVE_DECL_GETC_UNLOCKED
9821+# undef getc
9822+# define getc getc_unlocked
9823+#endif
9824+
9825+/* The following static variable is declared 'volatile' to avoid a
9826+ possible multithread problem in the function get_charset_aliases. If we
9827+ are running in a threaded environment, and if two threads initialize
9828+ 'charset_aliases' simultaneously, both will produce the same value,
9829+ and everything will be ok if the two assignments to 'charset_aliases'
9830+ are atomic. But I don't know what will happen if the two assignments mix. */
9831+#if __STDC__ != 1
9832+# define volatile /* empty */
9833+#endif
9834+/* Pointer to the contents of the charset.alias file, if it has already been
9835+ read, else NULL. Its format is:
9836+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
9837+static const char * volatile charset_aliases;
9838+
9839+/* Return a pointer to the contents of the charset.alias file. */
9840+static const char *
9841+get_charset_aliases ()
9842+{
9843+ const char *cp;
9844+
9845+ cp = charset_aliases;
9846+ if (cp == NULL)
9847+ {
9848+#if !(defined VMS || defined WIN32)
9849+ FILE *fp;
9850+ const char *dir = relocate (LIBDIR);
9851+ const char *base = "charset.alias";
9852+ char *file_name;
9853+
9854+ /* Concatenate dir and base into freshly allocated file_name. */
9855+ {
9856+ size_t dir_len = strlen (dir);
9857+ size_t base_len = strlen (base);
9858+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
9859+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
9860+ if (file_name != NULL)
9861+ {
9862+ memcpy (file_name, dir, dir_len);
9863+ if (add_slash)
9864+ file_name[dir_len] = DIRECTORY_SEPARATOR;
9865+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
9866+ }
9867+ }
9868+
9869+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
9870+ /* Out of memory or file not found, treat it as empty. */
9871+ cp = "";
9872+ else
9873+ {
9874+ /* Parse the file's contents. */
9875+ int c;
9876+ char buf1[50+1];
9877+ char buf2[50+1];
9878+ char *res_ptr = NULL;
9879+ size_t res_size = 0;
9880+ size_t l1, l2;
9881+
9882+ for (;;)
9883+ {
9884+ c = getc (fp);
9885+ if (c == EOF)
9886+ break;
9887+ if (c == '\n' || c == ' ' || c == '\t')
9888+ continue;
9889+ if (c == '#')
9890+ {
9891+ /* Skip comment, to end of line. */
9892+ do
9893+ c = getc (fp);
9894+ while (!(c == EOF || c == '\n'));
9895+ if (c == EOF)
9896+ break;
9897+ continue;
9898+ }
9899+ ungetc (c, fp);
9900+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
9901+ break;
9902+ l1 = strlen (buf1);
9903+ l2 = strlen (buf2);
9904+ if (res_size == 0)
9905+ {
9906+ res_size = l1 + 1 + l2 + 1;
9907+ res_ptr = (char *) malloc (res_size + 1);
9908+ }
9909+ else
9910+ {
9911+ res_size += l1 + 1 + l2 + 1;
9912+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
9913+ }
9914+ if (res_ptr == NULL)
9915+ {
9916+ /* Out of memory. */
9917+ res_size = 0;
9918+ break;
9919+ }
9920+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
9921+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
9922+ }
9923+ fclose (fp);
9924+ if (res_size == 0)
9925+ cp = "";
9926+ else
9927+ {
9928+ *(res_ptr + res_size) = '\0';
9929+ cp = res_ptr;
9930+ }
9931+ }
9932+
9933+ if (file_name != NULL)
9934+ free (file_name);
9935+
9936+#else
9937+
9938+# if defined VMS
9939+ /* To avoid the troubles of an extra file charset.alias_vms in the
9940+ sources of many GNU packages, simply inline the aliases here. */
9941+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
9942+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
9943+ section 10.7 "Handling Different Character Sets". */
9944+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
9945+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
9946+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
9947+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
9948+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
9949+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
9950+ /* Japanese */
9951+ "eucJP" "\0" "EUC-JP" "\0"
9952+ "SJIS" "\0" "SHIFT_JIS" "\0"
9953+ "DECKANJI" "\0" "DEC-KANJI" "\0"
9954+ "SDECKANJI" "\0" "EUC-JP" "\0"
9955+ /* Chinese */
9956+ "eucTW" "\0" "EUC-TW" "\0"
9957+ "DECHANYU" "\0" "DEC-HANYU" "\0"
9958+ "DECHANZI" "\0" "GB2312" "\0"
9959+ /* Korean */
9960+ "DECKOREAN" "\0" "EUC-KR" "\0";
9961+# endif
9962+
9963+# if defined WIN32
9964+ /* To avoid the troubles of installing a separate file in the same
9965+ directory as the DLL and of retrieving the DLL's directory at
9966+ runtime, simply inline the aliases here. */
9967+
9968+ cp = "CP936" "\0" "GBK" "\0"
9969+ "CP1361" "\0" "JOHAB" "\0"
9970+ "CP20127" "\0" "ASCII" "\0"
9971+ "CP20866" "\0" "KOI8-R" "\0"
9972+ "CP21866" "\0" "KOI8-RU" "\0"
9973+ "CP28591" "\0" "ISO-8859-1" "\0"
9974+ "CP28592" "\0" "ISO-8859-2" "\0"
9975+ "CP28593" "\0" "ISO-8859-3" "\0"
9976+ "CP28594" "\0" "ISO-8859-4" "\0"
9977+ "CP28595" "\0" "ISO-8859-5" "\0"
9978+ "CP28596" "\0" "ISO-8859-6" "\0"
9979+ "CP28597" "\0" "ISO-8859-7" "\0"
9980+ "CP28598" "\0" "ISO-8859-8" "\0"
9981+ "CP28599" "\0" "ISO-8859-9" "\0"
9982+ "CP28605" "\0" "ISO-8859-15" "\0";
9983+# endif
9984+#endif
9985+
9986+ charset_aliases = cp;
9987+ }
9988+
9989+ return cp;
9990+}
9991+
9992+/* Determine the current locale's character encoding, and canonicalize it
9993+ into one of the canonical names listed in config.charset.
9994+ The result must not be freed; it is statically allocated.
9995+ If the canonical name cannot be determined, the result is a non-canonical
9996+ name. */
9997+
9998+#ifdef STATIC
9999+STATIC
10000+#endif
10001+const char *
10002+locale_charset ()
10003+{
10004+ const char *codeset;
10005+ const char *aliases;
10006+
10007+#if !(defined WIN32 || defined OS2)
10008+
10009+# if HAVE_LANGINFO_CODESET
10010+
10011+ /* Most systems support nl_langinfo (CODESET) nowadays. */
10012+ codeset = nl_langinfo (CODESET);
10013+
10014+# else
10015+
10016+ /* On old systems which lack it, use setlocale or getenv. */
10017+ const char *locale = NULL;
10018+
10019+ /* But most old systems don't have a complete set of locales. Some
10020+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
10021+ use setlocale here; it would return "C" when it doesn't support the
10022+ locale name the user has set. */
10023+# if HAVE_SETLOCALE && 0
10024+ locale = setlocale (LC_CTYPE, NULL);
10025+# endif
10026+ if (locale == NULL || locale[0] == '\0')
10027+ {
10028+ locale = getenv ("LC_ALL");
10029+ if (locale == NULL || locale[0] == '\0')
10030+ {
10031+ locale = getenv ("LC_CTYPE");
10032+ if (locale == NULL || locale[0] == '\0')
10033+ locale = getenv ("LANG");
10034+ }
10035+ }
10036+
10037+ /* On some old systems, one used to set locale = "iso8859_1". On others,
10038+ you set it to "language_COUNTRY.charset". In any case, we resolve it
10039+ through the charset.alias file. */
10040+ codeset = locale;
10041+
10042+# endif
10043+
10044+#elif defined WIN32
10045+
10046+ static char buf[2 + 10 + 1];
10047+
10048+ /* Woe32 has a function returning the locale's codepage as a number. */
10049+ sprintf (buf, "CP%u", GetACP ());
10050+ codeset = buf;
10051+
10052+#elif defined OS2
10053+
10054+ const char *locale;
10055+ static char buf[2 + 10 + 1];
10056+ ULONG cp[3];
10057+ ULONG cplen;
10058+
10059+ /* Allow user to override the codeset, as set in the operating system,
10060+ with standard language environment variables. */
10061+ locale = getenv ("LC_ALL");
10062+ if (locale == NULL || locale[0] == '\0')
10063+ {
10064+ locale = getenv ("LC_CTYPE");
10065+ if (locale == NULL || locale[0] == '\0')
10066+ locale = getenv ("LANG");
10067+ }
10068+ if (locale != NULL && locale[0] != '\0')
10069+ {
10070+ /* If the locale name contains an encoding after the dot, return it. */
10071+ const char *dot = strchr (locale, '.');
10072+
10073+ if (dot != NULL)
10074+ {
10075+ const char *modifier;
10076+
10077+ dot++;
10078+ /* Look for the possible @... trailer and remove it, if any. */
10079+ modifier = strchr (dot, '@');
10080+ if (modifier == NULL)
10081+ return dot;
10082+ if (modifier - dot < sizeof (buf))
10083+ {
10084+ memcpy (buf, dot, modifier - dot);
10085+ buf [modifier - dot] = '\0';
10086+ return buf;
10087+ }
10088+ }
10089+
10090+ /* Resolve through the charset.alias file. */
10091+ codeset = locale;
10092+ }
10093+ else
10094+ {
10095+ /* OS/2 has a function returning the locale's codepage as a number. */
10096+ if (DosQueryCp (sizeof (cp), cp, &cplen))
10097+ codeset = "";
10098+ else
10099+ {
10100+ sprintf (buf, "CP%u", cp[0]);
10101+ codeset = buf;
10102+ }
10103+ }
10104+
10105+#endif
10106+
10107+ if (codeset == NULL)
10108+ /* The canonical name cannot be determined. */
10109+ codeset = "";
10110+
10111+ /* Resolve alias. */
10112+ for (aliases = get_charset_aliases ();
10113+ *aliases != '\0';
10114+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
10115+ if (strcmp (codeset, aliases) == 0
10116+ || (aliases[0] == '*' && aliases[1] == '\0'))
10117+ {
10118+ codeset = aliases + strlen (aliases) + 1;
10119+ break;
10120+ }
10121+
10122+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
10123+ the empty string as denoting "the locale's character encoding",
10124+ thus GNU libiconv would call this function a second time. */
10125+ if (codeset[0] == '\0')
10126+ codeset = "ASCII";
10127+
10128+ return codeset;
10129+}
10130--- lrzsz-0.12.20.safe/intl/localcharset.h 1969-12-31 19:00:00.000000000 -0500
10131+++ lrzsz-0.12.20/intl/localcharset.h 2004-09-12 14:40:34.483728632 -0400
10132@@ -0,0 +1,42 @@
10133+/* Determine a canonical name for the current locale's character encoding.
10134+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
10135+ This file is part of the GNU CHARSET Library.
10136+
10137+ This program is free software; you can redistribute it and/or modify it
10138+ under the terms of the GNU Library General Public License as published
10139+ by the Free Software Foundation; either version 2, or (at your option)
10140+ any later version.
10141+
10142+ This program is distributed in the hope that it will be useful,
10143+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10144+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10145+ Library General Public License for more details.
10146+
10147+ You should have received a copy of the GNU Library General Public
10148+ License along with this program; if not, write to the Free Software
10149+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10150+ USA. */
10151+
10152+#ifndef _LOCALCHARSET_H
10153+#define _LOCALCHARSET_H
10154+
10155+
10156+#ifdef __cplusplus
10157+extern "C" {
10158+#endif
10159+
10160+
10161+/* Determine the current locale's character encoding, and canonicalize it
10162+ into one of the canonical names listed in config.charset.
10163+ The result must not be freed; it is statically allocated.
10164+ If the canonical name cannot be determined, the result is a non-canonical
10165+ name. */
10166+extern const char * locale_charset (void);
10167+
10168+
10169+#ifdef __cplusplus
10170+}
10171+#endif
10172+
10173+
10174+#endif /* _LOCALCHARSET_H */
10175--- lrzsz-0.12.20.safe/intl/locale.alias 1969-12-31 19:00:00.000000000 -0500
10176+++ lrzsz-0.12.20/intl/locale.alias 2004-09-12 14:40:34.499726200 -0400
10177@@ -0,0 +1,78 @@
10178+# Locale name alias data base.
10179+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
10180+#
10181+# This program is free software; you can redistribute it and/or modify it
10182+# under the terms of the GNU Library General Public License as published
10183+# by the Free Software Foundation; either version 2, or (at your option)
10184+# any later version.
10185+#
10186+# This program is distributed in the hope that it will be useful,
10187+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10188+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10189+# Library General Public License for more details.
10190+#
10191+# You should have received a copy of the GNU Library General Public
10192+# License along with this program; if not, write to the Free Software
10193+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10194+# USA.
10195+
10196+# The format of this file is the same as for the corresponding file of
10197+# the X Window System, which normally can be found in
10198+# /usr/lib/X11/locale/locale.alias
10199+# A single line contains two fields: an alias and a substitution value.
10200+# All entries are case independent.
10201+
10202+# Note: This file is far from being complete. If you have a value for
10203+# your own site which you think might be useful for others too, share
10204+# it with the rest of us. Send it using the `glibcbug' script to
10205+# bugs@gnu.org.
10206+
10207+# Packages using this file:
10208+
10209+bokmal nb_NO.ISO-8859-1
10210+bokmål nb_NO.ISO-8859-1
10211+catalan ca_ES.ISO-8859-1
10212+croatian hr_HR.ISO-8859-2
10213+czech cs_CZ.ISO-8859-2
10214+danish da_DK.ISO-8859-1
10215+dansk da_DK.ISO-8859-1
10216+deutsch de_DE.ISO-8859-1
10217+dutch nl_NL.ISO-8859-1
10218+eesti et_EE.ISO-8859-1
10219+estonian et_EE.ISO-8859-1
10220+finnish fi_FI.ISO-8859-1
10221+français fr_FR.ISO-8859-1
10222+french fr_FR.ISO-8859-1
10223+galego gl_ES.ISO-8859-1
10224+galician gl_ES.ISO-8859-1
10225+german de_DE.ISO-8859-1
10226+greek el_GR.ISO-8859-7
10227+hebrew he_IL.ISO-8859-8
10228+hrvatski hr_HR.ISO-8859-2
10229+hungarian hu_HU.ISO-8859-2
10230+icelandic is_IS.ISO-8859-1
10231+italian it_IT.ISO-8859-1
10232+japanese ja_JP.eucJP
10233+japanese.euc ja_JP.eucJP
10234+ja_JP ja_JP.eucJP
10235+ja_JP.ujis ja_JP.eucJP
10236+japanese.sjis ja_JP.SJIS
10237+korean ko_KR.eucKR
10238+korean.euc ko_KR.eucKR
10239+ko_KR ko_KR.eucKR
10240+lithuanian lt_LT.ISO-8859-13
10241+no_NO nb_NO.ISO-8859-1
10242+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
10243+norwegian nb_NO.ISO-8859-1
10244+nynorsk nn_NO.ISO-8859-1
10245+polish pl_PL.ISO-8859-2
10246+portuguese pt_PT.ISO-8859-1
10247+romanian ro_RO.ISO-8859-2
10248+russian ru_RU.ISO-8859-5
10249+slovak sk_SK.ISO-8859-2
10250+slovene sl_SI.ISO-8859-2
10251+slovenian sl_SI.ISO-8859-2
10252+spanish es_ES.ISO-8859-1
10253+swedish sv_SE.ISO-8859-1
10254+thai th_TH.TIS-620
10255+turkish tr_TR.ISO-8859-9
10256--- lrzsz-0.12.20.safe/intl/localealias.c 1998-04-26 09:22:37.000000000 -0400
10257+++ lrzsz-0.12.20/intl/localealias.c 2004-09-12 14:40:34.505725288 -0400
10258@@ -1,20 +1,27 @@
10259-/* Handle aliases for locale names
10260- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
10261- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
10262+/* Handle aliases for locale names.
10263+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
10264
10265- This program is free software; you can redistribute it and/or modify
10266- it under the terms of the GNU General Public License as published by
10267- the Free Software Foundation; either version 2, or (at your option)
10268+ This program is free software; you can redistribute it and/or modify it
10269+ under the terms of the GNU Library General Public License as published
10270+ by the Free Software Foundation; either version 2, or (at your option)
10271 any later version.
10272
10273 This program is distributed in the hope that it will be useful,
10274 but WITHOUT ANY WARRANTY; without even the implied warranty of
10275- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10276- GNU General Public License for more details.
10277+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10278+ Library General Public License for more details.
10279
10280- You should have received a copy of the GNU General Public License
10281- along with this program; if not, write to the Free Software Foundation,
10282- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10283+ You should have received a copy of the GNU Library General Public
10284+ License along with this program; if not, write to the Free Software
10285+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10286+ USA. */
10287+
10288+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
10289+ This must come before <config.h> because <config.h> may include
10290+ <features.h>, and once <features.h> has been included, it's too late. */
10291+#ifndef _GNU_SOURCE
10292+# define _GNU_SOURCE 1
10293+#endif
10294
10295 #ifdef HAVE_CONFIG_H
10296 # include <config.h>
10297@@ -22,56 +29,45 @@
10298
10299 #include <ctype.h>
10300 #include <stdio.h>
10301+#if defined _LIBC || defined HAVE___FSETLOCKING
10302+# include <stdio_ext.h>
10303+#endif
10304 #include <sys/types.h>
10305
10306 #ifdef __GNUC__
10307+# undef alloca
10308 # define alloca __builtin_alloca
10309 # define HAVE_ALLOCA 1
10310 #else
10311-# if defined HAVE_ALLOCA_H || defined _LIBC
10312-# include <alloca.h>
10313+# ifdef _MSC_VER
10314+# include <malloc.h>
10315+# define alloca _alloca
10316 # else
10317-# ifdef _AIX
10318- #pragma alloca
10319+# if defined HAVE_ALLOCA_H || defined _LIBC
10320+# include <alloca.h>
10321 # else
10322-# ifndef alloca
10323+# ifdef _AIX
10324+ #pragma alloca
10325+# else
10326+# ifndef alloca
10327 char *alloca ();
10328+# endif
10329 # endif
10330 # endif
10331 # endif
10332 #endif
10333
10334-#if defined STDC_HEADERS || defined _LIBC
10335-# include <stdlib.h>
10336-#else
10337-char *getenv ();
10338-# ifdef HAVE_MALLOC_H
10339-# include <malloc.h>
10340-# else
10341-void free ();
10342-# endif
10343-#endif
10344+#include <stdlib.h>
10345+#include <string.h>
10346
10347-#if defined HAVE_STRING_H || defined _LIBC
10348-# ifndef _GNU_SOURCE
10349-# define _GNU_SOURCE 1
10350-# endif
10351-# include <string.h>
10352+#include "gettextP.h"
10353+
10354+#if ENABLE_RELOCATABLE
10355+# include "relocatable.h"
10356 #else
10357-# include <strings.h>
10358-# ifndef memcpy
10359-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
10360-# endif
10361-#endif
10362-#if !HAVE_STRCHR && !defined _LIBC
10363-# ifndef strchr
10364-# define strchr index
10365-# endif
10366+# define relocate(pathname) (pathname)
10367 #endif
10368
10369-#include "gettext.h"
10370-#include "gettextP.h"
10371-
10372 /* @@ end of prolog @@ */
10373
10374 #ifdef _LIBC
10375@@ -79,43 +75,49 @@
10376 because some ANSI C functions will require linking with this object
10377 file and the name space must not be polluted. */
10378 # define strcasecmp __strcasecmp
10379+
10380+# ifndef mempcpy
10381+# define mempcpy __mempcpy
10382+# endif
10383+# define HAVE_MEMPCPY 1
10384+# define HAVE___FSETLOCKING 1
10385+
10386+/* We need locking here since we can be called from different places. */
10387+# include <bits/libc-lock.h>
10388+
10389+__libc_lock_define_initialized (static, lock);
10390+#endif
10391+
10392+#ifndef internal_function
10393+# define internal_function
10394 #endif
10395
10396+/* Some optimizations for glibc. */
10397+#ifdef _LIBC
10398+# define FEOF(fp) feof_unlocked (fp)
10399+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
10400+#else
10401+# define FEOF(fp) feof (fp)
10402+# define FGETS(buf, n, fp) fgets (buf, n, fp)
10403+#endif
10404
10405-/* For those loosing systems which don't have `alloca' we have to add
10406+/* For those losing systems which don't have `alloca' we have to add
10407 some additional code emulating it. */
10408 #ifdef HAVE_ALLOCA
10409-/* Nothing has to be done. */
10410-# define ADD_BLOCK(list, address) /* nothing */
10411-# define FREE_BLOCKS(list) /* nothing */
10412+# define freea(p) /* nothing */
10413 #else
10414-struct block_list
10415-{
10416- void *address;
10417- struct block_list *next;
10418-};
10419-# define ADD_BLOCK(list, addr) \
10420- do { \
10421- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
10422- /* If we cannot get a free block we cannot add the new element to \
10423- the list. */ \
10424- if (newp != NULL) { \
10425- newp->address = (addr); \
10426- newp->next = (list); \
10427- (list) = newp; \
10428- } \
10429- } while (0)
10430-# define FREE_BLOCKS(list) \
10431- do { \
10432- while (list != NULL) { \
10433- struct block_list *old = list; \
10434- list = list->next; \
10435- free (old); \
10436- } \
10437- } while (0)
10438-# undef alloca
10439-# define alloca(size) (malloc (size))
10440-#endif /* have alloca */
10441+# define alloca(n) malloc (n)
10442+# define freea(p) free (p)
10443+#endif
10444+
10445+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
10446+# undef fgets
10447+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
10448+#endif
10449+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
10450+# undef feof
10451+# define feof(s) feof_unlocked (s)
10452+#endif
10453
10454
10455 struct alias_map
10456@@ -125,26 +127,41 @@
10457 };
10458
10459
10460-static struct alias_map *map;
10461-static size_t nmap = 0;
10462-static size_t maxmap = 0;
10463+#ifndef _LIBC
10464+# define libc_freeres_ptr(decl) decl
10465+#endif
10466+
10467+libc_freeres_ptr (static char *string_space);
10468+static size_t string_space_act;
10469+static size_t string_space_max;
10470+libc_freeres_ptr (static struct alias_map *map);
10471+static size_t nmap;
10472+static size_t maxmap;
10473
10474
10475 /* Prototypes for local functions. */
10476-static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
10477-static void extend_alias_table PARAMS ((void));
10478-static int alias_compare PARAMS ((const struct alias_map *map1,
10479- const struct alias_map *map2));
10480+static size_t read_alias_file (const char *fname, int fname_len)
10481+ internal_function;
10482+static int extend_alias_table (void);
10483+static int alias_compare (const struct alias_map *map1,
10484+ const struct alias_map *map2);
10485
10486
10487 const char *
10488-_nl_expand_alias (name)
10489- const char *name;
10490+_nl_expand_alias (const char *name)
10491 {
10492- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
10493+ static const char *locale_alias_path;
10494 struct alias_map *retval;
10495+ const char *result = NULL;
10496 size_t added;
10497
10498+#ifdef _LIBC
10499+ __libc_lock_lock (lock);
10500+#endif
10501+
10502+ if (locale_alias_path == NULL)
10503+ locale_alias_path = LOCALE_ALIAS_PATH;
10504+
10505 do
10506 {
10507 struct alias_map item;
10508@@ -154,15 +171,18 @@
10509 if (nmap > 0)
10510 retval = (struct alias_map *) bsearch (&item, map, nmap,
10511 sizeof (struct alias_map),
10512- (int (*) PARAMS ((const void *,
10513- const void *))
10514+ (int (*) (const void *,
10515+ const void *)
10516 ) alias_compare);
10517 else
10518 retval = NULL;
10519
10520 /* We really found an alias. Return the value. */
10521 if (retval != NULL)
10522- return retval->value;
10523+ {
10524+ result = retval->value;
10525+ break;
10526+ }
10527
10528 /* Perhaps we can find another alias file. */
10529 added = 0;
10530@@ -170,11 +190,12 @@
10531 {
10532 const char *start;
10533
10534- while (locale_alias_path[0] == ':')
10535+ while (locale_alias_path[0] == PATH_SEPARATOR)
10536 ++locale_alias_path;
10537 start = locale_alias_path;
10538
10539- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
10540+ while (locale_alias_path[0] != '\0'
10541+ && locale_alias_path[0] != PATH_SEPARATOR)
10542 ++locale_alias_path;
10543
10544 if (start < locale_alias_path)
10545@@ -183,78 +204,87 @@
10546 }
10547 while (added != 0);
10548
10549- return NULL;
10550+#ifdef _LIBC
10551+ __libc_lock_unlock (lock);
10552+#endif
10553+
10554+ return result;
10555 }
10556
10557
10558 static size_t
10559-read_alias_file (fname, fname_len)
10560- const char *fname;
10561- int fname_len;
10562+internal_function
10563+read_alias_file (const char *fname, int fname_len)
10564 {
10565-#ifndef HAVE_ALLOCA
10566- struct block_list *block_list = NULL;
10567-#endif
10568 FILE *fp;
10569 char *full_fname;
10570 size_t added;
10571 static const char aliasfile[] = "/locale.alias";
10572
10573 full_fname = (char *) alloca (fname_len + sizeof aliasfile);
10574- ADD_BLOCK (block_list, full_fname);
10575+#ifdef HAVE_MEMPCPY
10576+ mempcpy (mempcpy (full_fname, fname, fname_len),
10577+ aliasfile, sizeof aliasfile);
10578+#else
10579 memcpy (full_fname, fname, fname_len);
10580 memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
10581+#endif
10582
10583- fp = fopen (full_fname, "r");
10584+ fp = fopen (relocate (full_fname), "r");
10585+ freea (full_fname);
10586 if (fp == NULL)
10587- {
10588- FREE_BLOCKS (block_list);
10589- return 0;
10590- }
10591+ return 0;
10592+
10593+#ifdef HAVE___FSETLOCKING
10594+ /* No threads present. */
10595+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
10596+#endif
10597
10598 added = 0;
10599- while (!feof (fp))
10600+ while (!FEOF (fp))
10601 {
10602 /* It is a reasonable approach to use a fix buffer here because
10603 a) we are only interested in the first two fields
10604 b) these fields must be usable as file names and so must not
10605 be that long
10606- */
10607- char buf[BUFSIZ];
10608+ We avoid a multi-kilobyte buffer here since this would use up
10609+ stack space which we might not have if the program ran out of
10610+ memory. */
10611+ char buf[400];
10612 char *alias;
10613 char *value;
10614 char *cp;
10615
10616- if (fgets (buf, BUFSIZ, fp) == NULL)
10617+ if (FGETS (buf, sizeof buf, fp) == NULL)
10618 /* EOF reached. */
10619 break;
10620
10621 cp = buf;
10622 /* Ignore leading white space. */
10623- while (isspace (cp[0]))
10624+ while (isspace ((unsigned char) cp[0]))
10625 ++cp;
10626
10627 /* A leading '#' signals a comment line. */
10628 if (cp[0] != '\0' && cp[0] != '#')
10629 {
10630 alias = cp++;
10631- while (cp[0] != '\0' && !isspace (cp[0]))
10632+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10633 ++cp;
10634 /* Terminate alias name. */
10635 if (cp[0] != '\0')
10636 *cp++ = '\0';
10637
10638 /* Now look for the beginning of the value. */
10639- while (isspace (cp[0]))
10640+ while (isspace ((unsigned char) cp[0]))
10641 ++cp;
10642
10643 if (cp[0] != '\0')
10644 {
10645- char *tp;
10646- size_t len;
10647+ size_t alias_len;
10648+ size_t value_len;
10649
10650 value = cp++;
10651- while (cp[0] != '\0' && !isspace (cp[0]))
10652+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10653 ++cp;
10654 /* Terminate value. */
10655 if (cp[0] == '\n')
10656@@ -269,28 +299,44 @@
10657 *cp++ = '\0';
10658
10659 if (nmap >= maxmap)
10660- extend_alias_table ();
10661-
10662- /* We cannot depend on strdup available in the libc. Sigh! */
10663- len = strlen (alias) + 1;
10664- tp = (char *) malloc (len);
10665- if (tp == NULL)
10666- {
10667- FREE_BLOCKS (block_list);
10668+ if (__builtin_expect (extend_alias_table (), 0))
10669 return added;
10670- }
10671- memcpy (tp, alias, len);
10672- map[nmap].alias = tp;
10673
10674- len = strlen (value) + 1;
10675- tp = (char *) malloc (len);
10676- if (tp == NULL)
10677+ alias_len = strlen (alias) + 1;
10678+ value_len = strlen (value) + 1;
10679+
10680+ if (string_space_act + alias_len + value_len > string_space_max)
10681 {
10682- FREE_BLOCKS (block_list);
10683- return added;
10684+ /* Increase size of memory pool. */
10685+ size_t new_size = (string_space_max
10686+ + (alias_len + value_len > 1024
10687+ ? alias_len + value_len : 1024));
10688+ char *new_pool = (char *) realloc (string_space, new_size);
10689+ if (new_pool == NULL)
10690+ return added;
10691+
10692+ if (__builtin_expect (string_space != new_pool, 0))
10693+ {
10694+ size_t i;
10695+
10696+ for (i = 0; i < nmap; i++)
10697+ {
10698+ map[i].alias += new_pool - string_space;
10699+ map[i].value += new_pool - string_space;
10700+ }
10701+ }
10702+
10703+ string_space = new_pool;
10704+ string_space_max = new_size;
10705 }
10706- memcpy (tp, value, len);
10707- map[nmap].value = tp;
10708+
10709+ map[nmap].alias = memcpy (&string_space[string_space_act],
10710+ alias, alias_len);
10711+ string_space_act += alias_len;
10712+
10713+ map[nmap].value = memcpy (&string_space[string_space_act],
10714+ value, value_len);
10715+ string_space_act += value_len;
10716
10717 ++nmap;
10718 ++added;
10719@@ -299,14 +345,11 @@
10720
10721 /* Possibly not the whole line fits into the buffer. Ignore
10722 the rest of the line. */
10723- while (strchr (cp, '\n') == NULL)
10724- {
10725- cp = buf;
10726- if (fgets (buf, BUFSIZ, fp) == NULL)
10727- /* Make sure the inner loop will be left. The outer loop
10728- will exit at the `feof' test. */
10729- *cp = '\n';
10730- }
10731+ while (strchr (buf, '\n') == NULL)
10732+ if (FGETS (buf, sizeof buf, fp) == NULL)
10733+ /* Make sure the inner loop will be left. The outer loop
10734+ will exit at the `feof' test. */
10735+ break;
10736 }
10737
10738 /* Should we test for ferror()? I think we have to silently ignore
10739@@ -315,40 +358,33 @@
10740
10741 if (added > 0)
10742 qsort (map, nmap, sizeof (struct alias_map),
10743- (int (*) PARAMS ((const void *, const void *))) alias_compare);
10744+ (int (*) (const void *, const void *)) alias_compare);
10745
10746- FREE_BLOCKS (block_list);
10747 return added;
10748 }
10749
10750
10751-static void
10752+static int
10753 extend_alias_table ()
10754 {
10755 size_t new_size;
10756 struct alias_map *new_map;
10757
10758 new_size = maxmap == 0 ? 100 : 2 * maxmap;
10759- new_map = (struct alias_map *) malloc (new_size
10760- * sizeof (struct alias_map));
10761+ new_map = (struct alias_map *) realloc (map, (new_size
10762+ * sizeof (struct alias_map)));
10763 if (new_map == NULL)
10764 /* Simply don't extend: we don't have any more core. */
10765- return;
10766-
10767- memcpy (new_map, map, nmap * sizeof (struct alias_map));
10768-
10769- if (maxmap != 0)
10770- free (map);
10771+ return -1;
10772
10773 map = new_map;
10774 maxmap = new_size;
10775+ return 0;
10776 }
10777
10778
10779 static int
10780-alias_compare (map1, map2)
10781- const struct alias_map *map1;
10782- const struct alias_map *map2;
10783+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
10784 {
10785 #if defined _LIBC || defined HAVE_STRCASECMP
10786 return strcasecmp (map1->alias, map2->alias);
10787--- lrzsz-0.12.20.safe/intl/localename.c 1969-12-31 19:00:00.000000000 -0500
10788+++ lrzsz-0.12.20/intl/localename.c 2004-09-12 14:40:34.510724528 -0400
10789@@ -0,0 +1,1142 @@
10790+/* Determine the current selected locale.
10791+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
10792+
10793+ This program is free software; you can redistribute it and/or modify it
10794+ under the terms of the GNU Library General Public License as published
10795+ by the Free Software Foundation; either version 2, or (at your option)
10796+ any later version.
10797+
10798+ This program is distributed in the hope that it will be useful,
10799+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10800+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10801+ Library General Public License for more details.
10802+
10803+ You should have received a copy of the GNU Library General Public
10804+ License along with this program; if not, write to the Free Software
10805+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10806+ USA. */
10807+
10808+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
10809+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
10810+
10811+#ifdef HAVE_CONFIG_H
10812+# include <config.h>
10813+#endif
10814+
10815+#include <stdlib.h>
10816+#include <locale.h>
10817+
10818+#if defined _WIN32 || defined __WIN32__
10819+# undef WIN32 /* avoid warning on mingw32 */
10820+# define WIN32
10821+#endif
10822+
10823+#ifdef WIN32
10824+# define WIN32_LEAN_AND_MEAN
10825+# include <windows.h>
10826+/* List of language codes, sorted by value:
10827+ 0x01 LANG_ARABIC
10828+ 0x02 LANG_BULGARIAN
10829+ 0x03 LANG_CATALAN
10830+ 0x04 LANG_CHINESE
10831+ 0x05 LANG_CZECH
10832+ 0x06 LANG_DANISH
10833+ 0x07 LANG_GERMAN
10834+ 0x08 LANG_GREEK
10835+ 0x09 LANG_ENGLISH
10836+ 0x0a LANG_SPANISH
10837+ 0x0b LANG_FINNISH
10838+ 0x0c LANG_FRENCH
10839+ 0x0d LANG_HEBREW
10840+ 0x0e LANG_HUNGARIAN
10841+ 0x0f LANG_ICELANDIC
10842+ 0x10 LANG_ITALIAN
10843+ 0x11 LANG_JAPANESE
10844+ 0x12 LANG_KOREAN
10845+ 0x13 LANG_DUTCH
10846+ 0x14 LANG_NORWEGIAN
10847+ 0x15 LANG_POLISH
10848+ 0x16 LANG_PORTUGUESE
10849+ 0x17 LANG_RHAETO_ROMANCE
10850+ 0x18 LANG_ROMANIAN
10851+ 0x19 LANG_RUSSIAN
10852+ 0x1a LANG_CROATIAN == LANG_SERBIAN
10853+ 0x1b LANG_SLOVAK
10854+ 0x1c LANG_ALBANIAN
10855+ 0x1d LANG_SWEDISH
10856+ 0x1e LANG_THAI
10857+ 0x1f LANG_TURKISH
10858+ 0x20 LANG_URDU
10859+ 0x21 LANG_INDONESIAN
10860+ 0x22 LANG_UKRAINIAN
10861+ 0x23 LANG_BELARUSIAN
10862+ 0x24 LANG_SLOVENIAN
10863+ 0x25 LANG_ESTONIAN
10864+ 0x26 LANG_LATVIAN
10865+ 0x27 LANG_LITHUANIAN
10866+ 0x28 LANG_TAJIK
10867+ 0x29 LANG_FARSI
10868+ 0x2a LANG_VIETNAMESE
10869+ 0x2b LANG_ARMENIAN
10870+ 0x2c LANG_AZERI
10871+ 0x2d LANG_BASQUE
10872+ 0x2e LANG_SORBIAN
10873+ 0x2f LANG_MACEDONIAN
10874+ 0x30 LANG_SUTU
10875+ 0x31 LANG_TSONGA
10876+ 0x32 LANG_TSWANA
10877+ 0x33 LANG_VENDA
10878+ 0x34 LANG_XHOSA
10879+ 0x35 LANG_ZULU
10880+ 0x36 LANG_AFRIKAANS
10881+ 0x37 LANG_GEORGIAN
10882+ 0x38 LANG_FAEROESE
10883+ 0x39 LANG_HINDI
10884+ 0x3a LANG_MALTESE
10885+ 0x3b LANG_SAAMI
10886+ 0x3c LANG_GAELIC
10887+ 0x3d LANG_YIDDISH
10888+ 0x3e LANG_MALAY
10889+ 0x3f LANG_KAZAK
10890+ 0x40 LANG_KYRGYZ
10891+ 0x41 LANG_SWAHILI
10892+ 0x42 LANG_TURKMEN
10893+ 0x43 LANG_UZBEK
10894+ 0x44 LANG_TATAR
10895+ 0x45 LANG_BENGALI
10896+ 0x46 LANG_PUNJABI
10897+ 0x47 LANG_GUJARATI
10898+ 0x48 LANG_ORIYA
10899+ 0x49 LANG_TAMIL
10900+ 0x4a LANG_TELUGU
10901+ 0x4b LANG_KANNADA
10902+ 0x4c LANG_MALAYALAM
10903+ 0x4d LANG_ASSAMESE
10904+ 0x4e LANG_MARATHI
10905+ 0x4f LANG_SANSKRIT
10906+ 0x50 LANG_MONGOLIAN
10907+ 0x51 LANG_TIBETAN
10908+ 0x52 LANG_WELSH
10909+ 0x53 LANG_CAMBODIAN
10910+ 0x54 LANG_LAO
10911+ 0x55 LANG_BURMESE
10912+ 0x56 LANG_GALICIAN
10913+ 0x57 LANG_KONKANI
10914+ 0x58 LANG_MANIPURI
10915+ 0x59 LANG_SINDHI
10916+ 0x5a LANG_SYRIAC
10917+ 0x5b LANG_SINHALESE
10918+ 0x5c LANG_CHEROKEE
10919+ 0x5d LANG_INUKTITUT
10920+ 0x5e LANG_AMHARIC
10921+ 0x5f LANG_TAMAZIGHT
10922+ 0x60 LANG_KASHMIRI
10923+ 0x61 LANG_NEPALI
10924+ 0x62 LANG_FRISIAN
10925+ 0x63 LANG_PASHTO
10926+ 0x64 LANG_TAGALOG
10927+ 0x65 LANG_DIVEHI
10928+ 0x66 LANG_EDO
10929+ 0x67 LANG_FULFULDE
10930+ 0x68 LANG_HAUSA
10931+ 0x69 LANG_IBIBIO
10932+ 0x6a LANG_YORUBA
10933+ 0x70 LANG_IGBO
10934+ 0x71 LANG_KANURI
10935+ 0x72 LANG_OROMO
10936+ 0x73 LANG_TIGRINYA
10937+ 0x74 LANG_GUARANI
10938+ 0x75 LANG_HAWAIIAN
10939+ 0x76 LANG_LATIN
10940+ 0x77 LANG_SOMALI
10941+ 0x78 LANG_YI
10942+ 0x79 LANG_PAPIAMENTU
10943+*/
10944+/* Mingw headers don't have latest language and sublanguage codes. */
10945+# ifndef LANG_AFRIKAANS
10946+# define LANG_AFRIKAANS 0x36
10947+# endif
10948+# ifndef LANG_ALBANIAN
10949+# define LANG_ALBANIAN 0x1c
10950+# endif
10951+# ifndef LANG_AMHARIC
10952+# define LANG_AMHARIC 0x5e
10953+# endif
10954+# ifndef LANG_ARABIC
10955+# define LANG_ARABIC 0x01
10956+# endif
10957+# ifndef LANG_ARMENIAN
10958+# define LANG_ARMENIAN 0x2b
10959+# endif
10960+# ifndef LANG_ASSAMESE
10961+# define LANG_ASSAMESE 0x4d
10962+# endif
10963+# ifndef LANG_AZERI
10964+# define LANG_AZERI 0x2c
10965+# endif
10966+# ifndef LANG_BASQUE
10967+# define LANG_BASQUE 0x2d
10968+# endif
10969+# ifndef LANG_BELARUSIAN
10970+# define LANG_BELARUSIAN 0x23
10971+# endif
10972+# ifndef LANG_BENGALI
10973+# define LANG_BENGALI 0x45
10974+# endif
10975+# ifndef LANG_BURMESE
10976+# define LANG_BURMESE 0x55
10977+# endif
10978+# ifndef LANG_CAMBODIAN
10979+# define LANG_CAMBODIAN 0x53
10980+# endif
10981+# ifndef LANG_CATALAN
10982+# define LANG_CATALAN 0x03
10983+# endif
10984+# ifndef LANG_CHEROKEE
10985+# define LANG_CHEROKEE 0x5c
10986+# endif
10987+# ifndef LANG_DIVEHI
10988+# define LANG_DIVEHI 0x65
10989+# endif
10990+# ifndef LANG_EDO
10991+# define LANG_EDO 0x66
10992+# endif
10993+# ifndef LANG_ESTONIAN
10994+# define LANG_ESTONIAN 0x25
10995+# endif
10996+# ifndef LANG_FAEROESE
10997+# define LANG_FAEROESE 0x38
10998+# endif
10999+# ifndef LANG_FARSI
11000+# define LANG_FARSI 0x29
11001+# endif
11002+# ifndef LANG_FRISIAN
11003+# define LANG_FRISIAN 0x62
11004+# endif
11005+# ifndef LANG_FULFULDE
11006+# define LANG_FULFULDE 0x67
11007+# endif
11008+# ifndef LANG_GAELIC
11009+# define LANG_GAELIC 0x3c
11010+# endif
11011+# ifndef LANG_GALICIAN
11012+# define LANG_GALICIAN 0x56
11013+# endif
11014+# ifndef LANG_GEORGIAN
11015+# define LANG_GEORGIAN 0x37
11016+# endif
11017+# ifndef LANG_GUARANI
11018+# define LANG_GUARANI 0x74
11019+# endif
11020+# ifndef LANG_GUJARATI
11021+# define LANG_GUJARATI 0x47
11022+# endif
11023+# ifndef LANG_HAUSA
11024+# define LANG_HAUSA 0x68
11025+# endif
11026+# ifndef LANG_HAWAIIAN
11027+# define LANG_HAWAIIAN 0x75
11028+# endif
11029+# ifndef LANG_HEBREW
11030+# define LANG_HEBREW 0x0d
11031+# endif
11032+# ifndef LANG_HINDI
11033+# define LANG_HINDI 0x39
11034+# endif
11035+# ifndef LANG_IBIBIO
11036+# define LANG_IBIBIO 0x69
11037+# endif
11038+# ifndef LANG_IGBO
11039+# define LANG_IGBO 0x70
11040+# endif
11041+# ifndef LANG_INDONESIAN
11042+# define LANG_INDONESIAN 0x21
11043+# endif
11044+# ifndef LANG_INUKTITUT
11045+# define LANG_INUKTITUT 0x5d
11046+# endif
11047+# ifndef LANG_KANNADA
11048+# define LANG_KANNADA 0x4b
11049+# endif
11050+# ifndef LANG_KANURI
11051+# define LANG_KANURI 0x71
11052+# endif
11053+# ifndef LANG_KASHMIRI
11054+# define LANG_KASHMIRI 0x60
11055+# endif
11056+# ifndef LANG_KAZAK
11057+# define LANG_KAZAK 0x3f
11058+# endif
11059+# ifndef LANG_KONKANI
11060+# define LANG_KONKANI 0x57
11061+# endif
11062+# ifndef LANG_KYRGYZ
11063+# define LANG_KYRGYZ 0x40
11064+# endif
11065+# ifndef LANG_LAO
11066+# define LANG_LAO 0x54
11067+# endif
11068+# ifndef LANG_LATIN
11069+# define LANG_LATIN 0x76
11070+# endif
11071+# ifndef LANG_LATVIAN
11072+# define LANG_LATVIAN 0x26
11073+# endif
11074+# ifndef LANG_LITHUANIAN
11075+# define LANG_LITHUANIAN 0x27
11076+# endif
11077+# ifndef LANG_MACEDONIAN
11078+# define LANG_MACEDONIAN 0x2f
11079+# endif
11080+# ifndef LANG_MALAY
11081+# define LANG_MALAY 0x3e
11082+# endif
11083+# ifndef LANG_MALAYALAM
11084+# define LANG_MALAYALAM 0x4c
11085+# endif
11086+# ifndef LANG_MALTESE
11087+# define LANG_MALTESE 0x3a
11088+# endif
11089+# ifndef LANG_MANIPURI
11090+# define LANG_MANIPURI 0x58
11091+# endif
11092+# ifndef LANG_MARATHI
11093+# define LANG_MARATHI 0x4e
11094+# endif
11095+# ifndef LANG_MONGOLIAN
11096+# define LANG_MONGOLIAN 0x50
11097+# endif
11098+# ifndef LANG_NEPALI
11099+# define LANG_NEPALI 0x61
11100+# endif
11101+# ifndef LANG_ORIYA
11102+# define LANG_ORIYA 0x48
11103+# endif
11104+# ifndef LANG_OROMO
11105+# define LANG_OROMO 0x72
11106+# endif
11107+# ifndef LANG_PAPIAMENTU
11108+# define LANG_PAPIAMENTU 0x79
11109+# endif
11110+# ifndef LANG_PASHTO
11111+# define LANG_PASHTO 0x63
11112+# endif
11113+# ifndef LANG_PUNJABI
11114+# define LANG_PUNJABI 0x46
11115+# endif
11116+# ifndef LANG_RHAETO_ROMANCE
11117+# define LANG_RHAETO_ROMANCE 0x17
11118+# endif
11119+# ifndef LANG_SAAMI
11120+# define LANG_SAAMI 0x3b
11121+# endif
11122+# ifndef LANG_SANSKRIT
11123+# define LANG_SANSKRIT 0x4f
11124+# endif
11125+# ifndef LANG_SERBIAN
11126+# define LANG_SERBIAN 0x1a
11127+# endif
11128+# ifndef LANG_SINDHI
11129+# define LANG_SINDHI 0x59
11130+# endif
11131+# ifndef LANG_SINHALESE
11132+# define LANG_SINHALESE 0x5b
11133+# endif
11134+# ifndef LANG_SLOVAK
11135+# define LANG_SLOVAK 0x1b
11136+# endif
11137+# ifndef LANG_SOMALI
11138+# define LANG_SOMALI 0x77
11139+# endif
11140+# ifndef LANG_SORBIAN
11141+# define LANG_SORBIAN 0x2e
11142+# endif
11143+# ifndef LANG_SUTU
11144+# define LANG_SUTU 0x30
11145+# endif
11146+# ifndef LANG_SWAHILI
11147+# define LANG_SWAHILI 0x41
11148+# endif
11149+# ifndef LANG_SYRIAC
11150+# define LANG_SYRIAC 0x5a
11151+# endif
11152+# ifndef LANG_TAGALOG
11153+# define LANG_TAGALOG 0x64
11154+# endif
11155+# ifndef LANG_TAJIK
11156+# define LANG_TAJIK 0x28
11157+# endif
11158+# ifndef LANG_TAMAZIGHT
11159+# define LANG_TAMAZIGHT 0x5f
11160+# endif
11161+# ifndef LANG_TAMIL
11162+# define LANG_TAMIL 0x49
11163+# endif
11164+# ifndef LANG_TATAR
11165+# define LANG_TATAR 0x44
11166+# endif
11167+# ifndef LANG_TELUGU
11168+# define LANG_TELUGU 0x4a
11169+# endif
11170+# ifndef LANG_THAI
11171+# define LANG_THAI 0x1e
11172+# endif
11173+# ifndef LANG_TIBETAN
11174+# define LANG_TIBETAN 0x51
11175+# endif
11176+# ifndef LANG_TIGRINYA
11177+# define LANG_TIGRINYA 0x73
11178+# endif
11179+# ifndef LANG_TSONGA
11180+# define LANG_TSONGA 0x31
11181+# endif
11182+# ifndef LANG_TSWANA
11183+# define LANG_TSWANA 0x32
11184+# endif
11185+# ifndef LANG_TURKMEN
11186+# define LANG_TURKMEN 0x42
11187+# endif
11188+# ifndef LANG_UKRAINIAN
11189+# define LANG_UKRAINIAN 0x22
11190+# endif
11191+# ifndef LANG_URDU
11192+# define LANG_URDU 0x20
11193+# endif
11194+# ifndef LANG_UZBEK
11195+# define LANG_UZBEK 0x43
11196+# endif
11197+# ifndef LANG_VENDA
11198+# define LANG_VENDA 0x33
11199+# endif
11200+# ifndef LANG_VIETNAMESE
11201+# define LANG_VIETNAMESE 0x2a
11202+# endif
11203+# ifndef LANG_WELSH
11204+# define LANG_WELSH 0x52
11205+# endif
11206+# ifndef LANG_XHOSA
11207+# define LANG_XHOSA 0x34
11208+# endif
11209+# ifndef LANG_YI
11210+# define LANG_YI 0x78
11211+# endif
11212+# ifndef LANG_YIDDISH
11213+# define LANG_YIDDISH 0x3d
11214+# endif
11215+# ifndef LANG_YORUBA
11216+# define LANG_YORUBA 0x6a
11217+# endif
11218+# ifndef LANG_ZULU
11219+# define LANG_ZULU 0x35
11220+# endif
11221+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
11222+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
11223+# endif
11224+# ifndef SUBLANG_ARABIC_IRAQ
11225+# define SUBLANG_ARABIC_IRAQ 0x02
11226+# endif
11227+# ifndef SUBLANG_ARABIC_EGYPT
11228+# define SUBLANG_ARABIC_EGYPT 0x03
11229+# endif
11230+# ifndef SUBLANG_ARABIC_LIBYA
11231+# define SUBLANG_ARABIC_LIBYA 0x04
11232+# endif
11233+# ifndef SUBLANG_ARABIC_ALGERIA
11234+# define SUBLANG_ARABIC_ALGERIA 0x05
11235+# endif
11236+# ifndef SUBLANG_ARABIC_MOROCCO
11237+# define SUBLANG_ARABIC_MOROCCO 0x06
11238+# endif
11239+# ifndef SUBLANG_ARABIC_TUNISIA
11240+# define SUBLANG_ARABIC_TUNISIA 0x07
11241+# endif
11242+# ifndef SUBLANG_ARABIC_OMAN
11243+# define SUBLANG_ARABIC_OMAN 0x08
11244+# endif
11245+# ifndef SUBLANG_ARABIC_YEMEN
11246+# define SUBLANG_ARABIC_YEMEN 0x09
11247+# endif
11248+# ifndef SUBLANG_ARABIC_SYRIA
11249+# define SUBLANG_ARABIC_SYRIA 0x0a
11250+# endif
11251+# ifndef SUBLANG_ARABIC_JORDAN
11252+# define SUBLANG_ARABIC_JORDAN 0x0b
11253+# endif
11254+# ifndef SUBLANG_ARABIC_LEBANON
11255+# define SUBLANG_ARABIC_LEBANON 0x0c
11256+# endif
11257+# ifndef SUBLANG_ARABIC_KUWAIT
11258+# define SUBLANG_ARABIC_KUWAIT 0x0d
11259+# endif
11260+# ifndef SUBLANG_ARABIC_UAE
11261+# define SUBLANG_ARABIC_UAE 0x0e
11262+# endif
11263+# ifndef SUBLANG_ARABIC_BAHRAIN
11264+# define SUBLANG_ARABIC_BAHRAIN 0x0f
11265+# endif
11266+# ifndef SUBLANG_ARABIC_QATAR
11267+# define SUBLANG_ARABIC_QATAR 0x10
11268+# endif
11269+# ifndef SUBLANG_AZERI_LATIN
11270+# define SUBLANG_AZERI_LATIN 0x01
11271+# endif
11272+# ifndef SUBLANG_AZERI_CYRILLIC
11273+# define SUBLANG_AZERI_CYRILLIC 0x02
11274+# endif
11275+# ifndef SUBLANG_BENGALI_INDIA
11276+# define SUBLANG_BENGALI_INDIA 0x00
11277+# endif
11278+# ifndef SUBLANG_BENGALI_BANGLADESH
11279+# define SUBLANG_BENGALI_BANGLADESH 0x01
11280+# endif
11281+# ifndef SUBLANG_CHINESE_MACAU
11282+# define SUBLANG_CHINESE_MACAU 0x05
11283+# endif
11284+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
11285+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
11286+# endif
11287+# ifndef SUBLANG_ENGLISH_JAMAICA
11288+# define SUBLANG_ENGLISH_JAMAICA 0x08
11289+# endif
11290+# ifndef SUBLANG_ENGLISH_CARIBBEAN
11291+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
11292+# endif
11293+# ifndef SUBLANG_ENGLISH_BELIZE
11294+# define SUBLANG_ENGLISH_BELIZE 0x0a
11295+# endif
11296+# ifndef SUBLANG_ENGLISH_TRINIDAD
11297+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
11298+# endif
11299+# ifndef SUBLANG_ENGLISH_ZIMBABWE
11300+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
11301+# endif
11302+# ifndef SUBLANG_ENGLISH_PHILIPPINES
11303+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
11304+# endif
11305+# ifndef SUBLANG_ENGLISH_INDONESIA
11306+# define SUBLANG_ENGLISH_INDONESIA 0x0e
11307+# endif
11308+# ifndef SUBLANG_ENGLISH_HONGKONG
11309+# define SUBLANG_ENGLISH_HONGKONG 0x0f
11310+# endif
11311+# ifndef SUBLANG_ENGLISH_INDIA
11312+# define SUBLANG_ENGLISH_INDIA 0x10
11313+# endif
11314+# ifndef SUBLANG_ENGLISH_MALAYSIA
11315+# define SUBLANG_ENGLISH_MALAYSIA 0x11
11316+# endif
11317+# ifndef SUBLANG_ENGLISH_SINGAPORE
11318+# define SUBLANG_ENGLISH_SINGAPORE 0x12
11319+# endif
11320+# ifndef SUBLANG_FRENCH_LUXEMBOURG
11321+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
11322+# endif
11323+# ifndef SUBLANG_FRENCH_MONACO
11324+# define SUBLANG_FRENCH_MONACO 0x06
11325+# endif
11326+# ifndef SUBLANG_FRENCH_WESTINDIES
11327+# define SUBLANG_FRENCH_WESTINDIES 0x07
11328+# endif
11329+# ifndef SUBLANG_FRENCH_REUNION
11330+# define SUBLANG_FRENCH_REUNION 0x08
11331+# endif
11332+# ifndef SUBLANG_FRENCH_CONGO
11333+# define SUBLANG_FRENCH_CONGO 0x09
11334+# endif
11335+# ifndef SUBLANG_FRENCH_SENEGAL
11336+# define SUBLANG_FRENCH_SENEGAL 0x0a
11337+# endif
11338+# ifndef SUBLANG_FRENCH_CAMEROON
11339+# define SUBLANG_FRENCH_CAMEROON 0x0b
11340+# endif
11341+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
11342+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
11343+# endif
11344+# ifndef SUBLANG_FRENCH_MALI
11345+# define SUBLANG_FRENCH_MALI 0x0d
11346+# endif
11347+# ifndef SUBLANG_FRENCH_MOROCCO
11348+# define SUBLANG_FRENCH_MOROCCO 0x0e
11349+# endif
11350+# ifndef SUBLANG_FRENCH_HAITI
11351+# define SUBLANG_FRENCH_HAITI 0x0f
11352+# endif
11353+# ifndef SUBLANG_GERMAN_LUXEMBOURG
11354+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
11355+# endif
11356+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
11357+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
11358+# endif
11359+# ifndef SUBLANG_KASHMIRI_INDIA
11360+# define SUBLANG_KASHMIRI_INDIA 0x02
11361+# endif
11362+# ifndef SUBLANG_MALAY_MALAYSIA
11363+# define SUBLANG_MALAY_MALAYSIA 0x01
11364+# endif
11365+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
11366+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
11367+# endif
11368+# ifndef SUBLANG_NEPALI_INDIA
11369+# define SUBLANG_NEPALI_INDIA 0x02
11370+# endif
11371+# ifndef SUBLANG_PUNJABI_INDIA
11372+# define SUBLANG_PUNJABI_INDIA 0x00
11373+# endif
11374+# ifndef SUBLANG_PUNJABI_PAKISTAN
11375+# define SUBLANG_PUNJABI_PAKISTAN 0x01
11376+# endif
11377+# ifndef SUBLANG_ROMANIAN_ROMANIA
11378+# define SUBLANG_ROMANIAN_ROMANIA 0x00
11379+# endif
11380+# ifndef SUBLANG_ROMANIAN_MOLDOVA
11381+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
11382+# endif
11383+# ifndef SUBLANG_SERBIAN_LATIN
11384+# define SUBLANG_SERBIAN_LATIN 0x02
11385+# endif
11386+# ifndef SUBLANG_SERBIAN_CYRILLIC
11387+# define SUBLANG_SERBIAN_CYRILLIC 0x03
11388+# endif
11389+# ifndef SUBLANG_SINDHI_INDIA
11390+# define SUBLANG_SINDHI_INDIA 0x00
11391+# endif
11392+# ifndef SUBLANG_SINDHI_PAKISTAN
11393+# define SUBLANG_SINDHI_PAKISTAN 0x01
11394+# endif
11395+# ifndef SUBLANG_SPANISH_GUATEMALA
11396+# define SUBLANG_SPANISH_GUATEMALA 0x04
11397+# endif
11398+# ifndef SUBLANG_SPANISH_COSTA_RICA
11399+# define SUBLANG_SPANISH_COSTA_RICA 0x05
11400+# endif
11401+# ifndef SUBLANG_SPANISH_PANAMA
11402+# define SUBLANG_SPANISH_PANAMA 0x06
11403+# endif
11404+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
11405+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
11406+# endif
11407+# ifndef SUBLANG_SPANISH_VENEZUELA
11408+# define SUBLANG_SPANISH_VENEZUELA 0x08
11409+# endif
11410+# ifndef SUBLANG_SPANISH_COLOMBIA
11411+# define SUBLANG_SPANISH_COLOMBIA 0x09
11412+# endif
11413+# ifndef SUBLANG_SPANISH_PERU
11414+# define SUBLANG_SPANISH_PERU 0x0a
11415+# endif
11416+# ifndef SUBLANG_SPANISH_ARGENTINA
11417+# define SUBLANG_SPANISH_ARGENTINA 0x0b
11418+# endif
11419+# ifndef SUBLANG_SPANISH_ECUADOR
11420+# define SUBLANG_SPANISH_ECUADOR 0x0c
11421+# endif
11422+# ifndef SUBLANG_SPANISH_CHILE
11423+# define SUBLANG_SPANISH_CHILE 0x0d
11424+# endif
11425+# ifndef SUBLANG_SPANISH_URUGUAY
11426+# define SUBLANG_SPANISH_URUGUAY 0x0e
11427+# endif
11428+# ifndef SUBLANG_SPANISH_PARAGUAY
11429+# define SUBLANG_SPANISH_PARAGUAY 0x0f
11430+# endif
11431+# ifndef SUBLANG_SPANISH_BOLIVIA
11432+# define SUBLANG_SPANISH_BOLIVIA 0x10
11433+# endif
11434+# ifndef SUBLANG_SPANISH_EL_SALVADOR
11435+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
11436+# endif
11437+# ifndef SUBLANG_SPANISH_HONDURAS
11438+# define SUBLANG_SPANISH_HONDURAS 0x12
11439+# endif
11440+# ifndef SUBLANG_SPANISH_NICARAGUA
11441+# define SUBLANG_SPANISH_NICARAGUA 0x13
11442+# endif
11443+# ifndef SUBLANG_SPANISH_PUERTO_RICO
11444+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
11445+# endif
11446+# ifndef SUBLANG_SWEDISH_FINLAND
11447+# define SUBLANG_SWEDISH_FINLAND 0x02
11448+# endif
11449+# ifndef SUBLANG_TAMAZIGHT_ARABIC
11450+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
11451+# endif
11452+# ifndef SUBLANG_TAMAZIGHT_LATIN
11453+# define SUBLANG_TAMAZIGHT_LATIN 0x02
11454+# endif
11455+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
11456+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
11457+# endif
11458+# ifndef SUBLANG_TIGRINYA_ERITREA
11459+# define SUBLANG_TIGRINYA_ERITREA 0x01
11460+# endif
11461+# ifndef SUBLANG_URDU_PAKISTAN
11462+# define SUBLANG_URDU_PAKISTAN 0x01
11463+# endif
11464+# ifndef SUBLANG_URDU_INDIA
11465+# define SUBLANG_URDU_INDIA 0x02
11466+# endif
11467+# ifndef SUBLANG_UZBEK_LATIN
11468+# define SUBLANG_UZBEK_LATIN 0x01
11469+# endif
11470+# ifndef SUBLANG_UZBEK_CYRILLIC
11471+# define SUBLANG_UZBEK_CYRILLIC 0x02
11472+# endif
11473+#endif
11474+
11475+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
11476+ "Directs 'setlocale()' to query 'category' and return the current
11477+ setting of 'local'."
11478+ However it does not specify the exact format. Neither do SUSV2 and
11479+ ISO C 99. So we can use this feature only on selected systems (e.g.
11480+ those using GNU C Library). */
11481+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
11482+# define HAVE_LOCALE_NULL
11483+#endif
11484+
11485+/* Determine the current locale's name, and canonicalize it into XPG syntax
11486+ language[_territory[.codeset]][@modifier]
11487+ The codeset part in the result is not reliable; the locale_charset()
11488+ should be used for codeset information instead.
11489+ The result must not be freed; it is statically allocated. */
11490+
11491+const char *
11492+_nl_locale_name (int category, const char *categoryname)
11493+{
11494+ const char *retval;
11495+
11496+#ifndef WIN32
11497+
11498+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
11499+ On some systems this can be done by the 'setlocale' function itself. */
11500+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
11501+ retval = setlocale (category, NULL);
11502+# else
11503+ /* Setting of LC_ALL overwrites all other. */
11504+ retval = getenv ("LC_ALL");
11505+ if (retval == NULL || retval[0] == '\0')
11506+ {
11507+ /* Next comes the name of the desired category. */
11508+ retval = getenv (categoryname);
11509+ if (retval == NULL || retval[0] == '\0')
11510+ {
11511+ /* Last possibility is the LANG environment variable. */
11512+ retval = getenv ("LANG");
11513+ if (retval == NULL || retval[0] == '\0')
11514+ /* We use C as the default domain. POSIX says this is
11515+ implementation defined. */
11516+ retval = "C";
11517+ }
11518+ }
11519+# endif
11520+
11521+ return retval;
11522+
11523+#else /* WIN32 */
11524+
11525+ /* Return an XPG style locale name language[_territory][@modifier].
11526+ Don't even bother determining the codeset; it's not useful in this
11527+ context, because message catalogs are not specific to a single
11528+ codeset. */
11529+
11530+ LCID lcid;
11531+ LANGID langid;
11532+ int primary, sub;
11533+
11534+ /* Let the user override the system settings through environment
11535+ variables, as on POSIX systems. */
11536+ retval = getenv ("LC_ALL");
11537+ if (retval != NULL && retval[0] != '\0')
11538+ return retval;
11539+ retval = getenv (categoryname);
11540+ if (retval != NULL && retval[0] != '\0')
11541+ return retval;
11542+ retval = getenv ("LANG");
11543+ if (retval != NULL && retval[0] != '\0')
11544+ return retval;
11545+
11546+ /* Use native Win32 API locale ID. */
11547+ lcid = GetThreadLocale ();
11548+
11549+ /* Strip off the sorting rules, keep only the language part. */
11550+ langid = LANGIDFROMLCID (lcid);
11551+
11552+ /* Split into language and territory part. */
11553+ primary = PRIMARYLANGID (langid);
11554+ sub = SUBLANGID (langid);
11555+
11556+ /* Dispatch on language.
11557+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
11558+ For details about languages, see http://www.ethnologue.com/ . */
11559+ switch (primary)
11560+ {
11561+ case LANG_AFRIKAANS: return "af_ZA";
11562+ case LANG_ALBANIAN: return "sq_AL";
11563+ case LANG_AMHARIC: return "am_ET";
11564+ case LANG_ARABIC:
11565+ switch (sub)
11566+ {
11567+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
11568+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
11569+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
11570+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
11571+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
11572+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
11573+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
11574+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
11575+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
11576+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
11577+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
11578+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
11579+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
11580+ case SUBLANG_ARABIC_UAE: return "ar_AE";
11581+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
11582+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
11583+ }
11584+ return "ar";
11585+ case LANG_ARMENIAN: return "hy_AM";
11586+ case LANG_ASSAMESE: return "as_IN";
11587+ case LANG_AZERI:
11588+ switch (sub)
11589+ {
11590+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
11591+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
11592+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
11593+ }
11594+ return "az";
11595+ case LANG_BASQUE:
11596+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
11597+ case LANG_BELARUSIAN: return "be_BY";
11598+ case LANG_BENGALI:
11599+ switch (sub)
11600+ {
11601+ case SUBLANG_BENGALI_INDIA: return "bn_IN";
11602+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
11603+ }
11604+ return "bn";
11605+ case LANG_BULGARIAN: return "bg_BG";
11606+ case LANG_BURMESE: return "my_MM";
11607+ case LANG_CAMBODIAN: return "km_KH";
11608+ case LANG_CATALAN: return "ca_ES";
11609+ case LANG_CHEROKEE: return "chr_US";
11610+ case LANG_CHINESE:
11611+ switch (sub)
11612+ {
11613+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
11614+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
11615+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
11616+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
11617+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
11618+ }
11619+ return "zh";
11620+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
11621+ * What used to be called Serbo-Croatian
11622+ * should really now be two separate
11623+ * languages because of political reasons.
11624+ * (Says tml, who knows nothing about Serbian
11625+ * or Croatian.)
11626+ * (I can feel those flames coming already.)
11627+ */
11628+ switch (sub)
11629+ {
11630+ case SUBLANG_DEFAULT: return "hr_HR";
11631+ case SUBLANG_SERBIAN_LATIN: return "sr_CS";
11632+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
11633+ }
11634+ return "hr";
11635+ case LANG_CZECH: return "cs_CZ";
11636+ case LANG_DANISH: return "da_DK";
11637+ case LANG_DIVEHI: return "dv_MV";
11638+ case LANG_DUTCH:
11639+ switch (sub)
11640+ {
11641+ case SUBLANG_DUTCH: return "nl_NL";
11642+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
11643+ }
11644+ return "nl";
11645+ case LANG_EDO: return "bin_NG";
11646+ case LANG_ENGLISH:
11647+ switch (sub)
11648+ {
11649+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
11650+ * English was the language spoken in England.
11651+ * Oh well.
11652+ */
11653+ case SUBLANG_ENGLISH_US: return "en_US";
11654+ case SUBLANG_ENGLISH_UK: return "en_GB";
11655+ case SUBLANG_ENGLISH_AUS: return "en_AU";
11656+ case SUBLANG_ENGLISH_CAN: return "en_CA";
11657+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
11658+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
11659+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
11660+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
11661+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
11662+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
11663+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
11664+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
11665+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
11666+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
11667+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
11668+ case SUBLANG_ENGLISH_INDIA: return "en_IN";
11669+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
11670+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
11671+ }
11672+ return "en";
11673+ case LANG_ESTONIAN: return "et_EE";
11674+ case LANG_FAEROESE: return "fo_FO";
11675+ case LANG_FARSI: return "fa_IR";
11676+ case LANG_FINNISH: return "fi_FI";
11677+ case LANG_FRENCH:
11678+ switch (sub)
11679+ {
11680+ case SUBLANG_FRENCH: return "fr_FR";
11681+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
11682+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
11683+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
11684+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
11685+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
11686+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
11687+ case SUBLANG_FRENCH_REUNION: return "fr_RE";
11688+ case SUBLANG_FRENCH_CONGO: return "fr_CG";
11689+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
11690+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
11691+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
11692+ case SUBLANG_FRENCH_MALI: return "fr_ML";
11693+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
11694+ case SUBLANG_FRENCH_HAITI: return "fr_HT";
11695+ }
11696+ return "fr";
11697+ case LANG_FRISIAN: return "fy_NL";
11698+ case LANG_FULFULDE:
11699+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
11700+ return "ff_NG";
11701+ case LANG_GAELIC:
11702+ switch (sub)
11703+ {
11704+ case 0x01: /* SCOTTISH */ return "gd_GB";
11705+ case 0x02: /* IRISH */ return "ga_IE";
11706+ }
11707+ return "C";
11708+ case LANG_GALICIAN: return "gl_ES";
11709+ case LANG_GEORGIAN: return "ka_GE";
11710+ case LANG_GERMAN:
11711+ switch (sub)
11712+ {
11713+ case SUBLANG_GERMAN: return "de_DE";
11714+ case SUBLANG_GERMAN_SWISS: return "de_CH";
11715+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
11716+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
11717+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
11718+ }
11719+ return "de";
11720+ case LANG_GREEK: return "el_GR";
11721+ case LANG_GUARANI: return "gn_PY";
11722+ case LANG_GUJARATI: return "gu_IN";
11723+ case LANG_HAUSA: return "ha_NG";
11724+ case LANG_HAWAIIAN:
11725+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
11726+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
11727+ return "cpe_US";
11728+ case LANG_HEBREW: return "he_IL";
11729+ case LANG_HINDI: return "hi_IN";
11730+ case LANG_HUNGARIAN: return "hu_HU";
11731+ case LANG_IBIBIO: return "nic_NG";
11732+ case LANG_ICELANDIC: return "is_IS";
11733+ case LANG_IGBO: return "ig_NG";
11734+ case LANG_INDONESIAN: return "id_ID";
11735+ case LANG_INUKTITUT: return "iu_CA";
11736+ case LANG_ITALIAN:
11737+ switch (sub)
11738+ {
11739+ case SUBLANG_ITALIAN: return "it_IT";
11740+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
11741+ }
11742+ return "it";
11743+ case LANG_JAPANESE: return "ja_JP";
11744+ case LANG_KANNADA: return "kn_IN";
11745+ case LANG_KANURI: return "kr_NG";
11746+ case LANG_KASHMIRI:
11747+ switch (sub)
11748+ {
11749+ case SUBLANG_DEFAULT: return "ks_PK";
11750+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
11751+ }
11752+ return "ks";
11753+ case LANG_KAZAK: return "kk_KZ";
11754+ case LANG_KONKANI:
11755+ /* FIXME: Adjust this when such locales appear on Unix. */
11756+ return "kok_IN";
11757+ case LANG_KOREAN: return "ko_KR";
11758+ case LANG_KYRGYZ: return "ky_KG";
11759+ case LANG_LAO: return "lo_LA";
11760+ case LANG_LATIN: return "la_VA";
11761+ case LANG_LATVIAN: return "lv_LV";
11762+ case LANG_LITHUANIAN: return "lt_LT";
11763+ case LANG_MACEDONIAN: return "mk_MK";
11764+ case LANG_MALAY:
11765+ switch (sub)
11766+ {
11767+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
11768+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
11769+ }
11770+ return "ms";
11771+ case LANG_MALAYALAM: return "ml_IN";
11772+ case LANG_MALTESE: return "mt_MT";
11773+ case LANG_MANIPURI:
11774+ /* FIXME: Adjust this when such locales appear on Unix. */
11775+ return "mni_IN";
11776+ case LANG_MARATHI: return "mr_IN";
11777+ case LANG_MONGOLIAN:
11778+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
11779+ case LANG_NEPALI:
11780+ switch (sub)
11781+ {
11782+ case SUBLANG_DEFAULT: return "ne_NP";
11783+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
11784+ }
11785+ return "ne";
11786+ case LANG_NORWEGIAN:
11787+ switch (sub)
11788+ {
11789+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
11790+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
11791+ }
11792+ return "no";
11793+ case LANG_ORIYA: return "or_IN";
11794+ case LANG_OROMO: return "om_ET";
11795+ case LANG_PAPIAMENTU: return "pap_AN";
11796+ case LANG_PASHTO:
11797+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
11798+ case LANG_POLISH: return "pl_PL";
11799+ case LANG_PORTUGUESE:
11800+ switch (sub)
11801+ {
11802+ case SUBLANG_PORTUGUESE: return "pt_PT";
11803+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
11804+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
11805+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
11806+ }
11807+ return "pt";
11808+ case LANG_PUNJABI:
11809+ switch (sub)
11810+ {
11811+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
11812+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
11813+ }
11814+ return "pa";
11815+ case LANG_RHAETO_ROMANCE: return "rm_CH";
11816+ case LANG_ROMANIAN:
11817+ switch (sub)
11818+ {
11819+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
11820+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
11821+ }
11822+ return "ro";
11823+ case LANG_RUSSIAN:
11824+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
11825+ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
11826+ case LANG_SANSKRIT: return "sa_IN";
11827+ case LANG_SINDHI:
11828+ switch (sub)
11829+ {
11830+ case SUBLANG_SINDHI_INDIA: return "sd_IN";
11831+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
11832+ }
11833+ return "sd";
11834+ case LANG_SINHALESE: return "si_LK";
11835+ case LANG_SLOVAK: return "sk_SK";
11836+ case LANG_SLOVENIAN: return "sl_SI";
11837+ case LANG_SOMALI: return "so_SO";
11838+ case LANG_SORBIAN:
11839+ /* FIXME: Adjust this when such locales appear on Unix. */
11840+ return "wen_DE";
11841+ case LANG_SPANISH:
11842+ switch (sub)
11843+ {
11844+ case SUBLANG_SPANISH: return "es_ES";
11845+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
11846+ case SUBLANG_SPANISH_MODERN:
11847+ return "es_ES@modern"; /* not seen on Unix */
11848+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
11849+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
11850+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
11851+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
11852+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
11853+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
11854+ case SUBLANG_SPANISH_PERU: return "es_PE";
11855+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
11856+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
11857+ case SUBLANG_SPANISH_CHILE: return "es_CL";
11858+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
11859+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
11860+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
11861+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
11862+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
11863+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
11864+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
11865+ }
11866+ return "es";
11867+ case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
11868+ case LANG_SWAHILI: return "sw_KE";
11869+ case LANG_SWEDISH:
11870+ switch (sub)
11871+ {
11872+ case SUBLANG_DEFAULT: return "sv_SE";
11873+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
11874+ }
11875+ return "sv";
11876+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
11877+ case LANG_TAGALOG: return "tl_PH";
11878+ case LANG_TAJIK: return "tg_TJ";
11879+ case LANG_TAMAZIGHT:
11880+ switch (sub)
11881+ {
11882+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */
11883+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
11884+ case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
11885+ }
11886+ return "ber_MA";
11887+ case LANG_TAMIL:
11888+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
11889+ case LANG_TATAR: return "tt_RU";
11890+ case LANG_TELUGU: return "te_IN";
11891+ case LANG_THAI: return "th_TH";
11892+ case LANG_TIBETAN: return "bo_CN";
11893+ case LANG_TIGRINYA:
11894+ switch (sub)
11895+ {
11896+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
11897+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
11898+ }
11899+ return "ti";
11900+ case LANG_TSONGA: return "ts_ZA";
11901+ case LANG_TSWANA: return "tn_BW";
11902+ case LANG_TURKISH: return "tr_TR";
11903+ case LANG_TURKMEN: return "tk_TM";
11904+ case LANG_UKRAINIAN: return "uk_UA";
11905+ case LANG_URDU:
11906+ switch (sub)
11907+ {
11908+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
11909+ case SUBLANG_URDU_INDIA: return "ur_IN";
11910+ }
11911+ return "ur";
11912+ case LANG_UZBEK:
11913+ switch (sub)
11914+ {
11915+ case SUBLANG_UZBEK_LATIN: return "uz_UZ";
11916+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
11917+ }
11918+ return "uz";
11919+ case LANG_VENDA: return "ve_ZA";
11920+ case LANG_VIETNAMESE: return "vi_VN";
11921+ case LANG_WELSH: return "cy_GB";
11922+ case LANG_XHOSA: return "xh_ZA";
11923+ case LANG_YI: return "sit_CN";
11924+ case LANG_YIDDISH: return "yi_IL";
11925+ case LANG_YORUBA: return "yo_NG";
11926+ case LANG_ZULU: return "zu_ZA";
11927+ default: return "C";
11928+ }
11929+
11930+#endif
11931+}
11932--- lrzsz-0.12.20.safe/intl/log.c 1969-12-31 19:00:00.000000000 -0500
11933+++ lrzsz-0.12.20/intl/log.c 2004-09-12 14:40:34.515723768 -0400
11934@@ -0,0 +1,98 @@
11935+/* Log file output.
11936+ Copyright (C) 2003 Free Software Foundation, Inc.
11937+
11938+ This program is free software; you can redistribute it and/or modify it
11939+ under the terms of the GNU Library General Public License as published
11940+ by the Free Software Foundation; either version 2, or (at your option)
11941+ any later version.
11942+
11943+ This program is distributed in the hope that it will be useful,
11944+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11945+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11946+ Library General Public License for more details.
11947+
11948+ You should have received a copy of the GNU Library General Public
11949+ License along with this program; if not, write to the Free Software
11950+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11951+ USA. */
11952+
11953+/* Written by Bruno Haible <bruno@clisp.org>. */
11954+
11955+#ifdef HAVE_CONFIG_H
11956+# include <config.h>
11957+#endif
11958+
11959+#include <stdio.h>
11960+#include <stdlib.h>
11961+#include <string.h>
11962+
11963+/* Print an ASCII string with quotes and escape sequences where needed. */
11964+static void
11965+print_escaped (FILE *stream, const char *str)
11966+{
11967+ putc ('"', stream);
11968+ for (; *str != '\0'; str++)
11969+ if (*str == '\n')
11970+ {
11971+ fputs ("\\n\"", stream);
11972+ if (str[1] == '\0')
11973+ return;
11974+ fputs ("\n\"", stream);
11975+ }
11976+ else
11977+ {
11978+ if (*str == '"' || *str == '\\')
11979+ putc ('\\', stream);
11980+ putc (*str, stream);
11981+ }
11982+ putc ('"', stream);
11983+}
11984+
11985+/* Add to the log file an entry denoting a failed translation. */
11986+void
11987+_nl_log_untranslated (const char *logfilename, const char *domainname,
11988+ const char *msgid1, const char *msgid2, int plural)
11989+{
11990+ static char *last_logfilename = NULL;
11991+ static FILE *last_logfile = NULL;
11992+ FILE *logfile;
11993+
11994+ /* Can we reuse the last opened logfile? */
11995+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
11996+ {
11997+ /* Close the last used logfile. */
11998+ if (last_logfilename != NULL)
11999+ {
12000+ if (last_logfile != NULL)
12001+ {
12002+ fclose (last_logfile);
12003+ last_logfile = NULL;
12004+ }
12005+ free (last_logfilename);
12006+ last_logfilename = NULL;
12007+ }
12008+ /* Open the logfile. */
12009+ last_logfilename = (char *) malloc (strlen (logfilename) + 1);
12010+ if (last_logfilename == NULL)
12011+ return;
12012+ strcpy (last_logfilename, logfilename);
12013+ last_logfile = fopen (logfilename, "a");
12014+ if (last_logfile == NULL)
12015+ return;
12016+ }
12017+ logfile = last_logfile;
12018+
12019+ fprintf (logfile, "domain ");
12020+ print_escaped (logfile, domainname);
12021+ fprintf (logfile, "\nmsgid ");
12022+ print_escaped (logfile, msgid1);
12023+ if (plural)
12024+ {
12025+ fprintf (logfile, "\nmsgid_plural ");
12026+ print_escaped (logfile, msgid2);
12027+ fprintf (logfile, "\nmsgstr[0] \"\"\n");
12028+ }
12029+ else
12030+ fprintf (logfile, "\nmsgstr \"\"\n");
12031+ putc ('\n', logfile);
12032+}
12033--- lrzsz-0.12.20.safe/intl/Makefile.in 1998-04-26 09:22:35.000000000 -0400
12034+++ lrzsz-0.12.20/intl/Makefile.in 2004-09-12 14:40:34.521722856 -0400
12035@@ -1,19 +1,20 @@
12036-# Makefile for directory with message catalog handling in GNU NLS Utilities.
12037-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
12038+# Makefile for directory with message catalog handling library of GNU gettext
12039+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
12040 #
12041-# This program is free software; you can redistribute it and/or modify
12042-# it under the terms of the GNU General Public License as published by
12043-# the Free Software Foundation; either version 2, or (at your option)
12044+# This program is free software; you can redistribute it and/or modify it
12045+# under the terms of the GNU Library General Public License as published
12046+# by the Free Software Foundation; either version 2, or (at your option)
12047 # any later version.
12048 #
12049 # This program is distributed in the hope that it will be useful,
12050 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12051-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12052-# GNU General Public License for more details.
12053+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12054+# Library General Public License for more details.
12055 #
12056-# You should have received a copy of the GNU General Public License
12057-# along with this program; if not, write to the Free Software
12058-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12059+# You should have received a copy of the GNU Library General Public
12060+# License along with this program; if not, write to the Free Software
12061+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12062+# USA.
12063
12064 PACKAGE = @PACKAGE@
12065 VERSION = @VERSION@
12066@@ -23,118 +24,341 @@
12067 srcdir = @srcdir@
12068 top_srcdir = @top_srcdir@
12069 top_builddir = ..
12070-VPATH = @srcdir@
12071+#VPATH = $(srcdir)
12072
12073 prefix = @prefix@
12074 exec_prefix = @exec_prefix@
12075 transform = @program_transform_name@
12076-libdir = $(exec_prefix)/lib
12077-includedir = $(prefix)/include
12078-datadir = $(prefix)/@DATADIRNAME@
12079+libdir = @libdir@
12080+includedir = @includedir@
12081+datadir = @datadir@
12082 localedir = $(datadir)/locale
12083-gnulocaledir = $(prefix)/share/locale
12084-gettextsrcdir = @datadir@/gettext/intl
12085-aliaspath = $(localedir):.
12086+gettextsrcdir = $(datadir)/gettext/intl
12087+aliaspath = $(localedir)
12088 subdir = intl
12089
12090 INSTALL = @INSTALL@
12091 INSTALL_DATA = @INSTALL_DATA@
12092 MKINSTALLDIRS = @MKINSTALLDIRS@
12093+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
12094
12095-l = @l@
12096+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
12097
12098 AR = ar
12099 CC = @CC@
12100 LIBTOOL = @LIBTOOL@
12101 RANLIB = @RANLIB@
12102+YACC = @INTLBISON@ -y -d
12103+YFLAGS = --name-prefix=__gettext
12104
12105-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
12106--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
12107+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
12108+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
12109+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
12110+-Dset_relocation_prefix=libintl_set_relocation_prefix \
12111+-Drelocate=libintl_relocate \
12112+-DDEPENDS_ON_LIBICONV=1 @DEFS@
12113 CPPFLAGS = @CPPFLAGS@
12114 CFLAGS = @CFLAGS@
12115 LDFLAGS = @LDFLAGS@
12116+LIBS = @LIBS@
12117
12118 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
12119
12120-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
12121-COMHDRS = gettext.h gettextP.h hash-string.h
12122-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
12123-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
12124-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
12125-explodename.c
12126-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
12127-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
12128-explodename.$lo
12129-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
12130-GETTOBJS = intl-compat.$lo
12131-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
12132-xopen-msg.sed $(HEADERS) $(SOURCES)
12133+HEADERS = \
12134+ gmo.h \
12135+ gettextP.h \
12136+ hash-string.h \
12137+ loadinfo.h \
12138+ plural-exp.h \
12139+ eval-plural.h \
12140+ localcharset.h \
12141+ relocatable.h \
12142+ xsize.h \
12143+ printf-args.h printf-args.c \
12144+ printf-parse.h wprintf-parse.h printf-parse.c \
12145+ vasnprintf.h vasnwprintf.h vasnprintf.c \
12146+ os2compat.h \
12147+ libgnuintl.h.in
12148+SOURCES = \
12149+ bindtextdom.c \
12150+ dcgettext.c \
12151+ dgettext.c \
12152+ gettext.c \
12153+ finddomain.c \
12154+ loadmsgcat.c \
12155+ localealias.c \
12156+ textdomain.c \
12157+ l10nflist.c \
12158+ explodename.c \
12159+ dcigettext.c \
12160+ dcngettext.c \
12161+ dngettext.c \
12162+ ngettext.c \
12163+ plural.y \
12164+ plural-exp.c \
12165+ localcharset.c \
12166+ relocatable.c \
12167+ localename.c \
12168+ log.c \
12169+ printf.c \
12170+ osdep.c \
12171+ os2compat.c \
12172+ intl-compat.c
12173+OBJECTS = \
12174+ bindtextdom.$lo \
12175+ dcgettext.$lo \
12176+ dgettext.$lo \
12177+ gettext.$lo \
12178+ finddomain.$lo \
12179+ loadmsgcat.$lo \
12180+ localealias.$lo \
12181+ textdomain.$lo \
12182+ l10nflist.$lo \
12183+ explodename.$lo \
12184+ dcigettext.$lo \
12185+ dcngettext.$lo \
12186+ dngettext.$lo \
12187+ ngettext.$lo \
12188+ plural.$lo \
12189+ plural-exp.$lo \
12190+ localcharset.$lo \
12191+ relocatable.$lo \
12192+ localename.$lo \
12193+ log.$lo \
12194+ printf.$lo \
12195+ osdep.$lo \
12196+ intl-compat.$lo
12197+DISTFILES.common = Makefile.in \
12198+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
12199+DISTFILES.generated = plural.c
12200 DISTFILES.normal = VERSION
12201-DISTFILES.gettext = libintl.glibc intlh.inst.in
12202+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
12203+libgnuintl.h_vms Makefile.vms \
12204+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
12205+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
12206+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
12207+
12208+all: all-@USE_INCLUDED_LIBINTL@
12209+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
12210+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
12211+all-no-yes: libgnuintl.$la
12212+all-no-no:
12213+
12214+libintl.a libgnuintl.a: $(OBJECTS)
12215+ rm -f $@
12216+ $(AR) cru $@ $(OBJECTS)
12217+ $(RANLIB) $@
12218+
12219+libintl.la libgnuintl.la: $(OBJECTS)
12220+ $(LIBTOOL) --mode=link \
12221+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
12222+ $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
12223+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
12224+ -rpath $(libdir) \
12225+ -no-undefined
12226+
12227+# Libtool's library version information for libintl.
12228+# Before making a gettext release, the gettext maintainer must change this
12229+# according to the libtool documentation, section "Library interface versions".
12230+# Maintainers of other packages that include the intl directory must *not*
12231+# change these values.
12232+LTV_CURRENT=7
12233+LTV_REVISION=0
12234+LTV_AGE=4
12235
12236 .SUFFIXES:
12237-.SUFFIXES: .c .o .lo
12238+.SUFFIXES: .c .y .o .lo .sin .sed
12239+
12240 .c.o:
12241 $(COMPILE) $<
12242-.c.lo:
12243- $(LIBTOOL) --mode=compile $(COMPILE) $<
12244
12245-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
12246+.y.c:
12247+ $(YACC) $(YFLAGS) --output $@ $<
12248+ rm -f $*.h
12249
12250-all: all-@USE_INCLUDED_LIBINTL@
12251+bindtextdom.lo: $(srcdir)/bindtextdom.c
12252+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
12253+dcgettext.lo: $(srcdir)/dcgettext.c
12254+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
12255+dgettext.lo: $(srcdir)/dgettext.c
12256+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
12257+gettext.lo: $(srcdir)/gettext.c
12258+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
12259+finddomain.lo: $(srcdir)/finddomain.c
12260+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
12261+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
12262+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
12263+localealias.lo: $(srcdir)/localealias.c
12264+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
12265+textdomain.lo: $(srcdir)/textdomain.c
12266+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
12267+l10nflist.lo: $(srcdir)/l10nflist.c
12268+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
12269+explodename.lo: $(srcdir)/explodename.c
12270+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
12271+dcigettext.lo: $(srcdir)/dcigettext.c
12272+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
12273+dcngettext.lo: $(srcdir)/dcngettext.c
12274+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
12275+dngettext.lo: $(srcdir)/dngettext.c
12276+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
12277+ngettext.lo: $(srcdir)/ngettext.c
12278+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
12279+plural.lo: $(srcdir)/plural.c
12280+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
12281+plural-exp.lo: $(srcdir)/plural-exp.c
12282+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
12283+localcharset.lo: $(srcdir)/localcharset.c
12284+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
12285+relocatable.lo: $(srcdir)/relocatable.c
12286+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
12287+localename.lo: $(srcdir)/localename.c
12288+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
12289+log.lo: $(srcdir)/log.c
12290+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
12291+printf.lo: $(srcdir)/printf.c
12292+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
12293+osdep.lo: $(srcdir)/osdep.c
12294+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
12295+intl-compat.lo: $(srcdir)/intl-compat.c
12296+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
12297
12298-all-yes: libintl.$la intlh.inst
12299-all-no:
12300+ref-add.sed: $(srcdir)/ref-add.sin
12301+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
12302+ mv t-ref-add.sed ref-add.sed
12303+ref-del.sed: $(srcdir)/ref-del.sin
12304+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
12305+ mv t-ref-del.sed ref-del.sed
12306
12307-libintl.a: $(OBJECTS)
12308- rm -f $@
12309- $(AR) cru $@ $(OBJECTS)
12310- $(RANLIB) $@
12311+INCLUDES = -I. -I$(srcdir) -I..
12312
12313-libintl.la: $(OBJECTS)
12314- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
12315- -version-info 1:0 -rpath $(libdir)
12316+libgnuintl.h: $(srcdir)/libgnuintl.h.in
12317+ sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
12318+ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
12319+ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
12320+ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
12321+ < $(srcdir)/libgnuintl.h.in > libgnuintl.h
12322
12323-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
12324- cd ../po && $(MAKE) cat-id-tbl.$lo
12325+libintl.h: libgnuintl.h
12326+ cp libgnuintl.h libintl.h
12327
12328-check: all
12329+charset.alias: $(srcdir)/config.charset
12330+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
12331+ mv t-$@ $@
12332
12333-# This installation goal is only used in GNU gettext. Packages which
12334-# only use the library should use install instead.
12335+check: all
12336
12337 # We must not install the libintl.h/libintl.a files if we are on a
12338-# system which has the gettext() function in its C library or in a
12339-# separate library or use the catgets interface. A special case is
12340-# where configure found a previously installed GNU gettext library.
12341+# system which has the GNU gettext() function in its C library or in a
12342+# separate library.
12343 # If you want to use the one which comes with this version of the
12344 # package, you have to use `configure --with-included-gettext'.
12345 install: install-exec install-data
12346 install-exec: all
12347- if test "$(PACKAGE)" = "gettext" \
12348- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
12349- if test -r $(MKINSTALLDIRS); then \
12350- $(MKINSTALLDIRS) $(libdir) $(includedir); \
12351- else \
12352- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
12353+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12354+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12355+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12356+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
12357+ $(LIBTOOL) --mode=install \
12358+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
12359+ if test "@RELOCATABLE@" = yes; then \
12360+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
12361+ if test -n "$$dependencies"; then \
12362+ rm -f $(DESTDIR)$(libdir)/libintl.la; \
12363+ fi; \
12364 fi; \
12365- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
12366- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
12367 else \
12368 : ; \
12369 fi
12370-install-data: all
12371- if test "$(PACKAGE)" = "gettext"; then \
12372- if test -r $(MKINSTALLDIRS); then \
12373- $(MKINSTALLDIRS) $(gettextsrcdir); \
12374+ if test "$(PACKAGE)" = "gettext-tools" \
12375+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12376+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12377+ $(LIBTOOL) --mode=install \
12378+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
12379+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12380+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12381+ $(LIBTOOL) --mode=uninstall \
12382+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
12383+ else \
12384+ : ; \
12385+ fi
12386+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12387+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12388+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12389+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12390+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12391+ orig=$(DESTDIR)$(libdir)/charset.alias; \
12392+ sed -f ref-add.sed $$orig > $$temp; \
12393+ $(INSTALL_DATA) $$temp $$dest; \
12394+ rm -f $$temp; \
12395 else \
12396- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
12397+ if test @GLIBC21@ = no; then \
12398+ orig=charset.alias; \
12399+ sed -f ref-add.sed $$orig > $$temp; \
12400+ $(INSTALL_DATA) $$temp $$dest; \
12401+ rm -f $$temp; \
12402+ fi; \
12403 fi; \
12404- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
12405- dists="$(DISTFILES.common)"; \
12406+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12407+ test -f $(DESTDIR)$(localedir)/locale.alias \
12408+ && orig=$(DESTDIR)$(localedir)/locale.alias \
12409+ || orig=$(srcdir)/locale.alias; \
12410+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12411+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12412+ sed -f ref-add.sed $$orig > $$temp; \
12413+ $(INSTALL_DATA) $$temp $$dest; \
12414+ rm -f $$temp; \
12415+ else \
12416+ : ; \
12417+ fi
12418+install-data: all
12419+ if test "$(PACKAGE)" = "gettext-tools"; then \
12420+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12421+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
12422+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
12423+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
12424 for file in $$dists; do \
12425- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
12426+ $(INSTALL_DATA) $(srcdir)/$$file \
12427+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12428 done; \
12429+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
12430+ dists="$(DISTFILES.generated)"; \
12431+ for file in $$dists; do \
12432+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12433+ $(INSTALL_DATA) $$dir/$$file \
12434+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12435+ done; \
12436+ dists="$(DISTFILES.obsolete)"; \
12437+ for file in $$dists; do \
12438+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12439+ done; \
12440+ else \
12441+ : ; \
12442+ fi
12443+
12444+install-strip: install
12445+
12446+installdirs:
12447+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12448+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12449+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12450+ else \
12451+ : ; \
12452+ fi
12453+ if test "$(PACKAGE)" = "gettext-tools" \
12454+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12455+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12456+ else \
12457+ : ; \
12458+ fi
12459+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12460+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12461+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12462+ else \
12463+ : ; \
12464+ fi
12465+ if test "$(PACKAGE)" = "gettext-tools"; then \
12466+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12467 else \
12468 : ; \
12469 fi
12470@@ -143,22 +367,76 @@
12471 installcheck:
12472
12473 uninstall:
12474- dists="$(DISTFILES.common)"; \
12475- for file in $$dists; do \
12476- rm -f $(gettextsrcdir)/$$file; \
12477- done
12478+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12479+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12480+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
12481+ $(LIBTOOL) --mode=uninstall \
12482+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
12483+ else \
12484+ : ; \
12485+ fi
12486+ if test "$(PACKAGE)" = "gettext-tools" \
12487+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12488+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12489+ else \
12490+ : ; \
12491+ fi
12492+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12493+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12494+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12495+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12496+ sed -f ref-del.sed $$dest > $$temp; \
12497+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12498+ rm -f $$dest; \
12499+ else \
12500+ $(INSTALL_DATA) $$temp $$dest; \
12501+ fi; \
12502+ rm -f $$temp; \
12503+ fi; \
12504+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
12505+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12506+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12507+ sed -f ref-del.sed $$dest > $$temp; \
12508+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12509+ rm -f $$dest; \
12510+ else \
12511+ $(INSTALL_DATA) $$temp $$dest; \
12512+ fi; \
12513+ rm -f $$temp; \
12514+ fi; \
12515+ else \
12516+ : ; \
12517+ fi
12518+ if test "$(PACKAGE)" = "gettext-tools"; then \
12519+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
12520+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12521+ done; \
12522+ else \
12523+ : ; \
12524+ fi
12525
12526-info dvi:
12527+info dvi ps pdf html:
12528
12529-$(OBJECTS): ../config.h libgettext.h
12530-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
12531-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
12532+$(OBJECTS): ../config.h libgnuintl.h
12533+bindtextdom.$lo dcgettext.$lo dcigettext.$lo dcngettext.$lo dgettext.$lo dngettext.$lo finddomain.$lo gettext.$lo intl-compat.$lo loadmsgcat.$lo localealias.$lo ngettext.$lo textdomain.$lo: $(srcdir)/gettextP.h $(srcdir)/gmo.h $(srcdir)/loadinfo.h
12534+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
12535+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
12536+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
12537+dcigettext.$lo: $(srcdir)/eval-plural.h
12538+localcharset.$lo: $(srcdir)/localcharset.h
12539+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
12540+printf.$lo: $(srcdir)/printf-args.h $(srcdir)/printf-args.c $(srcdir)/printf-parse.h $(srcdir)/wprintf-parse.h $(srcdir)/xsize.h $(srcdir)/printf-parse.c $(srcdir)/vasnprintf.h $(srcdir)/vasnwprintf.h $(srcdir)/vasnprintf.c
12541
12542 tags: TAGS
12543
12544 TAGS: $(HEADERS) $(SOURCES)
12545 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
12546
12547+ctags: CTAGS
12548+
12549+CTAGS: $(HEADERS) $(SOURCES)
12550+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
12551+
12552 id: ID
12553
12554 ID: $(HEADERS) $(SOURCES)
12555@@ -166,12 +444,19 @@
12556
12557
12558 mostlyclean:
12559- rm -f *.a *.o *.lo core core.*
12560+ rm -f *.a *.la *.o *.obj *.lo core core.*
12561+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
12562+ rm -f -r .libs _libs
12563
12564 clean: mostlyclean
12565
12566 distclean: clean
12567- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
12568+ rm -f Makefile ID TAGS
12569+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
12570+ rm -f ChangeLog.inst $(DISTFILES.normal); \
12571+ else \
12572+ : ; \
12573+ fi
12574
12575 maintainer-clean: distclean
12576 @echo "This command is intended for maintainers to use;"
12577@@ -181,33 +466,27 @@
12578 # GNU gettext needs not contain the file `VERSION' but contains some
12579 # other files which should not be distributed in other packages.
12580 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
12581-dist distdir: Makefile $(DISTFILES)
12582- if test "$(PACKAGE)" = gettext; then \
12583- additional="$(DISTFILES.gettext)"; \
12584+dist distdir: Makefile
12585+ if test "$(PACKAGE)" = "gettext-tools"; then \
12586+ : ; \
12587 else \
12588- additional="$(DISTFILES.normal)"; \
12589- fi; \
12590- for file in $(DISTFILES.common) $$additional; do \
12591- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
12592- || cp -p $(srcdir)/$$file $(distdir); \
12593- done
12594-
12595-dist-libc:
12596- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
12597-
12598-Makefile: Makefile.in ../config.status
12599- cd .. \
12600- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12601+ if test "$(PACKAGE)" = "gettext-runtime"; then \
12602+ additional="$(DISTFILES.gettext)"; \
12603+ else \
12604+ additional="$(DISTFILES.normal)"; \
12605+ fi; \
12606+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
12607+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
12608+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12609+ cp -p $$dir/$$file $(distdir); \
12610+ done; \
12611+ fi
12612
12613-# The dependency for intlh.inst is different in gettext and all other
12614-# packages. Because we cannot you GNU make features we have to solve
12615-# the problem while rewriting Makefile.in.
12616-@GT_YES@intlh.inst: intlh.inst.in ../config.status
12617-@GT_YES@ cd .. \
12618-@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
12619-@GT_YES@ $(SHELL) ./config.status
12620-@GT_NO@.PHONY: intlh.inst
12621-@GT_NO@intlh.inst:
12622+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
12623+ cd $(top_builddir) && $(SHELL) ./config.status
12624+# This would be more efficient, but doesn't work any more with autoconf-2.57,
12625+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
12626+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12627
12628 # Tell versions [3.59,3.63) of GNU make not to export all variables.
12629 # Otherwise a system limit (for SysV at least) may be exceeded.
12630--- lrzsz-0.12.20.safe/intl/ngettext.c 1969-12-31 19:00:00.000000000 -0500
12631+++ lrzsz-0.12.20/intl/ngettext.c 2004-09-12 14:40:34.533721032 -0400
12632@@ -0,0 +1,65 @@
12633+/* Implementation of ngettext(3) function.
12634+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
12635+
12636+ This program is free software; you can redistribute it and/or modify it
12637+ under the terms of the GNU Library General Public License as published
12638+ by the Free Software Foundation; either version 2, or (at your option)
12639+ any later version.
12640+
12641+ This program is distributed in the hope that it will be useful,
12642+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12643+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12644+ Library General Public License for more details.
12645+
12646+ You should have received a copy of the GNU Library General Public
12647+ License along with this program; if not, write to the Free Software
12648+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12649+ USA. */
12650+
12651+#ifdef HAVE_CONFIG_H
12652+# include <config.h>
12653+#endif
12654+
12655+#ifdef _LIBC
12656+# define __need_NULL
12657+# include <stddef.h>
12658+#else
12659+# include <stdlib.h> /* Just for NULL. */
12660+#endif
12661+
12662+#include "gettextP.h"
12663+#ifdef _LIBC
12664+# include <libintl.h>
12665+#else
12666+# include "libgnuintl.h"
12667+#endif
12668+
12669+#include <locale.h>
12670+
12671+/* @@ end of prolog @@ */
12672+
12673+/* Names for the libintl functions are a problem. They must not clash
12674+ with existing names and they should follow ANSI C. But this source
12675+ code is also used in GNU C Library where the names have a __
12676+ prefix. So we have to make a difference here. */
12677+#ifdef _LIBC
12678+# define NGETTEXT __ngettext
12679+# define DCNGETTEXT __dcngettext
12680+#else
12681+# define NGETTEXT libintl_ngettext
12682+# define DCNGETTEXT libintl_dcngettext
12683+#endif
12684+
12685+/* Look up MSGID in the current default message catalog for the current
12686+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
12687+ text). */
12688+char *
12689+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
12690+{
12691+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
12692+}
12693+
12694+#ifdef _LIBC
12695+/* Alias for function name in GNU C Library. */
12696+weak_alias (__ngettext, ngettext);
12697+#endif
12698--- lrzsz-0.12.20.safe/intl/os2compat.c 1969-12-31 19:00:00.000000000 -0500
12699+++ lrzsz-0.12.20/intl/os2compat.c 2004-09-12 14:40:34.539720120 -0400
12700@@ -0,0 +1,98 @@
12701+/* OS/2 compatibility functions.
12702+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12703+
12704+ This program is free software; you can redistribute it and/or modify it
12705+ under the terms of the GNU Library General Public License as published
12706+ by the Free Software Foundation; either version 2, or (at your option)
12707+ any later version.
12708+
12709+ This program is distributed in the hope that it will be useful,
12710+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12711+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12712+ Library General Public License for more details.
12713+
12714+ You should have received a copy of the GNU Library General Public
12715+ License along with this program; if not, write to the Free Software
12716+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12717+ USA. */
12718+
12719+#define OS2_AWARE
12720+#ifdef HAVE_CONFIG_H
12721+#include <config.h>
12722+#endif
12723+
12724+#include <stdlib.h>
12725+#include <string.h>
12726+#include <sys/param.h>
12727+
12728+/* A version of getenv() that works from DLLs */
12729+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
12730+
12731+char *
12732+_nl_getenv (const char *name)
12733+{
12734+ unsigned char *value;
12735+ if (DosScanEnv (name, &value))
12736+ return NULL;
12737+ else
12738+ return value;
12739+}
12740+
12741+/* A fixed size buffer. */
12742+char libintl_nl_default_dirname[MAXPATHLEN+1];
12743+
12744+char *_nlos2_libdir = NULL;
12745+char *_nlos2_localealiaspath = NULL;
12746+char *_nlos2_localedir = NULL;
12747+
12748+static __attribute__((constructor)) void
12749+nlos2_initialize ()
12750+{
12751+ char *root = getenv ("UNIXROOT");
12752+ char *gnulocaledir = getenv ("GNULOCALEDIR");
12753+
12754+ _nlos2_libdir = gnulocaledir;
12755+ if (!_nlos2_libdir)
12756+ {
12757+ if (root)
12758+ {
12759+ size_t sl = strlen (root);
12760+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
12761+ memcpy (_nlos2_libdir, root, sl);
12762+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
12763+ }
12764+ else
12765+ _nlos2_libdir = LIBDIR;
12766+ }
12767+
12768+ _nlos2_localealiaspath = gnulocaledir;
12769+ if (!_nlos2_localealiaspath)
12770+ {
12771+ if (root)
12772+ {
12773+ size_t sl = strlen (root);
12774+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
12775+ memcpy (_nlos2_localealiaspath, root, sl);
12776+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
12777+ }
12778+ else
12779+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
12780+ }
12781+
12782+ _nlos2_localedir = gnulocaledir;
12783+ if (!_nlos2_localedir)
12784+ {
12785+ if (root)
12786+ {
12787+ size_t sl = strlen (root);
12788+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
12789+ memcpy (_nlos2_localedir, root, sl);
12790+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
12791+ }
12792+ else
12793+ _nlos2_localedir = LOCALEDIR;
12794+ }
12795+
12796+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
12797+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
12798+}
12799--- lrzsz-0.12.20.safe/intl/os2compat.h 1969-12-31 19:00:00.000000000 -0500
12800+++ lrzsz-0.12.20/intl/os2compat.h 2004-09-12 14:40:34.544719360 -0400
12801@@ -0,0 +1,46 @@
12802+/* OS/2 compatibility defines.
12803+ This file is intended to be included from config.h
12804+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12805+
12806+ This program is free software; you can redistribute it and/or modify it
12807+ under the terms of the GNU Library General Public License as published
12808+ by the Free Software Foundation; either version 2, or (at your option)
12809+ any later version.
12810+
12811+ This program is distributed in the hope that it will be useful,
12812+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12813+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12814+ Library General Public License for more details.
12815+
12816+ You should have received a copy of the GNU Library General Public
12817+ License along with this program; if not, write to the Free Software
12818+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12819+ USA. */
12820+
12821+/* When included from os2compat.h we need all the original definitions */
12822+#ifndef OS2_AWARE
12823+
12824+#undef LIBDIR
12825+#define LIBDIR _nlos2_libdir
12826+extern char *_nlos2_libdir;
12827+
12828+#undef LOCALEDIR
12829+#define LOCALEDIR _nlos2_localedir
12830+extern char *_nlos2_localedir;
12831+
12832+#undef LOCALE_ALIAS_PATH
12833+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
12834+extern char *_nlos2_localealiaspath;
12835+
12836+#endif
12837+
12838+#undef HAVE_STRCASECMP
12839+#define HAVE_STRCASECMP 1
12840+#define strcasecmp stricmp
12841+#define strncasecmp strnicmp
12842+
12843+/* We have our own getenv() which works even if library is compiled as DLL */
12844+#define getenv _nl_getenv
12845+
12846+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
12847+#define LC_MESSAGES_COMPAT (-1)
12848--- lrzsz-0.12.20.safe/intl/osdep.c 1969-12-31 19:00:00.000000000 -0500
12849+++ lrzsz-0.12.20/intl/osdep.c 2004-09-12 14:40:34.550718448 -0400
12850@@ -0,0 +1,24 @@
12851+/* OS dependent parts of libintl.
12852+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12853+
12854+ This program is free software; you can redistribute it and/or modify it
12855+ under the terms of the GNU Library General Public License as published
12856+ by the Free Software Foundation; either version 2, or (at your option)
12857+ any later version.
12858+
12859+ This program is distributed in the hope that it will be useful,
12860+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12861+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12862+ Library General Public License for more details.
12863+
12864+ You should have received a copy of the GNU Library General Public
12865+ License along with this program; if not, write to the Free Software
12866+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12867+ USA. */
12868+
12869+#if defined __EMX__
12870+# include "os2compat.c"
12871+#else
12872+/* Avoid AIX compiler warning. */
12873+typedef int dummy;
12874+#endif
12875--- lrzsz-0.12.20.safe/intl/plural.c 1969-12-31 19:00:00.000000000 -0500
12876+++ lrzsz-0.12.20/intl/plural.c 2004-09-12 14:40:36.571411256 -0400
12877@@ -0,0 +1,1490 @@
12878+/* A Bison parser, made from plural.y
12879+ by GNU bison 1.35. */
12880+
12881+#define YYBISON 1 /* Identify Bison output. */
12882+
12883+#define yyparse __gettextparse
12884+#define yylex __gettextlex
12885+#define yyerror __gettexterror
12886+#define yylval __gettextlval
12887+#define yychar __gettextchar
12888+#define yydebug __gettextdebug
12889+#define yynerrs __gettextnerrs
12890+# define EQUOP2 257
12891+# define CMPOP2 258
12892+# define ADDOP2 259
12893+# define MULOP2 260
12894+# define NUMBER 261
12895+
12896+#line 1 "plural.y"
12897+
12898+/* Expression parsing for plural form selection.
12899+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
12900+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
12901+
12902+ This program is free software; you can redistribute it and/or modify it
12903+ under the terms of the GNU Library General Public License as published
12904+ by the Free Software Foundation; either version 2, or (at your option)
12905+ any later version.
12906+
12907+ This program is distributed in the hope that it will be useful,
12908+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12909+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12910+ Library General Public License for more details.
12911+
12912+ You should have received a copy of the GNU Library General Public
12913+ License along with this program; if not, write to the Free Software
12914+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12915+ USA. */
12916+
12917+/* The bison generated parser uses alloca. AIX 3 forces us to put this
12918+ declaration at the beginning of the file. The declaration in bison's
12919+ skeleton file comes too late. This must come before <config.h>
12920+ because <config.h> may include arbitrary system headers. */
12921+#if defined _AIX && !defined __GNUC__
12922+ #pragma alloca
12923+#endif
12924+
12925+#ifdef HAVE_CONFIG_H
12926+# include <config.h>
12927+#endif
12928+
12929+#include <stddef.h>
12930+#include <stdlib.h>
12931+#include "plural-exp.h"
12932+
12933+/* The main function generated by the parser is called __gettextparse,
12934+ but we want it to be called PLURAL_PARSE. */
12935+#ifndef _LIBC
12936+# define __gettextparse PLURAL_PARSE
12937+#endif
12938+
12939+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
12940+#define YYPARSE_PARAM arg
12941+
12942+#line 49 "plural.y"
12943+#ifndef YYSTYPE
12944+typedef union {
12945+ unsigned long int num;
12946+ enum operator op;
12947+ struct expression *exp;
12948+} yystype;
12949+# define YYSTYPE yystype
12950+# define YYSTYPE_IS_TRIVIAL 1
12951+#endif
12952+#line 55 "plural.y"
12953+
12954+/* Prototypes for local functions. */
12955+static int yylex (YYSTYPE *lval, const char **pexp);
12956+static void yyerror (const char *str);
12957+
12958+/* Allocation of expressions. */
12959+
12960+static struct expression *
12961+new_exp (int nargs, enum operator op, struct expression * const *args)
12962+{
12963+ int i;
12964+ struct expression *newp;
12965+
12966+ /* If any of the argument could not be malloc'ed, just return NULL. */
12967+ for (i = nargs - 1; i >= 0; i--)
12968+ if (args[i] == NULL)
12969+ goto fail;
12970+
12971+ /* Allocate a new expression. */
12972+ newp = (struct expression *) malloc (sizeof (*newp));
12973+ if (newp != NULL)
12974+ {
12975+ newp->nargs = nargs;
12976+ newp->operation = op;
12977+ for (i = nargs - 1; i >= 0; i--)
12978+ newp->val.args[i] = args[i];
12979+ return newp;
12980+ }
12981+
12982+ fail:
12983+ for (i = nargs - 1; i >= 0; i--)
12984+ FREE_EXPRESSION (args[i]);
12985+
12986+ return NULL;
12987+}
12988+
12989+static inline struct expression *
12990+new_exp_0 (enum operator op)
12991+{
12992+ return new_exp (0, op, NULL);
12993+}
12994+
12995+static inline struct expression *
12996+new_exp_1 (enum operator op, struct expression *right)
12997+{
12998+ struct expression *args[1];
12999+
13000+ args[0] = right;
13001+ return new_exp (1, op, args);
13002+}
13003+
13004+static struct expression *
13005+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
13006+{
13007+ struct expression *args[2];
13008+
13009+ args[0] = left;
13010+ args[1] = right;
13011+ return new_exp (2, op, args);
13012+}
13013+
13014+static inline struct expression *
13015+new_exp_3 (enum operator op, struct expression *bexp,
13016+ struct expression *tbranch, struct expression *fbranch)
13017+{
13018+ struct expression *args[3];
13019+
13020+ args[0] = bexp;
13021+ args[1] = tbranch;
13022+ args[2] = fbranch;
13023+ return new_exp (3, op, args);
13024+}
13025+
13026+#ifndef YYDEBUG
13027+# define YYDEBUG 0
13028+#endif
13029+
13030+
13031+
13032+#define YYFINAL 27
13033+#define YYFLAG -32768
13034+#define YYNTBASE 16
13035+
13036+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
13037+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
13038+
13039+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
13040+static const char yytranslate[] =
13041+{
13042+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13043+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13044+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13045+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
13046+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
13047+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
13048+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
13049+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13050+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13051+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13052+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13053+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13054+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
13055+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13056+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13057+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13058+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13059+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13060+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13061+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13062+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13063+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13064+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13065+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13066+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13067+ 2, 2, 2, 2, 2, 2, 1, 6, 7, 8,
13068+ 9, 11
13069+};
13070+
13071+#if YYDEBUG
13072+static const short yyprhs[] =
13073+{
13074+ 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
13075+ 35, 37, 39
13076+};
13077+static const short yyrhs[] =
13078+{
13079+ 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
13080+ 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
13081+ 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
13082+ 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
13083+ 17, 15, 0
13084+};
13085+
13086+#endif
13087+
13088+#if YYDEBUG
13089+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
13090+static const short yyrline[] =
13091+{
13092+ 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
13093+ 190, 194, 199
13094+};
13095+#endif
13096+
13097+
13098+#if (YYDEBUG) || defined YYERROR_VERBOSE
13099+
13100+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
13101+static const char *const yytname[] =
13102+{
13103+ "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
13104+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
13105+ "start", "exp", 0
13106+};
13107+#endif
13108+
13109+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
13110+static const short yyr1[] =
13111+{
13112+ 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
13113+ 17, 17, 17
13114+};
13115+
13116+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
13117+static const short yyr2[] =
13118+{
13119+ 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
13120+ 1, 1, 3
13121+};
13122+
13123+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
13124+ doesn't specify something else to do. Zero means the default is an
13125+ error. */
13126+static const short yydefact[] =
13127+{
13128+ 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
13129+ 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
13130+ 6, 7, 8, 0, 2, 0, 0, 0
13131+};
13132+
13133+static const short yydefgoto[] =
13134+{
13135+ 25, 5
13136+};
13137+
13138+static const short yypact[] =
13139+{
13140+ -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
13141+ -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
13142+ 26, -3,-32768, -9, 34, 21, 53,-32768
13143+};
13144+
13145+static const short yypgoto[] =
13146+{
13147+ -32768, -1
13148+};
13149+
13150+
13151+#define YYLAST 53
13152+
13153+
13154+static const short yytable[] =
13155+{
13156+ 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
13157+ 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
13158+ 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
13159+ 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
13160+ 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
13161+ 12, 13, 14, 27
13162+};
13163+
13164+static const short yycheck[] =
13165+{
13166+ 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
13167+ 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
13168+ 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
13169+ 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
13170+ 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
13171+ 7, 8, 9, 0
13172+};
13173+#define YYPURE 1
13174+
13175+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
13176+#line 3 "/usr/local/share/bison/bison.simple"
13177+
13178+/* Skeleton output parser for bison,
13179+
13180+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
13181+ Foundation, Inc.
13182+
13183+ This program is free software; you can redistribute it and/or modify
13184+ it under the terms of the GNU General Public License as published by
13185+ the Free Software Foundation; either version 2, or (at your option)
13186+ any later version.
13187+
13188+ This program is distributed in the hope that it will be useful,
13189+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13190+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13191+ GNU General Public License for more details.
13192+
13193+ You should have received a copy of the GNU General Public License
13194+ along with this program; if not, write to the Free Software
13195+ Foundation, Inc., 59 Temple Place - Suite 330,
13196+ Boston, MA 02111-1307, USA. */
13197+
13198+/* As a special exception, when this file is copied by Bison into a
13199+ Bison output file, you may use that output file without restriction.
13200+ This special exception was added by the Free Software Foundation
13201+ in version 1.24 of Bison. */
13202+
13203+/* This is the parser code that is written into each bison parser when
13204+ the %semantic_parser declaration is not specified in the grammar.
13205+ It was written by Richard Stallman by simplifying the hairy parser
13206+ used when %semantic_parser is specified. */
13207+
13208+/* All symbols defined below should begin with yy or YY, to avoid
13209+ infringing on user name space. This should be done even for local
13210+ variables, as they might otherwise be expanded by user macros.
13211+ There are some unavoidable exceptions within include files to
13212+ define necessary library symbols; they are noted "INFRINGES ON
13213+ USER NAME SPACE" below. */
13214+
13215+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
13216+
13217+/* The parser invokes alloca or malloc; define the necessary symbols. */
13218+
13219+# if YYSTACK_USE_ALLOCA
13220+# define YYSTACK_ALLOC alloca
13221+# else
13222+# ifndef YYSTACK_USE_ALLOCA
13223+# if defined (alloca) || defined (_ALLOCA_H)
13224+# define YYSTACK_ALLOC alloca
13225+# else
13226+# ifdef __GNUC__
13227+# define YYSTACK_ALLOC __builtin_alloca
13228+# endif
13229+# endif
13230+# endif
13231+# endif
13232+
13233+# ifdef YYSTACK_ALLOC
13234+ /* Pacify GCC's `empty if-body' warning. */
13235+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
13236+# else
13237+# if defined (__STDC__) || defined (__cplusplus)
13238+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
13239+# define YYSIZE_T size_t
13240+# endif
13241+# define YYSTACK_ALLOC malloc
13242+# define YYSTACK_FREE free
13243+# endif
13244+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
13245+
13246+
13247+#if (! defined (yyoverflow) \
13248+ && (! defined (__cplusplus) \
13249+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
13250+
13251+/* A type that is properly aligned for any stack member. */
13252+union yyalloc
13253+{
13254+ short yyss;
13255+ YYSTYPE yyvs;
13256+# if YYLSP_NEEDED
13257+ YYLTYPE yyls;
13258+# endif
13259+};
13260+
13261+/* The size of the maximum gap between one aligned stack and the next. */
13262+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
13263+
13264+/* The size of an array large to enough to hold all stacks, each with
13265+ N elements. */
13266+# if YYLSP_NEEDED
13267+# define YYSTACK_BYTES(N) \
13268+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
13269+ + 2 * YYSTACK_GAP_MAX)
13270+# else
13271+# define YYSTACK_BYTES(N) \
13272+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
13273+ + YYSTACK_GAP_MAX)
13274+# endif
13275+
13276+/* Copy COUNT objects from FROM to TO. The source and destination do
13277+ not overlap. */
13278+# ifndef YYCOPY
13279+# if 1 < __GNUC__
13280+# define YYCOPY(To, From, Count) \
13281+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
13282+# else
13283+# define YYCOPY(To, From, Count) \
13284+ do \
13285+ { \
13286+ register YYSIZE_T yyi; \
13287+ for (yyi = 0; yyi < (Count); yyi++) \
13288+ (To)[yyi] = (From)[yyi]; \
13289+ } \
13290+ while (0)
13291+# endif
13292+# endif
13293+
13294+/* Relocate STACK from its old location to the new one. The
13295+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
13296+ elements in the stack, and YYPTR gives the new location of the
13297+ stack. Advance YYPTR to a properly aligned location for the next
13298+ stack. */
13299+# define YYSTACK_RELOCATE(Stack) \
13300+ do \
13301+ { \
13302+ YYSIZE_T yynewbytes; \
13303+ YYCOPY (&yyptr->Stack, Stack, yysize); \
13304+ Stack = &yyptr->Stack; \
13305+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
13306+ yyptr += yynewbytes / sizeof (*yyptr); \
13307+ } \
13308+ while (0)
13309+
13310+#endif
13311+
13312+
13313+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
13314+# define YYSIZE_T __SIZE_TYPE__
13315+#endif
13316+#if ! defined (YYSIZE_T) && defined (size_t)
13317+# define YYSIZE_T size_t
13318+#endif
13319+#if ! defined (YYSIZE_T)
13320+# if defined (__STDC__) || defined (__cplusplus)
13321+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
13322+# define YYSIZE_T size_t
13323+# endif
13324+#endif
13325+#if ! defined (YYSIZE_T)
13326+# define YYSIZE_T unsigned int
13327+#endif
13328+
13329+#define yyerrok (yyerrstatus = 0)
13330+#define yyclearin (yychar = YYEMPTY)
13331+#define YYEMPTY -2
13332+#define YYEOF 0
13333+#define YYACCEPT goto yyacceptlab
13334+#define YYABORT goto yyabortlab
13335+#define YYERROR goto yyerrlab1
13336+/* Like YYERROR except do call yyerror. This remains here temporarily
13337+ to ease the transition to the new meaning of YYERROR, for GCC.
13338+ Once GCC version 2 has supplanted version 1, this can go. */
13339+#define YYFAIL goto yyerrlab
13340+#define YYRECOVERING() (!!yyerrstatus)
13341+#define YYBACKUP(Token, Value) \
13342+do \
13343+ if (yychar == YYEMPTY && yylen == 1) \
13344+ { \
13345+ yychar = (Token); \
13346+ yylval = (Value); \
13347+ yychar1 = YYTRANSLATE (yychar); \
13348+ YYPOPSTACK; \
13349+ goto yybackup; \
13350+ } \
13351+ else \
13352+ { \
13353+ yyerror ("syntax error: cannot back up"); \
13354+ YYERROR; \
13355+ } \
13356+while (0)
13357+
13358+#define YYTERROR 1
13359+#define YYERRCODE 256
13360+
13361+
13362+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
13363+ are run).
13364+
13365+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the
13366+ first token. By default, to implement support for ranges, extend
13367+ its range to the last symbol. */
13368+
13369+#ifndef YYLLOC_DEFAULT
13370+# define YYLLOC_DEFAULT(Current, Rhs, N) \
13371+ Current.last_line = Rhs[N].last_line; \
13372+ Current.last_column = Rhs[N].last_column;
13373+#endif
13374+
13375+
13376+/* YYLEX -- calling `yylex' with the right arguments. */
13377+
13378+#if YYPURE
13379+# if YYLSP_NEEDED
13380+# ifdef YYLEX_PARAM
13381+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
13382+# else
13383+# define YYLEX yylex (&yylval, &yylloc)
13384+# endif
13385+# else /* !YYLSP_NEEDED */
13386+# ifdef YYLEX_PARAM
13387+# define YYLEX yylex (&yylval, YYLEX_PARAM)
13388+# else
13389+# define YYLEX yylex (&yylval)
13390+# endif
13391+# endif /* !YYLSP_NEEDED */
13392+#else /* !YYPURE */
13393+# define YYLEX yylex ()
13394+#endif /* !YYPURE */
13395+
13396+
13397+/* Enable debugging if requested. */
13398+#if YYDEBUG
13399+
13400+# ifndef YYFPRINTF
13401+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
13402+# define YYFPRINTF fprintf
13403+# endif
13404+
13405+# define YYDPRINTF(Args) \
13406+do { \
13407+ if (yydebug) \
13408+ YYFPRINTF Args; \
13409+} while (0)
13410+/* Nonzero means print parse trace. It is left uninitialized so that
13411+ multiple parsers can coexist. */
13412+int yydebug;
13413+#else /* !YYDEBUG */
13414+# define YYDPRINTF(Args)
13415+#endif /* !YYDEBUG */
13416+
13417+/* YYINITDEPTH -- initial size of the parser's stacks. */
13418+#ifndef YYINITDEPTH
13419+# define YYINITDEPTH 200
13420+#endif
13421+
13422+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
13423+ if the built-in stack extension method is used).
13424+
13425+ Do not make this value too large; the results are undefined if
13426+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
13427+ evaluated with infinite-precision integer arithmetic. */
13428+
13429+#if YYMAXDEPTH == 0
13430+# undef YYMAXDEPTH
13431+#endif
13432+
13433+#ifndef YYMAXDEPTH
13434+# define YYMAXDEPTH 10000
13435+#endif
13436+
13437+#ifdef YYERROR_VERBOSE
13438+
13439+# ifndef yystrlen
13440+# if defined (__GLIBC__) && defined (_STRING_H)
13441+# define yystrlen strlen
13442+# else
13443+/* Return the length of YYSTR. */
13444+static YYSIZE_T
13445+# if defined (__STDC__) || defined (__cplusplus)
13446+yystrlen (const char *yystr)
13447+# else
13448+yystrlen (yystr)
13449+ const char *yystr;
13450+# endif
13451+{
13452+ register const char *yys = yystr;
13453+
13454+ while (*yys++ != '\0')
13455+ continue;
13456+
13457+ return yys - yystr - 1;
13458+}
13459+# endif
13460+# endif
13461+
13462+# ifndef yystpcpy
13463+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
13464+# define yystpcpy stpcpy
13465+# else
13466+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
13467+ YYDEST. */
13468+static char *
13469+# if defined (__STDC__) || defined (__cplusplus)
13470+yystpcpy (char *yydest, const char *yysrc)
13471+# else
13472+yystpcpy (yydest, yysrc)
13473+ char *yydest;
13474+ const char *yysrc;
13475+# endif
13476+{
13477+ register char *yyd = yydest;
13478+ register const char *yys = yysrc;
13479+
13480+ while ((*yyd++ = *yys++) != '\0')
13481+ continue;
13482+
13483+ return yyd - 1;
13484+}
13485+# endif
13486+# endif
13487+#endif
13488+
13489+#line 315 "/usr/local/share/bison/bison.simple"
13490+
13491+
13492+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
13493+ into yyparse. The argument should have type void *.
13494+ It should actually point to an object.
13495+ Grammar actions can access the variable by casting it
13496+ to the proper pointer type. */
13497+
13498+#ifdef YYPARSE_PARAM
13499+# if defined (__STDC__) || defined (__cplusplus)
13500+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
13501+# define YYPARSE_PARAM_DECL
13502+# else
13503+# define YYPARSE_PARAM_ARG YYPARSE_PARAM
13504+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
13505+# endif
13506+#else /* !YYPARSE_PARAM */
13507+# define YYPARSE_PARAM_ARG
13508+# define YYPARSE_PARAM_DECL
13509+#endif /* !YYPARSE_PARAM */
13510+
13511+/* Prevent warning if -Wstrict-prototypes. */
13512+#ifdef __GNUC__
13513+# ifdef YYPARSE_PARAM
13514+int yyparse (void *);
13515+# else
13516+int yyparse (void);
13517+# endif
13518+#endif
13519+
13520+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
13521+ variables are global, or local to YYPARSE. */
13522+
13523+#define YY_DECL_NON_LSP_VARIABLES \
13524+/* The lookahead symbol. */ \
13525+int yychar; \
13526+ \
13527+/* The semantic value of the lookahead symbol. */ \
13528+YYSTYPE yylval; \
13529+ \
13530+/* Number of parse errors so far. */ \
13531+int yynerrs;
13532+
13533+#if YYLSP_NEEDED
13534+# define YY_DECL_VARIABLES \
13535+YY_DECL_NON_LSP_VARIABLES \
13536+ \
13537+/* Location data for the lookahead symbol. */ \
13538+YYLTYPE yylloc;
13539+#else
13540+# define YY_DECL_VARIABLES \
13541+YY_DECL_NON_LSP_VARIABLES
13542+#endif
13543+
13544+
13545+/* If nonreentrant, generate the variables here. */
13546+
13547+#if !YYPURE
13548+YY_DECL_VARIABLES
13549+#endif /* !YYPURE */
13550+
13551+int
13552+yyparse (YYPARSE_PARAM_ARG)
13553+ YYPARSE_PARAM_DECL
13554+{
13555+ /* If reentrant, generate the variables here. */
13556+#if YYPURE
13557+ YY_DECL_VARIABLES
13558+#endif /* !YYPURE */
13559+
13560+ register int yystate;
13561+ register int yyn;
13562+ int yyresult;
13563+ /* Number of tokens to shift before error messages enabled. */
13564+ int yyerrstatus;
13565+ /* Lookahead token as an internal (translated) token number. */
13566+ int yychar1 = 0;
13567+
13568+ /* Three stacks and their tools:
13569+ `yyss': related to states,
13570+ `yyvs': related to semantic values,
13571+ `yyls': related to locations.
13572+
13573+ Refer to the stacks thru separate pointers, to allow yyoverflow
13574+ to reallocate them elsewhere. */
13575+
13576+ /* The state stack. */
13577+ short yyssa[YYINITDEPTH];
13578+ short *yyss = yyssa;
13579+ register short *yyssp;
13580+
13581+ /* The semantic value stack. */
13582+ YYSTYPE yyvsa[YYINITDEPTH];
13583+ YYSTYPE *yyvs = yyvsa;
13584+ register YYSTYPE *yyvsp;
13585+
13586+#if YYLSP_NEEDED
13587+ /* The location stack. */
13588+ YYLTYPE yylsa[YYINITDEPTH];
13589+ YYLTYPE *yyls = yylsa;
13590+ YYLTYPE *yylsp;
13591+#endif
13592+
13593+#if YYLSP_NEEDED
13594+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
13595+#else
13596+# define YYPOPSTACK (yyvsp--, yyssp--)
13597+#endif
13598+
13599+ YYSIZE_T yystacksize = YYINITDEPTH;
13600+
13601+
13602+ /* The variables used to return semantic value and location from the
13603+ action routines. */
13604+ YYSTYPE yyval;
13605+#if YYLSP_NEEDED
13606+ YYLTYPE yyloc;
13607+#endif
13608+
13609+ /* When reducing, the number of symbols on the RHS of the reduced
13610+ rule. */
13611+ int yylen;
13612+
13613+ YYDPRINTF ((stderr, "Starting parse\n"));
13614+
13615+ yystate = 0;
13616+ yyerrstatus = 0;
13617+ yynerrs = 0;
13618+ yychar = YYEMPTY; /* Cause a token to be read. */
13619+
13620+ /* Initialize stack pointers.
13621+ Waste one element of value and location stack
13622+ so that they stay on the same level as the state stack.
13623+ The wasted elements are never initialized. */
13624+
13625+ yyssp = yyss;
13626+ yyvsp = yyvs;
13627+#if YYLSP_NEEDED
13628+ yylsp = yyls;
13629+#endif
13630+ goto yysetstate;
13631+
13632+/*------------------------------------------------------------.
13633+| yynewstate -- Push a new state, which is found in yystate. |
13634+`------------------------------------------------------------*/
13635+ yynewstate:
13636+ /* In all cases, when you get here, the value and location stacks
13637+ have just been pushed. so pushing a state here evens the stacks.
13638+ */
13639+ yyssp++;
13640+
13641+ yysetstate:
13642+ *yyssp = yystate;
13643+
13644+ if (yyssp >= yyss + yystacksize - 1)
13645+ {
13646+ /* Get the current used size of the three stacks, in elements. */
13647+ YYSIZE_T yysize = yyssp - yyss + 1;
13648+
13649+#ifdef yyoverflow
13650+ {
13651+ /* Give user a chance to reallocate the stack. Use copies of
13652+ these so that the &'s don't force the real ones into
13653+ memory. */
13654+ YYSTYPE *yyvs1 = yyvs;
13655+ short *yyss1 = yyss;
13656+
13657+ /* Each stack pointer address is followed by the size of the
13658+ data in use in that stack, in bytes. */
13659+# if YYLSP_NEEDED
13660+ YYLTYPE *yyls1 = yyls;
13661+ /* This used to be a conditional around just the two extra args,
13662+ but that might be undefined if yyoverflow is a macro. */
13663+ yyoverflow ("parser stack overflow",
13664+ &yyss1, yysize * sizeof (*yyssp),
13665+ &yyvs1, yysize * sizeof (*yyvsp),
13666+ &yyls1, yysize * sizeof (*yylsp),
13667+ &yystacksize);
13668+ yyls = yyls1;
13669+# else
13670+ yyoverflow ("parser stack overflow",
13671+ &yyss1, yysize * sizeof (*yyssp),
13672+ &yyvs1, yysize * sizeof (*yyvsp),
13673+ &yystacksize);
13674+# endif
13675+ yyss = yyss1;
13676+ yyvs = yyvs1;
13677+ }
13678+#else /* no yyoverflow */
13679+# ifndef YYSTACK_RELOCATE
13680+ goto yyoverflowlab;
13681+# else
13682+ /* Extend the stack our own way. */
13683+ if (yystacksize >= YYMAXDEPTH)
13684+ goto yyoverflowlab;
13685+ yystacksize *= 2;
13686+ if (yystacksize > YYMAXDEPTH)
13687+ yystacksize = YYMAXDEPTH;
13688+
13689+ {
13690+ short *yyss1 = yyss;
13691+ union yyalloc *yyptr =
13692+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
13693+ if (! yyptr)
13694+ goto yyoverflowlab;
13695+ YYSTACK_RELOCATE (yyss);
13696+ YYSTACK_RELOCATE (yyvs);
13697+# if YYLSP_NEEDED
13698+ YYSTACK_RELOCATE (yyls);
13699+# endif
13700+# undef YYSTACK_RELOCATE
13701+ if (yyss1 != yyssa)
13702+ YYSTACK_FREE (yyss1);
13703+ }
13704+# endif
13705+#endif /* no yyoverflow */
13706+
13707+ yyssp = yyss + yysize - 1;
13708+ yyvsp = yyvs + yysize - 1;
13709+#if YYLSP_NEEDED
13710+ yylsp = yyls + yysize - 1;
13711+#endif
13712+
13713+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
13714+ (unsigned long int) yystacksize));
13715+
13716+ if (yyssp >= yyss + yystacksize - 1)
13717+ YYABORT;
13718+ }
13719+
13720+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
13721+
13722+ goto yybackup;
13723+
13724+
13725+/*-----------.
13726+| yybackup. |
13727+`-----------*/
13728+yybackup:
13729+
13730+/* Do appropriate processing given the current state. */
13731+/* Read a lookahead token if we need one and don't already have one. */
13732+/* yyresume: */
13733+
13734+ /* First try to decide what to do without reference to lookahead token. */
13735+
13736+ yyn = yypact[yystate];
13737+ if (yyn == YYFLAG)
13738+ goto yydefault;
13739+
13740+ /* Not known => get a lookahead token if don't already have one. */
13741+
13742+ /* yychar is either YYEMPTY or YYEOF
13743+ or a valid token in external form. */
13744+
13745+ if (yychar == YYEMPTY)
13746+ {
13747+ YYDPRINTF ((stderr, "Reading a token: "));
13748+ yychar = YYLEX;
13749+ }
13750+
13751+ /* Convert token to internal form (in yychar1) for indexing tables with */
13752+
13753+ if (yychar <= 0) /* This means end of input. */
13754+ {
13755+ yychar1 = 0;
13756+ yychar = YYEOF; /* Don't call YYLEX any more */
13757+
13758+ YYDPRINTF ((stderr, "Now at end of input.\n"));
13759+ }
13760+ else
13761+ {
13762+ yychar1 = YYTRANSLATE (yychar);
13763+
13764+#if YYDEBUG
13765+ /* We have to keep this `#if YYDEBUG', since we use variables
13766+ which are defined only if `YYDEBUG' is set. */
13767+ if (yydebug)
13768+ {
13769+ YYFPRINTF (stderr, "Next token is %d (%s",
13770+ yychar, yytname[yychar1]);
13771+ /* Give the individual parser a way to print the precise
13772+ meaning of a token, for further debugging info. */
13773+# ifdef YYPRINT
13774+ YYPRINT (stderr, yychar, yylval);
13775+# endif
13776+ YYFPRINTF (stderr, ")\n");
13777+ }
13778+#endif
13779+ }
13780+
13781+ yyn += yychar1;
13782+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
13783+ goto yydefault;
13784+
13785+ yyn = yytable[yyn];
13786+
13787+ /* yyn is what to do for this token type in this state.
13788+ Negative => reduce, -yyn is rule number.
13789+ Positive => shift, yyn is new state.
13790+ New state is final state => don't bother to shift,
13791+ just return success.
13792+ 0, or most negative number => error. */
13793+
13794+ if (yyn < 0)
13795+ {
13796+ if (yyn == YYFLAG)
13797+ goto yyerrlab;
13798+ yyn = -yyn;
13799+ goto yyreduce;
13800+ }
13801+ else if (yyn == 0)
13802+ goto yyerrlab;
13803+
13804+ if (yyn == YYFINAL)
13805+ YYACCEPT;
13806+
13807+ /* Shift the lookahead token. */
13808+ YYDPRINTF ((stderr, "Shifting token %d (%s), ",
13809+ yychar, yytname[yychar1]));
13810+
13811+ /* Discard the token being shifted unless it is eof. */
13812+ if (yychar != YYEOF)
13813+ yychar = YYEMPTY;
13814+
13815+ *++yyvsp = yylval;
13816+#if YYLSP_NEEDED
13817+ *++yylsp = yylloc;
13818+#endif
13819+
13820+ /* Count tokens shifted since error; after three, turn off error
13821+ status. */
13822+ if (yyerrstatus)
13823+ yyerrstatus--;
13824+
13825+ yystate = yyn;
13826+ goto yynewstate;
13827+
13828+
13829+/*-----------------------------------------------------------.
13830+| yydefault -- do the default action for the current state. |
13831+`-----------------------------------------------------------*/
13832+yydefault:
13833+ yyn = yydefact[yystate];
13834+ if (yyn == 0)
13835+ goto yyerrlab;
13836+ goto yyreduce;
13837+
13838+
13839+/*-----------------------------.
13840+| yyreduce -- Do a reduction. |
13841+`-----------------------------*/
13842+yyreduce:
13843+ /* yyn is the number of a rule to reduce with. */
13844+ yylen = yyr2[yyn];
13845+
13846+ /* If YYLEN is nonzero, implement the default value of the action:
13847+ `$$ = $1'.
13848+
13849+ Otherwise, the following line sets YYVAL to the semantic value of
13850+ the lookahead token. This behavior is undocumented and Bison
13851+ users should not rely upon it. Assigning to YYVAL
13852+ unconditionally makes the parser a bit smaller, and it avoids a
13853+ GCC warning that YYVAL may be used uninitialized. */
13854+ yyval = yyvsp[1-yylen];
13855+
13856+#if YYLSP_NEEDED
13857+ /* Similarly for the default location. Let the user run additional
13858+ commands if for instance locations are ranges. */
13859+ yyloc = yylsp[1-yylen];
13860+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
13861+#endif
13862+
13863+#if YYDEBUG
13864+ /* We have to keep this `#if YYDEBUG', since we use variables which
13865+ are defined only if `YYDEBUG' is set. */
13866+ if (yydebug)
13867+ {
13868+ int yyi;
13869+
13870+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
13871+ yyn, yyrline[yyn]);
13872+
13873+ /* Print the symbols being reduced, and their result. */
13874+ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
13875+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
13876+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
13877+ }
13878+#endif
13879+
13880+ switch (yyn) {
13881+
13882+case 1:
13883+#line 151 "plural.y"
13884+{
13885+ if (yyvsp[0].exp == NULL)
13886+ YYABORT;
13887+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
13888+ }
13889+ break;
13890+case 2:
13891+#line 159 "plural.y"
13892+{
13893+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
13894+ }
13895+ break;
13896+case 3:
13897+#line 163 "plural.y"
13898+{
13899+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
13900+ }
13901+ break;
13902+case 4:
13903+#line 167 "plural.y"
13904+{
13905+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
13906+ }
13907+ break;
13908+case 5:
13909+#line 171 "plural.y"
13910+{
13911+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13912+ }
13913+ break;
13914+case 6:
13915+#line 175 "plural.y"
13916+{
13917+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13918+ }
13919+ break;
13920+case 7:
13921+#line 179 "plural.y"
13922+{
13923+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13924+ }
13925+ break;
13926+case 8:
13927+#line 183 "plural.y"
13928+{
13929+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13930+ }
13931+ break;
13932+case 9:
13933+#line 187 "plural.y"
13934+{
13935+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
13936+ }
13937+ break;
13938+case 10:
13939+#line 191 "plural.y"
13940+{
13941+ yyval.exp = new_exp_0 (var);
13942+ }
13943+ break;
13944+case 11:
13945+#line 195 "plural.y"
13946+{
13947+ if ((yyval.exp = new_exp_0 (num)) != NULL)
13948+ yyval.exp->val.num = yyvsp[0].num;
13949+ }
13950+ break;
13951+case 12:
13952+#line 200 "plural.y"
13953+{
13954+ yyval.exp = yyvsp[-1].exp;
13955+ }
13956+ break;
13957+}
13958+
13959+#line 705 "/usr/local/share/bison/bison.simple"
13960+
13961+
13962+ yyvsp -= yylen;
13963+ yyssp -= yylen;
13964+#if YYLSP_NEEDED
13965+ yylsp -= yylen;
13966+#endif
13967+
13968+#if YYDEBUG
13969+ if (yydebug)
13970+ {
13971+ short *yyssp1 = yyss - 1;
13972+ YYFPRINTF (stderr, "state stack now");
13973+ while (yyssp1 != yyssp)
13974+ YYFPRINTF (stderr, " %d", *++yyssp1);
13975+ YYFPRINTF (stderr, "\n");
13976+ }
13977+#endif
13978+
13979+ *++yyvsp = yyval;
13980+#if YYLSP_NEEDED
13981+ *++yylsp = yyloc;
13982+#endif
13983+
13984+ /* Now `shift' the result of the reduction. Determine what state
13985+ that goes to, based on the state we popped back to and the rule
13986+ number reduced by. */
13987+
13988+ yyn = yyr1[yyn];
13989+
13990+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
13991+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
13992+ yystate = yytable[yystate];
13993+ else
13994+ yystate = yydefgoto[yyn - YYNTBASE];
13995+
13996+ goto yynewstate;
13997+
13998+
13999+/*------------------------------------.
14000+| yyerrlab -- here on detecting error |
14001+`------------------------------------*/
14002+yyerrlab:
14003+ /* If not already recovering from an error, report this error. */
14004+ if (!yyerrstatus)
14005+ {
14006+ ++yynerrs;
14007+
14008+#ifdef YYERROR_VERBOSE
14009+ yyn = yypact[yystate];
14010+
14011+ if (yyn > YYFLAG && yyn < YYLAST)
14012+ {
14013+ YYSIZE_T yysize = 0;
14014+ char *yymsg;
14015+ int yyx, yycount;
14016+
14017+ yycount = 0;
14018+ /* Start YYX at -YYN if negative to avoid negative indexes in
14019+ YYCHECK. */
14020+ for (yyx = yyn < 0 ? -yyn : 0;
14021+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
14022+ if (yycheck[yyx + yyn] == yyx)
14023+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
14024+ yysize += yystrlen ("parse error, unexpected ") + 1;
14025+ yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
14026+ yymsg = (char *) YYSTACK_ALLOC (yysize);
14027+ if (yymsg != 0)
14028+ {
14029+ char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
14030+ yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
14031+
14032+ if (yycount < 5)
14033+ {
14034+ yycount = 0;
14035+ for (yyx = yyn < 0 ? -yyn : 0;
14036+ yyx < (int) (sizeof (yytname) / sizeof (char *));
14037+ yyx++)
14038+ if (yycheck[yyx + yyn] == yyx)
14039+ {
14040+ const char *yyq = ! yycount ? ", expecting " : " or ";
14041+ yyp = yystpcpy (yyp, yyq);
14042+ yyp = yystpcpy (yyp, yytname[yyx]);
14043+ yycount++;
14044+ }
14045+ }
14046+ yyerror (yymsg);
14047+ YYSTACK_FREE (yymsg);
14048+ }
14049+ else
14050+ yyerror ("parse error; also virtual memory exhausted");
14051+ }
14052+ else
14053+#endif /* defined (YYERROR_VERBOSE) */
14054+ yyerror ("parse error");
14055+ }
14056+ goto yyerrlab1;
14057+
14058+
14059+/*--------------------------------------------------.
14060+| yyerrlab1 -- error raised explicitly by an action |
14061+`--------------------------------------------------*/
14062+yyerrlab1:
14063+ if (yyerrstatus == 3)
14064+ {
14065+ /* If just tried and failed to reuse lookahead token after an
14066+ error, discard it. */
14067+
14068+ /* return failure if at end of input */
14069+ if (yychar == YYEOF)
14070+ YYABORT;
14071+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
14072+ yychar, yytname[yychar1]));
14073+ yychar = YYEMPTY;
14074+ }
14075+
14076+ /* Else will try to reuse lookahead token after shifting the error
14077+ token. */
14078+
14079+ yyerrstatus = 3; /* Each real token shifted decrements this */
14080+
14081+ goto yyerrhandle;
14082+
14083+
14084+/*-------------------------------------------------------------------.
14085+| yyerrdefault -- current state does not do anything special for the |
14086+| error token. |
14087+`-------------------------------------------------------------------*/
14088+yyerrdefault:
14089+#if 0
14090+ /* This is wrong; only states that explicitly want error tokens
14091+ should shift them. */
14092+
14093+ /* If its default is to accept any token, ok. Otherwise pop it. */
14094+ yyn = yydefact[yystate];
14095+ if (yyn)
14096+ goto yydefault;
14097+#endif
14098+
14099+
14100+/*---------------------------------------------------------------.
14101+| yyerrpop -- pop the current state because it cannot handle the |
14102+| error token |
14103+`---------------------------------------------------------------*/
14104+yyerrpop:
14105+ if (yyssp == yyss)
14106+ YYABORT;
14107+ yyvsp--;
14108+ yystate = *--yyssp;
14109+#if YYLSP_NEEDED
14110+ yylsp--;
14111+#endif
14112+
14113+#if YYDEBUG
14114+ if (yydebug)
14115+ {
14116+ short *yyssp1 = yyss - 1;
14117+ YYFPRINTF (stderr, "Error: state stack now");
14118+ while (yyssp1 != yyssp)
14119+ YYFPRINTF (stderr, " %d", *++yyssp1);
14120+ YYFPRINTF (stderr, "\n");
14121+ }
14122+#endif
14123+
14124+/*--------------.
14125+| yyerrhandle. |
14126+`--------------*/
14127+yyerrhandle:
14128+ yyn = yypact[yystate];
14129+ if (yyn == YYFLAG)
14130+ goto yyerrdefault;
14131+
14132+ yyn += YYTERROR;
14133+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
14134+ goto yyerrdefault;
14135+
14136+ yyn = yytable[yyn];
14137+ if (yyn < 0)
14138+ {
14139+ if (yyn == YYFLAG)
14140+ goto yyerrpop;
14141+ yyn = -yyn;
14142+ goto yyreduce;
14143+ }
14144+ else if (yyn == 0)
14145+ goto yyerrpop;
14146+
14147+ if (yyn == YYFINAL)
14148+ YYACCEPT;
14149+
14150+ YYDPRINTF ((stderr, "Shifting error token, "));
14151+
14152+ *++yyvsp = yylval;
14153+#if YYLSP_NEEDED
14154+ *++yylsp = yylloc;
14155+#endif
14156+
14157+ yystate = yyn;
14158+ goto yynewstate;
14159+
14160+
14161+/*-------------------------------------.
14162+| yyacceptlab -- YYACCEPT comes here. |
14163+`-------------------------------------*/
14164+yyacceptlab:
14165+ yyresult = 0;
14166+ goto yyreturn;
14167+
14168+/*-----------------------------------.
14169+| yyabortlab -- YYABORT comes here. |
14170+`-----------------------------------*/
14171+yyabortlab:
14172+ yyresult = 1;
14173+ goto yyreturn;
14174+
14175+/*---------------------------------------------.
14176+| yyoverflowab -- parser overflow comes here. |
14177+`---------------------------------------------*/
14178+yyoverflowlab:
14179+ yyerror ("parser stack overflow");
14180+ yyresult = 2;
14181+ /* Fall through. */
14182+
14183+yyreturn:
14184+#ifndef yyoverflow
14185+ if (yyss != yyssa)
14186+ YYSTACK_FREE (yyss);
14187+#endif
14188+ return yyresult;
14189+}
14190+#line 205 "plural.y"
14191+
14192+
14193+void
14194+internal_function
14195+FREE_EXPRESSION (struct expression *exp)
14196+{
14197+ if (exp == NULL)
14198+ return;
14199+
14200+ /* Handle the recursive case. */
14201+ switch (exp->nargs)
14202+ {
14203+ case 3:
14204+ FREE_EXPRESSION (exp->val.args[2]);
14205+ /* FALLTHROUGH */
14206+ case 2:
14207+ FREE_EXPRESSION (exp->val.args[1]);
14208+ /* FALLTHROUGH */
14209+ case 1:
14210+ FREE_EXPRESSION (exp->val.args[0]);
14211+ /* FALLTHROUGH */
14212+ default:
14213+ break;
14214+ }
14215+
14216+ free (exp);
14217+}
14218+
14219+
14220+static int
14221+yylex (YYSTYPE *lval, const char **pexp)
14222+{
14223+ const char *exp = *pexp;
14224+ int result;
14225+
14226+ while (1)
14227+ {
14228+ if (exp[0] == '\0')
14229+ {
14230+ *pexp = exp;
14231+ return YYEOF;
14232+ }
14233+
14234+ if (exp[0] != ' ' && exp[0] != '\t')
14235+ break;
14236+
14237+ ++exp;
14238+ }
14239+
14240+ result = *exp++;
14241+ switch (result)
14242+ {
14243+ case '0': case '1': case '2': case '3': case '4':
14244+ case '5': case '6': case '7': case '8': case '9':
14245+ {
14246+ unsigned long int n = result - '0';
14247+ while (exp[0] >= '0' && exp[0] <= '9')
14248+ {
14249+ n *= 10;
14250+ n += exp[0] - '0';
14251+ ++exp;
14252+ }
14253+ lval->num = n;
14254+ result = NUMBER;
14255+ }
14256+ break;
14257+
14258+ case '=':
14259+ if (exp[0] == '=')
14260+ {
14261+ ++exp;
14262+ lval->op = equal;
14263+ result = EQUOP2;
14264+ }
14265+ else
14266+ result = YYERRCODE;
14267+ break;
14268+
14269+ case '!':
14270+ if (exp[0] == '=')
14271+ {
14272+ ++exp;
14273+ lval->op = not_equal;
14274+ result = EQUOP2;
14275+ }
14276+ break;
14277+
14278+ case '&':
14279+ case '|':
14280+ if (exp[0] == result)
14281+ ++exp;
14282+ else
14283+ result = YYERRCODE;
14284+ break;
14285+
14286+ case '<':
14287+ if (exp[0] == '=')
14288+ {
14289+ ++exp;
14290+ lval->op = less_or_equal;
14291+ }
14292+ else
14293+ lval->op = less_than;
14294+ result = CMPOP2;
14295+ break;
14296+
14297+ case '>':
14298+ if (exp[0] == '=')
14299+ {
14300+ ++exp;
14301+ lval->op = greater_or_equal;
14302+ }
14303+ else
14304+ lval->op = greater_than;
14305+ result = CMPOP2;
14306+ break;
14307+
14308+ case '*':
14309+ lval->op = mult;
14310+ result = MULOP2;
14311+ break;
14312+
14313+ case '/':
14314+ lval->op = divide;
14315+ result = MULOP2;
14316+ break;
14317+
14318+ case '%':
14319+ lval->op = module;
14320+ result = MULOP2;
14321+ break;
14322+
14323+ case '+':
14324+ lval->op = plus;
14325+ result = ADDOP2;
14326+ break;
14327+
14328+ case '-':
14329+ lval->op = minus;
14330+ result = ADDOP2;
14331+ break;
14332+
14333+ case 'n':
14334+ case '?':
14335+ case ':':
14336+ case '(':
14337+ case ')':
14338+ /* Nothing, just return the character. */
14339+ break;
14340+
14341+ case ';':
14342+ case '\n':
14343+ case '\0':
14344+ /* Be safe and let the user call this function again. */
14345+ --exp;
14346+ result = YYEOF;
14347+ break;
14348+
14349+ default:
14350+ result = YYERRCODE;
14351+#if YYDEBUG != 0
14352+ --exp;
14353+#endif
14354+ break;
14355+ }
14356+
14357+ *pexp = exp;
14358+
14359+ return result;
14360+}
14361+
14362+
14363+static void
14364+yyerror (const char *str)
14365+{
14366+ /* Do nothing. We don't print error messages here. */
14367+}
14368--- lrzsz-0.12.20.safe/intl/plural-exp.c 1969-12-31 19:00:00.000000000 -0500
14369+++ lrzsz-0.12.20/intl/plural-exp.c 2004-09-12 14:40:34.578714192 -0400
14370@@ -0,0 +1,154 @@
14371+/* Expression parsing for plural form selection.
14372+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14373+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14374+
14375+ This program is free software; you can redistribute it and/or modify it
14376+ under the terms of the GNU Library General Public License as published
14377+ by the Free Software Foundation; either version 2, or (at your option)
14378+ any later version.
14379+
14380+ This program is distributed in the hope that it will be useful,
14381+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14382+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14383+ Library General Public License for more details.
14384+
14385+ You should have received a copy of the GNU Library General Public
14386+ License along with this program; if not, write to the Free Software
14387+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14388+ USA. */
14389+
14390+#ifdef HAVE_CONFIG_H
14391+# include <config.h>
14392+#endif
14393+
14394+#include <ctype.h>
14395+#include <stdlib.h>
14396+#include <string.h>
14397+
14398+#include "plural-exp.h"
14399+
14400+#if (defined __GNUC__ && !defined __APPLE_CC__) \
14401+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
14402+
14403+/* These structs are the constant expression for the germanic plural
14404+ form determination. It represents the expression "n != 1". */
14405+static const struct expression plvar =
14406+{
14407+ .nargs = 0,
14408+ .operation = var,
14409+};
14410+static const struct expression plone =
14411+{
14412+ .nargs = 0,
14413+ .operation = num,
14414+ .val =
14415+ {
14416+ .num = 1
14417+ }
14418+};
14419+struct expression GERMANIC_PLURAL =
14420+{
14421+ .nargs = 2,
14422+ .operation = not_equal,
14423+ .val =
14424+ {
14425+ .args =
14426+ {
14427+ [0] = (struct expression *) &plvar,
14428+ [1] = (struct expression *) &plone
14429+ }
14430+ }
14431+};
14432+
14433+# define INIT_GERMANIC_PLURAL()
14434+
14435+#else
14436+
14437+/* For compilers without support for ISO C 99 struct/union initializers:
14438+ Initialization at run-time. */
14439+
14440+static struct expression plvar;
14441+static struct expression plone;
14442+struct expression GERMANIC_PLURAL;
14443+
14444+static void
14445+init_germanic_plural ()
14446+{
14447+ if (plone.val.num == 0)
14448+ {
14449+ plvar.nargs = 0;
14450+ plvar.operation = var;
14451+
14452+ plone.nargs = 0;
14453+ plone.operation = num;
14454+ plone.val.num = 1;
14455+
14456+ GERMANIC_PLURAL.nargs = 2;
14457+ GERMANIC_PLURAL.operation = not_equal;
14458+ GERMANIC_PLURAL.val.args[0] = &plvar;
14459+ GERMANIC_PLURAL.val.args[1] = &plone;
14460+ }
14461+}
14462+
14463+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
14464+
14465+#endif
14466+
14467+void
14468+internal_function
14469+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
14470+ unsigned long int *npluralsp)
14471+{
14472+ if (nullentry != NULL)
14473+ {
14474+ const char *plural;
14475+ const char *nplurals;
14476+
14477+ plural = strstr (nullentry, "plural=");
14478+ nplurals = strstr (nullentry, "nplurals=");
14479+ if (plural == NULL || nplurals == NULL)
14480+ goto no_plural;
14481+ else
14482+ {
14483+ char *endp;
14484+ unsigned long int n;
14485+ struct parse_args args;
14486+
14487+ /* First get the number. */
14488+ nplurals += 9;
14489+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
14490+ ++nplurals;
14491+ if (!(*nplurals >= '0' && *nplurals <= '9'))
14492+ goto no_plural;
14493+#if defined HAVE_STRTOUL || defined _LIBC
14494+ n = strtoul (nplurals, &endp, 10);
14495+#else
14496+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
14497+ n = n * 10 + (*endp - '0');
14498+#endif
14499+ if (nplurals == endp)
14500+ goto no_plural;
14501+ *npluralsp = n;
14502+
14503+ /* Due to the restrictions bison imposes onto the interface of the
14504+ scanner function we have to put the input string and the result
14505+ passed up from the parser into the same structure which address
14506+ is passed down to the parser. */
14507+ plural += 7;
14508+ args.cp = plural;
14509+ if (PLURAL_PARSE (&args) != 0)
14510+ goto no_plural;
14511+ *pluralp = args.res;
14512+ }
14513+ }
14514+ else
14515+ {
14516+ /* By default we are using the Germanic form: singular form only
14517+ for `one', the plural form otherwise. Yes, this is also what
14518+ English is using since English is a Germanic language. */
14519+ no_plural:
14520+ INIT_GERMANIC_PLURAL ();
14521+ *pluralp = &GERMANIC_PLURAL;
14522+ *npluralsp = 2;
14523+ }
14524+}
14525--- lrzsz-0.12.20.safe/intl/plural-exp.h 1969-12-31 19:00:00.000000000 -0500
14526+++ lrzsz-0.12.20/intl/plural-exp.h 2004-09-12 14:40:34.584713280 -0400
14527@@ -0,0 +1,118 @@
14528+/* Expression parsing and evaluation for plural form selection.
14529+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
14530+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14531+
14532+ This program is free software; you can redistribute it and/or modify it
14533+ under the terms of the GNU Library General Public License as published
14534+ by the Free Software Foundation; either version 2, or (at your option)
14535+ any later version.
14536+
14537+ This program is distributed in the hope that it will be useful,
14538+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14539+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14540+ Library General Public License for more details.
14541+
14542+ You should have received a copy of the GNU Library General Public
14543+ License along with this program; if not, write to the Free Software
14544+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14545+ USA. */
14546+
14547+#ifndef _PLURAL_EXP_H
14548+#define _PLURAL_EXP_H
14549+
14550+#ifndef internal_function
14551+# define internal_function
14552+#endif
14553+
14554+#ifndef attribute_hidden
14555+# define attribute_hidden
14556+#endif
14557+
14558+
14559+/* This is the representation of the expressions to determine the
14560+ plural form. */
14561+struct expression
14562+{
14563+ int nargs; /* Number of arguments. */
14564+ enum operator
14565+ {
14566+ /* Without arguments: */
14567+ var, /* The variable "n". */
14568+ num, /* Decimal number. */
14569+ /* Unary operators: */
14570+ lnot, /* Logical NOT. */
14571+ /* Binary operators: */
14572+ mult, /* Multiplication. */
14573+ divide, /* Division. */
14574+ module, /* Modulo operation. */
14575+ plus, /* Addition. */
14576+ minus, /* Subtraction. */
14577+ less_than, /* Comparison. */
14578+ greater_than, /* Comparison. */
14579+ less_or_equal, /* Comparison. */
14580+ greater_or_equal, /* Comparison. */
14581+ equal, /* Comparison for equality. */
14582+ not_equal, /* Comparison for inequality. */
14583+ land, /* Logical AND. */
14584+ lor, /* Logical OR. */
14585+ /* Ternary operators: */
14586+ qmop /* Question mark operator. */
14587+ } operation;
14588+ union
14589+ {
14590+ unsigned long int num; /* Number value for `num'. */
14591+ struct expression *args[3]; /* Up to three arguments. */
14592+ } val;
14593+};
14594+
14595+/* This is the data structure to pass information to the parser and get
14596+ the result in a thread-safe way. */
14597+struct parse_args
14598+{
14599+ const char *cp;
14600+ struct expression *res;
14601+};
14602+
14603+
14604+/* Names for the libintl functions are a problem. This source code is used
14605+ 1. in the GNU C Library library,
14606+ 2. in the GNU libintl library,
14607+ 3. in the GNU gettext tools.
14608+ The function names in each situation must be different, to allow for
14609+ binary incompatible changes in 'struct expression'. Furthermore,
14610+ 1. in the GNU C Library library, the names have a __ prefix,
14611+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
14612+ must follow ANSI C and not start with __.
14613+ So we have to distinguish the three cases. */
14614+#ifdef _LIBC
14615+# define FREE_EXPRESSION __gettext_free_exp
14616+# define PLURAL_PARSE __gettextparse
14617+# define GERMANIC_PLURAL __gettext_germanic_plural
14618+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
14619+#elif defined (IN_LIBINTL)
14620+# define FREE_EXPRESSION libintl_gettext_free_exp
14621+# define PLURAL_PARSE libintl_gettextparse
14622+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
14623+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
14624+#else
14625+# define FREE_EXPRESSION free_plural_expression
14626+# define PLURAL_PARSE parse_plural_expression
14627+# define GERMANIC_PLURAL germanic_plural
14628+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
14629+#endif
14630+
14631+extern void FREE_EXPRESSION (struct expression *exp)
14632+ internal_function;
14633+extern int PLURAL_PARSE (void *arg);
14634+extern struct expression GERMANIC_PLURAL attribute_hidden;
14635+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
14636+ struct expression **pluralp,
14637+ unsigned long int *npluralsp)
14638+ internal_function;
14639+
14640+#if !defined (_LIBC) && !defined (IN_LIBINTL)
14641+extern unsigned long int plural_eval (struct expression *pexp,
14642+ unsigned long int n);
14643+#endif
14644+
14645+#endif /* _PLURAL_EXP_H */
14646--- lrzsz-0.12.20.safe/intl/plural.y 1969-12-31 19:00:00.000000000 -0500
14647+++ lrzsz-0.12.20/intl/plural.y 2004-09-12 14:40:34.589712520 -0400
14648@@ -0,0 +1,381 @@
14649+%{
14650+/* Expression parsing for plural form selection.
14651+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14652+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14653+
14654+ This program is free software; you can redistribute it and/or modify it
14655+ under the terms of the GNU Library General Public License as published
14656+ by the Free Software Foundation; either version 2, or (at your option)
14657+ any later version.
14658+
14659+ This program is distributed in the hope that it will be useful,
14660+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14661+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14662+ Library General Public License for more details.
14663+
14664+ You should have received a copy of the GNU Library General Public
14665+ License along with this program; if not, write to the Free Software
14666+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14667+ USA. */
14668+
14669+/* The bison generated parser uses alloca. AIX 3 forces us to put this
14670+ declaration at the beginning of the file. The declaration in bison's
14671+ skeleton file comes too late. This must come before <config.h>
14672+ because <config.h> may include arbitrary system headers. */
14673+#if defined _AIX && !defined __GNUC__
14674+ #pragma alloca
14675+#endif
14676+
14677+#ifdef HAVE_CONFIG_H
14678+# include <config.h>
14679+#endif
14680+
14681+#include <stddef.h>
14682+#include <stdlib.h>
14683+#include "plural-exp.h"
14684+
14685+/* The main function generated by the parser is called __gettextparse,
14686+ but we want it to be called PLURAL_PARSE. */
14687+#ifndef _LIBC
14688+# define __gettextparse PLURAL_PARSE
14689+#endif
14690+
14691+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
14692+#define YYPARSE_PARAM arg
14693+%}
14694+%pure_parser
14695+%expect 7
14696+
14697+%union {
14698+ unsigned long int num;
14699+ enum operator op;
14700+ struct expression *exp;
14701+}
14702+
14703+%{
14704+/* Prototypes for local functions. */
14705+static int yylex (YYSTYPE *lval, const char **pexp);
14706+static void yyerror (const char *str);
14707+
14708+/* Allocation of expressions. */
14709+
14710+static struct expression *
14711+new_exp (int nargs, enum operator op, struct expression * const *args)
14712+{
14713+ int i;
14714+ struct expression *newp;
14715+
14716+ /* If any of the argument could not be malloc'ed, just return NULL. */
14717+ for (i = nargs - 1; i >= 0; i--)
14718+ if (args[i] == NULL)
14719+ goto fail;
14720+
14721+ /* Allocate a new expression. */
14722+ newp = (struct expression *) malloc (sizeof (*newp));
14723+ if (newp != NULL)
14724+ {
14725+ newp->nargs = nargs;
14726+ newp->operation = op;
14727+ for (i = nargs - 1; i >= 0; i--)
14728+ newp->val.args[i] = args[i];
14729+ return newp;
14730+ }
14731+
14732+ fail:
14733+ for (i = nargs - 1; i >= 0; i--)
14734+ FREE_EXPRESSION (args[i]);
14735+
14736+ return NULL;
14737+}
14738+
14739+static inline struct expression *
14740+new_exp_0 (enum operator op)
14741+{
14742+ return new_exp (0, op, NULL);
14743+}
14744+
14745+static inline struct expression *
14746+new_exp_1 (enum operator op, struct expression *right)
14747+{
14748+ struct expression *args[1];
14749+
14750+ args[0] = right;
14751+ return new_exp (1, op, args);
14752+}
14753+
14754+static struct expression *
14755+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
14756+{
14757+ struct expression *args[2];
14758+
14759+ args[0] = left;
14760+ args[1] = right;
14761+ return new_exp (2, op, args);
14762+}
14763+
14764+static inline struct expression *
14765+new_exp_3 (enum operator op, struct expression *bexp,
14766+ struct expression *tbranch, struct expression *fbranch)
14767+{
14768+ struct expression *args[3];
14769+
14770+ args[0] = bexp;
14771+ args[1] = tbranch;
14772+ args[2] = fbranch;
14773+ return new_exp (3, op, args);
14774+}
14775+
14776+%}
14777+
14778+/* This declares that all operators have the same associativity and the
14779+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
14780+ There is no unary minus and no bitwise operators.
14781+ Operators with the same syntactic behaviour have been merged into a single
14782+ token, to save space in the array generated by bison. */
14783+%right '?' /* ? */
14784+%left '|' /* || */
14785+%left '&' /* && */
14786+%left EQUOP2 /* == != */
14787+%left CMPOP2 /* < > <= >= */
14788+%left ADDOP2 /* + - */
14789+%left MULOP2 /* * / % */
14790+%right '!' /* ! */
14791+
14792+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
14793+%token <num> NUMBER
14794+%type <exp> exp
14795+
14796+%%
14797+
14798+start: exp
14799+ {
14800+ if ($1 == NULL)
14801+ YYABORT;
14802+ ((struct parse_args *) arg)->res = $1;
14803+ }
14804+ ;
14805+
14806+exp: exp '?' exp ':' exp
14807+ {
14808+ $$ = new_exp_3 (qmop, $1, $3, $5);
14809+ }
14810+ | exp '|' exp
14811+ {
14812+ $$ = new_exp_2 (lor, $1, $3);
14813+ }
14814+ | exp '&' exp
14815+ {
14816+ $$ = new_exp_2 (land, $1, $3);
14817+ }
14818+ | exp EQUOP2 exp
14819+ {
14820+ $$ = new_exp_2 ($2, $1, $3);
14821+ }
14822+ | exp CMPOP2 exp
14823+ {
14824+ $$ = new_exp_2 ($2, $1, $3);
14825+ }
14826+ | exp ADDOP2 exp
14827+ {
14828+ $$ = new_exp_2 ($2, $1, $3);
14829+ }
14830+ | exp MULOP2 exp
14831+ {
14832+ $$ = new_exp_2 ($2, $1, $3);
14833+ }
14834+ | '!' exp
14835+ {
14836+ $$ = new_exp_1 (lnot, $2);
14837+ }
14838+ | 'n'
14839+ {
14840+ $$ = new_exp_0 (var);
14841+ }
14842+ | NUMBER
14843+ {
14844+ if (($$ = new_exp_0 (num)) != NULL)
14845+ $$->val.num = $1;
14846+ }
14847+ | '(' exp ')'
14848+ {
14849+ $$ = $2;
14850+ }
14851+ ;
14852+
14853+%%
14854+
14855+void
14856+internal_function
14857+FREE_EXPRESSION (struct expression *exp)
14858+{
14859+ if (exp == NULL)
14860+ return;
14861+
14862+ /* Handle the recursive case. */
14863+ switch (exp->nargs)
14864+ {
14865+ case 3:
14866+ FREE_EXPRESSION (exp->val.args[2]);
14867+ /* FALLTHROUGH */
14868+ case 2:
14869+ FREE_EXPRESSION (exp->val.args[1]);
14870+ /* FALLTHROUGH */
14871+ case 1:
14872+ FREE_EXPRESSION (exp->val.args[0]);
14873+ /* FALLTHROUGH */
14874+ default:
14875+ break;
14876+ }
14877+
14878+ free (exp);
14879+}
14880+
14881+
14882+static int
14883+yylex (YYSTYPE *lval, const char **pexp)
14884+{
14885+ const char *exp = *pexp;
14886+ int result;
14887+
14888+ while (1)
14889+ {
14890+ if (exp[0] == '\0')
14891+ {
14892+ *pexp = exp;
14893+ return YYEOF;
14894+ }
14895+
14896+ if (exp[0] != ' ' && exp[0] != '\t')
14897+ break;
14898+
14899+ ++exp;
14900+ }
14901+
14902+ result = *exp++;
14903+ switch (result)
14904+ {
14905+ case '0': case '1': case '2': case '3': case '4':
14906+ case '5': case '6': case '7': case '8': case '9':
14907+ {
14908+ unsigned long int n = result - '0';
14909+ while (exp[0] >= '0' && exp[0] <= '9')
14910+ {
14911+ n *= 10;
14912+ n += exp[0] - '0';
14913+ ++exp;
14914+ }
14915+ lval->num = n;
14916+ result = NUMBER;
14917+ }
14918+ break;
14919+
14920+ case '=':
14921+ if (exp[0] == '=')
14922+ {
14923+ ++exp;
14924+ lval->op = equal;
14925+ result = EQUOP2;
14926+ }
14927+ else
14928+ result = YYERRCODE;
14929+ break;
14930+
14931+ case '!':
14932+ if (exp[0] == '=')
14933+ {
14934+ ++exp;
14935+ lval->op = not_equal;
14936+ result = EQUOP2;
14937+ }
14938+ break;
14939+
14940+ case '&':
14941+ case '|':
14942+ if (exp[0] == result)
14943+ ++exp;
14944+ else
14945+ result = YYERRCODE;
14946+ break;
14947+
14948+ case '<':
14949+ if (exp[0] == '=')
14950+ {
14951+ ++exp;
14952+ lval->op = less_or_equal;
14953+ }
14954+ else
14955+ lval->op = less_than;
14956+ result = CMPOP2;
14957+ break;
14958+
14959+ case '>':
14960+ if (exp[0] == '=')
14961+ {
14962+ ++exp;
14963+ lval->op = greater_or_equal;
14964+ }
14965+ else
14966+ lval->op = greater_than;
14967+ result = CMPOP2;
14968+ break;
14969+
14970+ case '*':
14971+ lval->op = mult;
14972+ result = MULOP2;
14973+ break;
14974+
14975+ case '/':
14976+ lval->op = divide;
14977+ result = MULOP2;
14978+ break;
14979+
14980+ case '%':
14981+ lval->op = module;
14982+ result = MULOP2;
14983+ break;
14984+
14985+ case '+':
14986+ lval->op = plus;
14987+ result = ADDOP2;
14988+ break;
14989+
14990+ case '-':
14991+ lval->op = minus;
14992+ result = ADDOP2;
14993+ break;
14994+
14995+ case 'n':
14996+ case '?':
14997+ case ':':
14998+ case '(':
14999+ case ')':
15000+ /* Nothing, just return the character. */
15001+ break;
15002+
15003+ case ';':
15004+ case '\n':
15005+ case '\0':
15006+ /* Be safe and let the user call this function again. */
15007+ --exp;
15008+ result = YYEOF;
15009+ break;
15010+
15011+ default:
15012+ result = YYERRCODE;
15013+#if YYDEBUG != 0
15014+ --exp;
15015+#endif
15016+ break;
15017+ }
15018+
15019+ *pexp = exp;
15020+
15021+ return result;
15022+}
15023+
15024+
15025+static void
15026+yyerror (const char *str)
15027+{
15028+ /* Do nothing. We don't print error messages here. */
15029+}
15030--- lrzsz-0.12.20.safe/intl/po2tbl.sed.in 1998-04-26 09:20:52.000000000 -0400
15031+++ lrzsz-0.12.20/intl/po2tbl.sed.in 1969-12-31 19:00:00.000000000 -0500
15032@@ -1,102 +0,0 @@
15033-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
15034-# Copyright (C) 1995 Free Software Foundation, Inc.
15035-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
15036-#
15037-# This program is free software; you can redistribute it and/or modify
15038-# it under the terms of the GNU General Public License as published by
15039-# the Free Software Foundation; either version 2, or (at your option)
15040-# any later version.
15041-#
15042-# This program is distributed in the hope that it will be useful,
15043-# but WITHOUT ANY WARRANTY; without even the implied warranty of
15044-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15045-# GNU General Public License for more details.
15046-#
15047-# You should have received a copy of the GNU General Public License
15048-# along with this program; if not, write to the Free Software
15049-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15050-#
15051-1 {
15052- i\
15053-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
15054-\
15055-#if HAVE_CONFIG_H\
15056-# include <config.h>\
15057-#endif\
15058-\
15059-#include "libgettext.h"\
15060-\
15061-const struct _msg_ent _msg_tbl[] = {
15062- h
15063- s/.*/0/
15064- x
15065-}
15066-#
15067-# Write msgid entries in C array form.
15068-#
15069-/^msgid/ {
15070- s/msgid[ ]*\(".*"\)/ {\1/
15071- tb
15072-# Append the next line
15073- :b
15074- N
15075-# Look whether second part is continuation line.
15076- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
15077-# Yes, then branch.
15078- ta
15079-# Because we assume that the input file correctly formed the line
15080-# just read cannot be again be a msgid line. So it's safe to ignore
15081-# it.
15082- s/\(.*\)\n.*/\1/
15083- bc
15084-# We found a continuation line. But before printing insert '\'.
15085- :a
15086- s/\(.*\)\(\n.*\)/\1\\\2/
15087- P
15088-# We cannot use D here.
15089- s/.*\n\(.*\)/\1/
15090-# Some buggy seds do not clear the `successful substitution since last ``t'''
15091-# flag on `N', so we do a `t' here to clear it.
15092- tb
15093-# Not reached
15094- :c
15095- x
15096-# The following nice solution is by
15097-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
15098- td
15099-# Increment a decimal number in pattern space.
15100-# First hide trailing `9' digits.
15101- :d
15102- s/9\(_*\)$/_\1/
15103- td
15104-# Assure at least one digit is available.
15105- s/^\(_*\)$/0\1/
15106-# Increment the last digit.
15107- s/8\(_*\)$/9\1/
15108- s/7\(_*\)$/8\1/
15109- s/6\(_*\)$/7\1/
15110- s/5\(_*\)$/6\1/
15111- s/4\(_*\)$/5\1/
15112- s/3\(_*\)$/4\1/
15113- s/2\(_*\)$/3\1/
15114- s/1\(_*\)$/2\1/
15115- s/0\(_*\)$/1\1/
15116-# Convert the hidden `9' digits to `0's.
15117- s/_/0/g
15118- x
15119- G
15120- s/\(.*\)\n\([0-9]*\)/\1, \2},/
15121- s/\(.*\)"$/\1/
15122- p
15123-}
15124-#
15125-# Last line.
15126-#
15127-$ {
15128- i\
15129-};\
15130-
15131- g
15132- s/0*\(.*\)/int _msg_tbl_length = \1;/p
15133-}
15134-d
15135--- lrzsz-0.12.20.safe/intl/printf-args.c 1969-12-31 19:00:00.000000000 -0500
15136+++ lrzsz-0.12.20/intl/printf-args.c 2004-09-12 14:40:34.595711608 -0400
15137@@ -0,0 +1,119 @@
15138+/* Decomposed printf argument list.
15139+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15140+
15141+ This program is free software; you can redistribute it and/or modify it
15142+ under the terms of the GNU Library General Public License as published
15143+ by the Free Software Foundation; either version 2, or (at your option)
15144+ any later version.
15145+
15146+ This program is distributed in the hope that it will be useful,
15147+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15148+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15149+ Library General Public License for more details.
15150+
15151+ You should have received a copy of the GNU Library General Public
15152+ License along with this program; if not, write to the Free Software
15153+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15154+ USA. */
15155+
15156+#ifdef HAVE_CONFIG_H
15157+# include <config.h>
15158+#endif
15159+
15160+/* Specification. */
15161+#include "printf-args.h"
15162+
15163+#ifdef STATIC
15164+STATIC
15165+#endif
15166+int
15167+printf_fetchargs (va_list args, arguments *a)
15168+{
15169+ size_t i;
15170+ argument *ap;
15171+
15172+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
15173+ switch (ap->type)
15174+ {
15175+ case TYPE_SCHAR:
15176+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
15177+ break;
15178+ case TYPE_UCHAR:
15179+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
15180+ break;
15181+ case TYPE_SHORT:
15182+ ap->a.a_short = va_arg (args, /*short*/ int);
15183+ break;
15184+ case TYPE_USHORT:
15185+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
15186+ break;
15187+ case TYPE_INT:
15188+ ap->a.a_int = va_arg (args, int);
15189+ break;
15190+ case TYPE_UINT:
15191+ ap->a.a_uint = va_arg (args, unsigned int);
15192+ break;
15193+ case TYPE_LONGINT:
15194+ ap->a.a_longint = va_arg (args, long int);
15195+ break;
15196+ case TYPE_ULONGINT:
15197+ ap->a.a_ulongint = va_arg (args, unsigned long int);
15198+ break;
15199+#ifdef HAVE_LONG_LONG
15200+ case TYPE_LONGLONGINT:
15201+ ap->a.a_longlongint = va_arg (args, long long int);
15202+ break;
15203+ case TYPE_ULONGLONGINT:
15204+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
15205+ break;
15206+#endif
15207+ case TYPE_DOUBLE:
15208+ ap->a.a_double = va_arg (args, double);
15209+ break;
15210+#ifdef HAVE_LONG_DOUBLE
15211+ case TYPE_LONGDOUBLE:
15212+ ap->a.a_longdouble = va_arg (args, long double);
15213+ break;
15214+#endif
15215+ case TYPE_CHAR:
15216+ ap->a.a_char = va_arg (args, int);
15217+ break;
15218+#ifdef HAVE_WINT_T
15219+ case TYPE_WIDE_CHAR:
15220+ ap->a.a_wide_char = va_arg (args, wint_t);
15221+ break;
15222+#endif
15223+ case TYPE_STRING:
15224+ ap->a.a_string = va_arg (args, const char *);
15225+ break;
15226+#ifdef HAVE_WCHAR_T
15227+ case TYPE_WIDE_STRING:
15228+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
15229+ break;
15230+#endif
15231+ case TYPE_POINTER:
15232+ ap->a.a_pointer = va_arg (args, void *);
15233+ break;
15234+ case TYPE_COUNT_SCHAR_POINTER:
15235+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
15236+ break;
15237+ case TYPE_COUNT_SHORT_POINTER:
15238+ ap->a.a_count_short_pointer = va_arg (args, short *);
15239+ break;
15240+ case TYPE_COUNT_INT_POINTER:
15241+ ap->a.a_count_int_pointer = va_arg (args, int *);
15242+ break;
15243+ case TYPE_COUNT_LONGINT_POINTER:
15244+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
15245+ break;
15246+#ifdef HAVE_LONG_LONG
15247+ case TYPE_COUNT_LONGLONGINT_POINTER:
15248+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
15249+ break;
15250+#endif
15251+ default:
15252+ /* Unknown type. */
15253+ return -1;
15254+ }
15255+ return 0;
15256+}
15257--- lrzsz-0.12.20.safe/intl/printf-args.h 1969-12-31 19:00:00.000000000 -0500
15258+++ lrzsz-0.12.20/intl/printf-args.h 2004-09-12 14:40:34.601710696 -0400
15259@@ -0,0 +1,137 @@
15260+/* Decomposed printf argument list.
15261+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15262+
15263+ This program is free software; you can redistribute it and/or modify it
15264+ under the terms of the GNU Library General Public License as published
15265+ by the Free Software Foundation; either version 2, or (at your option)
15266+ any later version.
15267+
15268+ This program is distributed in the hope that it will be useful,
15269+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15270+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15271+ Library General Public License for more details.
15272+
15273+ You should have received a copy of the GNU Library General Public
15274+ License along with this program; if not, write to the Free Software
15275+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15276+ USA. */
15277+
15278+#ifndef _PRINTF_ARGS_H
15279+#define _PRINTF_ARGS_H
15280+
15281+/* Get size_t. */
15282+#include <stddef.h>
15283+
15284+/* Get wchar_t. */
15285+#ifdef HAVE_WCHAR_T
15286+# include <stddef.h>
15287+#endif
15288+
15289+/* Get wint_t. */
15290+#ifdef HAVE_WINT_T
15291+# include <wchar.h>
15292+#endif
15293+
15294+/* Get va_list. */
15295+#include <stdarg.h>
15296+
15297+
15298+/* Argument types */
15299+typedef enum
15300+{
15301+ TYPE_NONE,
15302+ TYPE_SCHAR,
15303+ TYPE_UCHAR,
15304+ TYPE_SHORT,
15305+ TYPE_USHORT,
15306+ TYPE_INT,
15307+ TYPE_UINT,
15308+ TYPE_LONGINT,
15309+ TYPE_ULONGINT,
15310+#ifdef HAVE_LONG_LONG
15311+ TYPE_LONGLONGINT,
15312+ TYPE_ULONGLONGINT,
15313+#endif
15314+ TYPE_DOUBLE,
15315+#ifdef HAVE_LONG_DOUBLE
15316+ TYPE_LONGDOUBLE,
15317+#endif
15318+ TYPE_CHAR,
15319+#ifdef HAVE_WINT_T
15320+ TYPE_WIDE_CHAR,
15321+#endif
15322+ TYPE_STRING,
15323+#ifdef HAVE_WCHAR_T
15324+ TYPE_WIDE_STRING,
15325+#endif
15326+ TYPE_POINTER,
15327+ TYPE_COUNT_SCHAR_POINTER,
15328+ TYPE_COUNT_SHORT_POINTER,
15329+ TYPE_COUNT_INT_POINTER,
15330+ TYPE_COUNT_LONGINT_POINTER
15331+#ifdef HAVE_LONG_LONG
15332+, TYPE_COUNT_LONGLONGINT_POINTER
15333+#endif
15334+} arg_type;
15335+
15336+/* Polymorphic argument */
15337+typedef struct
15338+{
15339+ arg_type type;
15340+ union
15341+ {
15342+ signed char a_schar;
15343+ unsigned char a_uchar;
15344+ short a_short;
15345+ unsigned short a_ushort;
15346+ int a_int;
15347+ unsigned int a_uint;
15348+ long int a_longint;
15349+ unsigned long int a_ulongint;
15350+#ifdef HAVE_LONG_LONG
15351+ long long int a_longlongint;
15352+ unsigned long long int a_ulonglongint;
15353+#endif
15354+ float a_float;
15355+ double a_double;
15356+#ifdef HAVE_LONG_DOUBLE
15357+ long double a_longdouble;
15358+#endif
15359+ int a_char;
15360+#ifdef HAVE_WINT_T
15361+ wint_t a_wide_char;
15362+#endif
15363+ const char* a_string;
15364+#ifdef HAVE_WCHAR_T
15365+ const wchar_t* a_wide_string;
15366+#endif
15367+ void* a_pointer;
15368+ signed char * a_count_schar_pointer;
15369+ short * a_count_short_pointer;
15370+ int * a_count_int_pointer;
15371+ long int * a_count_longint_pointer;
15372+#ifdef HAVE_LONG_LONG
15373+ long long int * a_count_longlongint_pointer;
15374+#endif
15375+ }
15376+ a;
15377+}
15378+argument;
15379+
15380+typedef struct
15381+{
15382+ size_t count;
15383+ argument *arg;
15384+}
15385+arguments;
15386+
15387+
15388+/* Fetch the arguments, putting them into a. */
15389+#ifdef STATIC
15390+STATIC
15391+#else
15392+extern
15393+#endif
15394+int printf_fetchargs (va_list args, arguments *a);
15395+
15396+#endif /* _PRINTF_ARGS_H */
15397--- lrzsz-0.12.20.safe/intl/printf.c 1969-12-31 19:00:00.000000000 -0500
15398+++ lrzsz-0.12.20/intl/printf.c 2004-09-12 14:40:34.607709784 -0400
15399@@ -0,0 +1,371 @@
15400+/* Formatted output to strings, using POSIX/XSI format strings with positions.
15401+ Copyright (C) 2003 Free Software Foundation, Inc.
15402+ Written by Bruno Haible <bruno@clisp.org>, 2003.
15403+
15404+ This program is free software; you can redistribute it and/or modify it
15405+ under the terms of the GNU Library General Public License as published
15406+ by the Free Software Foundation; either version 2, or (at your option)
15407+ any later version.
15408+
15409+ This program is distributed in the hope that it will be useful,
15410+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15411+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15412+ Library General Public License for more details.
15413+
15414+ You should have received a copy of the GNU Library General Public
15415+ License along with this program; if not, write to the Free Software
15416+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15417+ USA. */
15418+
15419+#ifdef HAVE_CONFIG_H
15420+# include <config.h>
15421+#endif
15422+
15423+#ifdef __GNUC__
15424+# define alloca __builtin_alloca
15425+# define HAVE_ALLOCA 1
15426+#else
15427+# ifdef _MSC_VER
15428+# include <malloc.h>
15429+# define alloca _alloca
15430+# else
15431+# if defined HAVE_ALLOCA_H || defined _LIBC
15432+# include <alloca.h>
15433+# else
15434+# ifdef _AIX
15435+ #pragma alloca
15436+# else
15437+# ifndef alloca
15438+char *alloca ();
15439+# endif
15440+# endif
15441+# endif
15442+# endif
15443+#endif
15444+
15445+#include <stdio.h>
15446+
15447+#if !HAVE_POSIX_PRINTF
15448+
15449+#include <stdlib.h>
15450+#include <string.h>
15451+
15452+/* When building a DLL, we must export some functions. Note that because
15453+ the functions are only defined for binary backward compatibility, we
15454+ don't need to use __declspec(dllimport) in any case. */
15455+#if defined _MSC_VER && BUILDING_DLL
15456+# define DLL_EXPORTED __declspec(dllexport)
15457+#else
15458+# define DLL_EXPORTED
15459+#endif
15460+
15461+#define STATIC static
15462+
15463+/* Define auxiliary functions declared in "printf-args.h". */
15464+#include "printf-args.c"
15465+
15466+/* Define auxiliary functions declared in "printf-parse.h". */
15467+#include "printf-parse.c"
15468+
15469+/* Define functions declared in "vasnprintf.h". */
15470+#define vasnprintf libintl_vasnprintf
15471+#include "vasnprintf.c"
15472+#if 0 /* not needed */
15473+#define asnprintf libintl_asnprintf
15474+#include "asnprintf.c"
15475+#endif
15476+
15477+DLL_EXPORTED
15478+int
15479+libintl_vfprintf (FILE *stream, const char *format, va_list args)
15480+{
15481+ if (strchr (format, '$') == NULL)
15482+ return vfprintf (stream, format, args);
15483+ else
15484+ {
15485+ size_t length;
15486+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15487+ int retval = -1;
15488+ if (result != NULL)
15489+ {
15490+ if (fwrite (result, 1, length, stream) == length)
15491+ retval = length;
15492+ free (result);
15493+ }
15494+ return retval;
15495+ }
15496+}
15497+
15498+DLL_EXPORTED
15499+int
15500+libintl_fprintf (FILE *stream, const char *format, ...)
15501+{
15502+ va_list args;
15503+ int retval;
15504+
15505+ va_start (args, format);
15506+ retval = libintl_vfprintf (stream, format, args);
15507+ va_end (args);
15508+ return retval;
15509+}
15510+
15511+DLL_EXPORTED
15512+int
15513+libintl_vprintf (const char *format, va_list args)
15514+{
15515+ return libintl_vfprintf (stdout, format, args);
15516+}
15517+
15518+DLL_EXPORTED
15519+int
15520+libintl_printf (const char *format, ...)
15521+{
15522+ va_list args;
15523+ int retval;
15524+
15525+ va_start (args, format);
15526+ retval = libintl_vprintf (format, args);
15527+ va_end (args);
15528+ return retval;
15529+}
15530+
15531+DLL_EXPORTED
15532+int
15533+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
15534+{
15535+ if (strchr (format, '$') == NULL)
15536+ return vsprintf (resultbuf, format, args);
15537+ else
15538+ {
15539+ size_t length = (size_t) ~0 / (4 * sizeof (char));
15540+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15541+ if (result != resultbuf)
15542+ {
15543+ free (result);
15544+ return -1;
15545+ }
15546+ else
15547+ return length;
15548+ }
15549+}
15550+
15551+DLL_EXPORTED
15552+int
15553+libintl_sprintf (char *resultbuf, const char *format, ...)
15554+{
15555+ va_list args;
15556+ int retval;
15557+
15558+ va_start (args, format);
15559+ retval = libintl_vsprintf (resultbuf, format, args);
15560+ va_end (args);
15561+ return retval;
15562+}
15563+
15564+#if HAVE_SNPRINTF
15565+
15566+# if HAVE_DECL__SNPRINTF
15567+ /* Windows. */
15568+# define system_vsnprintf _vsnprintf
15569+# else
15570+ /* Unix. */
15571+# define system_vsnprintf vsnprintf
15572+# endif
15573+
15574+DLL_EXPORTED
15575+int
15576+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
15577+{
15578+ if (strchr (format, '$') == NULL)
15579+ return system_vsnprintf (resultbuf, length, format, args);
15580+ else
15581+ {
15582+ size_t maxlength = length;
15583+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15584+ if (result != resultbuf)
15585+ {
15586+ if (maxlength > 0)
15587+ {
15588+ if (length < maxlength)
15589+ abort ();
15590+ memcpy (resultbuf, result, maxlength - 1);
15591+ resultbuf[maxlength - 1] = '\0';
15592+ }
15593+ free (result);
15594+ return -1;
15595+ }
15596+ else
15597+ return length;
15598+ }
15599+}
15600+
15601+DLL_EXPORTED
15602+int
15603+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
15604+{
15605+ va_list args;
15606+ int retval;
15607+
15608+ va_start (args, format);
15609+ retval = libintl_vsnprintf (resultbuf, length, format, args);
15610+ va_end (args);
15611+ return retval;
15612+}
15613+
15614+#endif
15615+
15616+#if HAVE_ASPRINTF
15617+
15618+DLL_EXPORTED
15619+int
15620+libintl_vasprintf (char **resultp, const char *format, va_list args)
15621+{
15622+ size_t length;
15623+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15624+ if (result == NULL)
15625+ return -1;
15626+ *resultp = result;
15627+ return length;
15628+}
15629+
15630+DLL_EXPORTED
15631+int
15632+libintl_asprintf (char **resultp, const char *format, ...)
15633+{
15634+ va_list args;
15635+ int retval;
15636+
15637+ va_start (args, format);
15638+ retval = libintl_vasprintf (resultp, format, args);
15639+ va_end (args);
15640+ return retval;
15641+}
15642+
15643+#endif
15644+
15645+#if HAVE_FWPRINTF
15646+
15647+#include <wchar.h>
15648+
15649+#define WIDE_CHAR_VERSION 1
15650+
15651+/* Define auxiliary functions declared in "wprintf-parse.h". */
15652+#include "printf-parse.c"
15653+
15654+/* Define functions declared in "vasnprintf.h". */
15655+#define vasnwprintf libintl_vasnwprintf
15656+#include "vasnprintf.c"
15657+#if 0 /* not needed */
15658+#define asnwprintf libintl_asnwprintf
15659+#include "asnprintf.c"
15660+#endif
15661+
15662+# if HAVE_DECL__SNWPRINTF
15663+ /* Windows. */
15664+# define system_vswprintf _vsnwprintf
15665+# else
15666+ /* Unix. */
15667+# define system_vswprintf vswprintf
15668+# endif
15669+
15670+DLL_EXPORTED
15671+int
15672+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
15673+{
15674+ if (wcschr (format, '$') == NULL)
15675+ return vfwprintf (stream, format, args);
15676+ else
15677+ {
15678+ size_t length;
15679+ wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
15680+ int retval = -1;
15681+ if (result != NULL)
15682+ {
15683+ size_t i;
15684+ for (i = 0; i < length; i++)
15685+ if (fputwc (result[i], stream) == WEOF)
15686+ break;
15687+ if (i == length)
15688+ retval = length;
15689+ free (result);
15690+ }
15691+ return retval;
15692+ }
15693+}
15694+
15695+DLL_EXPORTED
15696+int
15697+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
15698+{
15699+ va_list args;
15700+ int retval;
15701+
15702+ va_start (args, format);
15703+ retval = libintl_vfwprintf (stream, format, args);
15704+ va_end (args);
15705+ return retval;
15706+}
15707+
15708+DLL_EXPORTED
15709+int
15710+libintl_vwprintf (const wchar_t *format, va_list args)
15711+{
15712+ return libintl_vfwprintf (stdout, format, args);
15713+}
15714+
15715+DLL_EXPORTED
15716+int
15717+libintl_wprintf (const wchar_t *format, ...)
15718+{
15719+ va_list args;
15720+ int retval;
15721+
15722+ va_start (args, format);
15723+ retval = libintl_vwprintf (format, args);
15724+ va_end (args);
15725+ return retval;
15726+}
15727+
15728+DLL_EXPORTED
15729+int
15730+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
15731+{
15732+ if (wcschr (format, '$') == NULL)
15733+ return system_vswprintf (resultbuf, length, format, args);
15734+ else
15735+ {
15736+ size_t maxlength = length;
15737+ wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
15738+ if (result != resultbuf)
15739+ {
15740+ if (maxlength > 0)
15741+ {
15742+ if (length < maxlength)
15743+ abort ();
15744+ memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
15745+ resultbuf[maxlength - 1] = 0;
15746+ }
15747+ free (result);
15748+ return -1;
15749+ }
15750+ else
15751+ return length;
15752+ }
15753+}
15754+
15755+DLL_EXPORTED
15756+int
15757+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
15758+{
15759+ va_list args;
15760+ int retval;
15761+
15762+ va_start (args, format);
15763+ retval = libintl_vswprintf (resultbuf, length, format, args);
15764+ va_end (args);
15765+ return retval;
15766+}
15767+
15768+#endif
15769+
15770+#endif
15771--- lrzsz-0.12.20.safe/intl/printf-parse.c 1969-12-31 19:00:00.000000000 -0500
15772+++ lrzsz-0.12.20/intl/printf-parse.c 2004-09-12 14:40:34.622707504 -0400
15773@@ -0,0 +1,537 @@
15774+/* Formatted output to strings.
15775+ Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
15776+
15777+ This program is free software; you can redistribute it and/or modify it
15778+ under the terms of the GNU Library General Public License as published
15779+ by the Free Software Foundation; either version 2, or (at your option)
15780+ any later version.
15781+
15782+ This program is distributed in the hope that it will be useful,
15783+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15784+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15785+ Library General Public License for more details.
15786+
15787+ You should have received a copy of the GNU Library General Public
15788+ License along with this program; if not, write to the Free Software
15789+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15790+ USA. */
15791+
15792+#ifdef HAVE_CONFIG_H
15793+# include <config.h>
15794+#endif
15795+
15796+/* Specification. */
15797+#if WIDE_CHAR_VERSION
15798+# include "wprintf-parse.h"
15799+#else
15800+# include "printf-parse.h"
15801+#endif
15802+
15803+/* Get size_t, NULL. */
15804+#include <stddef.h>
15805+
15806+/* Get intmax_t. */
15807+#if HAVE_STDINT_H_WITH_UINTMAX
15808+# include <stdint.h>
15809+#endif
15810+#if HAVE_INTTYPES_H_WITH_UINTMAX
15811+# include <inttypes.h>
15812+#endif
15813+
15814+/* malloc(), realloc(), free(). */
15815+#include <stdlib.h>
15816+
15817+/* Checked size_t computations. */
15818+#include "xsize.h"
15819+
15820+#if WIDE_CHAR_VERSION
15821+# define PRINTF_PARSE wprintf_parse
15822+# define CHAR_T wchar_t
15823+# define DIRECTIVE wchar_t_directive
15824+# define DIRECTIVES wchar_t_directives
15825+#else
15826+# define PRINTF_PARSE printf_parse
15827+# define CHAR_T char
15828+# define DIRECTIVE char_directive
15829+# define DIRECTIVES char_directives
15830+#endif
15831+
15832+#ifdef STATIC
15833+STATIC
15834+#endif
15835+int
15836+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
15837+{
15838+ const CHAR_T *cp = format; /* pointer into format */
15839+ size_t arg_posn = 0; /* number of regular arguments consumed */
15840+ size_t d_allocated; /* allocated elements of d->dir */
15841+ size_t a_allocated; /* allocated elements of a->arg */
15842+ size_t max_width_length = 0;
15843+ size_t max_precision_length = 0;
15844+
15845+ d->count = 0;
15846+ d_allocated = 1;
15847+ d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
15848+ if (d->dir == NULL)
15849+ /* Out of memory. */
15850+ return -1;
15851+
15852+ a->count = 0;
15853+ a_allocated = 0;
15854+ a->arg = NULL;
15855+
15856+#define REGISTER_ARG(_index_,_type_) \
15857+ { \
15858+ size_t n = (_index_); \
15859+ if (n >= a_allocated) \
15860+ { \
15861+ size_t memory_size; \
15862+ argument *memory; \
15863+ \
15864+ a_allocated = xtimes (a_allocated, 2); \
15865+ if (a_allocated <= n) \
15866+ a_allocated = xsum (n, 1); \
15867+ memory_size = xtimes (a_allocated, sizeof (argument)); \
15868+ if (size_overflow_p (memory_size)) \
15869+ /* Overflow, would lead to out of memory. */ \
15870+ goto error; \
15871+ memory = (a->arg \
15872+ ? realloc (a->arg, memory_size) \
15873+ : malloc (memory_size)); \
15874+ if (memory == NULL) \
15875+ /* Out of memory. */ \
15876+ goto error; \
15877+ a->arg = memory; \
15878+ } \
15879+ while (a->count <= n) \
15880+ a->arg[a->count++].type = TYPE_NONE; \
15881+ if (a->arg[n].type == TYPE_NONE) \
15882+ a->arg[n].type = (_type_); \
15883+ else if (a->arg[n].type != (_type_)) \
15884+ /* Ambiguous type for positional argument. */ \
15885+ goto error; \
15886+ }
15887+
15888+ while (*cp != '\0')
15889+ {
15890+ CHAR_T c = *cp++;
15891+ if (c == '%')
15892+ {
15893+ size_t arg_index = ARG_NONE;
15894+ DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
15895+
15896+ /* Initialize the next directive. */
15897+ dp->dir_start = cp - 1;
15898+ dp->flags = 0;
15899+ dp->width_start = NULL;
15900+ dp->width_end = NULL;
15901+ dp->width_arg_index = ARG_NONE;
15902+ dp->precision_start = NULL;
15903+ dp->precision_end = NULL;
15904+ dp->precision_arg_index = ARG_NONE;
15905+ dp->arg_index = ARG_NONE;
15906+
15907+ /* Test for positional argument. */
15908+ if (*cp >= '0' && *cp <= '9')
15909+ {
15910+ const CHAR_T *np;
15911+
15912+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15913+ ;
15914+ if (*np == '$')
15915+ {
15916+ size_t n = 0;
15917+
15918+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15919+ n = xsum (xtimes (n, 10), *np - '0');
15920+ if (n == 0)
15921+ /* Positional argument 0. */
15922+ goto error;
15923+ if (size_overflow_p (n))
15924+ /* n too large, would lead to out of memory later. */
15925+ goto error;
15926+ arg_index = n - 1;
15927+ cp = np + 1;
15928+ }
15929+ }
15930+
15931+ /* Read the flags. */
15932+ for (;;)
15933+ {
15934+ if (*cp == '\'')
15935+ {
15936+ dp->flags |= FLAG_GROUP;
15937+ cp++;
15938+ }
15939+ else if (*cp == '-')
15940+ {
15941+ dp->flags |= FLAG_LEFT;
15942+ cp++;
15943+ }
15944+ else if (*cp == '+')
15945+ {
15946+ dp->flags |= FLAG_SHOWSIGN;
15947+ cp++;
15948+ }
15949+ else if (*cp == ' ')
15950+ {
15951+ dp->flags |= FLAG_SPACE;
15952+ cp++;
15953+ }
15954+ else if (*cp == '#')
15955+ {
15956+ dp->flags |= FLAG_ALT;
15957+ cp++;
15958+ }
15959+ else if (*cp == '0')
15960+ {
15961+ dp->flags |= FLAG_ZERO;
15962+ cp++;
15963+ }
15964+ else
15965+ break;
15966+ }
15967+
15968+ /* Parse the field width. */
15969+ if (*cp == '*')
15970+ {
15971+ dp->width_start = cp;
15972+ cp++;
15973+ dp->width_end = cp;
15974+ if (max_width_length < 1)
15975+ max_width_length = 1;
15976+
15977+ /* Test for positional argument. */
15978+ if (*cp >= '0' && *cp <= '9')
15979+ {
15980+ const CHAR_T *np;
15981+
15982+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15983+ ;
15984+ if (*np == '$')
15985+ {
15986+ size_t n = 0;
15987+
15988+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15989+ n = xsum (xtimes (n, 10), *np - '0');
15990+ if (n == 0)
15991+ /* Positional argument 0. */
15992+ goto error;
15993+ if (size_overflow_p (n))
15994+ /* n too large, would lead to out of memory later. */
15995+ goto error;
15996+ dp->width_arg_index = n - 1;
15997+ cp = np + 1;
15998+ }
15999+ }
16000+ if (dp->width_arg_index == ARG_NONE)
16001+ {
16002+ dp->width_arg_index = arg_posn++;
16003+ if (dp->width_arg_index == ARG_NONE)
16004+ /* arg_posn wrapped around. */
16005+ goto error;
16006+ }
16007+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
16008+ }
16009+ else if (*cp >= '0' && *cp <= '9')
16010+ {
16011+ size_t width_length;
16012+
16013+ dp->width_start = cp;
16014+ for (; *cp >= '0' && *cp <= '9'; cp++)
16015+ ;
16016+ dp->width_end = cp;
16017+ width_length = dp->width_end - dp->width_start;
16018+ if (max_width_length < width_length)
16019+ max_width_length = width_length;
16020+ }
16021+
16022+ /* Parse the precision. */
16023+ if (*cp == '.')
16024+ {
16025+ cp++;
16026+ if (*cp == '*')
16027+ {
16028+ dp->precision_start = cp - 1;
16029+ cp++;
16030+ dp->precision_end = cp;
16031+ if (max_precision_length < 2)
16032+ max_precision_length = 2;
16033+
16034+ /* Test for positional argument. */
16035+ if (*cp >= '0' && *cp <= '9')
16036+ {
16037+ const CHAR_T *np;
16038+
16039+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16040+ ;
16041+ if (*np == '$')
16042+ {
16043+ size_t n = 0;
16044+
16045+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16046+ n = xsum (xtimes (n, 10), *np - '0');
16047+ if (n == 0)
16048+ /* Positional argument 0. */
16049+ goto error;
16050+ if (size_overflow_p (n))
16051+ /* n too large, would lead to out of memory
16052+ later. */
16053+ goto error;
16054+ dp->precision_arg_index = n - 1;
16055+ cp = np + 1;
16056+ }
16057+ }
16058+ if (dp->precision_arg_index == ARG_NONE)
16059+ {
16060+ dp->precision_arg_index = arg_posn++;
16061+ if (dp->precision_arg_index == ARG_NONE)
16062+ /* arg_posn wrapped around. */
16063+ goto error;
16064+ }
16065+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
16066+ }
16067+ else
16068+ {
16069+ size_t precision_length;
16070+
16071+ dp->precision_start = cp - 1;
16072+ for (; *cp >= '0' && *cp <= '9'; cp++)
16073+ ;
16074+ dp->precision_end = cp;
16075+ precision_length = dp->precision_end - dp->precision_start;
16076+ if (max_precision_length < precision_length)
16077+ max_precision_length = precision_length;
16078+ }
16079+ }
16080+
16081+ {
16082+ arg_type type;
16083+
16084+ /* Parse argument type/size specifiers. */
16085+ {
16086+ int flags = 0;
16087+
16088+ for (;;)
16089+ {
16090+ if (*cp == 'h')
16091+ {
16092+ flags |= (1 << (flags & 1));
16093+ cp++;
16094+ }
16095+ else if (*cp == 'L')
16096+ {
16097+ flags |= 4;
16098+ cp++;
16099+ }
16100+ else if (*cp == 'l')
16101+ {
16102+ flags += 8;
16103+ cp++;
16104+ }
16105+#ifdef HAVE_INTMAX_T
16106+ else if (*cp == 'j')
16107+ {
16108+ if (sizeof (intmax_t) > sizeof (long))
16109+ {
16110+ /* intmax_t = long long */
16111+ flags += 16;
16112+ }
16113+ else if (sizeof (intmax_t) > sizeof (int))
16114+ {
16115+ /* intmax_t = long */
16116+ flags += 8;
16117+ }
16118+ cp++;
16119+ }
16120+#endif
16121+ else if (*cp == 'z' || *cp == 'Z')
16122+ {
16123+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
16124+ because the warning facility in gcc-2.95.2 understands
16125+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
16126+ if (sizeof (size_t) > sizeof (long))
16127+ {
16128+ /* size_t = long long */
16129+ flags += 16;
16130+ }
16131+ else if (sizeof (size_t) > sizeof (int))
16132+ {
16133+ /* size_t = long */
16134+ flags += 8;
16135+ }
16136+ cp++;
16137+ }
16138+ else if (*cp == 't')
16139+ {
16140+ if (sizeof (ptrdiff_t) > sizeof (long))
16141+ {
16142+ /* ptrdiff_t = long long */
16143+ flags += 16;
16144+ }
16145+ else if (sizeof (ptrdiff_t) > sizeof (int))
16146+ {
16147+ /* ptrdiff_t = long */
16148+ flags += 8;
16149+ }
16150+ cp++;
16151+ }
16152+ else
16153+ break;
16154+ }
16155+
16156+ /* Read the conversion character. */
16157+ c = *cp++;
16158+ switch (c)
16159+ {
16160+ case 'd': case 'i':
16161+#ifdef HAVE_LONG_LONG
16162+ if (flags >= 16 || (flags & 4))
16163+ type = TYPE_LONGLONGINT;
16164+ else
16165+#endif
16166+ if (flags >= 8)
16167+ type = TYPE_LONGINT;
16168+ else if (flags & 2)
16169+ type = TYPE_SCHAR;
16170+ else if (flags & 1)
16171+ type = TYPE_SHORT;
16172+ else
16173+ type = TYPE_INT;
16174+ break;
16175+ case 'o': case 'u': case 'x': case 'X':
16176+#ifdef HAVE_LONG_LONG
16177+ if (flags >= 16 || (flags & 4))
16178+ type = TYPE_ULONGLONGINT;
16179+ else
16180+#endif
16181+ if (flags >= 8)
16182+ type = TYPE_ULONGINT;
16183+ else if (flags & 2)
16184+ type = TYPE_UCHAR;
16185+ else if (flags & 1)
16186+ type = TYPE_USHORT;
16187+ else
16188+ type = TYPE_UINT;
16189+ break;
16190+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
16191+ case 'a': case 'A':
16192+#ifdef HAVE_LONG_DOUBLE
16193+ if (flags >= 16 || (flags & 4))
16194+ type = TYPE_LONGDOUBLE;
16195+ else
16196+#endif
16197+ type = TYPE_DOUBLE;
16198+ break;
16199+ case 'c':
16200+ if (flags >= 8)
16201+#ifdef HAVE_WINT_T
16202+ type = TYPE_WIDE_CHAR;
16203+#else
16204+ goto error;
16205+#endif
16206+ else
16207+ type = TYPE_CHAR;
16208+ break;
16209+#ifdef HAVE_WINT_T
16210+ case 'C':
16211+ type = TYPE_WIDE_CHAR;
16212+ c = 'c';
16213+ break;
16214+#endif
16215+ case 's':
16216+ if (flags >= 8)
16217+#ifdef HAVE_WCHAR_T
16218+ type = TYPE_WIDE_STRING;
16219+#else
16220+ goto error;
16221+#endif
16222+ else
16223+ type = TYPE_STRING;
16224+ break;
16225+#ifdef HAVE_WCHAR_T
16226+ case 'S':
16227+ type = TYPE_WIDE_STRING;
16228+ c = 's';
16229+ break;
16230+#endif
16231+ case 'p':
16232+ type = TYPE_POINTER;
16233+ break;
16234+ case 'n':
16235+#ifdef HAVE_LONG_LONG
16236+ if (flags >= 16 || (flags & 4))
16237+ type = TYPE_COUNT_LONGLONGINT_POINTER;
16238+ else
16239+#endif
16240+ if (flags >= 8)
16241+ type = TYPE_COUNT_LONGINT_POINTER;
16242+ else if (flags & 2)
16243+ type = TYPE_COUNT_SCHAR_POINTER;
16244+ else if (flags & 1)
16245+ type = TYPE_COUNT_SHORT_POINTER;
16246+ else
16247+ type = TYPE_COUNT_INT_POINTER;
16248+ break;
16249+ case '%':
16250+ type = TYPE_NONE;
16251+ break;
16252+ default:
16253+ /* Unknown conversion character. */
16254+ goto error;
16255+ }
16256+ }
16257+
16258+ if (type != TYPE_NONE)
16259+ {
16260+ dp->arg_index = arg_index;
16261+ if (dp->arg_index == ARG_NONE)
16262+ {
16263+ dp->arg_index = arg_posn++;
16264+ if (dp->arg_index == ARG_NONE)
16265+ /* arg_posn wrapped around. */
16266+ goto error;
16267+ }
16268+ REGISTER_ARG (dp->arg_index, type);
16269+ }
16270+ dp->conversion = c;
16271+ dp->dir_end = cp;
16272+ }
16273+
16274+ d->count++;
16275+ if (d->count >= d_allocated)
16276+ {
16277+ size_t memory_size;
16278+ DIRECTIVE *memory;
16279+
16280+ d_allocated = xtimes (d_allocated, 2);
16281+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
16282+ if (size_overflow_p (memory_size))
16283+ /* Overflow, would lead to out of memory. */
16284+ goto error;
16285+ memory = realloc (d->dir, memory_size);
16286+ if (memory == NULL)
16287+ /* Out of memory. */
16288+ goto error;
16289+ d->dir = memory;
16290+ }
16291+ }
16292+ }
16293+ d->dir[d->count].dir_start = cp;
16294+
16295+ d->max_width_length = max_width_length;
16296+ d->max_precision_length = max_precision_length;
16297+ return 0;
16298+
16299+error:
16300+ if (a->arg)
16301+ free (a->arg);
16302+ if (d->dir)
16303+ free (d->dir);
16304+ return -1;
16305+}
16306+
16307+#undef DIRECTIVES
16308+#undef DIRECTIVE
16309+#undef CHAR_T
16310+#undef PRINTF_PARSE
16311--- lrzsz-0.12.20.safe/intl/printf-parse.h 1969-12-31 19:00:00.000000000 -0500
16312+++ lrzsz-0.12.20/intl/printf-parse.h 2004-09-12 14:40:34.628706592 -0400
16313@@ -0,0 +1,75 @@
16314+/* Parse printf format string.
16315+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
16316+
16317+ This program is free software; you can redistribute it and/or modify it
16318+ under the terms of the GNU Library General Public License as published
16319+ by the Free Software Foundation; either version 2, or (at your option)
16320+ any later version.
16321+
16322+ This program is distributed in the hope that it will be useful,
16323+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16324+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16325+ Library General Public License for more details.
16326+
16327+ You should have received a copy of the GNU Library General Public
16328+ License along with this program; if not, write to the Free Software
16329+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16330+ USA. */
16331+
16332+#ifndef _PRINTF_PARSE_H
16333+#define _PRINTF_PARSE_H
16334+
16335+#include "printf-args.h"
16336+
16337+
16338+/* Flags */
16339+#define FLAG_GROUP 1 /* ' flag */
16340+#define FLAG_LEFT 2 /* - flag */
16341+#define FLAG_SHOWSIGN 4 /* + flag */
16342+#define FLAG_SPACE 8 /* space flag */
16343+#define FLAG_ALT 16 /* # flag */
16344+#define FLAG_ZERO 32
16345+
16346+/* arg_index value indicating that no argument is consumed. */
16347+#define ARG_NONE (~(size_t)0)
16348+
16349+/* A parsed directive. */
16350+typedef struct
16351+{
16352+ const char* dir_start;
16353+ const char* dir_end;
16354+ int flags;
16355+ const char* width_start;
16356+ const char* width_end;
16357+ size_t width_arg_index;
16358+ const char* precision_start;
16359+ const char* precision_end;
16360+ size_t precision_arg_index;
16361+ char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
16362+ size_t arg_index;
16363+}
16364+char_directive;
16365+
16366+/* A parsed format string. */
16367+typedef struct
16368+{
16369+ size_t count;
16370+ char_directive *dir;
16371+ size_t max_width_length;
16372+ size_t max_precision_length;
16373+}
16374+char_directives;
16375+
16376+
16377+/* Parses the format string. Fills in the number N of directives, and fills
16378+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
16379+ to the end of the format string. Also fills in the arg_type fields of the
16380+ arguments and the needed count of arguments. */
16381+#ifdef STATIC
16382+STATIC
16383+#else
16384+extern
16385+#endif
16386+int printf_parse (const char *format, char_directives *d, arguments *a);
16387+
16388+#endif /* _PRINTF_PARSE_H */
16389--- lrzsz-0.12.20.safe/intl/ref-add.sin 1969-12-31 19:00:00.000000000 -0500
16390+++ lrzsz-0.12.20/intl/ref-add.sin 2004-09-12 14:40:34.633705832 -0400
16391@@ -0,0 +1,31 @@
16392+# Add this package to a list of references stored in a text file.
16393+#
16394+# Copyright (C) 2000 Free Software Foundation, Inc.
16395+#
16396+# This program is free software; you can redistribute it and/or modify it
16397+# under the terms of the GNU Library General Public License as published
16398+# by the Free Software Foundation; either version 2, or (at your option)
16399+# any later version.
16400+#
16401+# This program is distributed in the hope that it will be useful,
16402+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16403+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16404+# Library General Public License for more details.
16405+#
16406+# You should have received a copy of the GNU Library General Public
16407+# License along with this program; if not, write to the Free Software
16408+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16409+# USA.
16410+#
16411+# Written by Bruno Haible <haible@clisp.cons.org>.
16412+#
16413+/^# Packages using this file: / {
16414+ s/# Packages using this file://
16415+ ta
16416+ :a
16417+ s/ @PACKAGE@ / @PACKAGE@ /
16418+ tb
16419+ s/ $/ @PACKAGE@ /
16420+ :b
16421+ s/^/# Packages using this file:/
16422+}
16423--- lrzsz-0.12.20.safe/intl/ref-del.sin 1969-12-31 19:00:00.000000000 -0500
16424+++ lrzsz-0.12.20/intl/ref-del.sin 2004-09-12 14:40:34.638705072 -0400
16425@@ -0,0 +1,26 @@
16426+# Remove this package from a list of references stored in a text file.
16427+#
16428+# Copyright (C) 2000 Free Software Foundation, Inc.
16429+#
16430+# This program is free software; you can redistribute it and/or modify it
16431+# under the terms of the GNU Library General Public License as published
16432+# by the Free Software Foundation; either version 2, or (at your option)
16433+# any later version.
16434+#
16435+# This program is distributed in the hope that it will be useful,
16436+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16437+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16438+# Library General Public License for more details.
16439+#
16440+# You should have received a copy of the GNU Library General Public
16441+# License along with this program; if not, write to the Free Software
16442+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16443+# USA.
16444+#
16445+# Written by Bruno Haible <haible@clisp.cons.org>.
16446+#
16447+/^# Packages using this file: / {
16448+ s/# Packages using this file://
16449+ s/ @PACKAGE@ / /
16450+ s/^/# Packages using this file:/
16451+}
16452--- lrzsz-0.12.20.safe/intl/relocatable.c 1969-12-31 19:00:00.000000000 -0500
16453+++ lrzsz-0.12.20/intl/relocatable.c 2004-09-12 14:40:34.644704160 -0400
16454@@ -0,0 +1,449 @@
16455+/* Provide relocatable packages.
16456+ Copyright (C) 2003 Free Software Foundation, Inc.
16457+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16458+
16459+ This program is free software; you can redistribute it and/or modify it
16460+ under the terms of the GNU Library General Public License as published
16461+ by the Free Software Foundation; either version 2, or (at your option)
16462+ any later version.
16463+
16464+ This program is distributed in the hope that it will be useful,
16465+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16466+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16467+ Library General Public License for more details.
16468+
16469+ You should have received a copy of the GNU Library General Public
16470+ License along with this program; if not, write to the Free Software
16471+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16472+ USA. */
16473+
16474+
16475+/* Tell glibc's <stdio.h> to provide a prototype for getline().
16476+ This must come before <config.h> because <config.h> may include
16477+ <features.h>, and once <features.h> has been included, it's too late. */
16478+#ifndef _GNU_SOURCE
16479+# define _GNU_SOURCE 1
16480+#endif
16481+
16482+#ifdef HAVE_CONFIG_H
16483+# include "config.h"
16484+#endif
16485+
16486+/* Specification. */
16487+#include "relocatable.h"
16488+
16489+#if ENABLE_RELOCATABLE
16490+
16491+#include <stddef.h>
16492+#include <stdio.h>
16493+#include <stdlib.h>
16494+#include <string.h>
16495+
16496+#ifdef NO_XMALLOC
16497+# define xmalloc malloc
16498+#else
16499+# include "xalloc.h"
16500+#endif
16501+
16502+#if defined _WIN32 || defined __WIN32__
16503+# define WIN32_LEAN_AND_MEAN
16504+# include <windows.h>
16505+#endif
16506+
16507+#if DEPENDS_ON_LIBCHARSET
16508+# include <libcharset.h>
16509+#endif
16510+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
16511+# include <iconv.h>
16512+#endif
16513+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
16514+# include <libintl.h>
16515+#endif
16516+
16517+/* Faked cheap 'bool'. */
16518+#undef bool
16519+#undef false
16520+#undef true
16521+#define bool int
16522+#define false 0
16523+#define true 1
16524+
16525+/* Pathname support.
16526+ ISSLASH(C) tests whether C is a directory separator character.
16527+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
16528+ */
16529+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16530+ /* Win32, OS/2, DOS */
16531+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
16532+# define HAS_DEVICE(P) \
16533+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
16534+ && (P)[1] == ':')
16535+# define IS_PATH_WITH_DIR(P) \
16536+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
16537+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
16538+#else
16539+ /* Unix */
16540+# define ISSLASH(C) ((C) == '/')
16541+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
16542+# define FILESYSTEM_PREFIX_LEN(P) 0
16543+#endif
16544+
16545+/* Original installation prefix. */
16546+static char *orig_prefix;
16547+static size_t orig_prefix_len;
16548+/* Current installation prefix. */
16549+static char *curr_prefix;
16550+static size_t curr_prefix_len;
16551+/* These prefixes do not end in a slash. Anything that will be concatenated
16552+ to them must start with a slash. */
16553+
16554+/* Sets the original and the current installation prefix of this module.
16555+ Relocation simply replaces a pathname starting with the original prefix
16556+ by the corresponding pathname with the current prefix instead. Both
16557+ prefixes should be directory names without trailing slash (i.e. use ""
16558+ instead of "/"). */
16559+static void
16560+set_this_relocation_prefix (const char *orig_prefix_arg,
16561+ const char *curr_prefix_arg)
16562+{
16563+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
16564+ /* Optimization: if orig_prefix and curr_prefix are equal, the
16565+ relocation is a nop. */
16566+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
16567+ {
16568+ /* Duplicate the argument strings. */
16569+ char *memory;
16570+
16571+ orig_prefix_len = strlen (orig_prefix_arg);
16572+ curr_prefix_len = strlen (curr_prefix_arg);
16573+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
16574+#ifdef NO_XMALLOC
16575+ if (memory != NULL)
16576+#endif
16577+ {
16578+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
16579+ orig_prefix = memory;
16580+ memory += orig_prefix_len + 1;
16581+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
16582+ curr_prefix = memory;
16583+ return;
16584+ }
16585+ }
16586+ orig_prefix = NULL;
16587+ curr_prefix = NULL;
16588+ /* Don't worry about wasted memory here - this function is usually only
16589+ called once. */
16590+}
16591+
16592+/* Sets the original and the current installation prefix of the package.
16593+ Relocation simply replaces a pathname starting with the original prefix
16594+ by the corresponding pathname with the current prefix instead. Both
16595+ prefixes should be directory names without trailing slash (i.e. use ""
16596+ instead of "/"). */
16597+void
16598+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
16599+{
16600+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16601+
16602+ /* Now notify all dependent libraries. */
16603+#if DEPENDS_ON_LIBCHARSET
16604+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16605+#endif
16606+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
16607+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16608+#endif
16609+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
16610+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16611+#endif
16612+}
16613+
16614+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
16615+
16616+/* Convenience function:
16617+ Computes the current installation prefix, based on the original
16618+ installation prefix, the original installation directory of a particular
16619+ file, and the current pathname of this file. Returns NULL upon failure. */
16620+#ifdef IN_LIBRARY
16621+#define compute_curr_prefix local_compute_curr_prefix
16622+static
16623+#endif
16624+const char *
16625+compute_curr_prefix (const char *orig_installprefix,
16626+ const char *orig_installdir,
16627+ const char *curr_pathname)
16628+{
16629+ const char *curr_installdir;
16630+ const char *rel_installdir;
16631+
16632+ if (curr_pathname == NULL)
16633+ return NULL;
16634+
16635+ /* Determine the relative installation directory, relative to the prefix.
16636+ This is simply the difference between orig_installprefix and
16637+ orig_installdir. */
16638+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
16639+ != 0)
16640+ /* Shouldn't happen - nothing should be installed outside $(prefix). */
16641+ return NULL;
16642+ rel_installdir = orig_installdir + strlen (orig_installprefix);
16643+
16644+ /* Determine the current installation directory. */
16645+ {
16646+ const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
16647+ const char *p = curr_pathname + strlen (curr_pathname);
16648+ char *q;
16649+
16650+ while (p > p_base)
16651+ {
16652+ p--;
16653+ if (ISSLASH (*p))
16654+ break;
16655+ }
16656+
16657+ q = (char *) xmalloc (p - curr_pathname + 1);
16658+#ifdef NO_XMALLOC
16659+ if (q == NULL)
16660+ return NULL;
16661+#endif
16662+ memcpy (q, curr_pathname, p - curr_pathname);
16663+ q[p - curr_pathname] = '\0';
16664+ curr_installdir = q;
16665+ }
16666+
16667+ /* Compute the current installation prefix by removing the trailing
16668+ rel_installdir from it. */
16669+ {
16670+ const char *rp = rel_installdir + strlen (rel_installdir);
16671+ const char *cp = curr_installdir + strlen (curr_installdir);
16672+ const char *cp_base =
16673+ curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
16674+
16675+ while (rp > rel_installdir && cp > cp_base)
16676+ {
16677+ bool same = false;
16678+ const char *rpi = rp;
16679+ const char *cpi = cp;
16680+
16681+ while (rpi > rel_installdir && cpi > cp_base)
16682+ {
16683+ rpi--;
16684+ cpi--;
16685+ if (ISSLASH (*rpi) || ISSLASH (*cpi))
16686+ {
16687+ if (ISSLASH (*rpi) && ISSLASH (*cpi))
16688+ same = true;
16689+ break;
16690+ }
16691+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16692+ /* Win32, OS/2, DOS - case insignificant filesystem */
16693+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
16694+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
16695+ break;
16696+#else
16697+ if (*rpi != *cpi)
16698+ break;
16699+#endif
16700+ }
16701+ if (!same)
16702+ break;
16703+ /* The last pathname component was the same. opi and cpi now point
16704+ to the slash before it. */
16705+ rp = rpi;
16706+ cp = cpi;
16707+ }
16708+
16709+ if (rp > rel_installdir)
16710+ /* Unexpected: The curr_installdir does not end with rel_installdir. */
16711+ return NULL;
16712+
16713+ {
16714+ size_t curr_prefix_len = cp - curr_installdir;
16715+ char *curr_prefix;
16716+
16717+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
16718+#ifdef NO_XMALLOC
16719+ if (curr_prefix == NULL)
16720+ return NULL;
16721+#endif
16722+ memcpy (curr_prefix, curr_installdir, curr_prefix_len);
16723+ curr_prefix[curr_prefix_len] = '\0';
16724+
16725+ return curr_prefix;
16726+ }
16727+ }
16728+}
16729+
16730+#endif /* !IN_LIBRARY || PIC */
16731+
16732+#if defined PIC && defined INSTALLDIR
16733+
16734+/* Full pathname of shared library, or NULL. */
16735+static char *shared_library_fullname;
16736+
16737+#if defined _WIN32 || defined __WIN32__
16738+
16739+/* Determine the full pathname of the shared library when it is loaded. */
16740+
16741+BOOL WINAPI
16742+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
16743+{
16744+ (void) reserved;
16745+
16746+ if (event == DLL_PROCESS_ATTACH)
16747+ {
16748+ /* The DLL is being loaded into an application's address range. */
16749+ static char location[MAX_PATH];
16750+
16751+ if (!GetModuleFileName (module_handle, location, sizeof (location)))
16752+ /* Shouldn't happen. */
16753+ return FALSE;
16754+
16755+ if (!IS_PATH_WITH_DIR (location))
16756+ /* Shouldn't happen. */
16757+ return FALSE;
16758+
16759+ shared_library_fullname = strdup (location);
16760+ }
16761+
16762+ return TRUE;
16763+}
16764+
16765+#else /* Unix */
16766+
16767+static void
16768+find_shared_library_fullname ()
16769+{
16770+#if defined __linux__ && __GLIBC__ >= 2
16771+ /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
16772+ FILE *fp;
16773+
16774+ /* Open the current process' maps file. It describes one VMA per line. */
16775+ fp = fopen ("/proc/self/maps", "r");
16776+ if (fp)
16777+ {
16778+ unsigned long address = (unsigned long) &find_shared_library_fullname;
16779+ for (;;)
16780+ {
16781+ unsigned long start, end;
16782+ int c;
16783+
16784+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
16785+ break;
16786+ if (address >= start && address <= end - 1)
16787+ {
16788+ /* Found it. Now see if this line contains a filename. */
16789+ while (c = getc (fp), c != EOF && c != '\n' && c != '/')
16790+ continue;
16791+ if (c == '/')
16792+ {
16793+ size_t size;
16794+ int len;
16795+
16796+ ungetc (c, fp);
16797+ shared_library_fullname = NULL; size = 0;
16798+ len = getline (&shared_library_fullname, &size, fp);
16799+ if (len >= 0)
16800+ {
16801+ /* Success: filled shared_library_fullname. */
16802+ if (len > 0 && shared_library_fullname[len - 1] == '\n')
16803+ shared_library_fullname[len - 1] = '\0';
16804+ }
16805+ }
16806+ break;
16807+ }
16808+ while (c = getc (fp), c != EOF && c != '\n')
16809+ continue;
16810+ }
16811+ fclose (fp);
16812+ }
16813+#endif
16814+}
16815+
16816+#endif /* WIN32 / Unix */
16817+
16818+/* Return the full pathname of the current shared library.
16819+ Return NULL if unknown.
16820+ Guaranteed to work only on Linux and Woe32. */
16821+static char *
16822+get_shared_library_fullname ()
16823+{
16824+#if !(defined _WIN32 || defined __WIN32__)
16825+ static bool tried_find_shared_library_fullname;
16826+ if (!tried_find_shared_library_fullname)
16827+ {
16828+ find_shared_library_fullname ();
16829+ tried_find_shared_library_fullname = true;
16830+ }
16831+#endif
16832+ return shared_library_fullname;
16833+}
16834+
16835+#endif /* PIC */
16836+
16837+/* Returns the pathname, relocated according to the current installation
16838+ directory. */
16839+const char *
16840+relocate (const char *pathname)
16841+{
16842+#if defined PIC && defined INSTALLDIR
16843+ static int initialized;
16844+
16845+ /* Initialization code for a shared library. */
16846+ if (!initialized)
16847+ {
16848+ /* At this point, orig_prefix and curr_prefix likely have already been
16849+ set through the main program's set_program_name_and_installdir
16850+ function. This is sufficient in the case that the library has
16851+ initially been installed in the same orig_prefix. But we can do
16852+ better, to also cover the cases that 1. it has been installed
16853+ in a different prefix before being moved to orig_prefix and (later)
16854+ to curr_prefix, 2. unlike the program, it has not moved away from
16855+ orig_prefix. */
16856+ const char *orig_installprefix = INSTALLPREFIX;
16857+ const char *orig_installdir = INSTALLDIR;
16858+ const char *curr_prefix_better;
16859+
16860+ curr_prefix_better =
16861+ compute_curr_prefix (orig_installprefix, orig_installdir,
16862+ get_shared_library_fullname ());
16863+ if (curr_prefix_better == NULL)
16864+ curr_prefix_better = curr_prefix;
16865+
16866+ set_relocation_prefix (orig_installprefix, curr_prefix_better);
16867+
16868+ initialized = 1;
16869+ }
16870+#endif
16871+
16872+ /* Note: It is not necessary to perform case insensitive comparison here,
16873+ even for DOS-like filesystems, because the pathname argument was
16874+ typically created from the same Makefile variable as orig_prefix came
16875+ from. */
16876+ if (orig_prefix != NULL && curr_prefix != NULL
16877+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
16878+ {
16879+ if (pathname[orig_prefix_len] == '\0')
16880+ /* pathname equals orig_prefix. */
16881+ return curr_prefix;
16882+ if (ISSLASH (pathname[orig_prefix_len]))
16883+ {
16884+ /* pathname starts with orig_prefix. */
16885+ const char *pathname_tail = &pathname[orig_prefix_len];
16886+ char *result =
16887+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
16888+
16889+#ifdef NO_XMALLOC
16890+ if (result != NULL)
16891+#endif
16892+ {
16893+ memcpy (result, curr_prefix, curr_prefix_len);
16894+ strcpy (result + curr_prefix_len, pathname_tail);
16895+ return result;
16896+ }
16897+ }
16898+ }
16899+ /* Nothing to relocate. */
16900+ return pathname;
16901+}
16902+
16903+#endif
16904--- lrzsz-0.12.20.safe/intl/relocatable.h 1969-12-31 19:00:00.000000000 -0500
16905+++ lrzsz-0.12.20/intl/relocatable.h 2004-09-12 14:40:34.651703096 -0400
16906@@ -0,0 +1,77 @@
16907+/* Provide relocatable packages.
16908+ Copyright (C) 2003 Free Software Foundation, Inc.
16909+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16910+
16911+ This program is free software; you can redistribute it and/or modify it
16912+ under the terms of the GNU Library General Public License as published
16913+ by the Free Software Foundation; either version 2, or (at your option)
16914+ any later version.
16915+
16916+ This program is distributed in the hope that it will be useful,
16917+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16918+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16919+ Library General Public License for more details.
16920+
16921+ You should have received a copy of the GNU Library General Public
16922+ License along with this program; if not, write to the Free Software
16923+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16924+ USA. */
16925+
16926+#ifndef _RELOCATABLE_H
16927+#define _RELOCATABLE_H
16928+
16929+#ifdef __cplusplus
16930+extern "C" {
16931+#endif
16932+
16933+
16934+/* This can be enabled through the configure --enable-relocatable option. */
16935+#if ENABLE_RELOCATABLE
16936+
16937+/* When building a DLL, we must export some functions. Note that because
16938+ this is a private .h file, we don't need to use __declspec(dllimport)
16939+ in any case. */
16940+#if defined _MSC_VER && BUILDING_DLL
16941+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
16942+#else
16943+# define RELOCATABLE_DLL_EXPORTED
16944+#endif
16945+
16946+/* Sets the original and the current installation prefix of the package.
16947+ Relocation simply replaces a pathname starting with the original prefix
16948+ by the corresponding pathname with the current prefix instead. Both
16949+ prefixes should be directory names without trailing slash (i.e. use ""
16950+ instead of "/"). */
16951+extern RELOCATABLE_DLL_EXPORTED void
16952+ set_relocation_prefix (const char *orig_prefix,
16953+ const char *curr_prefix);
16954+
16955+/* Returns the pathname, relocated according to the current installation
16956+ directory. */
16957+extern const char * relocate (const char *pathname);
16958+
16959+/* Memory management: relocate() leaks memory, because it has to construct
16960+ a fresh pathname. If this is a problem because your program calls
16961+ relocate() frequently, think about caching the result. */
16962+
16963+/* Convenience function:
16964+ Computes the current installation prefix, based on the original
16965+ installation prefix, the original installation directory of a particular
16966+ file, and the current pathname of this file. Returns NULL upon failure. */
16967+extern const char * compute_curr_prefix (const char *orig_installprefix,
16968+ const char *orig_installdir,
16969+ const char *curr_pathname);
16970+
16971+#else
16972+
16973+/* By default, we use the hardwired pathnames. */
16974+#define relocate(pathname) (pathname)
16975+
16976+#endif
16977+
16978+
16979+#ifdef __cplusplus
16980+}
16981+#endif
16982+
16983+#endif /* _RELOCATABLE_H */
16984--- lrzsz-0.12.20.safe/intl/textdomain.c 1998-04-26 09:22:37.000000000 -0400
16985+++ lrzsz-0.12.20/intl/textdomain.c 2004-09-12 14:40:34.656702336 -0400
16986@@ -1,51 +1,60 @@
16987-/* Implementation of the textdomain(3) function
16988- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
16989- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
16990+/* Implementation of the textdomain(3) function.
16991+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
16992
16993- This program is free software; you can redistribute it and/or modify
16994- it under the terms of the GNU General Public License as published by
16995- the Free Software Foundation; either version 2, or (at your option)
16996+ This program is free software; you can redistribute it and/or modify it
16997+ under the terms of the GNU Library General Public License as published
16998+ by the Free Software Foundation; either version 2, or (at your option)
16999 any later version.
17000
17001 This program is distributed in the hope that it will be useful,
17002 but WITHOUT ANY WARRANTY; without even the implied warranty of
17003- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17004- GNU General Public License for more details.
17005+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17006+ Library General Public License for more details.
17007
17008- You should have received a copy of the GNU General Public License
17009- along with this program; if not, write to the Free Software Foundation,
17010- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17011+ You should have received a copy of the GNU Library General Public
17012+ License along with this program; if not, write to the Free Software
17013+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17014+ USA. */
17015
17016 #ifdef HAVE_CONFIG_H
17017 # include <config.h>
17018 #endif
17019
17020-#if defined STDC_HEADERS || defined _LIBC
17021-# include <stdlib.h>
17022-#endif
17023+#include <stdlib.h>
17024+#include <string.h>
17025
17026-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
17027-# include <string.h>
17028+#ifdef _LIBC
17029+# include <libintl.h>
17030 #else
17031-# include <strings.h>
17032-# ifndef memcpy
17033-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
17034-# endif
17035+# include "libgnuintl.h"
17036 #endif
17037+#include "gettextP.h"
17038
17039 #ifdef _LIBC
17040-# include <libintl.h>
17041+/* We have to handle multi-threaded applications. */
17042+# include <bits/libc-lock.h>
17043 #else
17044-# include "libgettext.h"
17045+/* Provide dummy implementation if this is outside glibc. */
17046+# define __libc_rwlock_define(CLASS, NAME)
17047+# define __libc_rwlock_wrlock(NAME)
17048+# define __libc_rwlock_unlock(NAME)
17049+#endif
17050+
17051+/* The internal variables in the standalone libintl.a must have different
17052+ names than the internal variables in GNU libc, otherwise programs
17053+ using libintl.a cannot be linked statically. */
17054+#if !defined _LIBC
17055+# define _nl_default_default_domain libintl_nl_default_default_domain
17056+# define _nl_current_default_domain libintl_nl_current_default_domain
17057 #endif
17058
17059 /* @@ end of prolog @@ */
17060
17061 /* Name of the default text domain. */
17062-extern const char _nl_default_default_domain[];
17063+extern const char _nl_default_default_domain[] attribute_hidden;
17064
17065 /* Default text domain in which entries for gettext(3) are to be found. */
17066-extern const char *_nl_current_default_domain;
17067+extern const char *_nl_current_default_domain attribute_hidden;
17068
17069
17070 /* Names for the libintl functions are a problem. They must not clash
17071@@ -54,50 +63,76 @@
17072 prefix. So we have to make a difference here. */
17073 #ifdef _LIBC
17074 # define TEXTDOMAIN __textdomain
17075-# define strdup(str) __strdup (str)
17076+# ifndef strdup
17077+# define strdup(str) __strdup (str)
17078+# endif
17079 #else
17080-# define TEXTDOMAIN textdomain__
17081+# define TEXTDOMAIN libintl_textdomain
17082 #endif
17083
17084+/* Lock variable to protect the global data in the gettext implementation. */
17085+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
17086+
17087 /* Set the current default message catalog to DOMAINNAME.
17088 If DOMAINNAME is null, return the current default.
17089 If DOMAINNAME is "", reset to the default of "messages". */
17090 char *
17091-TEXTDOMAIN (domainname)
17092- const char *domainname;
17093+TEXTDOMAIN (const char *domainname)
17094 {
17095- char *old;
17096+ char *new_domain;
17097+ char *old_domain;
17098
17099 /* A NULL pointer requests the current setting. */
17100 if (domainname == NULL)
17101 return (char *) _nl_current_default_domain;
17102
17103- old = (char *) _nl_current_default_domain;
17104+ __libc_rwlock_wrlock (_nl_state_lock);
17105+
17106+ old_domain = (char *) _nl_current_default_domain;
17107
17108 /* If domain name is the null string set to default domain "messages". */
17109 if (domainname[0] == '\0'
17110 || strcmp (domainname, _nl_default_default_domain) == 0)
17111- _nl_current_default_domain = _nl_default_default_domain;
17112+ {
17113+ _nl_current_default_domain = _nl_default_default_domain;
17114+ new_domain = (char *) _nl_current_default_domain;
17115+ }
17116+ else if (strcmp (domainname, old_domain) == 0)
17117+ /* This can happen and people will use it to signal that some
17118+ environment variable changed. */
17119+ new_domain = old_domain;
17120 else
17121 {
17122 /* If the following malloc fails `_nl_current_default_domain'
17123 will be NULL. This value will be returned and so signals we
17124 are out of core. */
17125 #if defined _LIBC || defined HAVE_STRDUP
17126- _nl_current_default_domain = strdup (domainname);
17127+ new_domain = strdup (domainname);
17128 #else
17129 size_t len = strlen (domainname) + 1;
17130- char *cp = (char *) malloc (len);
17131- if (cp != NULL)
17132- memcpy (cp, domainname, len);
17133- _nl_current_default_domain = cp;
17134+ new_domain = (char *) malloc (len);
17135+ if (new_domain != NULL)
17136+ memcpy (new_domain, domainname, len);
17137 #endif
17138+
17139+ if (new_domain != NULL)
17140+ _nl_current_default_domain = new_domain;
17141 }
17142
17143- if (old != _nl_default_default_domain)
17144- free (old);
17145+ /* We use this possibility to signal a change of the loaded catalogs
17146+ since this is most likely the case and there is no other easy we
17147+ to do it. Do it only when the call was successful. */
17148+ if (new_domain != NULL)
17149+ {
17150+ ++_nl_msg_cat_cntr;
17151
17152- return (char *) _nl_current_default_domain;
17153+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
17154+ free (old_domain);
17155+ }
17156+
17157+ __libc_rwlock_unlock (_nl_state_lock);
17158+
17159+ return new_domain;
17160 }
17161
17162 #ifdef _LIBC
17163--- lrzsz-0.12.20.safe/intl/vasnprintf.c 1969-12-31 19:00:00.000000000 -0500
17164+++ lrzsz-0.12.20/intl/vasnprintf.c 2004-09-12 14:40:34.662701424 -0400
17165@@ -0,0 +1,887 @@
17166+/* vsprintf with automatic memory allocation.
17167+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
17168+
17169+ This program is free software; you can redistribute it and/or modify it
17170+ under the terms of the GNU Library General Public License as published
17171+ by the Free Software Foundation; either version 2, or (at your option)
17172+ any later version.
17173+
17174+ This program is distributed in the hope that it will be useful,
17175+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17176+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17177+ Library General Public License for more details.
17178+
17179+ You should have received a copy of the GNU Library General Public
17180+ License along with this program; if not, write to the Free Software
17181+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17182+ USA. */
17183+
17184+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
17185+ This must come before <config.h> because <config.h> may include
17186+ <features.h>, and once <features.h> has been included, it's too late. */
17187+#ifndef _GNU_SOURCE
17188+# define _GNU_SOURCE 1
17189+#endif
17190+
17191+#ifdef HAVE_CONFIG_H
17192+# include <config.h>
17193+#endif
17194+#ifndef IN_LIBINTL
17195+# include <alloca.h>
17196+#endif
17197+
17198+/* Specification. */
17199+#if WIDE_CHAR_VERSION
17200+# include "vasnwprintf.h"
17201+#else
17202+# include "vasnprintf.h"
17203+#endif
17204+
17205+#include <stdio.h> /* snprintf(), sprintf() */
17206+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
17207+#include <string.h> /* memcpy(), strlen() */
17208+#include <errno.h> /* errno */
17209+#include <limits.h> /* CHAR_BIT */
17210+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
17211+#if WIDE_CHAR_VERSION
17212+# include "wprintf-parse.h"
17213+#else
17214+# include "printf-parse.h"
17215+#endif
17216+
17217+/* Checked size_t computations. */
17218+#include "xsize.h"
17219+
17220+#ifdef HAVE_WCHAR_T
17221+# ifdef HAVE_WCSLEN
17222+# define local_wcslen wcslen
17223+# else
17224+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
17225+ a dependency towards this library, here is a local substitute.
17226+ Define this substitute only once, even if this file is included
17227+ twice in the same compilation unit. */
17228+# ifndef local_wcslen_defined
17229+# define local_wcslen_defined 1
17230+static size_t
17231+local_wcslen (const wchar_t *s)
17232+{
17233+ const wchar_t *ptr;
17234+
17235+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
17236+ ;
17237+ return ptr - s;
17238+}
17239+# endif
17240+# endif
17241+#endif
17242+
17243+#if WIDE_CHAR_VERSION
17244+# define VASNPRINTF vasnwprintf
17245+# define CHAR_T wchar_t
17246+# define DIRECTIVE wchar_t_directive
17247+# define DIRECTIVES wchar_t_directives
17248+# define PRINTF_PARSE wprintf_parse
17249+# define USE_SNPRINTF 1
17250+# if HAVE_DECL__SNWPRINTF
17251+ /* On Windows, the function swprintf() has a different signature than
17252+ on Unix; we use the _snwprintf() function instead. */
17253+# define SNPRINTF _snwprintf
17254+# else
17255+ /* Unix. */
17256+# define SNPRINTF swprintf
17257+# endif
17258+#else
17259+# define VASNPRINTF vasnprintf
17260+# define CHAR_T char
17261+# define DIRECTIVE char_directive
17262+# define DIRECTIVES char_directives
17263+# define PRINTF_PARSE printf_parse
17264+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
17265+# if HAVE_DECL__SNPRINTF
17266+ /* Windows. */
17267+# define SNPRINTF _snprintf
17268+# else
17269+ /* Unix. */
17270+# define SNPRINTF snprintf
17271+# endif
17272+#endif
17273+
17274+CHAR_T *
17275+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
17276+{
17277+ DIRECTIVES d;
17278+ arguments a;
17279+
17280+ if (PRINTF_PARSE (format, &d, &a) < 0)
17281+ {
17282+ errno = EINVAL;
17283+ return NULL;
17284+ }
17285+
17286+#define CLEANUP() \
17287+ free (d.dir); \
17288+ if (a.arg) \
17289+ free (a.arg);
17290+
17291+ if (printf_fetchargs (args, &a) < 0)
17292+ {
17293+ CLEANUP ();
17294+ errno = EINVAL;
17295+ return NULL;
17296+ }
17297+
17298+ {
17299+ size_t buf_neededlength;
17300+ CHAR_T *buf;
17301+ CHAR_T *buf_malloced;
17302+ const CHAR_T *cp;
17303+ size_t i;
17304+ DIRECTIVE *dp;
17305+ /* Output string accumulator. */
17306+ CHAR_T *result;
17307+ size_t allocated;
17308+ size_t length;
17309+
17310+ /* Allocate a small buffer that will hold a directive passed to
17311+ sprintf or snprintf. */
17312+ buf_neededlength =
17313+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
17314+#if HAVE_ALLOCA
17315+ if (buf_neededlength < 4000 / sizeof (CHAR_T))
17316+ {
17317+ buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
17318+ buf_malloced = NULL;
17319+ }
17320+ else
17321+#endif
17322+ {
17323+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
17324+ if (size_overflow_p (buf_memsize))
17325+ goto out_of_memory_1;
17326+ buf = (CHAR_T *) malloc (buf_memsize);
17327+ if (buf == NULL)
17328+ goto out_of_memory_1;
17329+ buf_malloced = buf;
17330+ }
17331+
17332+ if (resultbuf != NULL)
17333+ {
17334+ result = resultbuf;
17335+ allocated = *lengthp;
17336+ }
17337+ else
17338+ {
17339+ result = NULL;
17340+ allocated = 0;
17341+ }
17342+ length = 0;
17343+ /* Invariants:
17344+ result is either == resultbuf or == NULL or malloc-allocated.
17345+ If length > 0, then result != NULL. */
17346+
17347+ /* Ensures that allocated >= needed. Aborts through a jump to
17348+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
17349+#define ENSURE_ALLOCATION(needed) \
17350+ if ((needed) > allocated) \
17351+ { \
17352+ size_t memory_size; \
17353+ CHAR_T *memory; \
17354+ \
17355+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
17356+ if ((needed) > allocated) \
17357+ allocated = (needed); \
17358+ memory_size = xtimes (allocated, sizeof (CHAR_T)); \
17359+ if (size_overflow_p (memory_size)) \
17360+ goto out_of_memory; \
17361+ if (result == resultbuf || result == NULL) \
17362+ memory = (CHAR_T *) malloc (memory_size); \
17363+ else \
17364+ memory = (CHAR_T *) realloc (result, memory_size); \
17365+ if (memory == NULL) \
17366+ goto out_of_memory; \
17367+ if (result == resultbuf && length > 0) \
17368+ memcpy (memory, result, length * sizeof (CHAR_T)); \
17369+ result = memory; \
17370+ }
17371+
17372+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
17373+ {
17374+ if (cp != dp->dir_start)
17375+ {
17376+ size_t n = dp->dir_start - cp;
17377+ size_t augmented_length = xsum (length, n);
17378+
17379+ ENSURE_ALLOCATION (augmented_length);
17380+ memcpy (result + length, cp, n * sizeof (CHAR_T));
17381+ length = augmented_length;
17382+ }
17383+ if (i == d.count)
17384+ break;
17385+
17386+ /* Execute a single directive. */
17387+ if (dp->conversion == '%')
17388+ {
17389+ size_t augmented_length;
17390+
17391+ if (!(dp->arg_index == ARG_NONE))
17392+ abort ();
17393+ augmented_length = xsum (length, 1);
17394+ ENSURE_ALLOCATION (augmented_length);
17395+ result[length] = '%';
17396+ length = augmented_length;
17397+ }
17398+ else
17399+ {
17400+ if (!(dp->arg_index != ARG_NONE))
17401+ abort ();
17402+
17403+ if (dp->conversion == 'n')
17404+ {
17405+ switch (a.arg[dp->arg_index].type)
17406+ {
17407+ case TYPE_COUNT_SCHAR_POINTER:
17408+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
17409+ break;
17410+ case TYPE_COUNT_SHORT_POINTER:
17411+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
17412+ break;
17413+ case TYPE_COUNT_INT_POINTER:
17414+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
17415+ break;
17416+ case TYPE_COUNT_LONGINT_POINTER:
17417+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
17418+ break;
17419+#ifdef HAVE_LONG_LONG
17420+ case TYPE_COUNT_LONGLONGINT_POINTER:
17421+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
17422+ break;
17423+#endif
17424+ default:
17425+ abort ();
17426+ }
17427+ }
17428+ else
17429+ {
17430+ arg_type type = a.arg[dp->arg_index].type;
17431+ CHAR_T *p;
17432+ unsigned int prefix_count;
17433+ int prefixes[2];
17434+#if !USE_SNPRINTF
17435+ size_t tmp_length;
17436+ CHAR_T tmpbuf[700];
17437+ CHAR_T *tmp;
17438+
17439+ /* Allocate a temporary buffer of sufficient size for calling
17440+ sprintf. */
17441+ {
17442+ size_t width;
17443+ size_t precision;
17444+
17445+ width = 0;
17446+ if (dp->width_start != dp->width_end)
17447+ {
17448+ if (dp->width_arg_index != ARG_NONE)
17449+ {
17450+ int arg;
17451+
17452+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17453+ abort ();
17454+ arg = a.arg[dp->width_arg_index].a.a_int;
17455+ width = (arg < 0 ? (unsigned int) (-arg) : arg);
17456+ }
17457+ else
17458+ {
17459+ const CHAR_T *digitp = dp->width_start;
17460+
17461+ do
17462+ width = xsum (xtimes (width, 10), *digitp++ - '0');
17463+ while (digitp != dp->width_end);
17464+ }
17465+ }
17466+
17467+ precision = 6;
17468+ if (dp->precision_start != dp->precision_end)
17469+ {
17470+ if (dp->precision_arg_index != ARG_NONE)
17471+ {
17472+ int arg;
17473+
17474+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17475+ abort ();
17476+ arg = a.arg[dp->precision_arg_index].a.a_int;
17477+ precision = (arg < 0 ? 0 : arg);
17478+ }
17479+ else
17480+ {
17481+ const CHAR_T *digitp = dp->precision_start + 1;
17482+
17483+ precision = 0;
17484+ do
17485+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
17486+ while (digitp != dp->precision_end);
17487+ }
17488+ }
17489+
17490+ switch (dp->conversion)
17491+ {
17492+
17493+ case 'd': case 'i': case 'u':
17494+# ifdef HAVE_LONG_LONG
17495+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17496+ tmp_length =
17497+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17498+ * 0.30103 /* binary -> decimal */
17499+ * 2 /* estimate for FLAG_GROUP */
17500+ )
17501+ + 1 /* turn floor into ceil */
17502+ + 1; /* account for leading sign */
17503+ else
17504+# endif
17505+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17506+ tmp_length =
17507+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17508+ * 0.30103 /* binary -> decimal */
17509+ * 2 /* estimate for FLAG_GROUP */
17510+ )
17511+ + 1 /* turn floor into ceil */
17512+ + 1; /* account for leading sign */
17513+ else
17514+ tmp_length =
17515+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17516+ * 0.30103 /* binary -> decimal */
17517+ * 2 /* estimate for FLAG_GROUP */
17518+ )
17519+ + 1 /* turn floor into ceil */
17520+ + 1; /* account for leading sign */
17521+ break;
17522+
17523+ case 'o':
17524+# ifdef HAVE_LONG_LONG
17525+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17526+ tmp_length =
17527+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17528+ * 0.333334 /* binary -> octal */
17529+ )
17530+ + 1 /* turn floor into ceil */
17531+ + 1; /* account for leading sign */
17532+ else
17533+# endif
17534+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17535+ tmp_length =
17536+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17537+ * 0.333334 /* binary -> octal */
17538+ )
17539+ + 1 /* turn floor into ceil */
17540+ + 1; /* account for leading sign */
17541+ else
17542+ tmp_length =
17543+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17544+ * 0.333334 /* binary -> octal */
17545+ )
17546+ + 1 /* turn floor into ceil */
17547+ + 1; /* account for leading sign */
17548+ break;
17549+
17550+ case 'x': case 'X':
17551+# ifdef HAVE_LONG_LONG
17552+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17553+ tmp_length =
17554+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17555+ * 0.25 /* binary -> hexadecimal */
17556+ )
17557+ + 1 /* turn floor into ceil */
17558+ + 2; /* account for leading sign or alternate form */
17559+ else
17560+# endif
17561+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17562+ tmp_length =
17563+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17564+ * 0.25 /* binary -> hexadecimal */
17565+ )
17566+ + 1 /* turn floor into ceil */
17567+ + 2; /* account for leading sign or alternate form */
17568+ else
17569+ tmp_length =
17570+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17571+ * 0.25 /* binary -> hexadecimal */
17572+ )
17573+ + 1 /* turn floor into ceil */
17574+ + 2; /* account for leading sign or alternate form */
17575+ break;
17576+
17577+ case 'f': case 'F':
17578+# ifdef HAVE_LONG_DOUBLE
17579+ if (type == TYPE_LONGDOUBLE)
17580+ tmp_length =
17581+ (unsigned int) (LDBL_MAX_EXP
17582+ * 0.30103 /* binary -> decimal */
17583+ * 2 /* estimate for FLAG_GROUP */
17584+ )
17585+ + 1 /* turn floor into ceil */
17586+ + 10; /* sign, decimal point etc. */
17587+ else
17588+# endif
17589+ tmp_length =
17590+ (unsigned int) (DBL_MAX_EXP
17591+ * 0.30103 /* binary -> decimal */
17592+ * 2 /* estimate for FLAG_GROUP */
17593+ )
17594+ + 1 /* turn floor into ceil */
17595+ + 10; /* sign, decimal point etc. */
17596+ tmp_length = xsum (tmp_length, precision);
17597+ break;
17598+
17599+ case 'e': case 'E': case 'g': case 'G':
17600+ case 'a': case 'A':
17601+ tmp_length =
17602+ 12; /* sign, decimal point, exponent etc. */
17603+ tmp_length = xsum (tmp_length, precision);
17604+ break;
17605+
17606+ case 'c':
17607+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
17608+ if (type == TYPE_WIDE_CHAR)
17609+ tmp_length = MB_CUR_MAX;
17610+ else
17611+# endif
17612+ tmp_length = 1;
17613+ break;
17614+
17615+ case 's':
17616+# ifdef HAVE_WCHAR_T
17617+ if (type == TYPE_WIDE_STRING)
17618+ {
17619+ tmp_length =
17620+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
17621+
17622+# if !WIDE_CHAR_VERSION
17623+ tmp_length = xtimes (tmp_length, MB_CUR_MAX);
17624+# endif
17625+ }
17626+ else
17627+# endif
17628+ tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
17629+ break;
17630+
17631+ case 'p':
17632+ tmp_length =
17633+ (unsigned int) (sizeof (void *) * CHAR_BIT
17634+ * 0.25 /* binary -> hexadecimal */
17635+ )
17636+ + 1 /* turn floor into ceil */
17637+ + 2; /* account for leading 0x */
17638+ break;
17639+
17640+ default:
17641+ abort ();
17642+ }
17643+
17644+ if (tmp_length < width)
17645+ tmp_length = width;
17646+
17647+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
17648+ }
17649+
17650+ if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
17651+ tmp = tmpbuf;
17652+ else
17653+ {
17654+ size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
17655+
17656+ if (size_overflow_p (tmp_memsize))
17657+ /* Overflow, would lead to out of memory. */
17658+ goto out_of_memory;
17659+ tmp = (CHAR_T *) malloc (tmp_memsize);
17660+ if (tmp == NULL)
17661+ /* Out of memory. */
17662+ goto out_of_memory;
17663+ }
17664+#endif
17665+
17666+ /* Construct the format string for calling snprintf or
17667+ sprintf. */
17668+ p = buf;
17669+ *p++ = '%';
17670+ if (dp->flags & FLAG_GROUP)
17671+ *p++ = '\'';
17672+ if (dp->flags & FLAG_LEFT)
17673+ *p++ = '-';
17674+ if (dp->flags & FLAG_SHOWSIGN)
17675+ *p++ = '+';
17676+ if (dp->flags & FLAG_SPACE)
17677+ *p++ = ' ';
17678+ if (dp->flags & FLAG_ALT)
17679+ *p++ = '#';
17680+ if (dp->flags & FLAG_ZERO)
17681+ *p++ = '0';
17682+ if (dp->width_start != dp->width_end)
17683+ {
17684+ size_t n = dp->width_end - dp->width_start;
17685+ memcpy (p, dp->width_start, n * sizeof (CHAR_T));
17686+ p += n;
17687+ }
17688+ if (dp->precision_start != dp->precision_end)
17689+ {
17690+ size_t n = dp->precision_end - dp->precision_start;
17691+ memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
17692+ p += n;
17693+ }
17694+
17695+ switch (type)
17696+ {
17697+#ifdef HAVE_LONG_LONG
17698+ case TYPE_LONGLONGINT:
17699+ case TYPE_ULONGLONGINT:
17700+ *p++ = 'l';
17701+ /*FALLTHROUGH*/
17702+#endif
17703+ case TYPE_LONGINT:
17704+ case TYPE_ULONGINT:
17705+#ifdef HAVE_WINT_T
17706+ case TYPE_WIDE_CHAR:
17707+#endif
17708+#ifdef HAVE_WCHAR_T
17709+ case TYPE_WIDE_STRING:
17710+#endif
17711+ *p++ = 'l';
17712+ break;
17713+#ifdef HAVE_LONG_DOUBLE
17714+ case TYPE_LONGDOUBLE:
17715+ *p++ = 'L';
17716+ break;
17717+#endif
17718+ default:
17719+ break;
17720+ }
17721+ *p = dp->conversion;
17722+#if USE_SNPRINTF
17723+ p[1] = '%';
17724+ p[2] = 'n';
17725+ p[3] = '\0';
17726+#else
17727+ p[1] = '\0';
17728+#endif
17729+
17730+ /* Construct the arguments for calling snprintf or sprintf. */
17731+ prefix_count = 0;
17732+ if (dp->width_arg_index != ARG_NONE)
17733+ {
17734+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17735+ abort ();
17736+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
17737+ }
17738+ if (dp->precision_arg_index != ARG_NONE)
17739+ {
17740+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17741+ abort ();
17742+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
17743+ }
17744+
17745+#if USE_SNPRINTF
17746+ /* Prepare checking whether snprintf returns the count
17747+ via %n. */
17748+ ENSURE_ALLOCATION (xsum (length, 1));
17749+ result[length] = '\0';
17750+#endif
17751+
17752+ for (;;)
17753+ {
17754+ size_t maxlen;
17755+ int count;
17756+ int retcount;
17757+
17758+ maxlen = allocated - length;
17759+ count = -1;
17760+ retcount = 0;
17761+
17762+#if USE_SNPRINTF
17763+# define SNPRINTF_BUF(arg) \
17764+ switch (prefix_count) \
17765+ { \
17766+ case 0: \
17767+ retcount = SNPRINTF (result + length, maxlen, buf, \
17768+ arg, &count); \
17769+ break; \
17770+ case 1: \
17771+ retcount = SNPRINTF (result + length, maxlen, buf, \
17772+ prefixes[0], arg, &count); \
17773+ break; \
17774+ case 2: \
17775+ retcount = SNPRINTF (result + length, maxlen, buf, \
17776+ prefixes[0], prefixes[1], arg, \
17777+ &count); \
17778+ break; \
17779+ default: \
17780+ abort (); \
17781+ }
17782+#else
17783+# define SNPRINTF_BUF(arg) \
17784+ switch (prefix_count) \
17785+ { \
17786+ case 0: \
17787+ count = sprintf (tmp, buf, arg); \
17788+ break; \
17789+ case 1: \
17790+ count = sprintf (tmp, buf, prefixes[0], arg); \
17791+ break; \
17792+ case 2: \
17793+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
17794+ arg); \
17795+ break; \
17796+ default: \
17797+ abort (); \
17798+ }
17799+#endif
17800+
17801+ switch (type)
17802+ {
17803+ case TYPE_SCHAR:
17804+ {
17805+ int arg = a.arg[dp->arg_index].a.a_schar;
17806+ SNPRINTF_BUF (arg);
17807+ }
17808+ break;
17809+ case TYPE_UCHAR:
17810+ {
17811+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
17812+ SNPRINTF_BUF (arg);
17813+ }
17814+ break;
17815+ case TYPE_SHORT:
17816+ {
17817+ int arg = a.arg[dp->arg_index].a.a_short;
17818+ SNPRINTF_BUF (arg);
17819+ }
17820+ break;
17821+ case TYPE_USHORT:
17822+ {
17823+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
17824+ SNPRINTF_BUF (arg);
17825+ }
17826+ break;
17827+ case TYPE_INT:
17828+ {
17829+ int arg = a.arg[dp->arg_index].a.a_int;
17830+ SNPRINTF_BUF (arg);
17831+ }
17832+ break;
17833+ case TYPE_UINT:
17834+ {
17835+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
17836+ SNPRINTF_BUF (arg);
17837+ }
17838+ break;
17839+ case TYPE_LONGINT:
17840+ {
17841+ long int arg = a.arg[dp->arg_index].a.a_longint;
17842+ SNPRINTF_BUF (arg);
17843+ }
17844+ break;
17845+ case TYPE_ULONGINT:
17846+ {
17847+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
17848+ SNPRINTF_BUF (arg);
17849+ }
17850+ break;
17851+#ifdef HAVE_LONG_LONG
17852+ case TYPE_LONGLONGINT:
17853+ {
17854+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
17855+ SNPRINTF_BUF (arg);
17856+ }
17857+ break;
17858+ case TYPE_ULONGLONGINT:
17859+ {
17860+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
17861+ SNPRINTF_BUF (arg);
17862+ }
17863+ break;
17864+#endif
17865+ case TYPE_DOUBLE:
17866+ {
17867+ double arg = a.arg[dp->arg_index].a.a_double;
17868+ SNPRINTF_BUF (arg);
17869+ }
17870+ break;
17871+#ifdef HAVE_LONG_DOUBLE
17872+ case TYPE_LONGDOUBLE:
17873+ {
17874+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
17875+ SNPRINTF_BUF (arg);
17876+ }
17877+ break;
17878+#endif
17879+ case TYPE_CHAR:
17880+ {
17881+ int arg = a.arg[dp->arg_index].a.a_char;
17882+ SNPRINTF_BUF (arg);
17883+ }
17884+ break;
17885+#ifdef HAVE_WINT_T
17886+ case TYPE_WIDE_CHAR:
17887+ {
17888+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
17889+ SNPRINTF_BUF (arg);
17890+ }
17891+ break;
17892+#endif
17893+ case TYPE_STRING:
17894+ {
17895+ const char *arg = a.arg[dp->arg_index].a.a_string;
17896+ SNPRINTF_BUF (arg);
17897+ }
17898+ break;
17899+#ifdef HAVE_WCHAR_T
17900+ case TYPE_WIDE_STRING:
17901+ {
17902+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
17903+ SNPRINTF_BUF (arg);
17904+ }
17905+ break;
17906+#endif
17907+ case TYPE_POINTER:
17908+ {
17909+ void *arg = a.arg[dp->arg_index].a.a_pointer;
17910+ SNPRINTF_BUF (arg);
17911+ }
17912+ break;
17913+ default:
17914+ abort ();
17915+ }
17916+
17917+#if USE_SNPRINTF
17918+ /* Portability: Not all implementations of snprintf()
17919+ are ISO C 99 compliant. Determine the number of
17920+ bytes that snprintf() has produced or would have
17921+ produced. */
17922+ if (count >= 0)
17923+ {
17924+ /* Verify that snprintf() has NUL-terminated its
17925+ result. */
17926+ if (count < maxlen && result[length + count] != '\0')
17927+ abort ();
17928+ /* Portability hack. */
17929+ if (retcount > count)
17930+ count = retcount;
17931+ }
17932+ else
17933+ {
17934+ /* snprintf() doesn't understand the '%n'
17935+ directive. */
17936+ if (p[1] != '\0')
17937+ {
17938+ /* Don't use the '%n' directive; instead, look
17939+ at the snprintf() return value. */
17940+ p[1] = '\0';
17941+ continue;
17942+ }
17943+ else
17944+ {
17945+ /* Look at the snprintf() return value. */
17946+ if (retcount < 0)
17947+ {
17948+ /* HP-UX 10.20 snprintf() is doubly deficient:
17949+ It doesn't understand the '%n' directive,
17950+ *and* it returns -1 (rather than the length
17951+ that would have been required) when the
17952+ buffer is too small. */
17953+ size_t bigger_need =
17954+ xsum (xtimes (allocated, 2), 12);
17955+ ENSURE_ALLOCATION (bigger_need);
17956+ continue;
17957+ }
17958+ else
17959+ count = retcount;
17960+ }
17961+ }
17962+#endif
17963+
17964+ /* Attempt to handle failure. */
17965+ if (count < 0)
17966+ {
17967+ if (!(result == resultbuf || result == NULL))
17968+ free (result);
17969+ if (buf_malloced != NULL)
17970+ free (buf_malloced);
17971+ CLEANUP ();
17972+ errno = EINVAL;
17973+ return NULL;
17974+ }
17975+
17976+#if !USE_SNPRINTF
17977+ if (count >= tmp_length)
17978+ /* tmp_length was incorrectly calculated - fix the
17979+ code above! */
17980+ abort ();
17981+#endif
17982+
17983+ /* Make room for the result. */
17984+ if (count >= maxlen)
17985+ {
17986+ /* Need at least count bytes. But allocate
17987+ proportionally, to avoid looping eternally if
17988+ snprintf() reports a too small count. */
17989+ size_t n =
17990+ xmax (xsum (length, count), xtimes (allocated, 2));
17991+
17992+ ENSURE_ALLOCATION (n);
17993+#if USE_SNPRINTF
17994+ continue;
17995+#endif
17996+ }
17997+
17998+#if USE_SNPRINTF
17999+ /* The snprintf() result did fit. */
18000+#else
18001+ /* Append the sprintf() result. */
18002+ memcpy (result + length, tmp, count * sizeof (CHAR_T));
18003+ if (tmp != tmpbuf)
18004+ free (tmp);
18005+#endif
18006+
18007+ length += count;
18008+ break;
18009+ }
18010+ }
18011+ }
18012+ }
18013+
18014+ /* Add the final NUL. */
18015+ ENSURE_ALLOCATION (xsum (length, 1));
18016+ result[length] = '\0';
18017+
18018+ if (result != resultbuf && length + 1 < allocated)
18019+ {
18020+ /* Shrink the allocated memory if possible. */
18021+ CHAR_T *memory;
18022+
18023+ memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
18024+ if (memory != NULL)
18025+ result = memory;
18026+ }
18027+
18028+ if (buf_malloced != NULL)
18029+ free (buf_malloced);
18030+ CLEANUP ();
18031+ *lengthp = length;
18032+ return result;
18033+
18034+ out_of_memory:
18035+ if (!(result == resultbuf || result == NULL))
18036+ free (result);
18037+ if (buf_malloced != NULL)
18038+ free (buf_malloced);
18039+ out_of_memory_1:
18040+ CLEANUP ();
18041+ errno = ENOMEM;
18042+ return NULL;
18043+ }
18044+}
18045+
18046+#undef SNPRINTF
18047+#undef USE_SNPRINTF
18048+#undef PRINTF_PARSE
18049+#undef DIRECTIVES
18050+#undef DIRECTIVE
18051+#undef CHAR_T
18052+#undef VASNPRINTF
18053--- lrzsz-0.12.20.safe/intl/vasnprintf.h 1969-12-31 19:00:00.000000000 -0500
18054+++ lrzsz-0.12.20/intl/vasnprintf.h 2004-09-12 14:40:34.667700664 -0400
18055@@ -0,0 +1,61 @@
18056+/* vsprintf with automatic memory allocation.
18057+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18058+
18059+ This program is free software; you can redistribute it and/or modify it
18060+ under the terms of the GNU Library General Public License as published
18061+ by the Free Software Foundation; either version 2, or (at your option)
18062+ any later version.
18063+
18064+ This program is distributed in the hope that it will be useful,
18065+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18066+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18067+ Library General Public License for more details.
18068+
18069+ You should have received a copy of the GNU Library General Public
18070+ License along with this program; if not, write to the Free Software
18071+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18072+ USA. */
18073+
18074+#ifndef _VASNPRINTF_H
18075+#define _VASNPRINTF_H
18076+
18077+/* Get va_list. */
18078+#include <stdarg.h>
18079+
18080+/* Get size_t. */
18081+#include <stddef.h>
18082+
18083+#ifndef __attribute__
18084+/* This feature is available in gcc versions 2.5 and later. */
18085+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
18086+# define __attribute__(Spec) /* empty */
18087+# endif
18088+/* The __-protected variants of `format' and `printf' attributes
18089+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
18090+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
18091+# define __format__ format
18092+# define __printf__ printf
18093+# endif
18094+#endif
18095+
18096+#ifdef __cplusplus
18097+extern "C" {
18098+#endif
18099+
18100+/* Write formatted output to a string dynamically allocated with malloc().
18101+ You can pass a preallocated buffer for the result in RESULTBUF and its
18102+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18103+ If successful, return the address of the string (this may be = RESULTBUF
18104+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18105+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18106+ errno and return NULL. */
18107+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
18108+ __attribute__ ((__format__ (__printf__, 3, 4)));
18109+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
18110+ __attribute__ ((__format__ (__printf__, 3, 0)));
18111+
18112+#ifdef __cplusplus
18113+}
18114+#endif
18115+
18116+#endif /* _VASNPRINTF_H */
18117--- lrzsz-0.12.20.safe/intl/vasnwprintf.h 1969-12-31 19:00:00.000000000 -0500
18118+++ lrzsz-0.12.20/intl/vasnwprintf.h 2004-09-12 14:40:34.673699752 -0400
18119@@ -0,0 +1,46 @@
18120+/* vswprintf with automatic memory allocation.
18121+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18122+
18123+ This program is free software; you can redistribute it and/or modify it
18124+ under the terms of the GNU Library General Public License as published
18125+ by the Free Software Foundation; either version 2, or (at your option)
18126+ any later version.
18127+
18128+ This program is distributed in the hope that it will be useful,
18129+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18130+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18131+ Library General Public License for more details.
18132+
18133+ You should have received a copy of the GNU Library General Public
18134+ License along with this program; if not, write to the Free Software
18135+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18136+ USA. */
18137+
18138+#ifndef _VASNWPRINTF_H
18139+#define _VASNWPRINTF_H
18140+
18141+/* Get va_list. */
18142+#include <stdarg.h>
18143+
18144+/* Get wchar_t, size_t. */
18145+#include <stddef.h>
18146+
18147+#ifdef __cplusplus
18148+extern "C" {
18149+#endif
18150+
18151+/* Write formatted output to a string dynamically allocated with malloc().
18152+ You can pass a preallocated buffer for the result in RESULTBUF and its
18153+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18154+ If successful, return the address of the string (this may be = RESULTBUF
18155+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18156+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18157+ errno and return NULL. */
18158+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
18159+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
18160+
18161+#ifdef __cplusplus
18162+}
18163+#endif
18164+
18165+#endif /* _VASNWPRINTF_H */
18166--- lrzsz-0.12.20.safe/intl/VERSION 1998-04-26 09:22:37.000000000 -0400
18167+++ lrzsz-0.12.20/intl/VERSION 2004-09-12 14:40:34.679698840 -0400
18168@@ -1 +1 @@
18169-GNU gettext library from gettext-0.10.32
18170+GNU gettext library from gettext-0.14.1
18171--- lrzsz-0.12.20.safe/intl/wprintf-parse.h 1969-12-31 19:00:00.000000000 -0500
18172+++ lrzsz-0.12.20/intl/wprintf-parse.h 2004-09-12 14:40:34.695696408 -0400
18173@@ -0,0 +1,75 @@
18174+/* Parse printf format string.
18175+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
18176+
18177+ This program is free software; you can redistribute it and/or modify it
18178+ under the terms of the GNU Library General Public License as published
18179+ by the Free Software Foundation; either version 2, or (at your option)
18180+ any later version.
18181+
18182+ This program is distributed in the hope that it will be useful,
18183+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18184+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18185+ Library General Public License for more details.
18186+
18187+ You should have received a copy of the GNU Library General Public
18188+ License along with this program; if not, write to the Free Software
18189+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18190+ USA. */
18191+
18192+#ifndef _WPRINTF_PARSE_H
18193+#define _WPRINTF_PARSE_H
18194+
18195+#include "printf-args.h"
18196+
18197+
18198+/* Flags */
18199+#define FLAG_GROUP 1 /* ' flag */
18200+#define FLAG_LEFT 2 /* - flag */
18201+#define FLAG_SHOWSIGN 4 /* + flag */
18202+#define FLAG_SPACE 8 /* space flag */
18203+#define FLAG_ALT 16 /* # flag */
18204+#define FLAG_ZERO 32
18205+
18206+/* arg_index value indicating that no argument is consumed. */
18207+#define ARG_NONE (~(size_t)0)
18208+
18209+/* A parsed directive. */
18210+typedef struct
18211+{
18212+ const wchar_t* dir_start;
18213+ const wchar_t* dir_end;
18214+ int flags;
18215+ const wchar_t* width_start;
18216+ const wchar_t* width_end;
18217+ size_t width_arg_index;
18218+ const wchar_t* precision_start;
18219+ const wchar_t* precision_end;
18220+ size_t precision_arg_index;
18221+ wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
18222+ size_t arg_index;
18223+}
18224+wchar_t_directive;
18225+
18226+/* A parsed format string. */
18227+typedef struct
18228+{
18229+ size_t count;
18230+ wchar_t_directive *dir;
18231+ size_t max_width_length;
18232+ size_t max_precision_length;
18233+}
18234+wchar_t_directives;
18235+
18236+
18237+/* Parses the format string. Fills in the number N of directives, and fills
18238+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
18239+ to the end of the format string. Also fills in the arg_type fields of the
18240+ arguments and the needed count of arguments. */
18241+#ifdef STATIC
18242+STATIC
18243+#else
18244+extern
18245+#endif
18246+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
18247+
18248+#endif /* _WPRINTF_PARSE_H */
18249--- lrzsz-0.12.20.safe/intl/xopen-msg.sed 1998-04-26 09:20:52.000000000 -0400
18250+++ lrzsz-0.12.20/intl/xopen-msg.sed 1969-12-31 19:00:00.000000000 -0500
18251@@ -1,104 +0,0 @@
18252-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
18253-# Copyright (C) 1995 Free Software Foundation, Inc.
18254-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
18255-#
18256-# This program is free software; you can redistribute it and/or modify
18257-# it under the terms of the GNU General Public License as published by
18258-# the Free Software Foundation; either version 2, or (at your option)
18259-# any later version.
18260-#
18261-# This program is distributed in the hope that it will be useful,
18262-# but WITHOUT ANY WARRANTY; without even the implied warranty of
18263-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18264-# GNU General Public License for more details.
18265-#
18266-# You should have received a copy of the GNU General Public License
18267-# along with this program; if not, write to the Free Software
18268-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18269-#
18270-#
18271-# The first directive in the .msg should be the definition of the
18272-# message set number. We use always set number 1.
18273-#
18274-1 {
18275- i\
18276-$set 1 # Automatically created by po2msg.sed
18277- h
18278- s/.*/0/
18279- x
18280-}
18281-#
18282-# We copy all comments into the .msg file. Perhaps they can help.
18283-#
18284-/^#/ s/^#[ ]*/$ /p
18285-#
18286-# We copy the original message as a comment into the .msg file.
18287-#
18288-/^msgid/ {
18289-# Does not work now
18290-# /"$/! {
18291-# s/\\$//
18292-# s/$/ ... (more lines following)"/
18293-# }
18294- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
18295- p
18296-}
18297-#
18298-# The .msg file contains, other then the .po file, only the translations
18299-# but each given a unique ID. Starting from 1 and incrementing by 1 for
18300-# each message we assign them to the messages.
18301-# It is important that the .po file used to generate the cat-id-tbl.c file
18302-# (with po-to-tbl) is the same as the one used here. (At least the order
18303-# of declarations must not be changed.)
18304-#
18305-/^msgstr/ {
18306- s/msgstr[ ]*"\(.*\)"/\1/
18307- x
18308-# The following nice solution is by
18309-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
18310- td
18311-# Increment a decimal number in pattern space.
18312-# First hide trailing `9' digits.
18313- :d
18314- s/9\(_*\)$/_\1/
18315- td
18316-# Assure at least one digit is available.
18317- s/^\(_*\)$/0\1/
18318-# Increment the last digit.
18319- s/8\(_*\)$/9\1/
18320- s/7\(_*\)$/8\1/
18321- s/6\(_*\)$/7\1/
18322- s/5\(_*\)$/6\1/
18323- s/4\(_*\)$/5\1/
18324- s/3\(_*\)$/4\1/
18325- s/2\(_*\)$/3\1/
18326- s/1\(_*\)$/2\1/
18327- s/0\(_*\)$/1\1/
18328-# Convert the hidden `9' digits to `0's.
18329- s/_/0/g
18330- x
18331-# Bring the line in the format `<number> <message>'
18332- G
18333- s/^[^\n]*$/& /
18334- s/\(.*\)\n\([0-9]*\)/\2 \1/
18335-# Clear flag from last substitution.
18336- tb
18337-# Append the next line.
18338- :b
18339- N
18340-# Look whether second part is a continuation line.
18341- s/\(.*\n\)"\(.*\)"/\1\2/
18342-# Yes, then branch.
18343- ta
18344- P
18345- D
18346-# Note that `D' includes a jump to the start!!
18347-# We found a continuation line. But before printing insert '\'.
18348- :a
18349- s/\(.*\)\(\n.*\)/\1\\\2/
18350- P
18351-# We cannot use the sed command `D' here
18352- s/.*\n\(.*\)/\1/
18353- tb
18354-}
18355-d
18356--- lrzsz-0.12.20.safe/intl/xsize.h 1969-12-31 19:00:00.000000000 -0500
18357+++ lrzsz-0.12.20/intl/xsize.h 2004-09-12 14:40:34.700695648 -0400
18358@@ -0,0 +1,109 @@
18359+/* xsize.h -- Checked size_t computations.
18360+
18361+ Copyright (C) 2003 Free Software Foundation, Inc.
18362+
18363+ This program is free software; you can redistribute it and/or modify it
18364+ under the terms of the GNU Library General Public License as published
18365+ by the Free Software Foundation; either version 2, or (at your option)
18366+ any later version.
18367+
18368+ This program is distributed in the hope that it will be useful,
18369+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18370+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18371+ Library General Public License for more details.
18372+
18373+ You should have received a copy of the GNU Library General Public
18374+ License along with this program; if not, write to the Free Software
18375+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18376+ USA. */
18377+
18378+#ifndef _XSIZE_H
18379+#define _XSIZE_H
18380+
18381+/* Get size_t. */
18382+#include <stddef.h>
18383+
18384+/* Get SIZE_MAX. */
18385+#include <limits.h>
18386+#if HAVE_STDINT_H
18387+# include <stdint.h>
18388+#endif
18389+
18390+/* The size of memory objects is often computed through expressions of
18391+ type size_t. Example:
18392+ void* p = malloc (header_size + n * element_size).
18393+ These computations can lead to overflow. When this happens, malloc()
18394+ returns a piece of memory that is way too small, and the program then
18395+ crashes while attempting to fill the memory.
18396+ To avoid this, the functions and macros in this file check for overflow.
18397+ The convention is that SIZE_MAX represents overflow.
18398+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
18399+ implementation that uses mmap --, it's recommended to use size_overflow_p()
18400+ or size_in_bounds_p() before invoking malloc().
18401+ The example thus becomes:
18402+ size_t size = xsum (header_size, xtimes (n, element_size));
18403+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
18404+*/
18405+
18406+/* Convert an arbitrary value >= 0 to type size_t. */
18407+#define xcast_size_t(N) \
18408+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
18409+
18410+/* Sum of two sizes, with overflow check. */
18411+static inline size_t
18412+#if __GNUC__ >= 3
18413+__attribute__ ((__pure__))
18414+#endif
18415+xsum (size_t size1, size_t size2)
18416+{
18417+ size_t sum = size1 + size2;
18418+ return (sum >= size1 ? sum : SIZE_MAX);
18419+}
18420+
18421+/* Sum of three sizes, with overflow check. */
18422+static inline size_t
18423+#if __GNUC__ >= 3
18424+__attribute__ ((__pure__))
18425+#endif
18426+xsum3 (size_t size1, size_t size2, size_t size3)
18427+{
18428+ return xsum (xsum (size1, size2), size3);
18429+}
18430+
18431+/* Sum of four sizes, with overflow check. */
18432+static inline size_t
18433+#if __GNUC__ >= 3
18434+__attribute__ ((__pure__))
18435+#endif
18436+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
18437+{
18438+ return xsum (xsum (xsum (size1, size2), size3), size4);
18439+}
18440+
18441+/* Maximum of two sizes, with overflow check. */
18442+static inline size_t
18443+#if __GNUC__ >= 3
18444+__attribute__ ((__pure__))
18445+#endif
18446+xmax (size_t size1, size_t size2)
18447+{
18448+ /* No explicit check is needed here, because for any n:
18449+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
18450+ return (size1 >= size2 ? size1 : size2);
18451+}
18452+
18453+/* Multiplication of a count with an element size, with overflow check.
18454+ The count must be >= 0 and the element size must be > 0.
18455+ This is a macro, not an inline function, so that it works correctly even
18456+ when N is of a wider tupe and N > SIZE_MAX. */
18457+#define xtimes(N, ELSIZE) \
18458+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
18459+
18460+/* Check for overflow. */
18461+#define size_overflow_p(SIZE) \
18462+ ((SIZE) == SIZE_MAX)
18463+/* Check against overflow. */
18464+#define size_in_bounds_p(SIZE) \
18465+ ((SIZE) != SIZE_MAX)
18466+
18467+#endif /* _XSIZE_H */
18468--- lrzsz-0.12.20.safe/m4/ChangeLog 1969-12-31 19:00:00.000000000 -0500
18469+++ lrzsz-0.12.20/m4/ChangeLog 2004-09-12 14:40:35.054641840 -0400
18470@@ -0,0 +1,32 @@
18471+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
18472+
18473+ * codeset.m4: New file, from gettext-0.14.1.
18474+ * gettext.m4: New file, from gettext-0.14.1.
18475+ * glibc21.m4: New file, from gettext-0.14.1.
18476+ * iconv.m4: New file, from gettext-0.14.1.
18477+ * intdiv0.m4: New file, from gettext-0.14.1.
18478+ * intmax.m4: New file, from gettext-0.14.1.
18479+ * inttypes.m4: New file, from gettext-0.14.1.
18480+ * inttypes_h.m4: New file, from gettext-0.14.1.
18481+ * inttypes-pri.m4: New file, from gettext-0.14.1.
18482+ * isc-posix.m4: New file, from gettext-0.14.1.
18483+ * lcmessage.m4: New file, from gettext-0.14.1.
18484+ * lib-ld.m4: New file, from gettext-0.14.1.
18485+ * lib-link.m4: New file, from gettext-0.14.1.
18486+ * lib-prefix.m4: New file, from gettext-0.14.1.
18487+ * longdouble.m4: New file, from gettext-0.14.1.
18488+ * longlong.m4: New file, from gettext-0.14.1.
18489+ * nls.m4: New file, from gettext-0.14.1.
18490+ * po.m4: New file, from gettext-0.14.1.
18491+ * printf-posix.m4: New file, from gettext-0.14.1.
18492+ * progtest.m4: New file, from gettext-0.14.1.
18493+ * signed.m4: New file, from gettext-0.14.1.
18494+ * size_max.m4: New file, from gettext-0.14.1.
18495+ * stdint_h.m4: New file, from gettext-0.14.1.
18496+ * uintmax_t.m4: New file, from gettext-0.14.1.
18497+ * ulonglong.m4: New file, from gettext-0.14.1.
18498+ * wchar_t.m4: New file, from gettext-0.14.1.
18499+ * wint_t.m4: New file, from gettext-0.14.1.
18500+ * xsize.m4: New file, from gettext-0.14.1.
18501+ * Makefile.am: New file.
18502+
18503--- lrzsz-0.12.20.safe/m4/codeset.m4 1969-12-31 19:00:00.000000000 -0500
18504+++ lrzsz-0.12.20/m4/codeset.m4 2004-09-12 14:40:34.820677408 -0400
18505@@ -0,0 +1,23 @@
18506+# codeset.m4 serial AM1 (gettext-0.10.40)
18507+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
18508+dnl This file is free software, distributed under the terms of the GNU
18509+dnl General Public License. As a special exception to the GNU General
18510+dnl Public License, this file may be distributed as part of a program
18511+dnl that contains a configuration script generated by Autoconf, under
18512+dnl the same distribution terms as the rest of that program.
18513+
18514+dnl From Bruno Haible.
18515+
18516+AC_DEFUN([AM_LANGINFO_CODESET],
18517+[
18518+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
18519+ [AC_TRY_LINK([#include <langinfo.h>],
18520+ [char* cs = nl_langinfo(CODESET);],
18521+ am_cv_langinfo_codeset=yes,
18522+ am_cv_langinfo_codeset=no)
18523+ ])
18524+ if test $am_cv_langinfo_codeset = yes; then
18525+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
18526+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
18527+ fi
18528+])
18529--- lrzsz-0.12.20.safe/m4/gettext.m4 1969-12-31 19:00:00.000000000 -0500
18530+++ lrzsz-0.12.20/m4/gettext.m4 2004-09-12 14:40:34.826676496 -0400
18531@@ -0,0 +1,487 @@
18532+# gettext.m4 serial 28 (gettext-0.13)
18533+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
18534+dnl This file is free software, distributed under the terms of the GNU
18535+dnl General Public License. As a special exception to the GNU General
18536+dnl Public License, this file may be distributed as part of a program
18537+dnl that contains a configuration script generated by Autoconf, under
18538+dnl the same distribution terms as the rest of that program.
18539+dnl
18540+dnl This file can can be used in projects which are not available under
18541+dnl the GNU General Public License or the GNU Library General Public
18542+dnl License but which still want to provide support for the GNU gettext
18543+dnl functionality.
18544+dnl Please note that the actual code of the GNU gettext library is covered
18545+dnl by the GNU Library General Public License, and the rest of the GNU
18546+dnl gettext package package is covered by the GNU General Public License.
18547+dnl They are *not* in the public domain.
18548+
18549+dnl Authors:
18550+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18551+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
18552+
18553+dnl Macro to add for using GNU gettext.
18554+
18555+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
18556+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
18557+dnl default (if it is not specified or empty) is 'no-libtool'.
18558+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
18559+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
18560+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
18561+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
18562+dnl depending on --{enable,disable}-{shared,static} and on the presence of
18563+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
18564+dnl $(top_builddir)/intl/libintl.a will be created.
18565+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
18566+dnl implementations (in libc or libintl) without the ngettext() function
18567+dnl will be ignored. If NEEDSYMBOL is specified and is
18568+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
18569+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
18570+dnl INTLDIR is used to find the intl libraries. If empty,
18571+dnl the value `$(top_builddir)/intl/' is used.
18572+dnl
18573+dnl The result of the configuration is one of three cases:
18574+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
18575+dnl and used.
18576+dnl Catalog format: GNU --> install in $(datadir)
18577+dnl Catalog extension: .mo after installation, .gmo in source tree
18578+dnl 2) GNU gettext has been found in the system's C library.
18579+dnl Catalog format: GNU --> install in $(datadir)
18580+dnl Catalog extension: .mo after installation, .gmo in source tree
18581+dnl 3) No internationalization, always use English msgid.
18582+dnl Catalog format: none
18583+dnl Catalog extension: none
18584+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
18585+dnl The use of .gmo is historical (it was needed to avoid overwriting the
18586+dnl GNU format catalogs when building on a platform with an X/Open gettext),
18587+dnl but we keep it in order not to force irrelevant filename changes on the
18588+dnl maintainers.
18589+dnl
18590+AC_DEFUN([AM_GNU_GETTEXT],
18591+[
18592+ dnl Argument checking.
18593+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
18594+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
18595+])])])])])
18596+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
18597+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
18598+])])])])
18599+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
18600+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
18601+
18602+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
18603+ ifelse(gt_included_intl, yes, [
18604+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
18605+ ])
18606+
18607+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
18608+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
18609+ AC_REQUIRE([AC_LIB_RPATH])
18610+
18611+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18612+ dnl Ideally we would do this search only after the
18613+ dnl if test "$USE_NLS" = "yes"; then
18614+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18615+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
18616+ dnl the configure script would need to contain the same shell code
18617+ dnl again, outside any 'if'. There are two solutions:
18618+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
18619+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
18620+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
18621+ dnl documented, we avoid it.
18622+ ifelse(gt_included_intl, yes, , [
18623+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
18624+ ])
18625+
18626+ dnl Set USE_NLS.
18627+ AM_NLS
18628+
18629+ ifelse(gt_included_intl, yes, [
18630+ BUILD_INCLUDED_LIBINTL=no
18631+ USE_INCLUDED_LIBINTL=no
18632+ ])
18633+ LIBINTL=
18634+ LTLIBINTL=
18635+ POSUB=
18636+
18637+ dnl If we use NLS figure out what method
18638+ if test "$USE_NLS" = "yes"; then
18639+ gt_use_preinstalled_gnugettext=no
18640+ ifelse(gt_included_intl, yes, [
18641+ AC_MSG_CHECKING([whether included gettext is requested])
18642+ AC_ARG_WITH(included-gettext,
18643+ [ --with-included-gettext use the GNU gettext library included here],
18644+ nls_cv_force_use_gnu_gettext=$withval,
18645+ nls_cv_force_use_gnu_gettext=no)
18646+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
18647+
18648+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
18649+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
18650+ ])
18651+ dnl User does not insist on using GNU NLS library. Figure out what
18652+ dnl to use. If GNU gettext is available we use this. Else we have
18653+ dnl to fall back to GNU NLS library.
18654+
18655+ dnl Add a version number to the cache macros.
18656+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
18657+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
18658+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
18659+
18660+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
18661+ [AC_TRY_LINK([#include <libintl.h>
18662+]ifelse([$2], [need-formatstring-macros],
18663+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18664+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18665+#endif
18666+changequote(,)dnl
18667+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18668+changequote([,])dnl
18669+], [])[extern int _nl_msg_cat_cntr;
18670+extern int *_nl_domain_bindings;],
18671+ [bindtextdomain ("", "");
18672+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
18673+ gt_cv_func_gnugettext_libc=yes,
18674+ gt_cv_func_gnugettext_libc=no)])
18675+
18676+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18677+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18678+ ifelse(gt_included_intl, yes, , [
18679+ AM_ICONV_LINK
18680+ ])
18681+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
18682+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
18683+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
18684+ dnl even if libiconv doesn't exist.
18685+ AC_LIB_LINKFLAGS_BODY([intl])
18686+ AC_CACHE_CHECK([for GNU gettext in libintl],
18687+ gt_cv_func_gnugettext_libintl,
18688+ [gt_save_CPPFLAGS="$CPPFLAGS"
18689+ CPPFLAGS="$CPPFLAGS $INCINTL"
18690+ gt_save_LIBS="$LIBS"
18691+ LIBS="$LIBS $LIBINTL"
18692+ dnl Now see whether libintl exists and does not depend on libiconv.
18693+ AC_TRY_LINK([#include <libintl.h>
18694+]ifelse([$2], [need-formatstring-macros],
18695+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18696+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18697+#endif
18698+changequote(,)dnl
18699+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18700+changequote([,])dnl
18701+], [])[extern int _nl_msg_cat_cntr;
18702+extern
18703+#ifdef __cplusplus
18704+"C"
18705+#endif
18706+const char *_nl_expand_alias ();],
18707+ [bindtextdomain ("", "");
18708+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18709+ gt_cv_func_gnugettext_libintl=yes,
18710+ gt_cv_func_gnugettext_libintl=no)
18711+ dnl Now see whether libintl exists and depends on libiconv.
18712+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
18713+ LIBS="$LIBS $LIBICONV"
18714+ AC_TRY_LINK([#include <libintl.h>
18715+]ifelse([$2], [need-formatstring-macros],
18716+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18717+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18718+#endif
18719+changequote(,)dnl
18720+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18721+changequote([,])dnl
18722+], [])[extern int _nl_msg_cat_cntr;
18723+extern
18724+#ifdef __cplusplus
18725+"C"
18726+#endif
18727+const char *_nl_expand_alias ();],
18728+ [bindtextdomain ("", "");
18729+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18730+ [LIBINTL="$LIBINTL $LIBICONV"
18731+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
18732+ gt_cv_func_gnugettext_libintl=yes
18733+ ])
18734+ fi
18735+ CPPFLAGS="$gt_save_CPPFLAGS"
18736+ LIBS="$gt_save_LIBS"])
18737+ fi
18738+
18739+ dnl If an already present or preinstalled GNU gettext() is found,
18740+ dnl use it. But if this macro is used in GNU gettext, and GNU
18741+ dnl gettext is already preinstalled in libintl, we update this
18742+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
18743+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
18744+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
18745+ && test "$PACKAGE" != gettext-runtime \
18746+ && test "$PACKAGE" != gettext-tools; }; then
18747+ gt_use_preinstalled_gnugettext=yes
18748+ else
18749+ dnl Reset the values set by searching for libintl.
18750+ LIBINTL=
18751+ LTLIBINTL=
18752+ INCINTL=
18753+ fi
18754+
18755+ ifelse(gt_included_intl, yes, [
18756+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
18757+ dnl GNU gettext is not found in the C library.
18758+ dnl Fall back on included GNU gettext library.
18759+ nls_cv_use_gnu_gettext=yes
18760+ fi
18761+ fi
18762+
18763+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
18764+ dnl Mark actions used to generate GNU NLS library.
18765+ BUILD_INCLUDED_LIBINTL=yes
18766+ USE_INCLUDED_LIBINTL=yes
18767+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
18768+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
18769+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
18770+ fi
18771+
18772+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18773+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18774+ dnl Mark actions to use GNU gettext tools.
18775+ CATOBJEXT=.gmo
18776+ fi
18777+ ])
18778+
18779+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18780+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18781+ AC_DEFINE(ENABLE_NLS, 1,
18782+ [Define to 1 if translation of program messages to the user's native language
18783+ is requested.])
18784+ else
18785+ USE_NLS=no
18786+ fi
18787+ fi
18788+
18789+ AC_MSG_CHECKING([whether to use NLS])
18790+ AC_MSG_RESULT([$USE_NLS])
18791+ if test "$USE_NLS" = "yes"; then
18792+ AC_MSG_CHECKING([where the gettext function comes from])
18793+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18794+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18795+ gt_source="external libintl"
18796+ else
18797+ gt_source="libc"
18798+ fi
18799+ else
18800+ gt_source="included intl directory"
18801+ fi
18802+ AC_MSG_RESULT([$gt_source])
18803+ fi
18804+
18805+ if test "$USE_NLS" = "yes"; then
18806+
18807+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18808+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18809+ AC_MSG_CHECKING([how to link with libintl])
18810+ AC_MSG_RESULT([$LIBINTL])
18811+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
18812+ fi
18813+
18814+ dnl For backward compatibility. Some packages may be using this.
18815+ AC_DEFINE(HAVE_GETTEXT, 1,
18816+ [Define if the GNU gettext() function is already present or preinstalled.])
18817+ AC_DEFINE(HAVE_DCGETTEXT, 1,
18818+ [Define if the GNU dcgettext() function is already present or preinstalled.])
18819+ fi
18820+
18821+ dnl We need to process the po/ directory.
18822+ POSUB=po
18823+ fi
18824+
18825+ ifelse(gt_included_intl, yes, [
18826+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
18827+ dnl to 'yes' because some of the testsuite requires it.
18828+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
18829+ BUILD_INCLUDED_LIBINTL=yes
18830+ fi
18831+
18832+ dnl Make all variables we use known to autoconf.
18833+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
18834+ AC_SUBST(USE_INCLUDED_LIBINTL)
18835+ AC_SUBST(CATOBJEXT)
18836+
18837+ dnl For backward compatibility. Some configure.ins may be using this.
18838+ nls_cv_header_intl=
18839+ nls_cv_header_libgt=
18840+
18841+ dnl For backward compatibility. Some Makefiles may be using this.
18842+ DATADIRNAME=share
18843+ AC_SUBST(DATADIRNAME)
18844+
18845+ dnl For backward compatibility. Some Makefiles may be using this.
18846+ INSTOBJEXT=.mo
18847+ AC_SUBST(INSTOBJEXT)
18848+
18849+ dnl For backward compatibility. Some Makefiles may be using this.
18850+ GENCAT=gencat
18851+ AC_SUBST(GENCAT)
18852+
18853+ dnl For backward compatibility. Some Makefiles may be using this.
18854+ if test "$USE_INCLUDED_LIBINTL" = yes; then
18855+ INTLOBJS="\$(GETTOBJS)"
18856+ fi
18857+ AC_SUBST(INTLOBJS)
18858+
18859+ dnl Enable libtool support if the surrounding package wishes it.
18860+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
18861+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
18862+ ])
18863+
18864+ dnl For backward compatibility. Some Makefiles may be using this.
18865+ INTLLIBS="$LIBINTL"
18866+ AC_SUBST(INTLLIBS)
18867+
18868+ dnl Make all documented variables known to autoconf.
18869+ AC_SUBST(LIBINTL)
18870+ AC_SUBST(LTLIBINTL)
18871+ AC_SUBST(POSUB)
18872+])
18873+
18874+
18875+dnl Checks for all prerequisites of the intl subdirectory,
18876+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
18877+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
18878+AC_DEFUN([AM_INTL_SUBDIR],
18879+[
18880+ AC_REQUIRE([AC_PROG_INSTALL])dnl
18881+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
18882+ AC_REQUIRE([AC_PROG_CC])dnl
18883+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
18884+ AC_REQUIRE([AC_PROG_RANLIB])dnl
18885+ AC_REQUIRE([AC_ISC_POSIX])dnl
18886+ AC_REQUIRE([AC_HEADER_STDC])dnl
18887+ AC_REQUIRE([AC_C_CONST])dnl
18888+ AC_REQUIRE([bh_C_SIGNED])dnl
18889+ AC_REQUIRE([AC_C_INLINE])dnl
18890+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
18891+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
18892+ AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
18893+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
18894+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
18895+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
18896+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
18897+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
18898+ AC_REQUIRE([gt_TYPE_INTMAX_T])
18899+ AC_REQUIRE([gt_PRINTF_POSIX])
18900+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
18901+ AC_REQUIRE([AC_FUNC_MMAP])dnl
18902+ AC_REQUIRE([jm_GLIBC21])dnl
18903+ AC_REQUIRE([gt_INTDIV0])dnl
18904+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
18905+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
18906+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
18907+ AC_REQUIRE([gl_XSIZE])dnl
18908+
18909+ AC_CHECK_TYPE([ptrdiff_t], ,
18910+ [AC_DEFINE([ptrdiff_t], [long],
18911+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
18912+ ])
18913+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
18914+stdlib.h string.h unistd.h sys/param.h])
18915+ AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
18916+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
18917+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
18918+__fsetlocking])
18919+
18920+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
18921+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
18922+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
18923+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
18924+
18925+ dnl Use the *_unlocked functions only if they are declared.
18926+ dnl (because some of them were defined without being declared in Solaris
18927+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
18928+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
18929+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
18930+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
18931+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
18932+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
18933+
18934+ case $gt_cv_func_printf_posix in
18935+ *yes) HAVE_POSIX_PRINTF=1 ;;
18936+ *) HAVE_POSIX_PRINTF=0 ;;
18937+ esac
18938+ AC_SUBST([HAVE_POSIX_PRINTF])
18939+ if test "$ac_cv_func_asprintf" = yes; then
18940+ HAVE_ASPRINTF=1
18941+ else
18942+ HAVE_ASPRINTF=0
18943+ fi
18944+ AC_SUBST([HAVE_ASPRINTF])
18945+ if test "$ac_cv_func_snprintf" = yes; then
18946+ HAVE_SNPRINTF=1
18947+ else
18948+ HAVE_SNPRINTF=0
18949+ fi
18950+ AC_SUBST([HAVE_SNPRINTF])
18951+ if test "$ac_cv_func_wprintf" = yes; then
18952+ HAVE_WPRINTF=1
18953+ else
18954+ HAVE_WPRINTF=0
18955+ fi
18956+ AC_SUBST([HAVE_WPRINTF])
18957+
18958+ AM_ICONV
18959+ AM_LANGINFO_CODESET
18960+ if test $ac_cv_header_locale_h = yes; then
18961+ AM_LC_MESSAGES
18962+ fi
18963+
18964+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
18965+ dnl because plural.y uses bison specific features. It requires at least
18966+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
18967+ dnl compile.
18968+ dnl bison is only needed for the maintainer (who touches plural.y). But in
18969+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
18970+ dnl the rule in general Makefile. Now, some people carelessly touch the
18971+ dnl files or have a broken "make" program, hence the plural.c rule will
18972+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
18973+ dnl present or too old.
18974+ AC_CHECK_PROGS([INTLBISON], [bison])
18975+ if test -z "$INTLBISON"; then
18976+ ac_verc_fail=yes
18977+ else
18978+ dnl Found it, now check the version.
18979+ AC_MSG_CHECKING([version of bison])
18980+changequote(<<,>>)dnl
18981+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
18982+ case $ac_prog_version in
18983+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
18984+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
18985+changequote([,])dnl
18986+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
18987+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
18988+ esac
18989+ AC_MSG_RESULT([$ac_prog_version])
18990+ fi
18991+ if test $ac_verc_fail = yes; then
18992+ INTLBISON=:
18993+ fi
18994+])
18995+
18996+
18997+dnl gt_CHECK_DECL(FUNC, INCLUDES)
18998+dnl Check whether a function is declared.
18999+AC_DEFUN([gt_CHECK_DECL],
19000+[
19001+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
19002+ [AC_TRY_COMPILE([$2], [
19003+#ifndef $1
19004+ char *p = (char *) $1;
19005+#endif
19006+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
19007+ if test $ac_cv_have_decl_$1 = yes; then
19008+ gt_value=1
19009+ else
19010+ gt_value=0
19011+ fi
19012+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
19013+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
19014+])
19015+
19016+
19017+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
19018+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
19019--- lrzsz-0.12.20.safe/m4/glibc21.m4 1969-12-31 19:00:00.000000000 -0500
19020+++ lrzsz-0.12.20/m4/glibc21.m4 2004-09-12 14:40:34.833675432 -0400
19021@@ -0,0 +1,32 @@
19022+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
19023+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19024+dnl This file is free software, distributed under the terms of the GNU
19025+dnl General Public License. As a special exception to the GNU General
19026+dnl Public License, this file may be distributed as part of a program
19027+dnl that contains a configuration script generated by Autoconf, under
19028+dnl the same distribution terms as the rest of that program.
19029+
19030+# Test for the GNU C Library, version 2.1 or newer.
19031+# From Bruno Haible.
19032+
19033+AC_DEFUN([jm_GLIBC21],
19034+ [
19035+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
19036+ ac_cv_gnu_library_2_1,
19037+ [AC_EGREP_CPP([Lucky GNU user],
19038+ [
19039+#include <features.h>
19040+#ifdef __GNU_LIBRARY__
19041+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
19042+ Lucky GNU user
19043+ #endif
19044+#endif
19045+ ],
19046+ ac_cv_gnu_library_2_1=yes,
19047+ ac_cv_gnu_library_2_1=no)
19048+ ]
19049+ )
19050+ AC_SUBST(GLIBC21)
19051+ GLIBC21="$ac_cv_gnu_library_2_1"
19052+ ]
19053+)
19054--- lrzsz-0.12.20.safe/m4/iconv.m4 1969-12-31 19:00:00.000000000 -0500
19055+++ lrzsz-0.12.20/m4/iconv.m4 2004-09-12 14:40:34.839674520 -0400
19056@@ -0,0 +1,103 @@
19057+# iconv.m4 serial AM4 (gettext-0.11.3)
19058+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19059+dnl This file is free software, distributed under the terms of the GNU
19060+dnl General Public License. As a special exception to the GNU General
19061+dnl Public License, this file may be distributed as part of a program
19062+dnl that contains a configuration script generated by Autoconf, under
19063+dnl the same distribution terms as the rest of that program.
19064+
19065+dnl From Bruno Haible.
19066+
19067+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
19068+[
19069+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
19070+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19071+ AC_REQUIRE([AC_LIB_RPATH])
19072+
19073+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19074+ dnl accordingly.
19075+ AC_LIB_LINKFLAGS_BODY([iconv])
19076+])
19077+
19078+AC_DEFUN([AM_ICONV_LINK],
19079+[
19080+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
19081+ dnl those with the standalone portable GNU libiconv installed).
19082+
19083+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19084+ dnl accordingly.
19085+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
19086+
19087+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
19088+ dnl because if the user has installed libiconv and not disabled its use
19089+ dnl via --without-libiconv-prefix, he wants to use it. The first
19090+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
19091+ am_save_CPPFLAGS="$CPPFLAGS"
19092+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
19093+
19094+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
19095+ am_cv_func_iconv="no, consider installing GNU libiconv"
19096+ am_cv_lib_iconv=no
19097+ AC_TRY_LINK([#include <stdlib.h>
19098+#include <iconv.h>],
19099+ [iconv_t cd = iconv_open("","");
19100+ iconv(cd,NULL,NULL,NULL,NULL);
19101+ iconv_close(cd);],
19102+ am_cv_func_iconv=yes)
19103+ if test "$am_cv_func_iconv" != yes; then
19104+ am_save_LIBS="$LIBS"
19105+ LIBS="$LIBS $LIBICONV"
19106+ AC_TRY_LINK([#include <stdlib.h>
19107+#include <iconv.h>],
19108+ [iconv_t cd = iconv_open("","");
19109+ iconv(cd,NULL,NULL,NULL,NULL);
19110+ iconv_close(cd);],
19111+ am_cv_lib_iconv=yes
19112+ am_cv_func_iconv=yes)
19113+ LIBS="$am_save_LIBS"
19114+ fi
19115+ ])
19116+ if test "$am_cv_func_iconv" = yes; then
19117+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
19118+ fi
19119+ if test "$am_cv_lib_iconv" = yes; then
19120+ AC_MSG_CHECKING([how to link with libiconv])
19121+ AC_MSG_RESULT([$LIBICONV])
19122+ else
19123+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
19124+ dnl either.
19125+ CPPFLAGS="$am_save_CPPFLAGS"
19126+ LIBICONV=
19127+ LTLIBICONV=
19128+ fi
19129+ AC_SUBST(LIBICONV)
19130+ AC_SUBST(LTLIBICONV)
19131+])
19132+
19133+AC_DEFUN([AM_ICONV],
19134+[
19135+ AM_ICONV_LINK
19136+ if test "$am_cv_func_iconv" = yes; then
19137+ AC_MSG_CHECKING([for iconv declaration])
19138+ AC_CACHE_VAL(am_cv_proto_iconv, [
19139+ AC_TRY_COMPILE([
19140+#include <stdlib.h>
19141+#include <iconv.h>
19142+extern
19143+#ifdef __cplusplus
19144+"C"
19145+#endif
19146+#if defined(__STDC__) || defined(__cplusplus)
19147+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
19148+#else
19149+size_t iconv();
19150+#endif
19151+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
19152+ am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
19153+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
19154+ AC_MSG_RESULT([$]{ac_t:-
19155+ }[$]am_cv_proto_iconv)
19156+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
19157+ [Define as const if the declaration of iconv() needs const.])
19158+ fi
19159+])
19160--- lrzsz-0.12.20.safe/m4/intdiv0.m4 1969-12-31 19:00:00.000000000 -0500
19161+++ lrzsz-0.12.20/m4/intdiv0.m4 2004-09-12 14:40:34.845673608 -0400
19162@@ -0,0 +1,72 @@
19163+# intdiv0.m4 serial 1 (gettext-0.11.3)
19164+dnl Copyright (C) 2002 Free Software Foundation, Inc.
19165+dnl This file is free software, distributed under the terms of the GNU
19166+dnl General Public License. As a special exception to the GNU General
19167+dnl Public License, this file may be distributed as part of a program
19168+dnl that contains a configuration script generated by Autoconf, under
19169+dnl the same distribution terms as the rest of that program.
19170+
19171+dnl From Bruno Haible.
19172+
19173+AC_DEFUN([gt_INTDIV0],
19174+[
19175+ AC_REQUIRE([AC_PROG_CC])dnl
19176+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
19177+
19178+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
19179+ gt_cv_int_divbyzero_sigfpe,
19180+ [
19181+ AC_TRY_RUN([
19182+#include <stdlib.h>
19183+#include <signal.h>
19184+
19185+static void
19186+#ifdef __cplusplus
19187+sigfpe_handler (int sig)
19188+#else
19189+sigfpe_handler (sig) int sig;
19190+#endif
19191+{
19192+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
19193+ exit (sig != SIGFPE);
19194+}
19195+
19196+int x = 1;
19197+int y = 0;
19198+int z;
19199+int nan;
19200+
19201+int main ()
19202+{
19203+ signal (SIGFPE, sigfpe_handler);
19204+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
19205+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
19206+ signal (SIGTRAP, sigfpe_handler);
19207+#endif
19208+/* Linux/SPARC yields signal SIGILL. */
19209+#if defined (__sparc__) && defined (__linux__)
19210+ signal (SIGILL, sigfpe_handler);
19211+#endif
19212+
19213+ z = x / y;
19214+ nan = y / y;
19215+ exit (1);
19216+}
19217+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
19218+ [
19219+ # Guess based on the CPU.
19220+ case "$host_cpu" in
19221+ alpha* | i[34567]86 | m68k | s390*)
19222+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
19223+ *)
19224+ gt_cv_int_divbyzero_sigfpe="guessing no";;
19225+ esac
19226+ ])
19227+ ])
19228+ case "$gt_cv_int_divbyzero_sigfpe" in
19229+ *yes) value=1;;
19230+ *) value=0;;
19231+ esac
19232+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
19233+ [Define if integer division by zero raises signal SIGFPE.])
19234+])
19235--- lrzsz-0.12.20.safe/m4/intmax.m4 1969-12-31 19:00:00.000000000 -0500
19236+++ lrzsz-0.12.20/m4/intmax.m4 2004-09-12 14:40:34.855672088 -0400
19237@@ -0,0 +1,32 @@
19238+# intmax.m4 serial 1 (gettext-0.12)
19239+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
19240+dnl This file is free software, distributed under the terms of the GNU
19241+dnl General Public License. As a special exception to the GNU General
19242+dnl Public License, this file may be distributed as part of a program
19243+dnl that contains a configuration script generated by Autoconf, under
19244+dnl the same distribution terms as the rest of that program.
19245+
19246+dnl From Bruno Haible.
19247+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
19248+dnl find a replacement if it is lacking.
19249+
19250+AC_DEFUN([gt_TYPE_INTMAX_T],
19251+[
19252+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
19253+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
19254+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
19255+ [AC_TRY_COMPILE([
19256+#include <stddef.h>
19257+#include <stdlib.h>
19258+#if HAVE_STDINT_H_WITH_UINTMAX
19259+#include <stdint.h>
19260+#endif
19261+#if HAVE_INTTYPES_H_WITH_UINTMAX
19262+#include <inttypes.h>
19263+#endif
19264+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
19265+ if test $gt_cv_c_intmax_t = yes; then
19266+ AC_DEFINE(HAVE_INTMAX_T, 1,
19267+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
19268+ fi
19269+])
19270--- lrzsz-0.12.20.safe/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
19271+++ lrzsz-0.12.20/m4/inttypes_h.m4 2004-09-12 14:40:34.868670112 -0400
19272@@ -0,0 +1,28 @@
19273+# inttypes_h.m4 serial 5 (gettext-0.12)
19274+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
19275+dnl This file is free software, distributed under the terms of the GNU
19276+dnl General Public License. As a special exception to the GNU General
19277+dnl Public License, this file may be distributed as part of a program
19278+dnl that contains a configuration script generated by Autoconf, under
19279+dnl the same distribution terms as the rest of that program.
19280+
19281+dnl From Paul Eggert.
19282+
19283+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
19284+# doesn't clash with <sys/types.h>, and declares uintmax_t.
19285+
19286+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
19287+[
19288+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
19289+ [AC_TRY_COMPILE(
19290+ [#include <sys/types.h>
19291+#include <inttypes.h>],
19292+ [uintmax_t i = (uintmax_t) -1;],
19293+ jm_ac_cv_header_inttypes_h=yes,
19294+ jm_ac_cv_header_inttypes_h=no)])
19295+ if test $jm_ac_cv_header_inttypes_h = yes; then
19296+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
19297+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
19298+ and declares uintmax_t. ])
19299+ fi
19300+])
19301--- lrzsz-0.12.20.safe/m4/inttypes.m4 1969-12-31 19:00:00.000000000 -0500
19302+++ lrzsz-0.12.20/m4/inttypes.m4 2004-09-12 14:40:34.861671176 -0400
19303@@ -0,0 +1,27 @@
19304+# inttypes.m4 serial 1 (gettext-0.11.4)
19305+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19306+dnl This file is free software, distributed under the terms of the GNU
19307+dnl General Public License. As a special exception to the GNU General
19308+dnl Public License, this file may be distributed as part of a program
19309+dnl that contains a configuration script generated by Autoconf, under
19310+dnl the same distribution terms as the rest of that program.
19311+
19312+dnl From Paul Eggert.
19313+
19314+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
19315+# <sys/types.h>.
19316+
19317+AC_DEFUN([gt_HEADER_INTTYPES_H],
19318+[
19319+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
19320+ [
19321+ AC_TRY_COMPILE(
19322+ [#include <sys/types.h>
19323+#include <inttypes.h>],
19324+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
19325+ ])
19326+ if test $gt_cv_header_inttypes_h = yes; then
19327+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
19328+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
19329+ fi
19330+])
19331--- lrzsz-0.12.20.safe/m4/inttypes-pri.m4 1969-12-31 19:00:00.000000000 -0500
19332+++ lrzsz-0.12.20/m4/inttypes-pri.m4 2004-09-12 14:40:34.874669200 -0400
19333@@ -0,0 +1,32 @@
19334+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
19335+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19336+dnl This file is free software, distributed under the terms of the GNU
19337+dnl General Public License. As a special exception to the GNU General
19338+dnl Public License, this file may be distributed as part of a program
19339+dnl that contains a configuration script generated by Autoconf, under
19340+dnl the same distribution terms as the rest of that program.
19341+
19342+dnl From Bruno Haible.
19343+
19344+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
19345+# macros to non-string values. This is the case on AIX 4.3.3.
19346+
19347+AC_DEFUN([gt_INTTYPES_PRI],
19348+[
19349+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
19350+ if test $gt_cv_header_inttypes_h = yes; then
19351+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
19352+ gt_cv_inttypes_pri_broken,
19353+ [
19354+ AC_TRY_COMPILE([#include <inttypes.h>
19355+#ifdef PRId32
19356+char *p = PRId32;
19357+#endif
19358+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
19359+ ])
19360+ fi
19361+ if test "$gt_cv_inttypes_pri_broken" = yes; then
19362+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
19363+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
19364+ fi
19365+])
19366--- lrzsz-0.12.20.safe/m4/isc-posix.m4 1969-12-31 19:00:00.000000000 -0500
19367+++ lrzsz-0.12.20/m4/isc-posix.m4 2004-09-12 14:40:34.885667528 -0400
19368@@ -0,0 +1,26 @@
19369+# isc-posix.m4 serial 2 (gettext-0.11.2)
19370+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19371+dnl This file is free software, distributed under the terms of the GNU
19372+dnl General Public License. As a special exception to the GNU General
19373+dnl Public License, this file may be distributed as part of a program
19374+dnl that contains a configuration script generated by Autoconf, under
19375+dnl the same distribution terms as the rest of that program.
19376+
19377+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
19378+
19379+# This test replaces the one in autoconf.
19380+# Currently this macro should have the same name as the autoconf macro
19381+# because gettext's gettext.m4 (distributed in the automake package)
19382+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
19383+# give these diagnostics:
19384+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
19385+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
19386+
19387+undefine([AC_ISC_POSIX])
19388+
19389+AC_DEFUN([AC_ISC_POSIX],
19390+ [
19391+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
19392+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
19393+ ]
19394+)
19395--- lrzsz-0.12.20.safe/m4/lcmessage.m4 1969-12-31 19:00:00.000000000 -0500
19396+++ lrzsz-0.12.20/m4/lcmessage.m4 2004-09-12 14:40:34.902664944 -0400
19397@@ -0,0 +1,32 @@
19398+# lcmessage.m4 serial 3 (gettext-0.11.3)
19399+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19400+dnl This file is free software, distributed under the terms of the GNU
19401+dnl General Public License. As a special exception to the GNU General
19402+dnl Public License, this file may be distributed as part of a program
19403+dnl that contains a configuration script generated by Autoconf, under
19404+dnl the same distribution terms as the rest of that program.
19405+dnl
19406+dnl This file can can be used in projects which are not available under
19407+dnl the GNU General Public License or the GNU Library General Public
19408+dnl License but which still want to provide support for the GNU gettext
19409+dnl functionality.
19410+dnl Please note that the actual code of the GNU gettext library is covered
19411+dnl by the GNU Library General Public License, and the rest of the GNU
19412+dnl gettext package package is covered by the GNU General Public License.
19413+dnl They are *not* in the public domain.
19414+
19415+dnl Authors:
19416+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
19417+
19418+# Check whether LC_MESSAGES is available in <locale.h>.
19419+
19420+AC_DEFUN([AM_LC_MESSAGES],
19421+[
19422+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
19423+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
19424+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
19425+ if test $am_cv_val_LC_MESSAGES = yes; then
19426+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
19427+ [Define if your <locale.h> file defines LC_MESSAGES.])
19428+ fi
19429+])
19430--- lrzsz-0.12.20.safe/m4/lib-ld.m4 1969-12-31 19:00:00.000000000 -0500
19431+++ lrzsz-0.12.20/m4/lib-ld.m4 2004-09-12 14:40:34.908664032 -0400
19432@@ -0,0 +1,112 @@
19433+# lib-ld.m4 serial 3 (gettext-0.13)
19434+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
19435+dnl This file is free software, distributed under the terms of the GNU
19436+dnl General Public License. As a special exception to the GNU General
19437+dnl Public License, this file may be distributed as part of a program
19438+dnl that contains a configuration script generated by Autoconf, under
19439+dnl the same distribution terms as the rest of that program.
19440+
19441+dnl Subroutines of libtool.m4,
19442+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
19443+dnl with libtool.m4.
19444+
19445+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
19446+AC_DEFUN([AC_LIB_PROG_LD_GNU],
19447+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
19448+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
19449+case `$LD -v 2>&1 </dev/null` in
19450+*GNU* | *'with BFD'*)
19451+ acl_cv_prog_gnu_ld=yes ;;
19452+*)
19453+ acl_cv_prog_gnu_ld=no ;;
19454+esac])
19455+with_gnu_ld=$acl_cv_prog_gnu_ld
19456+])
19457+
19458+dnl From libtool-1.4. Sets the variable LD.
19459+AC_DEFUN([AC_LIB_PROG_LD],
19460+[AC_ARG_WITH(gnu-ld,
19461+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
19462+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
19463+AC_REQUIRE([AC_PROG_CC])dnl
19464+AC_REQUIRE([AC_CANONICAL_HOST])dnl
19465+# Prepare PATH_SEPARATOR.
19466+# The user is always right.
19467+if test "${PATH_SEPARATOR+set}" != set; then
19468+ echo "#! /bin/sh" >conf$$.sh
19469+ echo "exit 0" >>conf$$.sh
19470+ chmod +x conf$$.sh
19471+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19472+ PATH_SEPARATOR=';'
19473+ else
19474+ PATH_SEPARATOR=:
19475+ fi
19476+ rm -f conf$$.sh
19477+fi
19478+ac_prog=ld
19479+if test "$GCC" = yes; then
19480+ # Check if gcc -print-prog-name=ld gives a path.
19481+ AC_MSG_CHECKING([for ld used by GCC])
19482+ case $host in
19483+ *-*-mingw*)
19484+ # gcc leaves a trailing carriage return which upsets mingw
19485+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
19486+ *)
19487+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
19488+ esac
19489+ case $ac_prog in
19490+ # Accept absolute paths.
19491+ [[\\/]* | [A-Za-z]:[\\/]*)]
19492+ [re_direlt='/[^/][^/]*/\.\./']
19493+ # Canonicalize the path of ld
19494+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
19495+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
19496+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
19497+ done
19498+ test -z "$LD" && LD="$ac_prog"
19499+ ;;
19500+ "")
19501+ # If it fails, then pretend we aren't using GCC.
19502+ ac_prog=ld
19503+ ;;
19504+ *)
19505+ # If it is relative, then search for the first ld in PATH.
19506+ with_gnu_ld=unknown
19507+ ;;
19508+ esac
19509+elif test "$with_gnu_ld" = yes; then
19510+ AC_MSG_CHECKING([for GNU ld])
19511+else
19512+ AC_MSG_CHECKING([for non-GNU ld])
19513+fi
19514+AC_CACHE_VAL(acl_cv_path_LD,
19515+[if test -z "$LD"; then
19516+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
19517+ for ac_dir in $PATH; do
19518+ test -z "$ac_dir" && ac_dir=.
19519+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
19520+ acl_cv_path_LD="$ac_dir/$ac_prog"
19521+ # Check to see if the program is GNU ld. I'd rather use --version,
19522+ # but apparently some GNU ld's only accept -v.
19523+ # Break only if it was the GNU/non-GNU ld that we prefer.
19524+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
19525+ *GNU* | *'with BFD'*)
19526+ test "$with_gnu_ld" != no && break ;;
19527+ *)
19528+ test "$with_gnu_ld" != yes && break ;;
19529+ esac
19530+ fi
19531+ done
19532+ IFS="$ac_save_ifs"
19533+else
19534+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
19535+fi])
19536+LD="$acl_cv_path_LD"
19537+if test -n "$LD"; then
19538+ AC_MSG_RESULT($LD)
19539+else
19540+ AC_MSG_RESULT(no)
19541+fi
19542+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
19543+AC_LIB_PROG_LD_GNU
19544+])
19545--- lrzsz-0.12.20.safe/m4/lib-link.m4 1969-12-31 19:00:00.000000000 -0500
19546+++ lrzsz-0.12.20/m4/lib-link.m4 2004-09-12 14:40:34.914663120 -0400
19547@@ -0,0 +1,551 @@
19548+# lib-link.m4 serial 4 (gettext-0.12)
19549+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
19550+dnl This file is free software, distributed under the terms of the GNU
19551+dnl General Public License. As a special exception to the GNU General
19552+dnl Public License, this file may be distributed as part of a program
19553+dnl that contains a configuration script generated by Autoconf, under
19554+dnl the same distribution terms as the rest of that program.
19555+
19556+dnl From Bruno Haible.
19557+
19558+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
19559+dnl the libraries corresponding to explicit and implicit dependencies.
19560+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
19561+dnl augments the CPPFLAGS variable.
19562+AC_DEFUN([AC_LIB_LINKFLAGS],
19563+[
19564+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19565+ AC_REQUIRE([AC_LIB_RPATH])
19566+ define([Name],[translit([$1],[./-], [___])])
19567+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19568+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19569+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
19570+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19571+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
19572+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
19573+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
19574+ ])
19575+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
19576+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
19577+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
19578+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19579+ AC_SUBST([LIB]NAME)
19580+ AC_SUBST([LTLIB]NAME)
19581+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
19582+ dnl results of this search when this library appears as a dependency.
19583+ HAVE_LIB[]NAME=yes
19584+ undefine([Name])
19585+ undefine([NAME])
19586+])
19587+
19588+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
19589+dnl searches for libname and the libraries corresponding to explicit and
19590+dnl implicit dependencies, together with the specified include files and
19591+dnl the ability to compile and link the specified testcode. If found, it
19592+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
19593+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
19594+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
19595+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
19596+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
19597+[
19598+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19599+ AC_REQUIRE([AC_LIB_RPATH])
19600+ define([Name],[translit([$1],[./-], [___])])
19601+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19602+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19603+
19604+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
19605+ dnl accordingly.
19606+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19607+
19608+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
19609+ dnl because if the user has installed lib[]Name and not disabled its use
19610+ dnl via --without-lib[]Name-prefix, he wants to use it.
19611+ ac_save_CPPFLAGS="$CPPFLAGS"
19612+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19613+
19614+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
19615+ ac_save_LIBS="$LIBS"
19616+ LIBS="$LIBS $LIB[]NAME"
19617+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
19618+ LIBS="$ac_save_LIBS"
19619+ ])
19620+ if test "$ac_cv_lib[]Name" = yes; then
19621+ HAVE_LIB[]NAME=yes
19622+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
19623+ AC_MSG_CHECKING([how to link with lib[]$1])
19624+ AC_MSG_RESULT([$LIB[]NAME])
19625+ else
19626+ HAVE_LIB[]NAME=no
19627+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
19628+ dnl $INC[]NAME either.
19629+ CPPFLAGS="$ac_save_CPPFLAGS"
19630+ LIB[]NAME=
19631+ LTLIB[]NAME=
19632+ fi
19633+ AC_SUBST([HAVE_LIB]NAME)
19634+ AC_SUBST([LIB]NAME)
19635+ AC_SUBST([LTLIB]NAME)
19636+ undefine([Name])
19637+ undefine([NAME])
19638+])
19639+
19640+dnl Determine the platform dependent parameters needed to use rpath:
19641+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
19642+dnl hardcode_direct, hardcode_minus_L.
19643+AC_DEFUN([AC_LIB_RPATH],
19644+[
19645+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
19646+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
19647+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
19648+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
19649+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
19650+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
19651+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
19652+ . ./conftest.sh
19653+ rm -f ./conftest.sh
19654+ acl_cv_rpath=done
19655+ ])
19656+ wl="$acl_cv_wl"
19657+ libext="$acl_cv_libext"
19658+ shlibext="$acl_cv_shlibext"
19659+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
19660+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
19661+ hardcode_direct="$acl_cv_hardcode_direct"
19662+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
19663+ dnl Determine whether the user wants rpath handling at all.
19664+ AC_ARG_ENABLE(rpath,
19665+ [ --disable-rpath do not hardcode runtime library paths],
19666+ :, enable_rpath=yes)
19667+])
19668+
19669+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
19670+dnl the libraries corresponding to explicit and implicit dependencies.
19671+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
19672+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
19673+[
19674+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19675+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19676+ dnl By default, look in $includedir and $libdir.
19677+ use_additional=yes
19678+ AC_LIB_WITH_FINAL_PREFIX([
19679+ eval additional_includedir=\"$includedir\"
19680+ eval additional_libdir=\"$libdir\"
19681+ ])
19682+ AC_LIB_ARG_WITH([lib$1-prefix],
19683+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
19684+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
19685+[
19686+ if test "X$withval" = "Xno"; then
19687+ use_additional=no
19688+ else
19689+ if test "X$withval" = "X"; then
19690+ AC_LIB_WITH_FINAL_PREFIX([
19691+ eval additional_includedir=\"$includedir\"
19692+ eval additional_libdir=\"$libdir\"
19693+ ])
19694+ else
19695+ additional_includedir="$withval/include"
19696+ additional_libdir="$withval/lib"
19697+ fi
19698+ fi
19699+])
19700+ dnl Search the library and its dependencies in $additional_libdir and
19701+ dnl $LDFLAGS. Using breadth-first-seach.
19702+ LIB[]NAME=
19703+ LTLIB[]NAME=
19704+ INC[]NAME=
19705+ rpathdirs=
19706+ ltrpathdirs=
19707+ names_already_handled=
19708+ names_next_round='$1 $2'
19709+ while test -n "$names_next_round"; do
19710+ names_this_round="$names_next_round"
19711+ names_next_round=
19712+ for name in $names_this_round; do
19713+ already_handled=
19714+ for n in $names_already_handled; do
19715+ if test "$n" = "$name"; then
19716+ already_handled=yes
19717+ break
19718+ fi
19719+ done
19720+ if test -z "$already_handled"; then
19721+ names_already_handled="$names_already_handled $name"
19722+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
19723+ dnl or AC_LIB_HAVE_LINKFLAGS call.
19724+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19725+ eval value=\"\$HAVE_LIB$uppername\"
19726+ if test -n "$value"; then
19727+ if test "$value" = yes; then
19728+ eval value=\"\$LIB$uppername\"
19729+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
19730+ eval value=\"\$LTLIB$uppername\"
19731+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
19732+ else
19733+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
19734+ dnl that this library doesn't exist. So just drop it.
19735+ :
19736+ fi
19737+ else
19738+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
19739+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
19740+ found_dir=
19741+ found_la=
19742+ found_so=
19743+ found_a=
19744+ if test $use_additional = yes; then
19745+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
19746+ found_dir="$additional_libdir"
19747+ found_so="$additional_libdir/lib$name.$shlibext"
19748+ if test -f "$additional_libdir/lib$name.la"; then
19749+ found_la="$additional_libdir/lib$name.la"
19750+ fi
19751+ else
19752+ if test -f "$additional_libdir/lib$name.$libext"; then
19753+ found_dir="$additional_libdir"
19754+ found_a="$additional_libdir/lib$name.$libext"
19755+ if test -f "$additional_libdir/lib$name.la"; then
19756+ found_la="$additional_libdir/lib$name.la"
19757+ fi
19758+ fi
19759+ fi
19760+ fi
19761+ if test "X$found_dir" = "X"; then
19762+ for x in $LDFLAGS $LTLIB[]NAME; do
19763+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19764+ case "$x" in
19765+ -L*)
19766+ dir=`echo "X$x" | sed -e 's/^X-L//'`
19767+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
19768+ found_dir="$dir"
19769+ found_so="$dir/lib$name.$shlibext"
19770+ if test -f "$dir/lib$name.la"; then
19771+ found_la="$dir/lib$name.la"
19772+ fi
19773+ else
19774+ if test -f "$dir/lib$name.$libext"; then
19775+ found_dir="$dir"
19776+ found_a="$dir/lib$name.$libext"
19777+ if test -f "$dir/lib$name.la"; then
19778+ found_la="$dir/lib$name.la"
19779+ fi
19780+ fi
19781+ fi
19782+ ;;
19783+ esac
19784+ if test "X$found_dir" != "X"; then
19785+ break
19786+ fi
19787+ done
19788+ fi
19789+ if test "X$found_dir" != "X"; then
19790+ dnl Found the library.
19791+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
19792+ if test "X$found_so" != "X"; then
19793+ dnl Linking with a shared library. We attempt to hardcode its
19794+ dnl directory into the executable's runpath, unless it's the
19795+ dnl standard /usr/lib.
19796+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19797+ dnl No hardcoding is needed.
19798+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19799+ else
19800+ dnl Use an explicit option to hardcode DIR into the resulting
19801+ dnl binary.
19802+ dnl Potentially add DIR to ltrpathdirs.
19803+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
19804+ haveit=
19805+ for x in $ltrpathdirs; do
19806+ if test "X$x" = "X$found_dir"; then
19807+ haveit=yes
19808+ break
19809+ fi
19810+ done
19811+ if test -z "$haveit"; then
19812+ ltrpathdirs="$ltrpathdirs $found_dir"
19813+ fi
19814+ dnl The hardcoding into $LIBNAME is system dependent.
19815+ if test "$hardcode_direct" = yes; then
19816+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
19817+ dnl resulting binary.
19818+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19819+ else
19820+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19821+ dnl Use an explicit option to hardcode DIR into the resulting
19822+ dnl binary.
19823+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19824+ dnl Potentially add DIR to rpathdirs.
19825+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19826+ haveit=
19827+ for x in $rpathdirs; do
19828+ if test "X$x" = "X$found_dir"; then
19829+ haveit=yes
19830+ break
19831+ fi
19832+ done
19833+ if test -z "$haveit"; then
19834+ rpathdirs="$rpathdirs $found_dir"
19835+ fi
19836+ else
19837+ dnl Rely on "-L$found_dir".
19838+ dnl But don't add it if it's already contained in the LDFLAGS
19839+ dnl or the already constructed $LIBNAME
19840+ haveit=
19841+ for x in $LDFLAGS $LIB[]NAME; do
19842+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19843+ if test "X$x" = "X-L$found_dir"; then
19844+ haveit=yes
19845+ break
19846+ fi
19847+ done
19848+ if test -z "$haveit"; then
19849+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
19850+ fi
19851+ if test "$hardcode_minus_L" != no; then
19852+ dnl FIXME: Not sure whether we should use
19853+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19854+ dnl here.
19855+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19856+ else
19857+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
19858+ dnl here, because this doesn't fit in flags passed to the
19859+ dnl compiler. So give up. No hardcoding. This affects only
19860+ dnl very old systems.
19861+ dnl FIXME: Not sure whether we should use
19862+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19863+ dnl here.
19864+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
19865+ fi
19866+ fi
19867+ fi
19868+ fi
19869+ else
19870+ if test "X$found_a" != "X"; then
19871+ dnl Linking with a static library.
19872+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
19873+ else
19874+ dnl We shouldn't come here, but anyway it's good to have a
19875+ dnl fallback.
19876+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
19877+ fi
19878+ fi
19879+ dnl Assume the include files are nearby.
19880+ additional_includedir=
19881+ case "$found_dir" in
19882+ */lib | */lib/)
19883+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19884+ additional_includedir="$basedir/include"
19885+ ;;
19886+ esac
19887+ if test "X$additional_includedir" != "X"; then
19888+ dnl Potentially add $additional_includedir to $INCNAME.
19889+ dnl But don't add it
19890+ dnl 1. if it's the standard /usr/include,
19891+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
19892+ dnl 3. if it's already present in $CPPFLAGS or the already
19893+ dnl constructed $INCNAME,
19894+ dnl 4. if it doesn't exist as a directory.
19895+ if test "X$additional_includedir" != "X/usr/include"; then
19896+ haveit=
19897+ if test "X$additional_includedir" = "X/usr/local/include"; then
19898+ if test -n "$GCC"; then
19899+ case $host_os in
19900+ linux*) haveit=yes;;
19901+ esac
19902+ fi
19903+ fi
19904+ if test -z "$haveit"; then
19905+ for x in $CPPFLAGS $INC[]NAME; do
19906+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19907+ if test "X$x" = "X-I$additional_includedir"; then
19908+ haveit=yes
19909+ break
19910+ fi
19911+ done
19912+ if test -z "$haveit"; then
19913+ if test -d "$additional_includedir"; then
19914+ dnl Really add $additional_includedir to $INCNAME.
19915+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
19916+ fi
19917+ fi
19918+ fi
19919+ fi
19920+ fi
19921+ dnl Look for dependencies.
19922+ if test -n "$found_la"; then
19923+ dnl Read the .la file. It defines the variables
19924+ dnl dlname, library_names, old_library, dependency_libs, current,
19925+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
19926+ save_libdir="$libdir"
19927+ case "$found_la" in
19928+ */* | *\\*) . "$found_la" ;;
19929+ *) . "./$found_la" ;;
19930+ esac
19931+ libdir="$save_libdir"
19932+ dnl We use only dependency_libs.
19933+ for dep in $dependency_libs; do
19934+ case "$dep" in
19935+ -L*)
19936+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19937+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
19938+ dnl But don't add it
19939+ dnl 1. if it's the standard /usr/lib,
19940+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
19941+ dnl 3. if it's already present in $LDFLAGS or the already
19942+ dnl constructed $LIBNAME,
19943+ dnl 4. if it doesn't exist as a directory.
19944+ if test "X$additional_libdir" != "X/usr/lib"; then
19945+ haveit=
19946+ if test "X$additional_libdir" = "X/usr/local/lib"; then
19947+ if test -n "$GCC"; then
19948+ case $host_os in
19949+ linux*) haveit=yes;;
19950+ esac
19951+ fi
19952+ fi
19953+ if test -z "$haveit"; then
19954+ haveit=
19955+ for x in $LDFLAGS $LIB[]NAME; do
19956+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19957+ if test "X$x" = "X-L$additional_libdir"; then
19958+ haveit=yes
19959+ break
19960+ fi
19961+ done
19962+ if test -z "$haveit"; then
19963+ if test -d "$additional_libdir"; then
19964+ dnl Really add $additional_libdir to $LIBNAME.
19965+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
19966+ fi
19967+ fi
19968+ haveit=
19969+ for x in $LDFLAGS $LTLIB[]NAME; do
19970+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19971+ if test "X$x" = "X-L$additional_libdir"; then
19972+ haveit=yes
19973+ break
19974+ fi
19975+ done
19976+ if test -z "$haveit"; then
19977+ if test -d "$additional_libdir"; then
19978+ dnl Really add $additional_libdir to $LTLIBNAME.
19979+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
19980+ fi
19981+ fi
19982+ fi
19983+ fi
19984+ ;;
19985+ -R*)
19986+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
19987+ if test "$enable_rpath" != no; then
19988+ dnl Potentially add DIR to rpathdirs.
19989+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19990+ haveit=
19991+ for x in $rpathdirs; do
19992+ if test "X$x" = "X$dir"; then
19993+ haveit=yes
19994+ break
19995+ fi
19996+ done
19997+ if test -z "$haveit"; then
19998+ rpathdirs="$rpathdirs $dir"
19999+ fi
20000+ dnl Potentially add DIR to ltrpathdirs.
20001+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
20002+ haveit=
20003+ for x in $ltrpathdirs; do
20004+ if test "X$x" = "X$dir"; then
20005+ haveit=yes
20006+ break
20007+ fi
20008+ done
20009+ if test -z "$haveit"; then
20010+ ltrpathdirs="$ltrpathdirs $dir"
20011+ fi
20012+ fi
20013+ ;;
20014+ -l*)
20015+ dnl Handle this in the next round.
20016+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
20017+ ;;
20018+ *.la)
20019+ dnl Handle this in the next round. Throw away the .la's
20020+ dnl directory; it is already contained in a preceding -L
20021+ dnl option.
20022+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
20023+ ;;
20024+ *)
20025+ dnl Most likely an immediate library name.
20026+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
20027+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
20028+ ;;
20029+ esac
20030+ done
20031+ fi
20032+ else
20033+ dnl Didn't find the library; assume it is in the system directories
20034+ dnl known to the linker and runtime loader. (All the system
20035+ dnl directories known to the linker should also be known to the
20036+ dnl runtime loader, otherwise the system is severely misconfigured.)
20037+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
20038+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
20039+ fi
20040+ fi
20041+ fi
20042+ done
20043+ done
20044+ if test "X$rpathdirs" != "X"; then
20045+ if test -n "$hardcode_libdir_separator"; then
20046+ dnl Weird platform: only the last -rpath option counts, the user must
20047+ dnl pass all path elements in one option. We can arrange that for a
20048+ dnl single library, but not when more than one $LIBNAMEs are used.
20049+ alldirs=
20050+ for found_dir in $rpathdirs; do
20051+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
20052+ done
20053+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
20054+ acl_save_libdir="$libdir"
20055+ libdir="$alldirs"
20056+ eval flag=\"$hardcode_libdir_flag_spec\"
20057+ libdir="$acl_save_libdir"
20058+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20059+ else
20060+ dnl The -rpath options are cumulative.
20061+ for found_dir in $rpathdirs; do
20062+ acl_save_libdir="$libdir"
20063+ libdir="$found_dir"
20064+ eval flag=\"$hardcode_libdir_flag_spec\"
20065+ libdir="$acl_save_libdir"
20066+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20067+ done
20068+ fi
20069+ fi
20070+ if test "X$ltrpathdirs" != "X"; then
20071+ dnl When using libtool, the option that works for both libraries and
20072+ dnl executables is -R. The -R options are cumulative.
20073+ for found_dir in $ltrpathdirs; do
20074+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
20075+ done
20076+ fi
20077+])
20078+
20079+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
20080+dnl unless already present in VAR.
20081+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
20082+dnl contains two or three consecutive elements that belong together.
20083+AC_DEFUN([AC_LIB_APPENDTOVAR],
20084+[
20085+ for element in [$2]; do
20086+ haveit=
20087+ for x in $[$1]; do
20088+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20089+ if test "X$x" = "X$element"; then
20090+ haveit=yes
20091+ break
20092+ fi
20093+ done
20094+ if test -z "$haveit"; then
20095+ [$1]="${[$1]}${[$1]:+ }$element"
20096+ fi
20097+ done
20098+])
20099--- lrzsz-0.12.20.safe/m4/lib-prefix.m4 1969-12-31 19:00:00.000000000 -0500
20100+++ lrzsz-0.12.20/m4/lib-prefix.m4 2004-09-12 14:40:34.921662056 -0400
20101@@ -0,0 +1,155 @@
20102+# lib-prefix.m4 serial 3 (gettext-0.13)
20103+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
20104+dnl This file is free software, distributed under the terms of the GNU
20105+dnl General Public License. As a special exception to the GNU General
20106+dnl Public License, this file may be distributed as part of a program
20107+dnl that contains a configuration script generated by Autoconf, under
20108+dnl the same distribution terms as the rest of that program.
20109+
20110+dnl From Bruno Haible.
20111+
20112+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
20113+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
20114+dnl require excessive bracketing.
20115+ifdef([AC_HELP_STRING],
20116+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
20117+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
20118+
20119+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
20120+dnl to access previously installed libraries. The basic assumption is that
20121+dnl a user will want packages to use other packages he previously installed
20122+dnl with the same --prefix option.
20123+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
20124+dnl libraries, but is otherwise very convenient.
20125+AC_DEFUN([AC_LIB_PREFIX],
20126+[
20127+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
20128+ AC_REQUIRE([AC_PROG_CC])
20129+ AC_REQUIRE([AC_CANONICAL_HOST])
20130+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20131+ dnl By default, look in $includedir and $libdir.
20132+ use_additional=yes
20133+ AC_LIB_WITH_FINAL_PREFIX([
20134+ eval additional_includedir=\"$includedir\"
20135+ eval additional_libdir=\"$libdir\"
20136+ ])
20137+ AC_LIB_ARG_WITH([lib-prefix],
20138+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
20139+ --without-lib-prefix don't search for libraries in includedir and libdir],
20140+[
20141+ if test "X$withval" = "Xno"; then
20142+ use_additional=no
20143+ else
20144+ if test "X$withval" = "X"; then
20145+ AC_LIB_WITH_FINAL_PREFIX([
20146+ eval additional_includedir=\"$includedir\"
20147+ eval additional_libdir=\"$libdir\"
20148+ ])
20149+ else
20150+ additional_includedir="$withval/include"
20151+ additional_libdir="$withval/lib"
20152+ fi
20153+ fi
20154+])
20155+ if test $use_additional = yes; then
20156+ dnl Potentially add $additional_includedir to $CPPFLAGS.
20157+ dnl But don't add it
20158+ dnl 1. if it's the standard /usr/include,
20159+ dnl 2. if it's already present in $CPPFLAGS,
20160+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
20161+ dnl 4. if it doesn't exist as a directory.
20162+ if test "X$additional_includedir" != "X/usr/include"; then
20163+ haveit=
20164+ for x in $CPPFLAGS; do
20165+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20166+ if test "X$x" = "X-I$additional_includedir"; then
20167+ haveit=yes
20168+ break
20169+ fi
20170+ done
20171+ if test -z "$haveit"; then
20172+ if test "X$additional_includedir" = "X/usr/local/include"; then
20173+ if test -n "$GCC"; then
20174+ case $host_os in
20175+ linux*) haveit=yes;;
20176+ esac
20177+ fi
20178+ fi
20179+ if test -z "$haveit"; then
20180+ if test -d "$additional_includedir"; then
20181+ dnl Really add $additional_includedir to $CPPFLAGS.
20182+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
20183+ fi
20184+ fi
20185+ fi
20186+ fi
20187+ dnl Potentially add $additional_libdir to $LDFLAGS.
20188+ dnl But don't add it
20189+ dnl 1. if it's the standard /usr/lib,
20190+ dnl 2. if it's already present in $LDFLAGS,
20191+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
20192+ dnl 4. if it doesn't exist as a directory.
20193+ if test "X$additional_libdir" != "X/usr/lib"; then
20194+ haveit=
20195+ for x in $LDFLAGS; do
20196+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20197+ if test "X$x" = "X-L$additional_libdir"; then
20198+ haveit=yes
20199+ break
20200+ fi
20201+ done
20202+ if test -z "$haveit"; then
20203+ if test "X$additional_libdir" = "X/usr/local/lib"; then
20204+ if test -n "$GCC"; then
20205+ case $host_os in
20206+ linux*) haveit=yes;;
20207+ esac
20208+ fi
20209+ fi
20210+ if test -z "$haveit"; then
20211+ if test -d "$additional_libdir"; then
20212+ dnl Really add $additional_libdir to $LDFLAGS.
20213+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
20214+ fi
20215+ fi
20216+ fi
20217+ fi
20218+ fi
20219+])
20220+
20221+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
20222+dnl acl_final_exec_prefix, containing the values to which $prefix and
20223+dnl $exec_prefix will expand at the end of the configure script.
20224+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
20225+[
20226+ dnl Unfortunately, prefix and exec_prefix get only finally determined
20227+ dnl at the end of configure.
20228+ if test "X$prefix" = "XNONE"; then
20229+ acl_final_prefix="$ac_default_prefix"
20230+ else
20231+ acl_final_prefix="$prefix"
20232+ fi
20233+ if test "X$exec_prefix" = "XNONE"; then
20234+ acl_final_exec_prefix='${prefix}'
20235+ else
20236+ acl_final_exec_prefix="$exec_prefix"
20237+ fi
20238+ acl_save_prefix="$prefix"
20239+ prefix="$acl_final_prefix"
20240+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
20241+ prefix="$acl_save_prefix"
20242+])
20243+
20244+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
20245+dnl variables prefix and exec_prefix bound to the values they will have
20246+dnl at the end of the configure script.
20247+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
20248+[
20249+ acl_save_prefix="$prefix"
20250+ prefix="$acl_final_prefix"
20251+ acl_save_exec_prefix="$exec_prefix"
20252+ exec_prefix="$acl_final_exec_prefix"
20253+ $1
20254+ exec_prefix="$acl_save_exec_prefix"
20255+ prefix="$acl_save_prefix"
20256+])
20257--- lrzsz-0.12.20.safe/m4/longdouble.m4 1969-12-31 19:00:00.000000000 -0500
20258+++ lrzsz-0.12.20/m4/longdouble.m4 2004-09-12 14:40:34.942658864 -0400
20259@@ -0,0 +1,30 @@
20260+# longdouble.m4 serial 1 (gettext-0.12)
20261+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
20262+dnl This file is free software, distributed under the terms of the GNU
20263+dnl General Public License. As a special exception to the GNU General
20264+dnl Public License, this file may be distributed as part of a program
20265+dnl that contains a configuration script generated by Autoconf, under
20266+dnl the same distribution terms as the rest of that program.
20267+
20268+dnl From Bruno Haible.
20269+dnl Test whether the compiler supports the 'long double' type.
20270+dnl Prerequisite: AC_PROG_CC
20271+
20272+AC_DEFUN([gt_TYPE_LONGDOUBLE],
20273+[
20274+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
20275+ [if test "$GCC" = yes; then
20276+ gt_cv_c_long_double=yes
20277+ else
20278+ AC_TRY_COMPILE([
20279+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
20280+ long double foo = 0.0;
20281+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
20282+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
20283+ ], ,
20284+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
20285+ fi])
20286+ if test $gt_cv_c_long_double = yes; then
20287+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
20288+ fi
20289+])
20290--- lrzsz-0.12.20.safe/m4/longlong.m4 1969-12-31 19:00:00.000000000 -0500
20291+++ lrzsz-0.12.20/m4/longlong.m4 2004-09-12 14:40:34.949657800 -0400
20292@@ -0,0 +1,25 @@
20293+# longlong.m4 serial 4
20294+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
20295+dnl This file is free software, distributed under the terms of the GNU
20296+dnl General Public License. As a special exception to the GNU General
20297+dnl Public License, this file may be distributed as part of a program
20298+dnl that contains a configuration script generated by Autoconf, under
20299+dnl the same distribution terms as the rest of that program.
20300+
20301+dnl From Paul Eggert.
20302+
20303+# Define HAVE_LONG_LONG if 'long long' works.
20304+
20305+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
20306+[
20307+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
20308+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
20309+ [long long llmax = (long long) -1;
20310+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
20311+ ac_cv_type_long_long=yes,
20312+ ac_cv_type_long_long=no)])
20313+ if test $ac_cv_type_long_long = yes; then
20314+ AC_DEFINE(HAVE_LONG_LONG, 1,
20315+ [Define if you have the 'long long' type.])
20316+ fi
20317+])
20318--- lrzsz-0.12.20.safe/m4/Makefile.am 1969-12-31 19:00:00.000000000 -0500
20319+++ lrzsz-0.12.20/m4/Makefile.am 2004-09-12 14:40:35.048642752 -0400
20320@@ -0,0 +1 @@
20321+EXTRA_DIST = codeset.m4 gettext.m4 glibc21.m4 iconv.m4 intdiv0.m4 intmax.m4 inttypes.m4 inttypes_h.m4 inttypes-pri.m4 isc-posix.m4 lcmessage.m4 lib-ld.m4 lib-link.m4 lib-prefix.m4 longdouble.m4 longlong.m4 nls.m4 po.m4 printf-posix.m4 progtest.m4 signed.m4 size_max.m4 stdint_h.m4 uintmax_t.m4 ulonglong.m4 wchar_t.m4 wint_t.m4 xsize.m4
20322--- lrzsz-0.12.20.safe/m4/nls.m4 1969-12-31 19:00:00.000000000 -0500
20323+++ lrzsz-0.12.20/m4/nls.m4 2004-09-12 14:40:34.955656888 -0400
20324@@ -0,0 +1,49 @@
20325+# nls.m4 serial 1 (gettext-0.12)
20326+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20327+dnl This file is free software, distributed under the terms of the GNU
20328+dnl General Public License. As a special exception to the GNU General
20329+dnl Public License, this file may be distributed as part of a program
20330+dnl that contains a configuration script generated by Autoconf, under
20331+dnl the same distribution terms as the rest of that program.
20332+dnl
20333+dnl This file can can be used in projects which are not available under
20334+dnl the GNU General Public License or the GNU Library General Public
20335+dnl License but which still want to provide support for the GNU gettext
20336+dnl functionality.
20337+dnl Please note that the actual code of the GNU gettext library is covered
20338+dnl by the GNU Library General Public License, and the rest of the GNU
20339+dnl gettext package package is covered by the GNU General Public License.
20340+dnl They are *not* in the public domain.
20341+
20342+dnl Authors:
20343+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20344+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20345+
20346+AC_DEFUN([AM_NLS],
20347+[
20348+ AC_MSG_CHECKING([whether NLS is requested])
20349+ dnl Default is enabled NLS
20350+ AC_ARG_ENABLE(nls,
20351+ [ --disable-nls do not use Native Language Support],
20352+ USE_NLS=$enableval, USE_NLS=yes)
20353+ AC_MSG_RESULT($USE_NLS)
20354+ AC_SUBST(USE_NLS)
20355+])
20356+
20357+AC_DEFUN([AM_MKINSTALLDIRS],
20358+[
20359+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
20360+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
20361+ dnl Try to locate it.
20362+ MKINSTALLDIRS=
20363+ if test -n "$ac_aux_dir"; then
20364+ case "$ac_aux_dir" in
20365+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
20366+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
20367+ esac
20368+ fi
20369+ if test -z "$MKINSTALLDIRS"; then
20370+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
20371+ fi
20372+ AC_SUBST(MKINSTALLDIRS)
20373+])
20374--- lrzsz-0.12.20.safe/m4/po.m4 1969-12-31 19:00:00.000000000 -0500
20375+++ lrzsz-0.12.20/m4/po.m4 2004-09-12 14:40:34.961655976 -0400
20376@@ -0,0 +1,426 @@
20377+# po.m4 serial 3 (gettext-0.14)
20378+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20379+dnl This file is free software, distributed under the terms of the GNU
20380+dnl General Public License. As a special exception to the GNU General
20381+dnl Public License, this file may be distributed as part of a program
20382+dnl that contains a configuration script generated by Autoconf, under
20383+dnl the same distribution terms as the rest of that program.
20384+dnl
20385+dnl This file can can be used in projects which are not available under
20386+dnl the GNU General Public License or the GNU Library General Public
20387+dnl License but which still want to provide support for the GNU gettext
20388+dnl functionality.
20389+dnl Please note that the actual code of the GNU gettext library is covered
20390+dnl by the GNU Library General Public License, and the rest of the GNU
20391+dnl gettext package package is covered by the GNU General Public License.
20392+dnl They are *not* in the public domain.
20393+
20394+dnl Authors:
20395+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20396+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20397+
20398+dnl Checks for all prerequisites of the po subdirectory.
20399+AC_DEFUN([AM_PO_SUBDIRS],
20400+[
20401+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
20402+ AC_REQUIRE([AC_PROG_INSTALL])dnl
20403+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
20404+ AC_REQUIRE([AM_NLS])dnl
20405+
20406+ dnl Perform the following tests also if --disable-nls has been given,
20407+ dnl because they are needed for "make dist" to work.
20408+
20409+ dnl Search for GNU msgfmt in the PATH.
20410+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
20411+ dnl The second test excludes FreeBSD msgfmt.
20412+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
20413+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
20414+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
20415+ :)
20416+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
20417+
20418+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
20419+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
20420+ dnl The second test excludes FreeBSD xgettext.
20421+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
20422+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20423+ (if $ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
20424+ :)
20425+ dnl Remove leftover from FreeBSD xgettext call.
20426+ rm -f messages.po
20427+
20428+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
20429+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
20430+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
20431+
20432+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20433+ dnl Test whether we really found GNU msgfmt.
20434+ if test "$GMSGFMT" != ":"; then
20435+ dnl If it is no GNU msgfmt we define it as : so that the
20436+ dnl Makefiles still can work.
20437+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
20438+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20439+ : ;
20440+ else
20441+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
20442+ AC_MSG_RESULT(
20443+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
20444+ GMSGFMT=":"
20445+ fi
20446+ fi
20447+
20448+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20449+ dnl Test whether we really found GNU xgettext.
20450+ if test "$XGETTEXT" != ":"; then
20451+ dnl If it is no GNU xgettext we define it as : so that the
20452+ dnl Makefiles still can work.
20453+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20454+ (if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20455+ : ;
20456+ else
20457+ AC_MSG_RESULT(
20458+ [found xgettext program is not GNU xgettext; ignore it])
20459+ XGETTEXT=":"
20460+ fi
20461+ dnl Remove leftover from FreeBSD xgettext call.
20462+ rm -f messages.po
20463+ fi
20464+
20465+ AC_OUTPUT_COMMANDS([
20466+ for ac_file in $CONFIG_FILES; do
20467+ # Support "outfile[:infile[:infile...]]"
20468+ case "$ac_file" in
20469+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
20470+ esac
20471+ # PO directories have a Makefile.in generated from Makefile.in.in.
20472+ case "$ac_file" in */Makefile.in)
20473+ # Adjust a relative srcdir.
20474+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20475+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20476+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20477+ # In autoconf-2.13 it is called $ac_given_srcdir.
20478+ # In autoconf-2.50 it is called $srcdir.
20479+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20480+ case "$ac_given_srcdir" in
20481+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20482+ /*) top_srcdir="$ac_given_srcdir" ;;
20483+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20484+ esac
20485+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
20486+ rm -f "$ac_dir/POTFILES"
20487+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
20488+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
20489+ POMAKEFILEDEPS="POTFILES.in"
20490+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
20491+ # on $ac_dir but don't depend on user-specified configuration
20492+ # parameters.
20493+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20494+ # The LINGUAS file contains the set of available languages.
20495+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20496+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20497+ fi
20498+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20499+ # Hide the ALL_LINGUAS assigment from automake.
20500+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20501+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20502+ else
20503+ # The set of available languages was given in configure.in.
20504+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
20505+ fi
20506+ # Compute POFILES
20507+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20508+ # Compute UPDATEPOFILES
20509+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20510+ # Compute DUMMYPOFILES
20511+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20512+ # Compute GMOFILES
20513+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20514+ case "$ac_given_srcdir" in
20515+ .) srcdirpre= ;;
20516+ *) srcdirpre='$(srcdir)/' ;;
20517+ esac
20518+ POFILES=
20519+ UPDATEPOFILES=
20520+ DUMMYPOFILES=
20521+ GMOFILES=
20522+ for lang in $ALL_LINGUAS; do
20523+ POFILES="$POFILES $srcdirpre$lang.po"
20524+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20525+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20526+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20527+ done
20528+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20529+ # environment variable.
20530+ INST_LINGUAS=
20531+ if test -n "$ALL_LINGUAS"; then
20532+ for presentlang in $ALL_LINGUAS; do
20533+ useit=no
20534+ if test "%UNSET%" != "$LINGUAS"; then
20535+ desiredlanguages="$LINGUAS"
20536+ else
20537+ desiredlanguages="$ALL_LINGUAS"
20538+ fi
20539+ for desiredlang in $desiredlanguages; do
20540+ # Use the presentlang catalog if desiredlang is
20541+ # a. equal to presentlang, or
20542+ # b. a variant of presentlang (because in this case,
20543+ # presentlang can be used as a fallback for messages
20544+ # which are not translated in the desiredlang catalog).
20545+ case "$desiredlang" in
20546+ "$presentlang"*) useit=yes;;
20547+ esac
20548+ done
20549+ if test $useit = yes; then
20550+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20551+ fi
20552+ done
20553+ fi
20554+ CATALOGS=
20555+ if test -n "$INST_LINGUAS"; then
20556+ for lang in $INST_LINGUAS; do
20557+ CATALOGS="$CATALOGS $lang.gmo"
20558+ done
20559+ fi
20560+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
20561+ sed -e "/^POTFILES =/r $ac_dir/POTFILES" -e "/^# Makevars/r $ac_given_srcdir/$ac_dir/Makevars" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@POMAKEFILEDEPS@|$POMAKEFILEDEPS|g" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
20562+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
20563+ if test -f "$f"; then
20564+ case "$f" in
20565+ *.orig | *.bak | *~) ;;
20566+ *) cat "$f" >> "$ac_dir/Makefile" ;;
20567+ esac
20568+ fi
20569+ done
20570+ fi
20571+ ;;
20572+ esac
20573+ done],
20574+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
20575+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
20576+ # from automake.
20577+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
20578+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
20579+ LINGUAS="${LINGUAS-%UNSET%}"
20580+ ])
20581+])
20582+
20583+dnl Postprocesses a Makefile in a directory containing PO files.
20584+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
20585+[
20586+ # When this code is run, in config.status, two variables have already been
20587+ # set:
20588+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
20589+ # - LINGUAS is the value of the environment variable LINGUAS at configure
20590+ # time.
20591+
20592+changequote(,)dnl
20593+ # Adjust a relative srcdir.
20594+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20595+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20596+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20597+ # In autoconf-2.13 it is called $ac_given_srcdir.
20598+ # In autoconf-2.50 it is called $srcdir.
20599+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20600+ case "$ac_given_srcdir" in
20601+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20602+ /*) top_srcdir="$ac_given_srcdir" ;;
20603+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20604+ esac
20605+
20606+ # Find a way to echo strings without interpreting backslash.
20607+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
20608+ gt_echo='echo'
20609+ else
20610+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
20611+ gt_echo='printf %s\n'
20612+ else
20613+ echo_func () {
20614+ cat <<EOT
20615+$*
20616+EOT
20617+ }
20618+ gt_echo='echo_func'
20619+ fi
20620+ fi
20621+
20622+ # A sed script that extracts the value of VARIABLE from a Makefile.
20623+ sed_x_variable='
20624+# Test if the hold space is empty.
20625+x
20626+s/P/P/
20627+x
20628+ta
20629+# Yes it was empty. Look if we have the expected variable definition.
20630+/^[ ]*VARIABLE[ ]*=/{
20631+ # Seen the first line of the variable definition.
20632+ s/^[ ]*VARIABLE[ ]*=//
20633+ ba
20634+}
20635+bd
20636+:a
20637+# Here we are processing a line from the variable definition.
20638+# Remove comment, more precisely replace it with a space.
20639+s/#.*$/ /
20640+# See if the line ends in a backslash.
20641+tb
20642+:b
20643+s/\\$//
20644+# Print the line, without the trailing backslash.
20645+p
20646+tc
20647+# There was no trailing backslash. The end of the variable definition is
20648+# reached. Clear the hold space.
20649+s/^.*$//
20650+x
20651+bd
20652+:c
20653+# A trailing backslash means that the variable definition continues in the
20654+# next line. Put a nonempty string into the hold space to indicate this.
20655+s/^.*$/P/
20656+x
20657+:d
20658+'
20659+changequote([,])dnl
20660+
20661+ # Set POTFILES to the value of the Makefile variable POTFILES.
20662+ sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
20663+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
20664+ # Compute POTFILES_DEPS as
20665+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
20666+ POTFILES_DEPS=
20667+ for file in $POTFILES; do
20668+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
20669+ done
20670+ POMAKEFILEDEPS=""
20671+
20672+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20673+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20674+ fi
20675+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20676+ # The LINGUAS file contains the set of available languages.
20677+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20678+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20679+ else
20680+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
20681+ sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
20682+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
20683+ fi
20684+ # Hide the ALL_LINGUAS assigment from automake.
20685+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20686+ # Compute POFILES
20687+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20688+ # Compute UPDATEPOFILES
20689+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20690+ # Compute DUMMYPOFILES
20691+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20692+ # Compute GMOFILES
20693+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20694+ # Compute PROPERTIESFILES
20695+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
20696+ # Compute CLASSFILES
20697+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
20698+ # Compute QMFILES
20699+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
20700+ # Compute MSGFILES
20701+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
20702+ # Compute RESOURCESDLLFILES
20703+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
20704+ case "$ac_given_srcdir" in
20705+ .) srcdirpre= ;;
20706+ *) srcdirpre='$(srcdir)/' ;;
20707+ esac
20708+ POFILES=
20709+ UPDATEPOFILES=
20710+ DUMMYPOFILES=
20711+ GMOFILES=
20712+ PROPERTIESFILES=
20713+ CLASSFILES=
20714+ QMFILES=
20715+ MSGFILES=
20716+ RESOURCESDLLFILES=
20717+ for lang in $ALL_LINGUAS; do
20718+ POFILES="$POFILES $srcdirpre$lang.po"
20719+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20720+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20721+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20722+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
20723+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
20724+ QMFILES="$QMFILES $srcdirpre$lang.qm"
20725+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20726+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
20727+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20728+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
20729+ done
20730+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20731+ # environment variable.
20732+ INST_LINGUAS=
20733+ if test -n "$ALL_LINGUAS"; then
20734+ for presentlang in $ALL_LINGUAS; do
20735+ useit=no
20736+ if test "%UNSET%" != "$LINGUAS"; then
20737+ desiredlanguages="$LINGUAS"
20738+ else
20739+ desiredlanguages="$ALL_LINGUAS"
20740+ fi
20741+ for desiredlang in $desiredlanguages; do
20742+ # Use the presentlang catalog if desiredlang is
20743+ # a. equal to presentlang, or
20744+ # b. a variant of presentlang (because in this case,
20745+ # presentlang can be used as a fallback for messages
20746+ # which are not translated in the desiredlang catalog).
20747+ case "$desiredlang" in
20748+ "$presentlang"*) useit=yes;;
20749+ esac
20750+ done
20751+ if test $useit = yes; then
20752+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20753+ fi
20754+ done
20755+ fi
20756+ CATALOGS=
20757+ JAVACATALOGS=
20758+ QTCATALOGS=
20759+ TCLCATALOGS=
20760+ CSHARPCATALOGS=
20761+ if test -n "$INST_LINGUAS"; then
20762+ for lang in $INST_LINGUAS; do
20763+ CATALOGS="$CATALOGS $lang.gmo"
20764+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
20765+ QTCATALOGS="$QTCATALOGS $lang.qm"
20766+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20767+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
20768+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20769+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
20770+ done
20771+ fi
20772+
20773+ sed -e "s|@POTFILES_DEPS@|$POTFILES_DEPS|g" -e "s|@POFILES@|$POFILES|g" -e "s|@UPDATEPOFILES@|$UPDATEPOFILES|g" -e "s|@DUMMYPOFILES@|$DUMMYPOFILES|g" -e "s|@GMOFILES@|$GMOFILES|g" -e "s|@PROPERTIESFILES@|$PROPERTIESFILES|g" -e "s|@CLASSFILES@|$CLASSFILES|g" -e "s|@QMFILES@|$QMFILES|g" -e "s|@MSGFILES@|$MSGFILES|g" -e "s|@RESOURCESDLLFILES@|$RESOURCESDLLFILES|g" -e "s|@CATALOGS@|$CATALOGS|g" -e "s|@JAVACATALOGS@|$JAVACATALOGS|g" -e "s|@QTCATALOGS@|$QTCATALOGS|g" -e "s|@TCLCATALOGS@|$TCLCATALOGS|g" -e "s|@CSHARPCATALOGS@|$CSHARPCATALOGS|g" -e 's,^#distdir:,distdir:,' < "$ac_file" > "$ac_file.tmp"
20774+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
20775+ # Add dependencies that cannot be formulated as a simple suffix rule.
20776+ for lang in $ALL_LINGUAS; do
20777+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20778+ cat >> "$ac_file.tmp" <<EOF
20779+$frobbedlang.msg: $lang.po
20780+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
20781+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20782+EOF
20783+ done
20784+ fi
20785+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
20786+ # Add dependencies that cannot be formulated as a simple suffix rule.
20787+ for lang in $ALL_LINGUAS; do
20788+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20789+ cat >> "$ac_file.tmp" <<EOF
20790+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
20791+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
20792+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20793+EOF
20794+ done
20795+ fi
20796+ if test -n "$POMAKEFILEDEPS"; then
20797+ cat >> "$ac_file.tmp" <<EOF
20798+Makefile: $POMAKEFILEDEPS
20799+EOF
20800+ fi
20801+ mv "$ac_file.tmp" "$ac_file"
20802+])
20803--- lrzsz-0.12.20.safe/m4/printf-posix.m4 1969-12-31 19:00:00.000000000 -0500
20804+++ lrzsz-0.12.20/m4/printf-posix.m4 2004-09-12 14:40:34.974654000 -0400
20805@@ -0,0 +1,46 @@
20806+# printf-posix.m4 serial 2 (gettext-0.13.1)
20807+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20808+dnl This file is free software, distributed under the terms of the GNU
20809+dnl General Public License. As a special exception to the GNU General
20810+dnl Public License, this file may be distributed as part of a program
20811+dnl that contains a configuration script generated by Autoconf, under
20812+dnl the same distribution terms as the rest of that program.
20813+
20814+dnl From Bruno Haible.
20815+dnl Test whether the printf() function supports POSIX/XSI format strings with
20816+dnl positions.
20817+
20818+AC_DEFUN([gt_PRINTF_POSIX],
20819+[
20820+ AC_REQUIRE([AC_PROG_CC])
20821+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
20822+ gt_cv_func_printf_posix,
20823+ [
20824+ AC_TRY_RUN([
20825+#include <stdio.h>
20826+#include <string.h>
20827+/* The string "%2$d %1$d", with dollar characters protected from the shell's
20828+ dollar expansion (possibly an autoconf bug). */
20829+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
20830+static char buf[100];
20831+int main ()
20832+{
20833+ sprintf (buf, format, 33, 55);
20834+ return (strcmp (buf, "55 33") != 0);
20835+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
20836+ [
20837+ AC_EGREP_CPP(notposix, [
20838+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
20839+ notposix
20840+#endif
20841+ ], gt_cv_func_printf_posix="guessing no",
20842+ gt_cv_func_printf_posix="guessing yes")
20843+ ])
20844+ ])
20845+ case $gt_cv_func_printf_posix in
20846+ *yes)
20847+ AC_DEFINE(HAVE_POSIX_PRINTF, 1,
20848+ [Define if your printf() function supports format strings with positions.])
20849+ ;;
20850+ esac
20851+])
20852--- lrzsz-0.12.20.safe/m4/progtest.m4 1969-12-31 19:00:00.000000000 -0500
20853+++ lrzsz-0.12.20/m4/progtest.m4 2004-09-12 14:40:34.990651568 -0400
20854@@ -0,0 +1,91 @@
20855+# progtest.m4 serial 3 (gettext-0.12)
20856+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
20857+dnl This file is free software, distributed under the terms of the GNU
20858+dnl General Public License. As a special exception to the GNU General
20859+dnl Public License, this file may be distributed as part of a program
20860+dnl that contains a configuration script generated by Autoconf, under
20861+dnl the same distribution terms as the rest of that program.
20862+dnl
20863+dnl This file can can be used in projects which are not available under
20864+dnl the GNU General Public License or the GNU Library General Public
20865+dnl License but which still want to provide support for the GNU gettext
20866+dnl functionality.
20867+dnl Please note that the actual code of the GNU gettext library is covered
20868+dnl by the GNU Library General Public License, and the rest of the GNU
20869+dnl gettext package package is covered by the GNU General Public License.
20870+dnl They are *not* in the public domain.
20871+
20872+dnl Authors:
20873+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
20874+
20875+# Search path for a program which passes the given test.
20876+
20877+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
20878+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
20879+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
20880+[
20881+# Prepare PATH_SEPARATOR.
20882+# The user is always right.
20883+if test "${PATH_SEPARATOR+set}" != set; then
20884+ echo "#! /bin/sh" >conf$$.sh
20885+ echo "exit 0" >>conf$$.sh
20886+ chmod +x conf$$.sh
20887+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20888+ PATH_SEPARATOR=';'
20889+ else
20890+ PATH_SEPARATOR=:
20891+ fi
20892+ rm -f conf$$.sh
20893+fi
20894+
20895+# Find out how to test for executable files. Don't use a zero-byte file,
20896+# as systems may use methods other than mode bits to determine executability.
20897+cat >conf$$.file <<_ASEOF
20898+#! /bin/sh
20899+exit 0
20900+_ASEOF
20901+chmod +x conf$$.file
20902+if test -x conf$$.file >/dev/null 2>&1; then
20903+ ac_executable_p="test -x"
20904+else
20905+ ac_executable_p="test -f"
20906+fi
20907+rm -f conf$$.file
20908+
20909+# Extract the first word of "$2", so it can be a program name with args.
20910+set dummy $2; ac_word=[$]2
20911+AC_MSG_CHECKING([for $ac_word])
20912+AC_CACHE_VAL(ac_cv_path_$1,
20913+[case "[$]$1" in
20914+ [[\\/]]* | ?:[[\\/]]*)
20915+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
20916+ ;;
20917+ *)
20918+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20919+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
20920+ IFS="$ac_save_IFS"
20921+ test -z "$ac_dir" && ac_dir=.
20922+ for ac_exec_ext in '' $ac_executable_extensions; do
20923+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20924+ if [$3]; then
20925+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
20926+ break 2
20927+ fi
20928+ fi
20929+ done
20930+ done
20931+ IFS="$ac_save_IFS"
20932+dnl If no 4th arg is given, leave the cache variable unset,
20933+dnl so AC_PATH_PROGS will keep looking.
20934+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
20935+])dnl
20936+ ;;
20937+esac])dnl
20938+$1="$ac_cv_path_$1"
20939+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
20940+ AC_MSG_RESULT([$]$1)
20941+else
20942+ AC_MSG_RESULT(no)
20943+fi
20944+AC_SUBST($1)dnl
20945+])
20946--- lrzsz-0.12.20.safe/m4/signed.m4 1969-12-31 19:00:00.000000000 -0500
20947+++ lrzsz-0.12.20/m4/signed.m4 2004-09-12 14:40:34.996650656 -0400
20948@@ -0,0 +1,19 @@
20949+# signed.m4 serial 1 (gettext-0.10.40)
20950+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
20951+dnl This file is free software, distributed under the terms of the GNU
20952+dnl General Public License. As a special exception to the GNU General
20953+dnl Public License, this file may be distributed as part of a program
20954+dnl that contains a configuration script generated by Autoconf, under
20955+dnl the same distribution terms as the rest of that program.
20956+
20957+dnl From Bruno Haible.
20958+
20959+AC_DEFUN([bh_C_SIGNED],
20960+[
20961+ AC_CACHE_CHECK([for signed], bh_cv_c_signed,
20962+ [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
20963+ if test $bh_cv_c_signed = no; then
20964+ AC_DEFINE(signed, ,
20965+ [Define to empty if the C compiler doesn't support this keyword.])
20966+ fi
20967+])
20968--- lrzsz-0.12.20.safe/m4/size_max.m4 1969-12-31 19:00:00.000000000 -0500
20969+++ lrzsz-0.12.20/m4/size_max.m4 2004-09-12 14:40:35.003649592 -0400
20970@@ -0,0 +1,61 @@
20971+# size_max.m4 serial 2
20972+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20973+dnl This file is free software, distributed under the terms of the GNU
20974+dnl General Public License. As a special exception to the GNU General
20975+dnl Public License, this file may be distributed as part of a program
20976+dnl that contains a configuration script generated by Autoconf, under
20977+dnl the same distribution terms as the rest of that program.
20978+
20979+dnl From Bruno Haible.
20980+
20981+AC_DEFUN([gl_SIZE_MAX],
20982+[
20983+ AC_CHECK_HEADERS(stdint.h)
20984+ dnl First test whether the system already has SIZE_MAX.
20985+ AC_MSG_CHECKING([for SIZE_MAX])
20986+ result=
20987+ AC_EGREP_CPP([Found it], [
20988+#include <limits.h>
20989+#if HAVE_STDINT_H
20990+#include <stdint.h>
20991+#endif
20992+#ifdef SIZE_MAX
20993+Found it
20994+#endif
20995+], result=yes)
20996+ if test -z "$result"; then
20997+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
20998+ dnl than the type 'unsigned long'.
20999+ dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
21000+ dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
21001+ _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
21002+ [#include <stddef.h>], result=?)
21003+ _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
21004+ [#include <stddef.h>], result=?)
21005+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
21006+ [#include <stddef.h>], result=?)
21007+ if test "$fits_in_uint" = 1; then
21008+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
21009+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
21010+ AC_TRY_COMPILE([#include <stddef.h>
21011+ extern size_t foo;
21012+ extern unsigned long foo;
21013+ ], [], fits_in_uint=0)
21014+ fi
21015+ if test -z "$result"; then
21016+ if test "$fits_in_uint" = 1; then
21017+ result="$res_hi$res_lo"U
21018+ else
21019+ result="$res_hi$res_lo"UL
21020+ fi
21021+ else
21022+ dnl Shouldn't happen, but who knows...
21023+ result='~(size_t)0'
21024+ fi
21025+ fi
21026+ AC_MSG_RESULT([$result])
21027+ if test "$result" != yes; then
21028+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
21029+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
21030+ fi
21031+])
21032--- lrzsz-0.12.20.safe/m4/stdint_h.m4 1969-12-31 19:00:00.000000000 -0500
21033+++ lrzsz-0.12.20/m4/stdint_h.m4 2004-09-12 14:40:35.009648680 -0400
21034@@ -0,0 +1,28 @@
21035+# stdint_h.m4 serial 3 (gettext-0.12)
21036+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21037+dnl This file is free software, distributed under the terms of the GNU
21038+dnl General Public License. As a special exception to the GNU General
21039+dnl Public License, this file may be distributed as part of a program
21040+dnl that contains a configuration script generated by Autoconf, under
21041+dnl the same distribution terms as the rest of that program.
21042+
21043+dnl From Paul Eggert.
21044+
21045+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
21046+# doesn't clash with <sys/types.h>, and declares uintmax_t.
21047+
21048+AC_DEFUN([jm_AC_HEADER_STDINT_H],
21049+[
21050+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
21051+ [AC_TRY_COMPILE(
21052+ [#include <sys/types.h>
21053+#include <stdint.h>],
21054+ [uintmax_t i = (uintmax_t) -1;],
21055+ jm_ac_cv_header_stdint_h=yes,
21056+ jm_ac_cv_header_stdint_h=no)])
21057+ if test $jm_ac_cv_header_stdint_h = yes; then
21058+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
21059+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
21060+ and declares uintmax_t. ])
21061+ fi
21062+])
21063--- lrzsz-0.12.20.safe/m4/uintmax_t.m4 1969-12-31 19:00:00.000000000 -0500
21064+++ lrzsz-0.12.20/m4/uintmax_t.m4 2004-09-12 14:40:35.021646856 -0400
21065@@ -0,0 +1,32 @@
21066+# uintmax_t.m4 serial 7 (gettext-0.12)
21067+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21068+dnl This file is free software, distributed under the terms of the GNU
21069+dnl General Public License. As a special exception to the GNU General
21070+dnl Public License, this file may be distributed as part of a program
21071+dnl that contains a configuration script generated by Autoconf, under
21072+dnl the same distribution terms as the rest of that program.
21073+
21074+dnl From Paul Eggert.
21075+
21076+AC_PREREQ(2.13)
21077+
21078+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
21079+# if it is not already defined in <stdint.h> or <inttypes.h>.
21080+
21081+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
21082+[
21083+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
21084+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
21085+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
21086+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
21087+ test $ac_cv_type_unsigned_long_long = yes \
21088+ && ac_type='unsigned long long' \
21089+ || ac_type='unsigned long'
21090+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
21091+ [Define to unsigned long or unsigned long long
21092+ if <stdint.h> and <inttypes.h> don't define.])
21093+ else
21094+ AC_DEFINE(HAVE_UINTMAX_T, 1,
21095+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
21096+ fi
21097+])
21098--- lrzsz-0.12.20.safe/m4/ulonglong.m4 1969-12-31 19:00:00.000000000 -0500
21099+++ lrzsz-0.12.20/m4/ulonglong.m4 2004-09-12 14:40:35.028645792 -0400
21100@@ -0,0 +1,25 @@
21101+# ulonglong.m4 serial 3
21102+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
21103+dnl This file is free software, distributed under the terms of the GNU
21104+dnl General Public License. As a special exception to the GNU General
21105+dnl Public License, this file may be distributed as part of a program
21106+dnl that contains a configuration script generated by Autoconf, under
21107+dnl the same distribution terms as the rest of that program.
21108+
21109+dnl From Paul Eggert.
21110+
21111+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
21112+
21113+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
21114+[
21115+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
21116+ [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
21117+ [unsigned long long ullmax = (unsigned long long) -1;
21118+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
21119+ ac_cv_type_unsigned_long_long=yes,
21120+ ac_cv_type_unsigned_long_long=no)])
21121+ if test $ac_cv_type_unsigned_long_long = yes; then
21122+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
21123+ [Define if you have the 'unsigned long long' type.])
21124+ fi
21125+])
21126--- lrzsz-0.12.20.safe/m4/wchar_t.m4 1969-12-31 19:00:00.000000000 -0500
21127+++ lrzsz-0.12.20/m4/wchar_t.m4 2004-09-12 14:40:35.034644880 -0400
21128@@ -0,0 +1,22 @@
21129+# wchar_t.m4 serial 1 (gettext-0.12)
21130+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
21131+dnl This file is free software, distributed under the terms of the GNU
21132+dnl General Public License. As a special exception to the GNU General
21133+dnl Public License, this file may be distributed as part of a program
21134+dnl that contains a configuration script generated by Autoconf, under
21135+dnl the same distribution terms as the rest of that program.
21136+
21137+dnl From Bruno Haible.
21138+dnl Test whether <stddef.h> has the 'wchar_t' type.
21139+dnl Prerequisite: AC_PROG_CC
21140+
21141+AC_DEFUN([gt_TYPE_WCHAR_T],
21142+[
21143+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
21144+ [AC_TRY_COMPILE([#include <stddef.h>
21145+ wchar_t foo = (wchar_t)'\0';], ,
21146+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
21147+ if test $gt_cv_c_wchar_t = yes; then
21148+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
21149+ fi
21150+])
21151--- lrzsz-0.12.20.safe/m4/wint_t.m4 1969-12-31 19:00:00.000000000 -0500
21152+++ lrzsz-0.12.20/m4/wint_t.m4 2004-09-12 14:40:35.040643968 -0400
21153@@ -0,0 +1,22 @@
21154+# wint_t.m4 serial 1 (gettext-0.12)
21155+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21156+dnl This file is free software, distributed under the terms of the GNU
21157+dnl General Public License. As a special exception to the GNU General
21158+dnl Public License, this file may be distributed as part of a program
21159+dnl that contains a configuration script generated by Autoconf, under
21160+dnl the same distribution terms as the rest of that program.
21161+
21162+dnl From Bruno Haible.
21163+dnl Test whether <wchar.h> has the 'wint_t' type.
21164+dnl Prerequisite: AC_PROG_CC
21165+
21166+AC_DEFUN([gt_TYPE_WINT_T],
21167+[
21168+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
21169+ [AC_TRY_COMPILE([#include <wchar.h>
21170+ wint_t foo = (wchar_t)'\0';], ,
21171+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
21172+ if test $gt_cv_c_wint_t = yes; then
21173+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
21174+ fi
21175+])
21176--- lrzsz-0.12.20.safe/m4/xsize.m4 1969-12-31 19:00:00.000000000 -0500
21177+++ lrzsz-0.12.20/m4/xsize.m4 2004-09-12 14:40:35.047642904 -0400
21178@@ -0,0 +1,14 @@
21179+# xsize.m4 serial 2
21180+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21181+dnl This file is free software, distributed under the terms of the GNU
21182+dnl General Public License. As a special exception to the GNU General
21183+dnl Public License, this file may be distributed as part of a program
21184+dnl that contains a configuration script generated by Autoconf, under
21185+dnl the same distribution terms as the rest of that program.
21186+
21187+AC_DEFUN([gl_XSIZE],
21188+[
21189+ dnl Prerequisites of lib/xsize.h.
21190+ AC_REQUIRE([gl_SIZE_MAX])
21191+ AC_CHECK_HEADERS(stdint.h)
21192+])
21193--- lrzsz-0.12.20.safe/Makefile.am 1998-12-30 06:19:40.000000000 -0500
21194+++ lrzsz-0.12.20/Makefile.am 2004-09-12 14:40:35.121631656 -0400
21195@@ -1,5 +1,5 @@
21196 SUBDIRS = lib intl src po man testsuite
21197-EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21198+EXTRA_DIST = config.rpath check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21199 README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
21200 beos-runpiped.c fastcheck.beos
21201 noinst_SCRIPTS=systype
21202@@ -83,3 +83,5 @@
21203 rpm: $(PR).tar.gz Specfile
21204 $(srcdir)/buildrpm $(srcdir)
21205
21206+
21207+ACLOCAL_AMFLAGS = -I m4
21208--- lrzsz-0.12.20.safe/Makefile.in 1998-12-30 11:31:40.000000000 -0500
21209+++ lrzsz-0.12.20/Makefile.in 2004-09-12 14:40:35.109633480 -0400
21210@@ -125,7 +125,7 @@
21211 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
21212
21213 $(ACLOCAL_M4): configure.in acinclude.m4
21214- cd $(srcdir) && $(ACLOCAL)
21215+ cd $(srcdir) && $(ACLOCAL) -I m4
21216
21217 config.status: $(srcdir)/configure
21218 $(SHELL) ./config.status --recheck
21219--- lrzsz-0.12.20.safe/mkinstalldirs 1998-04-26 09:20:52.000000000 -0400
21220+++ lrzsz-0.12.20/mkinstalldirs 2004-09-12 14:40:34.337750824 -0400
21221@@ -1,34 +1,150 @@
21222 #! /bin/sh
21223 # mkinstalldirs --- make directory hierarchy
21224-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
21225+
21226+scriptversion=2004-02-15.20
21227+
21228+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
21229 # Created: 1993-05-16
21230-# Last modified: 1995-03-05
21231-# Public domain
21232+# Public domain.
21233+#
21234+# This file is maintained in Automake, please report
21235+# bugs to <bug-automake@gnu.org> or send patches to
21236+# <automake-patches@gnu.org>.
21237
21238 errstatus=0
21239+dirmode=""
21240
21241-for file in ${1+"$@"} ; do
21242- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21243- shift
21244+usage="\
21245+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
21246
21247- pathcomp=
21248- for d in ${1+"$@"} ; do
21249- pathcomp="$pathcomp$d"
21250- case "$pathcomp" in
21251- -* ) pathcomp=./$pathcomp ;;
21252- esac
21253+Create each directory DIR (with mode MODE, if specified), including all
21254+leading file name components.
21255
21256- if test ! -d "$pathcomp"; then
21257- echo "mkdir $pathcomp" 1>&2
21258- mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
21259- fi
21260+Report bugs to <bug-automake@gnu.org>."
21261
21262- if test ! -d "$pathcomp"; then
21263+# process command line arguments
21264+while test $# -gt 0 ; do
21265+ case $1 in
21266+ -h | --help | --h*) # -h for help
21267+ echo "$usage"
21268+ exit 0
21269+ ;;
21270+ -m) # -m PERM arg
21271+ shift
21272+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
21273+ dirmode=$1
21274+ shift
21275+ ;;
21276+ --version)
21277+ echo "$0 $scriptversion"
21278+ exit 0
21279+ ;;
21280+ --) # stop option processing
21281+ shift
21282+ break
21283+ ;;
21284+ -*) # unknown option
21285+ echo "$usage" 1>&2
21286+ exit 1
21287+ ;;
21288+ *) # first non-opt arg
21289+ break
21290+ ;;
21291+ esac
21292+done
21293+
21294+for file
21295+do
21296+ if test -d "$file"; then
21297+ shift
21298+ else
21299+ break
21300+ fi
21301+done
21302+
21303+case $# in
21304+ 0) exit 0 ;;
21305+esac
21306+
21307+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
21308+# mkdir -p a/c at the same time, both will detect that a is missing,
21309+# one will create a, then the other will try to create a and die with
21310+# a "File exists" error. This is a problem when calling mkinstalldirs
21311+# from a parallel make. We use --version in the probe to restrict
21312+# ourselves to GNU mkdir, which is thread-safe.
21313+case $dirmode in
21314+ '')
21315+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
21316+ echo "mkdir -p -- $*"
21317+ exec mkdir -p -- "$@"
21318+ else
21319+ # On NextStep and OpenStep, the `mkdir' command does not
21320+ # recognize any option. It will interpret all options as
21321+ # directories to create, and then abort because `.' already
21322+ # exists.
21323+ test -d ./-p && rmdir ./-p
21324+ test -d ./--version && rmdir ./--version
21325+ fi
21326+ ;;
21327+ *)
21328+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
21329+ test ! -d ./--version; then
21330+ echo "mkdir -m $dirmode -p -- $*"
21331+ exec mkdir -m "$dirmode" -p -- "$@"
21332+ else
21333+ # Clean up after NextStep and OpenStep mkdir.
21334+ for d in ./-m ./-p ./--version "./$dirmode";
21335+ do
21336+ test -d $d && rmdir $d
21337+ done
21338+ fi
21339+ ;;
21340+esac
21341+
21342+for file
21343+do
21344+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21345+ shift
21346+
21347+ pathcomp=
21348+ for d
21349+ do
21350+ pathcomp="$pathcomp$d"
21351+ case $pathcomp in
21352+ -*) pathcomp=./$pathcomp ;;
21353+ esac
21354+
21355+ if test ! -d "$pathcomp"; then
21356+ echo "mkdir $pathcomp"
21357+
21358+ mkdir "$pathcomp" || lasterr=$?
21359+
21360+ if test ! -d "$pathcomp"; then
21361 errstatus=$lasterr
21362- fi
21363+ else
21364+ if test ! -z "$dirmode"; then
21365+ echo "chmod $dirmode $pathcomp"
21366+ lasterr=""
21367+ chmod "$dirmode" "$pathcomp" || lasterr=$?
21368
21369- pathcomp="$pathcomp/"
21370- done
21371+ if test ! -z "$lasterr"; then
21372+ errstatus=$lasterr
21373+ fi
21374+ fi
21375+ fi
21376+ fi
21377+
21378+ pathcomp="$pathcomp/"
21379+ done
21380 done
21381
21382 exit $errstatus
21383+
21384+# Local Variables:
21385+# mode: shell-script
21386+# sh-indentation: 2
21387+# eval: (add-hook 'write-file-hooks 'time-stamp)
21388+# time-stamp-start: "scriptversion="
21389+# time-stamp-format: "%:y-%02m-%02d.%02H"
21390+# time-stamp-end: "$"
21391+# End:
21392--- lrzsz-0.12.20.safe/po/boldquot.sed 1969-12-31 19:00:00.000000000 -0500
21393+++ lrzsz-0.12.20/po/boldquot.sed 2004-09-12 14:40:34.723692152 -0400
21394@@ -0,0 +1,10 @@
21395+s/"\([^"]*\)"/“\1”/g
21396+s/`\([^`']*\)'/‘\1’/g
21397+s/ '\([^`']*\)' / ‘\1’ /g
21398+s/ '\([^`']*\)'$/ ‘\1’/g
21399+s/^'\([^`']*\)' /‘\1’ /g
21400+s/“”/""/g
21401+s/“/“/g
21402+s/”/”/g
21403+s/‘/‘/g
21404+s/’/’/g
21405--- lrzsz-0.12.20.safe/po/cat-id-tbl.c 1998-12-29 04:24:24.000000000 -0500
21406+++ lrzsz-0.12.20/po/cat-id-tbl.c 1969-12-31 19:00:00.000000000 -0500
21407@@ -1,234 +0,0 @@
21408-/* Automatically generated by po2tbl.sed from lrzsz.pot. */
21409-
21410-#if HAVE_CONFIG_H
21411-# include <config.h>
21412-#endif
21413-
21414-#include "libgettext.h"
21415-
21416-const struct _msg_ent _msg_tbl[] = {
21417- {"", 1},
21418- {"io_mode(,2) in rbsb.c not implemented\n", 2},
21419- {"caught signal %d; exiting", 3},
21420- {"command tries", 4},
21421- {"packetlength", 5},
21422- {"packetlength out of range 24..%ld", 6},
21423- {"framelength", 7},
21424- {"framelength out of range 32..%ld", 8},
21425- {"min_bps", 9},
21426- {"min_bps must be >= 0", 10},
21427- {"min_bps_time", 11},
21428- {"min_bps_time must be > 1", 12},
21429- {"hour to large (0..23)", 13},
21430- {"unparsable stop time\n", 14},
21431- {"minute to large (0..59)", 15},
21432- {"stop time to small", 16},
21433- {"stop-at", 17},
21434- {"timeout", 18},
21435- {"timeout out of range 10..1000", 19},
21436- {"security violation: can't do that under restricted shell\n", 20},
21437- {"window size", 21},
21438- {"cannot turnoff syslog", 22},
21439- {"startup delay", 23},
21440- {"out of memory", 24},
21441- {"this program was never intended to be used setuid\n", 25},
21442- {"need at least one file to send", 26},
21443- {"Can't send command in restricted mode\n", 27},
21444- {"hostname too long\n", 28},
21445- {"illegal server address\n", 29},
21446- {"can read only one file from stdin", 30},
21447- {"Transfer incomplete\n", 31},
21448- {"Transfer complete\n", 32},
21449- {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
21450- {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
21451- {"send_pseudo %s: avoiding symlink trap", 35},
21452- {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
21453- {"send_pseudo %s: failed", 37},
21454- {"send_pseudo %s: ok", 38},
21455- {"tcp protocol init failed\n", 39},
21456- {"Answering TIMESYNC at %s", 40},
21457- {"timezone", 41},
21458- {"timezone unknown", 42},
21459- {"Can't open any requested files.", 43},
21460- {"security violation: not allowed to upload from %s", 44},
21461- {"cannot open %s", 45},
21462- {"is not a file: %s", 46},
21463- {"%s/%s: error occured", 47},
21464- {"skipped: %s", 48},
21465- {"%s/%s: skipped", 49},
21466- {"Bytes Sent:%7ld BPS:%-8ld \n", 50},
21467- {"Sending %s, %ld blocks: ", 51},
21468- {"Give your local XMODEM receive command now.", 52},
21469- {"Sending: %s\n", 53},
21470- {"Timeout on pathname", 54},
21471- {"Receiver Cancelled", 55},
21472- {"No ACK on EOT", 56},
21473- {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
21474- {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
21475- {"Cancelled", 59},
21476- {"Timeout on sector ACK", 60},
21477- {"NAK on sector", 61},
21478- {"Got burst for sector ACK", 62},
21479- {"Got %02x for sector ACK", 63},
21480- {"Retry Count Exceeded", 64},
21481- {"Try `%s --help' for more information.\n", 65},
21482- {"%s version %s\n", 66},
21483- {"Usage: %s [options] file ...\n", 67},
21484- {" or: %s [options] -{c|i} COMMAND\n", 68},
21485- {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
21486- {"\
21487- (X) = option applies to XMODEM only\n\
21488- (Y) = option applies to YMODEM only\n\
21489- (Z) = option applies to ZMODEM only\n", 70},
21490- {"\
21491- -+, --append append to existing destination file (Z)\n\
21492- -2, --twostop use 2 stop bits\n\
21493- -4, --try-4k go up to 4K blocksize\n\
21494- --start-4k start with 4K blocksize (doesn't try 8)\n\
21495- -8, --try-8k go up to 8K blocksize\n\
21496- --start-8k start with 8K blocksize\n\
21497- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21498- -b, --binary binary transfer\n\
21499- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21500- -c, --command COMMAND execute remote command COMMAND (Z)\n\
21501- -C, --command-tries N try N times to execute a command (Z)\n\
21502- -d, --dot-to-slash change '.' to '/' in pathnames (Y/Z)\n\
21503- --delay-startup N sleep N seconds before doing anything\n\
21504- -e, --escape escape all control characters (Z)\n\
21505- -E, --rename force receiver to rename files it already has\n\
21506- -f, --full-path send full pathname (Y/Z)\n\
21507- -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
21508- -h, --help print this usage message\n\
21509- -k, --1k send 1024 byte packets (X)\n\
21510- -L, --packetlen N limit subpacket length to N bytes (Z)\n\
21511- -l, --framelen N limit frame length to N bytes (l>=L) (Z)\n\
21512- -m, --min-bps N stop transmission if BPS below N\n\
21513- -M, --min-bps-time N for at least N seconds (default: 120)\n", 71},
21514- {"\
21515- -n, --newer send file if source newer (Z)\n\
21516- -N, --newer-or-longer send file if source newer or longer (Z)\n\
21517- -o, --16-bit-crc use 16 bit CRC instead of 32 bit CRC (Z)\n\
21518- -O, --disable-timeouts disable timeout code, wait forever\n\
21519- -p, --protect protect existing destination file (Z)\n\
21520- -r, --resume resume interrupted file transfer (Z)\n\
21521- -R, --restricted restricted, more secure mode\n\
21522- -q, --quiet quiet (no progress reports)\n\
21523- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21524- --tcp build a TCP connection to transmit files\n\
21525- --tcp-server open socket, wait for connection\n\
21526- -u, --unlink unlink file after transmission\n\
21527- -U, --unrestrict turn off restricted mode (if allowed to)\n\
21528- -v, --verbose be verbose, provide debugging information\n\
21529- -w, --windowsize N Window is N bytes (Z)\n\
21530- -X, --xmodem use XMODEM protocol\n\
21531- -y, --overwrite overwrite existing files\n\
21532- -Y, --overwrite-or-skip overwrite existing files, else skip\n\
21533- --ymodem use YMODEM protocol\n\
21534- -Z, --zmodem use ZMODEM protocol\n\
21535-\n\
21536-short options use the same arguments as the long ones\n", 72},
21537- {"got ZRQINIT", 73},
21538- {"got ZCAN", 74},
21539- {"blklen now %d\n", 75},
21540- {"zsendfdata: bps rate %ld below min %ld", 76},
21541- {"zsendfdata: reached stop time", 77},
21542- {"Bytes Sent:%7ld/%7ld BPS:%-8ld ETA %02d:%02d ", 78},
21543- {"calc_blklen: reduced to %d due to error\n", 79},
21544- {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
21545- {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
21546- {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
21547- {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
21548- {"calc_blklen: returned %d as best\n", 84},
21549- {"\
21550-\n\
21551-countem: Total %d %ld\n", 85},
21552- {"Bad escape sequence %x", 86},
21553- {"Sender Canceled", 87},
21554- {"TIMEOUT", 88},
21555- {"Bad data subpacket", 89},
21556- {"Data subpacket too long", 90},
21557- {"Garbage count exceeded", 91},
21558- {"Got %s", 92},
21559- {"Retry %d: ", 93},
21560- {"don't have settimeofday, will not set time\n", 94},
21561- {"not running as root (this is good!), can not set time\n", 95},
21562- {"bytes_per_error", 96},
21563- {"bytes-per-error should be >100", 97},
21564- {"O_SYNC not supported by the kernel", 98},
21565- {"garbage on commandline", 99},
21566- {"Usage: %s [options] [filename.if.xmodem]\n", 100},
21567- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
21568- {"\
21569- -+, --append append to existing files\n\
21570- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21571- -b, --binary binary transfer\n\
21572- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21573- -c, --with-crc Use 16 bit CRC (X)\n\
21574- -C, --allow-remote-commands allow execution of remote commands (Z)\n\
21575- -D, --null write all received data to /dev/null\n\
21576- --delay-startup N sleep N seconds before doing anything\n\
21577- -e, --escape Escape control characters (Z)\n\
21578- -E, --rename rename any files already existing\n\
21579- --errors N generate CRC error every N bytes (debugging)\n\
21580- -h, --help Help, print this usage message\n\
21581- -m, --min-bps N stop transmission if BPS below N\n\
21582- -M, --min-bps-time N for at least N seconds (default: 120)\n\
21583- -O, --disable-timeouts disable timeout code, wait forever for data\n\
21584- --o-sync open output file(s) in synchronous write mode\n\
21585- -p, --protect protect existing files\n\
21586- -q, --quiet quiet, no progress reports\n\
21587- -r, --resume try to resume interrupted file transfer (Z)\n\
21588- -R, --restricted restricted, more secure mode\n\
21589- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21590- -S, --timesync request remote time (twice: set local time)\n\
21591- --syslog[=off] turn syslog on or off, if possible\n\
21592- -t, --timeout N set timeout to N tenths of a second\n\
21593- -u, --keep-uppercase keep upper case filenames\n\
21594- -U, --unrestrict disable restricted mode (if allowed to)\n\
21595- -v, --verbose be verbose, provide debugging information\n\
21596- -w, --windowsize N Window is N bytes (Z)\n\
21597- -X --xmodem use XMODEM protocol\n\
21598- -y, --overwrite Yes, clobber existing file if any\n\
21599- --ymodem use YMODEM protocol\n\
21600- -Z, --zmodem use ZMODEM protocol\n\
21601-\n\
21602-short options use the same arguments as the long ones\n", 102},
21603- {"%s waiting to receive.", 103},
21604- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
21605- {"%s: ready to receive %s", 105},
21606- {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
21607- {"\
21608-\r\n\
21609-%s: %s removed.\r\n", 107},
21610- {"Pathname fetch returned EOT", 108},
21611- {"Received dup Sector", 109},
21612- {"Sync Error", 110},
21613- {"CRC", 111},
21614- {"Checksum", 112},
21615- {"Sector number garbled", 113},
21616- {"Sender Cancelled", 114},
21617- {"Got 0%o sector header", 115},
21618- {"file name ends with a /, skipped: %s\n", 116},
21619- {"zmanag=%d, Lzmanag=%d\n", 117},
21620- {"zconv=%d\n", 118},
21621- {"file exists, skipped: %s\n", 119},
21622- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
21623- {"TIMESYNC: cannot set time: %s\n", 121},
21624- {"cannot tmpfile() for tcp protocol synchronization", 122},
21625- {"Topipe", 123},
21626- {"Receiving: %s\n", 124},
21627- {"Blocks received: %d", 125},
21628- {"%s: %s exists\n", 126},
21629- {"%s:\tSecurity Violation", 127},
21630- {"remote command execution requested", 128},
21631- {"not executed", 129},
21632- {"got ZRINIT", 130},
21633- {"Skipped", 131},
21634- {"rzfile: bps rate %ld below min %ld", 132},
21635- {"rzfile: reached stop time", 133},
21636- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 134},
21637- {"fgets for tcp protocol synchronization failed: ", 135},
21638- {"file close error", 136},
21639-};
21640-
21641-int _msg_tbl_length = 136;
21642--- lrzsz-0.12.20.safe/po/ChangeLog 1998-04-26 09:20:52.000000000 -0400
21643+++ lrzsz-0.12.20/po/ChangeLog 2004-09-12 14:40:34.793681512 -0400
21644@@ -1,3 +1,15 @@
21645+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
21646+
21647+ * boldquot.sed: New file, from gettext-0.14.1.
21648+ * en@boldquot.header: New file, from gettext-0.14.1.
21649+ * en@quot.header: New file, from gettext-0.14.1.
21650+ * insert-header.sin: New file, from gettext-0.14.1.
21651+ * quot.sed: New file, from gettext-0.14.1.
21652+ * remove-potcdate.sin: New file, from gettext-0.14.1.
21653+ * Rules-quot: New file, from gettext-0.14.1.
21654+ * cat-id-tbl.c: Remove file.
21655+ * stamp-cat-id: Remove file.
21656+
21657 /* Automatically generated by po2tbl.sed from lrzsz.pot. */
21658
21659 #if HAVE_CONFIG_H
21660--- lrzsz-0.12.20.safe/po/en@boldquot.header 1969-12-31 19:00:00.000000000 -0500
21661+++ lrzsz-0.12.20/po/en@boldquot.header 2004-09-12 14:40:34.731690936 -0400
21662@@ -0,0 +1,25 @@
21663+# All this catalog "translates" are quotation characters.
21664+# The msgids must be ASCII and therefore cannot contain real quotation
21665+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21666+# and double quote (0x22). These substitutes look strange; see
21667+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21668+#
21669+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21670+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21671+# It also translates pairs of apostrophe (0x27) to
21672+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21673+# and pairs of quotation mark (0x22) to
21674+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21675+#
21676+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21677+# When output to an ISO-8859-1 terminal, the single quotation marks are
21678+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21679+# grave/acute accent (by libiconv), and the double quotation marks are
21680+# transliterated to 0x22.
21681+# When output to an ASCII terminal, the single quotation marks are
21682+# transliterated to apostrophes, and the double quotation marks are
21683+# transliterated to 0x22.
21684+#
21685+# This catalog furthermore displays the text between the quotation marks in
21686+# bold face, assuming the VT100/XTerm escape sequences.
21687+#
21688--- lrzsz-0.12.20.safe/po/en@quot.header 1969-12-31 19:00:00.000000000 -0500
21689+++ lrzsz-0.12.20/po/en@quot.header 2004-09-12 14:40:34.737690024 -0400
21690@@ -0,0 +1,22 @@
21691+# All this catalog "translates" are quotation characters.
21692+# The msgids must be ASCII and therefore cannot contain real quotation
21693+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21694+# and double quote (0x22). These substitutes look strange; see
21695+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21696+#
21697+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21698+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21699+# It also translates pairs of apostrophe (0x27) to
21700+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21701+# and pairs of quotation mark (0x22) to
21702+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21703+#
21704+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21705+# When output to an ISO-8859-1 terminal, the single quotation marks are
21706+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21707+# grave/acute accent (by libiconv), and the double quotation marks are
21708+# transliterated to 0x22.
21709+# When output to an ASCII terminal, the single quotation marks are
21710+# transliterated to apostrophes, and the double quotation marks are
21711+# transliterated to 0x22.
21712+#
21713--- lrzsz-0.12.20.safe/po/insert-header.sin 1969-12-31 19:00:00.000000000 -0500
21714+++ lrzsz-0.12.20/po/insert-header.sin 2004-09-12 14:40:34.743689112 -0400
21715@@ -0,0 +1,23 @@
21716+# Sed script that inserts the file called HEADER before the header entry.
21717+#
21718+# At each occurrence of a line starting with "msgid ", we execute the following
21719+# commands. At the first occurrence, insert the file. At the following
21720+# occurrences, do nothing. The distinction between the first and the following
21721+# occurrences is achieved by looking at the hold space.
21722+/^msgid /{
21723+x
21724+# Test if the hold space is empty.
21725+s/m/m/
21726+ta
21727+# Yes it was empty. First occurrence. Read the file.
21728+r HEADER
21729+# Output the file's contents by reading the next line. But don't lose the
21730+# current line while doing this.
21731+g
21732+N
21733+bb
21734+:a
21735+# The hold space was nonempty. Following occurrences. Do nothing.
21736+x
21737+:b
21738+}
21739--- lrzsz-0.12.20.safe/po/Makevars 1969-12-31 19:00:00.000000000 -0500
21740+++ lrzsz-0.12.20/po/Makevars 2004-09-12 14:40:34.748688352 -0400
21741@@ -0,0 +1,41 @@
21742+# Makefile variables for PO directory in any package using GNU gettext.
21743+
21744+# Usually the message domain is the same as the package name.
21745+DOMAIN = $(PACKAGE)
21746+
21747+# These two variables depend on the location of this directory.
21748+subdir = po
21749+top_builddir = ..
21750+
21751+# These options get passed to xgettext.
21752+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
21753+
21754+# This is the copyright holder that gets inserted into the header of the
21755+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
21756+# package. (Note that the msgstr strings, extracted from the package's
21757+# sources, belong to the copyright holder of the package.) Translators are
21758+# expected to transfer the copyright for their translations to this person
21759+# or entity, or to disclaim their copyright. The empty string stands for
21760+# the public domain; in this case the translators are expected to disclaim
21761+# their copyright.
21762+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
21763+
21764+# This is the email address or URL to which the translators shall report
21765+# bugs in the untranslated strings:
21766+# - Strings which are not entire sentences, see the maintainer guidelines
21767+# in the GNU gettext documentation, section 'Preparing Strings'.
21768+# - Strings which use unclear terms or require additional context to be
21769+# understood.
21770+# - Strings which make invalid assumptions about notation of date, time or
21771+# money.
21772+# - Pluralisation problems.
21773+# - Incorrect English spelling.
21774+# - Incorrect formatting.
21775+# It can be your email address, or a mailing list address where translators
21776+# can write to without being subscribed, or the URL of a web page through
21777+# which the translators can contact you.
21778+MSGID_BUGS_ADDRESS =
21779+
21780+# This is the list of locale categories, beyond LC_MESSAGES, for which the
21781+# message catalogs shall be used. It is usually empty.
21782+EXTRA_LOCALE_CATEGORIES =
21783--- lrzsz-0.12.20.safe/po/quot.sed 1969-12-31 19:00:00.000000000 -0500
21784+++ lrzsz-0.12.20/po/quot.sed 2004-09-12 14:40:34.754687440 -0400
21785@@ -0,0 +1,6 @@
21786+s/"\([^"]*\)"/“\1”/g
21787+s/`\([^`']*\)'/‘\1’/g
21788+s/ '\([^`']*\)' / ‘\1’ /g
21789+s/ '\([^`']*\)'$/ ‘\1’/g
21790+s/^'\([^`']*\)' /‘\1’ /g
21791+s/“”/""/g
21792--- lrzsz-0.12.20.safe/po/remove-potcdate.sin 1969-12-31 19:00:00.000000000 -0500
21793+++ lrzsz-0.12.20/po/remove-potcdate.sin 2004-09-12 14:40:34.762686224 -0400
21794@@ -0,0 +1,19 @@
21795+# Sed script that remove the POT-Creation-Date line in the header entry
21796+# from a POT file.
21797+#
21798+# The distinction between the first and the following occurrences of the
21799+# pattern is achieved by looking at the hold space.
21800+/^"POT-Creation-Date: .*"$/{
21801+x
21802+# Test if the hold space is empty.
21803+s/P/P/
21804+ta
21805+# Yes it was empty. First occurrence. Remove the line.
21806+g
21807+d
21808+bb
21809+:a
21810+# The hold space was nonempty. Following occurrences. Do nothing.
21811+x
21812+:b
21813+}
21814--- lrzsz-0.12.20.safe/po/Rules-quot 1969-12-31 19:00:00.000000000 -0500
21815+++ lrzsz-0.12.20/po/Rules-quot 2004-09-12 14:40:34.778683792 -0400
21816@@ -0,0 +1,47 @@
21817+# Special Makefile rules for English message catalogs with quotation marks.
21818+
21819+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
21820+
21821+.SUFFIXES: .insert-header .po-update-en
21822+
21823+en@quot.po-create:
21824+ $(MAKE) en@quot.po-update
21825+en@boldquot.po-create:
21826+ $(MAKE) en@boldquot.po-update
21827+
21828+en@quot.po-update: en@quot.po-update-en
21829+en@boldquot.po-update: en@boldquot.po-update-en
21830+
21831+.insert-header.po-update-en:
21832+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
21833+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
21834+ tmpdir=`pwd`; \
21835+ echo "$$lang:"; \
21836+ ll=`echo $$lang | sed -e 's/@.*//'`; \
21837+ LC_ALL=C; export LC_ALL; \
21838+ cd $(srcdir); \
21839+ if $(MSGINIT) -i $(DOMAIN).pot --no-translator -l $$ll -o - 2>/dev/null | sed -f $$tmpdir/$$lang.insert-header | $(MSGCONV) -t UTF-8 | $(MSGFILTER) sed -f `echo $$lang | sed -e 's/.*@//'`.sed 2>/dev/null > $$tmpdir/$$lang.new.po; then \
21840+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
21841+ rm -f $$tmpdir/$$lang.new.po; \
21842+ else \
21843+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
21844+ :; \
21845+ else \
21846+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
21847+ exit 1; \
21848+ fi; \
21849+ fi; \
21850+ else \
21851+ echo "creation of $$lang.po failed!" 1>&2; \
21852+ rm -f $$tmpdir/$$lang.new.po; \
21853+ fi
21854+
21855+en@quot.insert-header: insert-header.sin
21856+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
21857+
21858+en@boldquot.insert-header: insert-header.sin
21859+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
21860+
21861+mostlyclean: mostlyclean-quot
21862+mostlyclean-quot:
21863+ rm -f *.insert-header
21864--- lrzsz-0.12.20.safe/po/stamp-cat-id 1998-12-30 02:50:01.000000000 -0500
21865+++ lrzsz-0.12.20/po/stamp-cat-id 1969-12-31 19:00:00.000000000 -0500
21866@@ -1 +0,0 @@
21867-timestamp
21868--- lrzsz-0.12.20.safe/src/Makefile.am 1998-12-28 03:38:47.000000000 -0500
21869+++ lrzsz-0.12.20/src/Makefile.am 2004-09-12 14:40:53.665812512 -0400
21870@@ -2,12 +2,12 @@
21871 lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21872 lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21873 noinst_HEADERS = timing.h zglobal.h zmodem.h
21874-datadir = $(prefix)/@DATADIRNAME@
21875+datadir = $(prefix)/share
21876 localedir = $(datadir)/locale
21877 CFLAGS=@CFLAGS@
21878 DISTCLEAN_FILES=lrzszbug
21879
21880-LDADD = ../lib/libzmodem.a @INTLLIBS@
21881+LDADD = ../lib/libzmodem.a @LIBINTL@
21882 AUTOMAKE_OPTIONS=ansi2knr
21883 EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
21884 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib