summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:11 +0100
committerRichard Purdie <rpurdie@linux.intel.com>2010-09-01 19:09:57 +0100
commitd62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch)
treef36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-bsp
parentcaab7fc509bf27706ff3248689f6afd04225cfda (diff)
downloadpoky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy91
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf16
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/default8
-rwxr-xr-xmeta/recipes-bsp/apmd/apmd-3.2.2-14/init44
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch29
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch21
-rw-r--r--meta/recipes-bsp/apmd/apmd-3.2.2-14/workaround.patch59
-rw-r--r--meta/recipes-bsp/apmd/apmd_3.2.2-14.bb63
-rw-r--r--meta/recipes-bsp/hostap/files/hostap-fw-load.patch20
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.conf193
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream191
-rw-r--r--meta/recipes-bsp/hostap/files/hostap_cs.modalias28
-rw-r--r--meta/recipes-bsp/hostap/hostap-conf_1.0.bb29
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils.inc25
-rw-r--r--meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb1
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools.patch37
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch21882
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz-0.12.20/makefile.patch20
-rw-r--r--meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb33
-rw-r--r--meta/recipes-bsp/pm-utils/pm-utils_1.3.0.bb16
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config.bb36
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run7
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config/distcc.sh4
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config/exports1
-rwxr-xr-xmeta/recipes-bsp/qemu-config/qemu-config/qemu-autostart37
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop10
-rw-r--r--meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop10
-rw-r--r--meta/recipes-bsp/setserial/setserial_2.17.bb18
-rw-r--r--meta/recipes-bsp/uboot/files/fix-arm920t-eabi.patch22
-rw-r--r--meta/recipes-bsp/uboot/u-boot-mkimage-native_1.3.2.bb23
-rw-r--r--meta/recipes-bsp/uboot/u-boot-mkimage_2009.08.bb25
-rw-r--r--meta/recipes-bsp/uboot/u-boot-omap3-git/beagleboard/name.patch14
-rw-r--r--meta/recipes-bsp/uboot/u-boot-omap3_git.bb20
-rw-r--r--meta/recipes-bsp/uboot/u-boot.inc38
-rw-r--r--meta/recipes-bsp/usbinit/usbinit.bb18
-rwxr-xr-xmeta/recipes-bsp/usbinit/usbinit/usb-gether23
-rw-r--r--meta/recipes-bsp/usbutils/usbutils_0.86.bb24
37 files changed, 23136 insertions, 0 deletions
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy b/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy
new file mode 100644
index 0000000000..c48ee4e5d5
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy
@@ -0,0 +1,91 @@
1#!/bin/sh
2#
3# apmd_proxy - program dispatcher for APM daemon
4#
5# Written by Craig Markwardt (craigm@lheamail.gsfc.nasa.gov) 21 May 1999
6# Modified for Debian by Avery Pennarun
7#
8# This shell script is called by the APM daemon (apmd) when a power
9# management event occurs. Its first and second arguments describe the
10# event. For example, apmd will call "apmd_proxy suspend system" just
11# before the system is suspended.
12#
13# Here are the possible arguments:
14#
15# start - APM daemon has started
16# stop - APM daemon is shutting down
17# suspend critical - APM system indicates critical suspend (++)
18# suspend system - APM system has requested suspend mode
19# suspend user - User has requested suspend mode
20# standby system - APM system has requested standby mode
21# standby user - User has requested standby mode
22# resume suspend - System has resumed from suspend mode
23# resume standby - System has resumed from standby mode
24# resume critical - System has resumed from critical suspend
25# change battery - APM system reported low battery
26# change power - APM system reported AC/battery change
27# change time - APM system reported time change (*)
28# change capability - APM system reported config. change (+)
29#
30# (*) - APM daemon may be configured to not call these sequences
31# (+) - Available if APM kernel supports it.
32# (++) - "suspend critical" is never passed to apmd from the kernel,
33# so we will never see it here. Scripts that process "resume
34# critical" events need to take this into account.
35#
36# It is the proxy script's responsibility to examine the APM status
37# (via /proc/apm) or other status and to take appropriate actions.
38# For example, the script might unmount network drives before the
39# machine is suspended.
40#
41# In Debian, the usual way of adding functionality to the proxy is to
42# add a script to /etc/apm/event.d. This script will be called by
43# apmd_proxy (via run-parts) with the same arguments.
44#
45# If it is important that a certain set of script be run in a certain
46# order on suspend and in a different order on resume, then put all
47# the scripts in /etc/apm/scripts.d instead of /etc/apm/event.d and
48# symlink to these from /etc/apm/suspend.d, /etc/apm/resume.d and
49# /etc/apm/other.d using names whose lexicographical order is the same
50# as the desired order of execution.
51#
52# If the kernel's APM driver supports it, apmd_proxy can return a non-zero
53# exit status on suspend and standby events, indicating that the suspend
54# or standby event should be rejected.
55#
56# *******************************************************************
57
58set -e
59
60# The following doesn't yet work, because current kernels (up to at least
61# 2.4.20) do not support rejection of APM events. Supporting this would
62# require substantial modifications to the APM driver. We will re-enable
63# this feature if the driver is ever modified. -- cph@debian.org
64#
65#SUSPEND_ON_AC=false
66#[ -r /etc/apm/apmd_proxy.conf ] && . /etc/apm/apmd_proxy.conf
67#
68#if [ "${SUSPEND_ON_AC}" = "false" -a "${2}" = "system" ] \
69# && on_ac_power >/dev/null; then
70# # Reject system suspends and standbys if we are on AC power
71# exit 1 # Reject (NOTE kernel support must be enabled)
72#fi
73
74if [ "${1}" = "suspend" -o "${1}" = "standby" ]; then
75 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
76 if [ -d /etc/apm/suspend.d ]; then
77 run-parts -a "${1}" -a "${2}" /etc/apm/suspend.d
78 fi
79elif [ "${1}" = "resume" ]; then
80 if [ -d /etc/apm/resume.d ]; then
81 run-parts -a "${1}" -a "${2}" /etc/apm/resume.d
82 fi
83 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
84else
85 run-parts -a "${1}" -a "${2}" /etc/apm/event.d
86 if [ -d /etc/apm/other.d ]; then
87 run-parts -a "${1}" -a "${2}" /etc/apm/other.d
88 fi
89fi
90
91exit 0
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf b/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf
new file mode 100644
index 0000000000..751145c522
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/apmd_proxy.conf
@@ -0,0 +1,16 @@
1# /etc/apm/apmd_proxy.conf: configuration file for apmd.
2#
3# This file is managed by debconf when installing or reconfiguring the
4# package. It is generated by merging the answers gathered by debconf
5# into the template file "/usr/share/apmd/apmd_proxy.conf".
6
7# The following doesn't yet work, because current kernels (up to at least
8# 2.4.20) do not support rejection of APM events. Supporting this would
9# require substantial modifications to the APM driver. We will re-enable
10# this feature if the driver is ever modified. -- cph@debian.org
11#
12# Set the following to "false" if you want to reject system suspend or
13# system standby requests when the computer is running on AC power.
14# Otherwise set this to "true". Such requests are never rejected when
15# the computer is running on battery power.
16#SUSPEND_ON_AC=true
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/default b/meta/recipes-bsp/apmd/apmd-3.2.2-14/default
new file mode 100644
index 0000000000..4b7965abf8
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/default
@@ -0,0 +1,8 @@
1#
2# Default for /etc/init.d/apmd
3#
4
5# As apmd can be called with arguments, we use the following variable
6# to store them, e.g., APMD="-w 5 -p 2".
7# See the manual page apmd(8) for details.
8APMD="--proxy-timeout 30"
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/init b/meta/recipes-bsp/apmd/apmd-3.2.2-14/init
new file mode 100755
index 0000000000..268d4b26b7
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/init
@@ -0,0 +1,44 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: apmd
4# Required-Start: $remote_fs
5# Required-Stop: $remote_fs
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: Advanced Power Management daemon
9### END INIT INFO
10
11PATH=/bin:/usr/bin:/sbin:/usr/sbin
12
13[ -f /etc/default/rcS ] && . /etc/default/rcS
14[ -f /etc/default/apmd ] && . /etc/default/apmd
15
16case "$1" in
17 start)
18 echo -n "Starting advanced power management daemon: "
19 start-stop-daemon -S -x /usr/sbin/apmd -- \
20 -P /etc/apm/apmd_proxy $APMD
21 if [ $? = 0 ]; then
22 echo "apmd."
23 else
24 echo "(failed.)"
25 fi
26 ;;
27 stop)
28 echo -n "Stopping advanced power management daemon: "
29 start-stop-daemon -K \
30 -x /usr/sbin/apmd
31 echo "apmd."
32 ;;
33 restart|force-reload)
34 $0 stop
35 $0 start
36 exit
37 ;;
38 *)
39 echo "Usage: /etc/init.d/apmd {start|stop|restart|force-reload}"
40 exit 1
41 ;;
42esac
43
44exit 0
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch b/meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch
new file mode 100644
index 0000000000..711e777084
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/libtool.patch
@@ -0,0 +1,29 @@
1# Add by RP to address "unable to infer tagged configuration" error:
2# commit 35de05e61b88c0808a5e885bb0efdf420555d5ad
3# Author: Richard Purdie <rpurdie@rpsys.net>
4# Date: Sun Jun 1 16:13:38 2008 +0000
5#
6# apmd: Use libtool --tag options to avoid problems with libtool 2.2.4 (from poky)
7#
8# However I didn't see same issue with current libtool-2.2.10. Also per my understanding,
9# the default tag, if not specified, falls back to CC. So disable it from patching, but
10# keep it here. If we encounter similar issue in the future, we could then push upstream
11#
12# Comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-16
13
14Index: apmd-3.2.2.orig/Makefile
15===================================================================
16--- apmd-3.2.2.orig.orig/Makefile 2004-01-04 08:13:18.000000000 +0000
17+++ apmd-3.2.2.orig/Makefile 2008-04-21 17:10:03.000000000 +0100
18@@ -58,9 +57,8 @@
19 #CFLAGS=-O3 -m486 -fomit-frame-pointer
20 #LDFLAGS=-s
21
22-LIBTOOL=libtool --quiet
23-LT_COMPILE = $(LIBTOOL) --mode=compile $(CC)
24-LT_LINK = $(LIBTOOL) --mode=link $(CC)
25+LT_COMPILE = $(LIBTOOL) --tag=CC --mode=compile $(CC)
26+LT_LINK = $(LIBTOOL) --tag=CC --mode=link $(CC)
27 LT_INSTALL = $(LIBTOOL) --mode=install install
28 LT_CLEAN = $(LIBTOOL) --mode=clean rm
29
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch b/meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch
new file mode 100644
index 0000000000..c64e7df524
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/unlinux.patch
@@ -0,0 +1,21 @@
1# copy OE commit message here:
2# commit 9456cdc1cf43e3ba9e6d88c63560c1b6fdee4359
3# Author: Michael Krelin <hacker@klever.net>
4# Date: Tue May 29 12:27:45 2007 +0000
5#
6# apmd: prevent build from interferring with host kernel headers. Closes #1257
7#
8# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
9
10--- apmd-3.2.2.orig/Makefile
11+++ apmd-3.2.2/Makefile
12@@ -43,8 +43,7 @@
13
14 CC=gcc
15 CFLAGS=-O -g
16-XTRACFLAGS=-Wall -pipe -I. -I/usr/src/linux/include -I/usr/X11R6/include \
17- -I/usr/src/linux-2.2/include -I /usr/src/linux-2.0/include \
18+XTRACFLAGS=-Wall -pipe -I. \
19 -DVERSION=\"$(VERSION)\" \
20 -DDEFAULT_PROXY_NAME=\"$(PROXY_DIR)/apmd_proxy\"
21 LDFLAGS=
diff --git a/meta/recipes-bsp/apmd/apmd-3.2.2-14/workaround.patch b/meta/recipes-bsp/apmd/apmd-3.2.2-14/workaround.patch
new file mode 100644
index 0000000000..d37380397c
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd-3.2.2-14/workaround.patch
@@ -0,0 +1,59 @@
1# this workaround is there in OE since 2003. It looks to provide a workaround
2# allowing others sending SIGUSR1 to cause an apm suspend event. Disable it for
3# now.
4#
5# comment added by Kevin Tian <kevin.tian@intel.com>, 2010-07-13
6#
7# Patch managed by http://www.holgerschurig.de/patcher.html
8#
9
10--- apmd-3.2.2.orig/apmd.c~workaround.patch
11+++ apmd-3.2.2.orig/apmd.c
12@@ -158,6 +158,7 @@
13 static int quiet_bios_batlow; /* = 0 */
14 static int verbosity = DEFAULT_VERBOSITY;
15 static int warn_level = 10;
16+static int sleep_now = 0; /* ntp */
17
18 static uid_t apmd_uid = 0;
19 static int apmd_fd = -1;
20@@ -942,6 +943,12 @@
21 exit(0);
22 }
23
24+/* ntp */
25+static void sig_usr1(int sig)
26+{
27+ sleep_now = 1;
28+}
29+
30 int main(int argc, char **argv)
31 {
32 int c;
33@@ -1151,6 +1158,8 @@
34 openlog("apmd", (verbosity>=LOG_DEBUG)?LOG_PERROR:0 | LOG_PID | LOG_CONS, LOG_DAEMON);
35
36 /* Set up signal handler */
37+ if (signal(SIGUSR1, SIG_IGN) != SIG_IGN)
38+ signal(SIGUSR1, sig_usr1); /* ntp */
39 if (signal(SIGINT, SIG_IGN) != SIG_IGN)
40 signal(SIGINT, sig_handler);
41 if (signal(SIGQUIT, SIG_IGN) != SIG_IGN)
42@@ -1230,9 +1239,16 @@
43
44 for (;;)
45 {
46- int num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
47+ int num_events;
48 int e, a;
49
50+ /* ntp */
51+ if (sleep_now) {
52+ sleep_now = 0;
53+ handle_event(APM_USER_SUSPEND, &apminfo);
54+ }
55+
56+ num_events = apm_get_events(apmd_fd, check_interval, events, MAX_EVENTS);
57 apm_read(&apminfo);
58
59 if (num_events == 0) {
diff --git a/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
new file mode 100644
index 0000000000..2778cc69e8
--- /dev/null
+++ b/meta/recipes-bsp/apmd/apmd_3.2.2-14.bb
@@ -0,0 +1,63 @@
1DESCRIPTION = "Set of tools for managing notebook power consumption."
2SECTION = "base"
3PRIORITY = "required"
4LICENSE = "GPLv2+"
5LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
6 file://apm.h;firstline=6;endline=18;md5=c9a1f79036ab14aa157e15ed75ffd769"
7DEPENDS = "libtool-cross"
8PR = "r1"
9
10SRC_URI = "${DEBIAN_MIRROR}/main/a/apmd/apmd_3.2.2.orig.tar.gz \
11 ${DEBIAN_MIRROR}/main/a/apmd/apmd_${PV}.diff.gz \
12 file://libtool.patch \
13 file://unlinux.patch \
14 file://init \
15 file://default \
16 file://apmd_proxy \
17 file://apmd_proxy.conf"
18
19S = "${WORKDIR}/apmd-3.2.2.orig"
20
21inherit update-rc.d
22
23INITSCRIPT_NAME = "apmd"
24INITSCRIPT_PARAMS = "defaults"
25
26do_compile() {
27 # apmd doesn't use whole autotools. Just libtool for installation
28 oe_runmake "LIBTOOL=${STAGING_BINDIR_CROSS}/${TARGET_PREFIX}libtool" apm apmd
29}
30
31do_install() {
32 install -d ${D}${sysconfdir}
33 install -d ${D}${sysconfdir}/apm
34 install -d ${D}${sysconfdir}/apm/event.d
35 install -d ${D}${sysconfdir}/apm/other.d
36 install -d ${D}${sysconfdir}/apm/suspend.d
37 install -d ${D}${sysconfdir}/apm/resume.d
38 install -d ${D}${sysconfdir}/apm/scripts.d
39 install -d ${D}${sysconfdir}/default
40 install -d ${D}${sysconfdir}/init.d
41 install -d ${D}${sbindir}
42 install -d ${D}${bindir}
43 install -d ${D}${libdir}
44 install -d ${D}${datadir}/apmd
45 install -d ${D}${includedir}
46
47 install -m 4755 ${S}/.libs/apm ${D}${bindir}/apm
48 install -m 0755 ${S}/.libs/apmd ${D}${sbindir}/apmd
49 install -m 0755 ${WORKDIR}/apmd_proxy ${D}${sysconfdir}/apm/
50 install -m 0644 ${WORKDIR}/apmd_proxy.conf ${D}${datadir}/apmd/
51 install -m 0644 ${WORKDIR}/default ${D}${sysconfdir}/default/apmd
52 oe_libinstall -so libapm ${D}${libdir}
53 install -m 0644 apm.h ${D}${includedir}
54
55 cat ${WORKDIR}/init | sed -e 's,/usr/sbin,${sbindir},g; s,/etc,${sysconfdir},g;' > ${D}${sysconfdir}/init.d/apmd
56 chmod 755 ${D}${sysconfdir}/init.d/apmd
57}
58
59PACKAGES =+ "libapm libapm-dev apm"
60
61FILES_libapm = "${libdir}/libapm.so.*"
62FILES_libapm-dev = "${libdir}/libapm.* ${includedir}"
63FILES_apm = "${bindir}/apm*"
diff --git a/meta/recipes-bsp/hostap/files/hostap-fw-load.patch b/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
new file mode 100644
index 0000000000..88adee2bc9
--- /dev/null
+++ b/meta/recipes-bsp/hostap/files/hostap-fw-load.patch
@@ -0,0 +1,20 @@
1
2#
3# Patch managed by http://www.holgerschurig.de/patcher.html
4#
5
6--- hostap-utils-0.2.4/hostap_fw_load~hostap-fw-load
7+++ hostap-utils-0.2.4/hostap_fw_load
8@@ -6,9 +6,9 @@
9 # Firmware images for the card
10 # TODO: could try to select correct firmware type automatically
11
12-PRI=/etc/pcmcia/PM010102.HEX
13-STA=/etc/pcmcia/RF010802.HEX
14-PRISM2_SREC=/usr/local/bin/prism2_srec
15+PRI=/etc/pcmcia/pm010102.hex
16+STA=/etc/pcmcia/rf010804.hex
17+PRISM2_SREC=/usr/sbin/prism2_srec
18
19 set -e
20
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.conf b/meta/recipes-bsp/hostap/files/hostap_cs.conf
new file mode 100644
index 0000000000..8dda82aad3
--- /dev/null
+++ b/meta/recipes-bsp/hostap/files/hostap_cs.conf
@@ -0,0 +1,193 @@
1module "hostap_cs" opts "channel=3 iw_mode=2 essid=any ignore_cis_vcc=1"
2
3card "Actiontec 802CI2"
4 manfid 0x1668, 0x0101
5 bind "hostap_cs"
6
7card "AirWay 802.11 Adapter (PCMCIA)"
8 #version "AirWay", "802.11 Adapter (PCMCIA)"
9 manfid 0x0261, 0x0002
10 bind "hostap_cs"
11
12card "Asus SpaceLink WL110"
13 manfid 0x02aa,0x0002
14 bind "hostap_cs"
15
16## handhelds.org bug 964
17card "Belkin F5D6060 Ethernet"
18 #version "PCMCIA", "11M WLAN Card v2.5", "ISL37300P", "RevA"
19 manfid 0x0274, 0x1612
20 bind "hostap_cs"
21
22card "Compaq 11Mbps Wireless PC Card"
23 manfid 0x028a, 0x0002
24 bind "hostap_cs"
25
26card "Compaq WL100 11 Mbps Wireless Adapter"
27 manfid 0x0138, 0x0002
28 bind "hostap_cs"
29
30card "Compaq HNW-100 11 Mbps Wireless Adapter"
31 manfid 0x028a, 0x0002
32 bind "hostap_cs"
33
34card "D-Link DWL-650"
35 version "D", "Link DWL-650 11Mbps WLAN Card"
36 bind "hostap_cs"
37
38card "D-Link DRC-650"
39 version "D", "Link DRC-650 11Mbps WLAN Card"
40 bind "hostap_cs"
41
42card "D-Link DCF660"
43 manfid 0xd601, 0x0005
44 bind "hostap_cs"
45
46card "Farallon SkyLINE"
47 version "INTERSIL", "HFA384x/IEEE"
48 bind "hostap_cs"
49
50card "HyperLink Wireless PC Card 11Mbps"
51 version "HyperLink", "Wireless PC Card 11Mbps"
52 bind "hostap_cs"
53
54# card "Intersil PRISM2 11 Mbps Wireless Adapter"
55# manfid 0x0156, 0x0002
56# bind "hostap_cs"
57
58card "LA4111 Spectrum24 Wireless LAN PC Card"
59 version "Symbol Technologies"
60 bind "hostap_cs"
61
62card "Linksys WPC11 11Mbps 802.11b WLAN Card"
63 version "Instant Wireless ", " Network PC CARD", "Version 01.02"
64 bind "hostap_cs"
65
66card "Linksys WCF11 11Mbps 802.11b WLAN Card"
67 manfid 0x0274, 0x3301
68 bind "hostap_cs"
69
70## handhelds.org bug #790
71card "Linksys Wireless CompactFlash Card WCF12"
72 manfid 0x028a, 0x0673
73 bind "hostap_cs"
74
75card "Linksys WLAN CF Card"
76 manfid 0x0274, 0x3301
77 bind "hostap_cs"
78
79card "NETGEAR MA701 Wireless CF Card"
80 manfid 0xd601, 0x0002
81 bind "hostap_cs"
82
83card "Nortel Networks eMobility 802.11 Wireless Adapter"
84 manfid 0x01eb, 0x080a
85 bind "hostap_cs"
86
87card "PLANEX GeoWave GW-CF110"
88 version "PLANEX", "GeoWave/GW-CF110"
89 bind "hostap_cs"
90
91card "PROXIM LAN PC CARD HARMONY 80211B"
92 version "PROXIM", "LAN PC CARD HARMONY 80211B"
93 bind "hostap_cs"
94
95card "Proxim RangeLAN/DS"
96 version "PROXIM","RangeLAN-DS/LAN PC CARD"
97 manfid 0x0126, 0x8000
98 bind "hostap_cs"
99
100card "Safeway 802.11b Wireless Adapter"
101 manfid 0xd601, 0x0002
102 bind "hostap_cs"
103
104card "SAMSUNG 11Mbps WLAN Card"
105 version "SAMSUNG", "11Mbps WLAN Card"
106 bind "hostap_cs"
107
108# needs firmware upload via hostap_fw_load
109card "SanDisk ConnectPlus OEM (0MB)"
110 manfid 0xd601, 0x0010
111 bind "hostap_cs"
112
113# needs special activation (>=hostap 0.3.2 only) plus firmware upload
114card "SanDisk ConnectPlus w/ Memory"
115 version "SanDisk", "ConnectPlus"
116 manfid 0xd601, 0x0101
117 bind "hostap_cs" to 0
118# bind "ide-cs" to 1
119
120card "Senao/Origo 80211b WLAN Card"
121 manfid 0x000b,0x7100
122 bind "hostap_cs"
123
124card "Sitecom WL-007 WLAN CF Card"
125 manfid 0xd601, 0x0004
126 bind "hostap_cs"
127
128card "SMC2632 802.11 (prism2) Card"
129 version "SMC", "SMC2632W", "Version 01.02", ""
130 bind "hostap_cs"
131
132card "SpeedStream SS1021 Wireless Adapter"
133 #version "Siemens", "SpeedStream Wireless PCMCIA"
134 manfid 0x02ac, 0x0002
135 bind "hostap_cs"
136
137card "ZCOMAX AirRunner/XI-300"
138 #version "ZCOMAX", "AirRunner/XI-300"
139 manfid 0xd601, 0x0002
140 bind "hostap_cs"
141
142card "Zonet ZCF1100"
143 manfid 0x000b, 0x7100
144 bind "hostap_cs"
145
146card "Wireless LAN Adapter Version 01.02"
147 version "Wireless", "LAN Adapter", "Version 01.02"
148# manfid 0x0156, 0x0002
149 bind "hostap_cs"
150
151card "Ambicom WL1100C 11Mbs Card 802.11b"
152 version "AmbiCom", "WL1100C 802.11b CF-Card", "2.2"
153 manfid 0xd601,0x0002
154 bind "hostap_cs"
155
156card "Ambicom WL1100C 11Mbs Card 802.11b"
157 manfid 0xd601,0x0002
158 bind "hostap_cs"
159
160card "Sandisk Connect SDWCFB-000"
161 manfid 0xd601,0x0005
162 bind "hostap_cs"
163
164# Cards with Intersil firmware (Prism chipset)
165
166card "Linksys WPC11 11Mbps 802.11b WLAN Card"
167 version "The Linksys Group, Inc.", "Instant Wireless Network PC Card", "ISL37300P", "RevA"
168 bind "hostap_cs"
169
170card "Linksys CompactFlash Wireless Card"
171 version "Linksys", "Wireless CompactFlash Card"
172 bind "hostap_cs"
173
174card "ACTIONTEC PRISM Wireless LAN PC Card"
175 version "ACTIONTEC", "PRISM Wireless LAN PC Card"
176 bind "hostap_cs"
177
178card "Linksys WPC11 Version 3"
179 manfid 0x0274,0x1613
180 bind "hostap_cs"
181
182card "BENQ AWL100"
183 version "BENQ", "AWL100 PCMCIA ADAPTER"
184 bind "hostap_cs"
185
186card "Pretec WLAN"
187 version "Pretec", "CompactWLAN Card 802.11b", "2.5"
188 manfid 0x0156, 0x0002
189 bind "hostap_cs"
190
191card "TrendNet TEW PC16"
192 manfid 0x0274, 0x1601
193 bind "hostap_cs"
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream b/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
new file mode 100644
index 0000000000..5b7385a7cb
--- /dev/null
+++ b/meta/recipes-bsp/hostap/files/hostap_cs.conf-upstream
@@ -0,0 +1,191 @@
1device "hostap_cs"
2 class "network" module "hostap", "hostap_cs"
3
4card "Intersil PRISM2 Reference Design 11Mb/s WLAN Card"
5 version "INTERSIL", "HFA384x/IEEE"
6 bind "hostap_cs"
7
8card "Compaq WL100 11Mb/s WLAN Card"
9 manfid 0x0138, 0x0002
10 bind "hostap_cs"
11
12card "Compaq WL200"
13 version "Compaq", "WL200_11Mbps_Wireless_PCI_Card"
14 bind "hostap_cs"
15
16card "EMTAC A2424i 11Mbps WLAN Card"
17 manfid 0xc250, 0x0002
18# cis "cis/Emtac.dat"
19 bind "hostap_cs"
20
21card "Linksys WPC11 11Mbps WLAN Card"
22 version "Instant Wireless ", " Network PC CARD", "Version 01.02"
23 bind "hostap_cs"
24
25card "Linksys WPC11 Ver 2.5 11Mbps WLAN Card"
26 manfid 0x0274, 0x1612
27 bind "hostap_cs"
28
29card "Linksys WPC11 Ver 3 11Mbps WLAN Card"
30 manfid 0x0274, 0x1613
31 bind "hostap_cs"
32
33card "Linksys WCF12 Wireless CompactFlash Card"
34 version "Linksys", "Wireless CompactFlash Card"
35 bind "hostap_cs"
36
37card "D-Link DWL-650 11Mbps WLAN Card"
38 version "D", "Link DWL-650 11Mbps WLAN Card", "Version 01.02"
39 bind "hostap_cs"
40
41card "D-Link DRC-650 11Mbps WLAN Card"
42# version "D", "Link DRC-650 11Mbps WLAN Card", "Version 01.02"
43 manfid 0x028a, 0x0002
44 bind "hostap_cs"
45
46card "ZoomAir 4100 11Mb/s WLAN Card"
47 version "ZoomAir 11Mbps High", "Rate wireless Networking"
48 bind "hostap_cs"
49
50card "Addtron AWP-100 11Mbps WLAN Card"
51 version "Addtron", "AWP-100 Wireless PCMCIA", "Version 01.02"
52 bind "hostap_cs"
53
54card "Samsung SWL2000-N 11Mb/s WLAN Card"
55 manfid 0x0250, 0x0002
56 bind "hostap_cs"
57
58card "SMC 2632W 11Mbps WLAN Card"
59 version "SMC", "SMC2632W", "Version 01.02"
60 bind "hostap_cs"
61
62card "BroMax Freeport 11Mbps WLAN Card"
63 version "Intersil", "PRISM 2_5 PCMCIA ADAPTER", "ISL37300P", "Eval-RevA"
64 bind "hostap_cs"
65
66card "Z-Com XI300 11Mb/s WLAN Card"
67 manfid 0xd601, 0x0002
68 bind "hostap_cs"
69
70card "Zcomax XI-325H 200mW"
71# version " ", "IEEE 802.11 Wireless LAN/PC Card"
72 manfid 0xd601, 0x0005
73 bind "hostap_cs"
74
75card "3Com AirConnect PCI 777A"
76 manfid 0x0101, 0x0777
77 bind "hostap_cs"
78
79card "U.S. Robotics IEEE 802.11b PC-CARD"
80 version "U.S. Robotics", "IEEE 802.11b PC-CARD", "Version 01.02"
81# manfid 0x0156, 0x0002
82 bind "hostap_cs"
83
84card "Longshine LCR-8531 11Mbps WLAN PCMCIA CARD"
85 version "OEM", "PRISM2 IEEE 802.11 PC-Card", "Version 01.02"
86# manfid 0x0156, 0x0002
87 bind "hostap_cs"
88
89card "Philips 802.11b WLAN PCMCIA"
90 manfid 0x000b, 0x7300
91 bind "hostap_cs"
92
93card "Proxim RangeLAN"
94# version "PROXIM", "RangeLAN-DS/LAN PC CARD"
95 manfid 0x0126, 0x8000
96 bind "hostap_cs"
97
98card "Buffalo WLI-CF-S11G"
99 version "BUFFALO", "WLI-CF-S11G"
100# manfid 0x026f, 0x030b
101 bind "hostap_cs"
102
103card "Level-One WPC-0100"
104 version "Digital Data Communications", "WPC-0100", "Version 00.00"
105 manfid 0x0156, 0x0002
106 bind "hostap_cs"
107
108card "Belkin 802.11b WLAN PCMCIA"
109 version "Belkin", "11Mbps Wireless Notebook Network Adapter", "Version 01.02"
110 manfid 0x0156, 0x0002
111 bind "hostap_cs"
112
113card "Senao SL-2011CD/SL-2011CDPLUS"
114 version "INTERSIL", "HFA384x/IEEE", "Version 01.02"
115 manfid 0x0156, 0x0002
116 bind "hostap_cs"
117
118card "Fulbond Airbond XI-300B"
119 version " ", "IEEE 802.11 Wireless LAN/PC Card"
120 manfid 0xd601, 0x0002
121 bind "hostap_cs"
122
123card "Netgear MA401"
124 version "NETGEAR MA401 Wireless PC", "Card", "Version 01.00"
125# manfid 0x0156, 0x0002
126 bind "hostap_cs"
127
128card "D-Link DWL-650 Rev. P1"
129 version "D-Link", "DWL-650 Wireless PC Card RevP", "ISL37101P-10", "A3"
130# manfid 0x000b, 0x7110
131 bind "hostap_cs"
132
133card "SonicWALL Long Range Wireless Card"
134 version "SonicWALL", "Long Range Wireless Card", "ISL37100P", "1.0"
135 manfid 0x000b, 0x7100
136 bind "hostap_cs"
137
138card "Senao NL-2011CD PLUS Ext2 Mercury"
139 version "WLAN", "11Mbps_PC-Card_3.0", "ISL37100P", "Eval-RevA"
140 manfid 0x000b, 0x7100
141 bind "hostap_cs"
142
143card "Airvast WL100"
144 version "AIRVAST", "IEEE 802.11b Wireless PCMCIA Card", "HFA3863"
145 manfid 0x50c2, 0x0001
146 bind "hostap_cs"
147
148card "Microsoft Wireless Notebook Adapter MN-520 1.0.3"
149 version "Microsoft", "Wireless Notebook Adapter MN-520", "", "1.0.3"
150 manfid 0x02d2, 0x0001
151 bind "hostap_cs"
152
153card "NETGEAR MA401RA"
154 version "NETGEAR MA401RA Wireless PC", "Card", "ISL37300P", "Eval-RevA"
155 manfid 0x000b, 0x7300
156 bind "hostap_cs"
157
158card "Allied Telesyn AT-WCL452"
159 version "Allied Telesyn", "AT-WCL452 Wireless PCMCIA Radio", "Ver. 1.00"
160 manfid 0xc00f, 0x0000
161 bind "hostap_cs"
162
163card "corega WL PCCL-11"
164 version "corega", "WL PCCL-11", "ISL37300P", "RevA"
165 manfid 0xc00f, 0x0000
166 bind "hostap_cs"
167
168card "SanDisk ConnectPlus"
169 version "SanDisk", "ConnectPlus"
170 manfid 0xd601, 0x0101
171 bind "hostap_cs" to 0
172 bind "ide-cs" to 1
173
174card "ASUS WL-100 8011b WLAN PC Card"
175 version "ASUS", "802_11b_PC_CARD_25", "Version 01.00"
176 manfid 0x02aa, 0x0002
177 bind "hostap_cs"
178
179card "ZyXel Zyair B-101 802.11b WLAN card"
180 version " ", "IEEE 802.11 Wireless LAN/PC Card"
181 manfid 0xd601, 0x0010
182 bind "hostap_cs"
183
184card "WLAN PRISM PCMCIA CARD 37300P RevB6"
185 version "WLAN", "PRISM PCMCIA CARD", "37300P", "Revision B6"
186 manfid 0x50c2, 0x7300
187 bind "hostap_cs"
188
189
190# Optional configuration parameters for hostap_cs.o
191# module "hostap_cs" opts "channel=3 iw_mode=3 essid=test ignore_cis_vcc=0"
diff --git a/meta/recipes-bsp/hostap/files/hostap_cs.modalias b/meta/recipes-bsp/hostap/files/hostap_cs.modalias
new file mode 100644
index 0000000000..cb9efab271
--- /dev/null
+++ b/meta/recipes-bsp/hostap/files/hostap_cs.modalias
@@ -0,0 +1,28 @@
1# product info: "Pretec", "CompactWLAN Card 802.11b", "2.5"
2pcmcia:m0156c0002f06fn00pfn00pa1CADD3E5pbE697636Cpc7A5BFCF1pd00000000 hostap_cs
3
4# manufacturer ID which exist in orinoco_cs AND in hostap_cs
5pcmcia:m000Bc7100f06fn00pfn00pa*pb*pc*pd* hostap_cs
6pcmcia:m000Bc7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
7pcmcia:m0126c8000f06fn00pfn00pa*pb*pc*pd* hostap_cs
8pcmcia:m0138c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
9pcmcia:m0250c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
10pcmcia:m0274c1612f06fn00pfn00pa*pb*pc*pd* hostap_cs
11pcmcia:m0274c1613f06fn00pfn00pa*pb*pc*pd* hostap_cs
12pcmcia:m028Ac0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
13pcmcia:m02AAc0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
14pcmcia:m50C2c7300f06fn00pfn00pa*pb*pc*pd* hostap_cs
15pcmcia:mD601c0002f06fn00pfn00pa*pb*pc*pd* hostap_cs
16pcmcia:mD601c0005f06fn00pfn00pa*pb*pc*pd* hostap_cs
17
18# product info: "Linksys", "Wireless CompactFlash Card", "", ""
19pcmcia:m028Ac0673f06fn00pfn00pa0733CC81pb0C52F395pc00000000pd00000000 hostap_cs
20
21# product info:"PLANEX COMMUNICATION INC","PLANEX GW-CF11X Wireless CF Card", "", ""
22pcmcia:mD601c0010f06fn00pfn00pa4703CF68pbFAD7318Dpc00000000pd00000000 hostap_cs
23
24# 0x0156, 0x0002 and "Version 01.02" only appear for Prism based cards.
25pcmcia:m0156c0002f06fn00pfn00pa*pb*pc4B74BAA0pd00000000 hostap_cs
26
27# "BUFFALO", "WLI-CF-S11G", "", ""
28pcmcia:m026Fc030Bf06fn00pfn00pa2DECECE3pb82067C18pc00000000pd00000000 hostap_cs
diff --git a/meta/recipes-bsp/hostap/hostap-conf_1.0.bb b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
new file mode 100644
index 0000000000..ce069662c7
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-conf_1.0.bb
@@ -0,0 +1,29 @@
1DESCRIPTION = "PCMCIA-cs configuration files for wireless LAN cards based on Intersil's Prism2/2.5/3 chipset"
2SECTION = "kernel/modules"
3PRIORITY = "optional"
4LICENSE = "GPL"
5RDEPENDS = "update-modules"
6PACKAGE_ARCH = "all"
7PR = "r10"
8
9SRC_URI = "file://hostap_cs.modalias"
10
11do_compile() {
12}
13
14do_install() {
15 install -d ${D}${sysconfdir}/modutils
16
17 install -m 0644 ${WORKDIR}/hostap_cs.modalias ${D}${sysconfdir}/modutils/hostap_cs.conf
18}
19
20pkg_postinst () {
21 if [ -n "$D" ]; then
22 exit 1
23 fi
24 update-modules || true
25}
26
27pkg_postrm () {
28 update-modules || true
29}
diff --git a/meta/recipes-bsp/hostap/hostap-utils.inc b/meta/recipes-bsp/hostap/hostap-utils.inc
new file mode 100644
index 0000000000..16880f1196
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-utils.inc
@@ -0,0 +1,25 @@
1DESCRIPTION = "User mode helpers for the hostap driver"
2HOMEPAGE = "http://hostap.epitest.fi"
3BUGTRACKER = "http://hostap.epitest.fi/bugz/"
4LICENSE = "GPLv2"
5LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
6 file://util.c;beginline=1;endline=9;md5=d3b9280851302e5ba34e5fb717489b6d"
7SECTION = "kernel/userland"
8PRIORITY = "optional"
9PR = "r4"
10
11SRC_URI = "http://hostap.epitest.fi/releases/hostap-utils-${PV}.tar.gz \
12 file://hostap-fw-load.patch;patch=1"
13S = "${WORKDIR}/hostap-utils-${PV}"
14
15BINARIES = "hostap_crypt_conf hostap_diag hostap_fw_load hostap_io_debug \
16 hostap_rid prism2_param prism2_srec split_combined_hex"
17
18do_install() {
19 install -d ${D}${sbindir}/
20 for f in ${BINARIES}
21 do
22 install -m 0755 $f ${D}${sbindir}/
23 done
24}
25
diff --git a/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
new file mode 100644
index 0000000000..9fe362b19f
--- /dev/null
+++ b/meta/recipes-bsp/hostap/hostap-utils_0.4.7.bb
@@ -0,0 +1 @@
require hostap-utils.inc
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools.patch
new file mode 100644
index 0000000000..73f5a062ef
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/autotools.patch
@@ -0,0 +1,37 @@
1--- lrzsz-0.12.20/acinclude.m4~autotools 1998-12-27 17:08:59.000000000 -0500
2+++ lrzsz-0.12.20/acinclude.m4 2004-05-09 22:26:19.000000000 -0400
3@@ -1,12 +1,11 @@
4 dnl AC_REPLACE_GNU_GETOPT
5-AC_DEFUN(AC_REPLACE_GNU_GETOPT,
6-[AC_CHECK_FUNC(getopt_long, , [LIBOBJS="$LIBOBJS getopt1.o getopt.o"])
7-AC_SUBST(LIBOBJS)dnl
8-])
9+AC_DEFUN([AC_REPLACE_GNU_GETOPT],
10+[AC_CHECK_FUNC(getopt_long, , [AC_LIBOBJ([getopt1])
11+AC_LIBOBJ([getopt])dnl])])
12
13 dnl
14 dnl taken from taylor uucp
15-AC_DEFUN(LRZSZ_ERRNO_DECL,[
16+AC_DEFUN([LRZSZ_ERRNO_DECL],[
17 AC_MSG_CHECKING(for errno declaration)
18 AC_CACHE_VAL(lrzsz_cv_decl_errno,
19 [AC_TRY_COMPILE([#include <errno.h>], [int i = errno; errno = 1;],
20@@ -23,7 +21,7 @@
21 ])
22
23 dnl LRZSZ_TYPE_SPEED_T
24-AC_DEFUN(LRZSZ_TYPE_SPEED_T,[
25+AC_DEFUN([LRZSZ_TYPE_SPEED_T],[
26 AC_REQUIRE([AC_HEADER_STDC])dnl
27 AC_REQUIRE([LRZSZ_HEADERS_TERM_IO])dnl
28 AC_MSG_CHECKING(for speed_t)
29@@ -61,7 +59,7 @@
30 fi
31 ])
32
33-AC_DEFUN(lrzsz_HEADER_SYS_SELECT,
34+AC_DEFUN([lrzsz_HEADER_SYS_SELECT],
35 [AC_CACHE_CHECK([whether sys/time.h and sys/select.h may both be included],
36 lrzsz_cv_header_sys_select,
37 [AC_TRY_COMPILE([#include <sys/types.h>
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch
new file mode 100644
index 0000000000..241ffd90ba
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/gettext.patch
@@ -0,0 +1,21882 @@
1--- lrzsz-0.12.20.safe/ABOUT-NLS 1998-04-26 09:22:30.000000000 -0400
2+++ lrzsz-0.12.20/ABOUT-NLS 2004-09-12 14:40:34.323752952 -0400
3@@ -1,14 +1,14 @@
4 Notes on the Free Translation Project
5 *************************************
6
7- Free software is going international! The Free Translation Project
8-is a way to get maintainers of free software, translators, and users all
9+Free software is going international! The Free Translation Project is
10+a way to get maintainers of free software, translators, and users all
11 together, so that will gradually become able to speak many languages.
12 A few packages already provide translations for their messages.
13
14 If you found this `ABOUT-NLS' file inside a distribution, you may
15 assume that the distributed package does use GNU `gettext' internally,
16-itself available at your nearest GNU archive site. But you do *not*
17+itself available at your nearest GNU archive site. But you do _not_
18 need to install GNU `gettext' prior to configuring, installing or using
19 this package with messages translated.
20
21@@ -22,10 +22,10 @@
22 `gettext' which is used. The information can be found in the
23 `intl/VERSION' file, in internationalized packages.
24
25-One advise in advance
26-=====================
27+Quick configuration advice
28+==========================
29
30- If you want to exploit the full power of internationalization, you
31+If you want to exploit the full power of internationalization, you
32 should configure it using
33
34 ./configure --with-included-gettext
35@@ -34,42 +34,40 @@
36 package, despite the existence of internationalizing capabilities in the
37 operating system where this package is being installed. So far, only
38 the `gettext' implementation in the GNU C library version 2 provides as
39-many features (such as locale alias or message inheritance) as the
40-implementation here. It is also not possible to offer this additional
41-functionality on top of a `catgets' implementation. Future versions of
42-GNU `gettext' will very likely convey even more functionality. So it
43-might be a good idea to change to GNU `gettext' as soon as possible.
44+many features (such as locale alias, message inheritance, automatic
45+charset conversion or plural form handling) as the implementation here.
46+It is also not possible to offer this additional functionality on top
47+of a `catgets' implementation. Future versions of GNU `gettext' will
48+very likely convey even more functionality. So it might be a good idea
49+to change to GNU `gettext' as soon as possible.
50
51- So you need not provide this option if you are using GNU libc 2 or
52+ So you need _not_ provide this option if you are using GNU libc 2 or
53 you have installed a recent copy of the GNU gettext package with the
54 included `libintl'.
55
56 INSTALL Matters
57 ===============
58
59- Some packages are "localizable" when properly installed; the
60-programs they contain can be made to speak your own native language.
61-Most such packages use GNU `gettext'. Other packages have their own
62-ways to internationalization, predating GNU `gettext'.
63+Some packages are "localizable" when properly installed; the programs
64+they contain can be made to speak your own native language. Most such
65+packages use GNU `gettext'. Other packages have their own ways to
66+internationalization, predating GNU `gettext'.
67
68 By default, this package will be installed to allow translation of
69-messages. It will automatically detect whether the system provides
70-usable `catgets' (if using this is selected by the installer) or
71-`gettext' functions. If neither is available, the GNU `gettext' own
72+messages. It will automatically detect whether the system already
73+provides the GNU `gettext' functions. If not, the GNU `gettext' own
74 library will be used. This library is wholly contained within this
75 package, usually in the `intl/' subdirectory, so prior installation of
76-the GNU `gettext' package is *not* required. Installers may use
77+the GNU `gettext' package is _not_ required. Installers may use
78 special options at configuration time for changing the default
79 behaviour. The commands:
80
81 ./configure --with-included-gettext
82- ./configure --with-catgets
83 ./configure --disable-nls
84
85-will respectively bypass any pre-existing `catgets' or `gettext' to use
86-the internationalizing routines provided within this package, enable
87-the use of the `catgets' functions (if found on the locale system), or
88-else, *totally* disable translation of messages.
89+will respectively bypass any pre-existing `gettext' to use the
90+internationalizing routines provided within this package, or else,
91+_totally_ disable translation of messages.
92
93 When you already have GNU `gettext' installed on your system and run
94 configure without an option for your new package, `configure' will
95@@ -83,18 +81,10 @@
96
97 to prevent auto-detection.
98
99- By default the configuration process will not test for the `catgets'
100-function and therefore they will not be used. The reasons are already
101-given above: the emulation on top of `catgets' cannot provide all the
102-extensions provided by the GNU `gettext' library. If you nevertheless
103-want to use the `catgets' functions use
104-
105- ./configure --with-catgets
106-
107-to enable the test for `catgets' (this causes no harm if `catgets' is
108-not available on your system). If you really select this option we
109-would like to hear about the reasons because we cannot think of any
110-good one ourself.
111+ The configuration process will not test for the `catgets' function
112+and therefore it will not be used. The reason is that even an
113+emulation of `gettext' on top of `catgets' could not provide all the
114+extensions of the GNU `gettext' library.
115
116 Internationalized packages have usually many `po/LL.po' files, where
117 LL gives an ISO 639 two-letter code identifying the language. Unless
118@@ -108,57 +98,73 @@
119 Using This Package
120 ==================
121
122- As a user, if your language has been installed for this package, you
123+As a user, if your language has been installed for this package, you
124 only have to set the `LANG' environment variable to the appropriate
125-ISO 639 `LL' two-letter code prior to using the programs in the
126-package. For example, let's suppose that you speak German. At the
127-shell prompt, merely execute `setenv LANG de' (in `csh'),
128-`export LANG; LANG=de' (in `sh') or `export LANG=de' (in `bash'). This
129-can be done from your `.login' or `.profile' file, once and for all.
130+`LL_CC' combination. Here `LL' is an ISO 639 two-letter language code,
131+and `CC' is an ISO 3166 two-letter country code. For example, let's
132+suppose that you speak German and live in Germany. At the shell
133+prompt, merely execute `setenv LANG de_DE' (in `csh'),
134+`export LANG; LANG=de_DE' (in `sh') or `export LANG=de_DE' (in `bash').
135+This can be done from your `.login' or `.profile' file, once and for
136+all.
137
138- An operating system might already offer message localization for
139-many of its programs, while other programs have been installed locally
140-with the full capabilities of GNU `gettext'. Just using `gettext'
141-extended syntax for `LANG' would break proper localization of already
142-available operating system programs. In this case, users should set
143-both `LANGUAGE' and `LANG' variables in their environment, as programs
144-using GNU `gettext' give preference to `LANGUAGE'. For example, some
145-Swedish users would rather read translations in German than English for
146-when Swedish is not available. This is easily accomplished by setting
147-`LANGUAGE' to `sv:de' while leaving `LANG' to `sv'.
148+ You might think that the country code specification is redundant.
149+But in fact, some languages have dialects in different countries. For
150+example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
151+country code serves to distinguish the dialects.
152+
153+ The locale naming convention of `LL_CC', with `LL' denoting the
154+language and `CC' denoting the country, is the one use on systems based
155+on GNU libc. On other systems, some variations of this scheme are
156+used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
157+locales supported by your system for your country by running the command
158+`locale -a | grep '^LL''.
159+
160+ Not all programs have translations for all languages. By default, an
161+English message is shown in place of a nonexistent translation. If you
162+understand other languages, you can set up a priority list of languages.
163+This is done through a different environment variable, called
164+`LANGUAGE'. GNU `gettext' gives preference to `LANGUAGE' over `LANG'
165+for the purpose of message handling, but you still need to have `LANG'
166+set to the primary language; this is required by other parts of the
167+system libraries. For example, some Swedish users who would rather
168+read translations in German than English for when Swedish is not
169+available, set `LANGUAGE' to `sv:de' while leaving `LANG' to `sv_SE'.
170+
171+ Special advice for Norwegian users: The language code for Norwegian
172+bokma*l changed from `no' to `nb' recently (in 2003). During the
173+transition period, while some message catalogs for this language are
174+installed under `nb' and some older ones under `no', it's recommended
175+for Norwegian users to set `LANGUAGE' to `nb:no' so that both newer and
176+older translations are used.
177+
178+ In the `LANGUAGE' environment variable, but not in the `LANG'
179+environment variable, `LL_CC' combinations can be abbreviated as `LL'
180+to denote the language's main dialect. For example, `de' is equivalent
181+to `de_DE' (German as spoken in Germany), and `pt' to `pt_PT'
182+(Portuguese as spoken in Portugal) in this context.
183
184 Translating Teams
185 =================
186
187- For the Free Translation Project to be a success, we need interested
188+For the Free Translation Project to be a success, we need interested
189 people who like their own language and write it well, and who are also
190 able to synergize with other translators speaking the same language.
191-Each translation team has its own mailing list, courtesy of Linux
192-International. You may reach your translation team at the address
193-`LL@li.org', replacing LL by the two-letter ISO 639 code for your
194-language. Language codes are *not* the same as the country codes given
195-in ISO 3166. The following translation teams exist, as of August 1997:
196-
197- Chinese `zh', Czech `cs', Danish `da', Dutch `nl', English `en',
198- Esperanto `eo', Finnish `fi', French `fr', German `de', Hungarian
199- `hu', Irish `ga', Italian `it', Indonesian `id', Japanese `ja',
200- Korean `ko', Latin `la', Norwegian `no', Persian `fa', Polish
201- `pl', Portuguese `pt', Russian `ru', Slovenian `sl', Spanish `es',
202- Swedish `sv', and Turkish `tr'.
203-
204-For example, you may reach the Chinese translation team by writing to
205-`zh@li.org'.
206+Each translation team has its own mailing list. The up-to-date list of
207+teams can be found at the Free Translation Project's homepage,
208+`http://www.iro.umontreal.ca/contrib/po/HTML/', in the "National teams"
209+area.
210
211- If you'd like to volunteer to *work* at translating messages, you
212+ If you'd like to volunteer to _work_ at translating messages, you
213 should become a member of the translating team for your own language.
214-The subscribing address is *not* the same as the list itself, it has
215+The subscribing address is _not_ the same as the list itself, it has
216 `-request' appended. For example, speakers of Swedish can send a
217 message to `sv-request@li.org', having this message body:
218
219 subscribe
220
221 Keep in mind that team members are expected to participate
222-*actively* in translations, or at solving translational difficulties,
223+_actively_ in translations, or at solving translational difficulties,
224 rather than merely lurking around. If your team does not exist yet and
225 you want to start one, or if you are unsure about what to do or how to
226 get started, please write to `translation@iro.umontreal.ca' to reach the
227@@ -171,43 +177,559 @@
228 Available Packages
229 ==================
230
231- Languages are not equally supported in all packages. The following
232-matrix shows the current state of internationalization, as of August
233-1997. The matrix shows, in regard of each package, for which languages
234-PO files have been submitted to translation coordination.
235+Languages are not equally supported in all packages. The following
236+matrix shows the current state of internationalization, as of January
237+2004. The matrix shows, in regard of each package, for which languages
238+PO files have been submitted to translation coordination, with a
239+translation percentage of at least 50%.
240
241- Ready PO files cs da de en es fi fr it ja ko nl no pl pt sl sv
242- .-------------------------------------------------.
243- bash | [] [] [] | 3
244- bison | [] [] [] | 3
245- clisp | [] [] [] [] | 4
246- cpio | [] [] [] [] [] | 5
247- diffutils | [] [] [] [] [] | 5
248- enscript | [] [] [] [] [] [] | 6
249- fileutils | [] [] [] [] [] [] [] [] [] [] | 10
250- findutils | [] [] [] [] [] [] [] [] | 8
251- flex | [] [] [] [] | 4
252- gcal | [] [] [] [] [] | 5
253- gettext | [] [] [] [] [] [] [] [] [] [] | 11
254- grep | [] [] [] [] [] [] [] [] [] | 9
255- hello | [] [] [] [] [] [] [] [] [] [] | 10
256- id-utils | [] [] [] | 3
257- indent | [] [] [] [] | 4
258- libc | [] [] [] [] [] [] [] | 7
259- m4 | [] [] [] [] [] | 5
260- make | [] [] [] [] [] [] | 6
261- music | [] [] | 2
262- ptx | [] [] [] [] [] [] [] [] | 8
263- recode | [] [] [] [] [] [] [] [] [] | 9
264- sh-utils | [] [] [] [] [] [] [] | 7
265- sharutils | [] [] [] [] [] | 5
266- tar | [] [] [] [] [] [] [] [] [] [] | 10
267- texinfo | [] | 1
268- textutils | [] [] [] [] [] [] [] [] [] | 9
269- wdiff | [] [] [] [] [] [] [] [] | 8
270- `-------------------------------------------------'
271- 16 languages cs da de en es fi fr it ja ko nl no pl pt sl sv
272- 27 packages 3 2 24 1 17 1 26 2 1 11 20 9 19 7 7 17 167
273+ Ready PO files af am ar az be bg bs ca cs da de el en en_GB eo es
274+ +----------------------------------------------------+
275+ a2ps | [] [] [] [] |
276+ aegis | () |
277+ ant-phone | () |
278+ anubis | |
279+ ap-utils | |
280+ aspell | [] |
281+ bash | [] [] [] [] |
282+ batchelor | |
283+ bfd | [] [] |
284+ binutils | [] [] |
285+ bison | [] [] [] |
286+ bluez-pin | [] [] [] |
287+ clisp | |
288+ clisp | [] [] [] |
289+ console-tools | [] [] |
290+ coreutils | [] [] [] [] |
291+ cpio | [] [] [] |
292+ darkstat | [] () [] |
293+ diffutils | [] [] [] [] [] [] [] |
294+ e2fsprogs | [] [] [] |
295+ enscript | [] [] [] [] |
296+ error | [] [] [] [] [] |
297+ fetchmail | [] () [] [] [] [] |
298+ fileutils | [] [] [] |
299+ findutils | [] [] [] [] [] [] [] |
300+ flex | [] [] [] [] |
301+ fslint | |
302+ gas | [] |
303+ gawk | [] [] [] [] |
304+ gbiff | [] |
305+ gcal | [] |
306+ gcc | [] [] |
307+ gettext | [] [] [] [] [] |
308+ gettext-examples | [] [] [] [] |
309+ gettext-runtime | [] [] [] [] [] |
310+ gettext-tools | [] [] [] |
311+ gimp-print | [] [] [] [] [] |
312+ gliv | |
313+ glunarclock | [] [] |
314+ gnubiff | [] |
315+ gnucash | [] () [] [] |
316+ gnucash-glossary | [] () [] |
317+ gnupg | [] () [] [] [] [] |
318+ gpe-aerial | [] |
319+ gpe-beam | [] [] |
320+ gpe-calendar | [] [] |
321+ gpe-clock | [] [] |
322+ gpe-conf | [] [] |
323+ gpe-contacts | [] [] |
324+ gpe-edit | [] |
325+ gpe-go | [] |
326+ gpe-login | [] [] |
327+ gpe-ownerinfo | [] [] |
328+ gpe-sketchbook | [] [] |
329+ gpe-su | [] [] |
330+ gpe-taskmanager | [] [] |
331+ gpe-timesheet | [] |
332+ gpe-today | [] [] |
333+ gpe-todo | [] [] |
334+ gphoto2 | [] [] [] [] |
335+ gprof | [] [] [] |
336+ gpsdrive | () () () |
337+ gramadoir | [] |
338+ grep | [] [] [] [] [] [] |
339+ gretl | [] |
340+ gtick | [] () |
341+ hello | [] [] [] [] [] [] |
342+ id-utils | [] [] |
343+ indent | [] [] [] [] |
344+ iso_3166 | [] [] [] [] [] [] [] [] [] [] |
345+ iso_3166_1 | [] [] [] [] [] [] |
346+ iso_3166_2 | |
347+ iso_3166_3 | [] |
348+ iso_4217 | [] [] [] [] |
349+ iso_639 | |
350+ jpilot | [] [] [] |
351+ jtag | |
352+ jwhois | [] |
353+ kbd | [] [] [] [] [] |
354+ latrine | () |
355+ ld | [] [] |
356+ libc | [] [] [] [] [] [] |
357+ libgpewidget | [] [] |
358+ libiconv | [] [] [] [] [] |
359+ lifelines | [] () |
360+ lilypond | [] |
361+ lingoteach | |
362+ lingoteach_lessons | () () |
363+ lynx | [] [] [] [] |
364+ m4 | [] [] [] [] |
365+ mailutils | [] [] |
366+ make | [] [] [] |
367+ man-db | [] () [] [] () |
368+ minicom | [] [] [] |
369+ mysecretdiary | [] [] [] |
370+ nano | [] () [] [] [] |
371+ nano_1_0 | [] () [] [] [] |
372+ opcodes | [] |
373+ parted | [] [] [] [] [] |
374+ ptx | [] [] [] [] [] |
375+ python | |
376+ radius | [] |
377+ recode | [] [] [] [] [] [] [] |
378+ rpm | [] [] |
379+ screem | |
380+ scrollkeeper | [] [] [] [] [] [] |
381+ sed | [] [] [] [] [] [] |
382+ sh-utils | [] [] [] |
383+ shared-mime-info | |
384+ sharutils | [] [] [] [] [] [] |
385+ silky | () |
386+ skencil | [] () [] |
387+ sketch | [] () [] |
388+ soundtracker | [] [] [] |
389+ sp | [] |
390+ tar | [] [] [] [] |
391+ texinfo | [] [] [] |
392+ textutils | [] [] [] [] |
393+ tin | () () |
394+ tp-robot | |
395+ tuxpaint | [] [] [] [] [] [] [] |
396+ unicode-han-tra... | |
397+ unicode-transla... | |
398+ util-linux | [] [] [] [] [] |
399+ vorbis-tools | [] [] [] [] |
400+ wastesedge | () |
401+ wdiff | [] [] [] [] |
402+ wget | [] [] [] [] [] [] |
403+ xchat | [] [] [] [] |
404+ xfree86_xkb_xml | [] [] |
405+ xpad | [] |
406+ +----------------------------------------------------+
407+ af am ar az be bg bs ca cs da de el en en_GB eo es
408+ 4 0 0 1 9 4 1 40 41 60 78 17 1 5 13 68
409+
410+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
411+ +-------------------------------------------------+
412+ a2ps | [] [] [] () () |
413+ aegis | |
414+ ant-phone | [] |
415+ anubis | [] |
416+ ap-utils | [] |
417+ aspell | [] [] |
418+ bash | [] [] |
419+ batchelor | [] [] |
420+ bfd | [] |
421+ binutils | [] [] |
422+ bison | [] [] [] [] |
423+ bluez-pin | [] [] [] [] [] |
424+ clisp | |
425+ clisp | [] |
426+ console-tools | |
427+ coreutils | [] [] [] [] [] [] |
428+ cpio | [] [] [] [] |
429+ darkstat | () [] [] [] |
430+ diffutils | [] [] [] [] [] [] [] |
431+ e2fsprogs | |
432+ enscript | [] [] |
433+ error | [] [] [] [] |
434+ fetchmail | [] |
435+ fileutils | [] [] [] [] [] [] |
436+ findutils | [] [] [] [] [] [] [] [] [] [] [] |
437+ flex | [] [] [] |
438+ fslint | [] |
439+ gas | [] |
440+ gawk | [] [] [] |
441+ gbiff | [] |
442+ gcal | [] |
443+ gcc | [] |
444+ gettext | [] [] [] |
445+ gettext-examples | [] [] |
446+ gettext-runtime | [] [] [] [] [] |
447+ gettext-tools | [] [] [] |
448+ gimp-print | [] [] |
449+ gliv | () |
450+ glunarclock | [] [] [] [] |
451+ gnubiff | [] |
452+ gnucash | () [] |
453+ gnucash-glossary | [] |
454+ gnupg | [] [] [] [] [] [] [] |
455+ gpe-aerial | [] |
456+ gpe-beam | [] |
457+ gpe-calendar | [] [] [] |
458+ gpe-clock | [] |
459+ gpe-conf | [] |
460+ gpe-contacts | [] [] |
461+ gpe-edit | [] [] |
462+ gpe-go | [] |
463+ gpe-login | [] [] |
464+ gpe-ownerinfo | [] [] [] |
465+ gpe-sketchbook | [] |
466+ gpe-su | [] |
467+ gpe-taskmanager | [] |
468+ gpe-timesheet | [] [] [] |
469+ gpe-today | [] [] |
470+ gpe-todo | [] [] |
471+ gphoto2 | [] [] [] |
472+ gprof | [] [] |
473+ gpsdrive | () () () |
474+ gramadoir | [] [] |
475+ grep | [] [] [] [] [] [] [] [] [] [] [] |
476+ gretl | [] [] |
477+ gtick | [] [] [] |
478+ hello | [] [] [] [] [] [] [] [] [] [] [] [] [] |
479+ id-utils | [] [] [] [] |
480+ indent | [] [] [] [] [] [] [] [] [] |
481+ iso_3166 | [] [] [] [] [] [] [] |
482+ iso_3166_1 | [] [] [] [] [] |
483+ iso_3166_2 | |
484+ iso_3166_3 | |
485+ iso_4217 | [] [] [] [] [] [] |
486+ iso_639 | |
487+ jpilot | [] () |
488+ jtag | [] |
489+ jwhois | [] [] [] [] |
490+ kbd | [] |
491+ latrine | [] |
492+ ld | [] |
493+ libc | [] [] [] [] [] [] |
494+ libgpewidget | [] [] [] [] |
495+ libiconv | [] [] [] [] [] [] [] [] [] |
496+ lifelines | () |
497+ lilypond | [] |
498+ lingoteach | [] [] |
499+ lingoteach_lessons | |
500+ lynx | [] [] [] [] |
501+ m4 | [] [] [] [] |
502+ mailutils | |
503+ make | [] [] [] [] [] [] |
504+ man-db | () () |
505+ minicom | [] [] [] [] |
506+ mysecretdiary | [] [] |
507+ nano | [] [] [] [] |
508+ nano_1_0 | [] [] [] [] |
509+ opcodes | [] |
510+ parted | [] [] [] |
511+ ptx | [] [] [] [] [] [] [] |
512+ python | |
513+ radius | [] |
514+ recode | [] [] [] [] [] [] |
515+ rpm | [] [] |
516+ screem | |
517+ scrollkeeper | [] |
518+ sed | [] [] [] [] [] [] [] [] [] |
519+ sh-utils | [] [] [] [] [] [] [] |
520+ shared-mime-info | [] [] [] |
521+ sharutils | [] [] [] [] [] |
522+ silky | () [] () () |
523+ skencil | [] |
524+ sketch | [] |
525+ soundtracker | [] [] |
526+ sp | [] () |
527+ tar | [] [] [] [] [] [] [] [] [] |
528+ texinfo | [] [] [] [] |
529+ textutils | [] [] [] [] [] [] |
530+ tin | [] () |
531+ tp-robot | [] |
532+ tuxpaint | [] [] [] [] [] [] [] [] [] |
533+ unicode-han-tra... | |
534+ unicode-transla... | [] [] |
535+ util-linux | [] [] [] [] () [] |
536+ vorbis-tools | [] |
537+ wastesedge | () |
538+ wdiff | [] [] [] [] [] [] |
539+ wget | [] [] [] [] [] [] [] |
540+ xchat | [] [] [] |
541+ xfree86_xkb_xml | [] [] |
542+ xpad | [] [] |
543+ +-------------------------------------------------+
544+ et eu fa fi fr ga gl he hr hu id is it ja ko lg
545+ 22 2 1 26 106 28 24 8 10 41 33 1 26 33 12 0
546+
547+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
548+ +-----------------------------------------------------+
549+ a2ps | [] [] () () [] [] [] |
550+ aegis | () () () |
551+ ant-phone | [] [] |
552+ anubis | [] [] [] [] [] [] |
553+ ap-utils | [] () [] |
554+ aspell | [] |
555+ bash | [] [] [] |
556+ batchelor | [] |
557+ bfd | [] |
558+ binutils | [] |
559+ bison | [] [] [] [] [] |
560+ bluez-pin | [] [] [] |
561+ clisp | |
562+ clisp | [] |
563+ console-tools | [] |
564+ coreutils | [] [] |
565+ cpio | [] [] [] [] [] |
566+ darkstat | [] [] [] [] |
567+ diffutils | [] [] [] [] [] [] |
568+ e2fsprogs | [] |
569+ enscript | [] [] [] [] |
570+ error | [] [] [] |
571+ fetchmail | [] [] () [] |
572+ fileutils | [] [] [] |
573+ findutils | [] [] [] [] [] |
574+ flex | [] [] [] [] |
575+ fslint | [] [] |
576+ gas | |
577+ gawk | [] [] [] |
578+ gbiff | [] [] |
579+ gcal | |
580+ gcc | |
581+ gettext | [] [] [] |
582+ gettext-examples | [] [] [] |
583+ gettext-runtime | [] [] [] [] |
584+ gettext-tools | [] [] |
585+ gimp-print | [] |
586+ gliv | [] [] [] |
587+ glunarclock | [] [] [] [] |
588+ gnubiff | [] |
589+ gnucash | [] [] () [] |
590+ gnucash-glossary | [] [] |
591+ gnupg | [] |
592+ gpe-aerial | [] [] [] [] |
593+ gpe-beam | [] [] [] [] |
594+ gpe-calendar | [] [] [] [] |
595+ gpe-clock | [] [] [] [] |
596+ gpe-conf | [] [] [] [] |
597+ gpe-contacts | [] [] [] [] |
598+ gpe-edit | [] [] [] [] |
599+ gpe-go | [] [] [] |
600+ gpe-login | [] [] [] [] |
601+ gpe-ownerinfo | [] [] [] [] |
602+ gpe-sketchbook | [] [] [] [] |
603+ gpe-su | [] [] [] [] |
604+ gpe-taskmanager | [] [] [] [] |
605+ gpe-timesheet | [] [] [] [] |
606+ gpe-today | [] [] [] [] |
607+ gpe-todo | [] [] [] [] |
608+ gphoto2 | [] |
609+ gprof | [] [] |
610+ gpsdrive | () () [] |
611+ gramadoir | () [] |
612+ grep | [] [] [] [] [] |
613+ gretl | |
614+ gtick | [] [] [] |
615+ hello | [] [] [] [] [] [] [] [] [] [] |
616+ id-utils | [] [] [] [] |
617+ indent | [] [] [] [] |
618+ iso_3166 | [] [] [] |
619+ iso_3166_1 | [] [] |
620+ iso_3166_2 | |
621+ iso_3166_3 | [] |
622+ iso_4217 | [] [] [] [] [] [] [] [] |
623+ iso_639 | [] |
624+ jpilot | () () |
625+ jtag | |
626+ jwhois | [] [] [] [] () |
627+ kbd | [] [] [] |
628+ latrine | [] |
629+ ld | |
630+ libc | [] [] [] [] |
631+ libgpewidget | [] [] [] |
632+ libiconv | [] [] [] [] [] |
633+ lifelines | |
634+ lilypond | |
635+ lingoteach | |
636+ lingoteach_lessons | |
637+ lynx | [] [] [] |
638+ m4 | [] [] [] [] [] |
639+ mailutils | [] [] [] |
640+ make | [] [] [] [] |
641+ man-db | [] |
642+ minicom | [] [] [] [] |
643+ mysecretdiary | [] [] [] |
644+ nano | [] [] [] [] [] |
645+ nano_1_0 | [] [] [] [] [] [] |
646+ opcodes | [] [] |
647+ parted | [] [] [] [] |
648+ ptx | [] [] [] [] [] [] [] [] |
649+ python | |
650+ radius | [] [] |
651+ recode | [] [] [] [] |
652+ rpm | [] [] [] |
653+ screem | |
654+ scrollkeeper | [] [] [] [] [] |
655+ sed | [] [] [] |
656+ sh-utils | [] [] |
657+ shared-mime-info | [] [] |
658+ sharutils | [] [] |
659+ silky | () |
660+ skencil | [] [] |
661+ sketch | [] [] |
662+ soundtracker | |
663+ sp | |
664+ tar | [] [] [] [] [] [] |
665+ texinfo | [] [] [] [] |
666+ textutils | [] [] |
667+ tin | |
668+ tp-robot | [] |
669+ tuxpaint | [] [] [] [] [] [] [] [] |
670+ unicode-han-tra... | |
671+ unicode-transla... | |
672+ util-linux | [] [] [] |
673+ vorbis-tools | [] [] [] |
674+ wastesedge | |
675+ wdiff | [] [] [] [] [] |
676+ wget | [] [] [] |
677+ xchat | [] [] [] |
678+ xfree86_xkb_xml | [] [] |
679+ xpad | [] [] |
680+ +-----------------------------------------------------+
681+ lt lv mk mn ms mt nb nl nn no nso pl pt pt_BR ro ru
682+ 1 2 0 3 12 0 10 69 6 7 1 40 26 36 76 63
683+
684+ sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
685+ +-----------------------------------------------------+
686+ a2ps | [] [] [] [] | 16
687+ aegis | | 0
688+ ant-phone | | 3
689+ anubis | [] [] | 9
690+ ap-utils | () | 3
691+ aspell | | 4
692+ bash | | 9
693+ batchelor | | 3
694+ bfd | [] [] | 6
695+ binutils | [] [] [] | 8
696+ bison | [] [] | 14
697+ bluez-pin | [] [] [] | 14
698+ clisp | | 0
699+ clisp | | 5
700+ console-tools | | 3
701+ coreutils | [] [] [] [] | 16
702+ cpio | [] [] | 14
703+ darkstat | [] [] [] () () | 12
704+ diffutils | [] [] [] | 23
705+ e2fsprogs | [] [] | 6
706+ enscript | [] [] | 12
707+ error | [] [] [] | 15
708+ fetchmail | [] [] | 11
709+ fileutils | [] [] [] [] [] | 17
710+ findutils | [] [] [] [] [] [] | 29
711+ flex | [] [] | 13
712+ fslint | | 3
713+ gas | [] | 3
714+ gawk | [] [] | 12
715+ gbiff | | 4
716+ gcal | [] [] | 4
717+ gcc | [] | 4
718+ gettext | [] [] [] [] [] | 16
719+ gettext-examples | [] [] [] [] [] | 14
720+ gettext-runtime | [] [] [] [] [] [] [] [] | 22
721+ gettext-tools | [] [] [] [] [] [] | 14
722+ gimp-print | [] [] | 10
723+ gliv | | 3
724+ glunarclock | [] [] [] | 13
725+ gnubiff | | 3
726+ gnucash | [] [] | 9
727+ gnucash-glossary | [] [] [] | 8
728+ gnupg | [] [] [] [] | 17
729+ gpe-aerial | [] | 7
730+ gpe-beam | [] | 8
731+ gpe-calendar | [] [] [] [] | 13
732+ gpe-clock | [] [] [] | 10
733+ gpe-conf | [] [] | 9
734+ gpe-contacts | [] [] [] | 11
735+ gpe-edit | [] [] [] [] [] | 12
736+ gpe-go | | 5
737+ gpe-login | [] [] [] [] [] | 13
738+ gpe-ownerinfo | [] [] [] [] | 13
739+ gpe-sketchbook | [] [] | 9
740+ gpe-su | [] [] [] | 10
741+ gpe-taskmanager | [] [] [] | 10
742+ gpe-timesheet | [] [] [] [] | 12
743+ gpe-today | [] [] [] [] [] | 13
744+ gpe-todo | [] [] [] [] | 12
745+ gphoto2 | [] [] [] | 11
746+ gprof | [] [] | 9
747+ gpsdrive | [] [] | 3
748+ gramadoir | [] | 5
749+ grep | [] [] [] [] | 26
750+ gretl | | 3
751+ gtick | | 7
752+ hello | [] [] [] [] [] | 34
753+ id-utils | [] [] | 12
754+ indent | [] [] [] [] | 21
755+ iso_3166 | [] [] [] [] [] [] [] | 27
756+ iso_3166_1 | [] [] [] | 16
757+ iso_3166_2 | | 0
758+ iso_3166_3 | | 2
759+ iso_4217 | [] [] [] [] [] [] | 24
760+ iso_639 | | 1
761+ jpilot | [] [] [] [] [] | 9
762+ jtag | [] | 2
763+ jwhois | () [] [] | 11
764+ kbd | [] [] | 11
765+ latrine | | 2
766+ ld | [] [] | 5
767+ libc | [] [] [] [] | 20
768+ libgpewidget | [] [] [] [] | 13
769+ libiconv | [] [] [] [] [] [] [] [] | 27
770+ lifelines | [] | 2
771+ lilypond | [] | 3
772+ lingoteach | | 2
773+ lingoteach_lessons | () | 0
774+ lynx | [] [] [] | 14
775+ m4 | [] [] | 15
776+ mailutils | | 5
777+ make | [] [] [] | 16
778+ man-db | [] | 5
779+ minicom | | 11
780+ mysecretdiary | [] [] | 10
781+ nano | [] [] [] [] | 17
782+ nano_1_0 | [] [] [] | 17
783+ opcodes | [] [] | 6
784+ parted | [] [] [] | 15
785+ ptx | [] [] | 22
786+ python | | 0
787+ radius | | 4
788+ recode | [] [] [] | 20
789+ rpm | [] [] | 9
790+ screem | [] [] | 2
791+ scrollkeeper | [] [] [] | 15
792+ sed | [] [] [] [] [] [] | 24
793+ sh-utils | [] [] | 14
794+ shared-mime-info | [] [] | 7
795+ sharutils | [] [] [] [] | 17
796+ silky | () | 3
797+ skencil | [] | 6
798+ sketch | [] | 6
799+ soundtracker | [] [] | 7
800+ sp | [] | 3
801+ tar | [] [] [] [] [] | 24
802+ texinfo | [] [] [] | 14
803+ textutils | [] [] [] [] | 16
804+ tin | | 1
805+ tp-robot | | 2
806+ tuxpaint | [] [] [] [] [] | 29
807+ unicode-han-tra... | | 0
808+ unicode-transla... | | 2
809+ util-linux | [] [] | 15
810+ vorbis-tools | | 8
811+ wastesedge | | 0
812+ wdiff | [] [] [] | 18
813+ wget | [] [] [] [] [] [] [] [] | 24
814+ xchat | [] [] [] [] [] | 15
815+ xfree86_xkb_xml | [] [] [] [] [] | 11
816+ xpad | | 5
817+ +-----------------------------------------------------+
818+ 63 teams sk sl sr sv ta th tr uk ven vi wa xh zh_CN zh_TW zu
819+ 131 domains 47 19 28 83 0 0 59 13 1 1 11 0 22 22 0 1373
820
821 Some counters in the preceding matrix are higher than the number of
822 visible blocks let us expect. This is because a few extra PO files are
823@@ -220,6 +742,27 @@
824 lag between the mere existence a PO file and its wide availability in a
825 distribution.
826
827- If August 1997 seems to be old, you may fetch a more recent copy of
828-this `ABOUT-NLS' file on most GNU archive sites.
829+ If January 2004 seems to be old, you may fetch a more recent copy of
830+this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
831+matrix with full percentage details can be found at
832+`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
833+
834+Using `gettext' in new packages
835+===============================
836+
837+If you are writing a freely available program and want to
838+internationalize it you are welcome to use GNU `gettext' in your
839+package. Of course you have to respect the GNU Library General Public
840+License which covers the use of the GNU `gettext' library. This means
841+in particular that even non-free programs can use `libintl' as a shared
842+library, whereas only free software can use `libintl' as a static
843+library or use modified versions of `libintl'.
844+
845+ Once the sources are changed appropriately and the setup can handle
846+the use of `gettext' the only thing missing are the translations. The
847+Free Translation Project is also available for packages which are not
848+developed inside the GNU project. Therefore the information given above
849+applies also for every other Free Software Project. Contact
850+`translation@iro.umontreal.ca' to make the `.pot' files available to
851+the translation teams.
852
853--- lrzsz-0.12.20.safe/ChangeLog 1998-12-29 17:49:56.000000000 -0500
854+++ lrzsz-0.12.20/ChangeLog 2004-09-12 14:40:35.846521456 -0400
855@@ -1,3 +1,11 @@
856+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
857+
858+ * Makefile.am (ACLOCAL_AMFLAGS): New variable.
859+ (EXTRA_DIST): Add config.rpath.
860+ * configure.in (AC_OUTPUT): Add m4/Makefile.
861+ (AC_OUTPUT): Remove command that created po/Makefile.
862+ (AC_LINK_FILES): Remove invocation.
863+
864 1998-12-29 Uwe Ohse <uwe@ohse.de>
865
866 * src/lrz.c: removed stpcpy call.
867--- lrzsz-0.12.20.safe/config.rpath 1969-12-31 19:00:00.000000000 -0500
868+++ lrzsz-0.12.20/config.rpath 2004-09-12 14:40:34.329752040 -0400
869@@ -0,0 +1,548 @@
870+#! /bin/sh
871+# Output a system dependent set of variables, describing how to set the
872+# run time search path of shared libraries in an executable.
873+#
874+# Copyright 1996-2003 Free Software Foundation, Inc.
875+# Taken from GNU libtool, 2001
876+# Originally by Gordon Matzigkeit <gord@gnu.ai.mit.edu>, 1996
877+#
878+# This program is free software; you can redistribute it and/or modify
879+# it under the terms of the GNU General Public License as published by
880+# the Free Software Foundation; either version 2 of the License, or
881+# (at your option) any later version.
882+#
883+# This program is distributed in the hope that it will be useful, but
884+# WITHOUT ANY WARRANTY; without even the implied warranty of
885+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
886+# General Public License for more details.
887+#
888+# You should have received a copy of the GNU General Public License
889+# along with this program; if not, write to the Free Software
890+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
891+#
892+# As a special exception to the GNU General Public License, if you
893+# distribute this file as part of a program that contains a
894+# configuration script generated by Autoconf, you may include it under
895+# the same distribution terms that you use for the rest of that program.
896+#
897+# The first argument passed to this file is the canonical host specification,
898+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
899+# or
900+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
901+# The environment variables CC, GCC, LDFLAGS, LD, with_gnu_ld
902+# should be set by the caller.
903+#
904+# The set of defined variables is at the end of this script.
905+
906+# Known limitations:
907+# - On IRIX 6.5 with CC="cc", the run time search patch must not be longer
908+# than 256 bytes, otherwise the compiler driver will dump core. The only
909+# known workaround is to choose shorter directory names for the build
910+# directory and/or the installation directory.
911+
912+# All known linkers require a `.a' archive for static linking (except M$VC,
913+# which needs '.lib').
914+libext=a
915+shrext=.so
916+
917+host="$1"
918+host_cpu=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
919+host_vendor=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
920+host_os=`echo "$host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
921+
922+# Code taken from libtool.m4's AC_LIBTOOL_PROG_COMPILER_PIC.
923+
924+wl=
925+if test "$GCC" = yes; then
926+ wl='-Wl,'
927+else
928+ case "$host_os" in
929+ aix*)
930+ wl='-Wl,'
931+ ;;
932+ mingw* | pw32* | os2*)
933+ ;;
934+ hpux9* | hpux10* | hpux11*)
935+ wl='-Wl,'
936+ ;;
937+ irix5* | irix6* | nonstopux*)
938+ wl='-Wl,'
939+ ;;
940+ newsos6)
941+ ;;
942+ linux*)
943+ case $CC in
944+ icc|ecc)
945+ wl='-Wl,'
946+ ;;
947+ ccc)
948+ wl='-Wl,'
949+ ;;
950+ esac
951+ ;;
952+ osf3* | osf4* | osf5*)
953+ wl='-Wl,'
954+ ;;
955+ sco3.2v5*)
956+ ;;
957+ solaris*)
958+ wl='-Wl,'
959+ ;;
960+ sunos4*)
961+ wl='-Qoption ld '
962+ ;;
963+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
964+ wl='-Wl,'
965+ ;;
966+ sysv4*MP*)
967+ ;;
968+ uts4*)
969+ ;;
970+ esac
971+fi
972+
973+# Code taken from libtool.m4's AC_LIBTOOL_PROG_LD_SHLIBS.
974+
975+hardcode_libdir_flag_spec=
976+hardcode_libdir_separator=
977+hardcode_direct=no
978+hardcode_minus_L=no
979+
980+case "$host_os" in
981+ cygwin* | mingw* | pw32*)
982+ # FIXME: the MSVC++ port hasn't been tested in a loooong time
983+ # When not using gcc, we currently assume that we are using
984+ # Microsoft Visual C++.
985+ if test "$GCC" != yes; then
986+ with_gnu_ld=no
987+ fi
988+ ;;
989+ openbsd*)
990+ with_gnu_ld=no
991+ ;;
992+esac
993+
994+ld_shlibs=yes
995+if test "$with_gnu_ld" = yes; then
996+ case "$host_os" in
997+ aix3* | aix4* | aix5*)
998+ # On AIX/PPC, the GNU linker is very broken
999+ if test "$host_cpu" != ia64; then
1000+ ld_shlibs=no
1001+ fi
1002+ ;;
1003+ amigaos*)
1004+ hardcode_libdir_flag_spec='-L$libdir'
1005+ hardcode_minus_L=yes
1006+ # Samuel A. Falvo II <kc5tja@dolphin.openprojects.net> reports
1007+ # that the semantics of dynamic libraries on AmigaOS, at least up
1008+ # to version 4, is to share data among multiple programs linked
1009+ # with the same dynamic library. Since this doesn't match the
1010+ # behavior of shared libraries on other platforms, we can use
1011+ # them.
1012+ ld_shlibs=no
1013+ ;;
1014+ beos*)
1015+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1016+ :
1017+ else
1018+ ld_shlibs=no
1019+ fi
1020+ ;;
1021+ cygwin* | mingw* | pw32*)
1022+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1023+ # no search path for DLLs.
1024+ hardcode_libdir_flag_spec='-L$libdir'
1025+ if $LD --help 2>&1 | grep 'auto-import' > /dev/null; then
1026+ :
1027+ else
1028+ ld_shlibs=no
1029+ fi
1030+ ;;
1031+ netbsd*)
1032+ ;;
1033+ solaris* | sysv5*)
1034+ if $LD -v 2>&1 | grep 'BFD 2\.8' > /dev/null; then
1035+ ld_shlibs=no
1036+ elif $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1037+ :
1038+ else
1039+ ld_shlibs=no
1040+ fi
1041+ ;;
1042+ sunos4*)
1043+ hardcode_direct=yes
1044+ ;;
1045+ *)
1046+ if $LD --help 2>&1 | grep ': supported targets:.* elf' > /dev/null; then
1047+ :
1048+ else
1049+ ld_shlibs=no
1050+ fi
1051+ ;;
1052+ esac
1053+ if test "$ld_shlibs" = yes; then
1054+ # Unlike libtool, we use -rpath here, not --rpath, since the documented
1055+ # option of GNU ld is called -rpath, not --rpath.
1056+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1057+ fi
1058+else
1059+ case "$host_os" in
1060+ aix3*)
1061+ # Note: this linker hardcodes the directories in LIBPATH if there
1062+ # are no directories specified by -L.
1063+ hardcode_minus_L=yes
1064+ if test "$GCC" = yes; then
1065+ # Neither direct hardcoding nor static linking is supported with a
1066+ # broken collect2.
1067+ hardcode_direct=unsupported
1068+ fi
1069+ ;;
1070+ aix4* | aix5*)
1071+ if test "$host_cpu" = ia64; then
1072+ # On IA64, the linker does run time linking by default, so we don't
1073+ # have to do anything special.
1074+ aix_use_runtimelinking=no
1075+ else
1076+ aix_use_runtimelinking=no
1077+ # Test if we are trying to use run time linking or normal
1078+ # AIX style linking. If -brtl is somewhere in LDFLAGS, we
1079+ # need to do runtime linking.
1080+ case $host_os in aix4.[23]|aix4.[23].*|aix5*)
1081+ for ld_flag in $LDFLAGS; do
1082+ if (test $ld_flag = "-brtl" || test $ld_flag = "-Wl,-brtl"); then
1083+ aix_use_runtimelinking=yes
1084+ break
1085+ fi
1086+ done
1087+ esac
1088+ fi
1089+ hardcode_direct=yes
1090+ hardcode_libdir_separator=':'
1091+ if test "$GCC" = yes; then
1092+ case $host_os in aix4.[012]|aix4.[012].*)
1093+ collect2name=`${CC} -print-prog-name=collect2`
1094+ if test -f "$collect2name" && \
1095+ strings "$collect2name" | grep resolve_lib_name >/dev/null
1096+ then
1097+ # We have reworked collect2
1098+ hardcode_direct=yes
1099+ else
1100+ # We have old collect2
1101+ hardcode_direct=unsupported
1102+ hardcode_minus_L=yes
1103+ hardcode_libdir_flag_spec='-L$libdir'
1104+ hardcode_libdir_separator=
1105+ fi
1106+ esac
1107+ fi
1108+ # Begin _LT_AC_SYS_LIBPATH_AIX.
1109+ echo 'int main () { return 0; }' > conftest.c
1110+ ${CC} ${LDFLAGS} conftest.c -o conftest
1111+ aix_libpath=`dump -H conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1112+}'`
1113+ if test -z "$aix_libpath"; then
1114+ aix_libpath=`dump -HX64 conftest 2>/dev/null | sed -n -e '/Import File Strings/,/^$/ { /^0/ { s/^0 *\(.*\)$/\1/; p; }
1115+}'`
1116+ fi
1117+ if test -z "$aix_libpath"; then
1118+ aix_libpath="/usr/lib:/lib"
1119+ fi
1120+ rm -f conftest.c conftest
1121+ # End _LT_AC_SYS_LIBPATH_AIX.
1122+ if test "$aix_use_runtimelinking" = yes; then
1123+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1124+ else
1125+ if test "$host_cpu" = ia64; then
1126+ hardcode_libdir_flag_spec='${wl}-R $libdir:/usr/lib:/lib'
1127+ else
1128+ hardcode_libdir_flag_spec='${wl}-blibpath:$libdir:'"$aix_libpath"
1129+ fi
1130+ fi
1131+ ;;
1132+ amigaos*)
1133+ hardcode_libdir_flag_spec='-L$libdir'
1134+ hardcode_minus_L=yes
1135+ # see comment about different semantics on the GNU ld section
1136+ ld_shlibs=no
1137+ ;;
1138+ bsdi4*)
1139+ ;;
1140+ cygwin* | mingw* | pw32*)
1141+ # When not using gcc, we currently assume that we are using
1142+ # Microsoft Visual C++.
1143+ # hardcode_libdir_flag_spec is actually meaningless, as there is
1144+ # no search path for DLLs.
1145+ hardcode_libdir_flag_spec=' '
1146+ libext=lib
1147+ ;;
1148+ darwin* | rhapsody*)
1149+ if $CC -v 2>&1 | grep 'Apple' >/dev/null ; then
1150+ hardcode_direct=no
1151+ fi
1152+ ;;
1153+ dgux*)
1154+ hardcode_libdir_flag_spec='-L$libdir'
1155+ ;;
1156+ freebsd1*)
1157+ ld_shlibs=no
1158+ ;;
1159+ freebsd2.2*)
1160+ hardcode_libdir_flag_spec='-R$libdir'
1161+ hardcode_direct=yes
1162+ ;;
1163+ freebsd2*)
1164+ hardcode_direct=yes
1165+ hardcode_minus_L=yes
1166+ ;;
1167+ freebsd*)
1168+ hardcode_libdir_flag_spec='-R$libdir'
1169+ hardcode_direct=yes
1170+ ;;
1171+ hpux9*)
1172+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1173+ hardcode_libdir_separator=:
1174+ hardcode_direct=yes
1175+ # hardcode_minus_L: Not really in the search PATH,
1176+ # but as the default location of the library.
1177+ hardcode_minus_L=yes
1178+ ;;
1179+ hpux10* | hpux11*)
1180+ if test "$with_gnu_ld" = no; then
1181+ case "$host_cpu" in
1182+ hppa*64*)
1183+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1184+ hardcode_libdir_separator=:
1185+ hardcode_direct=no
1186+ ;;
1187+ ia64*)
1188+ hardcode_libdir_flag_spec='-L$libdir'
1189+ hardcode_direct=no
1190+ # hardcode_minus_L: Not really in the search PATH,
1191+ # but as the default location of the library.
1192+ hardcode_minus_L=yes
1193+ ;;
1194+ *)
1195+ hardcode_libdir_flag_spec='${wl}+b ${wl}$libdir'
1196+ hardcode_libdir_separator=:
1197+ hardcode_direct=yes
1198+ # hardcode_minus_L: Not really in the search PATH,
1199+ # but as the default location of the library.
1200+ hardcode_minus_L=yes
1201+ ;;
1202+ esac
1203+ fi
1204+ ;;
1205+ irix5* | irix6* | nonstopux*)
1206+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1207+ hardcode_libdir_separator=:
1208+ ;;
1209+ netbsd*)
1210+ hardcode_libdir_flag_spec='-R$libdir'
1211+ hardcode_direct=yes
1212+ ;;
1213+ newsos6)
1214+ hardcode_direct=yes
1215+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1216+ hardcode_libdir_separator=:
1217+ ;;
1218+ openbsd*)
1219+ hardcode_direct=yes
1220+ if test -z "`echo __ELF__ | $CC -E - | grep __ELF__`" || test "$host_os-$host_cpu" = "openbsd2.8-powerpc"; then
1221+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1222+ else
1223+ case "$host_os" in
1224+ openbsd[01].* | openbsd2.[0-7] | openbsd2.[0-7].*)
1225+ hardcode_libdir_flag_spec='-R$libdir'
1226+ ;;
1227+ *)
1228+ hardcode_libdir_flag_spec='${wl}-rpath,$libdir'
1229+ ;;
1230+ esac
1231+ fi
1232+ ;;
1233+ os2*)
1234+ hardcode_libdir_flag_spec='-L$libdir'
1235+ hardcode_minus_L=yes
1236+ ;;
1237+ osf3*)
1238+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1239+ hardcode_libdir_separator=:
1240+ ;;
1241+ osf4* | osf5*)
1242+ if test "$GCC" = yes; then
1243+ hardcode_libdir_flag_spec='${wl}-rpath ${wl}$libdir'
1244+ else
1245+ # Both cc and cxx compiler support -rpath directly
1246+ hardcode_libdir_flag_spec='-rpath $libdir'
1247+ fi
1248+ hardcode_libdir_separator=:
1249+ ;;
1250+ sco3.2v5*)
1251+ ;;
1252+ solaris*)
1253+ hardcode_libdir_flag_spec='-R$libdir'
1254+ ;;
1255+ sunos4*)
1256+ hardcode_libdir_flag_spec='-L$libdir'
1257+ hardcode_direct=yes
1258+ hardcode_minus_L=yes
1259+ ;;
1260+ sysv4)
1261+ case $host_vendor in
1262+ sni)
1263+ hardcode_direct=yes # is this really true???
1264+ ;;
1265+ siemens)
1266+ hardcode_direct=no
1267+ ;;
1268+ motorola)
1269+ hardcode_direct=no #Motorola manual says yes, but my tests say they lie
1270+ ;;
1271+ esac
1272+ ;;
1273+ sysv4.3*)
1274+ ;;
1275+ sysv4*MP*)
1276+ if test -d /usr/nec; then
1277+ ld_shlibs=yes
1278+ fi
1279+ ;;
1280+ sysv4.2uw2*)
1281+ hardcode_direct=yes
1282+ hardcode_minus_L=no
1283+ ;;
1284+ sysv5OpenUNIX8* | sysv5UnixWare7* | sysv5uw[78]* | unixware7*)
1285+ ;;
1286+ sysv5*)
1287+ hardcode_libdir_flag_spec=
1288+ ;;
1289+ uts4*)
1290+ hardcode_libdir_flag_spec='-L$libdir'
1291+ ;;
1292+ *)
1293+ ld_shlibs=no
1294+ ;;
1295+ esac
1296+fi
1297+
1298+# Check dynamic linker characteristics
1299+# Code taken from libtool.m4's AC_LIBTOOL_SYS_DYNAMIC_LINKER.
1300+libname_spec='lib$name'
1301+case "$host_os" in
1302+ aix3*)
1303+ ;;
1304+ aix4* | aix5*)
1305+ ;;
1306+ amigaos*)
1307+ ;;
1308+ beos*)
1309+ ;;
1310+ bsdi4*)
1311+ ;;
1312+ cygwin* | mingw* | pw32*)
1313+ shrext=.dll
1314+ ;;
1315+ darwin* | rhapsody*)
1316+ shrext=.dylib
1317+ ;;
1318+ dgux*)
1319+ ;;
1320+ freebsd1*)
1321+ ;;
1322+ freebsd*)
1323+ ;;
1324+ gnu*)
1325+ ;;
1326+ hpux9* | hpux10* | hpux11*)
1327+ case "$host_cpu" in
1328+ ia64*)
1329+ shrext=.so
1330+ ;;
1331+ hppa*64*)
1332+ shrext=.sl
1333+ ;;
1334+ *)
1335+ shrext=.sl
1336+ ;;
1337+ esac
1338+ ;;
1339+ irix5* | irix6* | nonstopux*)
1340+ case "$host_os" in
1341+ irix5* | nonstopux*)
1342+ libsuff= shlibsuff=
1343+ ;;
1344+ *)
1345+ case $LD in
1346+ *-32|*"-32 "|*-melf32bsmip|*"-melf32bsmip ") libsuff= shlibsuff= ;;
1347+ *-n32|*"-n32 "|*-melf32bmipn32|*"-melf32bmipn32 ") libsuff=32 shlibsuff=N32 ;;
1348+ *-64|*"-64 "|*-melf64bmip|*"-melf64bmip ") libsuff=64 shlibsuff=64 ;;
1349+ *) libsuff= shlibsuff= ;;
1350+ esac
1351+ ;;
1352+ esac
1353+ ;;
1354+ linux*oldld* | linux*aout* | linux*coff*)
1355+ ;;
1356+ linux*)
1357+ ;;
1358+ netbsd*)
1359+ ;;
1360+ newsos6)
1361+ ;;
1362+ nto-qnx)
1363+ ;;
1364+ openbsd*)
1365+ ;;
1366+ os2*)
1367+ libname_spec='$name'
1368+ shrext=.dll
1369+ ;;
1370+ osf3* | osf4* | osf5*)
1371+ ;;
1372+ sco3.2v5*)
1373+ ;;
1374+ solaris*)
1375+ ;;
1376+ sunos4*)
1377+ ;;
1378+ sysv4 | sysv4.2uw2* | sysv4.3* | sysv5*)
1379+ ;;
1380+ sysv4*MP*)
1381+ ;;
1382+ uts4*)
1383+ ;;
1384+esac
1385+
1386+sed_quote_subst='s/\(["`$\\]\)/\\\1/g'
1387+escaped_wl=`echo "X$wl" | sed -e 's/^X//' -e "$sed_quote_subst"`
1388+shlibext=`echo "$shrext" | sed -e 's,^\.,,'`
1389+escaped_hardcode_libdir_flag_spec=`echo "X$hardcode_libdir_flag_spec" | sed -e 's/^X//' -e "$sed_quote_subst"`
1390+
1391+sed -e 's/^\([a-zA-Z0-9_]*\)=/acl_cv_\1=/' <<EOF
1392+
1393+# How to pass a linker flag through the compiler.
1394+wl="$escaped_wl"
1395+
1396+# Static library suffix (normally "a").
1397+libext="$libext"
1398+
1399+# Shared library suffix (normally "so").
1400+shlibext="$shlibext"
1401+
1402+# Flag to hardcode \$libdir into a binary during linking.
1403+# This must work even if \$libdir does not exist.
1404+hardcode_libdir_flag_spec="$escaped_hardcode_libdir_flag_spec"
1405+
1406+# Whether we need a single -rpath flag with a separated argument.
1407+hardcode_libdir_separator="$hardcode_libdir_separator"
1408+
1409+# Set to yes if using DIR/libNAME.so during linking hardcodes DIR into the
1410+# resulting binary.
1411+hardcode_direct="$hardcode_direct"
1412+
1413+# Set to yes if using the -LDIR flag during linking hardcodes DIR into the
1414+# resulting binary.
1415+hardcode_minus_L="$hardcode_minus_L"
1416+
1417+EOF
1418--- lrzsz-0.12.20.safe/configure.in 2004-09-12 14:39:55.161706488 -0400
1419+++ lrzsz-0.12.20/configure.in 2004-09-12 14:40:35.816526016 -0400
1420@@ -260,11 +260,10 @@
1421 AM_GNU_GETTEXT
1422
1423 AC_DEFINE_UNQUOTED(LOCALEDIR,"$prefix/$DATADIRNAME")
1424-AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
1425
1426-AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile \
1427+AC_OUTPUT([Makefile intl/Makefile lib/Makefile testsuite/Makefile m4/Makefile \
1428 man/Makefile po/Makefile.in src/Makefile debian/rules Specfile systype \
1429 src/lrzszbug],
1430-[sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile;
1431+[
1432 chmod +x debian/rules;
1433 test -z "$CONFIG_HEADERS" || echo timestamp > stamp-h])
1434--- lrzsz-0.12.20.safe/intl/bindtextdom.c 1998-04-26 09:22:36.000000000 -0400
1435+++ lrzsz-0.12.20/intl/bindtextdom.c 2004-09-12 14:40:34.343749912 -0400
1436@@ -1,59 +1,75 @@
1437 /* Implementation of the bindtextdomain(3) function
1438- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
1439+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
1440
1441- This program is free software; you can redistribute it and/or modify
1442- it under the terms of the GNU General Public License as published by
1443- the Free Software Foundation; either version 2, or (at your option)
1444+ This program is free software; you can redistribute it and/or modify it
1445+ under the terms of the GNU Library General Public License as published
1446+ by the Free Software Foundation; either version 2, or (at your option)
1447 any later version.
1448
1449 This program is distributed in the hope that it will be useful,
1450 but WITHOUT ANY WARRANTY; without even the implied warranty of
1451- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1452- GNU General Public License for more details.
1453+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
1454+ Library General Public License for more details.
1455
1456- You should have received a copy of the GNU General Public License
1457- along with this program; if not, write to the Free Software Foundation,
1458- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1459+ You should have received a copy of the GNU Library General Public
1460+ License along with this program; if not, write to the Free Software
1461+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
1462+ USA. */
1463
1464 #ifdef HAVE_CONFIG_H
1465 # include <config.h>
1466 #endif
1467
1468-#if defined STDC_HEADERS || defined _LIBC
1469-# include <stdlib.h>
1470-#else
1471-# ifdef HAVE_MALLOC_H
1472-# include <malloc.h>
1473-# else
1474-void free ();
1475-# endif
1476-#endif
1477+#include <stddef.h>
1478+#include <stdlib.h>
1479+#include <string.h>
1480
1481-#if defined HAVE_STRING_H || defined _LIBC
1482-# include <string.h>
1483+#ifdef _LIBC
1484+# include <libintl.h>
1485 #else
1486-# include <strings.h>
1487-# ifndef memcpy
1488-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
1489-# endif
1490+# include "libgnuintl.h"
1491 #endif
1492+#include "gettextP.h"
1493
1494 #ifdef _LIBC
1495-# include <libintl.h>
1496+/* We have to handle multi-threaded applications. */
1497+# include <bits/libc-lock.h>
1498 #else
1499-# include "libgettext.h"
1500+/* Provide dummy implementation if this is outside glibc. */
1501+# define __libc_rwlock_define(CLASS, NAME)
1502+# define __libc_rwlock_wrlock(NAME)
1503+# define __libc_rwlock_unlock(NAME)
1504+#endif
1505+
1506+/* The internal variables in the standalone libintl.a must have different
1507+ names than the internal variables in GNU libc, otherwise programs
1508+ using libintl.a cannot be linked statically. */
1509+#if !defined _LIBC
1510+# define _nl_default_dirname libintl_nl_default_dirname
1511+# define _nl_domain_bindings libintl_nl_domain_bindings
1512+#endif
1513+
1514+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
1515+#ifndef offsetof
1516+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
1517 #endif
1518-#include "gettext.h"
1519-#include "gettextP.h"
1520
1521 /* @@ end of prolog @@ */
1522
1523 /* Contains the default location of the message catalogs. */
1524 extern const char _nl_default_dirname[];
1525+#ifdef _LIBC
1526+extern const char _nl_default_dirname_internal[] attribute_hidden;
1527+#else
1528+# define INTUSE(name) name
1529+#endif
1530
1531 /* List with bindings of specific domains. */
1532 extern struct binding *_nl_domain_bindings;
1533
1534+/* Lock variable to protect the global data in the gettext implementation. */
1535+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
1536+
1537
1538 /* Names for the libintl functions are a problem. They must not clash
1539 with existing names and they should follow ANSI C. But this source
1540@@ -61,23 +77,41 @@
1541 prefix. So we have to make a difference here. */
1542 #ifdef _LIBC
1543 # define BINDTEXTDOMAIN __bindtextdomain
1544-# define strdup(str) __strdup (str)
1545+# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
1546+# ifndef strdup
1547+# define strdup(str) __strdup (str)
1548+# endif
1549 #else
1550-# define BINDTEXTDOMAIN bindtextdomain__
1551+# define BINDTEXTDOMAIN libintl_bindtextdomain
1552+# define BIND_TEXTDOMAIN_CODESET libintl_bind_textdomain_codeset
1553 #endif
1554
1555-/* Specify that the DOMAINNAME message catalog will be found
1556- in DIRNAME rather than in the system locale data base. */
1557-char *
1558-BINDTEXTDOMAIN (domainname, dirname)
1559- const char *domainname;
1560- const char *dirname;
1561+/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
1562+ to be used for the DOMAINNAME message catalog.
1563+ If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
1564+ modified, only the current value is returned.
1565+ If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
1566+ modified nor returned. */
1567+static void
1568+set_binding_values (const char *domainname,
1569+ const char **dirnamep, const char **codesetp)
1570 {
1571 struct binding *binding;
1572+ int modified;
1573
1574 /* Some sanity checks. */
1575 if (domainname == NULL || domainname[0] == '\0')
1576- return NULL;
1577+ {
1578+ if (dirnamep)
1579+ *dirnamep = NULL;
1580+ if (codesetp)
1581+ *codesetp = NULL;
1582+ return;
1583+ }
1584+
1585+ __libc_rwlock_wrlock (_nl_state_lock);
1586+
1587+ modified = 0;
1588
1589 for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
1590 {
1591@@ -93,81 +127,173 @@
1592 }
1593 }
1594
1595- if (dirname == NULL)
1596- /* The current binding has be to returned. */
1597- return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
1598-
1599 if (binding != NULL)
1600 {
1601- /* The domain is already bound. If the new value and the old
1602- one are equal we simply do nothing. Otherwise replace the
1603- old binding. */
1604- if (strcmp (dirname, binding->dirname) != 0)
1605+ if (dirnamep)
1606 {
1607- char *new_dirname;
1608+ const char *dirname = *dirnamep;
1609
1610- if (strcmp (dirname, _nl_default_dirname) == 0)
1611- new_dirname = (char *) _nl_default_dirname;
1612+ if (dirname == NULL)
1613+ /* The current binding has be to returned. */
1614+ *dirnamep = binding->dirname;
1615 else
1616 {
1617+ /* The domain is already bound. If the new value and the old
1618+ one are equal we simply do nothing. Otherwise replace the
1619+ old binding. */
1620+ char *result = binding->dirname;
1621+ if (strcmp (dirname, result) != 0)
1622+ {
1623+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1624+ result = (char *) INTUSE(_nl_default_dirname);
1625+ else
1626+ {
1627 #if defined _LIBC || defined HAVE_STRDUP
1628- new_dirname = strdup (dirname);
1629- if (new_dirname == NULL)
1630- return NULL;
1631+ result = strdup (dirname);
1632 #else
1633- size_t len = strlen (dirname) + 1;
1634- new_dirname = (char *) malloc (len);
1635- if (new_dirname == NULL)
1636- return NULL;
1637-
1638- memcpy (new_dirname, dirname, len);
1639+ size_t len = strlen (dirname) + 1;
1640+ result = (char *) malloc (len);
1641+ if (__builtin_expect (result != NULL, 1))
1642+ memcpy (result, dirname, len);
1643 #endif
1644+ }
1645+
1646+ if (__builtin_expect (result != NULL, 1))
1647+ {
1648+ if (binding->dirname != INTUSE(_nl_default_dirname))
1649+ free (binding->dirname);
1650+
1651+ binding->dirname = result;
1652+ modified = 1;
1653+ }
1654+ }
1655+ *dirnamep = result;
1656 }
1657+ }
1658
1659- if (binding->dirname != _nl_default_dirname)
1660- free (binding->dirname);
1661+ if (codesetp)
1662+ {
1663+ const char *codeset = *codesetp;
1664
1665- binding->dirname = new_dirname;
1666+ if (codeset == NULL)
1667+ /* The current binding has be to returned. */
1668+ *codesetp = binding->codeset;
1669+ else
1670+ {
1671+ /* The domain is already bound. If the new value and the old
1672+ one are equal we simply do nothing. Otherwise replace the
1673+ old binding. */
1674+ char *result = binding->codeset;
1675+ if (result == NULL || strcmp (codeset, result) != 0)
1676+ {
1677+#if defined _LIBC || defined HAVE_STRDUP
1678+ result = strdup (codeset);
1679+#else
1680+ size_t len = strlen (codeset) + 1;
1681+ result = (char *) malloc (len);
1682+ if (__builtin_expect (result != NULL, 1))
1683+ memcpy (result, codeset, len);
1684+#endif
1685+
1686+ if (__builtin_expect (result != NULL, 1))
1687+ {
1688+ if (binding->codeset != NULL)
1689+ free (binding->codeset);
1690+
1691+ binding->codeset = result;
1692+ binding->codeset_cntr++;
1693+ modified = 1;
1694+ }
1695+ }
1696+ *codesetp = result;
1697+ }
1698 }
1699 }
1700+ else if ((dirnamep == NULL || *dirnamep == NULL)
1701+ && (codesetp == NULL || *codesetp == NULL))
1702+ {
1703+ /* Simply return the default values. */
1704+ if (dirnamep)
1705+ *dirnamep = INTUSE(_nl_default_dirname);
1706+ if (codesetp)
1707+ *codesetp = NULL;
1708+ }
1709 else
1710 {
1711 /* We have to create a new binding. */
1712- size_t len;
1713+ size_t len = strlen (domainname) + 1;
1714 struct binding *new_binding =
1715- (struct binding *) malloc (sizeof (*new_binding));
1716+ (struct binding *) malloc (offsetof (struct binding, domainname) + len);
1717
1718- if (new_binding == NULL)
1719- return NULL;
1720+ if (__builtin_expect (new_binding == NULL, 0))
1721+ goto failed;
1722
1723+ memcpy (new_binding->domainname, domainname, len);
1724+
1725+ if (dirnamep)
1726+ {
1727+ const char *dirname = *dirnamep;
1728+
1729+ if (dirname == NULL)
1730+ /* The default value. */
1731+ dirname = INTUSE(_nl_default_dirname);
1732+ else
1733+ {
1734+ if (strcmp (dirname, INTUSE(_nl_default_dirname)) == 0)
1735+ dirname = INTUSE(_nl_default_dirname);
1736+ else
1737+ {
1738+ char *result;
1739 #if defined _LIBC || defined HAVE_STRDUP
1740- new_binding->domainname = strdup (domainname);
1741- if (new_binding->domainname == NULL)
1742- return NULL;
1743+ result = strdup (dirname);
1744+ if (__builtin_expect (result == NULL, 0))
1745+ goto failed_dirname;
1746 #else
1747- len = strlen (domainname) + 1;
1748- new_binding->domainname = (char *) malloc (len);
1749- if (new_binding->domainname == NULL)
1750- return NULL;
1751- memcpy (new_binding->domainname, domainname, len);
1752+ size_t len = strlen (dirname) + 1;
1753+ result = (char *) malloc (len);
1754+ if (__builtin_expect (result == NULL, 0))
1755+ goto failed_dirname;
1756+ memcpy (result, dirname, len);
1757 #endif
1758-
1759- if (strcmp (dirname, _nl_default_dirname) == 0)
1760- new_binding->dirname = (char *) _nl_default_dirname;
1761+ dirname = result;
1762+ }
1763+ }
1764+ *dirnamep = dirname;
1765+ new_binding->dirname = (char *) dirname;
1766+ }
1767 else
1768+ /* The default value. */
1769+ new_binding->dirname = (char *) INTUSE(_nl_default_dirname);
1770+
1771+ new_binding->codeset_cntr = 0;
1772+
1773+ if (codesetp)
1774 {
1775+ const char *codeset = *codesetp;
1776+
1777+ if (codeset != NULL)
1778+ {
1779+ char *result;
1780+
1781 #if defined _LIBC || defined HAVE_STRDUP
1782- new_binding->dirname = strdup (dirname);
1783- if (new_binding->dirname == NULL)
1784- return NULL;
1785+ result = strdup (codeset);
1786+ if (__builtin_expect (result == NULL, 0))
1787+ goto failed_codeset;
1788 #else
1789- len = strlen (dirname) + 1;
1790- new_binding->dirname = (char *) malloc (len);
1791- if (new_binding->dirname == NULL)
1792- return NULL;
1793- memcpy (new_binding->dirname, dirname, len);
1794+ size_t len = strlen (codeset) + 1;
1795+ result = (char *) malloc (len);
1796+ if (__builtin_expect (result == NULL, 0))
1797+ goto failed_codeset;
1798+ memcpy (result, codeset, len);
1799 #endif
1800+ codeset = result;
1801+ new_binding->codeset_cntr++;
1802+ }
1803+ *codesetp = codeset;
1804+ new_binding->codeset = (char *) codeset;
1805 }
1806+ else
1807+ new_binding->codeset = NULL;
1808
1809 /* Now enqueue it. */
1810 if (_nl_domain_bindings == NULL
1811@@ -187,13 +313,51 @@
1812 binding->next = new_binding;
1813 }
1814
1815- binding = new_binding;
1816+ modified = 1;
1817+
1818+ /* Here we deal with memory allocation failures. */
1819+ if (0)
1820+ {
1821+ failed_codeset:
1822+ if (new_binding->dirname != INTUSE(_nl_default_dirname))
1823+ free (new_binding->dirname);
1824+ failed_dirname:
1825+ free (new_binding);
1826+ failed:
1827+ if (dirnamep)
1828+ *dirnamep = NULL;
1829+ if (codesetp)
1830+ *codesetp = NULL;
1831+ }
1832 }
1833
1834- return binding->dirname;
1835+ /* If we modified any binding, we flush the caches. */
1836+ if (modified)
1837+ ++_nl_msg_cat_cntr;
1838+
1839+ __libc_rwlock_unlock (_nl_state_lock);
1840+}
1841+
1842+/* Specify that the DOMAINNAME message catalog will be found
1843+ in DIRNAME rather than in the system locale data base. */
1844+char *
1845+BINDTEXTDOMAIN (const char *domainname, const char *dirname)
1846+{
1847+ set_binding_values (domainname, &dirname, NULL);
1848+ return (char *) dirname;
1849+}
1850+
1851+/* Specify the character encoding in which the messages from the
1852+ DOMAINNAME message catalog will be returned. */
1853+char *
1854+BIND_TEXTDOMAIN_CODESET (const char *domainname, const char *codeset)
1855+{
1856+ set_binding_values (domainname, NULL, &codeset);
1857+ return (char *) codeset;
1858 }
1859
1860 #ifdef _LIBC
1861-/* Alias for function name in GNU C Library. */
1862+/* Aliases for function names in GNU C Library. */
1863 weak_alias (__bindtextdomain, bindtextdomain);
1864+weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
1865 #endif
1866--- lrzsz-0.12.20.safe/intl/cat-compat.c 1998-04-26 09:22:37.000000000 -0400
1867+++ lrzsz-0.12.20/intl/cat-compat.c 1969-12-31 19:00:00.000000000 -0500
1868@@ -1,262 +0,0 @@
1869-/* Compatibility code for gettext-using-catgets interface.
1870- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
1871-
1872- This program is free software; you can redistribute it and/or modify
1873- it under the terms of the GNU General Public License as published by
1874- the Free Software Foundation; either version 2, or (at your option)
1875- any later version.
1876-
1877- This program is distributed in the hope that it will be useful,
1878- but WITHOUT ANY WARRANTY; without even the implied warranty of
1879- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1880- GNU General Public License for more details.
1881-
1882- You should have received a copy of the GNU General Public License
1883- along with this program; if not, write to the Free Software Foundation,
1884- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
1885-
1886-#ifdef HAVE_CONFIG_H
1887-# include <config.h>
1888-#endif
1889-
1890-#include <stdio.h>
1891-
1892-#ifdef STDC_HEADERS
1893-# include <stdlib.h>
1894-# include <string.h>
1895-#else
1896-char *getenv ();
1897-# ifdef HAVE_MALLOC_H
1898-# include <malloc.h>
1899-# endif
1900-#endif
1901-
1902-#ifdef HAVE_NL_TYPES_H
1903-# include <nl_types.h>
1904-#endif
1905-
1906-#include "libgettext.h"
1907-
1908-/* @@ end of prolog @@ */
1909-
1910-/* XPG3 defines the result of `setlocale (category, NULL)' as:
1911- ``Directs `setlocale()' to query `category' and return the current
1912- setting of `local'.''
1913- However it does not specify the exact format. And even worse: POSIX
1914- defines this not at all. So we can use this feature only on selected
1915- system (e.g. those using GNU C Library). */
1916-#ifdef _LIBC
1917-# define HAVE_LOCALE_NULL
1918-#endif
1919-
1920-/* The catalog descriptor. */
1921-static nl_catd catalog = (nl_catd) -1;
1922-
1923-/* Name of the default catalog. */
1924-static const char default_catalog_name[] = "messages";
1925-
1926-/* Name of currently used catalog. */
1927-static const char *catalog_name = default_catalog_name;
1928-
1929-/* Get ID for given string. If not found return -1. */
1930-static int msg_to_cat_id PARAMS ((const char *msg));
1931-
1932-/* Substitution for systems lacking this function in their C library. */
1933-#if !_LIBC && !HAVE_STPCPY
1934-static char *stpcpy PARAMS ((char *dest, const char *src));
1935-#endif
1936-
1937-
1938-/* Set currently used domain/catalog. */
1939-char *
1940-textdomain (domainname)
1941- const char *domainname;
1942-{
1943- nl_catd new_catalog;
1944- char *new_name;
1945- size_t new_name_len;
1946- char *lang;
1947-
1948-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES \
1949- && defined HAVE_LOCALE_NULL
1950- lang = setlocale (LC_MESSAGES, NULL);
1951-#else
1952- lang = getenv ("LC_ALL");
1953- if (lang == NULL || lang[0] == '\0')
1954- {
1955- lang = getenv ("LC_MESSAGES");
1956- if (lang == NULL || lang[0] == '\0')
1957- lang = getenv ("LANG");
1958- }
1959-#endif
1960- if (lang == NULL || lang[0] == '\0')
1961- lang = "C";
1962-
1963- /* See whether name of currently used domain is asked. */
1964- if (domainname == NULL)
1965- return (char *) catalog_name;
1966-
1967- if (domainname[0] == '\0')
1968- domainname = default_catalog_name;
1969-
1970- /* Compute length of added path element. */
1971- new_name_len = sizeof (LOCALEDIR) - 1 + 1 + strlen (lang)
1972- + sizeof ("/LC_MESSAGES/") - 1 + sizeof (PACKAGE) - 1
1973- + sizeof (".cat");
1974-
1975- new_name = (char *) malloc (new_name_len);
1976- if (new_name == NULL)
1977- return NULL;
1978-
1979- strcpy (new_name, PACKAGE);
1980- new_catalog = catopen (new_name, 0);
1981-
1982- if (new_catalog == (nl_catd) -1)
1983- {
1984- /* NLSPATH search didn't work, try absolute path */
1985- sprintf (new_name, "%s/%s/LC_MESSAGES/%s.cat", LOCALEDIR, lang,
1986- PACKAGE);
1987- new_catalog = catopen (new_name, 0);
1988-
1989- if (new_catalog == (nl_catd) -1)
1990- {
1991- free (new_name);
1992- return (char *) catalog_name;
1993- }
1994- }
1995-
1996- /* Close old catalog. */
1997- if (catalog != (nl_catd) -1)
1998- catclose (catalog);
1999- if (catalog_name != default_catalog_name)
2000- free ((char *) catalog_name);
2001-
2002- catalog = new_catalog;
2003- catalog_name = new_name;
2004-
2005- return (char *) catalog_name;
2006-}
2007-
2008-char *
2009-bindtextdomain (domainname, dirname)
2010- const char *domainname;
2011- const char *dirname;
2012-{
2013-#if HAVE_SETENV || HAVE_PUTENV
2014- char *old_val, *new_val, *cp;
2015- size_t new_val_len;
2016-
2017- /* This does not make much sense here but to be compatible do it. */
2018- if (domainname == NULL)
2019- return NULL;
2020-
2021- /* Compute length of added path element. If we use setenv we don't need
2022- the first byts for NLSPATH=, but why complicate the code for this
2023- peanuts. */
2024- new_val_len = sizeof ("NLSPATH=") - 1 + strlen (dirname)
2025- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2026-
2027- old_val = getenv ("NLSPATH");
2028- if (old_val == NULL || old_val[0] == '\0')
2029- {
2030- old_val = NULL;
2031- new_val_len += 1 + sizeof (LOCALEDIR) - 1
2032- + sizeof ("/%L/LC_MESSAGES/%N.cat");
2033- }
2034- else
2035- new_val_len += strlen (old_val);
2036-
2037- new_val = (char *) malloc (new_val_len);
2038- if (new_val == NULL)
2039- return NULL;
2040-
2041-# if HAVE_SETENV
2042- cp = new_val;
2043-# else
2044- cp = stpcpy (new_val, "NLSPATH=");
2045-# endif
2046-
2047- cp = stpcpy (cp, dirname);
2048- cp = stpcpy (cp, "/%L/LC_MESSAGES/%N.cat:");
2049-
2050- if (old_val == NULL)
2051- {
2052-# if __STDC__
2053- stpcpy (cp, LOCALEDIR "/%L/LC_MESSAGES/%N.cat");
2054-# else
2055-
2056- cp = stpcpy (cp, LOCALEDIR);
2057- stpcpy (cp, "/%L/LC_MESSAGES/%N.cat");
2058-# endif
2059- }
2060- else
2061- stpcpy (cp, old_val);
2062-
2063-# if HAVE_SETENV
2064- setenv ("NLSPATH", new_val, 1);
2065- free (new_val);
2066-# else
2067- putenv (new_val);
2068- /* Do *not* free the environment entry we just entered. It is used
2069- from now on. */
2070-# endif
2071-
2072-#endif
2073-
2074- return (char *) domainname;
2075-}
2076-
2077-#undef gettext
2078-char *
2079-gettext (msg)
2080- const char *msg;
2081-{
2082- int msgid;
2083-
2084- if (msg == NULL || catalog == (nl_catd) -1)
2085- return (char *) msg;
2086-
2087- /* Get the message from the catalog. We always use set number 1.
2088- The message ID is computed by the function `msg_to_cat_id'
2089- which works on the table generated by `po-to-tbl'. */
2090- msgid = msg_to_cat_id (msg);
2091- if (msgid == -1)
2092- return (char *) msg;
2093-
2094- return catgets (catalog, 1, msgid, (char *) msg);
2095-}
2096-
2097-/* Look through the table `_msg_tbl' which has `_msg_tbl_length' entries
2098- for the one equal to msg. If it is found return the ID. In case when
2099- the string is not found return -1. */
2100-static int
2101-msg_to_cat_id (msg)
2102- const char *msg;
2103-{
2104- int cnt;
2105-
2106- for (cnt = 0; cnt < _msg_tbl_length; ++cnt)
2107- if (strcmp (msg, _msg_tbl[cnt]._msg) == 0)
2108- return _msg_tbl[cnt]._msg_number;
2109-
2110- return -1;
2111-}
2112-
2113-
2114-/* @@ begin of epilog @@ */
2115-
2116-/* We don't want libintl.a to depend on any other library. So we
2117- avoid the non-standard function stpcpy. In GNU C Library this
2118- function is available, though. Also allow the symbol HAVE_STPCPY
2119- to be defined. */
2120-#if !_LIBC && !HAVE_STPCPY
2121-static char *
2122-stpcpy (dest, src)
2123- char *dest;
2124- const char *src;
2125-{
2126- while ((*dest++ = *src++) != '\0')
2127- /* Do nothing. */ ;
2128- return dest - 1;
2129-}
2130-#endif
2131--- lrzsz-0.12.20.safe/intl/ChangeLog 1998-04-26 09:22:35.000000000 -0400
2132+++ lrzsz-0.12.20/intl/ChangeLog 2004-09-12 14:40:34.349749000 -0400
2133@@ -1,1022 +1,4 @@
2134-1997-09-06 02:10 Ulrich Drepper <drepper@cygnus.com>
2135-
2136- * intlh.inst.in: Reformat copyright.
2137-
2138-1997-08-19 15:22 Ulrich Drepper <drepper@cygnus.com>
2139-
2140- * dcgettext.c (DCGETTEXT): Remove wrong comment.
2141-
2142-1997-08-16 00:13 Ulrich Drepper <drepper@cygnus.com>
2143-
2144- * Makefile.in (install-data): Don't change directory to install.
2145-
2146-1997-08-01 14:30 Ulrich Drepper <drepper@cygnus.com>
2147-
2148- * cat-compat.c: Fix copyright.
2149-
2150- * localealias.c: Don't define strchr unless !HAVE_STRCHR.
2151-
2152- * loadmsgcat.c: Update copyright. Fix typos.
2153-
2154- * l10nflist.c: Don't define strchr unless !HAVE_STRCHR.
2155- (_nl_make_l10nflist): Handle sponsor and revision correctly.
2156-
2157- * gettext.c: Update copyright.
2158- * gettext.h: Likewise.
2159- * hash-string.h: Likewise.
2160-
2161- * finddomain.c: Remoave dead code. Define strchr only if
2162- !HAVE_STRCHR.
2163-
2164- * explodename.c: Include <sys/types.h>.
2165-
2166- * explodename.c: Reformat copyright text.
2167- (_nl_explode_name): Fix typo.
2168-
2169- * dcgettext.c: Define and use __set_errno.
2170- (guess_category_value): Don't use setlocale if HAVE_LC_MESSAGES is
2171- not defined.
2172-
2173- * bindtextdom.c: Pretty printing.
2174-
2175-1997-05-01 02:25 Ulrich Drepper <drepper@cygnus.com>
2176-
2177- * dcgettext.c (guess_category_value): Don't depend on
2178- HAVE_LC_MESSAGES. We don't need the macro here.
2179- Patch by Bruno Haible <haible@ilog.fr>.
2180-
2181- * cat-compat.c (textdomain): DoN't refer to HAVE_SETLOCALE_NULL
2182- macro. Instead use HAVE_LOCALE_NULL and define it when using
2183- glibc, as in dcgettext.c.
2184- Patch by Bruno Haible <haible@ilog.fr>.
2185-
2186- * Makefile.in (CPPFLAGS): New variable. Reported by Franc,ois
2187- Pinard.
2188-
2189-Mon Mar 10 06:51:17 1997 Ulrich Drepper <drepper@cygnus.com>
2190-
2191- * Makefile.in: Implement handling of libtool.
2192-
2193- * gettextP.h: Change data structures for use of generic lowlevel
2194- i18n file handling.
2195-
2196-Wed Dec 4 20:21:18 1996 Ulrich Drepper <drepper@cygnus.com>
2197-
2198- * textdomain.c: Put parentheses around arguments of memcpy macro
2199- definition.
2200- * localealias.c: Likewise.
2201- * l10nflist.c: Likewise.
2202- * finddomain.c: Likewise.
2203- * bindtextdom.c: Likewise.
2204- Reported by Thomas Esken.
2205-
2206-Mon Nov 25 22:57:51 1996 Ulrich Drepper <drepper@cygnus.com>
2207-
2208- * textdomain.c: Move definition of `memcpy` macro to right
2209- position.
2210-
2211-Fri Nov 22 04:01:58 1996 Ulrich Drepper <drepper@cygnus.com>
2212-
2213- * finddomain.c [!HAVE_STRING_H && !_LIBC]: Define memcpy using
2214- bcopy if not already defined. Reported by Thomas Esken.
2215- * bindtextdom.c: Likewise.
2216- * l10nflist.c: Likewise.
2217- * localealias.c: Likewise.
2218- * textdomain.c: Likewise.
2219-
2220-Tue Oct 29 11:10:27 1996 Ulrich Drepper <drepper@cygnus.com>
2221-
2222- * Makefile.in (libdir): Change to use exec_prefix instead of
2223- prefix. Reported by Knut-HåvardAksnes <etokna@eto.ericsson.se>.
2224-
2225-Sat Aug 31 03:07:09 1996 Ulrich Drepper <drepper@cygnus.com>
2226-
2227- * l10nflist.c (_nl_normalize_codeset): We convert to lower case,
2228- so don't prepend uppercase `ISO' for only numeric arg.
2229-
2230-Fri Jul 19 00:15:46 1996 Ulrich Drepper <drepper@cygnus.com>
2231-
2232- * l10nflist.c: Move inclusion of argz.h, ctype.h, stdlib.h after
2233- definition of _GNU_SOURCE. Patch by Roland McGrath.
2234-
2235- * Makefile.in (uninstall): Fix another bug with `for' loop and
2236- empty arguments. Patch by Jim Meyering. Correct name os
2237- uninstalled files: no intl- prefix anymore.
2238-
2239- * Makefile.in (install-data): Again work around shells which
2240- cannot handle mpty for list. Reported by Jim Meyering.
2241-
2242-Sat Jul 13 18:11:35 1996 Ulrich Drepper <drepper@cygnus.com>
2243-
2244- * Makefile.in (install): Split goal. Now depend on install-exec
2245- and install-data.
2246- (install-exec, install-data): New goals. Created from former
2247- install goal.
2248- Reported by Karl Berry.
2249-
2250-Sat Jun 22 04:58:14 1996 Ulrich Drepper <drepper@cygnus.com>
2251-
2252- * Makefile.in (MKINSTALLDIRS): New variable. Path to
2253- mkinstalldirs script.
2254- (install): use MKINSTALLDIRS variable or if the script is not present
2255- try to find it in the $top_scrdir).
2256-
2257-Wed Jun 19 02:56:56 1996 Ulrich Drepper <drepper@cygnus.com>
2258-
2259- * l10nflist.c: Linux libc *partly* includes the argz_* functions.
2260- Grr. Work around by renaming the static version and use macros
2261- for renaming.
2262-
2263-Tue Jun 18 20:11:17 1996 Ulrich Drepper <drepper@cygnus.com>
2264-
2265- * l10nflist.c: Correct presence test macros of __argz_* functions.
2266-
2267- * l10nflist.c: Include <argz.h> based on test of it instead when
2268- __argz_* functions are available.
2269- Reported by Andreas Schwab.
2270-
2271-Thu Jun 13 15:17:44 1996 Ulrich Drepper <drepper@cygnus.com>
2272-
2273- * explodename.c, l10nflist.c: Define NULL for dumb systems.
2274-
2275-Tue Jun 11 17:05:13 1996 Ulrich Drepper <drepper@cygnus.com>
2276-
2277- * intlh.inst.in, libgettext.h (dcgettext): Rename local variable
2278- result to __result to prevent name clash.
2279-
2280- * l10nflist.c, localealias.c, dcgettext.c: Define _GNU_SOURCE to
2281- get prototype for stpcpy and strcasecmp.
2282-
2283- * intlh.inst.in, libgettext.h: Move declaration of
2284- `_nl_msg_cat_cntr' outside __extension__ block to prevent warning
2285- from gcc's -Wnested-extern option.
2286-
2287-Fri Jun 7 01:58:00 1996 Ulrich Drepper <drepper@cygnus.com>
2288-
2289- * Makefile.in (install): Remove comment.
2290-
2291-Thu Jun 6 17:28:17 1996 Ulrich Drepper <drepper@cygnus.com>
2292-
2293- * Makefile.in (install): Work around for another Buglix stupidity.
2294- Always use an `else' close for `if's. Reported by Nelson Beebe.
2295-
2296- * Makefile.in (intlh.inst): Correct typo in phony rule.
2297- Reported by Nelson Beebe.
2298-
2299-Thu Jun 6 01:49:52 1996 Ulrich Drepper <drepper@cygnus.com>
2300-
2301- * dcgettext.c (read_alias_file): Rename variable alloca_list to
2302- block_list as the macro calls assume.
2303- Patch by Eric Backus.
2304-
2305- * localealias.c [!HAVE_ALLOCA]: Define alloca as macro using
2306- malloc.
2307- (read_alias_file): Rename varriabe alloca_list to block_list as the
2308- macro calls assume.
2309- Patch by Eric Backus.
2310-
2311- * l10nflist.c: Correct conditional for <argz.h> inclusion.
2312- Reported by Roland McGrath.
2313-
2314- * Makefile.in (all): Depend on all-@USE_INCLUDED_LIBINTL@, not
2315- all-@USE_NLS@.
2316-
2317- * Makefile.in (install): intlh.inst comes from local dir, not
2318- $(srcdir).
2319-
2320- * Makefile.in (intlh.inst): Special handling of this goal. If
2321- used in gettext, this is really a rul to construct this file. If
2322- used in any other package it is defined as a .PHONY rule with
2323- empty body.
2324-
2325- * finddomain.c: Extract locale file information handling into
2326- l10nfile.c. Rename local stpcpy__ function to stpcpy.
2327-
2328- * dcgettext.c (stpcpy): Add local definition.
2329-
2330- * l10nflist.c: Solve some portability problems. Patches partly by
2331- Thomas Esken. Add local definition of stpcpy.
2332-
2333-Tue Jun 4 02:47:49 1996 Ulrich Drepper <drepper@cygnus.com>
2334-
2335- * intlh.inst.in: Don't depend including <locale.h> on
2336- HAVE_LOCALE_H. Instead configure must rewrite this fiile
2337- depending on the result of the configure run.
2338-
2339- * Makefile.in (install): libintl.inst is now called intlh.inst.
2340- Add rules for updating intlh.inst from intlh.inst.in.
2341-
2342- * libintl.inst: Renamed to intlh.inst.in.
2343-
2344- * localealias.c, dcgettext.c [__GNUC__]: Define HAVE_ALLOCA to 1
2345- because gcc has __buitlin_alloca.
2346- Reported by Roland McGrath.
2347-
2348-Mon Jun 3 00:32:16 1996 Ulrich Drepper <drepper@cygnus.com>
2349-
2350- * Makefile.in (installcheck): New goal to fulfill needs of
2351- automake's distcheck.
2352-
2353- * Makefile.in (install): Reorder commands so that VERSION is
2354- found.
2355-
2356- * Makefile.in (gettextsrcdir): Now use subdirectory intl/ in
2357- @datadir@/gettext.
2358- (COMSRCS): Add l10nfile.c.
2359- (OBJECTS): Add l10nfile.o.
2360- (DISTFILES): Rename to DISTFILE.normal. Remove $(DISTFILES.common).
2361- (DISTFILE.gettext): Remove $(DISTFILES.common).
2362- (all-gettext): Remove goal.
2363- (install): If $(PACKAGE) = gettext install, otherwose do nothing. No
2364- package but gettext itself should install libintl.h + headers.
2365- (dist): Extend goal to work for gettext, too.
2366- (dist-gettext): Remove goal.
2367-
2368- * dcgettext.c [!HAVE_ALLOCA]: Define macro alloca by using malloc.
2369-
2370-Sun Jun 2 17:33:06 1996 Ulrich Drepper <drepper@cygnus.com>
2371-
2372- * loadmsgcat.c (_nl_load_domain): Parameter is now comes from
2373- find_l10nfile.
2374-
2375-Sat Jun 1 02:23:03 1996 Ulrich Drepper <drepper@cygnus.com>
2376-
2377- * l10nflist.c (__argz_next): Add definition.
2378-
2379- * dcgettext.c [!HAVE_ALLOCA]: Add code for handling missing alloca
2380- code. Use new l10nfile handling.
2381-
2382- * localealias.c [!HAVE_ALLOCA]: Add code for handling missing
2383- alloca code.
2384-
2385- * l10nflist.c: Initial revision.
2386-
2387-Tue Apr 2 18:51:18 1996 Ulrich Drepper <drepper@myware>
2388-
2389- * Makefile.in (all-gettext): New goal. Same as all-yes.
2390-
2391-Thu Mar 28 23:01:22 1996 Karl Eichwalder <ke@ke.central.de>
2392-
2393- * Makefile.in (gettextsrcdir): Define using @datadir@.
2394-
2395-Tue Mar 26 12:39:14 1996 Ulrich Drepper <drepper@myware>
2396-
2397- * finddomain.c: Include <ctype.h>. Reported by Roland McGrath.
2398-
2399-Sat Mar 23 02:00:35 1996 Ulrich Drepper <drepper@myware>
2400-
2401- * finddomain.c (stpcpy): Rename to stpcpy__ to prevent clashing
2402- with external declaration.
2403-
2404-Sat Mar 2 00:47:09 1996 Ulrich Drepper <drepper@myware>
2405-
2406- * Makefile.in (all-no): Rename from all_no.
2407-
2408-Sat Feb 17 00:25:59 1996 Ulrich Drepper <drepper@myware>
2409-
2410- * gettextP.h [loaded_domain]: Array `successor' must now contain up
2411- to 63 elements (because of codeset name normalization).
2412-
2413- * finddomain.c: Implement codeset name normalization.
2414-
2415-Thu Feb 15 04:39:09 1996 Ulrich Drepper <drepper@myware>
2416-
2417- * Makefile.in (all): Define to `all-@USE_NLS@'.
2418- (all-yes, all_no): New goals. `all-no' is noop, `all-yes'
2419- is former all.
2420-
2421-Mon Jan 15 21:46:01 1996 Howard Gayle <howard@hal.com>
2422-
2423- * localealias.c (alias_compare): Increment string pointers in loop
2424- of strcasecmp replacement.
2425-
2426-Fri Dec 29 21:16:34 1995 Ulrich Drepper <drepper@myware>
2427-
2428- * Makefile.in (install-src): Who commented this goal out ? :-)
2429-
2430-Fri Dec 29 15:08:16 1995 Ulrich Drepper <drepper@myware>
2431-
2432- * dcgettext.c (DCGETTEXT): Save `errno'. Failing system calls
2433- should not effect it because a missing catalog is no error.
2434- Reported by Harald K<o:>nig <koenig@tat.physik.uni-tuebingen.de>.
2435-
2436-Tue Dec 19 22:09:13 1995 Ulrich Drepper <drepper@myware>
2437-
2438- * Makefile.in (Makefile): Explicitly use $(SHELL) for running
2439- shell scripts.
2440-
2441-Fri Dec 15 17:34:59 1995 Andreas Schwab <schwab@issan.informatik.uni-dortmund.de>
2442-
2443- * Makefile.in (install-src): Only install library and header when
2444- we use the own implementation. Don't do it when using the
2445- system's gettext or catgets functions.
2446-
2447- * dcgettext.c (find_msg): Must not swap domain->hash_size here.
2448-
2449-Sat Dec 9 16:24:37 1995 Ulrich Drepper <drepper@myware>
2450-
2451- * localealias.c, libintl.inst, libgettext.h, hash-string.h,
2452- gettextP.h, finddomain.c, dcgettext.c, cat-compat.c:
2453- Use PARAMS instead of __P. Suggested by Roland McGrath.
2454-
2455-Tue Dec 5 11:39:14 1995 Larry Schwimmer <rosebud@cyclone.stanford.edu>
2456-
2457- * libgettext.h: Use `#if !defined (_LIBINTL_H)' instead of `#if
2458- !_LIBINTL_H' because Solaris defines _LIBINTL_H as empty.
2459-
2460-Mon Dec 4 15:42:07 1995 Ulrich Drepper <drepper@myware>
2461-
2462- * Makefile.in (install-src):
2463- Install libintl.inst instead of libintl.h.install.
2464-
2465-Sat Dec 2 22:51:38 1995 Marcus Daniels <marcus@sysc.pdx.edu>
2466-
2467- * cat-compat.c (textdomain):
2468- Reverse order in which files are tried you load. First
2469- try local file, when this failed absolute path.
2470-
2471-Wed Nov 29 02:03:53 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2472-
2473- * cat-compat.c (bindtextdomain): Add missing { }.
2474-
2475-Sun Nov 26 18:21:41 1995 Ulrich Drepper <drepper@myware>
2476-
2477- * libintl.inst: Add missing __P definition. Reported by Nelson Beebe.
2478-
2479- * Makefile.in:
2480- Add dummy `all' and `dvi' goals. Reported by Tom Tromey.
2481-
2482-Sat Nov 25 16:12:01 1995 Franc,ois Pinard <pinard@iro.umontreal.ca>
2483-
2484- * hash-string.h: Capitalize arguments of macros.
2485-
2486-Sat Nov 25 12:01:36 1995 Ulrich Drepper <drepper@myware>
2487-
2488- * Makefile.in (DISTFILES): Prevent files names longer than 13
2489- characters. libintl.h.glibc->libintl.glibc,
2490- libintl.h.install->libintl.inst. Reported by Joshua R. Poulson.
2491-
2492-Sat Nov 25 11:31:12 1995 Eric Backus <ericb@lsid.hp.com>
2493-
2494- * dcgettext.c: Fix bug in preprocessor conditionals.
2495-
2496-Sat Nov 25 02:35:27 1995 Nelson H. F. Beebe <beebe@math.utah.edu>
2497-
2498- * libgettext.h: Solaris cc does not understand
2499- #if !SYMBOL1 && !SYMBOL2. Sad but true.
2500-
2501-Thu Nov 23 16:22:14 1995 Ulrich Drepper <drepper@myware>
2502-
2503- * hash-string.h (hash_string):
2504- Fix for machine with >32 bit `unsigned long's.
2505-
2506- * dcgettext.c (DCGETTEXT):
2507- Fix horrible bug in loop for alternative translation.
2508-
2509-Thu Nov 23 01:45:29 1995 Ulrich Drepper <drepper@myware>
2510-
2511- * po2tbl.sed.in, linux-msg.sed, xopen-msg.sed:
2512- Some further simplifications in message number generation.
2513-
2514-Mon Nov 20 21:08:43 1995 Ulrich Drepper <drepper@myware>
2515-
2516- * libintl.h.glibc: Use __const instead of const in prototypes.
2517-
2518- * Makefile.in (install-src):
2519- Install libintl.h.install instead of libintl.h. This
2520- is a stripped-down version. Suggested by Peter Miller.
2521-
2522- * libintl.h.install, libintl.h.glibc: Initial revision.
2523-
2524- * localealias.c (_nl_expand_alias, read_alias_file):
2525- Protect prototypes in type casts by __P.
2526-
2527-Tue Nov 14 16:43:58 1995 Ulrich Drepper <drepper@myware>
2528-
2529- * hash-string.h: Correct prototype for hash_string.
2530-
2531-Sun Nov 12 12:42:30 1995 Ulrich Drepper <drepper@myware>
2532-
2533- * hash-string.h (hash_string): Add prototype.
2534-
2535- * gettextP.h: Fix copyright.
2536- (SWAP): Add prototype.
2537-
2538-Wed Nov 8 22:56:33 1995 Ulrich Drepper <drepper@myware>
2539-
2540- * localealias.c (read_alias_file): Forgot sizeof.
2541- Avoid calling *printf function. This introduces a big overhead.
2542- Patch by Roland McGrath.
2543-
2544-Tue Nov 7 14:21:08 1995 Ulrich Drepper <drepper@myware>
2545-
2546- * finddomain.c, cat-compat.c: Wrong indentation in #if for stpcpy.
2547-
2548- * finddomain.c (stpcpy):
2549- Define substitution function local. The macro was to flaky.
2550-
2551- * cat-compat.c: Fix typo.
2552-
2553- * xopen-msg.sed, linux-msg.sed:
2554- While bringing message number to right place only accept digits.
2555-
2556- * linux-msg.sed, xopen-msg.sed: Now that the counter does not have
2557- leading 0s we don't need to remove them. Reported by Marcus
2558- Daniels.
2559-
2560- * Makefile.in (../po/cat-id-tbl.o): Use $(top_srdir) in
2561- dependency. Reported by Marcus Daniels.
2562-
2563- * cat-compat.c: (stpcpy) [!_LIBC && !HAVE_STPCPY]: Define replacement.
2564- Generally cleanup using #if instead of #ifndef.
2565-
2566- * Makefile.in: Correct typos in comment. By Franc,ois Pinard.
2567-
2568-Mon Nov 6 00:27:02 1995 Ulrich Drepper <drepper@myware>
2569-
2570- * Makefile.in (install-src): Don't install libintl.h and libintl.a
2571- if we use an available gettext implementation.
2572-
2573-Sun Nov 5 22:02:08 1995 Ulrich Drepper <drepper@myware>
2574-
2575- * libgettext.h: Fix typo: HAVE_CATGETTS -> HAVE_CATGETS. Reported
2576- by Franc,ois Pinard.
2577-
2578- * libgettext.h: Use #if instead of #ifdef/#ifndef.
2579-
2580- * finddomain.c:
2581- Comments describing what has to be done should start with FIXME.
2582-
2583-Sun Nov 5 19:38:01 1995 Ulrich Drepper <drepper@myware>
2584-
2585- * Makefile.in (DISTFILES): Split. Use DISTFILES with normal meaning.
2586- DISTFILES.common names the files common to both dist goals.
2587- DISTFILES.gettext are the files only distributed in GNU gettext.
2588-
2589-Sun Nov 5 17:32:54 1995 Ulrich Drepper <drepper@myware>
2590-
2591- * dcgettext.c (DCGETTEXT): Correct searching in derived locales.
2592- This was necessary since a change in _nl_find_msg several weeks
2593- ago. I really don't know this is still not fixed.
2594-
2595-Sun Nov 5 12:43:12 1995 Ulrich Drepper <drepper@myware>
2596-
2597- * loadmsgcat.c (_nl_load_domain): Test for FILENAME == NULL. This
2598- might mark a special condition.
2599-
2600- * finddomain.c (make_entry_rec): Don't make illegal entry as decided.
2601-
2602- * Makefile.in (dist): Suppress error message when ln failed.
2603- Get files from $(srcdir) explicitly.
2604-
2605- * libgettext.h (gettext_const): Rename to gettext_noop.
2606-
2607-Fri Nov 3 07:36:50 1995 Ulrich Drepper <drepper@myware>
2608-
2609- * finddomain.c (make_entry_rec):
2610- Protect against wrong locale names by testing mask.
2611-
2612- * libgettext.h (gettext_const): Add macro definition.
2613- Capitalize macro arguments.
2614-
2615-Thu Nov 2 23:15:51 1995 Ulrich Drepper <drepper@myware>
2616-
2617- * finddomain.c (_nl_find_domain):
2618- Test for pointer != NULL before accessing value.
2619- Reported by Tom Tromey.
2620-
2621- * gettext.c (NULL):
2622- Define as (void*)0 instad of 0. Reported by Franc,ois Pinard.
2623-
2624-Mon Oct 30 21:28:52 1995 Ulrich Drepper <drepper@myware>
2625-
2626- * po2tbl.sed.in: Serious typo bug fixed by Jim Meyering.
2627-
2628-Sat Oct 28 23:20:47 1995 Ulrich Drepper <drepper@myware>
2629-
2630- * libgettext.h: Disable dcgettext optimization for Solaris 2.3.
2631-
2632- * localealias.c (alias_compare):
2633- Peter Miller reported that tolower in some systems is
2634- even dumber than I thought. Protect call by `isupper'.
2635-
2636-Fri Oct 27 22:22:51 1995 Ulrich Drepper <drepper@myware>
2637-
2638- * Makefile.in (libdir, includedir): New variables.
2639- (install-src): Install libintl.a and libintl.h in correct dirs.
2640-
2641-Fri Oct 27 22:07:29 1995 Ulrich Drepper <drepper@myware>
2642-
2643- * Makefile.in (SOURCES): Fix typo: intrl.compat.c -> intl-compat.c.
2644-
2645- * po2tbl.sed.in: Patch for buggy SEDs by Christian von Roques.
2646-
2647- * localealias.c:
2648- Fix typo and superflous test. Reported by Christian von Roques.
2649-
2650-Fri Oct 6 11:52:05 1995 Ulrich Drepper <drepper@myware>
2651-
2652- * finddomain.c (_nl_find_domain):
2653- Correct some remainder from the pre-CEN syntax. Now
2654- we don't have a constant number of successors anymore.
2655-
2656-Wed Sep 27 21:41:13 1995 Ulrich Drepper <drepper@myware>
2657-
2658- * Makefile.in (DISTFILES): Add libintl.h.glibc.
2659-
2660- * Makefile.in (dist-libc): Add goal for packing sources for glibc.
2661- (COMSRCS, COMHDRS): Splitted to separate sources shared with glibc.
2662-
2663- * loadmsgcat.c: Forget to continue #if line.
2664-
2665- * localealias.c:
2666- [_LIBC]: Rename strcasecmp to __strcasecmp to keep ANSI C name
2667- space clean.
2668-
2669- * dcgettext.c, finddomain.c: Better comment to last change.
2670-
2671- * loadmsgcat.c:
2672- [_LIBC]: Rename fstat, open, close, read, mmap, and munmap to
2673- __fstat, __open, __close, __read, __mmap, and __munmap resp
2674- to keep ANSI C name space clean.
2675-
2676- * finddomain.c:
2677- [_LIBC]: Rename stpcpy to __stpcpy to keep ANSI C name space clean.
2678-
2679- * dcgettext.c:
2680- [_LIBC]: Rename getced and stpcpy to __getcwd and __stpcpy resp to
2681- keep ANSI C name space clean.
2682-
2683- * libgettext.h:
2684- Include sys/types.h for those old SysV systems out there.
2685- Reported by Francesco Potorti`.
2686-
2687- * loadmsgcat.c (use_mmap): Define if compiled for glibc.
2688-
2689- * bindtextdom.c: Include all those standard headers
2690- unconditionally if _LIBC is defined.
2691-
2692- * finddomain.c: Fix 2 times defiend -> defined.
2693-
2694- * textdomain.c: Include libintl.h instead of libgettext.h when
2695- compiling for glibc. Include all those standard headers
2696- unconditionally if _LIBC is defined.
2697-
2698- * localealias.c, loadmsgcat.c: Prepare to be compiled in glibc.
2699-
2700- * gettext.c:
2701- Include libintl.h instead of libgettext.h when compiling for glibc.
2702- Get NULL from stddef.h if we compile for glibc.
2703-
2704- * finddomain.c: Include libintl.h instead of libgettext.h when
2705- compiling for glibc. Include all those standard headers
2706- unconditionally if _LIBC is defined.
2707-
2708- * dcgettext.c: Include all those standard headers unconditionally
2709- if _LIBC is defined.
2710-
2711- * dgettext.c: If compiled in glibc include libintl.h instead of
2712- libgettext.h.
2713- (locale.h): Don't rely on HAVE_LOCALE_H when compiling for glibc.
2714-
2715- * dcgettext.c: If compiled in glibc include libintl.h instead of
2716- libgettext.h.
2717- (getcwd): Don't rely on HAVE_GETCWD when compiling for glibc.
2718-
2719- * bindtextdom.c:
2720- If compiled in glibc include libintl.h instead of libgettext.h.
2721-
2722-Mon Sep 25 22:23:06 1995 Ulrich Drepper <drepper@myware>
2723-
2724- * localealias.c (_nl_expand_alias): Don't call bsearch if NMAP <= 0.
2725- Reported by Marcus Daniels.
2726-
2727- * cat-compat.c (bindtextdomain):
2728- String used in putenv must not be recycled.
2729- Reported by Marcus Daniels.
2730-
2731- * libgettext.h (__USE_GNU_GETTEXT):
2732- Additional symbol to signal that we use GNU gettext
2733- library.
2734-
2735- * cat-compat.c (bindtextdomain):
2736- Fix bug with the strange stpcpy replacement.
2737- Reported by Nelson Beebe.
2738-
2739-Sat Sep 23 08:23:51 1995 Ulrich Drepper <drepper@myware>
2740-
2741- * cat-compat.c: Include <string.h> for stpcpy prototype.
2742-
2743- * localealias.c (read_alias_file):
2744- While expand strdup code temporary variable `cp' hided
2745- higher level variable with same name. Rename to `tp'.
2746-
2747- * textdomain.c (textdomain):
2748- Avoid warning by using temporary variable in strdup code.
2749-
2750- * finddomain.c (_nl_find_domain): Remove unused variable `application'.
2751-
2752-Thu Sep 21 15:51:44 1995 Ulrich Drepper <drepper@myware>
2753-
2754- * localealias.c (alias_compare):
2755- Use strcasecmp() only if available. Else use
2756- implementation in place.
2757-
2758- * intl-compat.c:
2759- Wrapper functions now call *__ functions instead of __*.
2760-
2761- * libgettext.h: Declare prototypes for *__ functions instead for __*.
2762-
2763- * cat-compat.c, loadmsgcat.c:
2764- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2765- of the standard libc and so prevent libintl.a from being used
2766- standalone.
2767-
2768- * bindtextdom.c:
2769- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2770- of the standard libc and so prevent libintl.a from being used
2771- standalone.
2772- Rename to bindtextdomain__ if not used in GNU C Library.
2773-
2774- * dgettext.c:
2775- Rename function to dgettext__ if not used in GNU C Library.
2776-
2777- * gettext.c:
2778- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2779- of the standard libc and so prevent libintl.a from being used
2780- standalone.
2781- Functions now called gettext__ if not used in GNU C Library.
2782-
2783- * dcgettext.c, localealias.c, textdomain.c, finddomain.c:
2784- Don't use xmalloc, xstrdup, and stpcpy. These functions are not part
2785- of the standard libc and so prevent libintl.a from being used
2786- standalone.
2787-
2788-Sun Sep 17 23:14:49 1995 Ulrich Drepper <drepper@myware>
2789-
2790- * finddomain.c: Correct some bugs in handling of CEN standard
2791- locale definitions.
2792-
2793-Thu Sep 7 01:49:28 1995 Ulrich Drepper <drepper@myware>
2794-
2795- * finddomain.c: Implement CEN syntax.
2796-
2797- * gettextP.h (loaded_domain): Extend number of successors to 31.
2798-
2799-Sat Aug 19 19:25:29 1995 Ulrich Drepper <drepper@myware>
2800-
2801- * Makefile.in (aliaspath): Remove path to X11 locale dir.
2802-
2803- * Makefile.in: Make install-src depend on install. This helps
2804- gettext to install the sources and other packages can use the
2805- install goal.
2806-
2807-Sat Aug 19 15:19:33 1995 Ulrich Drepper <drepper@myware>
2808-
2809- * Makefile.in (uninstall): Remove stuff installed by install-src.
2810-
2811-Tue Aug 15 13:13:53 1995 Ulrich Drepper <drepper@myware>
2812-
2813- * VERSION.in: Initial revision.
2814-
2815- * Makefile.in (DISTFILES):
2816- Add VERSION file. This is not necessary for gettext, but
2817- for other packages using this library.
2818-
2819-Tue Aug 15 06:16:44 1995 Ulrich Drepper <drepper@myware>
2820-
2821- * gettextP.h (_nl_find_domain):
2822- New prototype after changing search strategy.
2823-
2824- * finddomain.c (_nl_find_domain):
2825- We now try only to find a specified catalog. Fall back to other
2826- catalogs listed in the locale list is now done in __dcgettext.
2827-
2828- * dcgettext.c (__dcgettext):
2829- Now we provide message fall back even to different languages.
2830- I.e. if a message is not available in one language all the other
2831- in the locale list a tried. Formerly fall back was only possible
2832- within one language. Implemented by moving one loop from
2833- _nl_find_domain to here.
2834-
2835-Mon Aug 14 23:45:50 1995 Ulrich Drepper <drepper@myware>
2836-
2837- * Makefile.in (gettextsrcdir):
2838- Directory where source of GNU gettext library are made
2839- available.
2840- (INSTALL, INSTALL_DATA): Programs used for installing sources.
2841- (gettext-src): New. Rule to install GNU gettext sources for use in
2842- gettextize shell script.
2843-
2844-Sun Aug 13 14:40:48 1995 Ulrich Drepper <drepper@myware>
2845-
2846- * loadmsgcat.c (_nl_load_domain):
2847- Use mmap for loading only when munmap function is
2848- also available.
2849-
2850- * Makefile.in (install): Depend on `all' goal.
2851-
2852-Wed Aug 9 11:04:33 1995 Ulrich Drepper <drepper@myware>
2853-
2854- * localealias.c (read_alias_file):
2855- Do not overwrite '\n' when terminating alias value string.
2856-
2857- * localealias.c (read_alias_file):
2858- Handle long lines. Ignore the rest not fitting in
2859- the buffer after the initial `fgets' call.
2860-
2861-Wed Aug 9 00:54:29 1995 Ulrich Drepper <drepper@myware>
2862-
2863- * gettextP.h (_nl_load_domain):
2864- Add prototype, replacing prototype for _nl_load_msg_cat.
2865-
2866- * finddomain.c (_nl_find_domain):
2867- Remove unneeded variable filename and filename_len.
2868- (expand_alias): Remove prototype because functions does not
2869- exist anymore.
2870-
2871- * localealias.c (read_alias_file):
2872- Change type of fname_len parameter to int.
2873- (xmalloc): Add prototype.
2874-
2875- * loadmsgcat.c: Better prototypes for xmalloc.
2876-
2877-Tue Aug 8 22:30:39 1995 Ulrich Drepper <drepper@myware>
2878-
2879- * finddomain.c (_nl_find_domain):
2880- Allow alias name to be constructed from the four components.
2881-
2882- * Makefile.in (aliaspath): New variable. Set to preliminary value.
2883- (SOURCES): Add localealias.c.
2884- (OBJECTS): Add localealias.o.
2885-
2886- * gettextP.h: Add prototype for _nl_expand_alias.
2887-
2888- * finddomain.c: Aliasing handled in intl/localealias.c.
2889-
2890- * localealias.c: Aliasing for locale names.
2891-
2892- * bindtextdom.c: Better prototypes for xmalloc and xstrdup.
2893-
2894-Mon Aug 7 23:47:42 1995 Ulrich Drepper <drepper@myware>
2895-
2896- * Makefile.in (DISTFILES): gettext.perl is now found in misc/.
2897-
2898- * cat-compat.c (bindtextdomain):
2899- Correct implementation. dirname parameter was not used.
2900- Reported by Marcus Daniels.
2901-
2902- * gettextP.h (loaded_domain):
2903- New fields `successor' and `decided' for oo, lazy
2904- message handling implementation.
2905-
2906- * dcgettext.c:
2907- Adopt for oo, lazy message handliing.
2908- Now we can inherit translations from less specific locales.
2909- (find_msg): New function.
2910-
2911- * loadmsgcat.c, finddomain.c:
2912- Complete rewrite. Implement oo, lazy message handling :-).
2913- We now have an additional environment variable `LANGUAGE' with
2914- a higher priority than LC_ALL for the LC_MESSAGE locale.
2915- Here we can set a colon separated list of specifications each
2916- of the form `language[_territory[.codeset]][@modifier]'.
2917-
2918-Sat Aug 5 09:55:42 1995 Ulrich Drepper <drepper@myware>
2919-
2920- * finddomain.c (unistd.h):
2921- Include to get _PC_PATH_MAX defined on system having it.
2922-
2923-Fri Aug 4 22:42:00 1995 Ulrich Drepper <drepper@myware>
2924-
2925- * finddomain.c (stpcpy): Include prototype.
2926-
2927- * Makefile.in (dist): Remove `copying instead' message.
2928-
2929-Wed Aug 2 18:52:03 1995 Ulrich Drepper <drepper@myware>
2930-
2931- * Makefile.in (ID, TAGS): Do not use $^.
2932-
2933-Tue Aug 1 20:07:11 1995 Ulrich Drepper <drepper@myware>
2934-
2935- * Makefile.in (TAGS, ID): Use $^ as command argument.
2936- (TAGS): Give etags -o option t write to current directory,
2937- not $(srcdir).
2938- (ID): Use $(srcdir) instead os $(top_srcdir)/src.
2939- (distclean): Remove ID.
2940-
2941-Sun Jul 30 11:51:46 1995 Ulrich Drepper <drepper@myware>
2942-
2943- * Makefile.in (gnulocaledir):
2944- New variable, always using share/ for data directory.
2945- (DEFS): Add GNULOCALEDIR, used in finddomain.c.
2946-
2947- * finddomain.c (_nl_default_dirname):
2948- Set to GNULOCALEDIR, because it always has to point
2949- to the directory where GNU gettext Library writes it to.
2950-
2951- * intl-compat.c (textdomain, bindtextdomain):
2952- Undefine macros before function definition.
2953-
2954-Sat Jul 22 01:10:02 1995 Ulrich Drepper <drepper@myware>
2955-
2956- * libgettext.h (_LIBINTL_H):
2957- Protect definition in case where this file is included as
2958- libgettext.h on Solaris machines. Add comment about this.
2959-
2960-Wed Jul 19 02:36:42 1995 Ulrich Drepper <drepper@myware>
2961-
2962- * intl-compat.c (textdomain): Correct typo.
2963-
2964-Wed Jul 19 01:51:35 1995 Ulrich Drepper <drepper@myware>
2965-
2966- * dcgettext.c (dcgettext): Function now called __dcgettext.
2967-
2968- * dgettext.c (dgettext): Now called __dgettext and calls
2969- __dcgettext.
2970-
2971- * gettext.c (gettext):
2972- Function now called __gettext and calls __dgettext.
2973-
2974- * textdomain.c (textdomain): Function now called __textdomain.
2975-
2976- * bindtextdom.c (bindtextdomain): Function now called
2977- __bindtextdomain.
2978-
2979- * intl-compat.c: Initial revision.
2980-
2981- * Makefile.in (SOURCES): Add intl-compat.c.
2982- (OBJECTS): We always compile the GNU gettext library functions.
2983- OBJECTS contains all objects but cat-compat.o, ../po/cat-if-tbl.o,
2984- and intl-compat.o.
2985- (GETTOBJS): Contains now only intl-compat.o.
2986-
2987- * libgettext.h:
2988- Re-include protection matches dualistic character of libgettext.h.
2989- For all functions in GNU gettext library define __ counter part.
2990-
2991- * finddomain.c (strchr): Define as index if not found in C library.
2992- (_nl_find_domain): For relative paths paste / in between.
2993-
2994-Tue Jul 18 16:37:45 1995 Ulrich Drepper <drepper@myware>
2995-
2996- * loadmsgcat.c, finddomain.c: Add inclusion of sys/types.h.
2997-
2998- * xopen-msg.sed: Fix bug with `msgstr ""' lines.
2999- A little bit better comments.
3000-
3001-Tue Jul 18 01:18:27 1995 Ulrich Drepper <drepper@myware>
3002-
3003- * Makefile.in:
3004- po-mode.el, makelinks, combine-sh are now found in ../misc.
3005-
3006- * po-mode.el, makelinks, combine-sh, elisp-comp:
3007- Moved to ../misc/.
3008-
3009- * libgettext.h, gettextP.h, gettext.h: Uniform test for __STDC__.
3010-
3011-Sun Jul 16 22:33:02 1995 Ulrich Drepper <drepper@myware>
3012-
3013- * Makefile.in (INSTALL, INSTALL_DATA): New variables.
3014- (install-data, uninstall): Install/uninstall .elc file.
3015-
3016- * po-mode.el (Installation comment):
3017- Add .pox as possible extension of .po files.
3018-
3019-Sun Jul 16 13:23:27 1995 Ulrich Drepper <drepper@myware>
3020-
3021- * elisp-comp: Complete new version by Franc,ois: This does not
3022- fail when not compiling in the source directory.
3023-
3024-Sun Jul 16 00:12:17 1995 Ulrich Drepper <drepper@myware>
3025-
3026- * Makefile.in (../po/cat-id-tbl.o):
3027- Use $(MAKE) instead of make for recursive make.
3028-
3029- * Makefile.in (.el.elc): Use $(SHELL) instead of /bin/sh.
3030- (install-exec): Add missing dummy goal.
3031- (install-data, uninstall): @ in multi-line shell command at
3032- beginning, not in front of echo. Reported by Eric Backus.
3033-
3034-Sat Jul 15 00:21:28 1995 Ulrich Drepper <drepper@myware>
3035-
3036- * Makefile.in (DISTFILES):
3037- Rename libgettext.perl to gettext.perl to fit in 14 chars
3038- file systems.
3039-
3040- * gettext.perl:
3041- Rename to gettext.perl to fit in 14 chars file systems.
3042-
3043-Thu Jul 13 23:17:20 1995 Ulrich Drepper <drepper@myware>
3044-
3045- * cat-compat.c: If !STDC_HEADERS try to include malloc.h.
3046-
3047-Thu Jul 13 20:55:02 1995 Ulrich Drepper <drepper@myware>
3048-
3049- * po2tbl.sed.in: Pretty printing.
3050-
3051- * linux-msg.sed, xopen-msg.sed:
3052- Correct bugs with handling substitute flags in branches.
3053-
3054- * hash-string.h (hash_string):
3055- Old K&R compilers don't under stand `unsigned char'.
3056-
3057- * gettext.h (nls_uint32):
3058- Some old K&R compilers (eg HP) don't understand `unsigned int'.
3059-
3060- * cat-compat.c (msg_to_cat_id): De-ANSI-fy prototypes.
3061-
3062-Thu Jul 13 01:34:33 1995 Ulrich Drepper <drepper@myware>
3063-
3064- * Makefile.in (ELCFILES): New variable.
3065- (DISTFILES): Add elisp-comp.
3066- Add implicit rule for .el -> .elc compilation.
3067- (install-data): install $ELCFILES
3068- (clean): renamed po-to-tbl and po-to-msg to po2tbl and po2msg resp.
3069-
3070- * elisp-comp: Initial revision
3071-
3072-Wed Jul 12 16:14:52 1995 Ulrich Drepper <drepper@myware>
3073-
3074- * Makefile.in:
3075- cat-id-tbl.c is now found in po/. This enables us to use an identical
3076- intl/ directory in all packages.
3077-
3078- * dcgettext.c (dcgettext): hashing does not work for table size <= 2.
3079-
3080- * textdomain.c: fix typo (#if def -> #if defined)
3081-
3082-Tue Jul 11 18:44:43 1995 Ulrich Drepper <drepper@myware>
3083-
3084- * Makefile.in (stamp-cat-id): use top_srcdir to address source files
3085- (DISTFILES,distclean): move tupdate.perl to src/
3086-
3087- * po-to-tbl.sed.in:
3088- add additional jump to clear change flag to recognize multiline strings
3089-
3090-Tue Jul 11 01:32:50 1995 Ulrich Drepper <drepper@myware>
3091-
3092- * textdomain.c: Protect inclusion of stdlib.h and string.h.
3093-
3094- * loadmsgcat.c: Protect inclusion of stdlib.h.
3095-
3096- * libgettext.h: Protect inclusion of locale.h.
3097- Allow use in C++ programs.
3098- Define NULL is not happened already.
3099-
3100- * Makefile.in (DISTFILES): ship po-to-tbl.sed.in instead of
3101- po-to-tbl.sed.
3102- (distclean): remove po-to-tbl.sed and tupdate.perl.
3103-
3104- * tupdate.perl.in: Substitute Perl path even in exec line.
3105- Don't include entries without translation from old .po file.
3106-
3107-Tue Jul 4 00:41:51 1995 Ulrich Drepper <drepper@myware>
3108-
3109- * tupdate.perl.in: use "Updated: " in msgid "".
3110-
3111- * cat-compat.c: Fix typo (LOCALDIR -> LOCALEDIR).
3112- Define getenv if !__STDC__.
3113-
3114- * bindtextdom.c: Protect stdlib.h and string.h inclusion.
3115- Define free if !__STDC__.
3116-
3117- * finddomain.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3118- Define free if !__STDC__.
3119-
3120- * cat-compat.c: Change DEF_MSG_DOM_DIR to LOCALEDIR.
3121-
3122-Mon Jul 3 23:56:30 1995 Ulrich Drepper <drepper@myware>
3123-
3124- * Makefile.in: Use LOCALEDIR instead of DEF_MSG_DOM_DIR.
3125- Remove unneeded $(srcdir) from Makefile.in dependency.
3126-
3127- * makelinks: Add copyright and short description.
3128-
3129- * po-mode.el: Last version for 0.7.
3130-
3131- * tupdate.perl.in: Fix die message.
3132-
3133- * dcgettext.c: Protect include of string.h.
3134-
3135- * gettext.c: Protect include of stdlib.h and further tries to get NULL.
3136-
3137- * finddomain.c: Some corrections in includes.
3138-
3139- * Makefile.in (INCLUDES): Prune list correct path to Makefile.in.
3140-
3141- * po-to-tbl.sed: Adopt for new .po file format.
3142-
3143- * linux-msg.sed, xopen-msg.sed: Adopt for new .po file format.
3144-
3145-Sun Jul 2 23:55:03 1995 Ulrich Drepper <drepper@myware>
3146-
3147- * tupdate.perl.in: Complete rewrite for new .po file format.
3148+2004-01-29 GNU <bug-gnu-gettext@gnu.org>
3149
3150-Sun Jul 2 02:06:50 1995 Ulrich Drepper <drepper@myware>
3151+ * Version 0.14.1 released.
3152
3153- * First official release. This directory contains all the code
3154- needed to internationalize own packages. It provides functions
3155- which allow to use the X/Open catgets function with an interface
3156- like the Uniforum gettext function. For system which does not
3157- have neither of those a complete implementation is provided.
3158--- lrzsz-0.12.20.safe/intl/config.charset 1969-12-31 19:00:00.000000000 -0500
3159+++ lrzsz-0.12.20/intl/config.charset 2004-09-12 14:40:34.354748240 -0400
3160@@ -0,0 +1,608 @@
3161+#! /bin/sh
3162+# Output a system dependent table of character encoding aliases.
3163+#
3164+# Copyright (C) 2000-2004 Free Software Foundation, Inc.
3165+#
3166+# This program is free software; you can redistribute it and/or modify it
3167+# under the terms of the GNU Library General Public License as published
3168+# by the Free Software Foundation; either version 2, or (at your option)
3169+# any later version.
3170+#
3171+# This program is distributed in the hope that it will be useful,
3172+# but WITHOUT ANY WARRANTY; without even the implied warranty of
3173+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3174+# Library General Public License for more details.
3175+#
3176+# You should have received a copy of the GNU Library General Public
3177+# License along with this program; if not, write to the Free Software
3178+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3179+# USA.
3180+#
3181+# The table consists of lines of the form
3182+# ALIAS CANONICAL
3183+#
3184+# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
3185+# ALIAS is compared in a case sensitive way.
3186+#
3187+# CANONICAL is the GNU canonical name for this character encoding.
3188+# It must be an encoding supported by libiconv. Support by GNU libc is
3189+# also desirable. CANONICAL is case insensitive. Usually an upper case
3190+# MIME charset name is preferred.
3191+# The current list of GNU canonical charset names is as follows.
3192+#
3193+# name MIME? used by which systems
3194+# ASCII, ANSI_X3.4-1968 glibc solaris freebsd darwin
3195+# ISO-8859-1 Y glibc aix hpux irix osf solaris freebsd darwin
3196+# ISO-8859-2 Y glibc aix hpux irix osf solaris freebsd darwin
3197+# ISO-8859-3 Y glibc solaris
3198+# ISO-8859-4 Y osf solaris freebsd darwin
3199+# ISO-8859-5 Y glibc aix hpux irix osf solaris freebsd darwin
3200+# ISO-8859-6 Y glibc aix hpux solaris
3201+# ISO-8859-7 Y glibc aix hpux irix osf solaris
3202+# ISO-8859-8 Y glibc aix hpux osf solaris
3203+# ISO-8859-9 Y glibc aix hpux irix osf solaris
3204+# ISO-8859-13 glibc
3205+# ISO-8859-14 glibc
3206+# ISO-8859-15 glibc aix osf solaris freebsd
3207+# KOI8-R Y glibc solaris freebsd darwin
3208+# KOI8-U Y glibc freebsd darwin
3209+# KOI8-T glibc
3210+# CP437 dos
3211+# CP775 dos
3212+# CP850 aix osf dos
3213+# CP852 dos
3214+# CP855 dos
3215+# CP856 aix
3216+# CP857 dos
3217+# CP861 dos
3218+# CP862 dos
3219+# CP864 dos
3220+# CP865 dos
3221+# CP866 freebsd darwin dos
3222+# CP869 dos
3223+# CP874 woe32 dos
3224+# CP922 aix
3225+# CP932 aix woe32 dos
3226+# CP943 aix
3227+# CP949 osf woe32 dos
3228+# CP950 woe32 dos
3229+# CP1046 aix
3230+# CP1124 aix
3231+# CP1125 dos
3232+# CP1129 aix
3233+# CP1250 woe32
3234+# CP1251 glibc solaris darwin woe32
3235+# CP1252 aix woe32
3236+# CP1253 woe32
3237+# CP1254 woe32
3238+# CP1255 glibc woe32
3239+# CP1256 woe32
3240+# CP1257 woe32
3241+# GB2312 Y glibc aix hpux irix solaris freebsd darwin
3242+# EUC-JP Y glibc aix hpux irix osf solaris freebsd darwin
3243+# EUC-KR Y glibc aix hpux irix osf solaris freebsd darwin
3244+# EUC-TW glibc aix hpux irix osf solaris
3245+# BIG5 Y glibc aix hpux osf solaris freebsd darwin
3246+# BIG5-HKSCS glibc solaris
3247+# GBK glibc aix osf solaris woe32 dos
3248+# GB18030 glibc solaris
3249+# SHIFT_JIS Y hpux osf solaris freebsd darwin
3250+# JOHAB glibc solaris woe32
3251+# TIS-620 glibc aix hpux osf solaris
3252+# VISCII Y glibc
3253+# TCVN5712-1 glibc
3254+# GEORGIAN-PS glibc
3255+# HP-ROMAN8 hpux
3256+# HP-ARABIC8 hpux
3257+# HP-GREEK8 hpux
3258+# HP-HEBREW8 hpux
3259+# HP-TURKISH8 hpux
3260+# HP-KANA8 hpux
3261+# DEC-KANJI osf
3262+# DEC-HANYU osf
3263+# UTF-8 Y glibc aix hpux osf solaris
3264+#
3265+# Note: Names which are not marked as being a MIME name should not be used in
3266+# Internet protocols for information interchange (mail, news, etc.).
3267+#
3268+# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
3269+# must understand both names and treat them as equivalent.
3270+#
3271+# The first argument passed to this file is the canonical host specification,
3272+# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
3273+# or
3274+# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
3275+
3276+host="$1"
3277+os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
3278+echo "# This file contains a table of character encoding aliases,"
3279+echo "# suitable for operating system '${os}'."
3280+echo "# It was automatically generated from config.charset."
3281+# List of references, updated during installation:
3282+echo "# Packages using this file: "
3283+case "$os" in
3284+ linux-gnulibc1*)
3285+ # Linux libc5 doesn't have nl_langinfo(CODESET); therefore
3286+ # localcharset.c falls back to using the full locale name
3287+ # from the environment variables.
3288+ echo "C ASCII"
3289+ echo "POSIX ASCII"
3290+ for l in af af_ZA ca ca_ES da da_DK de de_AT de_BE de_CH de_DE de_LU \
3291+ en en_AU en_BW en_CA en_DK en_GB en_IE en_NZ en_US en_ZA \
3292+ en_ZW es es_AR es_BO es_CL es_CO es_DO es_EC es_ES es_GT \
3293+ es_HN es_MX es_PA es_PE es_PY es_SV es_US es_UY es_VE et \
3294+ et_EE eu eu_ES fi fi_FI fo fo_FO fr fr_BE fr_CA fr_CH fr_FR \
3295+ fr_LU ga ga_IE gl gl_ES id id_ID in in_ID is is_IS it it_CH \
3296+ it_IT kl kl_GL nl nl_BE nl_NL no no_NO pt pt_BR pt_PT sv \
3297+ sv_FI sv_SE; do
3298+ echo "$l ISO-8859-1"
3299+ echo "$l.iso-8859-1 ISO-8859-1"
3300+ echo "$l.iso-8859-15 ISO-8859-15"
3301+ echo "$l.iso-8859-15@euro ISO-8859-15"
3302+ echo "$l@euro ISO-8859-15"
3303+ echo "$l.cp-437 CP437"
3304+ echo "$l.cp-850 CP850"
3305+ echo "$l.cp-1252 CP1252"
3306+ echo "$l.cp-1252@euro CP1252"
3307+ #echo "$l.atari-st ATARI-ST" # not a commonly used encoding
3308+ echo "$l.utf-8 UTF-8"
3309+ echo "$l.utf-8@euro UTF-8"
3310+ done
3311+ for l in cs cs_CZ hr hr_HR hu hu_HU pl pl_PL ro ro_RO sk sk_SK sl \
3312+ sl_SI sr sr_CS sr_YU; do
3313+ echo "$l ISO-8859-2"
3314+ echo "$l.iso-8859-2 ISO-8859-2"
3315+ echo "$l.cp-852 CP852"
3316+ echo "$l.cp-1250 CP1250"
3317+ echo "$l.utf-8 UTF-8"
3318+ done
3319+ for l in mk mk_MK ru ru_RU; do
3320+ echo "$l ISO-8859-5"
3321+ echo "$l.iso-8859-5 ISO-8859-5"
3322+ echo "$l.koi8-r KOI8-R"
3323+ echo "$l.cp-866 CP866"
3324+ echo "$l.cp-1251 CP1251"
3325+ echo "$l.utf-8 UTF-8"
3326+ done
3327+ for l in ar ar_SA; do
3328+ echo "$l ISO-8859-6"
3329+ echo "$l.iso-8859-6 ISO-8859-6"
3330+ echo "$l.cp-864 CP864"
3331+ #echo "$l.cp-868 CP868" # not a commonly used encoding
3332+ echo "$l.cp-1256 CP1256"
3333+ echo "$l.utf-8 UTF-8"
3334+ done
3335+ for l in el el_GR gr gr_GR; do
3336+ echo "$l ISO-8859-7"
3337+ echo "$l.iso-8859-7 ISO-8859-7"
3338+ echo "$l.cp-869 CP869"
3339+ echo "$l.cp-1253 CP1253"
3340+ echo "$l.cp-1253@euro CP1253"
3341+ echo "$l.utf-8 UTF-8"
3342+ echo "$l.utf-8@euro UTF-8"
3343+ done
3344+ for l in he he_IL iw iw_IL; do
3345+ echo "$l ISO-8859-8"
3346+ echo "$l.iso-8859-8 ISO-8859-8"
3347+ echo "$l.cp-862 CP862"
3348+ echo "$l.cp-1255 CP1255"
3349+ echo "$l.utf-8 UTF-8"
3350+ done
3351+ for l in tr tr_TR; do
3352+ echo "$l ISO-8859-9"
3353+ echo "$l.iso-8859-9 ISO-8859-9"
3354+ echo "$l.cp-857 CP857"
3355+ echo "$l.cp-1254 CP1254"
3356+ echo "$l.utf-8 UTF-8"
3357+ done
3358+ for l in lt lt_LT lv lv_LV; do
3359+ #echo "$l BALTIC" # not a commonly used encoding, wrong encoding name
3360+ echo "$l ISO-8859-13"
3361+ done
3362+ for l in ru_UA uk uk_UA; do
3363+ echo "$l KOI8-U"
3364+ done
3365+ for l in zh zh_CN; do
3366+ #echo "$l GB_2312-80" # not a commonly used encoding, wrong encoding name
3367+ echo "$l GB2312"
3368+ done
3369+ for l in ja ja_JP ja_JP.EUC; do
3370+ echo "$l EUC-JP"
3371+ done
3372+ for l in ko ko_KR; do
3373+ echo "$l EUC-KR"
3374+ done
3375+ for l in th th_TH; do
3376+ echo "$l TIS-620"
3377+ done
3378+ for l in fa fa_IR; do
3379+ #echo "$l ISIRI-3342" # a broken encoding
3380+ echo "$l.utf-8 UTF-8"
3381+ done
3382+ ;;
3383+ linux* | *-gnu*)
3384+ # With glibc-2.1 or newer, we don't need any canonicalization,
3385+ # because glibc has iconv and both glibc and libiconv support all
3386+ # GNU canonical names directly. Therefore, the Makefile does not
3387+ # need to install the alias file at all.
3388+ # The following applies only to glibc-2.0.x and older libcs.
3389+ echo "ISO_646.IRV:1983 ASCII"
3390+ ;;
3391+ aix*)
3392+ echo "ISO8859-1 ISO-8859-1"
3393+ echo "ISO8859-2 ISO-8859-2"
3394+ echo "ISO8859-5 ISO-8859-5"
3395+ echo "ISO8859-6 ISO-8859-6"
3396+ echo "ISO8859-7 ISO-8859-7"
3397+ echo "ISO8859-8 ISO-8859-8"
3398+ echo "ISO8859-9 ISO-8859-9"
3399+ echo "ISO8859-15 ISO-8859-15"
3400+ echo "IBM-850 CP850"
3401+ echo "IBM-856 CP856"
3402+ echo "IBM-921 ISO-8859-13"
3403+ echo "IBM-922 CP922"
3404+ echo "IBM-932 CP932"
3405+ echo "IBM-943 CP943"
3406+ echo "IBM-1046 CP1046"
3407+ echo "IBM-1124 CP1124"
3408+ echo "IBM-1129 CP1129"
3409+ echo "IBM-1252 CP1252"
3410+ echo "IBM-eucCN GB2312"
3411+ echo "IBM-eucJP EUC-JP"
3412+ echo "IBM-eucKR EUC-KR"
3413+ echo "IBM-eucTW EUC-TW"
3414+ echo "big5 BIG5"
3415+ echo "GBK GBK"
3416+ echo "TIS-620 TIS-620"
3417+ echo "UTF-8 UTF-8"
3418+ ;;
3419+ hpux*)
3420+ echo "iso88591 ISO-8859-1"
3421+ echo "iso88592 ISO-8859-2"
3422+ echo "iso88595 ISO-8859-5"
3423+ echo "iso88596 ISO-8859-6"
3424+ echo "iso88597 ISO-8859-7"
3425+ echo "iso88598 ISO-8859-8"
3426+ echo "iso88599 ISO-8859-9"
3427+ echo "iso885915 ISO-8859-15"
3428+ echo "roman8 HP-ROMAN8"
3429+ echo "arabic8 HP-ARABIC8"
3430+ echo "greek8 HP-GREEK8"
3431+ echo "hebrew8 HP-HEBREW8"
3432+ echo "turkish8 HP-TURKISH8"
3433+ echo "kana8 HP-KANA8"
3434+ echo "tis620 TIS-620"
3435+ echo "big5 BIG5"
3436+ echo "eucJP EUC-JP"
3437+ echo "eucKR EUC-KR"
3438+ echo "eucTW EUC-TW"
3439+ echo "hp15CN GB2312"
3440+ #echo "ccdc ?" # what is this?
3441+ echo "SJIS SHIFT_JIS"
3442+ echo "utf8 UTF-8"
3443+ ;;
3444+ irix*)
3445+ echo "ISO8859-1 ISO-8859-1"
3446+ echo "ISO8859-2 ISO-8859-2"
3447+ echo "ISO8859-5 ISO-8859-5"
3448+ echo "ISO8859-7 ISO-8859-7"
3449+ echo "ISO8859-9 ISO-8859-9"
3450+ echo "eucCN GB2312"
3451+ echo "eucJP EUC-JP"
3452+ echo "eucKR EUC-KR"
3453+ echo "eucTW EUC-TW"
3454+ ;;
3455+ osf*)
3456+ echo "ISO8859-1 ISO-8859-1"
3457+ echo "ISO8859-2 ISO-8859-2"
3458+ echo "ISO8859-4 ISO-8859-4"
3459+ echo "ISO8859-5 ISO-8859-5"
3460+ echo "ISO8859-7 ISO-8859-7"
3461+ echo "ISO8859-8 ISO-8859-8"
3462+ echo "ISO8859-9 ISO-8859-9"
3463+ echo "ISO8859-15 ISO-8859-15"
3464+ echo "cp850 CP850"
3465+ echo "big5 BIG5"
3466+ echo "dechanyu DEC-HANYU"
3467+ echo "dechanzi GB2312"
3468+ echo "deckanji DEC-KANJI"
3469+ echo "deckorean EUC-KR"
3470+ echo "eucJP EUC-JP"
3471+ echo "eucKR EUC-KR"
3472+ echo "eucTW EUC-TW"
3473+ echo "GBK GBK"
3474+ echo "KSC5601 CP949"
3475+ echo "sdeckanji EUC-JP"
3476+ echo "SJIS SHIFT_JIS"
3477+ echo "TACTIS TIS-620"
3478+ echo "UTF-8 UTF-8"
3479+ ;;
3480+ solaris*)
3481+ echo "646 ASCII"
3482+ echo "ISO8859-1 ISO-8859-1"
3483+ echo "ISO8859-2 ISO-8859-2"
3484+ echo "ISO8859-3 ISO-8859-3"
3485+ echo "ISO8859-4 ISO-8859-4"
3486+ echo "ISO8859-5 ISO-8859-5"
3487+ echo "ISO8859-6 ISO-8859-6"
3488+ echo "ISO8859-7 ISO-8859-7"
3489+ echo "ISO8859-8 ISO-8859-8"
3490+ echo "ISO8859-9 ISO-8859-9"
3491+ echo "ISO8859-15 ISO-8859-15"
3492+ echo "koi8-r KOI8-R"
3493+ echo "ansi-1251 CP1251"
3494+ echo "BIG5 BIG5"
3495+ echo "Big5-HKSCS BIG5-HKSCS"
3496+ echo "gb2312 GB2312"
3497+ echo "GBK GBK"
3498+ echo "GB18030 GB18030"
3499+ echo "cns11643 EUC-TW"
3500+ echo "5601 EUC-KR"
3501+ echo "ko_KR.johap92 JOHAB"
3502+ echo "eucJP EUC-JP"
3503+ echo "PCK SHIFT_JIS"
3504+ echo "TIS620.2533 TIS-620"
3505+ #echo "sun_eu_greek ?" # what is this?
3506+ echo "UTF-8 UTF-8"
3507+ ;;
3508+ freebsd* | os2*)
3509+ # FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
3510+ # localcharset.c falls back to using the full locale name
3511+ # from the environment variables.
3512+ # Likewise for OS/2. OS/2 has XFree86 just like FreeBSD. Just
3513+ # reuse FreeBSD's locale data for OS/2.
3514+ echo "C ASCII"
3515+ echo "US-ASCII ASCII"
3516+ for l in la_LN lt_LN; do
3517+ echo "$l.ASCII ASCII"
3518+ done
3519+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3520+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
3521+ lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
3522+ echo "$l.ISO_8859-1 ISO-8859-1"
3523+ echo "$l.DIS_8859-15 ISO-8859-15"
3524+ done
3525+ for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
3526+ echo "$l.ISO_8859-2 ISO-8859-2"
3527+ done
3528+ for l in la_LN lt_LT; do
3529+ echo "$l.ISO_8859-4 ISO-8859-4"
3530+ done
3531+ for l in ru_RU ru_SU; do
3532+ echo "$l.KOI8-R KOI8-R"
3533+ echo "$l.ISO_8859-5 ISO-8859-5"
3534+ echo "$l.CP866 CP866"
3535+ done
3536+ echo "uk_UA.KOI8-U KOI8-U"
3537+ echo "zh_TW.BIG5 BIG5"
3538+ echo "zh_TW.Big5 BIG5"
3539+ echo "zh_CN.EUC GB2312"
3540+ echo "ja_JP.EUC EUC-JP"
3541+ echo "ja_JP.SJIS SHIFT_JIS"
3542+ echo "ja_JP.Shift_JIS SHIFT_JIS"
3543+ echo "ko_KR.EUC EUC-KR"
3544+ ;;
3545+ netbsd*)
3546+ echo "646 ASCII"
3547+ echo "ISO8859-1 ISO-8859-1"
3548+ echo "ISO8859-2 ISO-8859-2"
3549+ echo "ISO8859-4 ISO-8859-4"
3550+ echo "ISO8859-5 ISO-8859-5"
3551+ echo "ISO8859-15 ISO-8859-15"
3552+ echo "eucCN GB2312"
3553+ echo "eucJP EUC-JP"
3554+ echo "eucKR EUC-KR"
3555+ echo "eucTW EUC-TW"
3556+ echo "BIG5 BIG5"
3557+ echo "SJIS SHIFT_JIS"
3558+ ;;
3559+ darwin*)
3560+ # Darwin 6.8 doesn't have nl_langinfo(CODESET); therefore
3561+ # localcharset.c falls back to using the full locale name
3562+ # from the environment variables.
3563+ echo "C ASCII"
3564+ for l in en_AU en_CA en_GB en_US la_LN; do
3565+ echo "$l.US-ASCII ASCII"
3566+ done
3567+ for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
3568+ fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT nl_BE \
3569+ nl_NL no_NO pt_PT sv_SE; do
3570+ echo "$l ISO-8859-1"
3571+ echo "$l.ISO8859-1 ISO-8859-1"
3572+ echo "$l.ISO8859-15 ISO-8859-15"
3573+ done
3574+ for l in la_LN; do
3575+ echo "$l.ISO8859-1 ISO-8859-1"
3576+ echo "$l.ISO8859-15 ISO-8859-15"
3577+ done
3578+ for l in cs_CZ hr_HR hu_HU la_LN pl_PL sl_SI; do
3579+ echo "$l.ISO8859-2 ISO-8859-2"
3580+ done
3581+ for l in la_LN lt_LT; do
3582+ echo "$l.ISO8859-4 ISO-8859-4"
3583+ done
3584+ for l in ru_RU; do
3585+ echo "$l.KOI8-R KOI8-R"
3586+ echo "$l.ISO8859-5 ISO-8859-5"
3587+ echo "$l.CP866 CP866"
3588+ done
3589+ for l in bg_BG; do
3590+ echo "$l.CP1251 CP1251"
3591+ done
3592+ echo "uk_UA.KOI8-U KOI8-U"
3593+ echo "zh_TW.BIG5 BIG5"
3594+ echo "zh_TW.Big5 BIG5"
3595+ echo "zh_CN.EUC GB2312"
3596+ echo "ja_JP.EUC EUC-JP"
3597+ echo "ja_JP.SJIS SHIFT_JIS"
3598+ echo "ko_KR.EUC EUC-KR"
3599+ ;;
3600+ beos*)
3601+ # BeOS has a single locale, and it has UTF-8 encoding.
3602+ echo "* UTF-8"
3603+ ;;
3604+ msdosdjgpp*)
3605+ # DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
3606+ # localcharset.c falls back to using the full locale name
3607+ # from the environment variables.
3608+ echo "#"
3609+ echo "# The encodings given here may not all be correct."
3610+ echo "# If you find that the encoding given for your language and"
3611+ echo "# country is not the one your DOS machine actually uses, just"
3612+ echo "# correct it in this file, and send a mail to"
3613+ echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
3614+ echo "# and Bruno Haible <bruno@clisp.org>."
3615+ echo "#"
3616+ echo "C ASCII"
3617+ # ISO-8859-1 languages
3618+ echo "ca CP850"
3619+ echo "ca_ES CP850"
3620+ echo "da CP865" # not CP850 ??
3621+ echo "da_DK CP865" # not CP850 ??
3622+ echo "de CP850"
3623+ echo "de_AT CP850"
3624+ echo "de_CH CP850"
3625+ echo "de_DE CP850"
3626+ echo "en CP850"
3627+ echo "en_AU CP850" # not CP437 ??
3628+ echo "en_CA CP850"
3629+ echo "en_GB CP850"
3630+ echo "en_NZ CP437"
3631+ echo "en_US CP437"
3632+ echo "en_ZA CP850" # not CP437 ??
3633+ echo "es CP850"
3634+ echo "es_AR CP850"
3635+ echo "es_BO CP850"
3636+ echo "es_CL CP850"
3637+ echo "es_CO CP850"
3638+ echo "es_CR CP850"
3639+ echo "es_CU CP850"
3640+ echo "es_DO CP850"
3641+ echo "es_EC CP850"
3642+ echo "es_ES CP850"
3643+ echo "es_GT CP850"
3644+ echo "es_HN CP850"
3645+ echo "es_MX CP850"
3646+ echo "es_NI CP850"
3647+ echo "es_PA CP850"
3648+ echo "es_PY CP850"
3649+ echo "es_PE CP850"
3650+ echo "es_SV CP850"
3651+ echo "es_UY CP850"
3652+ echo "es_VE CP850"
3653+ echo "et CP850"
3654+ echo "et_EE CP850"
3655+ echo "eu CP850"
3656+ echo "eu_ES CP850"
3657+ echo "fi CP850"
3658+ echo "fi_FI CP850"
3659+ echo "fr CP850"
3660+ echo "fr_BE CP850"
3661+ echo "fr_CA CP850"
3662+ echo "fr_CH CP850"
3663+ echo "fr_FR CP850"
3664+ echo "ga CP850"
3665+ echo "ga_IE CP850"
3666+ echo "gd CP850"
3667+ echo "gd_GB CP850"
3668+ echo "gl CP850"
3669+ echo "gl_ES CP850"
3670+ echo "id CP850" # not CP437 ??
3671+ echo "id_ID CP850" # not CP437 ??
3672+ echo "is CP861" # not CP850 ??
3673+ echo "is_IS CP861" # not CP850 ??
3674+ echo "it CP850"
3675+ echo "it_CH CP850"
3676+ echo "it_IT CP850"
3677+ echo "lt CP775"
3678+ echo "lt_LT CP775"
3679+ echo "lv CP775"
3680+ echo "lv_LV CP775"
3681+ echo "nb CP865" # not CP850 ??
3682+ echo "nb_NO CP865" # not CP850 ??
3683+ echo "nl CP850"
3684+ echo "nl_BE CP850"
3685+ echo "nl_NL CP850"
3686+ echo "nn CP865" # not CP850 ??
3687+ echo "nn_NO CP865" # not CP850 ??
3688+ echo "no CP865" # not CP850 ??
3689+ echo "no_NO CP865" # not CP850 ??
3690+ echo "pt CP850"
3691+ echo "pt_BR CP850"
3692+ echo "pt_PT CP850"
3693+ echo "sv CP850"
3694+ echo "sv_SE CP850"
3695+ # ISO-8859-2 languages
3696+ echo "cs CP852"
3697+ echo "cs_CZ CP852"
3698+ echo "hr CP852"
3699+ echo "hr_HR CP852"
3700+ echo "hu CP852"
3701+ echo "hu_HU CP852"
3702+ echo "pl CP852"
3703+ echo "pl_PL CP852"
3704+ echo "ro CP852"
3705+ echo "ro_RO CP852"
3706+ echo "sk CP852"
3707+ echo "sk_SK CP852"
3708+ echo "sl CP852"
3709+ echo "sl_SI CP852"
3710+ echo "sq CP852"
3711+ echo "sq_AL CP852"
3712+ echo "sr CP852" # CP852 or CP866 or CP855 ??
3713+ echo "sr_CS CP852" # CP852 or CP866 or CP855 ??
3714+ echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
3715+ # ISO-8859-3 languages
3716+ echo "mt CP850"
3717+ echo "mt_MT CP850"
3718+ # ISO-8859-5 languages
3719+ echo "be CP866"
3720+ echo "be_BE CP866"
3721+ echo "bg CP866" # not CP855 ??
3722+ echo "bg_BG CP866" # not CP855 ??
3723+ echo "mk CP866" # not CP855 ??
3724+ echo "mk_MK CP866" # not CP855 ??
3725+ echo "ru CP866"
3726+ echo "ru_RU CP866"
3727+ echo "uk CP1125"
3728+ echo "uk_UA CP1125"
3729+ # ISO-8859-6 languages
3730+ echo "ar CP864"
3731+ echo "ar_AE CP864"
3732+ echo "ar_DZ CP864"
3733+ echo "ar_EG CP864"
3734+ echo "ar_IQ CP864"
3735+ echo "ar_IR CP864"
3736+ echo "ar_JO CP864"
3737+ echo "ar_KW CP864"
3738+ echo "ar_MA CP864"
3739+ echo "ar_OM CP864"
3740+ echo "ar_QA CP864"
3741+ echo "ar_SA CP864"
3742+ echo "ar_SY CP864"
3743+ # ISO-8859-7 languages
3744+ echo "el CP869"
3745+ echo "el_GR CP869"
3746+ # ISO-8859-8 languages
3747+ echo "he CP862"
3748+ echo "he_IL CP862"
3749+ # ISO-8859-9 languages
3750+ echo "tr CP857"
3751+ echo "tr_TR CP857"
3752+ # Japanese
3753+ echo "ja CP932"
3754+ echo "ja_JP CP932"
3755+ # Chinese
3756+ echo "zh_CN GBK"
3757+ echo "zh_TW CP950" # not CP938 ??
3758+ # Korean
3759+ echo "kr CP949" # not CP934 ??
3760+ echo "kr_KR CP949" # not CP934 ??
3761+ # Thai
3762+ echo "th CP874"
3763+ echo "th_TH CP874"
3764+ # Other
3765+ echo "eo CP850"
3766+ echo "eo_EO CP850"
3767+ ;;
3768+esac
3769--- lrzsz-0.12.20.safe/intl/dcgettext.c 1998-04-26 09:22:36.000000000 -0400
3770+++ lrzsz-0.12.20/intl/dcgettext.c 2004-09-12 14:40:34.359747480 -0400
3771@@ -1,593 +1,56 @@
3772-/* Implementation of the dcgettext(3) function
3773- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
3774+/* Implementation of the dcgettext(3) function.
3775+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
3776
3777- This program is free software; you can redistribute it and/or modify
3778- it under the terms of the GNU General Public License as published by
3779- the Free Software Foundation; either version 2, or (at your option)
3780+ This program is free software; you can redistribute it and/or modify it
3781+ under the terms of the GNU Library General Public License as published
3782+ by the Free Software Foundation; either version 2, or (at your option)
3783 any later version.
3784
3785 This program is distributed in the hope that it will be useful,
3786 but WITHOUT ANY WARRANTY; without even the implied warranty of
3787- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
3788- GNU General Public License for more details.
3789+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
3790+ Library General Public License for more details.
3791
3792- You should have received a copy of the GNU General Public License
3793- along with this program; if not, write to the Free Software Foundation,
3794- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
3795+ You should have received a copy of the GNU Library General Public
3796+ License along with this program; if not, write to the Free Software
3797+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
3798+ USA. */
3799
3800 #ifdef HAVE_CONFIG_H
3801 # include <config.h>
3802 #endif
3803
3804-#include <sys/types.h>
3805-
3806-#ifdef __GNUC__
3807-# define alloca __builtin_alloca
3808-# define HAVE_ALLOCA 1
3809-#else
3810-# if defined HAVE_ALLOCA_H || defined _LIBC
3811-# include <alloca.h>
3812-# else
3813-# ifdef _AIX
3814- #pragma alloca
3815-# else
3816-# ifndef alloca
3817-char *alloca ();
3818-# endif
3819-# endif
3820-# endif
3821-#endif
3822-
3823-#include <errno.h>
3824-#ifndef errno
3825-extern int errno;
3826-#endif
3827-#ifndef __set_errno
3828-# define __set_errno(val) errno = (val)
3829-#endif
3830-
3831-#if defined STDC_HEADERS || defined _LIBC
3832-# include <stdlib.h>
3833-#else
3834-char *getenv ();
3835-# ifdef HAVE_MALLOC_H
3836-# include <malloc.h>
3837-# else
3838-void free ();
3839-# endif
3840-#endif
3841-
3842-#if defined HAVE_STRING_H || defined _LIBC
3843-# ifndef _GNU_SOURCE
3844-# define _GNU_SOURCE 1
3845-# endif
3846-# include <string.h>
3847-#else
3848-# include <strings.h>
3849-#endif
3850-#if !HAVE_STRCHR && !defined _LIBC
3851-# ifndef strchr
3852-# define strchr index
3853-# endif
3854-#endif
3855-
3856-#if defined HAVE_UNISTD_H || defined _LIBC
3857-# include <unistd.h>
3858-#endif
3859-
3860-#include "gettext.h"
3861 #include "gettextP.h"
3862 #ifdef _LIBC
3863 # include <libintl.h>
3864 #else
3865-# include "libgettext.h"
3866+# include "libgnuintl.h"
3867 #endif
3868-#include "hash-string.h"
3869
3870 /* @@ end of prolog @@ */
3871
3872-#ifdef _LIBC
3873-/* Rename the non ANSI C functions. This is required by the standard
3874- because some ANSI C functions will require linking with this object
3875- file and the name space must not be polluted. */
3876-# define getcwd __getcwd
3877-# define stpcpy __stpcpy
3878-#else
3879-# if !defined HAVE_GETCWD
3880-char *getwd ();
3881-# define getcwd(buf, max) getwd (buf)
3882-# else
3883-char *getcwd ();
3884-# endif
3885-# ifndef HAVE_STPCPY
3886-static char *stpcpy PARAMS ((char *dest, const char *src));
3887-# endif
3888-#endif
3889-
3890-/* Amount to increase buffer size by in each try. */
3891-#define PATH_INCR 32
3892-
3893-/* The following is from pathmax.h. */
3894-/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
3895- PATH_MAX but might cause redefinition warnings when sys/param.h is
3896- later included (as on MORE/BSD 4.3). */
3897-#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
3898-# include <limits.h>
3899-#endif
3900-
3901-#ifndef _POSIX_PATH_MAX
3902-# define _POSIX_PATH_MAX 255
3903-#endif
3904-
3905-#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
3906-# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
3907-#endif
3908-
3909-/* Don't include sys/param.h if it already has been. */
3910-#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
3911-# include <sys/param.h>
3912-#endif
3913-
3914-#if !defined(PATH_MAX) && defined(MAXPATHLEN)
3915-# define PATH_MAX MAXPATHLEN
3916-#endif
3917-
3918-#ifndef PATH_MAX
3919-# define PATH_MAX _POSIX_PATH_MAX
3920-#endif
3921-
3922-/* XPG3 defines the result of `setlocale (category, NULL)' as:
3923- ``Directs `setlocale()' to query `category' and return the current
3924- setting of `local'.''
3925- However it does not specify the exact format. And even worse: POSIX
3926- defines this not at all. So we can use this feature only on selected
3927- system (e.g. those using GNU C Library). */
3928-#ifdef _LIBC
3929-# define HAVE_LOCALE_NULL
3930-#endif
3931-
3932-/* Name of the default domain used for gettext(3) prior any call to
3933- textdomain(3). The default value for this is "messages". */
3934-const char _nl_default_default_domain[] = "messages";
3935-
3936-/* Value used as the default domain for gettext(3). */
3937-const char *_nl_current_default_domain = _nl_default_default_domain;
3938-
3939-/* Contains the default location of the message catalogs. */
3940-const char _nl_default_dirname[] = GNULOCALEDIR;
3941-
3942-/* List with bindings of specific domains created by bindtextdomain()
3943- calls. */
3944-struct binding *_nl_domain_bindings;
3945-
3946-/* Prototypes for local functions. */
3947-static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
3948- const char *msgid));
3949-static const char *category_to_name PARAMS ((int category));
3950-static const char *guess_category_value PARAMS ((int category,
3951- const char *categoryname));
3952-
3953-
3954-/* For those loosing systems which don't have `alloca' we have to add
3955- some additional code emulating it. */
3956-#ifdef HAVE_ALLOCA
3957-/* Nothing has to be done. */
3958-# define ADD_BLOCK(list, address) /* nothing */
3959-# define FREE_BLOCKS(list) /* nothing */
3960-#else
3961-struct block_list
3962-{
3963- void *address;
3964- struct block_list *next;
3965-};
3966-# define ADD_BLOCK(list, addr) \
3967- do { \
3968- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
3969- /* If we cannot get a free block we cannot add the new element to \
3970- the list. */ \
3971- if (newp != NULL) { \
3972- newp->address = (addr); \
3973- newp->next = (list); \
3974- (list) = newp; \
3975- } \
3976- } while (0)
3977-# define FREE_BLOCKS(list) \
3978- do { \
3979- while (list != NULL) { \
3980- struct block_list *old = list; \
3981- list = list->next; \
3982- free (old); \
3983- } \
3984- } while (0)
3985-# undef alloca
3986-# define alloca(size) (malloc (size))
3987-#endif /* have alloca */
3988-
3989-
3990 /* Names for the libintl functions are a problem. They must not clash
3991 with existing names and they should follow ANSI C. But this source
3992 code is also used in GNU C Library where the names have a __
3993 prefix. So we have to make a difference here. */
3994 #ifdef _LIBC
3995 # define DCGETTEXT __dcgettext
3996+# define DCIGETTEXT __dcigettext
3997 #else
3998-# define DCGETTEXT dcgettext__
3999+# define DCGETTEXT libintl_dcgettext
4000+# define DCIGETTEXT libintl_dcigettext
4001 #endif
4002
4003 /* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
4004 locale. */
4005 char *
4006-DCGETTEXT (domainname, msgid, category)
4007- const char *domainname;
4008- const char *msgid;
4009- int category;
4010+DCGETTEXT (const char *domainname, const char *msgid, int category)
4011 {
4012-#ifndef HAVE_ALLOCA
4013- struct block_list *block_list = NULL;
4014-#endif
4015- struct loaded_l10nfile *domain;
4016- struct binding *binding;
4017- const char *categoryname;
4018- const char *categoryvalue;
4019- char *dirname, *xdomainname;
4020- char *single_locale;
4021- char *retval;
4022- int saved_errno = errno;
4023-
4024- /* If no real MSGID is given return NULL. */
4025- if (msgid == NULL)
4026- return NULL;
4027-
4028- /* If DOMAINNAME is NULL, we are interested in the default domain. If
4029- CATEGORY is not LC_MESSAGES this might not make much sense but the
4030- defintion left this undefined. */
4031- if (domainname == NULL)
4032- domainname = _nl_current_default_domain;
4033-
4034- /* First find matching binding. */
4035- for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4036- {
4037- int compare = strcmp (domainname, binding->domainname);
4038- if (compare == 0)
4039- /* We found it! */
4040- break;
4041- if (compare < 0)
4042- {
4043- /* It is not in the list. */
4044- binding = NULL;
4045- break;
4046- }
4047- }
4048-
4049- if (binding == NULL)
4050- dirname = (char *) _nl_default_dirname;
4051- else if (binding->dirname[0] == '/')
4052- dirname = binding->dirname;
4053- else
4054- {
4055- /* We have a relative path. Make it absolute now. */
4056- size_t dirname_len = strlen (binding->dirname) + 1;
4057- size_t path_max;
4058- char *ret;
4059-
4060- path_max = (unsigned) PATH_MAX;
4061- path_max += 2; /* The getcwd docs say to do this. */
4062-
4063- dirname = (char *) alloca (path_max + dirname_len);
4064- ADD_BLOCK (block_list, dirname);
4065-
4066- __set_errno (0);
4067- while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
4068- {
4069- path_max += PATH_INCR;
4070- dirname = (char *) alloca (path_max + dirname_len);
4071- ADD_BLOCK (block_list, dirname);
4072- __set_errno (0);
4073- }
4074-
4075- if (ret == NULL)
4076- {
4077- /* We cannot get the current working directory. Don't signal an
4078- error but simply return the default string. */
4079- FREE_BLOCKS (block_list);
4080- __set_errno (saved_errno);
4081- return (char *) msgid;
4082- }
4083-
4084- stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4085- }
4086-
4087- /* Now determine the symbolic name of CATEGORY and its value. */
4088- categoryname = category_to_name (category);
4089- categoryvalue = guess_category_value (category, categoryname);
4090-
4091- xdomainname = (char *) alloca (strlen (categoryname)
4092- + strlen (domainname) + 5);
4093- ADD_BLOCK (block_list, xdomainname);
4094-
4095- stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4096- domainname),
4097- ".mo");
4098-
4099- /* Creating working area. */
4100- single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4101- ADD_BLOCK (block_list, single_locale);
4102-
4103-
4104- /* Search for the given string. This is a loop because we perhaps
4105- got an ordered list of languages to consider for th translation. */
4106- while (1)
4107- {
4108- /* Make CATEGORYVALUE point to the next element of the list. */
4109- while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4110- ++categoryvalue;
4111- if (categoryvalue[0] == '\0')
4112- {
4113- /* The whole contents of CATEGORYVALUE has been searched but
4114- no valid entry has been found. We solve this situation
4115- by implicitly appending a "C" entry, i.e. no translation
4116- will take place. */
4117- single_locale[0] = 'C';
4118- single_locale[1] = '\0';
4119- }
4120- else
4121- {
4122- char *cp = single_locale;
4123- while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4124- *cp++ = *categoryvalue++;
4125- *cp = '\0';
4126- }
4127-
4128- /* If the current locale value is C (or POSIX) we don't load a
4129- domain. Return the MSGID. */
4130- if (strcmp (single_locale, "C") == 0
4131- || strcmp (single_locale, "POSIX") == 0)
4132- {
4133- FREE_BLOCKS (block_list);
4134- __set_errno (saved_errno);
4135- return (char *) msgid;
4136- }
4137-
4138-
4139- /* Find structure describing the message catalog matching the
4140- DOMAINNAME and CATEGORY. */
4141- domain = _nl_find_domain (dirname, single_locale, xdomainname);
4142-
4143- if (domain != NULL)
4144- {
4145- retval = find_msg (domain, msgid);
4146-
4147- if (retval == NULL)
4148- {
4149- int cnt;
4150-
4151- for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
4152- {
4153- retval = find_msg (domain->successor[cnt], msgid);
4154-
4155- if (retval != NULL)
4156- break;
4157- }
4158- }
4159-
4160- if (retval != NULL)
4161- {
4162- FREE_BLOCKS (block_list);
4163- __set_errno (saved_errno);
4164- return retval;
4165- }
4166- }
4167- }
4168- /* NOTREACHED */
4169+ return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
4170 }
4171
4172 #ifdef _LIBC
4173 /* Alias for function name in GNU C Library. */
4174+INTDEF(__dcgettext)
4175 weak_alias (__dcgettext, dcgettext);
4176 #endif
4177-
4178-
4179-static char *
4180-find_msg (domain_file, msgid)
4181- struct loaded_l10nfile *domain_file;
4182- const char *msgid;
4183-{
4184- size_t top, act, bottom;
4185- struct loaded_domain *domain;
4186-
4187- if (domain_file->decided == 0)
4188- _nl_load_domain (domain_file);
4189-
4190- if (domain_file->data == NULL)
4191- return NULL;
4192-
4193- domain = (struct loaded_domain *) domain_file->data;
4194-
4195- /* Locate the MSGID and its translation. */
4196- if (domain->hash_size > 2 && domain->hash_tab != NULL)
4197- {
4198- /* Use the hashing table. */
4199- nls_uint32 len = strlen (msgid);
4200- nls_uint32 hash_val = hash_string (msgid);
4201- nls_uint32 idx = hash_val % domain->hash_size;
4202- nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
4203- nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
4204-
4205- if (nstr == 0)
4206- /* Hash table entry is empty. */
4207- return NULL;
4208-
4209- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4210- && strcmp (msgid,
4211- domain->data + W (domain->must_swap,
4212- domain->orig_tab[nstr - 1].offset)) == 0)
4213- return (char *) domain->data + W (domain->must_swap,
4214- domain->trans_tab[nstr - 1].offset);
4215-
4216- while (1)
4217- {
4218- if (idx >= domain->hash_size - incr)
4219- idx -= domain->hash_size - incr;
4220- else
4221- idx += incr;
4222-
4223- nstr = W (domain->must_swap, domain->hash_tab[idx]);
4224- if (nstr == 0)
4225- /* Hash table entry is empty. */
4226- return NULL;
4227-
4228- if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
4229- && strcmp (msgid,
4230- domain->data + W (domain->must_swap,
4231- domain->orig_tab[nstr - 1].offset))
4232- == 0)
4233- return (char *) domain->data
4234- + W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
4235- }
4236- /* NOTREACHED */
4237- }
4238-
4239- /* Now we try the default method: binary search in the sorted
4240- array of messages. */
4241- bottom = 0;
4242- top = domain->nstrings;
4243- while (bottom < top)
4244- {
4245- int cmp_val;
4246-
4247- act = (bottom + top) / 2;
4248- cmp_val = strcmp (msgid, domain->data
4249- + W (domain->must_swap,
4250- domain->orig_tab[act].offset));
4251- if (cmp_val < 0)
4252- top = act;
4253- else if (cmp_val > 0)
4254- bottom = act + 1;
4255- else
4256- break;
4257- }
4258-
4259- /* If an translation is found return this. */
4260- return bottom >= top ? NULL : (char *) domain->data
4261- + W (domain->must_swap,
4262- domain->trans_tab[act].offset);
4263-}
4264-
4265-
4266-/* Return string representation of locale CATEGORY. */
4267-static const char *
4268-category_to_name (category)
4269- int category;
4270-{
4271- const char *retval;
4272-
4273- switch (category)
4274- {
4275-#ifdef LC_COLLATE
4276- case LC_COLLATE:
4277- retval = "LC_COLLATE";
4278- break;
4279-#endif
4280-#ifdef LC_CTYPE
4281- case LC_CTYPE:
4282- retval = "LC_CTYPE";
4283- break;
4284-#endif
4285-#ifdef LC_MONETARY
4286- case LC_MONETARY:
4287- retval = "LC_MONETARY";
4288- break;
4289-#endif
4290-#ifdef LC_NUMERIC
4291- case LC_NUMERIC:
4292- retval = "LC_NUMERIC";
4293- break;
4294-#endif
4295-#ifdef LC_TIME
4296- case LC_TIME:
4297- retval = "LC_TIME";
4298- break;
4299-#endif
4300-#ifdef LC_MESSAGES
4301- case LC_MESSAGES:
4302- retval = "LC_MESSAGES";
4303- break;
4304-#endif
4305-#ifdef LC_RESPONSE
4306- case LC_RESPONSE:
4307- retval = "LC_RESPONSE";
4308- break;
4309-#endif
4310-#ifdef LC_ALL
4311- case LC_ALL:
4312- /* This might not make sense but is perhaps better than any other
4313- value. */
4314- retval = "LC_ALL";
4315- break;
4316-#endif
4317- default:
4318- /* If you have a better idea for a default value let me know. */
4319- retval = "LC_XXX";
4320- }
4321-
4322- return retval;
4323-}
4324-
4325-/* Guess value of current locale from value of the environment variables. */
4326-static const char *
4327-guess_category_value (category, categoryname)
4328- int category;
4329- const char *categoryname;
4330-{
4331- const char *retval;
4332-
4333- /* The highest priority value is the `LANGUAGE' environment
4334- variable. This is a GNU extension. */
4335- retval = getenv ("LANGUAGE");
4336- if (retval != NULL && retval[0] != '\0')
4337- return retval;
4338-
4339- /* `LANGUAGE' is not set. So we have to proceed with the POSIX
4340- methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
4341- systems this can be done by the `setlocale' function itself. */
4342-#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
4343- return setlocale (category, NULL);
4344-#else
4345- /* Setting of LC_ALL overwrites all other. */
4346- retval = getenv ("LC_ALL");
4347- if (retval != NULL && retval[0] != '\0')
4348- return retval;
4349-
4350- /* Next comes the name of the desired category. */
4351- retval = getenv (categoryname);
4352- if (retval != NULL && retval[0] != '\0')
4353- return retval;
4354-
4355- /* Last possibility is the LANG environment variable. */
4356- retval = getenv ("LANG");
4357- if (retval != NULL && retval[0] != '\0')
4358- return retval;
4359-
4360- /* We use C as the default domain. POSIX says this is implementation
4361- defined. */
4362- return "C";
4363-#endif
4364-}
4365-
4366-/* @@ begin of epilog @@ */
4367-
4368-/* We don't want libintl.a to depend on any other library. So we
4369- avoid the non-standard function stpcpy. In GNU C Library this
4370- function is available, though. Also allow the symbol HAVE_STPCPY
4371- to be defined. */
4372-#if !_LIBC && !HAVE_STPCPY
4373-static char *
4374-stpcpy (dest, src)
4375- char *dest;
4376- const char *src;
4377-{
4378- while ((*dest++ = *src++) != '\0')
4379- /* Do nothing. */ ;
4380- return dest - 1;
4381-}
4382-#endif
4383--- lrzsz-0.12.20.safe/intl/dcigettext.c 1969-12-31 19:00:00.000000000 -0500
4384+++ lrzsz-0.12.20/intl/dcigettext.c 2004-09-12 14:40:34.369745960 -0400
4385@@ -0,0 +1,1219 @@
4386+/* Implementation of the internal dcigettext function.
4387+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
4388+
4389+ This program is free software; you can redistribute it and/or modify it
4390+ under the terms of the GNU Library General Public License as published
4391+ by the Free Software Foundation; either version 2, or (at your option)
4392+ any later version.
4393+
4394+ This program is distributed in the hope that it will be useful,
4395+ but WITHOUT ANY WARRANTY; without even the implied warranty of
4396+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
4397+ Library General Public License for more details.
4398+
4399+ You should have received a copy of the GNU Library General Public
4400+ License along with this program; if not, write to the Free Software
4401+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
4402+ USA. */
4403+
4404+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
4405+ This must come before <config.h> because <config.h> may include
4406+ <features.h>, and once <features.h> has been included, it's too late. */
4407+#ifndef _GNU_SOURCE
4408+# define _GNU_SOURCE 1
4409+#endif
4410+
4411+#ifdef HAVE_CONFIG_H
4412+# include <config.h>
4413+#endif
4414+
4415+#include <sys/types.h>
4416+
4417+#ifdef __GNUC__
4418+# define alloca __builtin_alloca
4419+# define HAVE_ALLOCA 1
4420+#else
4421+# ifdef _MSC_VER
4422+# include <malloc.h>
4423+# define alloca _alloca
4424+# else
4425+# if defined HAVE_ALLOCA_H || defined _LIBC
4426+# include <alloca.h>
4427+# else
4428+# ifdef _AIX
4429+ #pragma alloca
4430+# else
4431+# ifndef alloca
4432+char *alloca ();
4433+# endif
4434+# endif
4435+# endif
4436+# endif
4437+#endif
4438+
4439+#include <errno.h>
4440+#ifndef errno
4441+extern int errno;
4442+#endif
4443+#ifndef __set_errno
4444+# define __set_errno(val) errno = (val)
4445+#endif
4446+
4447+#include <stddef.h>
4448+#include <stdlib.h>
4449+#include <string.h>
4450+
4451+#if defined HAVE_UNISTD_H || defined _LIBC
4452+# include <unistd.h>
4453+#endif
4454+
4455+#include <locale.h>
4456+
4457+#ifdef _LIBC
4458+ /* Guess whether integer division by zero raises signal SIGFPE.
4459+ Set to 1 only if you know for sure. In case of doubt, set to 0. */
4460+# if defined __alpha__ || defined __arm__ || defined __i386__ \
4461+ || defined __m68k__ || defined __s390__
4462+# define INTDIV0_RAISES_SIGFPE 1
4463+# else
4464+# define INTDIV0_RAISES_SIGFPE 0
4465+# endif
4466+#endif
4467+#if !INTDIV0_RAISES_SIGFPE
4468+# include <signal.h>
4469+#endif
4470+
4471+#if defined HAVE_SYS_PARAM_H || defined _LIBC
4472+# include <sys/param.h>
4473+#endif
4474+
4475+#include "gettextP.h"
4476+#include "plural-exp.h"
4477+#ifdef _LIBC
4478+# include <libintl.h>
4479+#else
4480+# include "libgnuintl.h"
4481+#endif
4482+#include "hash-string.h"
4483+
4484+/* Thread safetyness. */
4485+#ifdef _LIBC
4486+# include <bits/libc-lock.h>
4487+#else
4488+/* Provide dummy implementation if this is outside glibc. */
4489+# define __libc_lock_define_initialized(CLASS, NAME)
4490+# define __libc_lock_lock(NAME)
4491+# define __libc_lock_unlock(NAME)
4492+# define __libc_rwlock_define_initialized(CLASS, NAME)
4493+# define __libc_rwlock_rdlock(NAME)
4494+# define __libc_rwlock_unlock(NAME)
4495+#endif
4496+
4497+/* Alignment of types. */
4498+#if defined __GNUC__ && __GNUC__ >= 2
4499+# define alignof(TYPE) __alignof__ (TYPE)
4500+#else
4501+# define alignof(TYPE) \
4502+ ((int) &((struct { char dummy1; TYPE dummy2; } *) 0)->dummy2)
4503+#endif
4504+
4505+/* The internal variables in the standalone libintl.a must have different
4506+ names than the internal variables in GNU libc, otherwise programs
4507+ using libintl.a cannot be linked statically. */
4508+#if !defined _LIBC
4509+# define _nl_default_default_domain libintl_nl_default_default_domain
4510+# define _nl_current_default_domain libintl_nl_current_default_domain
4511+# define _nl_default_dirname libintl_nl_default_dirname
4512+# define _nl_domain_bindings libintl_nl_domain_bindings
4513+#endif
4514+
4515+/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
4516+#ifndef offsetof
4517+# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
4518+#endif
4519+
4520+/* @@ end of prolog @@ */
4521+
4522+#ifdef _LIBC
4523+/* Rename the non ANSI C functions. This is required by the standard
4524+ because some ANSI C functions will require linking with this object
4525+ file and the name space must not be polluted. */
4526+# define getcwd __getcwd
4527+# ifndef stpcpy
4528+# define stpcpy __stpcpy
4529+# endif
4530+# define tfind __tfind
4531+#else
4532+# if !defined HAVE_GETCWD
4533+char *getwd ();
4534+# define getcwd(buf, max) getwd (buf)
4535+# else
4536+# if VMS
4537+# define getcwd(buf, max) (getcwd) (buf, max, 0)
4538+# else
4539+char *getcwd ();
4540+# endif
4541+# endif
4542+# ifndef HAVE_STPCPY
4543+static char *stpcpy (char *dest, const char *src);
4544+# endif
4545+# ifndef HAVE_MEMPCPY
4546+static void *mempcpy (void *dest, const void *src, size_t n);
4547+# endif
4548+#endif
4549+
4550+/* Amount to increase buffer size by in each try. */
4551+#define PATH_INCR 32
4552+
4553+/* The following is from pathmax.h. */
4554+/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
4555+ PATH_MAX but might cause redefinition warnings when sys/param.h is
4556+ later included (as on MORE/BSD 4.3). */
4557+#if defined _POSIX_VERSION || (defined HAVE_LIMITS_H && !defined __GNUC__)
4558+# include <limits.h>
4559+#endif
4560+
4561+#ifndef _POSIX_PATH_MAX
4562+# define _POSIX_PATH_MAX 255
4563+#endif
4564+
4565+#if !defined PATH_MAX && defined _PC_PATH_MAX
4566+# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
4567+#endif
4568+
4569+/* Don't include sys/param.h if it already has been. */
4570+#if defined HAVE_SYS_PARAM_H && !defined PATH_MAX && !defined MAXPATHLEN
4571+# include <sys/param.h>
4572+#endif
4573+
4574+#if !defined PATH_MAX && defined MAXPATHLEN
4575+# define PATH_MAX MAXPATHLEN
4576+#endif
4577+
4578+#ifndef PATH_MAX
4579+# define PATH_MAX _POSIX_PATH_MAX
4580+#endif
4581+
4582+/* Pathname support.
4583+ ISSLASH(C) tests whether C is a directory separator character.
4584+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
4585+ it may be concatenated to a directory pathname.
4586+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
4587+ */
4588+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
4589+ /* Win32, OS/2, DOS */
4590+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
4591+# define HAS_DEVICE(P) \
4592+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
4593+ && (P)[1] == ':')
4594+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
4595+# define IS_PATH_WITH_DIR(P) \
4596+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
4597+#else
4598+ /* Unix */
4599+# define ISSLASH(C) ((C) == '/')
4600+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
4601+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
4602+#endif
4603+
4604+/* This is the type used for the search tree where known translations
4605+ are stored. */
4606+struct known_translation_t
4607+{
4608+ /* Domain in which to search. */
4609+ char *domainname;
4610+
4611+ /* The category. */
4612+ int category;
4613+
4614+ /* State of the catalog counter at the point the string was found. */
4615+ int counter;
4616+
4617+ /* Catalog where the string was found. */
4618+ struct loaded_l10nfile *domain;
4619+
4620+ /* And finally the translation. */
4621+ const char *translation;
4622+ size_t translation_length;
4623+
4624+ /* Pointer to the string in question. */
4625+ char msgid[ZERO];
4626+};
4627+
4628+/* Root of the search tree with known translations. We can use this
4629+ only if the system provides the `tsearch' function family. */
4630+#if defined HAVE_TSEARCH || defined _LIBC
4631+# include <search.h>
4632+
4633+static void *root;
4634+
4635+# ifdef _LIBC
4636+# define tsearch __tsearch
4637+# endif
4638+
4639+/* Function to compare two entries in the table of known translations. */
4640+static int
4641+transcmp (const void *p1, const void *p2)
4642+{
4643+ const struct known_translation_t *s1;
4644+ const struct known_translation_t *s2;
4645+ int result;
4646+
4647+ s1 = (const struct known_translation_t *) p1;
4648+ s2 = (const struct known_translation_t *) p2;
4649+
4650+ result = strcmp (s1->msgid, s2->msgid);
4651+ if (result == 0)
4652+ {
4653+ result = strcmp (s1->domainname, s2->domainname);
4654+ if (result == 0)
4655+ /* We compare the category last (though this is the cheapest
4656+ operation) since it is hopefully always the same (namely
4657+ LC_MESSAGES). */
4658+ result = s1->category - s2->category;
4659+ }
4660+
4661+ return result;
4662+}
4663+#endif
4664+
4665+#ifndef INTVARDEF
4666+# define INTVARDEF(name)
4667+#endif
4668+#ifndef INTUSE
4669+# define INTUSE(name) name
4670+#endif
4671+
4672+/* Name of the default domain used for gettext(3) prior any call to
4673+ textdomain(3). The default value for this is "messages". */
4674+const char _nl_default_default_domain[] attribute_hidden = "messages";
4675+
4676+/* Value used as the default domain for gettext(3). */
4677+const char *_nl_current_default_domain attribute_hidden
4678+ = _nl_default_default_domain;
4679+
4680+/* Contains the default location of the message catalogs. */
4681+#if defined __EMX__
4682+extern const char _nl_default_dirname[];
4683+#else
4684+const char _nl_default_dirname[] = LOCALEDIR;
4685+INTVARDEF (_nl_default_dirname)
4686+#endif
4687+
4688+/* List with bindings of specific domains created by bindtextdomain()
4689+ calls. */
4690+struct binding *_nl_domain_bindings;
4691+
4692+/* Prototypes for local functions. */
4693+static char *plural_lookup (struct loaded_l10nfile *domain,
4694+ unsigned long int n,
4695+ const char *translation, size_t translation_len)
4696+ internal_function;
4697+static const char *guess_category_value (int category,
4698+ const char *categoryname)
4699+ internal_function;
4700+#ifdef _LIBC
4701+# include "../locale/localeinfo.h"
4702+# define category_to_name(category) _nl_category_names[category]
4703+#else
4704+static const char *category_to_name (int category) internal_function;
4705+#endif
4706+
4707+
4708+/* For those loosing systems which don't have `alloca' we have to add
4709+ some additional code emulating it. */
4710+#ifdef HAVE_ALLOCA
4711+/* Nothing has to be done. */
4712+# define freea(p) /* nothing */
4713+# define ADD_BLOCK(list, address) /* nothing */
4714+# define FREE_BLOCKS(list) /* nothing */
4715+#else
4716+struct block_list
4717+{
4718+ void *address;
4719+ struct block_list *next;
4720+};
4721+# define ADD_BLOCK(list, addr) \
4722+ do { \
4723+ struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
4724+ /* If we cannot get a free block we cannot add the new element to \
4725+ the list. */ \
4726+ if (newp != NULL) { \
4727+ newp->address = (addr); \
4728+ newp->next = (list); \
4729+ (list) = newp; \
4730+ } \
4731+ } while (0)
4732+# define FREE_BLOCKS(list) \
4733+ do { \
4734+ while (list != NULL) { \
4735+ struct block_list *old = list; \
4736+ list = list->next; \
4737+ free (old->address); \
4738+ free (old); \
4739+ } \
4740+ } while (0)
4741+# undef alloca
4742+# define alloca(size) (malloc (size))
4743+# define freea(p) free (p)
4744+#endif /* have alloca */
4745+
4746+
4747+#ifdef _LIBC
4748+/* List of blocks allocated for translations. */
4749+typedef struct transmem_list
4750+{
4751+ struct transmem_list *next;
4752+ char data[ZERO];
4753+} transmem_block_t;
4754+static struct transmem_list *transmem_list;
4755+#else
4756+typedef unsigned char transmem_block_t;
4757+#endif
4758+
4759+
4760+/* Names for the libintl functions are a problem. They must not clash
4761+ with existing names and they should follow ANSI C. But this source
4762+ code is also used in GNU C Library where the names have a __
4763+ prefix. So we have to make a difference here. */
4764+#ifdef _LIBC
4765+# define DCIGETTEXT __dcigettext
4766+#else
4767+# define DCIGETTEXT libintl_dcigettext
4768+#endif
4769+
4770+/* Lock variable to protect the global data in the gettext implementation. */
4771+#ifdef _LIBC
4772+__libc_rwlock_define_initialized (, _nl_state_lock attribute_hidden)
4773+#endif
4774+
4775+/* Checking whether the binaries runs SUID must be done and glibc provides
4776+ easier methods therefore we make a difference here. */
4777+#ifdef _LIBC
4778+# define ENABLE_SECURE __libc_enable_secure
4779+# define DETERMINE_SECURE
4780+#else
4781+# ifndef HAVE_GETUID
4782+# define getuid() 0
4783+# endif
4784+# ifndef HAVE_GETGID
4785+# define getgid() 0
4786+# endif
4787+# ifndef HAVE_GETEUID
4788+# define geteuid() getuid()
4789+# endif
4790+# ifndef HAVE_GETEGID
4791+# define getegid() getgid()
4792+# endif
4793+static int enable_secure;
4794+# define ENABLE_SECURE (enable_secure == 1)
4795+# define DETERMINE_SECURE \
4796+ if (enable_secure == 0) \
4797+ { \
4798+ if (getuid () != geteuid () || getgid () != getegid ()) \
4799+ enable_secure = 1; \
4800+ else \
4801+ enable_secure = -1; \
4802+ }
4803+#endif
4804+
4805+/* Get the function to evaluate the plural expression. */
4806+#include "eval-plural.h"
4807+
4808+/* Look up MSGID in the DOMAINNAME message catalog for the current
4809+ CATEGORY locale and, if PLURAL is nonzero, search over string
4810+ depending on the plural form determined by N. */
4811+char *
4812+DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2,
4813+ int plural, unsigned long int n, int category)
4814+{
4815+#ifndef HAVE_ALLOCA
4816+ struct block_list *block_list = NULL;
4817+#endif
4818+ struct loaded_l10nfile *domain;
4819+ struct binding *binding;
4820+ const char *categoryname;
4821+ const char *categoryvalue;
4822+ char *dirname, *xdomainname;
4823+ char *single_locale;
4824+ char *retval;
4825+ size_t retlen;
4826+ int saved_errno;
4827+#if defined HAVE_TSEARCH || defined _LIBC
4828+ struct known_translation_t *search;
4829+ struct known_translation_t **foundp = NULL;
4830+ size_t msgid_len;
4831+#endif
4832+ size_t domainname_len;
4833+
4834+ /* If no real MSGID is given return NULL. */
4835+ if (msgid1 == NULL)
4836+ return NULL;
4837+
4838+#ifdef _LIBC
4839+ if (category < 0 || category >= __LC_LAST || category == LC_ALL)
4840+ /* Bogus. */
4841+ return (plural == 0
4842+ ? (char *) msgid1
4843+ /* Use the Germanic plural rule. */
4844+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
4845+#endif
4846+
4847+ __libc_rwlock_rdlock (_nl_state_lock);
4848+
4849+ /* If DOMAINNAME is NULL, we are interested in the default domain. If
4850+ CATEGORY is not LC_MESSAGES this might not make much sense but the
4851+ definition left this undefined. */
4852+ if (domainname == NULL)
4853+ domainname = _nl_current_default_domain;
4854+
4855+ /* OS/2 specific: backward compatibility with older libintl versions */
4856+#ifdef LC_MESSAGES_COMPAT
4857+ if (category == LC_MESSAGES_COMPAT)
4858+ category = LC_MESSAGES;
4859+#endif
4860+
4861+#if defined HAVE_TSEARCH || defined _LIBC
4862+ msgid_len = strlen (msgid1) + 1;
4863+
4864+ /* Try to find the translation among those which we found at
4865+ some time. */
4866+ search = (struct known_translation_t *)
4867+ alloca (offsetof (struct known_translation_t, msgid) + msgid_len);
4868+ memcpy (search->msgid, msgid1, msgid_len);
4869+ search->domainname = (char *) domainname;
4870+ search->category = category;
4871+
4872+ foundp = (struct known_translation_t **) tfind (search, &root, transcmp);
4873+ freea (search);
4874+ if (foundp != NULL && (*foundp)->counter == _nl_msg_cat_cntr)
4875+ {
4876+ /* Now deal with plural. */
4877+ if (plural)
4878+ retval = plural_lookup ((*foundp)->domain, n, (*foundp)->translation,
4879+ (*foundp)->translation_length);
4880+ else
4881+ retval = (char *) (*foundp)->translation;
4882+
4883+ __libc_rwlock_unlock (_nl_state_lock);
4884+ return retval;
4885+ }
4886+#endif
4887+
4888+ /* Preserve the `errno' value. */
4889+ saved_errno = errno;
4890+
4891+ /* See whether this is a SUID binary or not. */
4892+ DETERMINE_SECURE;
4893+
4894+ /* First find matching binding. */
4895+ for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
4896+ {
4897+ int compare = strcmp (domainname, binding->domainname);
4898+ if (compare == 0)
4899+ /* We found it! */
4900+ break;
4901+ if (compare < 0)
4902+ {
4903+ /* It is not in the list. */
4904+ binding = NULL;
4905+ break;
4906+ }
4907+ }
4908+
4909+ if (binding == NULL)
4910+ dirname = (char *) INTUSE(_nl_default_dirname);
4911+ else if (IS_ABSOLUTE_PATH (binding->dirname))
4912+ dirname = binding->dirname;
4913+ else
4914+ {
4915+ /* We have a relative path. Make it absolute now. */
4916+ size_t dirname_len = strlen (binding->dirname) + 1;
4917+ size_t path_max;
4918+ char *ret;
4919+
4920+ path_max = (unsigned int) PATH_MAX;
4921+ path_max += 2; /* The getcwd docs say to do this. */
4922+
4923+ for (;;)
4924+ {
4925+ dirname = (char *) alloca (path_max + dirname_len);
4926+ ADD_BLOCK (block_list, dirname);
4927+
4928+ __set_errno (0);
4929+ ret = getcwd (dirname, path_max);
4930+ if (ret != NULL || errno != ERANGE)
4931+ break;
4932+
4933+ path_max += path_max / 2;
4934+ path_max += PATH_INCR;
4935+ }
4936+
4937+ if (ret == NULL)
4938+ /* We cannot get the current working directory. Don't signal an
4939+ error but simply return the default string. */
4940+ goto return_untranslated;
4941+
4942+ stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
4943+ }
4944+
4945+ /* Now determine the symbolic name of CATEGORY and its value. */
4946+ categoryname = category_to_name (category);
4947+ categoryvalue = guess_category_value (category, categoryname);
4948+
4949+ domainname_len = strlen (domainname);
4950+ xdomainname = (char *) alloca (strlen (categoryname)
4951+ + domainname_len + 5);
4952+ ADD_BLOCK (block_list, xdomainname);
4953+
4954+ stpcpy (mempcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
4955+ domainname, domainname_len),
4956+ ".mo");
4957+
4958+ /* Creating working area. */
4959+ single_locale = (char *) alloca (strlen (categoryvalue) + 1);
4960+ ADD_BLOCK (block_list, single_locale);
4961+
4962+
4963+ /* Search for the given string. This is a loop because we perhaps
4964+ got an ordered list of languages to consider for the translation. */
4965+ while (1)
4966+ {
4967+ /* Make CATEGORYVALUE point to the next element of the list. */
4968+ while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
4969+ ++categoryvalue;
4970+ if (categoryvalue[0] == '\0')
4971+ {
4972+ /* The whole contents of CATEGORYVALUE has been searched but
4973+ no valid entry has been found. We solve this situation
4974+ by implicitly appending a "C" entry, i.e. no translation
4975+ will take place. */
4976+ single_locale[0] = 'C';
4977+ single_locale[1] = '\0';
4978+ }
4979+ else
4980+ {
4981+ char *cp = single_locale;
4982+ while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
4983+ *cp++ = *categoryvalue++;
4984+ *cp = '\0';
4985+
4986+ /* When this is a SUID binary we must not allow accessing files
4987+ outside the dedicated directories. */
4988+ if (ENABLE_SECURE && IS_PATH_WITH_DIR (single_locale))
4989+ /* Ingore this entry. */
4990+ continue;
4991+ }
4992+
4993+ /* If the current locale value is C (or POSIX) we don't load a
4994+ domain. Return the MSGID. */
4995+ if (strcmp (single_locale, "C") == 0
4996+ || strcmp (single_locale, "POSIX") == 0)
4997+ break;
4998+
4999+ /* Find structure describing the message catalog matching the
5000+ DOMAINNAME and CATEGORY. */
5001+ domain = _nl_find_domain (dirname, single_locale, xdomainname, binding);
5002+
5003+ if (domain != NULL)
5004+ {
5005+ retval = _nl_find_msg (domain, binding, msgid1, &retlen);
5006+
5007+ if (retval == NULL)
5008+ {
5009+ int cnt;
5010+
5011+ for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
5012+ {
5013+ retval = _nl_find_msg (domain->successor[cnt], binding,
5014+ msgid1, &retlen);
5015+
5016+ if (retval != NULL)
5017+ {
5018+ domain = domain->successor[cnt];
5019+ break;
5020+ }
5021+ }
5022+ }
5023+
5024+ if (retval != NULL)
5025+ {
5026+ /* Found the translation of MSGID1 in domain DOMAIN:
5027+ starting at RETVAL, RETLEN bytes. */
5028+ FREE_BLOCKS (block_list);
5029+#if defined HAVE_TSEARCH || defined _LIBC
5030+ if (foundp == NULL)
5031+ {
5032+ /* Create a new entry and add it to the search tree. */
5033+ struct known_translation_t *newp;
5034+
5035+ newp = (struct known_translation_t *)
5036+ malloc (offsetof (struct known_translation_t, msgid)
5037+ + msgid_len + domainname_len + 1);
5038+ if (newp != NULL)
5039+ {
5040+ newp->domainname =
5041+ mempcpy (newp->msgid, msgid1, msgid_len);
5042+ memcpy (newp->domainname, domainname, domainname_len + 1);
5043+ newp->category = category;
5044+ newp->counter = _nl_msg_cat_cntr;
5045+ newp->domain = domain;
5046+ newp->translation = retval;
5047+ newp->translation_length = retlen;
5048+
5049+ /* Insert the entry in the search tree. */
5050+ foundp = (struct known_translation_t **)
5051+ tsearch (newp, &root, transcmp);
5052+ if (foundp == NULL
5053+ || __builtin_expect (*foundp != newp, 0))
5054+ /* The insert failed. */
5055+ free (newp);
5056+ }
5057+ }
5058+ else
5059+ {
5060+ /* We can update the existing entry. */
5061+ (*foundp)->counter = _nl_msg_cat_cntr;
5062+ (*foundp)->domain = domain;
5063+ (*foundp)->translation = retval;
5064+ (*foundp)->translation_length = retlen;
5065+ }
5066+#endif
5067+ __set_errno (saved_errno);
5068+
5069+ /* Now deal with plural. */
5070+ if (plural)
5071+ retval = plural_lookup (domain, n, retval, retlen);
5072+
5073+ __libc_rwlock_unlock (_nl_state_lock);
5074+ return retval;
5075+ }
5076+ }
5077+ }
5078+
5079+ return_untranslated:
5080+ /* Return the untranslated MSGID. */
5081+ FREE_BLOCKS (block_list);
5082+ __libc_rwlock_unlock (_nl_state_lock);
5083+#ifndef _LIBC
5084+ if (!ENABLE_SECURE)
5085+ {
5086+ extern void _nl_log_untranslated (const char *logfilename,
5087+ const char *domainname,
5088+ const char *msgid1, const char *msgid2,
5089+ int plural);
5090+ const char *logfilename = getenv ("GETTEXT_LOG_UNTRANSLATED");
5091+
5092+ if (logfilename != NULL && logfilename[0] != '\0')
5093+ _nl_log_untranslated (logfilename, domainname, msgid1, msgid2, plural);
5094+ }
5095+#endif
5096+ __set_errno (saved_errno);
5097+ return (plural == 0
5098+ ? (char *) msgid1
5099+ /* Use the Germanic plural rule. */
5100+ : n == 1 ? (char *) msgid1 : (char *) msgid2);
5101+}
5102+
5103+
5104+char *
5105+internal_function
5106+_nl_find_msg (struct loaded_l10nfile *domain_file,
5107+ struct binding *domainbinding, const char *msgid,
5108+ size_t *lengthp)
5109+{
5110+ struct loaded_domain *domain;
5111+ nls_uint32 nstrings;
5112+ size_t act;
5113+ char *result;
5114+ size_t resultlen;
5115+
5116+ if (domain_file->decided == 0)
5117+ _nl_load_domain (domain_file, domainbinding);
5118+
5119+ if (domain_file->data == NULL)
5120+ return NULL;
5121+
5122+ domain = (struct loaded_domain *) domain_file->data;
5123+
5124+ nstrings = domain->nstrings;
5125+
5126+ /* Locate the MSGID and its translation. */
5127+ if (domain->hash_tab != NULL)
5128+ {
5129+ /* Use the hashing table. */
5130+ nls_uint32 len = strlen (msgid);
5131+ nls_uint32 hash_val = hash_string (msgid);
5132+ nls_uint32 idx = hash_val % domain->hash_size;
5133+ nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
5134+
5135+ while (1)
5136+ {
5137+ nls_uint32 nstr =
5138+ W (domain->must_swap_hash_tab, domain->hash_tab[idx]);
5139+
5140+ if (nstr == 0)
5141+ /* Hash table entry is empty. */
5142+ return NULL;
5143+
5144+ nstr--;
5145+
5146+ /* Compare msgid with the original string at index nstr.
5147+ We compare the lengths with >=, not ==, because plural entries
5148+ are represented by strings with an embedded NUL. */
5149+ if (nstr < nstrings
5150+ ? W (domain->must_swap, domain->orig_tab[nstr].length) >= len
5151+ && (strcmp (msgid,
5152+ domain->data + W (domain->must_swap,
5153+ domain->orig_tab[nstr].offset))
5154+ == 0)
5155+ : domain->orig_sysdep_tab[nstr - nstrings].length > len
5156+ && (strcmp (msgid,
5157+ domain->orig_sysdep_tab[nstr - nstrings].pointer)
5158+ == 0))
5159+ {
5160+ act = nstr;
5161+ goto found;
5162+ }
5163+
5164+ if (idx >= domain->hash_size - incr)
5165+ idx -= domain->hash_size - incr;
5166+ else
5167+ idx += incr;
5168+ }
5169+ /* NOTREACHED */
5170+ }
5171+ else
5172+ {
5173+ /* Try the default method: binary search in the sorted array of
5174+ messages. */
5175+ size_t top, bottom;
5176+
5177+ bottom = 0;
5178+ top = nstrings;
5179+ while (bottom < top)
5180+ {
5181+ int cmp_val;
5182+
5183+ act = (bottom + top) / 2;
5184+ cmp_val = strcmp (msgid, (domain->data
5185+ + W (domain->must_swap,
5186+ domain->orig_tab[act].offset)));
5187+ if (cmp_val < 0)
5188+ top = act;
5189+ else if (cmp_val > 0)
5190+ bottom = act + 1;
5191+ else
5192+ goto found;
5193+ }
5194+ /* No translation was found. */
5195+ return NULL;
5196+ }
5197+
5198+ found:
5199+ /* The translation was found at index ACT. If we have to convert the
5200+ string to use a different character set, this is the time. */
5201+ if (act < nstrings)
5202+ {
5203+ result = (char *)
5204+ (domain->data + W (domain->must_swap, domain->trans_tab[act].offset));
5205+ resultlen = W (domain->must_swap, domain->trans_tab[act].length) + 1;
5206+ }
5207+ else
5208+ {
5209+ result = (char *) domain->trans_sysdep_tab[act - nstrings].pointer;
5210+ resultlen = domain->trans_sysdep_tab[act - nstrings].length;
5211+ }
5212+
5213+#if defined _LIBC || HAVE_ICONV
5214+ if (domain->codeset_cntr
5215+ != (domainbinding != NULL ? domainbinding->codeset_cntr : 0))
5216+ {
5217+ /* The domain's codeset has changed through bind_textdomain_codeset()
5218+ since the message catalog was initialized or last accessed. We
5219+ have to reinitialize the converter. */
5220+ _nl_free_domain_conv (domain);
5221+ _nl_init_domain_conv (domain_file, domain, domainbinding);
5222+ }
5223+
5224+ if (
5225+# ifdef _LIBC
5226+ domain->conv != (__gconv_t) -1
5227+# else
5228+# if HAVE_ICONV
5229+ domain->conv != (iconv_t) -1
5230+# endif
5231+# endif
5232+ )
5233+ {
5234+ /* We are supposed to do a conversion. First allocate an
5235+ appropriate table with the same structure as the table
5236+ of translations in the file, where we can put the pointers
5237+ to the converted strings in.
5238+ There is a slight complication with plural entries. They
5239+ are represented by consecutive NUL terminated strings. We
5240+ handle this case by converting RESULTLEN bytes, including
5241+ NULs. */
5242+
5243+ if (domain->conv_tab == NULL
5244+ && ((domain->conv_tab =
5245+ (char **) calloc (nstrings + domain->n_sysdep_strings,
5246+ sizeof (char *)))
5247+ == NULL))
5248+ /* Mark that we didn't succeed allocating a table. */
5249+ domain->conv_tab = (char **) -1;
5250+
5251+ if (__builtin_expect (domain->conv_tab == (char **) -1, 0))
5252+ /* Nothing we can do, no more memory. */
5253+ goto converted;
5254+
5255+ if (domain->conv_tab[act] == NULL)
5256+ {
5257+ /* We haven't used this string so far, so it is not
5258+ translated yet. Do this now. */
5259+ /* We use a bit more efficient memory handling.
5260+ We allocate always larger blocks which get used over
5261+ time. This is faster than many small allocations. */
5262+ __libc_lock_define_initialized (static, lock)
5263+# define INITIAL_BLOCK_SIZE 4080
5264+ static unsigned char *freemem;
5265+ static size_t freemem_size;
5266+
5267+ const unsigned char *inbuf;
5268+ unsigned char *outbuf;
5269+ int malloc_count;
5270+# ifndef _LIBC
5271+ transmem_block_t *transmem_list = NULL;
5272+# endif
5273+
5274+ __libc_lock_lock (lock);
5275+
5276+ inbuf = (const unsigned char *) result;
5277+ outbuf = freemem + sizeof (size_t);
5278+
5279+ malloc_count = 0;
5280+ while (1)
5281+ {
5282+ transmem_block_t *newmem;
5283+# ifdef _LIBC
5284+ size_t non_reversible;
5285+ int res;
5286+
5287+ if (freemem_size < sizeof (size_t))
5288+ goto resize_freemem;
5289+
5290+ res = __gconv (domain->conv,
5291+ &inbuf, inbuf + resultlen,
5292+ &outbuf,
5293+ outbuf + freemem_size - sizeof (size_t),
5294+ &non_reversible);
5295+
5296+ if (res == __GCONV_OK || res == __GCONV_EMPTY_INPUT)
5297+ break;
5298+
5299+ if (res != __GCONV_FULL_OUTPUT)
5300+ {
5301+ __libc_lock_unlock (lock);
5302+ goto converted;
5303+ }
5304+
5305+ inbuf = result;
5306+# else
5307+# if HAVE_ICONV
5308+ const char *inptr = (const char *) inbuf;
5309+ size_t inleft = resultlen;
5310+ char *outptr = (char *) outbuf;
5311+ size_t outleft;
5312+
5313+ if (freemem_size < sizeof (size_t))
5314+ goto resize_freemem;
5315+
5316+ outleft = freemem_size - sizeof (size_t);
5317+ if (iconv (domain->conv,
5318+ (ICONV_CONST char **) &inptr, &inleft,
5319+ &outptr, &outleft)
5320+ != (size_t) (-1))
5321+ {
5322+ outbuf = (unsigned char *) outptr;
5323+ break;
5324+ }
5325+ if (errno != E2BIG)
5326+ {
5327+ __libc_lock_unlock (lock);
5328+ goto converted;
5329+ }
5330+# endif
5331+# endif
5332+
5333+ resize_freemem:
5334+ /* We must allocate a new buffer or resize the old one. */
5335+ if (malloc_count > 0)
5336+ {
5337+ ++malloc_count;
5338+ freemem_size = malloc_count * INITIAL_BLOCK_SIZE;
5339+ newmem = (transmem_block_t *) realloc (transmem_list,
5340+ freemem_size);
5341+# ifdef _LIBC
5342+ if (newmem != NULL)
5343+ transmem_list = transmem_list->next;
5344+ else
5345+ {
5346+ struct transmem_list *old = transmem_list;
5347+
5348+ transmem_list = transmem_list->next;
5349+ free (old);
5350+ }
5351+# endif
5352+ }
5353+ else
5354+ {
5355+ malloc_count = 1;
5356+ freemem_size = INITIAL_BLOCK_SIZE;
5357+ newmem = (transmem_block_t *) malloc (freemem_size);
5358+ }
5359+ if (__builtin_expect (newmem == NULL, 0))
5360+ {
5361+ freemem = NULL;
5362+ freemem_size = 0;
5363+ __libc_lock_unlock (lock);
5364+ goto converted;
5365+ }
5366+
5367+# ifdef _LIBC
5368+ /* Add the block to the list of blocks we have to free
5369+ at some point. */
5370+ newmem->next = transmem_list;
5371+ transmem_list = newmem;
5372+
5373+ freemem = newmem->data;
5374+ freemem_size -= offsetof (struct transmem_list, data);
5375+# else
5376+ transmem_list = newmem;
5377+ freemem = newmem;
5378+# endif
5379+
5380+ outbuf = freemem + sizeof (size_t);
5381+ }
5382+
5383+ /* We have now in our buffer a converted string. Put this
5384+ into the table of conversions. */
5385+ *(size_t *) freemem = outbuf - freemem - sizeof (size_t);
5386+ domain->conv_tab[act] = (char *) freemem;
5387+ /* Shrink freemem, but keep it aligned. */
5388+ freemem_size -= outbuf - freemem;
5389+ freemem = outbuf;
5390+ freemem += freemem_size & (alignof (size_t) - 1);
5391+ freemem_size = freemem_size & ~ (alignof (size_t) - 1);
5392+
5393+ __libc_lock_unlock (lock);
5394+ }
5395+
5396+ /* Now domain->conv_tab[act] contains the translation of all
5397+ the plural variants. */
5398+ result = domain->conv_tab[act] + sizeof (size_t);
5399+ resultlen = *(size_t *) domain->conv_tab[act];
5400+ }
5401+
5402+ converted:
5403+ /* The result string is converted. */
5404+
5405+#endif /* _LIBC || HAVE_ICONV */
5406+
5407+ *lengthp = resultlen;
5408+ return result;
5409+}
5410+
5411+
5412+/* Look up a plural variant. */
5413+static char *
5414+internal_function
5415+plural_lookup (struct loaded_l10nfile *domain, unsigned long int n,
5416+ const char *translation, size_t translation_len)
5417+{
5418+ struct loaded_domain *domaindata = (struct loaded_domain *) domain->data;
5419+ unsigned long int index;
5420+ const char *p;
5421+
5422+ index = plural_eval (domaindata->plural, n);
5423+ if (index >= domaindata->nplurals)
5424+ /* This should never happen. It means the plural expression and the
5425+ given maximum value do not match. */
5426+ index = 0;
5427+
5428+ /* Skip INDEX strings at TRANSLATION. */
5429+ p = translation;
5430+ while (index-- > 0)
5431+ {
5432+#ifdef _LIBC
5433+ p = __rawmemchr (p, '\0');
5434+#else
5435+ p = strchr (p, '\0');
5436+#endif
5437+ /* And skip over the NUL byte. */
5438+ p++;
5439+
5440+ if (p >= translation + translation_len)
5441+ /* This should never happen. It means the plural expression
5442+ evaluated to a value larger than the number of variants
5443+ available for MSGID1. */
5444+ return (char *) translation;
5445+ }
5446+ return (char *) p;
5447+}
5448+
5449+#ifndef _LIBC
5450+/* Return string representation of locale CATEGORY. */
5451+static const char *
5452+internal_function
5453+category_to_name (int category)
5454+{
5455+ const char *retval;
5456+
5457+ switch (category)
5458+ {
5459+#ifdef LC_COLLATE
5460+ case LC_COLLATE:
5461+ retval = "LC_COLLATE";
5462+ break;
5463+#endif
5464+#ifdef LC_CTYPE
5465+ case LC_CTYPE:
5466+ retval = "LC_CTYPE";
5467+ break;
5468+#endif
5469+#ifdef LC_MONETARY
5470+ case LC_MONETARY:
5471+ retval = "LC_MONETARY";
5472+ break;
5473+#endif
5474+#ifdef LC_NUMERIC
5475+ case LC_NUMERIC:
5476+ retval = "LC_NUMERIC";
5477+ break;
5478+#endif
5479+#ifdef LC_TIME
5480+ case LC_TIME:
5481+ retval = "LC_TIME";
5482+ break;
5483+#endif
5484+#ifdef LC_MESSAGES
5485+ case LC_MESSAGES:
5486+ retval = "LC_MESSAGES";
5487+ break;
5488+#endif
5489+#ifdef LC_RESPONSE
5490+ case LC_RESPONSE:
5491+ retval = "LC_RESPONSE";
5492+ break;
5493+#endif
5494+#ifdef LC_ALL
5495+ case LC_ALL:
5496+ /* This might not make sense but is perhaps better than any other
5497+ value. */
5498+ retval = "LC_ALL";
5499+ break;
5500+#endif
5501+ default:
5502+ /* If you have a better idea for a default value let me know. */
5503+ retval = "LC_XXX";
5504+ }
5505+
5506+ return retval;
5507+}
5508+#endif
5509+
5510+/* Guess value of current locale from value of the environment variables. */
5511+static const char *
5512+internal_function
5513+guess_category_value (int category, const char *categoryname)
5514+{
5515+ const char *language;
5516+ const char *retval;
5517+
5518+ /* The highest priority value is the `LANGUAGE' environment
5519+ variable. But we don't use the value if the currently selected
5520+ locale is the C locale. This is a GNU extension. */
5521+ language = getenv ("LANGUAGE");
5522+ if (language != NULL && language[0] == '\0')
5523+ language = NULL;
5524+
5525+ /* We have to proceed with the POSIX methods of looking to `LC_ALL',
5526+ `LC_xxx', and `LANG'. On some systems this can be done by the
5527+ `setlocale' function itself. */
5528+#ifdef _LIBC
5529+ retval = __current_locale_name (category);
5530+#else
5531+ retval = _nl_locale_name (category, categoryname);
5532+#endif
5533+
5534+ /* Ignore LANGUAGE if the locale is set to "C" because
5535+ 1. "C" locale usually uses the ASCII encoding, and most international
5536+ messages use non-ASCII characters. These characters get displayed
5537+ as question marks (if using glibc's iconv()) or as invalid 8-bit
5538+ characters (because other iconv()s refuse to convert most non-ASCII
5539+ characters to ASCII). In any case, the output is ugly.
5540+ 2. The precise output of some programs in the "C" locale is specified
5541+ by POSIX and should not depend on environment variables like
5542+ "LANGUAGE". We allow such programs to use gettext(). */
5543+ return language != NULL && strcmp (retval, "C") != 0 ? language : retval;
5544+}
5545+
5546+/* @@ begin of epilog @@ */
5547+
5548+/* We don't want libintl.a to depend on any other library. So we
5549+ avoid the non-standard function stpcpy. In GNU C Library this
5550+ function is available, though. Also allow the symbol HAVE_STPCPY
5551+ to be defined. */
5552+#if !_LIBC && !HAVE_STPCPY
5553+static char *
5554+stpcpy (char *dest, const char *src)
5555+{
5556+ while ((*dest++ = *src++) != '\0')
5557+ /* Do nothing. */ ;
5558+ return dest - 1;
5559+}
5560+#endif
5561+
5562+#if !_LIBC && !HAVE_MEMPCPY
5563+static void *
5564+mempcpy (void *dest, const void *src, size_t n)
5565+{
5566+ return (void *) ((char *) memcpy (dest, src, n) + n);
5567+}
5568+#endif
5569+
5570+
5571+#ifdef _LIBC
5572+/* If we want to free all resources we have to do some work at
5573+ program's end. */
5574+libc_freeres_fn (free_mem)
5575+{
5576+ void *old;
5577+
5578+ while (_nl_domain_bindings != NULL)
5579+ {
5580+ struct binding *oldp = _nl_domain_bindings;
5581+ _nl_domain_bindings = _nl_domain_bindings->next;
5582+ if (oldp->dirname != INTUSE(_nl_default_dirname))
5583+ /* Yes, this is a pointer comparison. */
5584+ free (oldp->dirname);
5585+ free (oldp->codeset);
5586+ free (oldp);
5587+ }
5588+
5589+ if (_nl_current_default_domain != _nl_default_default_domain)
5590+ /* Yes, again a pointer comparison. */
5591+ free ((char *) _nl_current_default_domain);
5592+
5593+ /* Remove the search tree with the known translations. */
5594+ __tdestroy (root, free);
5595+ root = NULL;
5596+
5597+ while (transmem_list != NULL)
5598+ {
5599+ old = transmem_list;
5600+ transmem_list = transmem_list->next;
5601+ free (old);
5602+ }
5603+}
5604+#endif
5605--- lrzsz-0.12.20.safe/intl/dcngettext.c 1969-12-31 19:00:00.000000000 -0500
5606+++ lrzsz-0.12.20/intl/dcngettext.c 2004-09-12 14:40:34.375745048 -0400
5607@@ -0,0 +1,57 @@
5608+/* Implementation of the dcngettext(3) function.
5609+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
5610+
5611+ This program is free software; you can redistribute it and/or modify it
5612+ under the terms of the GNU Library General Public License as published
5613+ by the Free Software Foundation; either version 2, or (at your option)
5614+ any later version.
5615+
5616+ This program is distributed in the hope that it will be useful,
5617+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5618+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5619+ Library General Public License for more details.
5620+
5621+ You should have received a copy of the GNU Library General Public
5622+ License along with this program; if not, write to the Free Software
5623+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5624+ USA. */
5625+
5626+#ifdef HAVE_CONFIG_H
5627+# include <config.h>
5628+#endif
5629+
5630+#include "gettextP.h"
5631+#ifdef _LIBC
5632+# include <libintl.h>
5633+#else
5634+# include "libgnuintl.h"
5635+#endif
5636+
5637+/* @@ end of prolog @@ */
5638+
5639+/* Names for the libintl functions are a problem. They must not clash
5640+ with existing names and they should follow ANSI C. But this source
5641+ code is also used in GNU C Library where the names have a __
5642+ prefix. So we have to make a difference here. */
5643+#ifdef _LIBC
5644+# define DCNGETTEXT __dcngettext
5645+# define DCIGETTEXT __dcigettext
5646+#else
5647+# define DCNGETTEXT libintl_dcngettext
5648+# define DCIGETTEXT libintl_dcigettext
5649+#endif
5650+
5651+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
5652+ locale. */
5653+char *
5654+DCNGETTEXT (const char *domainname,
5655+ const char *msgid1, const char *msgid2, unsigned long int n,
5656+ int category)
5657+{
5658+ return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
5659+}
5660+
5661+#ifdef _LIBC
5662+/* Alias for function name in GNU C Library. */
5663+weak_alias (__dcngettext, dcngettext);
5664+#endif
5665--- lrzsz-0.12.20.safe/intl/dgettext.c 1998-04-26 09:20:52.000000000 -0400
5666+++ lrzsz-0.12.20/intl/dgettext.c 2004-09-12 14:40:34.380744288 -0400
5667@@ -1,32 +1,33 @@
5668-/* dgettext.c -- implementation of the dgettext(3) function
5669- Copyright (C) 1995 Software Foundation, Inc.
5670+/* Implementation of the dgettext(3) function.
5671+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5672
5673-This program is free software; you can redistribute it and/or modify
5674-it under the terms of the GNU General Public License as published by
5675-the Free Software Foundation; either version 2, or (at your option)
5676-any later version.
5677+ This program is free software; you can redistribute it and/or modify it
5678+ under the terms of the GNU Library General Public License as published
5679+ by the Free Software Foundation; either version 2, or (at your option)
5680+ any later version.
5681
5682-This program is distributed in the hope that it will be useful,
5683-but WITHOUT ANY WARRANTY; without even the implied warranty of
5684-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5685-GNU General Public License for more details.
5686+ This program is distributed in the hope that it will be useful,
5687+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5688+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5689+ Library General Public License for more details.
5690
5691-You should have received a copy of the GNU General Public License
5692-along with this program; if not, write to the Free Software
5693-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5694+ You should have received a copy of the GNU Library General Public
5695+ License along with this program; if not, write to the Free Software
5696+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5697+ USA. */
5698
5699 #ifdef HAVE_CONFIG_H
5700 # include <config.h>
5701 #endif
5702
5703-#if defined HAVE_LOCALE_H || defined _LIBC
5704-# include <locale.h>
5705-#endif
5706+#include "gettextP.h"
5707+
5708+#include <locale.h>
5709
5710 #ifdef _LIBC
5711 # include <libintl.h>
5712 #else
5713-# include "libgettext.h"
5714+# include "libgnuintl.h"
5715 #endif
5716
5717 /* @@ end of prolog @@ */
5718@@ -37,18 +38,16 @@
5719 prefix. So we have to make a difference here. */
5720 #ifdef _LIBC
5721 # define DGETTEXT __dgettext
5722-# define DCGETTEXT __dcgettext
5723+# define DCGETTEXT INTUSE(__dcgettext)
5724 #else
5725-# define DGETTEXT dgettext__
5726-# define DCGETTEXT dcgettext__
5727+# define DGETTEXT libintl_dgettext
5728+# define DCGETTEXT libintl_dcgettext
5729 #endif
5730
5731 /* Look up MSGID in the DOMAINNAME message catalog of the current
5732 LC_MESSAGES locale. */
5733 char *
5734-DGETTEXT (domainname, msgid)
5735- const char *domainname;
5736- const char *msgid;
5737+DGETTEXT (const char *domainname, const char *msgid)
5738 {
5739 return DCGETTEXT (domainname, msgid, LC_MESSAGES);
5740 }
5741--- lrzsz-0.12.20.safe/intl/dngettext.c 1969-12-31 19:00:00.000000000 -0500
5742+++ lrzsz-0.12.20/intl/dngettext.c 2004-09-12 14:40:34.385743528 -0400
5743@@ -0,0 +1,59 @@
5744+/* Implementation of the dngettext(3) function.
5745+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
5746+
5747+ This program is free software; you can redistribute it and/or modify it
5748+ under the terms of the GNU Library General Public License as published
5749+ by the Free Software Foundation; either version 2, or (at your option)
5750+ any later version.
5751+
5752+ This program is distributed in the hope that it will be useful,
5753+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5754+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5755+ Library General Public License for more details.
5756+
5757+ You should have received a copy of the GNU Library General Public
5758+ License along with this program; if not, write to the Free Software
5759+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5760+ USA. */
5761+
5762+#ifdef HAVE_CONFIG_H
5763+# include <config.h>
5764+#endif
5765+
5766+#include "gettextP.h"
5767+
5768+#include <locale.h>
5769+
5770+#ifdef _LIBC
5771+# include <libintl.h>
5772+#else
5773+# include "libgnuintl.h"
5774+#endif
5775+
5776+/* @@ end of prolog @@ */
5777+
5778+/* Names for the libintl functions are a problem. They must not clash
5779+ with existing names and they should follow ANSI C. But this source
5780+ code is also used in GNU C Library where the names have a __
5781+ prefix. So we have to make a difference here. */
5782+#ifdef _LIBC
5783+# define DNGETTEXT __dngettext
5784+# define DCNGETTEXT __dcngettext
5785+#else
5786+# define DNGETTEXT libintl_dngettext
5787+# define DCNGETTEXT libintl_dcngettext
5788+#endif
5789+
5790+/* Look up MSGID in the DOMAINNAME message catalog of the current
5791+ LC_MESSAGES locale and skip message according to the plural form. */
5792+char *
5793+DNGETTEXT (const char *domainname,
5794+ const char *msgid1, const char *msgid2, unsigned long int n)
5795+{
5796+ return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
5797+}
5798+
5799+#ifdef _LIBC
5800+/* Alias for function name in GNU C Library. */
5801+weak_alias (__dngettext, dngettext);
5802+#endif
5803--- lrzsz-0.12.20.safe/intl/eval-plural.h 1969-12-31 19:00:00.000000000 -0500
5804+++ lrzsz-0.12.20/intl/eval-plural.h 2004-09-12 14:40:34.390742768 -0400
5805@@ -0,0 +1,108 @@
5806+/* Plural expression evaluation.
5807+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
5808+
5809+ This program is free software; you can redistribute it and/or modify it
5810+ under the terms of the GNU Library General Public License as published
5811+ by the Free Software Foundation; either version 2, or (at your option)
5812+ any later version.
5813+
5814+ This program is distributed in the hope that it will be useful,
5815+ but WITHOUT ANY WARRANTY; without even the implied warranty of
5816+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5817+ Library General Public License for more details.
5818+
5819+ You should have received a copy of the GNU Library General Public
5820+ License along with this program; if not, write to the Free Software
5821+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5822+ USA. */
5823+
5824+#ifndef STATIC
5825+#define STATIC static
5826+#endif
5827+
5828+/* Evaluate the plural expression and return an index value. */
5829+STATIC
5830+unsigned long int
5831+internal_function
5832+plural_eval (struct expression *pexp, unsigned long int n)
5833+{
5834+ switch (pexp->nargs)
5835+ {
5836+ case 0:
5837+ switch (pexp->operation)
5838+ {
5839+ case var:
5840+ return n;
5841+ case num:
5842+ return pexp->val.num;
5843+ default:
5844+ break;
5845+ }
5846+ /* NOTREACHED */
5847+ break;
5848+ case 1:
5849+ {
5850+ /* pexp->operation must be lnot. */
5851+ unsigned long int arg = plural_eval (pexp->val.args[0], n);
5852+ return ! arg;
5853+ }
5854+ case 2:
5855+ {
5856+ unsigned long int leftarg = plural_eval (pexp->val.args[0], n);
5857+ if (pexp->operation == lor)
5858+ return leftarg || plural_eval (pexp->val.args[1], n);
5859+ else if (pexp->operation == land)
5860+ return leftarg && plural_eval (pexp->val.args[1], n);
5861+ else
5862+ {
5863+ unsigned long int rightarg = plural_eval (pexp->val.args[1], n);
5864+
5865+ switch (pexp->operation)
5866+ {
5867+ case mult:
5868+ return leftarg * rightarg;
5869+ case divide:
5870+#if !INTDIV0_RAISES_SIGFPE
5871+ if (rightarg == 0)
5872+ raise (SIGFPE);
5873+#endif
5874+ return leftarg / rightarg;
5875+ case module:
5876+#if !INTDIV0_RAISES_SIGFPE
5877+ if (rightarg == 0)
5878+ raise (SIGFPE);
5879+#endif
5880+ return leftarg % rightarg;
5881+ case plus:
5882+ return leftarg + rightarg;
5883+ case minus:
5884+ return leftarg - rightarg;
5885+ case less_than:
5886+ return leftarg < rightarg;
5887+ case greater_than:
5888+ return leftarg > rightarg;
5889+ case less_or_equal:
5890+ return leftarg <= rightarg;
5891+ case greater_or_equal:
5892+ return leftarg >= rightarg;
5893+ case equal:
5894+ return leftarg == rightarg;
5895+ case not_equal:
5896+ return leftarg != rightarg;
5897+ default:
5898+ break;
5899+ }
5900+ }
5901+ /* NOTREACHED */
5902+ break;
5903+ }
5904+ case 3:
5905+ {
5906+ /* pexp->operation must be qmop. */
5907+ unsigned long int boolarg = plural_eval (pexp->val.args[0], n);
5908+ return plural_eval (pexp->val.args[boolarg ? 1 : 2], n);
5909+ }
5910+ }
5911+ /* NOTREACHED */
5912+ return 0;
5913+}
5914--- lrzsz-0.12.20.safe/intl/explodename.c 1998-04-26 09:22:37.000000000 -0400
5915+++ lrzsz-0.12.20/intl/explodename.c 2004-09-12 14:40:34.395742008 -0400
5916@@ -1,19 +1,20 @@
5917-/* Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5918+/* Copyright (C) 1995-1998, 2000-2001, 2003 Free Software Foundation, Inc.
5919 Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
5920
5921- This program is free software; you can redistribute it and/or modify
5922- it under the terms of the GNU General Public License as published by
5923- the Free Software Foundation; either version 2, or (at your option)
5924+ This program is free software; you can redistribute it and/or modify it
5925+ under the terms of the GNU Library General Public License as published
5926+ by the Free Software Foundation; either version 2, or (at your option)
5927 any later version.
5928
5929 This program is distributed in the hope that it will be useful,
5930 but WITHOUT ANY WARRANTY; without even the implied warranty of
5931- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
5932- GNU General Public License for more details.
5933+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
5934+ Library General Public License for more details.
5935
5936- You should have received a copy of the GNU General Public License
5937- along with this program; if not, write to the Free Software Foundation,
5938- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
5939+ You should have received a copy of the GNU Library General Public
5940+ License along with this program; if not, write to the Free Software
5941+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
5942+ USA. */
5943
5944 #ifdef HAVE_CONFIG_H
5945 # include <config.h>
5946@@ -36,18 +37,23 @@
5947
5948 /* @@ end of prolog @@ */
5949
5950+char *
5951+_nl_find_language (const char *name)
5952+{
5953+ while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
5954+ && name[0] != '+' && name[0] != ',')
5955+ ++name;
5956+
5957+ return (char *) name;
5958+}
5959+
5960+
5961 int
5962-_nl_explode_name (name, language, modifier, territory, codeset,
5963- normalized_codeset, special, sponsor, revision)
5964- char *name;
5965- const char **language;
5966- const char **modifier;
5967- const char **territory;
5968- const char **codeset;
5969- const char **normalized_codeset;
5970- const char **special;
5971- const char **sponsor;
5972- const char **revision;
5973+_nl_explode_name (char *name,
5974+ const char **language, const char **modifier,
5975+ const char **territory, const char **codeset,
5976+ const char **normalized_codeset, const char **special,
5977+ const char **sponsor, const char **revision)
5978 {
5979 enum { undecided, xpg, cen } syntax;
5980 char *cp;
5981@@ -67,9 +73,7 @@
5982 mask = 0;
5983 syntax = undecided;
5984 *language = cp = name;
5985- while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
5986- && cp[0] != '+' && cp[0] != ',')
5987- ++cp;
5988+ cp = _nl_find_language (*language);
5989
5990 if (*language == cp)
5991 /* This does not make sense: language has to be specified. Use
5992--- lrzsz-0.12.20.safe/intl/finddomain.c 1998-04-26 09:22:36.000000000 -0400
5993+++ lrzsz-0.12.20/intl/finddomain.c 2004-09-12 14:40:34.415738968 -0400
5994@@ -1,64 +1,40 @@
5995 /* Handle list of needed message catalogs
5996- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
5997- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
5998+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
5999+ Written by Ulrich Drepper <drepper@gnu.org>, 1995.
6000
6001- This program is free software; you can redistribute it and/or modify
6002- it under the terms of the GNU General Public License as published by
6003- the Free Software Foundation; either version 2, or (at your option)
6004+ This program is free software; you can redistribute it and/or modify it
6005+ under the terms of the GNU Library General Public License as published
6006+ by the Free Software Foundation; either version 2, or (at your option)
6007 any later version.
6008
6009 This program is distributed in the hope that it will be useful,
6010 but WITHOUT ANY WARRANTY; without even the implied warranty of
6011- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6012- GNU General Public License for more details.
6013+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6014+ Library General Public License for more details.
6015
6016- You should have received a copy of the GNU General Public License
6017- along with this program; if not, write to the Free Software Foundation,
6018- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6019+ You should have received a copy of the GNU Library General Public
6020+ License along with this program; if not, write to the Free Software
6021+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6022+ USA. */
6023
6024 #ifdef HAVE_CONFIG_H
6025 # include <config.h>
6026 #endif
6027
6028-#include <ctype.h>
6029-#include <errno.h>
6030 #include <stdio.h>
6031 #include <sys/types.h>
6032-
6033-#if defined STDC_HEADERS || defined _LIBC
6034-# include <stdlib.h>
6035-#else
6036-# ifdef HAVE_MALLOC_H
6037-# include <malloc.h>
6038-# else
6039-void free ();
6040-# endif
6041-#endif
6042-
6043-#if defined HAVE_STRING_H || defined _LIBC
6044-# include <string.h>
6045-#else
6046-# include <strings.h>
6047-# ifndef memcpy
6048-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
6049-# endif
6050-#endif
6051-#if !HAVE_STRCHR && !defined _LIBC
6052-# ifndef strchr
6053-# define strchr index
6054-# endif
6055-#endif
6056+#include <stdlib.h>
6057+#include <string.h>
6058
6059 #if defined HAVE_UNISTD_H || defined _LIBC
6060 # include <unistd.h>
6061 #endif
6062
6063-#include "gettext.h"
6064 #include "gettextP.h"
6065 #ifdef _LIBC
6066 # include <libintl.h>
6067 #else
6068-# include "libgettext.h"
6069+# include "libgnuintl.h"
6070 #endif
6071
6072 /* @@ end of prolog @@ */
6073@@ -70,10 +46,9 @@
6074 the DOMAINNAME and CATEGORY parameters with respect to the currently
6075 established bindings. */
6076 struct loaded_l10nfile *
6077-_nl_find_domain (dirname, locale, domainname)
6078- const char *dirname;
6079- char *locale;
6080- const char *domainname;
6081+internal_function
6082+_nl_find_domain (const char *dirname, char *locale,
6083+ const char *domainname, struct binding *domainbinding)
6084 {
6085 struct loaded_l10nfile *retval;
6086 const char *language;
6087@@ -95,9 +70,9 @@
6088
6089 language[_territory][+audience][+special][,[sponsor][_revision]]
6090
6091- Beside the first all of them are allowed to be missing. If the
6092- full specified locale is not found, the less specific one are
6093- looked for. The various part will be stripped of according to
6094+ Beside the first part all of them are allowed to be missing. If
6095+ the full specified locale is not found, the less specific one are
6096+ looked for. The various parts will be stripped off according to
6097 the following order:
6098 (1) revision
6099 (2) sponsor
6100@@ -119,7 +94,7 @@
6101 int cnt;
6102
6103 if (retval->decided == 0)
6104- _nl_load_domain (retval);
6105+ _nl_load_domain (retval, domainbinding);
6106
6107 if (retval->data != NULL)
6108 return retval;
6109@@ -127,7 +102,7 @@
6110 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6111 {
6112 if (retval->successor[cnt]->decided == 0)
6113- _nl_load_domain (retval->successor[cnt]);
6114+ _nl_load_domain (retval->successor[cnt], domainbinding);
6115
6116 if (retval->successor[cnt]->data != NULL)
6117 break;
6118@@ -142,12 +117,18 @@
6119 alias_value = _nl_expand_alias (locale);
6120 if (alias_value != NULL)
6121 {
6122+#if defined _LIBC || defined HAVE_STRDUP
6123+ locale = strdup (alias_value);
6124+ if (locale == NULL)
6125+ return NULL;
6126+#else
6127 size_t len = strlen (alias_value) + 1;
6128 locale = (char *) malloc (len);
6129 if (locale == NULL)
6130 return NULL;
6131
6132 memcpy (locale, alias_value, len);
6133+#endif
6134 }
6135
6136 /* Now we determine the single parts of the locale name. First
6137@@ -168,14 +149,14 @@
6138 return NULL;
6139
6140 if (retval->decided == 0)
6141- _nl_load_domain (retval);
6142+ _nl_load_domain (retval, domainbinding);
6143 if (retval->data == NULL)
6144 {
6145 int cnt;
6146 for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
6147 {
6148 if (retval->successor[cnt]->decided == 0)
6149- _nl_load_domain (retval->successor[cnt]);
6150+ _nl_load_domain (retval->successor[cnt], domainbinding);
6151 if (retval->successor[cnt]->data != NULL)
6152 break;
6153 }
6154@@ -185,5 +166,27 @@
6155 if (alias_value != NULL)
6156 free (locale);
6157
6158+ /* The space for normalized_codeset is dynamically allocated. Free it. */
6159+ if (mask & XPG_NORM_CODESET)
6160+ free ((void *) normalized_codeset);
6161+
6162 return retval;
6163 }
6164+
6165+
6166+#ifdef _LIBC
6167+libc_freeres_fn (free_mem)
6168+{
6169+ struct loaded_l10nfile *runp = _nl_loaded_domains;
6170+
6171+ while (runp != NULL)
6172+ {
6173+ struct loaded_l10nfile *here = runp;
6174+ if (runp->data != NULL)
6175+ _nl_unload_domain ((struct loaded_domain *) runp->data);
6176+ runp = runp->next;
6177+ free ((char *) here->filename);
6178+ free (here);
6179+ }
6180+}
6181+#endif
6182--- lrzsz-0.12.20.safe/intl/gettext.c 1998-04-26 09:22:36.000000000 -0400
6183+++ lrzsz-0.12.20/intl/gettext.c 2004-09-12 14:40:34.420738208 -0400
6184@@ -1,19 +1,20 @@
6185-/* Implementation of gettext(3) function
6186- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6187+/* Implementation of gettext(3) function.
6188+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
6189
6190- This program is free software; you can redistribute it and/or modify
6191- it under the terms of the GNU General Public License as published by
6192- the Free Software Foundation; either version 2, or (at your option)
6193+ This program is free software; you can redistribute it and/or modify it
6194+ under the terms of the GNU Library General Public License as published
6195+ by the Free Software Foundation; either version 2, or (at your option)
6196 any later version.
6197
6198 This program is distributed in the hope that it will be useful,
6199 but WITHOUT ANY WARRANTY; without even the implied warranty of
6200- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6201- GNU General Public License for more details.
6202+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6203+ Library General Public License for more details.
6204
6205- You should have received a copy of the GNU General Public License
6206- along with this program; if not, write to the Free Software Foundation,
6207- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6208+ You should have received a copy of the GNU Library General Public
6209+ License along with this program; if not, write to the Free Software
6210+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6211+ USA. */
6212
6213 #ifdef HAVE_CONFIG_H
6214 # include <config.h>
6215@@ -23,21 +24,14 @@
6216 # define __need_NULL
6217 # include <stddef.h>
6218 #else
6219-# ifdef STDC_HEADERS
6220-# include <stdlib.h> /* Just for NULL. */
6221-# else
6222-# ifdef HAVE_STRING_H
6223-# include <string.h>
6224-# else
6225-# define NULL ((void *) 0)
6226-# endif
6227-# endif
6228+# include <stdlib.h> /* Just for NULL. */
6229 #endif
6230
6231+#include "gettextP.h"
6232 #ifdef _LIBC
6233 # include <libintl.h>
6234 #else
6235-# include "libgettext.h"
6236+# include "libgnuintl.h"
6237 #endif
6238
6239 /* @@ end of prolog @@ */
6240@@ -48,20 +42,19 @@
6241 prefix. So we have to make a difference here. */
6242 #ifdef _LIBC
6243 # define GETTEXT __gettext
6244-# define DGETTEXT __dgettext
6245+# define DCGETTEXT INTUSE(__dcgettext)
6246 #else
6247-# define GETTEXT gettext__
6248-# define DGETTEXT dgettext__
6249+# define GETTEXT libintl_gettext
6250+# define DCGETTEXT libintl_dcgettext
6251 #endif
6252
6253 /* Look up MSGID in the current default message catalog for the current
6254 LC_MESSAGES locale. If not found, returns MSGID itself (the default
6255 text). */
6256 char *
6257-GETTEXT (msgid)
6258- const char *msgid;
6259+GETTEXT (const char *msgid)
6260 {
6261- return DGETTEXT (NULL, msgid);
6262+ return DCGETTEXT (NULL, msgid, LC_MESSAGES);
6263 }
6264
6265 #ifdef _LIBC
6266--- lrzsz-0.12.20.safe/intl/gettext.h 1998-04-26 09:22:35.000000000 -0400
6267+++ lrzsz-0.12.20/intl/gettext.h 1969-12-31 19:00:00.000000000 -0500
6268@@ -1,105 +0,0 @@
6269-/* Internal header for GNU gettext internationalization functions
6270- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6271-
6272- This program is free software; you can redistribute it and/or modify
6273- it under the terms of the GNU General Public License as published by
6274- the Free Software Foundation; either version 2, or (at your option)
6275- any later version.
6276-
6277- This program is distributed in the hope that it will be useful,
6278- but WITHOUT ANY WARRANTY; without even the implied warranty of
6279- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6280- GNU General Public License for more details.
6281-
6282- You should have received a copy of the GNU Library General Public
6283- License along with the GNU C Library; see the file COPYING.LIB. If not,
6284- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6285- Boston, MA 02111-1307, USA. */
6286-
6287-#ifndef _GETTEXT_H
6288-#define _GETTEXT_H 1
6289-
6290-#include <stdio.h>
6291-
6292-#if HAVE_LIMITS_H || _LIBC
6293-# include <limits.h>
6294-#endif
6295-
6296-/* @@ end of prolog @@ */
6297-
6298-/* The magic number of the GNU message catalog format. */
6299-#define _MAGIC 0x950412de
6300-#define _MAGIC_SWAPPED 0xde120495
6301-
6302-/* Revision number of the currently used .mo (binary) file format. */
6303-#define MO_REVISION_NUMBER 0
6304-
6305-/* The following contortions are an attempt to use the C preprocessor
6306- to determine an unsigned integral type that is 32 bits wide. An
6307- alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6308- doing that would require that the configure script compile and *run*
6309- the resulting executable. Locally running cross-compiled executables
6310- is usually not possible. */
6311-
6312-#if __STDC__
6313-# define UINT_MAX_32_BITS 4294967295U
6314-#else
6315-# define UINT_MAX_32_BITS 0xFFFFFFFF
6316-#endif
6317-
6318-/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6319- This should be valid for all systems GNU cares about because
6320- that doesn't include 16-bit systems, and only modern systems
6321- (that certainly have <limits.h>) have 64+-bit integral types. */
6322-
6323-#ifndef UINT_MAX
6324-# define UINT_MAX UINT_MAX_32_BITS
6325-#endif
6326-
6327-#if UINT_MAX == UINT_MAX_32_BITS
6328-typedef unsigned nls_uint32;
6329-#else
6330-# if USHRT_MAX == UINT_MAX_32_BITS
6331-typedef unsigned short nls_uint32;
6332-# else
6333-# if ULONG_MAX == UINT_MAX_32_BITS
6334-typedef unsigned long nls_uint32;
6335-# else
6336- /* The following line is intended to throw an error. Using #error is
6337- not portable enough. */
6338- "Cannot determine unsigned 32-bit data type."
6339-# endif
6340-# endif
6341-#endif
6342-
6343-
6344-/* Header for binary .mo file format. */
6345-struct mo_file_header
6346-{
6347- /* The magic number. */
6348- nls_uint32 magic;
6349- /* The revision number of the file format. */
6350- nls_uint32 revision;
6351- /* The number of strings pairs. */
6352- nls_uint32 nstrings;
6353- /* Offset of table with start offsets of original strings. */
6354- nls_uint32 orig_tab_offset;
6355- /* Offset of table with start offsets of translation strings. */
6356- nls_uint32 trans_tab_offset;
6357- /* Size of hashing table. */
6358- nls_uint32 hash_tab_size;
6359- /* Offset of first hashing entry. */
6360- nls_uint32 hash_tab_offset;
6361-};
6362-
6363-struct string_desc
6364-{
6365- /* Length of addressed string. */
6366- nls_uint32 length;
6367- /* Offset of string in file. */
6368- nls_uint32 offset;
6369-};
6370-
6371-/* @@ begin of epilog @@ */
6372-
6373-#endif /* gettext.h */
6374--- lrzsz-0.12.20.safe/intl/gettextP.h 1998-04-26 09:22:35.000000000 -0400
6375+++ lrzsz-0.12.20/intl/gettextP.h 2004-09-12 14:40:34.426737296 -0400
6376@@ -1,33 +1,53 @@
6377-/* Header describing internals of gettext library
6378- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
6379+/* Header describing internals of libintl library.
6380+ Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
6381+ Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
6382
6383- This program is free software; you can redistribute it and/or modify
6384- it under the terms of the GNU General Public License as published by
6385- the Free Software Foundation; either version 2, or (at your option)
6386+ This program is free software; you can redistribute it and/or modify it
6387+ under the terms of the GNU Library General Public License as published
6388+ by the Free Software Foundation; either version 2, or (at your option)
6389 any later version.
6390
6391 This program is distributed in the hope that it will be useful,
6392 but WITHOUT ANY WARRANTY; without even the implied warranty of
6393- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6394- GNU General Public License for more details.
6395+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6396+ Library General Public License for more details.
6397
6398- You should have received a copy of the GNU General Public License
6399- along with this program; if not, write to the Free Software Foundation,
6400- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6401+ You should have received a copy of the GNU Library General Public
6402+ License along with this program; if not, write to the Free Software
6403+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6404+ USA. */
6405
6406 #ifndef _GETTEXTP_H
6407 #define _GETTEXTP_H
6408
6409+#include <stddef.h> /* Get size_t. */
6410+
6411+#ifdef _LIBC
6412+# include "../iconv/gconv_int.h"
6413+#else
6414+# if HAVE_ICONV
6415+# include <iconv.h>
6416+# endif
6417+#endif
6418+
6419 #include "loadinfo.h"
6420
6421+#include "gmo.h" /* Get nls_uint32. */
6422+
6423 /* @@ end of prolog @@ */
6424
6425-#ifndef PARAMS
6426-# if __STDC__
6427-# define PARAMS(args) args
6428-# else
6429-# define PARAMS(args) ()
6430-# endif
6431+#ifndef internal_function
6432+# define internal_function
6433+#endif
6434+
6435+#ifndef attribute_hidden
6436+# define attribute_hidden
6437+#endif
6438+
6439+/* Tell the compiler when a conditional or integer expression is
6440+ almost always true or almost always false. */
6441+#ifndef HAVE_BUILTIN_EXPECT
6442+# define __builtin_expect(expr, val) (expr)
6443 #endif
6444
6445 #ifndef W
6446@@ -35,38 +55,160 @@
6447 #endif
6448
6449
6450-static nls_uint32 SWAP PARAMS ((nls_uint32 i));
6451-
6452+#ifdef _LIBC
6453+# include <byteswap.h>
6454+# define SWAP(i) bswap_32 (i)
6455+#else
6456 static inline nls_uint32
6457 SWAP (i)
6458 nls_uint32 i;
6459 {
6460 return (i << 24) | ((i & 0xff00) << 8) | ((i >> 8) & 0xff00) | (i >> 24);
6461 }
6462+#endif
6463+
6464
6465+/* In-memory representation of system dependent string. */
6466+struct sysdep_string_desc
6467+{
6468+ /* Length of addressed string, including the trailing NUL. */
6469+ size_t length;
6470+ /* Pointer to addressed string. */
6471+ const char *pointer;
6472+};
6473
6474+/* The representation of an opened message catalog. */
6475 struct loaded_domain
6476 {
6477+ /* Pointer to memory containing the .mo file. */
6478 const char *data;
6479+ /* 1 if the memory is mmap()ed, 0 if the memory is malloc()ed. */
6480+ int use_mmap;
6481+ /* Size of mmap()ed memory. */
6482+ size_t mmap_size;
6483+ /* 1 if the .mo file uses a different endianness than this machine. */
6484 int must_swap;
6485+ /* Pointer to additional malloc()ed memory. */
6486+ void *malloced;
6487+
6488+ /* Number of static strings pairs. */
6489 nls_uint32 nstrings;
6490- struct string_desc *orig_tab;
6491- struct string_desc *trans_tab;
6492+ /* Pointer to descriptors of original strings in the file. */
6493+ const struct string_desc *orig_tab;
6494+ /* Pointer to descriptors of translated strings in the file. */
6495+ const struct string_desc *trans_tab;
6496+
6497+ /* Number of system dependent strings pairs. */
6498+ nls_uint32 n_sysdep_strings;
6499+ /* Pointer to descriptors of original sysdep strings. */
6500+ const struct sysdep_string_desc *orig_sysdep_tab;
6501+ /* Pointer to descriptors of translated sysdep strings. */
6502+ const struct sysdep_string_desc *trans_sysdep_tab;
6503+
6504+ /* Size of hash table. */
6505 nls_uint32 hash_size;
6506- nls_uint32 *hash_tab;
6507+ /* Pointer to hash table. */
6508+ const nls_uint32 *hash_tab;
6509+ /* 1 if the hash table uses a different endianness than this machine. */
6510+ int must_swap_hash_tab;
6511+
6512+ int codeset_cntr;
6513+#ifdef _LIBC
6514+ __gconv_t conv;
6515+#else
6516+# if HAVE_ICONV
6517+ iconv_t conv;
6518+# endif
6519+#endif
6520+ char **conv_tab;
6521+
6522+ struct expression *plural;
6523+ unsigned long int nplurals;
6524 };
6525
6526+/* We want to allocate a string at the end of the struct. But ISO C
6527+ doesn't allow zero sized arrays. */
6528+#ifdef __GNUC__
6529+# define ZERO 0
6530+#else
6531+# define ZERO 1
6532+#endif
6533+
6534+/* A set of settings bound to a message domain. Used to store settings
6535+ from bindtextdomain() and bind_textdomain_codeset(). */
6536 struct binding
6537 {
6538 struct binding *next;
6539- char *domainname;
6540 char *dirname;
6541+ int codeset_cntr; /* Incremented each time codeset changes. */
6542+ char *codeset;
6543+ char domainname[ZERO];
6544 };
6545
6546-struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
6547- char *__locale,
6548- const char *__domainname));
6549-void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain));
6550+/* A counter which is incremented each time some previous translations
6551+ become invalid.
6552+ This variable is part of the external ABI of the GNU libintl. */
6553+extern int _nl_msg_cat_cntr;
6554+
6555+#ifndef _LIBC
6556+const char *_nl_locale_name (int category, const char *categoryname);
6557+#endif
6558+
6559+struct loaded_l10nfile *_nl_find_domain (const char *__dirname, char *__locale,
6560+ const char *__domainname,
6561+ struct binding *__domainbinding)
6562+ internal_function;
6563+void _nl_load_domain (struct loaded_l10nfile *__domain,
6564+ struct binding *__domainbinding)
6565+ internal_function;
6566+void _nl_unload_domain (struct loaded_domain *__domain)
6567+ internal_function;
6568+const char *_nl_init_domain_conv (struct loaded_l10nfile *__domain_file,
6569+ struct loaded_domain *__domain,
6570+ struct binding *__domainbinding)
6571+ internal_function;
6572+void _nl_free_domain_conv (struct loaded_domain *__domain)
6573+ internal_function;
6574+
6575+char *_nl_find_msg (struct loaded_l10nfile *domain_file,
6576+ struct binding *domainbinding, const char *msgid,
6577+ size_t *lengthp)
6578+ internal_function;
6579+
6580+#ifdef _LIBC
6581+extern char *__gettext (const char *__msgid);
6582+extern char *__dgettext (const char *__domainname, const char *__msgid);
6583+extern char *__dcgettext (const char *__domainname, const char *__msgid,
6584+ int __category);
6585+extern char *__ngettext (const char *__msgid1, const char *__msgid2,
6586+ unsigned long int __n);
6587+extern char *__dngettext (const char *__domainname,
6588+ const char *__msgid1, const char *__msgid2,
6589+ unsigned long int n);
6590+extern char *__dcngettext (const char *__domainname,
6591+ const char *__msgid1, const char *__msgid2,
6592+ unsigned long int __n, int __category);
6593+extern char *__dcigettext (const char *__domainname,
6594+ const char *__msgid1, const char *__msgid2,
6595+ int __plural, unsigned long int __n,
6596+ int __category);
6597+extern char *__textdomain (const char *__domainname);
6598+extern char *__bindtextdomain (const char *__domainname,
6599+ const char *__dirname);
6600+extern char *__bind_textdomain_codeset (const char *__domainname,
6601+ const char *__codeset);
6602+#else
6603+/* Declare the exported libintl_* functions, in a way that allows us to
6604+ call them under their real name. */
6605+# undef _INTL_REDIRECT_INLINE
6606+# undef _INTL_REDIRECT_MACROS
6607+# define _INTL_REDIRECT_MACROS
6608+# include "libgnuintl.h"
6609+extern char *libintl_dcigettext (const char *__domainname,
6610+ const char *__msgid1, const char *__msgid2,
6611+ int __plural, unsigned long int __n,
6612+ int __category);
6613+#endif
6614
6615 /* @@ begin of epilog @@ */
6616
6617--- lrzsz-0.12.20.safe/intl/gmo.h 1969-12-31 19:00:00.000000000 -0500
6618+++ lrzsz-0.12.20/intl/gmo.h 2004-09-12 14:40:34.431736536 -0400
6619@@ -0,0 +1,149 @@
6620+/* Description of GNU message catalog format: general file layout.
6621+ Copyright (C) 1995, 1997, 2000-2002, 2004 Free Software Foundation, Inc.
6622+
6623+ This program is free software; you can redistribute it and/or modify it
6624+ under the terms of the GNU Library General Public License as published
6625+ by the Free Software Foundation; either version 2, or (at your option)
6626+ any later version.
6627+
6628+ This program is distributed in the hope that it will be useful,
6629+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6630+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6631+ Library General Public License for more details.
6632+
6633+ You should have received a copy of the GNU Library General Public
6634+ License along with this program; if not, write to the Free Software
6635+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6636+ USA. */
6637+
6638+#ifndef _GETTEXT_H
6639+#define _GETTEXT_H 1
6640+
6641+#include <limits.h>
6642+
6643+/* @@ end of prolog @@ */
6644+
6645+/* The magic number of the GNU message catalog format. */
6646+#define _MAGIC 0x950412de
6647+#define _MAGIC_SWAPPED 0xde120495
6648+
6649+/* Revision number of the currently used .mo (binary) file format. */
6650+#define MO_REVISION_NUMBER 0
6651+#define MO_REVISION_NUMBER_WITH_SYSDEP_I 1
6652+
6653+/* The following contortions are an attempt to use the C preprocessor
6654+ to determine an unsigned integral type that is 32 bits wide. An
6655+ alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
6656+ as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
6657+ when cross-compiling. */
6658+
6659+#if __STDC__
6660+# define UINT_MAX_32_BITS 4294967295U
6661+#else
6662+# define UINT_MAX_32_BITS 0xFFFFFFFF
6663+#endif
6664+
6665+/* If UINT_MAX isn't defined, assume it's a 32-bit type.
6666+ This should be valid for all systems GNU cares about because
6667+ that doesn't include 16-bit systems, and only modern systems
6668+ (that certainly have <limits.h>) have 64+-bit integral types. */
6669+
6670+#ifndef UINT_MAX
6671+# define UINT_MAX UINT_MAX_32_BITS
6672+#endif
6673+
6674+#if UINT_MAX == UINT_MAX_32_BITS
6675+typedef unsigned nls_uint32;
6676+#else
6677+# if USHRT_MAX == UINT_MAX_32_BITS
6678+typedef unsigned short nls_uint32;
6679+# else
6680+# if ULONG_MAX == UINT_MAX_32_BITS
6681+typedef unsigned long nls_uint32;
6682+# else
6683+ /* The following line is intended to throw an error. Using #error is
6684+ not portable enough. */
6685+ "Cannot determine unsigned 32-bit data type."
6686+# endif
6687+# endif
6688+#endif
6689+
6690+
6691+/* Header for binary .mo file format. */
6692+struct mo_file_header
6693+{
6694+ /* The magic number. */
6695+ nls_uint32 magic;
6696+ /* The revision number of the file format. */
6697+ nls_uint32 revision;
6698+
6699+ /* The following are only used in .mo files with major revision 0 or 1. */
6700+
6701+ /* The number of strings pairs. */
6702+ nls_uint32 nstrings;
6703+ /* Offset of table with start offsets of original strings. */
6704+ nls_uint32 orig_tab_offset;
6705+ /* Offset of table with start offsets of translated strings. */
6706+ nls_uint32 trans_tab_offset;
6707+ /* Size of hash table. */
6708+ nls_uint32 hash_tab_size;
6709+ /* Offset of first hash table entry. */
6710+ nls_uint32 hash_tab_offset;
6711+
6712+ /* The following are only used in .mo files with minor revision >= 1. */
6713+
6714+ /* The number of system dependent segments. */
6715+ nls_uint32 n_sysdep_segments;
6716+ /* Offset of table describing system dependent segments. */
6717+ nls_uint32 sysdep_segments_offset;
6718+ /* The number of system dependent strings pairs. */
6719+ nls_uint32 n_sysdep_strings;
6720+ /* Offset of table with start offsets of original sysdep strings. */
6721+ nls_uint32 orig_sysdep_tab_offset;
6722+ /* Offset of table with start offsets of translated sysdep strings. */
6723+ nls_uint32 trans_sysdep_tab_offset;
6724+};
6725+
6726+/* Descriptor for static string contained in the binary .mo file. */
6727+struct string_desc
6728+{
6729+ /* Length of addressed string, not including the trailing NUL. */
6730+ nls_uint32 length;
6731+ /* Offset of string in file. */
6732+ nls_uint32 offset;
6733+};
6734+
6735+/* The following are only used in .mo files with minor revision >= 1. */
6736+
6737+/* Descriptor for system dependent string segment. */
6738+struct sysdep_segment
6739+{
6740+ /* Length of addressed string, including the trailing NUL. */
6741+ nls_uint32 length;
6742+ /* Offset of string in file. */
6743+ nls_uint32 offset;
6744+};
6745+
6746+/* Descriptor for system dependent string. */
6747+struct sysdep_string
6748+{
6749+ /* Offset of static string segments in file. */
6750+ nls_uint32 offset;
6751+ /* Alternating sequence of static and system dependent segments.
6752+ The last segment is a static segment, including the trailing NUL. */
6753+ struct segment_pair
6754+ {
6755+ /* Size of static segment. */
6756+ nls_uint32 segsize;
6757+ /* Reference to system dependent string segment, or ~0 at the end. */
6758+ nls_uint32 sysdepref;
6759+ } segments[1];
6760+};
6761+
6762+/* Marker for the end of the segments[] array. This has the value 0xFFFFFFFF,
6763+ regardless whether 'int' is 16 bit, 32 bit, or 64 bit. */
6764+#define SEGMENTS_END ((nls_uint32) ~0)
6765+
6766+/* @@ begin of epilog @@ */
6767+
6768+#endif /* gettext.h */
6769--- lrzsz-0.12.20.safe/intl/hash-string.h 1998-04-26 09:22:36.000000000 -0400
6770+++ lrzsz-0.12.20/intl/hash-string.h 2004-09-12 14:40:34.436735776 -0400
6771@@ -1,35 +1,23 @@
6772-/* Implements a string hashing function.
6773- Copyright (C) 1995, 1997 Free Software Foundation, Inc.
6774+/* Description of GNU message catalog format: string hashing function.
6775+ Copyright (C) 1995, 1997-1998, 2000-2003 Free Software Foundation, Inc.
6776
6777- This program is free software; you can redistribute it and/or modify
6778- it under the terms of the GNU General Public License as published by
6779- the Free Software Foundation; either version 2, or (at your option)
6780+ This program is free software; you can redistribute it and/or modify it
6781+ under the terms of the GNU Library General Public License as published
6782+ by the Free Software Foundation; either version 2, or (at your option)
6783 any later version.
6784
6785 This program is distributed in the hope that it will be useful,
6786 but WITHOUT ANY WARRANTY; without even the implied warranty of
6787- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6788- GNU General Public License for more details.
6789+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6790+ Library General Public License for more details.
6791
6792 You should have received a copy of the GNU Library General Public
6793- License along with the GNU C Library; see the file COPYING.LIB. If not,
6794- write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
6795- Boston, MA 02111-1307, USA. */
6796-
6797-#ifdef HAVE_VALUES_H
6798-# include <values.h>
6799-#endif
6800+ License along with this program; if not, write to the Free Software
6801+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6802+ USA. */
6803
6804 /* @@ end of prolog @@ */
6805
6806-#ifndef PARAMS
6807-# if __STDC__
6808-# define PARAMS(Args) Args
6809-# else
6810-# define PARAMS(Args) ()
6811-# endif
6812-#endif
6813-
6814 /* We assume to have `unsigned long int' value with at least 32 bits. */
6815 #define HASHWORDBITS 32
6816
6817@@ -37,11 +25,8 @@
6818 /* Defines the so called `hashpjw' function by P.J. Weinberger
6819 [see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
6820 1986, 1987 Bell Telephone Laboratories, Inc.] */
6821-static unsigned long hash_string PARAMS ((const char *__str_param));
6822-
6823-static inline unsigned long
6824-hash_string (str_param)
6825- const char *str_param;
6826+static inline unsigned long int
6827+hash_string (const char *str_param)
6828 {
6829 unsigned long int hval, g;
6830 const char *str = str_param;
6831@@ -51,8 +36,8 @@
6832 while (*str != '\0')
6833 {
6834 hval <<= 4;
6835- hval += (unsigned long) *str++;
6836- g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
6837+ hval += (unsigned char) *str++;
6838+ g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
6839 if (g != 0)
6840 {
6841 hval ^= g >> (HASHWORDBITS - 8);
6842--- lrzsz-0.12.20.safe/intl/intl-compat.c 1998-04-26 09:20:52.000000000 -0400
6843+++ lrzsz-0.12.20/intl/intl-compat.c 2004-09-12 14:40:34.441735016 -0400
6844@@ -1,76 +1,131 @@
6845 /* intl-compat.c - Stub functions to call gettext functions from GNU gettext
6846 Library.
6847- Copyright (C) 1995 Software Foundation, Inc.
6848+ Copyright (C) 1995, 2000-2003 Software Foundation, Inc.
6849
6850-This program is free software; you can redistribute it and/or modify
6851-it under the terms of the GNU General Public License as published by
6852-the Free Software Foundation; either version 2, or (at your option)
6853-any later version.
6854+ This program is free software; you can redistribute it and/or modify it
6855+ under the terms of the GNU Library General Public License as published
6856+ by the Free Software Foundation; either version 2, or (at your option)
6857+ any later version.
6858
6859-This program is distributed in the hope that it will be useful,
6860-but WITHOUT ANY WARRANTY; without even the implied warranty of
6861-MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
6862-GNU General Public License for more details.
6863+ This program is distributed in the hope that it will be useful,
6864+ but WITHOUT ANY WARRANTY; without even the implied warranty of
6865+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
6866+ Library General Public License for more details.
6867
6868-You should have received a copy of the GNU General Public License
6869-along with this program; if not, write to the Free Software
6870-Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
6871+ You should have received a copy of the GNU Library General Public
6872+ License along with this program; if not, write to the Free Software
6873+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
6874+ USA. */
6875
6876 #ifdef HAVE_CONFIG_H
6877 # include <config.h>
6878 #endif
6879
6880-#include "libgettext.h"
6881+#include "gettextP.h"
6882
6883 /* @@ end of prolog @@ */
6884
6885+/* This file redirects the gettext functions (without prefix) to those
6886+ defined in the included GNU libintl library (with "libintl_" prefix).
6887+ It is compiled into libintl in order to make the AM_GNU_GETTEXT test
6888+ of gettext <= 0.11.2 work with the libintl library >= 0.11.3 which
6889+ has the redirections primarily in the <libintl.h> include file.
6890+ It is also compiled into libgnuintl so that libgnuintl.so can be used
6891+ as LD_PRELOADable library on glibc systems, to provide the extra
6892+ features that the functions in the libc don't have (namely, logging). */
6893+
6894
6895 #undef gettext
6896 #undef dgettext
6897 #undef dcgettext
6898+#undef ngettext
6899+#undef dngettext
6900+#undef dcngettext
6901 #undef textdomain
6902 #undef bindtextdomain
6903+#undef bind_textdomain_codeset
6904+
6905+
6906+/* When building a DLL, we must export some functions. Note that because
6907+ the functions are only defined for binary backward compatibility, we
6908+ don't need to use __declspec(dllimport) in any case. */
6909+#if defined _MSC_VER && BUILDING_DLL
6910+# define DLL_EXPORTED __declspec(dllexport)
6911+#else
6912+# define DLL_EXPORTED
6913+#endif
6914
6915
6916+DLL_EXPORTED
6917 char *
6918-bindtextdomain (domainname, dirname)
6919- const char *domainname;
6920- const char *dirname;
6921+gettext (const char *msgid)
6922 {
6923- return bindtextdomain__ (domainname, dirname);
6924+ return libintl_gettext (msgid);
6925 }
6926
6927
6928+DLL_EXPORTED
6929 char *
6930-dcgettext (domainname, msgid, category)
6931- const char *domainname;
6932- const char *msgid;
6933- int category;
6934+dgettext (const char *domainname, const char *msgid)
6935 {
6936- return dcgettext__ (domainname, msgid, category);
6937+ return libintl_dgettext (domainname, msgid);
6938 }
6939
6940
6941+DLL_EXPORTED
6942 char *
6943-dgettext (domainname, msgid)
6944- const char *domainname;
6945- const char *msgid;
6946+dcgettext (const char *domainname, const char *msgid, int category)
6947 {
6948- return dgettext__ (domainname, msgid);
6949+ return libintl_dcgettext (domainname, msgid, category);
6950 }
6951
6952
6953+DLL_EXPORTED
6954 char *
6955-gettext (msgid)
6956- const char *msgid;
6957+ngettext (const char *msgid1, const char *msgid2, unsigned long int n)
6958 {
6959- return gettext__ (msgid);
6960+ return libintl_ngettext (msgid1, msgid2, n);
6961 }
6962
6963
6964+DLL_EXPORTED
6965 char *
6966-textdomain (domainname)
6967- const char *domainname;
6968+dngettext (const char *domainname,
6969+ const char *msgid1, const char *msgid2, unsigned long int n)
6970 {
6971- return textdomain__ (domainname);
6972+ return libintl_dngettext (domainname, msgid1, msgid2, n);
6973+}
6974+
6975+
6976+DLL_EXPORTED
6977+char *
6978+dcngettext (const char *domainname,
6979+ const char *msgid1, const char *msgid2, unsigned long int n,
6980+ int category)
6981+{
6982+ return libintl_dcngettext (domainname, msgid1, msgid2, n, category);
6983+}
6984+
6985+
6986+DLL_EXPORTED
6987+char *
6988+textdomain (const char *domainname)
6989+{
6990+ return libintl_textdomain (domainname);
6991+}
6992+
6993+
6994+DLL_EXPORTED
6995+char *
6996+bindtextdomain (const char *domainname, const char *dirname)
6997+{
6998+ return libintl_bindtextdomain (domainname, dirname);
6999+}
7000+
7001+
7002+DLL_EXPORTED
7003+char *
7004+bind_textdomain_codeset (const char *domainname, const char *codeset)
7005+{
7006+ return libintl_bind_textdomain_codeset (domainname, codeset);
7007 }
7008--- lrzsz-0.12.20.safe/intl/l10nflist.c 1998-04-26 09:22:37.000000000 -0400
7009+++ lrzsz-0.12.20/intl/l10nflist.c 2004-09-12 14:40:34.457732584 -0400
7010@@ -1,52 +1,40 @@
7011-/* Handle list of needed message catalogs
7012- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7013- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7014+/* Copyright (C) 1995-1999, 2000-2003 Free Software Foundation, Inc.
7015+ Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
7016
7017- This program is free software; you can redistribute it and/or modify
7018- it under the terms of the GNU General Public License as published by
7019- the Free Software Foundation; either version 2, or (at your option)
7020+ This program is free software; you can redistribute it and/or modify it
7021+ under the terms of the GNU Library General Public License as published
7022+ by the Free Software Foundation; either version 2, or (at your option)
7023 any later version.
7024
7025 This program is distributed in the hope that it will be useful,
7026 but WITHOUT ANY WARRANTY; without even the implied warranty of
7027- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7028- GNU General Public License for more details.
7029+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7030+ Library General Public License for more details.
7031
7032- You should have received a copy of the GNU General Public License
7033- along with this program; if not, write to the Free Software Foundation,
7034- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7035+ You should have received a copy of the GNU Library General Public
7036+ License along with this program; if not, write to the Free Software
7037+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7038+ USA. */
7039+
7040+/* Tell glibc's <string.h> to provide a prototype for stpcpy().
7041+ This must come before <config.h> because <config.h> may include
7042+ <features.h>, and once <features.h> has been included, it's too late. */
7043+#ifndef _GNU_SOURCE
7044+# define _GNU_SOURCE 1
7045+#endif
7046
7047 #ifdef HAVE_CONFIG_H
7048 # include <config.h>
7049 #endif
7050
7051-
7052-#if defined HAVE_STRING_H || defined _LIBC
7053-# ifndef _GNU_SOURCE
7054-# define _GNU_SOURCE 1
7055-# endif
7056-# include <string.h>
7057-#else
7058-# include <strings.h>
7059-# ifndef memcpy
7060-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
7061-# endif
7062-#endif
7063-#if !HAVE_STRCHR && !defined _LIBC
7064-# ifndef strchr
7065-# define strchr index
7066-# endif
7067-#endif
7068+#include <string.h>
7069
7070 #if defined _LIBC || defined HAVE_ARGZ_H
7071 # include <argz.h>
7072 #endif
7073 #include <ctype.h>
7074 #include <sys/types.h>
7075-
7076-#if defined STDC_HEADERS || defined _LIBC
7077-# include <stdlib.h>
7078-#endif
7079+#include <stdlib.h>
7080
7081 #include "loadinfo.h"
7082
7083@@ -65,23 +53,39 @@
7084 /* Rename the non ANSI C functions. This is required by the standard
7085 because some ANSI C functions will require linking with this object
7086 file and the name space must not be polluted. */
7087-# define stpcpy(dest, src) __stpcpy(dest, src)
7088+# ifndef stpcpy
7089+# define stpcpy(dest, src) __stpcpy(dest, src)
7090+# endif
7091 #else
7092 # ifndef HAVE_STPCPY
7093-static char *stpcpy PARAMS ((char *dest, const char *src));
7094+static char *stpcpy (char *dest, const char *src);
7095 # endif
7096 #endif
7097
7098+/* Pathname support.
7099+ ISSLASH(C) tests whether C is a directory separator character.
7100+ IS_ABSOLUTE_PATH(P) tests whether P is an absolute path. If it is not,
7101+ it may be concatenated to a directory pathname.
7102+ */
7103+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
7104+ /* Win32, OS/2, DOS */
7105+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
7106+# define HAS_DEVICE(P) \
7107+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
7108+ && (P)[1] == ':')
7109+# define IS_ABSOLUTE_PATH(P) (ISSLASH ((P)[0]) || HAS_DEVICE (P))
7110+#else
7111+ /* Unix */
7112+# define ISSLASH(C) ((C) == '/')
7113+# define IS_ABSOLUTE_PATH(P) ISSLASH ((P)[0])
7114+#endif
7115+
7116 /* Define function which are usually not available. */
7117
7118 #if !defined _LIBC && !defined HAVE___ARGZ_COUNT
7119 /* Returns the number of strings in ARGZ. */
7120-static size_t argz_count__ PARAMS ((const char *argz, size_t len));
7121-
7122 static size_t
7123-argz_count__ (argz, len)
7124- const char *argz;
7125- size_t len;
7126+argz_count__ (const char *argz, size_t len)
7127 {
7128 size_t count = 0;
7129 while (len > 0)
7130@@ -95,18 +99,17 @@
7131 }
7132 # undef __argz_count
7133 # define __argz_count(argz, len) argz_count__ (argz, len)
7134+#else
7135+# ifdef _LIBC
7136+# define __argz_count(argz, len) INTUSE(__argz_count) (argz, len)
7137+# endif
7138 #endif /* !_LIBC && !HAVE___ARGZ_COUNT */
7139
7140 #if !defined _LIBC && !defined HAVE___ARGZ_STRINGIFY
7141 /* Make '\0' separated arg vector ARGZ printable by converting all the '\0's
7142 except the last into the character SEP. */
7143-static void argz_stringify__ PARAMS ((char *argz, size_t len, int sep));
7144-
7145 static void
7146-argz_stringify__ (argz, len, sep)
7147- char *argz;
7148- size_t len;
7149- int sep;
7150+argz_stringify__ (char *argz, size_t len, int sep)
7151 {
7152 while (len > 0)
7153 {
7154@@ -119,17 +122,16 @@
7155 }
7156 # undef __argz_stringify
7157 # define __argz_stringify(argz, len, sep) argz_stringify__ (argz, len, sep)
7158+#else
7159+# ifdef _LIBC
7160+# define __argz_stringify(argz, len, sep) \
7161+ INTUSE(__argz_stringify) (argz, len, sep)
7162+# endif
7163 #endif /* !_LIBC && !HAVE___ARGZ_STRINGIFY */
7164
7165 #if !defined _LIBC && !defined HAVE___ARGZ_NEXT
7166-static char *argz_next__ PARAMS ((char *argz, size_t argz_len,
7167- const char *entry));
7168-
7169 static char *
7170-argz_next__ (argz, argz_len, entry)
7171- char *argz;
7172- size_t argz_len;
7173- const char *entry;
7174+argz_next__ (char *argz, size_t argz_len, const char *entry)
7175 {
7176 if (entry)
7177 {
7178@@ -150,11 +152,8 @@
7179
7180
7181 /* Return number of bits set in X. */
7182-static int pop PARAMS ((int x));
7183-
7184 static inline int
7185-pop (x)
7186- int x;
7187+pop (int x)
7188 {
7189 /* We assume that no more than 16 bits are used. */
7190 x = ((x & ~0x5555) >> 1) + (x & 0x5555);
7191@@ -167,31 +166,27 @@
7192
7193
7194 struct loaded_l10nfile *
7195-_nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
7196- territory, codeset, normalized_codeset, modifier, special,
7197- sponsor, revision, filename, do_allocate)
7198- struct loaded_l10nfile **l10nfile_list;
7199- const char *dirlist;
7200- size_t dirlist_len;
7201- int mask;
7202- const char *language;
7203- const char *territory;
7204- const char *codeset;
7205- const char *normalized_codeset;
7206- const char *modifier;
7207- const char *special;
7208- const char *sponsor;
7209- const char *revision;
7210- const char *filename;
7211- int do_allocate;
7212+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
7213+ const char *dirlist, size_t dirlist_len,
7214+ int mask, const char *language, const char *territory,
7215+ const char *codeset, const char *normalized_codeset,
7216+ const char *modifier, const char *special,
7217+ const char *sponsor, const char *revision,
7218+ const char *filename, int do_allocate)
7219 {
7220 char *abs_filename;
7221- struct loaded_l10nfile *last = NULL;
7222+ struct loaded_l10nfile **lastp;
7223 struct loaded_l10nfile *retval;
7224 char *cp;
7225+ size_t dirlist_count;
7226 size_t entries;
7227 int cnt;
7228
7229+ /* If LANGUAGE contains an absolute directory specification, we ignore
7230+ DIRLIST. */
7231+ if (IS_ABSOLUTE_PATH (language))
7232+ dirlist_len = 0;
7233+
7234 /* Allocate room for the full file name. */
7235 abs_filename = (char *) malloc (dirlist_len
7236 + strlen (language)
7237@@ -209,7 +204,7 @@
7238 + (((mask & CEN_SPONSOR) != 0
7239 || (mask & CEN_REVISION) != 0)
7240 ? (1 + ((mask & CEN_SPONSOR) != 0
7241- ? strlen (sponsor) + 1 : 0)
7242+ ? strlen (sponsor) : 0)
7243 + ((mask & CEN_REVISION) != 0
7244 ? strlen (revision) + 1 : 0)) : 0)
7245 + 1 + strlen (filename) + 1);
7246@@ -217,14 +212,16 @@
7247 if (abs_filename == NULL)
7248 return NULL;
7249
7250- retval = NULL;
7251- last = NULL;
7252-
7253 /* Construct file name. */
7254- memcpy (abs_filename, dirlist, dirlist_len);
7255- __argz_stringify (abs_filename, dirlist_len, ':');
7256- cp = abs_filename + (dirlist_len - 1);
7257- *cp++ = '/';
7258+ cp = abs_filename;
7259+ if (dirlist_len > 0)
7260+ {
7261+ memcpy (cp, dirlist, dirlist_len);
7262+ __argz_stringify (cp, dirlist_len, PATH_SEPARATOR);
7263+ cp += dirlist_len;
7264+ cp[-1] = '/';
7265+ }
7266+
7267 cp = stpcpy (cp, language);
7268
7269 if ((mask & TERRITORY) != 0)
7270@@ -271,7 +268,7 @@
7271
7272 /* Look in list of already loaded domains whether it is already
7273 available. */
7274- last = NULL;
7275+ lastp = l10nfile_list;
7276 for (retval = *l10nfile_list; retval != NULL; retval = retval->next)
7277 if (retval->filename != NULL)
7278 {
7279@@ -286,7 +283,7 @@
7280 break;
7281 }
7282
7283- last = retval;
7284+ lastp = &retval->next;
7285 }
7286
7287 if (retval != NULL || do_allocate == 0)
7288@@ -295,48 +292,66 @@
7289 return retval;
7290 }
7291
7292- retval = (struct loaded_l10nfile *)
7293- malloc (sizeof (*retval) + (__argz_count (dirlist, dirlist_len)
7294- * (1 << pop (mask))
7295- * sizeof (struct loaded_l10nfile *)));
7296+ dirlist_count = (dirlist_len > 0 ? __argz_count (dirlist, dirlist_len) : 1);
7297+
7298+ /* Allocate a new loaded_l10nfile. */
7299+ retval =
7300+ (struct loaded_l10nfile *)
7301+ malloc (sizeof (*retval)
7302+ + (((dirlist_count << pop (mask)) + (dirlist_count > 1 ? 1 : 0))
7303+ * sizeof (struct loaded_l10nfile *)));
7304 if (retval == NULL)
7305 return NULL;
7306
7307 retval->filename = abs_filename;
7308- retval->decided = (__argz_count (dirlist, dirlist_len) != 1
7309+
7310+ /* We set retval->data to NULL here; it is filled in later.
7311+ Setting retval->decided to 1 here means that retval does not
7312+ correspond to a real file (dirlist_count > 1) or is not worth
7313+ looking up (if an unnormalized codeset was specified). */
7314+ retval->decided = (dirlist_count > 1
7315 || ((mask & XPG_CODESET) != 0
7316 && (mask & XPG_NORM_CODESET) != 0));
7317 retval->data = NULL;
7318
7319- if (last == NULL)
7320- {
7321- retval->next = *l10nfile_list;
7322- *l10nfile_list = retval;
7323- }
7324- else
7325- {
7326- retval->next = last->next;
7327- last->next = retval;
7328- }
7329+ retval->next = *lastp;
7330+ *lastp = retval;
7331
7332 entries = 0;
7333- /* If the DIRLIST is a real list the RETVAL entry corresponds not to
7334- a real file. So we have to use the DIRLIST separation mechanism
7335- of the inner loop. */
7336- cnt = __argz_count (dirlist, dirlist_len) == 1 ? mask - 1 : mask;
7337- for (; cnt >= 0; --cnt)
7338+ /* Recurse to fill the inheritance list of RETVAL.
7339+ If the DIRLIST is a real list (i.e. DIRLIST_COUNT > 1), the RETVAL
7340+ entry does not correspond to a real file; retval->filename contains
7341+ colons. In this case we loop across all elements of DIRLIST and
7342+ across all bit patterns dominated by MASK.
7343+ If the DIRLIST is a single directory or entirely redundant (i.e.
7344+ DIRLIST_COUNT == 1), we loop across all bit patterns dominated by
7345+ MASK, excluding MASK itself.
7346+ In either case, we loop down from MASK to 0. This has the effect
7347+ that the extra bits in the locale name are dropped in this order:
7348+ first the modifier, then the territory, then the codeset, then the
7349+ normalized_codeset. */
7350+ for (cnt = dirlist_count > 1 ? mask : mask - 1; cnt >= 0; --cnt)
7351 if ((cnt & ~mask) == 0
7352 && ((cnt & CEN_SPECIFIC) == 0 || (cnt & XPG_SPECIFIC) == 0)
7353 && ((cnt & XPG_CODESET) == 0 || (cnt & XPG_NORM_CODESET) == 0))
7354 {
7355- /* Iterate over all elements of the DIRLIST. */
7356- char *dir = NULL;
7357+ if (dirlist_count > 1)
7358+ {
7359+ /* Iterate over all elements of the DIRLIST. */
7360+ char *dir = NULL;
7361
7362- while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7363- != NULL)
7364+ while ((dir = __argz_next ((char *) dirlist, dirlist_len, dir))
7365+ != NULL)
7366+ retval->successor[entries++]
7367+ = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1,
7368+ cnt, language, territory, codeset,
7369+ normalized_codeset, modifier, special,
7370+ sponsor, revision, filename, 1);
7371+ }
7372+ else
7373 retval->successor[entries++]
7374- = _nl_make_l10nflist (l10nfile_list, dir, strlen (dir) + 1, cnt,
7375- language, territory, codeset,
7376+ = _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len,
7377+ cnt, language, territory, codeset,
7378 normalized_codeset, modifier, special,
7379 sponsor, revision, filename, 1);
7380 }
7381@@ -347,11 +362,10 @@
7382
7383 /* Normalize codeset name. There is no standard for the codeset
7384 names. Normalization allows the user to use any of the common
7385- names. */
7386+ names. The return value is dynamically allocated and has to be
7387+ freed by the caller. */
7388 const char *
7389-_nl_normalize_codeset (codeset, name_len)
7390- const char *codeset;
7391- size_t name_len;
7392+_nl_normalize_codeset (const char *codeset, size_t name_len)
7393 {
7394 int len = 0;
7395 int only_digit = 1;
7396@@ -360,11 +374,11 @@
7397 size_t cnt;
7398
7399 for (cnt = 0; cnt < name_len; ++cnt)
7400- if (isalnum (codeset[cnt]))
7401+ if (isalnum ((unsigned char) codeset[cnt]))
7402 {
7403 ++len;
7404
7405- if (isalpha (codeset[cnt]))
7406+ if (isalpha ((unsigned char) codeset[cnt]))
7407 only_digit = 0;
7408 }
7409
7410@@ -378,9 +392,9 @@
7411 wp = retval;
7412
7413 for (cnt = 0; cnt < name_len; ++cnt)
7414- if (isalpha (codeset[cnt]))
7415- *wp++ = tolower (codeset[cnt]);
7416- else if (isdigit (codeset[cnt]))
7417+ if (isalpha ((unsigned char) codeset[cnt]))
7418+ *wp++ = tolower ((unsigned char) codeset[cnt]);
7419+ else if (isdigit ((unsigned char) codeset[cnt]))
7420 *wp++ = codeset[cnt];
7421
7422 *wp = '\0';
7423@@ -398,9 +412,7 @@
7424 to be defined. */
7425 #if !_LIBC && !HAVE_STPCPY
7426 static char *
7427-stpcpy (dest, src)
7428- char *dest;
7429- const char *src;
7430+stpcpy (char *dest, const char *src)
7431 {
7432 while ((*dest++ = *src++) != '\0')
7433 /* Do nothing. */ ;
7434--- lrzsz-0.12.20.safe/intl/libgettext.h 1998-04-26 09:22:36.000000000 -0400
7435+++ lrzsz-0.12.20/intl/libgettext.h 1969-12-31 19:00:00.000000000 -0500
7436@@ -1,182 +0,0 @@
7437-/* Message catalogs for internationalization.
7438- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
7439-
7440- This program is free software; you can redistribute it and/or modify
7441- it under the terms of the GNU General Public License as published by
7442- the Free Software Foundation; either version 2, or (at your option)
7443- any later version.
7444-
7445- This program is distributed in the hope that it will be useful,
7446- but WITHOUT ANY WARRANTY; without even the implied warranty of
7447- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
7448- GNU General Public License for more details.
7449-
7450- You should have received a copy of the GNU General Public License
7451- along with this program; if not, write to the Free Software Foundation,
7452- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
7453-
7454-/* Because on some systems (e.g. Solaris) we sometimes have to include
7455- the systems libintl.h as well as this file we have more complex
7456- include protection above. But the systems header might perhaps also
7457- define _LIBINTL_H and therefore we have to protect the definition here. */
7458-
7459-#if !defined (_LIBINTL_H) || !defined (_LIBGETTEXT_H)
7460-#if !defined (_LIBINTL_H)
7461-# define _LIBINTL_H 1
7462-#endif
7463-#define _LIBGETTEXT_H 1
7464-
7465-/* We define an additional symbol to signal that we use the GNU
7466- implementation of gettext. */
7467-#define __USE_GNU_GETTEXT 1
7468-
7469-#include <sys/types.h>
7470-
7471-#if HAVE_LOCALE_H
7472-# include <locale.h>
7473-#endif
7474-
7475-
7476-#ifdef __cplusplus
7477-extern "C" {
7478-#endif
7479-
7480-/* @@ end of prolog @@ */
7481-
7482-#ifndef PARAMS
7483-# if __STDC__
7484-# define PARAMS(args) args
7485-# else
7486-# define PARAMS(args) ()
7487-# endif
7488-#endif
7489-
7490-#ifndef NULL
7491-# if !defined __cplusplus || defined __GNUC__
7492-# define NULL ((void *) 0)
7493-# else
7494-# define NULL (0)
7495-# endif
7496-#endif
7497-
7498-#if !HAVE_LC_MESSAGES
7499-/* This value determines the behaviour of the gettext() and dgettext()
7500- function. But some system does not have this defined. Define it
7501- to a default value. */
7502-# define LC_MESSAGES (-1)
7503-#endif
7504-
7505-
7506-/* Declarations for gettext-using-catgets interface. Derived from
7507- Jim Meyering's libintl.h. */
7508-struct _msg_ent
7509-{
7510- const char *_msg;
7511- int _msg_number;
7512-};
7513-
7514-
7515-#if HAVE_CATGETS
7516-/* These two variables are defined in the automatically by po-to-tbl.sed
7517- generated file `cat-id-tbl.c'. */
7518-extern const struct _msg_ent _msg_tbl[];
7519-extern int _msg_tbl_length;
7520-#endif
7521-
7522-
7523-/* For automatical extraction of messages sometimes no real
7524- translation is needed. Instead the string itself is the result. */
7525-#define gettext_noop(Str) (Str)
7526-
7527-/* Look up MSGID in the current default message catalog for the current
7528- LC_MESSAGES locale. If not found, returns MSGID itself (the default
7529- text). */
7530-extern char *gettext PARAMS ((const char *__msgid));
7531-extern char *gettext__ PARAMS ((const char *__msgid));
7532-
7533-/* Look up MSGID in the DOMAINNAME message catalog for the current
7534- LC_MESSAGES locale. */
7535-extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
7536-extern char *dgettext__ PARAMS ((const char *__domainname,
7537- const char *__msgid));
7538-
7539-/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7540- locale. */
7541-extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
7542- int __category));
7543-extern char *dcgettext__ PARAMS ((const char *__domainname,
7544- const char *__msgid, int __category));
7545-
7546-
7547-/* Set the current default message catalog to DOMAINNAME.
7548- If DOMAINNAME is null, return the current default.
7549- If DOMAINNAME is "", reset to the default of "messages". */
7550-extern char *textdomain PARAMS ((const char *__domainname));
7551-extern char *textdomain__ PARAMS ((const char *__domainname));
7552-
7553-/* Specify that the DOMAINNAME message catalog will be found
7554- in DIRNAME rather than in the system locale data base. */
7555-extern char *bindtextdomain PARAMS ((const char *__domainname,
7556- const char *__dirname));
7557-extern char *bindtextdomain__ PARAMS ((const char *__domainname,
7558- const char *__dirname));
7559-
7560-#if ENABLE_NLS
7561-
7562-/* Solaris 2.3 has the gettext function but dcgettext is missing.
7563- So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
7564- has dcgettext. */
7565-# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
7566-
7567-# define gettext(Msgid) \
7568- dgettext (NULL, Msgid)
7569-
7570-# define dgettext(Domainname, Msgid) \
7571- dcgettext (Domainname, Msgid, LC_MESSAGES)
7572-
7573-# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
7574-/* This global variable is defined in loadmsgcat.c. We need a sign,
7575- whether a new catalog was loaded, which can be associated with all
7576- translations. */
7577-extern int _nl_msg_cat_cntr;
7578-
7579-# define dcgettext(Domainname, Msgid, Category) \
7580- (__extension__ \
7581- ({ \
7582- char *__result; \
7583- if (__builtin_constant_p (Msgid)) \
7584- { \
7585- static char *__translation__; \
7586- static int __catalog_counter__; \
7587- if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
7588- { \
7589- __translation__ = \
7590- dcgettext__ (Domainname, Msgid, Category); \
7591- __catalog_counter__ = _nl_msg_cat_cntr; \
7592- } \
7593- __result = __translation__; \
7594- } \
7595- else \
7596- __result = dcgettext__ (Domainname, Msgid, Category); \
7597- __result; \
7598- }))
7599-# endif
7600-# endif
7601-
7602-#else
7603-
7604-# define gettext(Msgid) (Msgid)
7605-# define dgettext(Domainname, Msgid) (Msgid)
7606-# define dcgettext(Domainname, Msgid, Category) (Msgid)
7607-# define textdomain(Domainname) while (0) /* nothing */
7608-# define bindtextdomain(Domainname, Dirname) while (0) /* nothing */
7609-
7610-#endif
7611-
7612-/* @@ begin of epilog @@ */
7613-
7614-#ifdef __cplusplus
7615-}
7616-#endif
7617-
7618-#endif
7619--- lrzsz-0.12.20.safe/intl/libgnuintl.h.in 1969-12-31 19:00:00.000000000 -0500
7620+++ lrzsz-0.12.20/intl/libgnuintl.h.in 2004-09-12 14:40:34.462731824 -0400
7621@@ -0,0 +1,383 @@
7622+/* Message catalogs for internationalization.
7623+ Copyright (C) 1995-1997, 2000-2003 Free Software Foundation, Inc.
7624+
7625+ This program is free software; you can redistribute it and/or modify it
7626+ under the terms of the GNU Library General Public License as published
7627+ by the Free Software Foundation; either version 2, or (at your option)
7628+ any later version.
7629+
7630+ This program is distributed in the hope that it will be useful,
7631+ but WITHOUT ANY WARRANTY; without even the implied warranty of
7632+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
7633+ Library General Public License for more details.
7634+
7635+ You should have received a copy of the GNU Library General Public
7636+ License along with this program; if not, write to the Free Software
7637+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
7638+ USA. */
7639+
7640+#ifndef _LIBINTL_H
7641+#define _LIBINTL_H 1
7642+
7643+#include <locale.h>
7644+
7645+/* The LC_MESSAGES locale category is the category used by the functions
7646+ gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
7647+ On systems that don't define it, use an arbitrary value instead.
7648+ On Solaris, <locale.h> defines __LOCALE_H (or _LOCALE_H in Solaris 2.5)
7649+ then includes <libintl.h> (i.e. this file!) and then only defines
7650+ LC_MESSAGES. To avoid a redefinition warning, don't define LC_MESSAGES
7651+ in this case. */
7652+#if !defined LC_MESSAGES && !(defined __LOCALE_H || (defined _LOCALE_H && defined __sun))
7653+# define LC_MESSAGES 1729
7654+#endif
7655+
7656+/* We define an additional symbol to signal that we use the GNU
7657+ implementation of gettext. */
7658+#define __USE_GNU_GETTEXT 1
7659+
7660+/* Provide information about the supported file formats. Returns the
7661+ maximum minor revision number supported for a given major revision. */
7662+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) \
7663+ ((major) == 0 ? 1 : -1)
7664+
7665+/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
7666+ precedence over _conio_gettext. */
7667+#ifdef __DJGPP__
7668+# undef gettext
7669+#endif
7670+
7671+#ifdef __cplusplus
7672+extern "C" {
7673+#endif
7674+
7675+
7676+/* We redirect the functions to those prefixed with "libintl_". This is
7677+ necessary, because some systems define gettext/textdomain/... in the C
7678+ library (namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer).
7679+ If we used the unprefixed names, there would be cases where the
7680+ definition in the C library would override the one in the libintl.so
7681+ shared library. Recall that on ELF systems, the symbols are looked
7682+ up in the following order:
7683+ 1. in the executable,
7684+ 2. in the shared libraries specified on the link command line, in order,
7685+ 3. in the dependencies of the shared libraries specified on the link
7686+ command line,
7687+ 4. in the dlopen()ed shared libraries, in the order in which they were
7688+ dlopen()ed.
7689+ The definition in the C library would override the one in libintl.so if
7690+ either
7691+ * -lc is given on the link command line and -lintl isn't, or
7692+ * -lc is given on the link command line before -lintl, or
7693+ * libintl.so is a dependency of a dlopen()ed shared library but not
7694+ linked to the executable at link time.
7695+ Since Solaris gettext() behaves differently than GNU gettext(), this
7696+ would be unacceptable.
7697+
7698+ The redirection happens by default through macros in C, so that &gettext
7699+ is independent of the compilation unit, but through inline functions in
7700+ C++, in order not to interfere with the name mangling of class fields or
7701+ class methods called 'gettext'. */
7702+
7703+/* The user can define _INTL_REDIRECT_INLINE or _INTL_REDIRECT_MACROS.
7704+ If he doesn't, we choose the method. A third possible method is
7705+ _INTL_REDIRECT_ASM, supported only by GCC. */
7706+#if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
7707+# if __GNUC__ >= 2 && !defined __APPLE_CC__ && !defined __MINGW32__ && !(__GNUC__ == 2 && defined _AIX) && (defined __STDC__ || defined __cplusplus)
7708+# define _INTL_REDIRECT_ASM
7709+# else
7710+# ifdef __cplusplus
7711+# define _INTL_REDIRECT_INLINE
7712+# else
7713+# define _INTL_REDIRECT_MACROS
7714+# endif
7715+# endif
7716+#endif
7717+/* Auxiliary macros. */
7718+#ifdef _INTL_REDIRECT_ASM
7719+# define _INTL_ASM(cname) __asm__ (_INTL_ASMNAME (__USER_LABEL_PREFIX__, #cname))
7720+# define _INTL_ASMNAME(prefix,cnamestring) _INTL_STRINGIFY (prefix) cnamestring
7721+# define _INTL_STRINGIFY(prefix) #prefix
7722+#else
7723+# define _INTL_ASM(cname)
7724+#endif
7725+
7726+/* Look up MSGID in the current default message catalog for the current
7727+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
7728+ text). */
7729+#ifdef _INTL_REDIRECT_INLINE
7730+extern char *libintl_gettext (const char *__msgid);
7731+static inline char *gettext (const char *__msgid)
7732+{
7733+ return libintl_gettext (__msgid);
7734+}
7735+#else
7736+#ifdef _INTL_REDIRECT_MACROS
7737+# define gettext libintl_gettext
7738+#endif
7739+extern char *gettext (const char *__msgid)
7740+ _INTL_ASM (libintl_gettext);
7741+#endif
7742+
7743+/* Look up MSGID in the DOMAINNAME message catalog for the current
7744+ LC_MESSAGES locale. */
7745+#ifdef _INTL_REDIRECT_INLINE
7746+extern char *libintl_dgettext (const char *__domainname, const char *__msgid);
7747+static inline char *dgettext (const char *__domainname, const char *__msgid)
7748+{
7749+ return libintl_dgettext (__domainname, __msgid);
7750+}
7751+#else
7752+#ifdef _INTL_REDIRECT_MACROS
7753+# define dgettext libintl_dgettext
7754+#endif
7755+extern char *dgettext (const char *__domainname, const char *__msgid)
7756+ _INTL_ASM (libintl_dgettext);
7757+#endif
7758+
7759+/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
7760+ locale. */
7761+#ifdef _INTL_REDIRECT_INLINE
7762+extern char *libintl_dcgettext (const char *__domainname, const char *__msgid,
7763+ int __category);
7764+static inline char *dcgettext (const char *__domainname, const char *__msgid,
7765+ int __category)
7766+{
7767+ return libintl_dcgettext (__domainname, __msgid, __category);
7768+}
7769+#else
7770+#ifdef _INTL_REDIRECT_MACROS
7771+# define dcgettext libintl_dcgettext
7772+#endif
7773+extern char *dcgettext (const char *__domainname, const char *__msgid,
7774+ int __category)
7775+ _INTL_ASM (libintl_dcgettext);
7776+#endif
7777+
7778+
7779+/* Similar to `gettext' but select the plural form corresponding to the
7780+ number N. */
7781+#ifdef _INTL_REDIRECT_INLINE
7782+extern char *libintl_ngettext (const char *__msgid1, const char *__msgid2,
7783+ unsigned long int __n);
7784+static inline char *ngettext (const char *__msgid1, const char *__msgid2,
7785+ unsigned long int __n)
7786+{
7787+ return libintl_ngettext (__msgid1, __msgid2, __n);
7788+}
7789+#else
7790+#ifdef _INTL_REDIRECT_MACROS
7791+# define ngettext libintl_ngettext
7792+#endif
7793+extern char *ngettext (const char *__msgid1, const char *__msgid2,
7794+ unsigned long int __n)
7795+ _INTL_ASM (libintl_ngettext);
7796+#endif
7797+
7798+/* Similar to `dgettext' but select the plural form corresponding to the
7799+ number N. */
7800+#ifdef _INTL_REDIRECT_INLINE
7801+extern char *libintl_dngettext (const char *__domainname, const char *__msgid1,
7802+ const char *__msgid2, unsigned long int __n);
7803+static inline char *dngettext (const char *__domainname, const char *__msgid1,
7804+ const char *__msgid2, unsigned long int __n)
7805+{
7806+ return libintl_dngettext (__domainname, __msgid1, __msgid2, __n);
7807+}
7808+#else
7809+#ifdef _INTL_REDIRECT_MACROS
7810+# define dngettext libintl_dngettext
7811+#endif
7812+extern char *dngettext (const char *__domainname,
7813+ const char *__msgid1, const char *__msgid2,
7814+ unsigned long int __n)
7815+ _INTL_ASM (libintl_dngettext);
7816+#endif
7817+
7818+/* Similar to `dcgettext' but select the plural form corresponding to the
7819+ number N. */
7820+#ifdef _INTL_REDIRECT_INLINE
7821+extern char *libintl_dcngettext (const char *__domainname,
7822+ const char *__msgid1, const char *__msgid2,
7823+ unsigned long int __n, int __category);
7824+static inline char *dcngettext (const char *__domainname,
7825+ const char *__msgid1, const char *__msgid2,
7826+ unsigned long int __n, int __category)
7827+{
7828+ return libintl_dcngettext (__domainname, __msgid1, __msgid2, __n, __category);
7829+}
7830+#else
7831+#ifdef _INTL_REDIRECT_MACROS
7832+# define dcngettext libintl_dcngettext
7833+#endif
7834+extern char *dcngettext (const char *__domainname,
7835+ const char *__msgid1, const char *__msgid2,
7836+ unsigned long int __n, int __category)
7837+ _INTL_ASM (libintl_dcngettext);
7838+#endif
7839+
7840+
7841+/* Set the current default message catalog to DOMAINNAME.
7842+ If DOMAINNAME is null, return the current default.
7843+ If DOMAINNAME is "", reset to the default of "messages". */
7844+#ifdef _INTL_REDIRECT_INLINE
7845+extern char *libintl_textdomain (const char *__domainname);
7846+static inline char *textdomain (const char *__domainname)
7847+{
7848+ return libintl_textdomain (__domainname);
7849+}
7850+#else
7851+#ifdef _INTL_REDIRECT_MACROS
7852+# define textdomain libintl_textdomain
7853+#endif
7854+extern char *textdomain (const char *__domainname)
7855+ _INTL_ASM (libintl_textdomain);
7856+#endif
7857+
7858+/* Specify that the DOMAINNAME message catalog will be found
7859+ in DIRNAME rather than in the system locale data base. */
7860+#ifdef _INTL_REDIRECT_INLINE
7861+extern char *libintl_bindtextdomain (const char *__domainname,
7862+ const char *__dirname);
7863+static inline char *bindtextdomain (const char *__domainname,
7864+ const char *__dirname)
7865+{
7866+ return libintl_bindtextdomain (__domainname, __dirname);
7867+}
7868+#else
7869+#ifdef _INTL_REDIRECT_MACROS
7870+# define bindtextdomain libintl_bindtextdomain
7871+#endif
7872+extern char *bindtextdomain (const char *__domainname, const char *__dirname)
7873+ _INTL_ASM (libintl_bindtextdomain);
7874+#endif
7875+
7876+/* Specify the character encoding in which the messages from the
7877+ DOMAINNAME message catalog will be returned. */
7878+#ifdef _INTL_REDIRECT_INLINE
7879+extern char *libintl_bind_textdomain_codeset (const char *__domainname,
7880+ const char *__codeset);
7881+static inline char *bind_textdomain_codeset (const char *__domainname,
7882+ const char *__codeset)
7883+{
7884+ return libintl_bind_textdomain_codeset (__domainname, __codeset);
7885+}
7886+#else
7887+#ifdef _INTL_REDIRECT_MACROS
7888+# define bind_textdomain_codeset libintl_bind_textdomain_codeset
7889+#endif
7890+extern char *bind_textdomain_codeset (const char *__domainname,
7891+ const char *__codeset)
7892+ _INTL_ASM (libintl_bind_textdomain_codeset);
7893+#endif
7894+
7895+
7896+/* Support for format strings with positions in *printf(), following the
7897+ POSIX/XSI specification.
7898+ Note: These replacements for the *printf() functions are visible only
7899+ in source files that #include <libintl.h> or #include "gettext.h".
7900+ Packages that use *printf() in source files that don't refer to _()
7901+ or gettext() but for which the format string could be the return value
7902+ of _() or gettext() need to add this #include. Oh well. */
7903+
7904+#if !@HAVE_POSIX_PRINTF@
7905+
7906+#include <stdio.h>
7907+#include <stddef.h>
7908+
7909+/* Get va_list. */
7910+#if __STDC__ || defined __cplusplus || defined _MSC_VER
7911+# include <stdarg.h>
7912+#else
7913+# include <varargs.h>
7914+#endif
7915+
7916+#undef fprintf
7917+#define fprintf libintl_fprintf
7918+extern int fprintf (FILE *, const char *, ...);
7919+#undef vfprintf
7920+#define vfprintf libintl_vfprintf
7921+extern int vfprintf (FILE *, const char *, va_list);
7922+
7923+#undef printf
7924+#define printf libintl_printf
7925+extern int printf (const char *, ...);
7926+#undef vprintf
7927+#define vprintf libintl_vprintf
7928+extern int vprintf (const char *, va_list);
7929+
7930+#undef sprintf
7931+#define sprintf libintl_sprintf
7932+extern int sprintf (char *, const char *, ...);
7933+#undef vsprintf
7934+#define vsprintf libintl_vsprintf
7935+extern int vsprintf (char *, const char *, va_list);
7936+
7937+#if @HAVE_SNPRINTF@
7938+
7939+#undef snprintf
7940+#define snprintf libintl_snprintf
7941+extern int snprintf (char *, size_t, const char *, ...);
7942+#undef vsnprintf
7943+#define vsnprintf libintl_vsnprintf
7944+extern int vsnprintf (char *, size_t, const char *, va_list);
7945+
7946+#endif
7947+
7948+#if @HAVE_ASPRINTF@
7949+
7950+#undef asprintf
7951+#define asprintf libintl_asprintf
7952+extern int asprintf (char **, const char *, ...);
7953+#undef vasprintf
7954+#define vasprintf libintl_vasprintf
7955+extern int vasprintf (char **, const char *, va_list);
7956+
7957+#endif
7958+
7959+#if @HAVE_WPRINTF@
7960+
7961+#undef fwprintf
7962+#define fwprintf libintl_fwprintf
7963+extern int fwprintf (FILE *, const wchar_t *, ...);
7964+#undef vfwprintf
7965+#define vfwprintf libintl_vfwprintf
7966+extern int vfwprintf (FILE *, const wchar_t *, va_list);
7967+
7968+#undef wprintf
7969+#define wprintf libintl_wprintf
7970+extern int wprintf (const wchar_t *, ...);
7971+#undef vwprintf
7972+#define vwprintf libintl_vwprintf
7973+extern int vwprintf (const wchar_t *, va_list);
7974+
7975+#undef swprintf
7976+#define swprintf libintl_swprintf
7977+extern int swprintf (wchar_t *, size_t, const wchar_t *, ...);
7978+#undef vswprintf
7979+#define vswprintf libintl_vswprintf
7980+extern int vswprintf (wchar_t *, size_t, const wchar_t *, va_list);
7981+
7982+#endif
7983+
7984+#endif
7985+
7986+
7987+/* Support for relocatable packages. */
7988+
7989+/* Sets the original and the current installation prefix of the package.
7990+ Relocation simply replaces a pathname starting with the original prefix
7991+ by the corresponding pathname with the current prefix instead. Both
7992+ prefixes should be directory names without trailing slash (i.e. use ""
7993+ instead of "/"). */
7994+#define libintl_set_relocation_prefix libintl_set_relocation_prefix
7995+extern void
7996+ libintl_set_relocation_prefix (const char *orig_prefix,
7997+ const char *curr_prefix);
7998+
7999+
8000+#ifdef __cplusplus
8001+}
8002+#endif
8003+
8004+#endif /* libintl.h */
8005--- lrzsz-0.12.20.safe/intl/linux-msg.sed 1998-04-26 09:20:52.000000000 -0400
8006+++ lrzsz-0.12.20/intl/linux-msg.sed 1969-12-31 19:00:00.000000000 -0500
8007@@ -1,100 +0,0 @@
8008-# po2msg.sed - Convert Uniforum style .po file to Linux style .msg file
8009-# Copyright (C) 1995 Free Software Foundation, Inc.
8010-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
8011-#
8012-# This program is free software; you can redistribute it and/or modify
8013-# it under the terms of the GNU General Public License as published by
8014-# the Free Software Foundation; either version 2, or (at your option)
8015-# any later version.
8016-#
8017-# This program is distributed in the hope that it will be useful,
8018-# but WITHOUT ANY WARRANTY; without even the implied warranty of
8019-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8020-# GNU General Public License for more details.
8021-#
8022-# You should have received a copy of the GNU General Public License
8023-# along with this program; if not, write to the Free Software
8024-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
8025-#
8026-#
8027-# The first directive in the .msg should be the definition of the
8028-# message set number. We use always set number 1.
8029-#
8030-1 {
8031- i\
8032-$set 1 # Automatically created by po2msg.sed
8033- h
8034- s/.*/0/
8035- x
8036-}
8037-#
8038-# Mitch's old catalog format does not allow comments.
8039-#
8040-# We copy the original message as a comment into the .msg file.
8041-#
8042-/^msgid/ {
8043- s/msgid[ ]*"//
8044-#
8045-# This does not work now with the new format.
8046-# /"$/! {
8047-# s/\\$//
8048-# s/$/ ... (more lines following)"/
8049-# }
8050- x
8051-# The following nice solution is by
8052-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
8053- td
8054-# Increment a decimal number in pattern space.
8055-# First hide trailing `9' digits.
8056- :d
8057- s/9\(_*\)$/_\1/
8058- td
8059-# Assure at least one digit is available.
8060- s/^\(_*\)$/0\1/
8061-# Increment the last digit.
8062- s/8\(_*\)$/9\1/
8063- s/7\(_*\)$/8\1/
8064- s/6\(_*\)$/7\1/
8065- s/5\(_*\)$/6\1/
8066- s/4\(_*\)$/5\1/
8067- s/3\(_*\)$/4\1/
8068- s/2\(_*\)$/3\1/
8069- s/1\(_*\)$/2\1/
8070- s/0\(_*\)$/1\1/
8071-# Convert the hidden `9' digits to `0's.
8072- s/_/0/g
8073- x
8074- G
8075- s/\(.*\)"\n\([0-9]*\)/$ #\2 Original Message:(\1)/p
8076-}
8077-#
8078-# The .msg file contains, other then the .po file, only the translations
8079-# but each given a unique ID. Starting from 1 and incrementing by 1 for
8080-# each message we assign them to the messages.
8081-# It is important that the .po file used to generate the cat-id-tbl.c file
8082-# (with po-to-tbl) is the same as the one used here. (At least the order
8083-# of declarations must not be changed.)
8084-#
8085-/^msgstr/ {
8086- s/msgstr[ ]*"\(.*\)"/# \1/
8087-# Clear substitution flag.
8088- tb
8089-# Append the next line.
8090- :b
8091- N
8092-# Look whether second part is continuation line.
8093- s/\(.*\n\)"\(.*\)"/\1\2/
8094-# Yes, then branch.
8095- ta
8096- P
8097- D
8098-# Note that D includes a jump to the start!!
8099-# We found a continuation line. But before printing insert '\'.
8100- :a
8101- s/\(.*\)\(\n.*\)/\1\\\2/
8102- P
8103-# We cannot use D here.
8104- s/.*\n\(.*\)/\1/
8105- tb
8106-}
8107-d
8108--- lrzsz-0.12.20.safe/intl/loadinfo.h 1998-04-26 09:20:52.000000000 -0400
8109+++ lrzsz-0.12.20/intl/loadinfo.h 2004-09-12 14:40:34.468730912 -0400
8110@@ -1,9 +1,54 @@
8111-#ifndef PARAMS
8112-# if __STDC__
8113-# define PARAMS(args) args
8114-# else
8115-# define PARAMS(args) ()
8116-# endif
8117+/* Copyright (C) 1996-1999, 2000-2003 Free Software Foundation, Inc.
8118+ This file is part of the GNU C Library.
8119+ Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
8120+
8121+ This program is free software; you can redistribute it and/or modify it
8122+ under the terms of the GNU Library General Public License as published
8123+ by the Free Software Foundation; either version 2, or (at your option)
8124+ any later version.
8125+
8126+ This program is distributed in the hope that it will be useful,
8127+ but WITHOUT ANY WARRANTY; without even the implied warranty of
8128+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8129+ Library General Public License for more details.
8130+
8131+ You should have received a copy of the GNU Library General Public
8132+ License along with this program; if not, write to the Free Software
8133+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8134+ USA. */
8135+
8136+#ifndef _LOADINFO_H
8137+#define _LOADINFO_H 1
8138+
8139+/* Declarations of locale dependent catalog lookup functions.
8140+ Implemented in
8141+
8142+ localealias.c Possibly replace a locale name by another.
8143+ explodename.c Split a locale name into its various fields.
8144+ l10nflist.c Generate a list of filenames of possible message catalogs.
8145+ finddomain.c Find and open the relevant message catalogs.
8146+
8147+ The main function _nl_find_domain() in finddomain.c is declared
8148+ in gettextP.h.
8149+ */
8150+
8151+#ifndef internal_function
8152+# define internal_function
8153+#endif
8154+
8155+/* Tell the compiler when a conditional or integer expression is
8156+ almost always true or almost always false. */
8157+#ifndef HAVE_BUILTIN_EXPECT
8158+# define __builtin_expect(expr, val) (expr)
8159+#endif
8160+
8161+/* Separator in PATH like lists of pathnames. */
8162+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
8163+ /* Win32, OS/2, DOS */
8164+# define PATH_SEPARATOR ';'
8165+#else
8166+ /* Unix */
8167+# define PATH_SEPARATOR ':'
8168 #endif
8169
8170 /* Encoding of locale name parts. */
8171@@ -32,27 +77,69 @@
8172 };
8173
8174
8175-extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
8176- size_t name_len));
8177+/* Normalize codeset name. There is no standard for the codeset
8178+ names. Normalization allows the user to use any of the common
8179+ names. The return value is dynamically allocated and has to be
8180+ freed by the caller. */
8181+extern const char *_nl_normalize_codeset (const char *codeset,
8182+ size_t name_len);
8183
8184+/* Lookup a locale dependent file.
8185+ *L10NFILE_LIST denotes a pool of lookup results of locale dependent
8186+ files of the same kind, sorted in decreasing order of ->filename.
8187+ DIRLIST and DIRLIST_LEN are an argz list of directories in which to
8188+ look, containing at least one directory (i.e. DIRLIST_LEN > 0).
8189+ MASK, LANGUAGE, TERRITORY, CODESET, NORMALIZED_CODESET, MODIFIER,
8190+ SPECIAL, SPONSOR, REVISION are the pieces of the locale name, as
8191+ produced by _nl_explode_name(). FILENAME is the filename suffix.
8192+ The return value is the lookup result, either found in *L10NFILE_LIST,
8193+ or - if DO_ALLOCATE is nonzero - freshly allocated, or possibly NULL.
8194+ If the return value is non-NULL, it is added to *L10NFILE_LIST, and
8195+ its ->next field denotes the chaining inside *L10NFILE_LIST, and
8196+ furthermore its ->successor[] field contains a list of other lookup
8197+ results from which this lookup result inherits. */
8198 extern struct loaded_l10nfile *
8199-_nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
8200- const char *dirlist, size_t dirlist_len, int mask,
8201- const char *language, const char *territory,
8202- const char *codeset,
8203- const char *normalized_codeset,
8204- const char *modifier, const char *special,
8205- const char *sponsor, const char *revision,
8206- const char *filename, int do_allocate));
8207+_nl_make_l10nflist (struct loaded_l10nfile **l10nfile_list,
8208+ const char *dirlist, size_t dirlist_len, int mask,
8209+ const char *language, const char *territory,
8210+ const char *codeset, const char *normalized_codeset,
8211+ const char *modifier, const char *special,
8212+ const char *sponsor, const char *revision,
8213+ const char *filename, int do_allocate);
8214
8215+/* Lookup the real locale name for a locale alias NAME, or NULL if
8216+ NAME is not a locale alias (but possibly a real locale name).
8217+ The return value is statically allocated and must not be freed. */
8218+extern const char *_nl_expand_alias (const char *name);
8219
8220-extern const char *_nl_expand_alias PARAMS ((const char *name));
8221+/* Split a locale name NAME into its pieces: language, modifier,
8222+ territory, codeset, special, sponsor, revision.
8223+ NAME gets destructively modified: NUL bytes are inserted here and
8224+ there. *LANGUAGE gets assigned NAME. Each of *MODIFIER, *TERRITORY,
8225+ *CODESET, *SPECIAL, *SPONSOR, *REVISION gets assigned either a
8226+ pointer into the old NAME string, or NULL. *NORMALIZED_CODESET
8227+ gets assigned the expanded *CODESET, if it is different from *CODESET;
8228+ this one is dynamically allocated and has to be freed by the caller.
8229+ The return value is a bitmask, where each bit corresponds to one
8230+ filled-in value:
8231+ XPG_MODIFIER, CEN_AUDIENCE for *MODIFIER,
8232+ TERRITORY for *TERRITORY,
8233+ XPG_CODESET for *CODESET,
8234+ XPG_NORM_CODESET for *NORMALIZED_CODESET,
8235+ CEN_SPECIAL for *SPECIAL,
8236+ CEN_SPONSOR for *SPONSOR,
8237+ CEN_REVISION for *REVISION.
8238+ */
8239+extern int _nl_explode_name (char *name, const char **language,
8240+ const char **modifier, const char **territory,
8241+ const char **codeset,
8242+ const char **normalized_codeset,
8243+ const char **special, const char **sponsor,
8244+ const char **revision);
8245
8246-extern int _nl_explode_name PARAMS ((char *name, const char **language,
8247- const char **modifier,
8248- const char **territory,
8249- const char **codeset,
8250- const char **normalized_codeset,
8251- const char **special,
8252- const char **sponsor,
8253- const char **revision));
8254+/* Split a locale name NAME into a leading language part and all the
8255+ rest. Return a pointer to the first character after the language,
8256+ i.e. to the first byte of the rest. */
8257+extern char *_nl_find_language (const char *name);
8258+
8259+#endif /* loadinfo.h */
8260--- lrzsz-0.12.20.safe/intl/loadmsgcat.c 1998-04-26 09:22:37.000000000 -0400
8261+++ lrzsz-0.12.20/intl/loadmsgcat.c 2004-09-12 14:40:34.473730152 -0400
8262@@ -1,42 +1,455 @@
8263-/* Load needed message catalogs
8264- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
8265+/* Load needed message catalogs.
8266+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
8267
8268- This program is free software; you can redistribute it and/or modify
8269- it under the terms of the GNU General Public License as published by
8270- the Free Software Foundation; either version 2, or (at your option)
8271+ This program is free software; you can redistribute it and/or modify it
8272+ under the terms of the GNU Library General Public License as published
8273+ by the Free Software Foundation; either version 2, or (at your option)
8274 any later version.
8275
8276 This program is distributed in the hope that it will be useful,
8277 but WITHOUT ANY WARRANTY; without even the implied warranty of
8278- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
8279- GNU General Public License for more details.
8280+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
8281+ Library General Public License for more details.
8282
8283- You should have received a copy of the GNU General Public License
8284- along with this program; if not, write to the Free Software Foundation,
8285- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
8286+ You should have received a copy of the GNU Library General Public
8287+ License along with this program; if not, write to the Free Software
8288+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
8289+ USA. */
8290+
8291+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
8292+ This must come before <config.h> because <config.h> may include
8293+ <features.h>, and once <features.h> has been included, it's too late. */
8294+#ifndef _GNU_SOURCE
8295+# define _GNU_SOURCE 1
8296+#endif
8297
8298 #ifdef HAVE_CONFIG_H
8299 # include <config.h>
8300 #endif
8301
8302+#include <ctype.h>
8303+#include <errno.h>
8304 #include <fcntl.h>
8305 #include <sys/types.h>
8306 #include <sys/stat.h>
8307
8308-#if defined STDC_HEADERS || defined _LIBC
8309-# include <stdlib.h>
8310+#ifdef __GNUC__
8311+# undef alloca
8312+# define alloca __builtin_alloca
8313+# define HAVE_ALLOCA 1
8314+#else
8315+# ifdef _MSC_VER
8316+# include <malloc.h>
8317+# define alloca _alloca
8318+# else
8319+# if defined HAVE_ALLOCA_H || defined _LIBC
8320+# include <alloca.h>
8321+# else
8322+# ifdef _AIX
8323+ #pragma alloca
8324+# else
8325+# ifndef alloca
8326+char *alloca ();
8327+# endif
8328+# endif
8329+# endif
8330+# endif
8331 #endif
8332
8333+#include <stdlib.h>
8334+#include <string.h>
8335+
8336 #if defined HAVE_UNISTD_H || defined _LIBC
8337 # include <unistd.h>
8338 #endif
8339
8340-#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
8341+#ifdef _LIBC
8342+# include <langinfo.h>
8343+# include <locale.h>
8344+#endif
8345+
8346+#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
8347+ || (defined _LIBC && defined _POSIX_MAPPED_FILES)
8348 # include <sys/mman.h>
8349+# undef HAVE_MMAP
8350+# define HAVE_MMAP 1
8351+#else
8352+# undef HAVE_MMAP
8353 #endif
8354
8355-#include "gettext.h"
8356+#if defined HAVE_STDINT_H_WITH_UINTMAX || defined _LIBC
8357+# include <stdint.h>
8358+#endif
8359+#if defined HAVE_INTTYPES_H || defined _LIBC
8360+# include <inttypes.h>
8361+#endif
8362+
8363+#include "gmo.h"
8364 #include "gettextP.h"
8365+#include "hash-string.h"
8366+#include "plural-exp.h"
8367+
8368+#ifdef _LIBC
8369+# include "../locale/localeinfo.h"
8370+#endif
8371+
8372+/* Provide fallback values for macros that ought to be defined in <inttypes.h>.
8373+ Note that our fallback values need not be literal strings, because we don't
8374+ use them with preprocessor string concatenation. */
8375+#if !defined PRId8 || PRI_MACROS_BROKEN
8376+# undef PRId8
8377+# define PRId8 "d"
8378+#endif
8379+#if !defined PRIi8 || PRI_MACROS_BROKEN
8380+# undef PRIi8
8381+# define PRIi8 "i"
8382+#endif
8383+#if !defined PRIo8 || PRI_MACROS_BROKEN
8384+# undef PRIo8
8385+# define PRIo8 "o"
8386+#endif
8387+#if !defined PRIu8 || PRI_MACROS_BROKEN
8388+# undef PRIu8
8389+# define PRIu8 "u"
8390+#endif
8391+#if !defined PRIx8 || PRI_MACROS_BROKEN
8392+# undef PRIx8
8393+# define PRIx8 "x"
8394+#endif
8395+#if !defined PRIX8 || PRI_MACROS_BROKEN
8396+# undef PRIX8
8397+# define PRIX8 "X"
8398+#endif
8399+#if !defined PRId16 || PRI_MACROS_BROKEN
8400+# undef PRId16
8401+# define PRId16 "d"
8402+#endif
8403+#if !defined PRIi16 || PRI_MACROS_BROKEN
8404+# undef PRIi16
8405+# define PRIi16 "i"
8406+#endif
8407+#if !defined PRIo16 || PRI_MACROS_BROKEN
8408+# undef PRIo16
8409+# define PRIo16 "o"
8410+#endif
8411+#if !defined PRIu16 || PRI_MACROS_BROKEN
8412+# undef PRIu16
8413+# define PRIu16 "u"
8414+#endif
8415+#if !defined PRIx16 || PRI_MACROS_BROKEN
8416+# undef PRIx16
8417+# define PRIx16 "x"
8418+#endif
8419+#if !defined PRIX16 || PRI_MACROS_BROKEN
8420+# undef PRIX16
8421+# define PRIX16 "X"
8422+#endif
8423+#if !defined PRId32 || PRI_MACROS_BROKEN
8424+# undef PRId32
8425+# define PRId32 "d"
8426+#endif
8427+#if !defined PRIi32 || PRI_MACROS_BROKEN
8428+# undef PRIi32
8429+# define PRIi32 "i"
8430+#endif
8431+#if !defined PRIo32 || PRI_MACROS_BROKEN
8432+# undef PRIo32
8433+# define PRIo32 "o"
8434+#endif
8435+#if !defined PRIu32 || PRI_MACROS_BROKEN
8436+# undef PRIu32
8437+# define PRIu32 "u"
8438+#endif
8439+#if !defined PRIx32 || PRI_MACROS_BROKEN
8440+# undef PRIx32
8441+# define PRIx32 "x"
8442+#endif
8443+#if !defined PRIX32 || PRI_MACROS_BROKEN
8444+# undef PRIX32
8445+# define PRIX32 "X"
8446+#endif
8447+#if !defined PRId64 || PRI_MACROS_BROKEN
8448+# undef PRId64
8449+# define PRId64 (sizeof (long) == 8 ? "ld" : "lld")
8450+#endif
8451+#if !defined PRIi64 || PRI_MACROS_BROKEN
8452+# undef PRIi64
8453+# define PRIi64 (sizeof (long) == 8 ? "li" : "lli")
8454+#endif
8455+#if !defined PRIo64 || PRI_MACROS_BROKEN
8456+# undef PRIo64
8457+# define PRIo64 (sizeof (long) == 8 ? "lo" : "llo")
8458+#endif
8459+#if !defined PRIu64 || PRI_MACROS_BROKEN
8460+# undef PRIu64
8461+# define PRIu64 (sizeof (long) == 8 ? "lu" : "llu")
8462+#endif
8463+#if !defined PRIx64 || PRI_MACROS_BROKEN
8464+# undef PRIx64
8465+# define PRIx64 (sizeof (long) == 8 ? "lx" : "llx")
8466+#endif
8467+#if !defined PRIX64 || PRI_MACROS_BROKEN
8468+# undef PRIX64
8469+# define PRIX64 (sizeof (long) == 8 ? "lX" : "llX")
8470+#endif
8471+#if !defined PRIdLEAST8 || PRI_MACROS_BROKEN
8472+# undef PRIdLEAST8
8473+# define PRIdLEAST8 "d"
8474+#endif
8475+#if !defined PRIiLEAST8 || PRI_MACROS_BROKEN
8476+# undef PRIiLEAST8
8477+# define PRIiLEAST8 "i"
8478+#endif
8479+#if !defined PRIoLEAST8 || PRI_MACROS_BROKEN
8480+# undef PRIoLEAST8
8481+# define PRIoLEAST8 "o"
8482+#endif
8483+#if !defined PRIuLEAST8 || PRI_MACROS_BROKEN
8484+# undef PRIuLEAST8
8485+# define PRIuLEAST8 "u"
8486+#endif
8487+#if !defined PRIxLEAST8 || PRI_MACROS_BROKEN
8488+# undef PRIxLEAST8
8489+# define PRIxLEAST8 "x"
8490+#endif
8491+#if !defined PRIXLEAST8 || PRI_MACROS_BROKEN
8492+# undef PRIXLEAST8
8493+# define PRIXLEAST8 "X"
8494+#endif
8495+#if !defined PRIdLEAST16 || PRI_MACROS_BROKEN
8496+# undef PRIdLEAST16
8497+# define PRIdLEAST16 "d"
8498+#endif
8499+#if !defined PRIiLEAST16 || PRI_MACROS_BROKEN
8500+# undef PRIiLEAST16
8501+# define PRIiLEAST16 "i"
8502+#endif
8503+#if !defined PRIoLEAST16 || PRI_MACROS_BROKEN
8504+# undef PRIoLEAST16
8505+# define PRIoLEAST16 "o"
8506+#endif
8507+#if !defined PRIuLEAST16 || PRI_MACROS_BROKEN
8508+# undef PRIuLEAST16
8509+# define PRIuLEAST16 "u"
8510+#endif
8511+#if !defined PRIxLEAST16 || PRI_MACROS_BROKEN
8512+# undef PRIxLEAST16
8513+# define PRIxLEAST16 "x"
8514+#endif
8515+#if !defined PRIXLEAST16 || PRI_MACROS_BROKEN
8516+# undef PRIXLEAST16
8517+# define PRIXLEAST16 "X"
8518+#endif
8519+#if !defined PRIdLEAST32 || PRI_MACROS_BROKEN
8520+# undef PRIdLEAST32
8521+# define PRIdLEAST32 "d"
8522+#endif
8523+#if !defined PRIiLEAST32 || PRI_MACROS_BROKEN
8524+# undef PRIiLEAST32
8525+# define PRIiLEAST32 "i"
8526+#endif
8527+#if !defined PRIoLEAST32 || PRI_MACROS_BROKEN
8528+# undef PRIoLEAST32
8529+# define PRIoLEAST32 "o"
8530+#endif
8531+#if !defined PRIuLEAST32 || PRI_MACROS_BROKEN
8532+# undef PRIuLEAST32
8533+# define PRIuLEAST32 "u"
8534+#endif
8535+#if !defined PRIxLEAST32 || PRI_MACROS_BROKEN
8536+# undef PRIxLEAST32
8537+# define PRIxLEAST32 "x"
8538+#endif
8539+#if !defined PRIXLEAST32 || PRI_MACROS_BROKEN
8540+# undef PRIXLEAST32
8541+# define PRIXLEAST32 "X"
8542+#endif
8543+#if !defined PRIdLEAST64 || PRI_MACROS_BROKEN
8544+# undef PRIdLEAST64
8545+# define PRIdLEAST64 PRId64
8546+#endif
8547+#if !defined PRIiLEAST64 || PRI_MACROS_BROKEN
8548+# undef PRIiLEAST64
8549+# define PRIiLEAST64 PRIi64
8550+#endif
8551+#if !defined PRIoLEAST64 || PRI_MACROS_BROKEN
8552+# undef PRIoLEAST64
8553+# define PRIoLEAST64 PRIo64
8554+#endif
8555+#if !defined PRIuLEAST64 || PRI_MACROS_BROKEN
8556+# undef PRIuLEAST64
8557+# define PRIuLEAST64 PRIu64
8558+#endif
8559+#if !defined PRIxLEAST64 || PRI_MACROS_BROKEN
8560+# undef PRIxLEAST64
8561+# define PRIxLEAST64 PRIx64
8562+#endif
8563+#if !defined PRIXLEAST64 || PRI_MACROS_BROKEN
8564+# undef PRIXLEAST64
8565+# define PRIXLEAST64 PRIX64
8566+#endif
8567+#if !defined PRIdFAST8 || PRI_MACROS_BROKEN
8568+# undef PRIdFAST8
8569+# define PRIdFAST8 "d"
8570+#endif
8571+#if !defined PRIiFAST8 || PRI_MACROS_BROKEN
8572+# undef PRIiFAST8
8573+# define PRIiFAST8 "i"
8574+#endif
8575+#if !defined PRIoFAST8 || PRI_MACROS_BROKEN
8576+# undef PRIoFAST8
8577+# define PRIoFAST8 "o"
8578+#endif
8579+#if !defined PRIuFAST8 || PRI_MACROS_BROKEN
8580+# undef PRIuFAST8
8581+# define PRIuFAST8 "u"
8582+#endif
8583+#if !defined PRIxFAST8 || PRI_MACROS_BROKEN
8584+# undef PRIxFAST8
8585+# define PRIxFAST8 "x"
8586+#endif
8587+#if !defined PRIXFAST8 || PRI_MACROS_BROKEN
8588+# undef PRIXFAST8
8589+# define PRIXFAST8 "X"
8590+#endif
8591+#if !defined PRIdFAST16 || PRI_MACROS_BROKEN
8592+# undef PRIdFAST16
8593+# define PRIdFAST16 "d"
8594+#endif
8595+#if !defined PRIiFAST16 || PRI_MACROS_BROKEN
8596+# undef PRIiFAST16
8597+# define PRIiFAST16 "i"
8598+#endif
8599+#if !defined PRIoFAST16 || PRI_MACROS_BROKEN
8600+# undef PRIoFAST16
8601+# define PRIoFAST16 "o"
8602+#endif
8603+#if !defined PRIuFAST16 || PRI_MACROS_BROKEN
8604+# undef PRIuFAST16
8605+# define PRIuFAST16 "u"
8606+#endif
8607+#if !defined PRIxFAST16 || PRI_MACROS_BROKEN
8608+# undef PRIxFAST16
8609+# define PRIxFAST16 "x"
8610+#endif
8611+#if !defined PRIXFAST16 || PRI_MACROS_BROKEN
8612+# undef PRIXFAST16
8613+# define PRIXFAST16 "X"
8614+#endif
8615+#if !defined PRIdFAST32 || PRI_MACROS_BROKEN
8616+# undef PRIdFAST32
8617+# define PRIdFAST32 "d"
8618+#endif
8619+#if !defined PRIiFAST32 || PRI_MACROS_BROKEN
8620+# undef PRIiFAST32
8621+# define PRIiFAST32 "i"
8622+#endif
8623+#if !defined PRIoFAST32 || PRI_MACROS_BROKEN
8624+# undef PRIoFAST32
8625+# define PRIoFAST32 "o"
8626+#endif
8627+#if !defined PRIuFAST32 || PRI_MACROS_BROKEN
8628+# undef PRIuFAST32
8629+# define PRIuFAST32 "u"
8630+#endif
8631+#if !defined PRIxFAST32 || PRI_MACROS_BROKEN
8632+# undef PRIxFAST32
8633+# define PRIxFAST32 "x"
8634+#endif
8635+#if !defined PRIXFAST32 || PRI_MACROS_BROKEN
8636+# undef PRIXFAST32
8637+# define PRIXFAST32 "X"
8638+#endif
8639+#if !defined PRIdFAST64 || PRI_MACROS_BROKEN
8640+# undef PRIdFAST64
8641+# define PRIdFAST64 PRId64
8642+#endif
8643+#if !defined PRIiFAST64 || PRI_MACROS_BROKEN
8644+# undef PRIiFAST64
8645+# define PRIiFAST64 PRIi64
8646+#endif
8647+#if !defined PRIoFAST64 || PRI_MACROS_BROKEN
8648+# undef PRIoFAST64
8649+# define PRIoFAST64 PRIo64
8650+#endif
8651+#if !defined PRIuFAST64 || PRI_MACROS_BROKEN
8652+# undef PRIuFAST64
8653+# define PRIuFAST64 PRIu64
8654+#endif
8655+#if !defined PRIxFAST64 || PRI_MACROS_BROKEN
8656+# undef PRIxFAST64
8657+# define PRIxFAST64 PRIx64
8658+#endif
8659+#if !defined PRIXFAST64 || PRI_MACROS_BROKEN
8660+# undef PRIXFAST64
8661+# define PRIXFAST64 PRIX64
8662+#endif
8663+#if !defined PRIdMAX || PRI_MACROS_BROKEN
8664+# undef PRIdMAX
8665+# define PRIdMAX (sizeof (uintmax_t) == sizeof (long) ? "ld" : "lld")
8666+#endif
8667+#if !defined PRIiMAX || PRI_MACROS_BROKEN
8668+# undef PRIiMAX
8669+# define PRIiMAX (sizeof (uintmax_t) == sizeof (long) ? "li" : "lli")
8670+#endif
8671+#if !defined PRIoMAX || PRI_MACROS_BROKEN
8672+# undef PRIoMAX
8673+# define PRIoMAX (sizeof (uintmax_t) == sizeof (long) ? "lo" : "llo")
8674+#endif
8675+#if !defined PRIuMAX || PRI_MACROS_BROKEN
8676+# undef PRIuMAX
8677+# define PRIuMAX (sizeof (uintmax_t) == sizeof (long) ? "lu" : "llu")
8678+#endif
8679+#if !defined PRIxMAX || PRI_MACROS_BROKEN
8680+# undef PRIxMAX
8681+# define PRIxMAX (sizeof (uintmax_t) == sizeof (long) ? "lx" : "llx")
8682+#endif
8683+#if !defined PRIXMAX || PRI_MACROS_BROKEN
8684+# undef PRIXMAX
8685+# define PRIXMAX (sizeof (uintmax_t) == sizeof (long) ? "lX" : "llX")
8686+#endif
8687+#if !defined PRIdPTR || PRI_MACROS_BROKEN
8688+# undef PRIdPTR
8689+# define PRIdPTR \
8690+ (sizeof (void *) == sizeof (long) ? "ld" : \
8691+ sizeof (void *) == sizeof (int) ? "d" : \
8692+ "lld")
8693+#endif
8694+#if !defined PRIiPTR || PRI_MACROS_BROKEN
8695+# undef PRIiPTR
8696+# define PRIiPTR \
8697+ (sizeof (void *) == sizeof (long) ? "li" : \
8698+ sizeof (void *) == sizeof (int) ? "i" : \
8699+ "lli")
8700+#endif
8701+#if !defined PRIoPTR || PRI_MACROS_BROKEN
8702+# undef PRIoPTR
8703+# define PRIoPTR \
8704+ (sizeof (void *) == sizeof (long) ? "lo" : \
8705+ sizeof (void *) == sizeof (int) ? "o" : \
8706+ "llo")
8707+#endif
8708+#if !defined PRIuPTR || PRI_MACROS_BROKEN
8709+# undef PRIuPTR
8710+# define PRIuPTR \
8711+ (sizeof (void *) == sizeof (long) ? "lu" : \
8712+ sizeof (void *) == sizeof (int) ? "u" : \
8713+ "llu")
8714+#endif
8715+#if !defined PRIxPTR || PRI_MACROS_BROKEN
8716+# undef PRIxPTR
8717+# define PRIxPTR \
8718+ (sizeof (void *) == sizeof (long) ? "lx" : \
8719+ sizeof (void *) == sizeof (int) ? "x" : \
8720+ "llx")
8721+#endif
8722+#if !defined PRIXPTR || PRI_MACROS_BROKEN
8723+# undef PRIXPTR
8724+# define PRIXPTR \
8725+ (sizeof (void *) == sizeof (long) ? "lX" : \
8726+ sizeof (void *) == sizeof (int) ? "X" : \
8727+ "llX")
8728+#endif
8729
8730 /* @@ end of prolog @@ */
8731
8732@@ -44,7 +457,6 @@
8733 /* Rename the non ISO C functions. This is required by the standard
8734 because some ISO C functions will require linking with this object
8735 file and the name space must not be polluted. */
8736-# define fstat __fstat
8737 # define open __open
8738 # define close __close
8739 # define read __read
8740@@ -52,30 +464,471 @@
8741 # define munmap __munmap
8742 #endif
8743
8744+/* For those losing systems which don't have `alloca' we have to add
8745+ some additional code emulating it. */
8746+#ifdef HAVE_ALLOCA
8747+# define freea(p) /* nothing */
8748+#else
8749+# define alloca(n) malloc (n)
8750+# define freea(p) free (p)
8751+#endif
8752+
8753+/* For systems that distinguish between text and binary I/O.
8754+ O_BINARY is usually declared in <fcntl.h>. */
8755+#if !defined O_BINARY && defined _O_BINARY
8756+ /* For MSC-compatible compilers. */
8757+# define O_BINARY _O_BINARY
8758+# define O_TEXT _O_TEXT
8759+#endif
8760+#ifdef __BEOS__
8761+ /* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
8762+# undef O_BINARY
8763+# undef O_TEXT
8764+#endif
8765+/* On reasonable systems, binary I/O is the default. */
8766+#ifndef O_BINARY
8767+# define O_BINARY 0
8768+#endif
8769+
8770+
8771 /* We need a sign, whether a new catalog was loaded, which can be associated
8772 with all translations. This is important if the translations are
8773 cached by one of GCC's features. */
8774-int _nl_msg_cat_cntr = 0;
8775+int _nl_msg_cat_cntr;
8776
8777
8778+/* Expand a system dependent string segment. Return NULL if unsupported. */
8779+static const char *
8780+get_sysdep_segment_value (const char *name)
8781+{
8782+ /* Test for an ISO C 99 section 7.8.1 format string directive.
8783+ Syntax:
8784+ P R I { d | i | o | u | x | X }
8785+ { { | LEAST | FAST } { 8 | 16 | 32 | 64 } | MAX | PTR } */
8786+ /* We don't use a table of 14 times 6 'const char *' strings here, because
8787+ data relocations cost startup time. */
8788+ if (name[0] == 'P' && name[1] == 'R' && name[2] == 'I')
8789+ {
8790+ if (name[3] == 'd' || name[3] == 'i' || name[3] == 'o' || name[3] == 'u'
8791+ || name[3] == 'x' || name[3] == 'X')
8792+ {
8793+ if (name[4] == '8' && name[5] == '\0')
8794+ {
8795+ if (name[3] == 'd')
8796+ return PRId8;
8797+ if (name[3] == 'i')
8798+ return PRIi8;
8799+ if (name[3] == 'o')
8800+ return PRIo8;
8801+ if (name[3] == 'u')
8802+ return PRIu8;
8803+ if (name[3] == 'x')
8804+ return PRIx8;
8805+ if (name[3] == 'X')
8806+ return PRIX8;
8807+ abort ();
8808+ }
8809+ if (name[4] == '1' && name[5] == '6' && name[6] == '\0')
8810+ {
8811+ if (name[3] == 'd')
8812+ return PRId16;
8813+ if (name[3] == 'i')
8814+ return PRIi16;
8815+ if (name[3] == 'o')
8816+ return PRIo16;
8817+ if (name[3] == 'u')
8818+ return PRIu16;
8819+ if (name[3] == 'x')
8820+ return PRIx16;
8821+ if (name[3] == 'X')
8822+ return PRIX16;
8823+ abort ();
8824+ }
8825+ if (name[4] == '3' && name[5] == '2' && name[6] == '\0')
8826+ {
8827+ if (name[3] == 'd')
8828+ return PRId32;
8829+ if (name[3] == 'i')
8830+ return PRIi32;
8831+ if (name[3] == 'o')
8832+ return PRIo32;
8833+ if (name[3] == 'u')
8834+ return PRIu32;
8835+ if (name[3] == 'x')
8836+ return PRIx32;
8837+ if (name[3] == 'X')
8838+ return PRIX32;
8839+ abort ();
8840+ }
8841+ if (name[4] == '6' && name[5] == '4' && name[6] == '\0')
8842+ {
8843+ if (name[3] == 'd')
8844+ return PRId64;
8845+ if (name[3] == 'i')
8846+ return PRIi64;
8847+ if (name[3] == 'o')
8848+ return PRIo64;
8849+ if (name[3] == 'u')
8850+ return PRIu64;
8851+ if (name[3] == 'x')
8852+ return PRIx64;
8853+ if (name[3] == 'X')
8854+ return PRIX64;
8855+ abort ();
8856+ }
8857+ if (name[4] == 'L' && name[5] == 'E' && name[6] == 'A'
8858+ && name[7] == 'S' && name[8] == 'T')
8859+ {
8860+ if (name[9] == '8' && name[10] == '\0')
8861+ {
8862+ if (name[3] == 'd')
8863+ return PRIdLEAST8;
8864+ if (name[3] == 'i')
8865+ return PRIiLEAST8;
8866+ if (name[3] == 'o')
8867+ return PRIoLEAST8;
8868+ if (name[3] == 'u')
8869+ return PRIuLEAST8;
8870+ if (name[3] == 'x')
8871+ return PRIxLEAST8;
8872+ if (name[3] == 'X')
8873+ return PRIXLEAST8;
8874+ abort ();
8875+ }
8876+ if (name[9] == '1' && name[10] == '6' && name[11] == '\0')
8877+ {
8878+ if (name[3] == 'd')
8879+ return PRIdLEAST16;
8880+ if (name[3] == 'i')
8881+ return PRIiLEAST16;
8882+ if (name[3] == 'o')
8883+ return PRIoLEAST16;
8884+ if (name[3] == 'u')
8885+ return PRIuLEAST16;
8886+ if (name[3] == 'x')
8887+ return PRIxLEAST16;
8888+ if (name[3] == 'X')
8889+ return PRIXLEAST16;
8890+ abort ();
8891+ }
8892+ if (name[9] == '3' && name[10] == '2' && name[11] == '\0')
8893+ {
8894+ if (name[3] == 'd')
8895+ return PRIdLEAST32;
8896+ if (name[3] == 'i')
8897+ return PRIiLEAST32;
8898+ if (name[3] == 'o')
8899+ return PRIoLEAST32;
8900+ if (name[3] == 'u')
8901+ return PRIuLEAST32;
8902+ if (name[3] == 'x')
8903+ return PRIxLEAST32;
8904+ if (name[3] == 'X')
8905+ return PRIXLEAST32;
8906+ abort ();
8907+ }
8908+ if (name[9] == '6' && name[10] == '4' && name[11] == '\0')
8909+ {
8910+ if (name[3] == 'd')
8911+ return PRIdLEAST64;
8912+ if (name[3] == 'i')
8913+ return PRIiLEAST64;
8914+ if (name[3] == 'o')
8915+ return PRIoLEAST64;
8916+ if (name[3] == 'u')
8917+ return PRIuLEAST64;
8918+ if (name[3] == 'x')
8919+ return PRIxLEAST64;
8920+ if (name[3] == 'X')
8921+ return PRIXLEAST64;
8922+ abort ();
8923+ }
8924+ }
8925+ if (name[4] == 'F' && name[5] == 'A' && name[6] == 'S'
8926+ && name[7] == 'T')
8927+ {
8928+ if (name[8] == '8' && name[9] == '\0')
8929+ {
8930+ if (name[3] == 'd')
8931+ return PRIdFAST8;
8932+ if (name[3] == 'i')
8933+ return PRIiFAST8;
8934+ if (name[3] == 'o')
8935+ return PRIoFAST8;
8936+ if (name[3] == 'u')
8937+ return PRIuFAST8;
8938+ if (name[3] == 'x')
8939+ return PRIxFAST8;
8940+ if (name[3] == 'X')
8941+ return PRIXFAST8;
8942+ abort ();
8943+ }
8944+ if (name[8] == '1' && name[9] == '6' && name[10] == '\0')
8945+ {
8946+ if (name[3] == 'd')
8947+ return PRIdFAST16;
8948+ if (name[3] == 'i')
8949+ return PRIiFAST16;
8950+ if (name[3] == 'o')
8951+ return PRIoFAST16;
8952+ if (name[3] == 'u')
8953+ return PRIuFAST16;
8954+ if (name[3] == 'x')
8955+ return PRIxFAST16;
8956+ if (name[3] == 'X')
8957+ return PRIXFAST16;
8958+ abort ();
8959+ }
8960+ if (name[8] == '3' && name[9] == '2' && name[10] == '\0')
8961+ {
8962+ if (name[3] == 'd')
8963+ return PRIdFAST32;
8964+ if (name[3] == 'i')
8965+ return PRIiFAST32;
8966+ if (name[3] == 'o')
8967+ return PRIoFAST32;
8968+ if (name[3] == 'u')
8969+ return PRIuFAST32;
8970+ if (name[3] == 'x')
8971+ return PRIxFAST32;
8972+ if (name[3] == 'X')
8973+ return PRIXFAST32;
8974+ abort ();
8975+ }
8976+ if (name[8] == '6' && name[9] == '4' && name[10] == '\0')
8977+ {
8978+ if (name[3] == 'd')
8979+ return PRIdFAST64;
8980+ if (name[3] == 'i')
8981+ return PRIiFAST64;
8982+ if (name[3] == 'o')
8983+ return PRIoFAST64;
8984+ if (name[3] == 'u')
8985+ return PRIuFAST64;
8986+ if (name[3] == 'x')
8987+ return PRIxFAST64;
8988+ if (name[3] == 'X')
8989+ return PRIXFAST64;
8990+ abort ();
8991+ }
8992+ }
8993+ if (name[4] == 'M' && name[5] == 'A' && name[6] == 'X'
8994+ && name[7] == '\0')
8995+ {
8996+ if (name[3] == 'd')
8997+ return PRIdMAX;
8998+ if (name[3] == 'i')
8999+ return PRIiMAX;
9000+ if (name[3] == 'o')
9001+ return PRIoMAX;
9002+ if (name[3] == 'u')
9003+ return PRIuMAX;
9004+ if (name[3] == 'x')
9005+ return PRIxMAX;
9006+ if (name[3] == 'X')
9007+ return PRIXMAX;
9008+ abort ();
9009+ }
9010+ if (name[4] == 'P' && name[5] == 'T' && name[6] == 'R'
9011+ && name[7] == '\0')
9012+ {
9013+ if (name[3] == 'd')
9014+ return PRIdPTR;
9015+ if (name[3] == 'i')
9016+ return PRIiPTR;
9017+ if (name[3] == 'o')
9018+ return PRIoPTR;
9019+ if (name[3] == 'u')
9020+ return PRIuPTR;
9021+ if (name[3] == 'x')
9022+ return PRIxPTR;
9023+ if (name[3] == 'X')
9024+ return PRIXPTR;
9025+ abort ();
9026+ }
9027+ }
9028+ }
9029+ /* Test for a glibc specific printf() format directive flag. */
9030+ if (name[0] == 'I' && name[1] == '\0')
9031+ {
9032+#if defined _LIBC || __GLIBC__ > 2 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2)
9033+ /* The 'I' flag, in numeric format directives, replaces ASCII digits
9034+ with the 'outdigits' defined in the LC_CTYPE locale facet. This is
9035+ used for Farsi (Persian) and maybe Arabic. */
9036+ return "I";
9037+#else
9038+ return "";
9039+#endif
9040+ }
9041+ /* Other system dependent strings are not valid. */
9042+ return NULL;
9043+}
9044+
9045+/* Initialize the codeset dependent parts of an opened message catalog.
9046+ Return the header entry. */
9047+const char *
9048+internal_function
9049+_nl_init_domain_conv (struct loaded_l10nfile *domain_file,
9050+ struct loaded_domain *domain,
9051+ struct binding *domainbinding)
9052+{
9053+ /* Find out about the character set the file is encoded with.
9054+ This can be found (in textual form) in the entry "". If this
9055+ entry does not exist or if this does not contain the `charset='
9056+ information, we will assume the charset matches the one the
9057+ current locale and we don't have to perform any conversion. */
9058+ char *nullentry;
9059+ size_t nullentrylen;
9060+
9061+ /* Preinitialize fields, to avoid recursion during _nl_find_msg. */
9062+ domain->codeset_cntr =
9063+ (domainbinding != NULL ? domainbinding->codeset_cntr : 0);
9064+#ifdef _LIBC
9065+ domain->conv = (__gconv_t) -1;
9066+#else
9067+# if HAVE_ICONV
9068+ domain->conv = (iconv_t) -1;
9069+# endif
9070+#endif
9071+ domain->conv_tab = NULL;
9072+
9073+ /* Get the header entry. */
9074+ nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
9075+
9076+ if (nullentry != NULL)
9077+ {
9078+#if defined _LIBC || HAVE_ICONV
9079+ const char *charsetstr;
9080+
9081+ charsetstr = strstr (nullentry, "charset=");
9082+ if (charsetstr != NULL)
9083+ {
9084+ size_t len;
9085+ char *charset;
9086+ const char *outcharset;
9087+
9088+ charsetstr += strlen ("charset=");
9089+ len = strcspn (charsetstr, " \t\n");
9090+
9091+ charset = (char *) alloca (len + 1);
9092+# if defined _LIBC || HAVE_MEMPCPY
9093+ *((char *) mempcpy (charset, charsetstr, len)) = '\0';
9094+# else
9095+ memcpy (charset, charsetstr, len);
9096+ charset[len] = '\0';
9097+# endif
9098+
9099+ /* The output charset should normally be determined by the
9100+ locale. But sometimes the locale is not used or not correctly
9101+ set up, so we provide a possibility for the user to override
9102+ this. Moreover, the value specified through
9103+ bind_textdomain_codeset overrides both. */
9104+ if (domainbinding != NULL && domainbinding->codeset != NULL)
9105+ outcharset = domainbinding->codeset;
9106+ else
9107+ {
9108+ outcharset = getenv ("OUTPUT_CHARSET");
9109+ if (outcharset == NULL || outcharset[0] == '\0')
9110+ {
9111+# ifdef _LIBC
9112+ outcharset = _NL_CURRENT (LC_CTYPE, CODESET);
9113+# else
9114+# if HAVE_ICONV
9115+ extern const char *locale_charset (void);
9116+ outcharset = locale_charset ();
9117+# endif
9118+# endif
9119+ }
9120+ }
9121+
9122+# ifdef _LIBC
9123+ /* We always want to use transliteration. */
9124+ outcharset = norm_add_slashes (outcharset, "TRANSLIT");
9125+ charset = norm_add_slashes (charset, NULL);
9126+ if (__gconv_open (outcharset, charset, &domain->conv,
9127+ GCONV_AVOID_NOCONV)
9128+ != __GCONV_OK)
9129+ domain->conv = (__gconv_t) -1;
9130+# else
9131+# if HAVE_ICONV
9132+ /* When using GNU libc >= 2.2 or GNU libiconv >= 1.5,
9133+ we want to use transliteration. */
9134+# if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 2) || __GLIBC__ > 2 \
9135+ || _LIBICONV_VERSION >= 0x0105
9136+ if (strchr (outcharset, '/') == NULL)
9137+ {
9138+ char *tmp;
9139+
9140+ len = strlen (outcharset);
9141+ tmp = (char *) alloca (len + 10 + 1);
9142+ memcpy (tmp, outcharset, len);
9143+ memcpy (tmp + len, "//TRANSLIT", 10 + 1);
9144+ outcharset = tmp;
9145+
9146+ domain->conv = iconv_open (outcharset, charset);
9147+
9148+ freea (outcharset);
9149+ }
9150+ else
9151+# endif
9152+ domain->conv = iconv_open (outcharset, charset);
9153+# endif
9154+# endif
9155+
9156+ freea (charset);
9157+ }
9158+#endif /* _LIBC || HAVE_ICONV */
9159+ }
9160+
9161+ return nullentry;
9162+}
9163+
9164+/* Frees the codeset dependent parts of an opened message catalog. */
9165+void
9166+internal_function
9167+_nl_free_domain_conv (struct loaded_domain *domain)
9168+{
9169+ if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
9170+ free (domain->conv_tab);
9171+
9172+#ifdef _LIBC
9173+ if (domain->conv != (__gconv_t) -1)
9174+ __gconv_close (domain->conv);
9175+#else
9176+# if HAVE_ICONV
9177+ if (domain->conv != (iconv_t) -1)
9178+ iconv_close (domain->conv);
9179+# endif
9180+#endif
9181+}
9182+
9183 /* Load the message catalogs specified by FILENAME. If it is no valid
9184 message catalog do nothing. */
9185 void
9186-_nl_load_domain (domain_file)
9187- struct loaded_l10nfile *domain_file;
9188+internal_function
9189+_nl_load_domain (struct loaded_l10nfile *domain_file,
9190+ struct binding *domainbinding)
9191 {
9192 int fd;
9193+ size_t size;
9194+#ifdef _LIBC
9195+ struct stat64 st;
9196+#else
9197 struct stat st;
9198+#endif
9199 struct mo_file_header *data = (struct mo_file_header *) -1;
9200-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9201- || defined _LIBC
9202 int use_mmap = 0;
9203-#endif
9204 struct loaded_domain *domain;
9205+ int revision;
9206+ const char *nullentry;
9207
9208 domain_file->decided = 1;
9209 domain_file->data = NULL;
9210
9211+ /* Note that it would be useless to store domainbinding in domain_file
9212+ because domainbinding might be == NULL now but != NULL later (after
9213+ a call to bind_textdomain_codeset). */
9214+
9215 /* If the record does not represent a valid locale the FILENAME
9216 might be NULL. This can happen when according to the given
9217 specification the locale file name is different for XPG and CEN
9218@@ -84,27 +937,32 @@
9219 return;
9220
9221 /* Try to open the addressed file. */
9222- fd = open (domain_file->filename, O_RDONLY);
9223+ fd = open (domain_file->filename, O_RDONLY | O_BINARY);
9224 if (fd == -1)
9225 return;
9226
9227 /* We must know about the size of the file. */
9228- if (fstat (fd, &st) != 0
9229- && st.st_size < (off_t) sizeof (struct mo_file_header))
9230+ if (
9231+#ifdef _LIBC
9232+ __builtin_expect (fstat64 (fd, &st) != 0, 0)
9233+#else
9234+ __builtin_expect (fstat (fd, &st) != 0, 0)
9235+#endif
9236+ || __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
9237+ || __builtin_expect (size < sizeof (struct mo_file_header), 0))
9238 {
9239 /* Something went wrong. */
9240 close (fd);
9241 return;
9242 }
9243
9244-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9245- || defined _LIBC
9246+#ifdef HAVE_MMAP
9247 /* Now we are ready to load the file. If mmap() is available we try
9248 this first. If not available or it failed we try to load it. */
9249- data = (struct mo_file_header *) mmap (NULL, st.st_size, PROT_READ,
9250+ data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
9251 MAP_PRIVATE, fd, 0);
9252
9253- if (data != (struct mo_file_header *) -1)
9254+ if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
9255 {
9256 /* mmap() call was successful. */
9257 close (fd);
9258@@ -116,24 +974,27 @@
9259 it manually. */
9260 if (data == (struct mo_file_header *) -1)
9261 {
9262- off_t to_read;
9263+ size_t to_read;
9264 char *read_ptr;
9265
9266- data = (struct mo_file_header *) malloc (st.st_size);
9267+ data = (struct mo_file_header *) malloc (size);
9268 if (data == NULL)
9269 return;
9270
9271- to_read = st.st_size;
9272+ to_read = size;
9273 read_ptr = (char *) data;
9274 do
9275 {
9276 long int nb = (long int) read (fd, read_ptr, to_read);
9277- if (nb == -1)
9278+ if (nb <= 0)
9279 {
9280+#ifdef EINTR
9281+ if (nb == -1 && errno == EINTR)
9282+ continue;
9283+#endif
9284 close (fd);
9285 return;
9286 }
9287-
9288 read_ptr += nb;
9289 to_read -= nb;
9290 }
9291@@ -144,47 +1005,378 @@
9292
9293 /* Using the magic number we can test whether it really is a message
9294 catalog file. */
9295- if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
9296+ if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
9297+ 0))
9298 {
9299 /* The magic number is wrong: not a message catalog file. */
9300-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9301- || defined _LIBC
9302+#ifdef HAVE_MMAP
9303 if (use_mmap)
9304- munmap ((caddr_t) data, st.st_size);
9305+ munmap ((caddr_t) data, size);
9306 else
9307 #endif
9308 free (data);
9309 return;
9310 }
9311
9312- domain_file->data
9313- = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9314- if (domain_file->data == NULL)
9315+ domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
9316+ if (domain == NULL)
9317 return;
9318+ domain_file->data = domain;
9319
9320- domain = (struct loaded_domain *) domain_file->data;
9321 domain->data = (char *) data;
9322+ domain->use_mmap = use_mmap;
9323+ domain->mmap_size = size;
9324 domain->must_swap = data->magic != _MAGIC;
9325+ domain->malloced = NULL;
9326
9327 /* Fill in the information about the available tables. */
9328- switch (W (domain->must_swap, data->revision))
9329+ revision = W (domain->must_swap, data->revision);
9330+ /* We support only the major revisions 0 and 1. */
9331+ switch (revision >> 16)
9332 {
9333 case 0:
9334+ case 1:
9335 domain->nstrings = W (domain->must_swap, data->nstrings);
9336- domain->orig_tab = (struct string_desc *)
9337+ domain->orig_tab = (const struct string_desc *)
9338 ((char *) data + W (domain->must_swap, data->orig_tab_offset));
9339- domain->trans_tab = (struct string_desc *)
9340+ domain->trans_tab = (const struct string_desc *)
9341 ((char *) data + W (domain->must_swap, data->trans_tab_offset));
9342 domain->hash_size = W (domain->must_swap, data->hash_tab_size);
9343- domain->hash_tab = (nls_uint32 *)
9344- ((char *) data + W (domain->must_swap, data->hash_tab_offset));
9345+ domain->hash_tab =
9346+ (domain->hash_size > 2
9347+ ? (const nls_uint32 *)
9348+ ((char *) data + W (domain->must_swap, data->hash_tab_offset))
9349+ : NULL);
9350+ domain->must_swap_hash_tab = domain->must_swap;
9351+
9352+ /* Now dispatch on the minor revision. */
9353+ switch (revision & 0xffff)
9354+ {
9355+ case 0:
9356+ domain->n_sysdep_strings = 0;
9357+ domain->orig_sysdep_tab = NULL;
9358+ domain->trans_sysdep_tab = NULL;
9359+ break;
9360+ case 1:
9361+ default:
9362+ {
9363+ nls_uint32 n_sysdep_strings;
9364+
9365+ if (domain->hash_tab == NULL)
9366+ /* This is invalid. These minor revisions need a hash table. */
9367+ goto invalid;
9368+
9369+ n_sysdep_strings =
9370+ W (domain->must_swap, data->n_sysdep_strings);
9371+ if (n_sysdep_strings > 0)
9372+ {
9373+ nls_uint32 n_sysdep_segments;
9374+ const struct sysdep_segment *sysdep_segments;
9375+ const char **sysdep_segment_values;
9376+ const nls_uint32 *orig_sysdep_tab;
9377+ const nls_uint32 *trans_sysdep_tab;
9378+ nls_uint32 n_inmem_sysdep_strings;
9379+ size_t memneed;
9380+ char *mem;
9381+ struct sysdep_string_desc *inmem_orig_sysdep_tab;
9382+ struct sysdep_string_desc *inmem_trans_sysdep_tab;
9383+ nls_uint32 *inmem_hash_tab;
9384+ unsigned int i, j;
9385+
9386+ /* Get the values of the system dependent segments. */
9387+ n_sysdep_segments =
9388+ W (domain->must_swap, data->n_sysdep_segments);
9389+ sysdep_segments = (const struct sysdep_segment *)
9390+ ((char *) data
9391+ + W (domain->must_swap, data->sysdep_segments_offset));
9392+ sysdep_segment_values =
9393+ alloca (n_sysdep_segments * sizeof (const char *));
9394+ for (i = 0; i < n_sysdep_segments; i++)
9395+ {
9396+ const char *name =
9397+ (char *) data
9398+ + W (domain->must_swap, sysdep_segments[i].offset);
9399+ nls_uint32 namelen =
9400+ W (domain->must_swap, sysdep_segments[i].length);
9401+
9402+ if (!(namelen > 0 && name[namelen - 1] == '\0'))
9403+ {
9404+ freea (sysdep_segment_values);
9405+ goto invalid;
9406+ }
9407+
9408+ sysdep_segment_values[i] = get_sysdep_segment_value (name);
9409+ }
9410+
9411+ orig_sysdep_tab = (const nls_uint32 *)
9412+ ((char *) data
9413+ + W (domain->must_swap, data->orig_sysdep_tab_offset));
9414+ trans_sysdep_tab = (const nls_uint32 *)
9415+ ((char *) data
9416+ + W (domain->must_swap, data->trans_sysdep_tab_offset));
9417+
9418+ /* Compute the amount of additional memory needed for the
9419+ system dependent strings and the augmented hash table.
9420+ At the same time, also drop string pairs which refer to
9421+ an undefined system dependent segment. */
9422+ n_inmem_sysdep_strings = 0;
9423+ memneed = domain->hash_size * sizeof (nls_uint32);
9424+ for (i = 0; i < n_sysdep_strings; i++)
9425+ {
9426+ int valid = 1;
9427+ size_t needs[2];
9428+
9429+ for (j = 0; j < 2; j++)
9430+ {
9431+ const struct sysdep_string *sysdep_string =
9432+ (const struct sysdep_string *)
9433+ ((char *) data
9434+ + W (domain->must_swap,
9435+ j == 0
9436+ ? orig_sysdep_tab[i]
9437+ : trans_sysdep_tab[i]));
9438+ size_t need = 0;
9439+ const struct segment_pair *p = sysdep_string->segments;
9440+
9441+ if (W (domain->must_swap, p->sysdepref) != SEGMENTS_END)
9442+ for (p = sysdep_string->segments;; p++)
9443+ {
9444+ nls_uint32 sysdepref;
9445+
9446+ need += W (domain->must_swap, p->segsize);
9447+
9448+ sysdepref = W (domain->must_swap, p->sysdepref);
9449+ if (sysdepref == SEGMENTS_END)
9450+ break;
9451+
9452+ if (sysdepref >= n_sysdep_segments)
9453+ {
9454+ /* Invalid. */
9455+ freea (sysdep_segment_values);
9456+ goto invalid;
9457+ }
9458+
9459+ if (sysdep_segment_values[sysdepref] == NULL)
9460+ {
9461+ /* This particular string pair is invalid. */
9462+ valid = 0;
9463+ break;
9464+ }
9465+
9466+ need += strlen (sysdep_segment_values[sysdepref]);
9467+ }
9468+
9469+ needs[j] = need;
9470+ if (!valid)
9471+ break;
9472+ }
9473+
9474+ if (valid)
9475+ {
9476+ n_inmem_sysdep_strings++;
9477+ memneed += needs[0] + needs[1];
9478+ }
9479+ }
9480+ memneed += 2 * n_inmem_sysdep_strings
9481+ * sizeof (struct sysdep_string_desc);
9482+
9483+ if (n_inmem_sysdep_strings > 0)
9484+ {
9485+ unsigned int k;
9486+
9487+ /* Allocate additional memory. */
9488+ mem = (char *) malloc (memneed);
9489+ if (mem == NULL)
9490+ goto invalid;
9491+
9492+ domain->malloced = mem;
9493+ inmem_orig_sysdep_tab = (struct sysdep_string_desc *) mem;
9494+ mem += n_inmem_sysdep_strings
9495+ * sizeof (struct sysdep_string_desc);
9496+ inmem_trans_sysdep_tab = (struct sysdep_string_desc *) mem;
9497+ mem += n_inmem_sysdep_strings
9498+ * sizeof (struct sysdep_string_desc);
9499+ inmem_hash_tab = (nls_uint32 *) mem;
9500+ mem += domain->hash_size * sizeof (nls_uint32);
9501+
9502+ /* Compute the system dependent strings. */
9503+ k = 0;
9504+ for (i = 0; i < n_sysdep_strings; i++)
9505+ {
9506+ int valid = 1;
9507+
9508+ for (j = 0; j < 2; j++)
9509+ {
9510+ const struct sysdep_string *sysdep_string =
9511+ (const struct sysdep_string *)
9512+ ((char *) data
9513+ + W (domain->must_swap,
9514+ j == 0
9515+ ? orig_sysdep_tab[i]
9516+ : trans_sysdep_tab[i]));
9517+ const struct segment_pair *p =
9518+ sysdep_string->segments;
9519+
9520+ if (W (domain->must_swap, p->sysdepref)
9521+ != SEGMENTS_END)
9522+ for (p = sysdep_string->segments;; p++)
9523+ {
9524+ nls_uint32 sysdepref;
9525+
9526+ sysdepref =
9527+ W (domain->must_swap, p->sysdepref);
9528+ if (sysdepref == SEGMENTS_END)
9529+ break;
9530+
9531+ if (sysdep_segment_values[sysdepref] == NULL)
9532+ {
9533+ /* This particular string pair is
9534+ invalid. */
9535+ valid = 0;
9536+ break;
9537+ }
9538+ }
9539+
9540+ if (!valid)
9541+ break;
9542+ }
9543+
9544+ if (valid)
9545+ {
9546+ for (j = 0; j < 2; j++)
9547+ {
9548+ const struct sysdep_string *sysdep_string =
9549+ (const struct sysdep_string *)
9550+ ((char *) data
9551+ + W (domain->must_swap,
9552+ j == 0
9553+ ? orig_sysdep_tab[i]
9554+ : trans_sysdep_tab[i]));
9555+ const char *static_segments =
9556+ (char *) data
9557+ + W (domain->must_swap, sysdep_string->offset);
9558+ const struct segment_pair *p =
9559+ sysdep_string->segments;
9560+
9561+ /* Concatenate the segments, and fill
9562+ inmem_orig_sysdep_tab[k] (for j == 0) and
9563+ inmem_trans_sysdep_tab[k] (for j == 1). */
9564+
9565+ struct sysdep_string_desc *inmem_tab_entry =
9566+ (j == 0
9567+ ? inmem_orig_sysdep_tab
9568+ : inmem_trans_sysdep_tab)
9569+ + k;
9570+
9571+ if (W (domain->must_swap, p->sysdepref)
9572+ == SEGMENTS_END)
9573+ {
9574+ /* Only one static segment. */
9575+ inmem_tab_entry->length =
9576+ W (domain->must_swap, p->segsize);
9577+ inmem_tab_entry->pointer = static_segments;
9578+ }
9579+ else
9580+ {
9581+ inmem_tab_entry->pointer = mem;
9582+
9583+ for (p = sysdep_string->segments;; p++)
9584+ {
9585+ nls_uint32 segsize =
9586+ W (domain->must_swap, p->segsize);
9587+ nls_uint32 sysdepref =
9588+ W (domain->must_swap, p->sysdepref);
9589+ size_t n;
9590+
9591+ if (segsize > 0)
9592+ {
9593+ memcpy (mem, static_segments, segsize);
9594+ mem += segsize;
9595+ static_segments += segsize;
9596+ }
9597+
9598+ if (sysdepref == SEGMENTS_END)
9599+ break;
9600+
9601+ n = strlen (sysdep_segment_values[sysdepref]);
9602+ memcpy (mem, sysdep_segment_values[sysdepref], n);
9603+ mem += n;
9604+ }
9605+
9606+ inmem_tab_entry->length =
9607+ mem - inmem_tab_entry->pointer;
9608+ }
9609+ }
9610+
9611+ k++;
9612+ }
9613+ }
9614+ if (k != n_inmem_sysdep_strings)
9615+ abort ();
9616+
9617+ /* Compute the augmented hash table. */
9618+ for (i = 0; i < domain->hash_size; i++)
9619+ inmem_hash_tab[i] =
9620+ W (domain->must_swap_hash_tab, domain->hash_tab[i]);
9621+ for (i = 0; i < n_inmem_sysdep_strings; i++)
9622+ {
9623+ const char *msgid = inmem_orig_sysdep_tab[i].pointer;
9624+ nls_uint32 hash_val = hash_string (msgid);
9625+ nls_uint32 idx = hash_val % domain->hash_size;
9626+ nls_uint32 incr =
9627+ 1 + (hash_val % (domain->hash_size - 2));
9628+
9629+ for (;;)
9630+ {
9631+ if (inmem_hash_tab[idx] == 0)
9632+ {
9633+ /* Hash table entry is empty. Use it. */
9634+ inmem_hash_tab[idx] = 1 + domain->nstrings + i;
9635+ break;
9636+ }
9637+
9638+ if (idx >= domain->hash_size - incr)
9639+ idx -= domain->hash_size - incr;
9640+ else
9641+ idx += incr;
9642+ }
9643+ }
9644+
9645+ domain->n_sysdep_strings = n_inmem_sysdep_strings;
9646+ domain->orig_sysdep_tab = inmem_orig_sysdep_tab;
9647+ domain->trans_sysdep_tab = inmem_trans_sysdep_tab;
9648+
9649+ domain->hash_tab = inmem_hash_tab;
9650+ domain->must_swap_hash_tab = 0;
9651+ }
9652+ else
9653+ {
9654+ domain->n_sysdep_strings = 0;
9655+ domain->orig_sysdep_tab = NULL;
9656+ domain->trans_sysdep_tab = NULL;
9657+ }
9658+
9659+ freea (sysdep_segment_values);
9660+ }
9661+ else
9662+ {
9663+ domain->n_sysdep_strings = 0;
9664+ domain->orig_sysdep_tab = NULL;
9665+ domain->trans_sysdep_tab = NULL;
9666+ }
9667+ }
9668+ break;
9669+ }
9670 break;
9671 default:
9672- /* This is an illegal revision. */
9673-#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
9674- || defined _LIBC
9675+ /* This is an invalid revision. */
9676+ invalid:
9677+ /* This is an invalid .mo file. */
9678+ if (domain->malloced)
9679+ free (domain->malloced);
9680+#ifdef HAVE_MMAP
9681 if (use_mmap)
9682- munmap ((caddr_t) data, st.st_size);
9683+ munmap ((caddr_t) data, size);
9684 else
9685 #endif
9686 free (data);
9687@@ -193,7 +1385,36 @@
9688 return;
9689 }
9690
9691- /* Show that one domain is changed. This might make some cached
9692- translations invalid. */
9693- ++_nl_msg_cat_cntr;
9694+ /* Now initialize the character set converter from the character set
9695+ the file is encoded with (found in the header entry) to the domain's
9696+ specified character set or the locale's character set. */
9697+ nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
9698+
9699+ /* Also look for a plural specification. */
9700+ EXTRACT_PLURAL_EXPRESSION (nullentry, &domain->plural, &domain->nplurals);
9701 }
9702+
9703+
9704+#ifdef _LIBC
9705+void
9706+internal_function
9707+_nl_unload_domain (struct loaded_domain *domain)
9708+{
9709+ if (domain->plural != &__gettext_germanic_plural)
9710+ __gettext_free_exp (domain->plural);
9711+
9712+ _nl_free_domain_conv (domain);
9713+
9714+ if (domain->malloced)
9715+ free (domain->malloced);
9716+
9717+# ifdef _POSIX_MAPPED_FILES
9718+ if (domain->use_mmap)
9719+ munmap ((caddr_t) domain->data, domain->mmap_size);
9720+ else
9721+# endif /* _POSIX_MAPPED_FILES */
9722+ free ((void *) domain->data);
9723+
9724+ free (domain);
9725+}
9726+#endif
9727--- lrzsz-0.12.20.safe/intl/localcharset.c 1969-12-31 19:00:00.000000000 -0500
9728+++ lrzsz-0.12.20/intl/localcharset.c 2004-09-12 14:40:34.478729392 -0400
9729@@ -0,0 +1,398 @@
9730+/* Determine a canonical name for the current locale's character encoding.
9731+
9732+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
9733+
9734+ This program is free software; you can redistribute it and/or modify it
9735+ under the terms of the GNU Library General Public License as published
9736+ by the Free Software Foundation; either version 2, or (at your option)
9737+ any later version.
9738+
9739+ This program is distributed in the hope that it will be useful,
9740+ but WITHOUT ANY WARRANTY; without even the implied warranty of
9741+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
9742+ Library General Public License for more details.
9743+
9744+ You should have received a copy of the GNU Library General Public
9745+ License along with this program; if not, write to the Free Software
9746+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
9747+ USA. */
9748+
9749+/* Written by Bruno Haible <bruno@clisp.org>. */
9750+
9751+#ifdef HAVE_CONFIG_H
9752+# include <config.h>
9753+#endif
9754+
9755+/* Specification. */
9756+#include "localcharset.h"
9757+
9758+#if HAVE_STDDEF_H
9759+# include <stddef.h>
9760+#endif
9761+
9762+#include <stdio.h>
9763+#if HAVE_STRING_H
9764+# include <string.h>
9765+#else
9766+# include <strings.h>
9767+#endif
9768+#if HAVE_STDLIB_H
9769+# include <stdlib.h>
9770+#endif
9771+
9772+#if defined _WIN32 || defined __WIN32__
9773+# undef WIN32 /* avoid warning on mingw32 */
9774+# define WIN32
9775+#endif
9776+
9777+#if defined __EMX__
9778+/* Assume EMX program runs on OS/2, even if compiled under DOS. */
9779+# define OS2
9780+#endif
9781+
9782+#if !defined WIN32
9783+# if HAVE_LANGINFO_CODESET
9784+# include <langinfo.h>
9785+# else
9786+# if HAVE_SETLOCALE
9787+# include <locale.h>
9788+# endif
9789+# endif
9790+#elif defined WIN32
9791+# define WIN32_LEAN_AND_MEAN
9792+# include <windows.h>
9793+#endif
9794+#if defined OS2
9795+# define INCL_DOS
9796+# include <os2.h>
9797+#endif
9798+
9799+#if ENABLE_RELOCATABLE
9800+# include "relocatable.h"
9801+#else
9802+# define relocate(pathname) (pathname)
9803+#endif
9804+
9805+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
9806+ /* Win32, OS/2, DOS */
9807+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
9808+#endif
9809+
9810+#ifndef DIRECTORY_SEPARATOR
9811+# define DIRECTORY_SEPARATOR '/'
9812+#endif
9813+
9814+#ifndef ISSLASH
9815+# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
9816+#endif
9817+
9818+#if HAVE_DECL_GETC_UNLOCKED
9819+# undef getc
9820+# define getc getc_unlocked
9821+#endif
9822+
9823+/* The following static variable is declared 'volatile' to avoid a
9824+ possible multithread problem in the function get_charset_aliases. If we
9825+ are running in a threaded environment, and if two threads initialize
9826+ 'charset_aliases' simultaneously, both will produce the same value,
9827+ and everything will be ok if the two assignments to 'charset_aliases'
9828+ are atomic. But I don't know what will happen if the two assignments mix. */
9829+#if __STDC__ != 1
9830+# define volatile /* empty */
9831+#endif
9832+/* Pointer to the contents of the charset.alias file, if it has already been
9833+ read, else NULL. Its format is:
9834+ ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
9835+static const char * volatile charset_aliases;
9836+
9837+/* Return a pointer to the contents of the charset.alias file. */
9838+static const char *
9839+get_charset_aliases ()
9840+{
9841+ const char *cp;
9842+
9843+ cp = charset_aliases;
9844+ if (cp == NULL)
9845+ {
9846+#if !(defined VMS || defined WIN32)
9847+ FILE *fp;
9848+ const char *dir = relocate (LIBDIR);
9849+ const char *base = "charset.alias";
9850+ char *file_name;
9851+
9852+ /* Concatenate dir and base into freshly allocated file_name. */
9853+ {
9854+ size_t dir_len = strlen (dir);
9855+ size_t base_len = strlen (base);
9856+ int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
9857+ file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
9858+ if (file_name != NULL)
9859+ {
9860+ memcpy (file_name, dir, dir_len);
9861+ if (add_slash)
9862+ file_name[dir_len] = DIRECTORY_SEPARATOR;
9863+ memcpy (file_name + dir_len + add_slash, base, base_len + 1);
9864+ }
9865+ }
9866+
9867+ if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
9868+ /* Out of memory or file not found, treat it as empty. */
9869+ cp = "";
9870+ else
9871+ {
9872+ /* Parse the file's contents. */
9873+ int c;
9874+ char buf1[50+1];
9875+ char buf2[50+1];
9876+ char *res_ptr = NULL;
9877+ size_t res_size = 0;
9878+ size_t l1, l2;
9879+
9880+ for (;;)
9881+ {
9882+ c = getc (fp);
9883+ if (c == EOF)
9884+ break;
9885+ if (c == '\n' || c == ' ' || c == '\t')
9886+ continue;
9887+ if (c == '#')
9888+ {
9889+ /* Skip comment, to end of line. */
9890+ do
9891+ c = getc (fp);
9892+ while (!(c == EOF || c == '\n'));
9893+ if (c == EOF)
9894+ break;
9895+ continue;
9896+ }
9897+ ungetc (c, fp);
9898+ if (fscanf (fp, "%50s %50s", buf1, buf2) < 2)
9899+ break;
9900+ l1 = strlen (buf1);
9901+ l2 = strlen (buf2);
9902+ if (res_size == 0)
9903+ {
9904+ res_size = l1 + 1 + l2 + 1;
9905+ res_ptr = (char *) malloc (res_size + 1);
9906+ }
9907+ else
9908+ {
9909+ res_size += l1 + 1 + l2 + 1;
9910+ res_ptr = (char *) realloc (res_ptr, res_size + 1);
9911+ }
9912+ if (res_ptr == NULL)
9913+ {
9914+ /* Out of memory. */
9915+ res_size = 0;
9916+ break;
9917+ }
9918+ strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
9919+ strcpy (res_ptr + res_size - (l2 + 1), buf2);
9920+ }
9921+ fclose (fp);
9922+ if (res_size == 0)
9923+ cp = "";
9924+ else
9925+ {
9926+ *(res_ptr + res_size) = '\0';
9927+ cp = res_ptr;
9928+ }
9929+ }
9930+
9931+ if (file_name != NULL)
9932+ free (file_name);
9933+
9934+#else
9935+
9936+# if defined VMS
9937+ /* To avoid the troubles of an extra file charset.alias_vms in the
9938+ sources of many GNU packages, simply inline the aliases here. */
9939+ /* The list of encodings is taken from the OpenVMS 7.3-1 documentation
9940+ "Compaq C Run-Time Library Reference Manual for OpenVMS systems"
9941+ section 10.7 "Handling Different Character Sets". */
9942+ cp = "ISO8859-1" "\0" "ISO-8859-1" "\0"
9943+ "ISO8859-2" "\0" "ISO-8859-2" "\0"
9944+ "ISO8859-5" "\0" "ISO-8859-5" "\0"
9945+ "ISO8859-7" "\0" "ISO-8859-7" "\0"
9946+ "ISO8859-8" "\0" "ISO-8859-8" "\0"
9947+ "ISO8859-9" "\0" "ISO-8859-9" "\0"
9948+ /* Japanese */
9949+ "eucJP" "\0" "EUC-JP" "\0"
9950+ "SJIS" "\0" "SHIFT_JIS" "\0"
9951+ "DECKANJI" "\0" "DEC-KANJI" "\0"
9952+ "SDECKANJI" "\0" "EUC-JP" "\0"
9953+ /* Chinese */
9954+ "eucTW" "\0" "EUC-TW" "\0"
9955+ "DECHANYU" "\0" "DEC-HANYU" "\0"
9956+ "DECHANZI" "\0" "GB2312" "\0"
9957+ /* Korean */
9958+ "DECKOREAN" "\0" "EUC-KR" "\0";
9959+# endif
9960+
9961+# if defined WIN32
9962+ /* To avoid the troubles of installing a separate file in the same
9963+ directory as the DLL and of retrieving the DLL's directory at
9964+ runtime, simply inline the aliases here. */
9965+
9966+ cp = "CP936" "\0" "GBK" "\0"
9967+ "CP1361" "\0" "JOHAB" "\0"
9968+ "CP20127" "\0" "ASCII" "\0"
9969+ "CP20866" "\0" "KOI8-R" "\0"
9970+ "CP21866" "\0" "KOI8-RU" "\0"
9971+ "CP28591" "\0" "ISO-8859-1" "\0"
9972+ "CP28592" "\0" "ISO-8859-2" "\0"
9973+ "CP28593" "\0" "ISO-8859-3" "\0"
9974+ "CP28594" "\0" "ISO-8859-4" "\0"
9975+ "CP28595" "\0" "ISO-8859-5" "\0"
9976+ "CP28596" "\0" "ISO-8859-6" "\0"
9977+ "CP28597" "\0" "ISO-8859-7" "\0"
9978+ "CP28598" "\0" "ISO-8859-8" "\0"
9979+ "CP28599" "\0" "ISO-8859-9" "\0"
9980+ "CP28605" "\0" "ISO-8859-15" "\0";
9981+# endif
9982+#endif
9983+
9984+ charset_aliases = cp;
9985+ }
9986+
9987+ return cp;
9988+}
9989+
9990+/* Determine the current locale's character encoding, and canonicalize it
9991+ into one of the canonical names listed in config.charset.
9992+ The result must not be freed; it is statically allocated.
9993+ If the canonical name cannot be determined, the result is a non-canonical
9994+ name. */
9995+
9996+#ifdef STATIC
9997+STATIC
9998+#endif
9999+const char *
10000+locale_charset ()
10001+{
10002+ const char *codeset;
10003+ const char *aliases;
10004+
10005+#if !(defined WIN32 || defined OS2)
10006+
10007+# if HAVE_LANGINFO_CODESET
10008+
10009+ /* Most systems support nl_langinfo (CODESET) nowadays. */
10010+ codeset = nl_langinfo (CODESET);
10011+
10012+# else
10013+
10014+ /* On old systems which lack it, use setlocale or getenv. */
10015+ const char *locale = NULL;
10016+
10017+ /* But most old systems don't have a complete set of locales. Some
10018+ (like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
10019+ use setlocale here; it would return "C" when it doesn't support the
10020+ locale name the user has set. */
10021+# if HAVE_SETLOCALE && 0
10022+ locale = setlocale (LC_CTYPE, NULL);
10023+# endif
10024+ if (locale == NULL || locale[0] == '\0')
10025+ {
10026+ locale = getenv ("LC_ALL");
10027+ if (locale == NULL || locale[0] == '\0')
10028+ {
10029+ locale = getenv ("LC_CTYPE");
10030+ if (locale == NULL || locale[0] == '\0')
10031+ locale = getenv ("LANG");
10032+ }
10033+ }
10034+
10035+ /* On some old systems, one used to set locale = "iso8859_1". On others,
10036+ you set it to "language_COUNTRY.charset". In any case, we resolve it
10037+ through the charset.alias file. */
10038+ codeset = locale;
10039+
10040+# endif
10041+
10042+#elif defined WIN32
10043+
10044+ static char buf[2 + 10 + 1];
10045+
10046+ /* Woe32 has a function returning the locale's codepage as a number. */
10047+ sprintf (buf, "CP%u", GetACP ());
10048+ codeset = buf;
10049+
10050+#elif defined OS2
10051+
10052+ const char *locale;
10053+ static char buf[2 + 10 + 1];
10054+ ULONG cp[3];
10055+ ULONG cplen;
10056+
10057+ /* Allow user to override the codeset, as set in the operating system,
10058+ with standard language environment variables. */
10059+ locale = getenv ("LC_ALL");
10060+ if (locale == NULL || locale[0] == '\0')
10061+ {
10062+ locale = getenv ("LC_CTYPE");
10063+ if (locale == NULL || locale[0] == '\0')
10064+ locale = getenv ("LANG");
10065+ }
10066+ if (locale != NULL && locale[0] != '\0')
10067+ {
10068+ /* If the locale name contains an encoding after the dot, return it. */
10069+ const char *dot = strchr (locale, '.');
10070+
10071+ if (dot != NULL)
10072+ {
10073+ const char *modifier;
10074+
10075+ dot++;
10076+ /* Look for the possible @... trailer and remove it, if any. */
10077+ modifier = strchr (dot, '@');
10078+ if (modifier == NULL)
10079+ return dot;
10080+ if (modifier - dot < sizeof (buf))
10081+ {
10082+ memcpy (buf, dot, modifier - dot);
10083+ buf [modifier - dot] = '\0';
10084+ return buf;
10085+ }
10086+ }
10087+
10088+ /* Resolve through the charset.alias file. */
10089+ codeset = locale;
10090+ }
10091+ else
10092+ {
10093+ /* OS/2 has a function returning the locale's codepage as a number. */
10094+ if (DosQueryCp (sizeof (cp), cp, &cplen))
10095+ codeset = "";
10096+ else
10097+ {
10098+ sprintf (buf, "CP%u", cp[0]);
10099+ codeset = buf;
10100+ }
10101+ }
10102+
10103+#endif
10104+
10105+ if (codeset == NULL)
10106+ /* The canonical name cannot be determined. */
10107+ codeset = "";
10108+
10109+ /* Resolve alias. */
10110+ for (aliases = get_charset_aliases ();
10111+ *aliases != '\0';
10112+ aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
10113+ if (strcmp (codeset, aliases) == 0
10114+ || (aliases[0] == '*' && aliases[1] == '\0'))
10115+ {
10116+ codeset = aliases + strlen (aliases) + 1;
10117+ break;
10118+ }
10119+
10120+ /* Don't return an empty string. GNU libc and GNU libiconv interpret
10121+ the empty string as denoting "the locale's character encoding",
10122+ thus GNU libiconv would call this function a second time. */
10123+ if (codeset[0] == '\0')
10124+ codeset = "ASCII";
10125+
10126+ return codeset;
10127+}
10128--- lrzsz-0.12.20.safe/intl/localcharset.h 1969-12-31 19:00:00.000000000 -0500
10129+++ lrzsz-0.12.20/intl/localcharset.h 2004-09-12 14:40:34.483728632 -0400
10130@@ -0,0 +1,42 @@
10131+/* Determine a canonical name for the current locale's character encoding.
10132+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
10133+ This file is part of the GNU CHARSET Library.
10134+
10135+ This program is free software; you can redistribute it and/or modify it
10136+ under the terms of the GNU Library General Public License as published
10137+ by the Free Software Foundation; either version 2, or (at your option)
10138+ any later version.
10139+
10140+ This program is distributed in the hope that it will be useful,
10141+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10142+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10143+ Library General Public License for more details.
10144+
10145+ You should have received a copy of the GNU Library General Public
10146+ License along with this program; if not, write to the Free Software
10147+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10148+ USA. */
10149+
10150+#ifndef _LOCALCHARSET_H
10151+#define _LOCALCHARSET_H
10152+
10153+
10154+#ifdef __cplusplus
10155+extern "C" {
10156+#endif
10157+
10158+
10159+/* Determine the current locale's character encoding, and canonicalize it
10160+ into one of the canonical names listed in config.charset.
10161+ The result must not be freed; it is statically allocated.
10162+ If the canonical name cannot be determined, the result is a non-canonical
10163+ name. */
10164+extern const char * locale_charset (void);
10165+
10166+
10167+#ifdef __cplusplus
10168+}
10169+#endif
10170+
10171+
10172+#endif /* _LOCALCHARSET_H */
10173--- lrzsz-0.12.20.safe/intl/locale.alias 1969-12-31 19:00:00.000000000 -0500
10174+++ lrzsz-0.12.20/intl/locale.alias 2004-09-12 14:40:34.499726200 -0400
10175@@ -0,0 +1,78 @@
10176+# Locale name alias data base.
10177+# Copyright (C) 1996-2001,2003 Free Software Foundation, Inc.
10178+#
10179+# This program is free software; you can redistribute it and/or modify it
10180+# under the terms of the GNU Library General Public License as published
10181+# by the Free Software Foundation; either version 2, or (at your option)
10182+# any later version.
10183+#
10184+# This program is distributed in the hope that it will be useful,
10185+# but WITHOUT ANY WARRANTY; without even the implied warranty of
10186+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10187+# Library General Public License for more details.
10188+#
10189+# You should have received a copy of the GNU Library General Public
10190+# License along with this program; if not, write to the Free Software
10191+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10192+# USA.
10193+
10194+# The format of this file is the same as for the corresponding file of
10195+# the X Window System, which normally can be found in
10196+# /usr/lib/X11/locale/locale.alias
10197+# A single line contains two fields: an alias and a substitution value.
10198+# All entries are case independent.
10199+
10200+# Note: This file is far from being complete. If you have a value for
10201+# your own site which you think might be useful for others too, share
10202+# it with the rest of us. Send it using the `glibcbug' script to
10203+# bugs@gnu.org.
10204+
10205+# Packages using this file:
10206+
10207+bokmal nb_NO.ISO-8859-1
10208+bokmål nb_NO.ISO-8859-1
10209+catalan ca_ES.ISO-8859-1
10210+croatian hr_HR.ISO-8859-2
10211+czech cs_CZ.ISO-8859-2
10212+danish da_DK.ISO-8859-1
10213+dansk da_DK.ISO-8859-1
10214+deutsch de_DE.ISO-8859-1
10215+dutch nl_NL.ISO-8859-1
10216+eesti et_EE.ISO-8859-1
10217+estonian et_EE.ISO-8859-1
10218+finnish fi_FI.ISO-8859-1
10219+français fr_FR.ISO-8859-1
10220+french fr_FR.ISO-8859-1
10221+galego gl_ES.ISO-8859-1
10222+galician gl_ES.ISO-8859-1
10223+german de_DE.ISO-8859-1
10224+greek el_GR.ISO-8859-7
10225+hebrew he_IL.ISO-8859-8
10226+hrvatski hr_HR.ISO-8859-2
10227+hungarian hu_HU.ISO-8859-2
10228+icelandic is_IS.ISO-8859-1
10229+italian it_IT.ISO-8859-1
10230+japanese ja_JP.eucJP
10231+japanese.euc ja_JP.eucJP
10232+ja_JP ja_JP.eucJP
10233+ja_JP.ujis ja_JP.eucJP
10234+japanese.sjis ja_JP.SJIS
10235+korean ko_KR.eucKR
10236+korean.euc ko_KR.eucKR
10237+ko_KR ko_KR.eucKR
10238+lithuanian lt_LT.ISO-8859-13
10239+no_NO nb_NO.ISO-8859-1
10240+no_NO.ISO-8859-1 nb_NO.ISO-8859-1
10241+norwegian nb_NO.ISO-8859-1
10242+nynorsk nn_NO.ISO-8859-1
10243+polish pl_PL.ISO-8859-2
10244+portuguese pt_PT.ISO-8859-1
10245+romanian ro_RO.ISO-8859-2
10246+russian ru_RU.ISO-8859-5
10247+slovak sk_SK.ISO-8859-2
10248+slovene sl_SI.ISO-8859-2
10249+slovenian sl_SI.ISO-8859-2
10250+spanish es_ES.ISO-8859-1
10251+swedish sv_SE.ISO-8859-1
10252+thai th_TH.TIS-620
10253+turkish tr_TR.ISO-8859-9
10254--- lrzsz-0.12.20.safe/intl/localealias.c 1998-04-26 09:22:37.000000000 -0400
10255+++ lrzsz-0.12.20/intl/localealias.c 2004-09-12 14:40:34.505725288 -0400
10256@@ -1,20 +1,27 @@
10257-/* Handle aliases for locale names
10258- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
10259- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
10260+/* Handle aliases for locale names.
10261+ Copyright (C) 1995-1999, 2000-2001, 2003 Free Software Foundation, Inc.
10262
10263- This program is free software; you can redistribute it and/or modify
10264- it under the terms of the GNU General Public License as published by
10265- the Free Software Foundation; either version 2, or (at your option)
10266+ This program is free software; you can redistribute it and/or modify it
10267+ under the terms of the GNU Library General Public License as published
10268+ by the Free Software Foundation; either version 2, or (at your option)
10269 any later version.
10270
10271 This program is distributed in the hope that it will be useful,
10272 but WITHOUT ANY WARRANTY; without even the implied warranty of
10273- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
10274- GNU General Public License for more details.
10275+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10276+ Library General Public License for more details.
10277
10278- You should have received a copy of the GNU General Public License
10279- along with this program; if not, write to the Free Software Foundation,
10280- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
10281+ You should have received a copy of the GNU Library General Public
10282+ License along with this program; if not, write to the Free Software
10283+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10284+ USA. */
10285+
10286+/* Tell glibc's <string.h> to provide a prototype for mempcpy().
10287+ This must come before <config.h> because <config.h> may include
10288+ <features.h>, and once <features.h> has been included, it's too late. */
10289+#ifndef _GNU_SOURCE
10290+# define _GNU_SOURCE 1
10291+#endif
10292
10293 #ifdef HAVE_CONFIG_H
10294 # include <config.h>
10295@@ -22,56 +29,45 @@
10296
10297 #include <ctype.h>
10298 #include <stdio.h>
10299+#if defined _LIBC || defined HAVE___FSETLOCKING
10300+# include <stdio_ext.h>
10301+#endif
10302 #include <sys/types.h>
10303
10304 #ifdef __GNUC__
10305+# undef alloca
10306 # define alloca __builtin_alloca
10307 # define HAVE_ALLOCA 1
10308 #else
10309-# if defined HAVE_ALLOCA_H || defined _LIBC
10310-# include <alloca.h>
10311+# ifdef _MSC_VER
10312+# include <malloc.h>
10313+# define alloca _alloca
10314 # else
10315-# ifdef _AIX
10316- #pragma alloca
10317+# if defined HAVE_ALLOCA_H || defined _LIBC
10318+# include <alloca.h>
10319 # else
10320-# ifndef alloca
10321+# ifdef _AIX
10322+ #pragma alloca
10323+# else
10324+# ifndef alloca
10325 char *alloca ();
10326+# endif
10327 # endif
10328 # endif
10329 # endif
10330 #endif
10331
10332-#if defined STDC_HEADERS || defined _LIBC
10333-# include <stdlib.h>
10334-#else
10335-char *getenv ();
10336-# ifdef HAVE_MALLOC_H
10337-# include <malloc.h>
10338-# else
10339-void free ();
10340-# endif
10341-#endif
10342+#include <stdlib.h>
10343+#include <string.h>
10344
10345-#if defined HAVE_STRING_H || defined _LIBC
10346-# ifndef _GNU_SOURCE
10347-# define _GNU_SOURCE 1
10348-# endif
10349-# include <string.h>
10350+#include "gettextP.h"
10351+
10352+#if ENABLE_RELOCATABLE
10353+# include "relocatable.h"
10354 #else
10355-# include <strings.h>
10356-# ifndef memcpy
10357-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
10358-# endif
10359-#endif
10360-#if !HAVE_STRCHR && !defined _LIBC
10361-# ifndef strchr
10362-# define strchr index
10363-# endif
10364+# define relocate(pathname) (pathname)
10365 #endif
10366
10367-#include "gettext.h"
10368-#include "gettextP.h"
10369-
10370 /* @@ end of prolog @@ */
10371
10372 #ifdef _LIBC
10373@@ -79,43 +75,49 @@
10374 because some ANSI C functions will require linking with this object
10375 file and the name space must not be polluted. */
10376 # define strcasecmp __strcasecmp
10377+
10378+# ifndef mempcpy
10379+# define mempcpy __mempcpy
10380+# endif
10381+# define HAVE_MEMPCPY 1
10382+# define HAVE___FSETLOCKING 1
10383+
10384+/* We need locking here since we can be called from different places. */
10385+# include <bits/libc-lock.h>
10386+
10387+__libc_lock_define_initialized (static, lock);
10388+#endif
10389+
10390+#ifndef internal_function
10391+# define internal_function
10392 #endif
10393
10394+/* Some optimizations for glibc. */
10395+#ifdef _LIBC
10396+# define FEOF(fp) feof_unlocked (fp)
10397+# define FGETS(buf, n, fp) fgets_unlocked (buf, n, fp)
10398+#else
10399+# define FEOF(fp) feof (fp)
10400+# define FGETS(buf, n, fp) fgets (buf, n, fp)
10401+#endif
10402
10403-/* For those loosing systems which don't have `alloca' we have to add
10404+/* For those losing systems which don't have `alloca' we have to add
10405 some additional code emulating it. */
10406 #ifdef HAVE_ALLOCA
10407-/* Nothing has to be done. */
10408-# define ADD_BLOCK(list, address) /* nothing */
10409-# define FREE_BLOCKS(list) /* nothing */
10410+# define freea(p) /* nothing */
10411 #else
10412-struct block_list
10413-{
10414- void *address;
10415- struct block_list *next;
10416-};
10417-# define ADD_BLOCK(list, addr) \
10418- do { \
10419- struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
10420- /* If we cannot get a free block we cannot add the new element to \
10421- the list. */ \
10422- if (newp != NULL) { \
10423- newp->address = (addr); \
10424- newp->next = (list); \
10425- (list) = newp; \
10426- } \
10427- } while (0)
10428-# define FREE_BLOCKS(list) \
10429- do { \
10430- while (list != NULL) { \
10431- struct block_list *old = list; \
10432- list = list->next; \
10433- free (old); \
10434- } \
10435- } while (0)
10436-# undef alloca
10437-# define alloca(size) (malloc (size))
10438-#endif /* have alloca */
10439+# define alloca(n) malloc (n)
10440+# define freea(p) free (p)
10441+#endif
10442+
10443+#if defined _LIBC_REENTRANT || HAVE_DECL_FGETS_UNLOCKED
10444+# undef fgets
10445+# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
10446+#endif
10447+#if defined _LIBC_REENTRANT || HAVE_DECL_FEOF_UNLOCKED
10448+# undef feof
10449+# define feof(s) feof_unlocked (s)
10450+#endif
10451
10452
10453 struct alias_map
10454@@ -125,26 +127,41 @@
10455 };
10456
10457
10458-static struct alias_map *map;
10459-static size_t nmap = 0;
10460-static size_t maxmap = 0;
10461+#ifndef _LIBC
10462+# define libc_freeres_ptr(decl) decl
10463+#endif
10464+
10465+libc_freeres_ptr (static char *string_space);
10466+static size_t string_space_act;
10467+static size_t string_space_max;
10468+libc_freeres_ptr (static struct alias_map *map);
10469+static size_t nmap;
10470+static size_t maxmap;
10471
10472
10473 /* Prototypes for local functions. */
10474-static size_t read_alias_file PARAMS ((const char *fname, int fname_len));
10475-static void extend_alias_table PARAMS ((void));
10476-static int alias_compare PARAMS ((const struct alias_map *map1,
10477- const struct alias_map *map2));
10478+static size_t read_alias_file (const char *fname, int fname_len)
10479+ internal_function;
10480+static int extend_alias_table (void);
10481+static int alias_compare (const struct alias_map *map1,
10482+ const struct alias_map *map2);
10483
10484
10485 const char *
10486-_nl_expand_alias (name)
10487- const char *name;
10488+_nl_expand_alias (const char *name)
10489 {
10490- static const char *locale_alias_path = LOCALE_ALIAS_PATH;
10491+ static const char *locale_alias_path;
10492 struct alias_map *retval;
10493+ const char *result = NULL;
10494 size_t added;
10495
10496+#ifdef _LIBC
10497+ __libc_lock_lock (lock);
10498+#endif
10499+
10500+ if (locale_alias_path == NULL)
10501+ locale_alias_path = LOCALE_ALIAS_PATH;
10502+
10503 do
10504 {
10505 struct alias_map item;
10506@@ -154,15 +171,18 @@
10507 if (nmap > 0)
10508 retval = (struct alias_map *) bsearch (&item, map, nmap,
10509 sizeof (struct alias_map),
10510- (int (*) PARAMS ((const void *,
10511- const void *))
10512+ (int (*) (const void *,
10513+ const void *)
10514 ) alias_compare);
10515 else
10516 retval = NULL;
10517
10518 /* We really found an alias. Return the value. */
10519 if (retval != NULL)
10520- return retval->value;
10521+ {
10522+ result = retval->value;
10523+ break;
10524+ }
10525
10526 /* Perhaps we can find another alias file. */
10527 added = 0;
10528@@ -170,11 +190,12 @@
10529 {
10530 const char *start;
10531
10532- while (locale_alias_path[0] == ':')
10533+ while (locale_alias_path[0] == PATH_SEPARATOR)
10534 ++locale_alias_path;
10535 start = locale_alias_path;
10536
10537- while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
10538+ while (locale_alias_path[0] != '\0'
10539+ && locale_alias_path[0] != PATH_SEPARATOR)
10540 ++locale_alias_path;
10541
10542 if (start < locale_alias_path)
10543@@ -183,78 +204,87 @@
10544 }
10545 while (added != 0);
10546
10547- return NULL;
10548+#ifdef _LIBC
10549+ __libc_lock_unlock (lock);
10550+#endif
10551+
10552+ return result;
10553 }
10554
10555
10556 static size_t
10557-read_alias_file (fname, fname_len)
10558- const char *fname;
10559- int fname_len;
10560+internal_function
10561+read_alias_file (const char *fname, int fname_len)
10562 {
10563-#ifndef HAVE_ALLOCA
10564- struct block_list *block_list = NULL;
10565-#endif
10566 FILE *fp;
10567 char *full_fname;
10568 size_t added;
10569 static const char aliasfile[] = "/locale.alias";
10570
10571 full_fname = (char *) alloca (fname_len + sizeof aliasfile);
10572- ADD_BLOCK (block_list, full_fname);
10573+#ifdef HAVE_MEMPCPY
10574+ mempcpy (mempcpy (full_fname, fname, fname_len),
10575+ aliasfile, sizeof aliasfile);
10576+#else
10577 memcpy (full_fname, fname, fname_len);
10578 memcpy (&full_fname[fname_len], aliasfile, sizeof aliasfile);
10579+#endif
10580
10581- fp = fopen (full_fname, "r");
10582+ fp = fopen (relocate (full_fname), "r");
10583+ freea (full_fname);
10584 if (fp == NULL)
10585- {
10586- FREE_BLOCKS (block_list);
10587- return 0;
10588- }
10589+ return 0;
10590+
10591+#ifdef HAVE___FSETLOCKING
10592+ /* No threads present. */
10593+ __fsetlocking (fp, FSETLOCKING_BYCALLER);
10594+#endif
10595
10596 added = 0;
10597- while (!feof (fp))
10598+ while (!FEOF (fp))
10599 {
10600 /* It is a reasonable approach to use a fix buffer here because
10601 a) we are only interested in the first two fields
10602 b) these fields must be usable as file names and so must not
10603 be that long
10604- */
10605- char buf[BUFSIZ];
10606+ We avoid a multi-kilobyte buffer here since this would use up
10607+ stack space which we might not have if the program ran out of
10608+ memory. */
10609+ char buf[400];
10610 char *alias;
10611 char *value;
10612 char *cp;
10613
10614- if (fgets (buf, BUFSIZ, fp) == NULL)
10615+ if (FGETS (buf, sizeof buf, fp) == NULL)
10616 /* EOF reached. */
10617 break;
10618
10619 cp = buf;
10620 /* Ignore leading white space. */
10621- while (isspace (cp[0]))
10622+ while (isspace ((unsigned char) cp[0]))
10623 ++cp;
10624
10625 /* A leading '#' signals a comment line. */
10626 if (cp[0] != '\0' && cp[0] != '#')
10627 {
10628 alias = cp++;
10629- while (cp[0] != '\0' && !isspace (cp[0]))
10630+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10631 ++cp;
10632 /* Terminate alias name. */
10633 if (cp[0] != '\0')
10634 *cp++ = '\0';
10635
10636 /* Now look for the beginning of the value. */
10637- while (isspace (cp[0]))
10638+ while (isspace ((unsigned char) cp[0]))
10639 ++cp;
10640
10641 if (cp[0] != '\0')
10642 {
10643- char *tp;
10644- size_t len;
10645+ size_t alias_len;
10646+ size_t value_len;
10647
10648 value = cp++;
10649- while (cp[0] != '\0' && !isspace (cp[0]))
10650+ while (cp[0] != '\0' && !isspace ((unsigned char) cp[0]))
10651 ++cp;
10652 /* Terminate value. */
10653 if (cp[0] == '\n')
10654@@ -269,28 +299,44 @@
10655 *cp++ = '\0';
10656
10657 if (nmap >= maxmap)
10658- extend_alias_table ();
10659-
10660- /* We cannot depend on strdup available in the libc. Sigh! */
10661- len = strlen (alias) + 1;
10662- tp = (char *) malloc (len);
10663- if (tp == NULL)
10664- {
10665- FREE_BLOCKS (block_list);
10666+ if (__builtin_expect (extend_alias_table (), 0))
10667 return added;
10668- }
10669- memcpy (tp, alias, len);
10670- map[nmap].alias = tp;
10671
10672- len = strlen (value) + 1;
10673- tp = (char *) malloc (len);
10674- if (tp == NULL)
10675+ alias_len = strlen (alias) + 1;
10676+ value_len = strlen (value) + 1;
10677+
10678+ if (string_space_act + alias_len + value_len > string_space_max)
10679 {
10680- FREE_BLOCKS (block_list);
10681- return added;
10682+ /* Increase size of memory pool. */
10683+ size_t new_size = (string_space_max
10684+ + (alias_len + value_len > 1024
10685+ ? alias_len + value_len : 1024));
10686+ char *new_pool = (char *) realloc (string_space, new_size);
10687+ if (new_pool == NULL)
10688+ return added;
10689+
10690+ if (__builtin_expect (string_space != new_pool, 0))
10691+ {
10692+ size_t i;
10693+
10694+ for (i = 0; i < nmap; i++)
10695+ {
10696+ map[i].alias += new_pool - string_space;
10697+ map[i].value += new_pool - string_space;
10698+ }
10699+ }
10700+
10701+ string_space = new_pool;
10702+ string_space_max = new_size;
10703 }
10704- memcpy (tp, value, len);
10705- map[nmap].value = tp;
10706+
10707+ map[nmap].alias = memcpy (&string_space[string_space_act],
10708+ alias, alias_len);
10709+ string_space_act += alias_len;
10710+
10711+ map[nmap].value = memcpy (&string_space[string_space_act],
10712+ value, value_len);
10713+ string_space_act += value_len;
10714
10715 ++nmap;
10716 ++added;
10717@@ -299,14 +345,11 @@
10718
10719 /* Possibly not the whole line fits into the buffer. Ignore
10720 the rest of the line. */
10721- while (strchr (cp, '\n') == NULL)
10722- {
10723- cp = buf;
10724- if (fgets (buf, BUFSIZ, fp) == NULL)
10725- /* Make sure the inner loop will be left. The outer loop
10726- will exit at the `feof' test. */
10727- *cp = '\n';
10728- }
10729+ while (strchr (buf, '\n') == NULL)
10730+ if (FGETS (buf, sizeof buf, fp) == NULL)
10731+ /* Make sure the inner loop will be left. The outer loop
10732+ will exit at the `feof' test. */
10733+ break;
10734 }
10735
10736 /* Should we test for ferror()? I think we have to silently ignore
10737@@ -315,40 +358,33 @@
10738
10739 if (added > 0)
10740 qsort (map, nmap, sizeof (struct alias_map),
10741- (int (*) PARAMS ((const void *, const void *))) alias_compare);
10742+ (int (*) (const void *, const void *)) alias_compare);
10743
10744- FREE_BLOCKS (block_list);
10745 return added;
10746 }
10747
10748
10749-static void
10750+static int
10751 extend_alias_table ()
10752 {
10753 size_t new_size;
10754 struct alias_map *new_map;
10755
10756 new_size = maxmap == 0 ? 100 : 2 * maxmap;
10757- new_map = (struct alias_map *) malloc (new_size
10758- * sizeof (struct alias_map));
10759+ new_map = (struct alias_map *) realloc (map, (new_size
10760+ * sizeof (struct alias_map)));
10761 if (new_map == NULL)
10762 /* Simply don't extend: we don't have any more core. */
10763- return;
10764-
10765- memcpy (new_map, map, nmap * sizeof (struct alias_map));
10766-
10767- if (maxmap != 0)
10768- free (map);
10769+ return -1;
10770
10771 map = new_map;
10772 maxmap = new_size;
10773+ return 0;
10774 }
10775
10776
10777 static int
10778-alias_compare (map1, map2)
10779- const struct alias_map *map1;
10780- const struct alias_map *map2;
10781+alias_compare (const struct alias_map *map1, const struct alias_map *map2)
10782 {
10783 #if defined _LIBC || defined HAVE_STRCASECMP
10784 return strcasecmp (map1->alias, map2->alias);
10785--- lrzsz-0.12.20.safe/intl/localename.c 1969-12-31 19:00:00.000000000 -0500
10786+++ lrzsz-0.12.20/intl/localename.c 2004-09-12 14:40:34.510724528 -0400
10787@@ -0,0 +1,1142 @@
10788+/* Determine the current selected locale.
10789+ Copyright (C) 1995-1999, 2000-2004 Free Software Foundation, Inc.
10790+
10791+ This program is free software; you can redistribute it and/or modify it
10792+ under the terms of the GNU Library General Public License as published
10793+ by the Free Software Foundation; either version 2, or (at your option)
10794+ any later version.
10795+
10796+ This program is distributed in the hope that it will be useful,
10797+ but WITHOUT ANY WARRANTY; without even the implied warranty of
10798+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
10799+ Library General Public License for more details.
10800+
10801+ You should have received a copy of the GNU Library General Public
10802+ License along with this program; if not, write to the Free Software
10803+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
10804+ USA. */
10805+
10806+/* Written by Ulrich Drepper <drepper@gnu.org>, 1995. */
10807+/* Win32 code written by Tor Lillqvist <tml@iki.fi>. */
10808+
10809+#ifdef HAVE_CONFIG_H
10810+# include <config.h>
10811+#endif
10812+
10813+#include <stdlib.h>
10814+#include <locale.h>
10815+
10816+#if defined _WIN32 || defined __WIN32__
10817+# undef WIN32 /* avoid warning on mingw32 */
10818+# define WIN32
10819+#endif
10820+
10821+#ifdef WIN32
10822+# define WIN32_LEAN_AND_MEAN
10823+# include <windows.h>
10824+/* List of language codes, sorted by value:
10825+ 0x01 LANG_ARABIC
10826+ 0x02 LANG_BULGARIAN
10827+ 0x03 LANG_CATALAN
10828+ 0x04 LANG_CHINESE
10829+ 0x05 LANG_CZECH
10830+ 0x06 LANG_DANISH
10831+ 0x07 LANG_GERMAN
10832+ 0x08 LANG_GREEK
10833+ 0x09 LANG_ENGLISH
10834+ 0x0a LANG_SPANISH
10835+ 0x0b LANG_FINNISH
10836+ 0x0c LANG_FRENCH
10837+ 0x0d LANG_HEBREW
10838+ 0x0e LANG_HUNGARIAN
10839+ 0x0f LANG_ICELANDIC
10840+ 0x10 LANG_ITALIAN
10841+ 0x11 LANG_JAPANESE
10842+ 0x12 LANG_KOREAN
10843+ 0x13 LANG_DUTCH
10844+ 0x14 LANG_NORWEGIAN
10845+ 0x15 LANG_POLISH
10846+ 0x16 LANG_PORTUGUESE
10847+ 0x17 LANG_RHAETO_ROMANCE
10848+ 0x18 LANG_ROMANIAN
10849+ 0x19 LANG_RUSSIAN
10850+ 0x1a LANG_CROATIAN == LANG_SERBIAN
10851+ 0x1b LANG_SLOVAK
10852+ 0x1c LANG_ALBANIAN
10853+ 0x1d LANG_SWEDISH
10854+ 0x1e LANG_THAI
10855+ 0x1f LANG_TURKISH
10856+ 0x20 LANG_URDU
10857+ 0x21 LANG_INDONESIAN
10858+ 0x22 LANG_UKRAINIAN
10859+ 0x23 LANG_BELARUSIAN
10860+ 0x24 LANG_SLOVENIAN
10861+ 0x25 LANG_ESTONIAN
10862+ 0x26 LANG_LATVIAN
10863+ 0x27 LANG_LITHUANIAN
10864+ 0x28 LANG_TAJIK
10865+ 0x29 LANG_FARSI
10866+ 0x2a LANG_VIETNAMESE
10867+ 0x2b LANG_ARMENIAN
10868+ 0x2c LANG_AZERI
10869+ 0x2d LANG_BASQUE
10870+ 0x2e LANG_SORBIAN
10871+ 0x2f LANG_MACEDONIAN
10872+ 0x30 LANG_SUTU
10873+ 0x31 LANG_TSONGA
10874+ 0x32 LANG_TSWANA
10875+ 0x33 LANG_VENDA
10876+ 0x34 LANG_XHOSA
10877+ 0x35 LANG_ZULU
10878+ 0x36 LANG_AFRIKAANS
10879+ 0x37 LANG_GEORGIAN
10880+ 0x38 LANG_FAEROESE
10881+ 0x39 LANG_HINDI
10882+ 0x3a LANG_MALTESE
10883+ 0x3b LANG_SAAMI
10884+ 0x3c LANG_GAELIC
10885+ 0x3d LANG_YIDDISH
10886+ 0x3e LANG_MALAY
10887+ 0x3f LANG_KAZAK
10888+ 0x40 LANG_KYRGYZ
10889+ 0x41 LANG_SWAHILI
10890+ 0x42 LANG_TURKMEN
10891+ 0x43 LANG_UZBEK
10892+ 0x44 LANG_TATAR
10893+ 0x45 LANG_BENGALI
10894+ 0x46 LANG_PUNJABI
10895+ 0x47 LANG_GUJARATI
10896+ 0x48 LANG_ORIYA
10897+ 0x49 LANG_TAMIL
10898+ 0x4a LANG_TELUGU
10899+ 0x4b LANG_KANNADA
10900+ 0x4c LANG_MALAYALAM
10901+ 0x4d LANG_ASSAMESE
10902+ 0x4e LANG_MARATHI
10903+ 0x4f LANG_SANSKRIT
10904+ 0x50 LANG_MONGOLIAN
10905+ 0x51 LANG_TIBETAN
10906+ 0x52 LANG_WELSH
10907+ 0x53 LANG_CAMBODIAN
10908+ 0x54 LANG_LAO
10909+ 0x55 LANG_BURMESE
10910+ 0x56 LANG_GALICIAN
10911+ 0x57 LANG_KONKANI
10912+ 0x58 LANG_MANIPURI
10913+ 0x59 LANG_SINDHI
10914+ 0x5a LANG_SYRIAC
10915+ 0x5b LANG_SINHALESE
10916+ 0x5c LANG_CHEROKEE
10917+ 0x5d LANG_INUKTITUT
10918+ 0x5e LANG_AMHARIC
10919+ 0x5f LANG_TAMAZIGHT
10920+ 0x60 LANG_KASHMIRI
10921+ 0x61 LANG_NEPALI
10922+ 0x62 LANG_FRISIAN
10923+ 0x63 LANG_PASHTO
10924+ 0x64 LANG_TAGALOG
10925+ 0x65 LANG_DIVEHI
10926+ 0x66 LANG_EDO
10927+ 0x67 LANG_FULFULDE
10928+ 0x68 LANG_HAUSA
10929+ 0x69 LANG_IBIBIO
10930+ 0x6a LANG_YORUBA
10931+ 0x70 LANG_IGBO
10932+ 0x71 LANG_KANURI
10933+ 0x72 LANG_OROMO
10934+ 0x73 LANG_TIGRINYA
10935+ 0x74 LANG_GUARANI
10936+ 0x75 LANG_HAWAIIAN
10937+ 0x76 LANG_LATIN
10938+ 0x77 LANG_SOMALI
10939+ 0x78 LANG_YI
10940+ 0x79 LANG_PAPIAMENTU
10941+*/
10942+/* Mingw headers don't have latest language and sublanguage codes. */
10943+# ifndef LANG_AFRIKAANS
10944+# define LANG_AFRIKAANS 0x36
10945+# endif
10946+# ifndef LANG_ALBANIAN
10947+# define LANG_ALBANIAN 0x1c
10948+# endif
10949+# ifndef LANG_AMHARIC
10950+# define LANG_AMHARIC 0x5e
10951+# endif
10952+# ifndef LANG_ARABIC
10953+# define LANG_ARABIC 0x01
10954+# endif
10955+# ifndef LANG_ARMENIAN
10956+# define LANG_ARMENIAN 0x2b
10957+# endif
10958+# ifndef LANG_ASSAMESE
10959+# define LANG_ASSAMESE 0x4d
10960+# endif
10961+# ifndef LANG_AZERI
10962+# define LANG_AZERI 0x2c
10963+# endif
10964+# ifndef LANG_BASQUE
10965+# define LANG_BASQUE 0x2d
10966+# endif
10967+# ifndef LANG_BELARUSIAN
10968+# define LANG_BELARUSIAN 0x23
10969+# endif
10970+# ifndef LANG_BENGALI
10971+# define LANG_BENGALI 0x45
10972+# endif
10973+# ifndef LANG_BURMESE
10974+# define LANG_BURMESE 0x55
10975+# endif
10976+# ifndef LANG_CAMBODIAN
10977+# define LANG_CAMBODIAN 0x53
10978+# endif
10979+# ifndef LANG_CATALAN
10980+# define LANG_CATALAN 0x03
10981+# endif
10982+# ifndef LANG_CHEROKEE
10983+# define LANG_CHEROKEE 0x5c
10984+# endif
10985+# ifndef LANG_DIVEHI
10986+# define LANG_DIVEHI 0x65
10987+# endif
10988+# ifndef LANG_EDO
10989+# define LANG_EDO 0x66
10990+# endif
10991+# ifndef LANG_ESTONIAN
10992+# define LANG_ESTONIAN 0x25
10993+# endif
10994+# ifndef LANG_FAEROESE
10995+# define LANG_FAEROESE 0x38
10996+# endif
10997+# ifndef LANG_FARSI
10998+# define LANG_FARSI 0x29
10999+# endif
11000+# ifndef LANG_FRISIAN
11001+# define LANG_FRISIAN 0x62
11002+# endif
11003+# ifndef LANG_FULFULDE
11004+# define LANG_FULFULDE 0x67
11005+# endif
11006+# ifndef LANG_GAELIC
11007+# define LANG_GAELIC 0x3c
11008+# endif
11009+# ifndef LANG_GALICIAN
11010+# define LANG_GALICIAN 0x56
11011+# endif
11012+# ifndef LANG_GEORGIAN
11013+# define LANG_GEORGIAN 0x37
11014+# endif
11015+# ifndef LANG_GUARANI
11016+# define LANG_GUARANI 0x74
11017+# endif
11018+# ifndef LANG_GUJARATI
11019+# define LANG_GUJARATI 0x47
11020+# endif
11021+# ifndef LANG_HAUSA
11022+# define LANG_HAUSA 0x68
11023+# endif
11024+# ifndef LANG_HAWAIIAN
11025+# define LANG_HAWAIIAN 0x75
11026+# endif
11027+# ifndef LANG_HEBREW
11028+# define LANG_HEBREW 0x0d
11029+# endif
11030+# ifndef LANG_HINDI
11031+# define LANG_HINDI 0x39
11032+# endif
11033+# ifndef LANG_IBIBIO
11034+# define LANG_IBIBIO 0x69
11035+# endif
11036+# ifndef LANG_IGBO
11037+# define LANG_IGBO 0x70
11038+# endif
11039+# ifndef LANG_INDONESIAN
11040+# define LANG_INDONESIAN 0x21
11041+# endif
11042+# ifndef LANG_INUKTITUT
11043+# define LANG_INUKTITUT 0x5d
11044+# endif
11045+# ifndef LANG_KANNADA
11046+# define LANG_KANNADA 0x4b
11047+# endif
11048+# ifndef LANG_KANURI
11049+# define LANG_KANURI 0x71
11050+# endif
11051+# ifndef LANG_KASHMIRI
11052+# define LANG_KASHMIRI 0x60
11053+# endif
11054+# ifndef LANG_KAZAK
11055+# define LANG_KAZAK 0x3f
11056+# endif
11057+# ifndef LANG_KONKANI
11058+# define LANG_KONKANI 0x57
11059+# endif
11060+# ifndef LANG_KYRGYZ
11061+# define LANG_KYRGYZ 0x40
11062+# endif
11063+# ifndef LANG_LAO
11064+# define LANG_LAO 0x54
11065+# endif
11066+# ifndef LANG_LATIN
11067+# define LANG_LATIN 0x76
11068+# endif
11069+# ifndef LANG_LATVIAN
11070+# define LANG_LATVIAN 0x26
11071+# endif
11072+# ifndef LANG_LITHUANIAN
11073+# define LANG_LITHUANIAN 0x27
11074+# endif
11075+# ifndef LANG_MACEDONIAN
11076+# define LANG_MACEDONIAN 0x2f
11077+# endif
11078+# ifndef LANG_MALAY
11079+# define LANG_MALAY 0x3e
11080+# endif
11081+# ifndef LANG_MALAYALAM
11082+# define LANG_MALAYALAM 0x4c
11083+# endif
11084+# ifndef LANG_MALTESE
11085+# define LANG_MALTESE 0x3a
11086+# endif
11087+# ifndef LANG_MANIPURI
11088+# define LANG_MANIPURI 0x58
11089+# endif
11090+# ifndef LANG_MARATHI
11091+# define LANG_MARATHI 0x4e
11092+# endif
11093+# ifndef LANG_MONGOLIAN
11094+# define LANG_MONGOLIAN 0x50
11095+# endif
11096+# ifndef LANG_NEPALI
11097+# define LANG_NEPALI 0x61
11098+# endif
11099+# ifndef LANG_ORIYA
11100+# define LANG_ORIYA 0x48
11101+# endif
11102+# ifndef LANG_OROMO
11103+# define LANG_OROMO 0x72
11104+# endif
11105+# ifndef LANG_PAPIAMENTU
11106+# define LANG_PAPIAMENTU 0x79
11107+# endif
11108+# ifndef LANG_PASHTO
11109+# define LANG_PASHTO 0x63
11110+# endif
11111+# ifndef LANG_PUNJABI
11112+# define LANG_PUNJABI 0x46
11113+# endif
11114+# ifndef LANG_RHAETO_ROMANCE
11115+# define LANG_RHAETO_ROMANCE 0x17
11116+# endif
11117+# ifndef LANG_SAAMI
11118+# define LANG_SAAMI 0x3b
11119+# endif
11120+# ifndef LANG_SANSKRIT
11121+# define LANG_SANSKRIT 0x4f
11122+# endif
11123+# ifndef LANG_SERBIAN
11124+# define LANG_SERBIAN 0x1a
11125+# endif
11126+# ifndef LANG_SINDHI
11127+# define LANG_SINDHI 0x59
11128+# endif
11129+# ifndef LANG_SINHALESE
11130+# define LANG_SINHALESE 0x5b
11131+# endif
11132+# ifndef LANG_SLOVAK
11133+# define LANG_SLOVAK 0x1b
11134+# endif
11135+# ifndef LANG_SOMALI
11136+# define LANG_SOMALI 0x77
11137+# endif
11138+# ifndef LANG_SORBIAN
11139+# define LANG_SORBIAN 0x2e
11140+# endif
11141+# ifndef LANG_SUTU
11142+# define LANG_SUTU 0x30
11143+# endif
11144+# ifndef LANG_SWAHILI
11145+# define LANG_SWAHILI 0x41
11146+# endif
11147+# ifndef LANG_SYRIAC
11148+# define LANG_SYRIAC 0x5a
11149+# endif
11150+# ifndef LANG_TAGALOG
11151+# define LANG_TAGALOG 0x64
11152+# endif
11153+# ifndef LANG_TAJIK
11154+# define LANG_TAJIK 0x28
11155+# endif
11156+# ifndef LANG_TAMAZIGHT
11157+# define LANG_TAMAZIGHT 0x5f
11158+# endif
11159+# ifndef LANG_TAMIL
11160+# define LANG_TAMIL 0x49
11161+# endif
11162+# ifndef LANG_TATAR
11163+# define LANG_TATAR 0x44
11164+# endif
11165+# ifndef LANG_TELUGU
11166+# define LANG_TELUGU 0x4a
11167+# endif
11168+# ifndef LANG_THAI
11169+# define LANG_THAI 0x1e
11170+# endif
11171+# ifndef LANG_TIBETAN
11172+# define LANG_TIBETAN 0x51
11173+# endif
11174+# ifndef LANG_TIGRINYA
11175+# define LANG_TIGRINYA 0x73
11176+# endif
11177+# ifndef LANG_TSONGA
11178+# define LANG_TSONGA 0x31
11179+# endif
11180+# ifndef LANG_TSWANA
11181+# define LANG_TSWANA 0x32
11182+# endif
11183+# ifndef LANG_TURKMEN
11184+# define LANG_TURKMEN 0x42
11185+# endif
11186+# ifndef LANG_UKRAINIAN
11187+# define LANG_UKRAINIAN 0x22
11188+# endif
11189+# ifndef LANG_URDU
11190+# define LANG_URDU 0x20
11191+# endif
11192+# ifndef LANG_UZBEK
11193+# define LANG_UZBEK 0x43
11194+# endif
11195+# ifndef LANG_VENDA
11196+# define LANG_VENDA 0x33
11197+# endif
11198+# ifndef LANG_VIETNAMESE
11199+# define LANG_VIETNAMESE 0x2a
11200+# endif
11201+# ifndef LANG_WELSH
11202+# define LANG_WELSH 0x52
11203+# endif
11204+# ifndef LANG_XHOSA
11205+# define LANG_XHOSA 0x34
11206+# endif
11207+# ifndef LANG_YI
11208+# define LANG_YI 0x78
11209+# endif
11210+# ifndef LANG_YIDDISH
11211+# define LANG_YIDDISH 0x3d
11212+# endif
11213+# ifndef LANG_YORUBA
11214+# define LANG_YORUBA 0x6a
11215+# endif
11216+# ifndef LANG_ZULU
11217+# define LANG_ZULU 0x35
11218+# endif
11219+# ifndef SUBLANG_ARABIC_SAUDI_ARABIA
11220+# define SUBLANG_ARABIC_SAUDI_ARABIA 0x01
11221+# endif
11222+# ifndef SUBLANG_ARABIC_IRAQ
11223+# define SUBLANG_ARABIC_IRAQ 0x02
11224+# endif
11225+# ifndef SUBLANG_ARABIC_EGYPT
11226+# define SUBLANG_ARABIC_EGYPT 0x03
11227+# endif
11228+# ifndef SUBLANG_ARABIC_LIBYA
11229+# define SUBLANG_ARABIC_LIBYA 0x04
11230+# endif
11231+# ifndef SUBLANG_ARABIC_ALGERIA
11232+# define SUBLANG_ARABIC_ALGERIA 0x05
11233+# endif
11234+# ifndef SUBLANG_ARABIC_MOROCCO
11235+# define SUBLANG_ARABIC_MOROCCO 0x06
11236+# endif
11237+# ifndef SUBLANG_ARABIC_TUNISIA
11238+# define SUBLANG_ARABIC_TUNISIA 0x07
11239+# endif
11240+# ifndef SUBLANG_ARABIC_OMAN
11241+# define SUBLANG_ARABIC_OMAN 0x08
11242+# endif
11243+# ifndef SUBLANG_ARABIC_YEMEN
11244+# define SUBLANG_ARABIC_YEMEN 0x09
11245+# endif
11246+# ifndef SUBLANG_ARABIC_SYRIA
11247+# define SUBLANG_ARABIC_SYRIA 0x0a
11248+# endif
11249+# ifndef SUBLANG_ARABIC_JORDAN
11250+# define SUBLANG_ARABIC_JORDAN 0x0b
11251+# endif
11252+# ifndef SUBLANG_ARABIC_LEBANON
11253+# define SUBLANG_ARABIC_LEBANON 0x0c
11254+# endif
11255+# ifndef SUBLANG_ARABIC_KUWAIT
11256+# define SUBLANG_ARABIC_KUWAIT 0x0d
11257+# endif
11258+# ifndef SUBLANG_ARABIC_UAE
11259+# define SUBLANG_ARABIC_UAE 0x0e
11260+# endif
11261+# ifndef SUBLANG_ARABIC_BAHRAIN
11262+# define SUBLANG_ARABIC_BAHRAIN 0x0f
11263+# endif
11264+# ifndef SUBLANG_ARABIC_QATAR
11265+# define SUBLANG_ARABIC_QATAR 0x10
11266+# endif
11267+# ifndef SUBLANG_AZERI_LATIN
11268+# define SUBLANG_AZERI_LATIN 0x01
11269+# endif
11270+# ifndef SUBLANG_AZERI_CYRILLIC
11271+# define SUBLANG_AZERI_CYRILLIC 0x02
11272+# endif
11273+# ifndef SUBLANG_BENGALI_INDIA
11274+# define SUBLANG_BENGALI_INDIA 0x00
11275+# endif
11276+# ifndef SUBLANG_BENGALI_BANGLADESH
11277+# define SUBLANG_BENGALI_BANGLADESH 0x01
11278+# endif
11279+# ifndef SUBLANG_CHINESE_MACAU
11280+# define SUBLANG_CHINESE_MACAU 0x05
11281+# endif
11282+# ifndef SUBLANG_ENGLISH_SOUTH_AFRICA
11283+# define SUBLANG_ENGLISH_SOUTH_AFRICA 0x07
11284+# endif
11285+# ifndef SUBLANG_ENGLISH_JAMAICA
11286+# define SUBLANG_ENGLISH_JAMAICA 0x08
11287+# endif
11288+# ifndef SUBLANG_ENGLISH_CARIBBEAN
11289+# define SUBLANG_ENGLISH_CARIBBEAN 0x09
11290+# endif
11291+# ifndef SUBLANG_ENGLISH_BELIZE
11292+# define SUBLANG_ENGLISH_BELIZE 0x0a
11293+# endif
11294+# ifndef SUBLANG_ENGLISH_TRINIDAD
11295+# define SUBLANG_ENGLISH_TRINIDAD 0x0b
11296+# endif
11297+# ifndef SUBLANG_ENGLISH_ZIMBABWE
11298+# define SUBLANG_ENGLISH_ZIMBABWE 0x0c
11299+# endif
11300+# ifndef SUBLANG_ENGLISH_PHILIPPINES
11301+# define SUBLANG_ENGLISH_PHILIPPINES 0x0d
11302+# endif
11303+# ifndef SUBLANG_ENGLISH_INDONESIA
11304+# define SUBLANG_ENGLISH_INDONESIA 0x0e
11305+# endif
11306+# ifndef SUBLANG_ENGLISH_HONGKONG
11307+# define SUBLANG_ENGLISH_HONGKONG 0x0f
11308+# endif
11309+# ifndef SUBLANG_ENGLISH_INDIA
11310+# define SUBLANG_ENGLISH_INDIA 0x10
11311+# endif
11312+# ifndef SUBLANG_ENGLISH_MALAYSIA
11313+# define SUBLANG_ENGLISH_MALAYSIA 0x11
11314+# endif
11315+# ifndef SUBLANG_ENGLISH_SINGAPORE
11316+# define SUBLANG_ENGLISH_SINGAPORE 0x12
11317+# endif
11318+# ifndef SUBLANG_FRENCH_LUXEMBOURG
11319+# define SUBLANG_FRENCH_LUXEMBOURG 0x05
11320+# endif
11321+# ifndef SUBLANG_FRENCH_MONACO
11322+# define SUBLANG_FRENCH_MONACO 0x06
11323+# endif
11324+# ifndef SUBLANG_FRENCH_WESTINDIES
11325+# define SUBLANG_FRENCH_WESTINDIES 0x07
11326+# endif
11327+# ifndef SUBLANG_FRENCH_REUNION
11328+# define SUBLANG_FRENCH_REUNION 0x08
11329+# endif
11330+# ifndef SUBLANG_FRENCH_CONGO
11331+# define SUBLANG_FRENCH_CONGO 0x09
11332+# endif
11333+# ifndef SUBLANG_FRENCH_SENEGAL
11334+# define SUBLANG_FRENCH_SENEGAL 0x0a
11335+# endif
11336+# ifndef SUBLANG_FRENCH_CAMEROON
11337+# define SUBLANG_FRENCH_CAMEROON 0x0b
11338+# endif
11339+# ifndef SUBLANG_FRENCH_COTEDIVOIRE
11340+# define SUBLANG_FRENCH_COTEDIVOIRE 0x0c
11341+# endif
11342+# ifndef SUBLANG_FRENCH_MALI
11343+# define SUBLANG_FRENCH_MALI 0x0d
11344+# endif
11345+# ifndef SUBLANG_FRENCH_MOROCCO
11346+# define SUBLANG_FRENCH_MOROCCO 0x0e
11347+# endif
11348+# ifndef SUBLANG_FRENCH_HAITI
11349+# define SUBLANG_FRENCH_HAITI 0x0f
11350+# endif
11351+# ifndef SUBLANG_GERMAN_LUXEMBOURG
11352+# define SUBLANG_GERMAN_LUXEMBOURG 0x04
11353+# endif
11354+# ifndef SUBLANG_GERMAN_LIECHTENSTEIN
11355+# define SUBLANG_GERMAN_LIECHTENSTEIN 0x05
11356+# endif
11357+# ifndef SUBLANG_KASHMIRI_INDIA
11358+# define SUBLANG_KASHMIRI_INDIA 0x02
11359+# endif
11360+# ifndef SUBLANG_MALAY_MALAYSIA
11361+# define SUBLANG_MALAY_MALAYSIA 0x01
11362+# endif
11363+# ifndef SUBLANG_MALAY_BRUNEI_DARUSSALAM
11364+# define SUBLANG_MALAY_BRUNEI_DARUSSALAM 0x02
11365+# endif
11366+# ifndef SUBLANG_NEPALI_INDIA
11367+# define SUBLANG_NEPALI_INDIA 0x02
11368+# endif
11369+# ifndef SUBLANG_PUNJABI_INDIA
11370+# define SUBLANG_PUNJABI_INDIA 0x00
11371+# endif
11372+# ifndef SUBLANG_PUNJABI_PAKISTAN
11373+# define SUBLANG_PUNJABI_PAKISTAN 0x01
11374+# endif
11375+# ifndef SUBLANG_ROMANIAN_ROMANIA
11376+# define SUBLANG_ROMANIAN_ROMANIA 0x00
11377+# endif
11378+# ifndef SUBLANG_ROMANIAN_MOLDOVA
11379+# define SUBLANG_ROMANIAN_MOLDOVA 0x01
11380+# endif
11381+# ifndef SUBLANG_SERBIAN_LATIN
11382+# define SUBLANG_SERBIAN_LATIN 0x02
11383+# endif
11384+# ifndef SUBLANG_SERBIAN_CYRILLIC
11385+# define SUBLANG_SERBIAN_CYRILLIC 0x03
11386+# endif
11387+# ifndef SUBLANG_SINDHI_INDIA
11388+# define SUBLANG_SINDHI_INDIA 0x00
11389+# endif
11390+# ifndef SUBLANG_SINDHI_PAKISTAN
11391+# define SUBLANG_SINDHI_PAKISTAN 0x01
11392+# endif
11393+# ifndef SUBLANG_SPANISH_GUATEMALA
11394+# define SUBLANG_SPANISH_GUATEMALA 0x04
11395+# endif
11396+# ifndef SUBLANG_SPANISH_COSTA_RICA
11397+# define SUBLANG_SPANISH_COSTA_RICA 0x05
11398+# endif
11399+# ifndef SUBLANG_SPANISH_PANAMA
11400+# define SUBLANG_SPANISH_PANAMA 0x06
11401+# endif
11402+# ifndef SUBLANG_SPANISH_DOMINICAN_REPUBLIC
11403+# define SUBLANG_SPANISH_DOMINICAN_REPUBLIC 0x07
11404+# endif
11405+# ifndef SUBLANG_SPANISH_VENEZUELA
11406+# define SUBLANG_SPANISH_VENEZUELA 0x08
11407+# endif
11408+# ifndef SUBLANG_SPANISH_COLOMBIA
11409+# define SUBLANG_SPANISH_COLOMBIA 0x09
11410+# endif
11411+# ifndef SUBLANG_SPANISH_PERU
11412+# define SUBLANG_SPANISH_PERU 0x0a
11413+# endif
11414+# ifndef SUBLANG_SPANISH_ARGENTINA
11415+# define SUBLANG_SPANISH_ARGENTINA 0x0b
11416+# endif
11417+# ifndef SUBLANG_SPANISH_ECUADOR
11418+# define SUBLANG_SPANISH_ECUADOR 0x0c
11419+# endif
11420+# ifndef SUBLANG_SPANISH_CHILE
11421+# define SUBLANG_SPANISH_CHILE 0x0d
11422+# endif
11423+# ifndef SUBLANG_SPANISH_URUGUAY
11424+# define SUBLANG_SPANISH_URUGUAY 0x0e
11425+# endif
11426+# ifndef SUBLANG_SPANISH_PARAGUAY
11427+# define SUBLANG_SPANISH_PARAGUAY 0x0f
11428+# endif
11429+# ifndef SUBLANG_SPANISH_BOLIVIA
11430+# define SUBLANG_SPANISH_BOLIVIA 0x10
11431+# endif
11432+# ifndef SUBLANG_SPANISH_EL_SALVADOR
11433+# define SUBLANG_SPANISH_EL_SALVADOR 0x11
11434+# endif
11435+# ifndef SUBLANG_SPANISH_HONDURAS
11436+# define SUBLANG_SPANISH_HONDURAS 0x12
11437+# endif
11438+# ifndef SUBLANG_SPANISH_NICARAGUA
11439+# define SUBLANG_SPANISH_NICARAGUA 0x13
11440+# endif
11441+# ifndef SUBLANG_SPANISH_PUERTO_RICO
11442+# define SUBLANG_SPANISH_PUERTO_RICO 0x14
11443+# endif
11444+# ifndef SUBLANG_SWEDISH_FINLAND
11445+# define SUBLANG_SWEDISH_FINLAND 0x02
11446+# endif
11447+# ifndef SUBLANG_TAMAZIGHT_ARABIC
11448+# define SUBLANG_TAMAZIGHT_ARABIC 0x01
11449+# endif
11450+# ifndef SUBLANG_TAMAZIGHT_LATIN
11451+# define SUBLANG_TAMAZIGHT_LATIN 0x02
11452+# endif
11453+# ifndef SUBLANG_TIGRINYA_ETHIOPIA
11454+# define SUBLANG_TIGRINYA_ETHIOPIA 0x00
11455+# endif
11456+# ifndef SUBLANG_TIGRINYA_ERITREA
11457+# define SUBLANG_TIGRINYA_ERITREA 0x01
11458+# endif
11459+# ifndef SUBLANG_URDU_PAKISTAN
11460+# define SUBLANG_URDU_PAKISTAN 0x01
11461+# endif
11462+# ifndef SUBLANG_URDU_INDIA
11463+# define SUBLANG_URDU_INDIA 0x02
11464+# endif
11465+# ifndef SUBLANG_UZBEK_LATIN
11466+# define SUBLANG_UZBEK_LATIN 0x01
11467+# endif
11468+# ifndef SUBLANG_UZBEK_CYRILLIC
11469+# define SUBLANG_UZBEK_CYRILLIC 0x02
11470+# endif
11471+#endif
11472+
11473+/* XPG3 defines the result of 'setlocale (category, NULL)' as:
11474+ "Directs 'setlocale()' to query 'category' and return the current
11475+ setting of 'local'."
11476+ However it does not specify the exact format. Neither do SUSV2 and
11477+ ISO C 99. So we can use this feature only on selected systems (e.g.
11478+ those using GNU C Library). */
11479+#if defined _LIBC || (defined __GNU_LIBRARY__ && __GNU_LIBRARY__ >= 2)
11480+# define HAVE_LOCALE_NULL
11481+#endif
11482+
11483+/* Determine the current locale's name, and canonicalize it into XPG syntax
11484+ language[_territory[.codeset]][@modifier]
11485+ The codeset part in the result is not reliable; the locale_charset()
11486+ should be used for codeset information instead.
11487+ The result must not be freed; it is statically allocated. */
11488+
11489+const char *
11490+_nl_locale_name (int category, const char *categoryname)
11491+{
11492+ const char *retval;
11493+
11494+#ifndef WIN32
11495+
11496+ /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
11497+ On some systems this can be done by the 'setlocale' function itself. */
11498+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
11499+ retval = setlocale (category, NULL);
11500+# else
11501+ /* Setting of LC_ALL overwrites all other. */
11502+ retval = getenv ("LC_ALL");
11503+ if (retval == NULL || retval[0] == '\0')
11504+ {
11505+ /* Next comes the name of the desired category. */
11506+ retval = getenv (categoryname);
11507+ if (retval == NULL || retval[0] == '\0')
11508+ {
11509+ /* Last possibility is the LANG environment variable. */
11510+ retval = getenv ("LANG");
11511+ if (retval == NULL || retval[0] == '\0')
11512+ /* We use C as the default domain. POSIX says this is
11513+ implementation defined. */
11514+ retval = "C";
11515+ }
11516+ }
11517+# endif
11518+
11519+ return retval;
11520+
11521+#else /* WIN32 */
11522+
11523+ /* Return an XPG style locale name language[_territory][@modifier].
11524+ Don't even bother determining the codeset; it's not useful in this
11525+ context, because message catalogs are not specific to a single
11526+ codeset. */
11527+
11528+ LCID lcid;
11529+ LANGID langid;
11530+ int primary, sub;
11531+
11532+ /* Let the user override the system settings through environment
11533+ variables, as on POSIX systems. */
11534+ retval = getenv ("LC_ALL");
11535+ if (retval != NULL && retval[0] != '\0')
11536+ return retval;
11537+ retval = getenv (categoryname);
11538+ if (retval != NULL && retval[0] != '\0')
11539+ return retval;
11540+ retval = getenv ("LANG");
11541+ if (retval != NULL && retval[0] != '\0')
11542+ return retval;
11543+
11544+ /* Use native Win32 API locale ID. */
11545+ lcid = GetThreadLocale ();
11546+
11547+ /* Strip off the sorting rules, keep only the language part. */
11548+ langid = LANGIDFROMLCID (lcid);
11549+
11550+ /* Split into language and territory part. */
11551+ primary = PRIMARYLANGID (langid);
11552+ sub = SUBLANGID (langid);
11553+
11554+ /* Dispatch on language.
11555+ See also http://www.unicode.org/unicode/onlinedat/languages.html .
11556+ For details about languages, see http://www.ethnologue.com/ . */
11557+ switch (primary)
11558+ {
11559+ case LANG_AFRIKAANS: return "af_ZA";
11560+ case LANG_ALBANIAN: return "sq_AL";
11561+ case LANG_AMHARIC: return "am_ET";
11562+ case LANG_ARABIC:
11563+ switch (sub)
11564+ {
11565+ case SUBLANG_ARABIC_SAUDI_ARABIA: return "ar_SA";
11566+ case SUBLANG_ARABIC_IRAQ: return "ar_IQ";
11567+ case SUBLANG_ARABIC_EGYPT: return "ar_EG";
11568+ case SUBLANG_ARABIC_LIBYA: return "ar_LY";
11569+ case SUBLANG_ARABIC_ALGERIA: return "ar_DZ";
11570+ case SUBLANG_ARABIC_MOROCCO: return "ar_MA";
11571+ case SUBLANG_ARABIC_TUNISIA: return "ar_TN";
11572+ case SUBLANG_ARABIC_OMAN: return "ar_OM";
11573+ case SUBLANG_ARABIC_YEMEN: return "ar_YE";
11574+ case SUBLANG_ARABIC_SYRIA: return "ar_SY";
11575+ case SUBLANG_ARABIC_JORDAN: return "ar_JO";
11576+ case SUBLANG_ARABIC_LEBANON: return "ar_LB";
11577+ case SUBLANG_ARABIC_KUWAIT: return "ar_KW";
11578+ case SUBLANG_ARABIC_UAE: return "ar_AE";
11579+ case SUBLANG_ARABIC_BAHRAIN: return "ar_BH";
11580+ case SUBLANG_ARABIC_QATAR: return "ar_QA";
11581+ }
11582+ return "ar";
11583+ case LANG_ARMENIAN: return "hy_AM";
11584+ case LANG_ASSAMESE: return "as_IN";
11585+ case LANG_AZERI:
11586+ switch (sub)
11587+ {
11588+ /* FIXME: Adjust this when Azerbaijani locales appear on Unix. */
11589+ case SUBLANG_AZERI_LATIN: return "az_AZ@latin";
11590+ case SUBLANG_AZERI_CYRILLIC: return "az_AZ@cyrillic";
11591+ }
11592+ return "az";
11593+ case LANG_BASQUE:
11594+ return "eu"; /* Ambiguous: could be "eu_ES" or "eu_FR". */
11595+ case LANG_BELARUSIAN: return "be_BY";
11596+ case LANG_BENGALI:
11597+ switch (sub)
11598+ {
11599+ case SUBLANG_BENGALI_INDIA: return "bn_IN";
11600+ case SUBLANG_BENGALI_BANGLADESH: return "bn_BD";
11601+ }
11602+ return "bn";
11603+ case LANG_BULGARIAN: return "bg_BG";
11604+ case LANG_BURMESE: return "my_MM";
11605+ case LANG_CAMBODIAN: return "km_KH";
11606+ case LANG_CATALAN: return "ca_ES";
11607+ case LANG_CHEROKEE: return "chr_US";
11608+ case LANG_CHINESE:
11609+ switch (sub)
11610+ {
11611+ case SUBLANG_CHINESE_TRADITIONAL: return "zh_TW";
11612+ case SUBLANG_CHINESE_SIMPLIFIED: return "zh_CN";
11613+ case SUBLANG_CHINESE_HONGKONG: return "zh_HK";
11614+ case SUBLANG_CHINESE_SINGAPORE: return "zh_SG";
11615+ case SUBLANG_CHINESE_MACAU: return "zh_MO";
11616+ }
11617+ return "zh";
11618+ case LANG_CROATIAN: /* LANG_CROATIAN == LANG_SERBIAN
11619+ * What used to be called Serbo-Croatian
11620+ * should really now be two separate
11621+ * languages because of political reasons.
11622+ * (Says tml, who knows nothing about Serbian
11623+ * or Croatian.)
11624+ * (I can feel those flames coming already.)
11625+ */
11626+ switch (sub)
11627+ {
11628+ case SUBLANG_DEFAULT: return "hr_HR";
11629+ case SUBLANG_SERBIAN_LATIN: return "sr_CS";
11630+ case SUBLANG_SERBIAN_CYRILLIC: return "sr_CS@cyrillic";
11631+ }
11632+ return "hr";
11633+ case LANG_CZECH: return "cs_CZ";
11634+ case LANG_DANISH: return "da_DK";
11635+ case LANG_DIVEHI: return "dv_MV";
11636+ case LANG_DUTCH:
11637+ switch (sub)
11638+ {
11639+ case SUBLANG_DUTCH: return "nl_NL";
11640+ case SUBLANG_DUTCH_BELGIAN: /* FLEMISH, VLAAMS */ return "nl_BE";
11641+ }
11642+ return "nl";
11643+ case LANG_EDO: return "bin_NG";
11644+ case LANG_ENGLISH:
11645+ switch (sub)
11646+ {
11647+ /* SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. Heh. I thought
11648+ * English was the language spoken in England.
11649+ * Oh well.
11650+ */
11651+ case SUBLANG_ENGLISH_US: return "en_US";
11652+ case SUBLANG_ENGLISH_UK: return "en_GB";
11653+ case SUBLANG_ENGLISH_AUS: return "en_AU";
11654+ case SUBLANG_ENGLISH_CAN: return "en_CA";
11655+ case SUBLANG_ENGLISH_NZ: return "en_NZ";
11656+ case SUBLANG_ENGLISH_EIRE: return "en_IE";
11657+ case SUBLANG_ENGLISH_SOUTH_AFRICA: return "en_ZA";
11658+ case SUBLANG_ENGLISH_JAMAICA: return "en_JM";
11659+ case SUBLANG_ENGLISH_CARIBBEAN: return "en_GD"; /* Grenada? */
11660+ case SUBLANG_ENGLISH_BELIZE: return "en_BZ";
11661+ case SUBLANG_ENGLISH_TRINIDAD: return "en_TT";
11662+ case SUBLANG_ENGLISH_ZIMBABWE: return "en_ZW";
11663+ case SUBLANG_ENGLISH_PHILIPPINES: return "en_PH";
11664+ case SUBLANG_ENGLISH_INDONESIA: return "en_ID";
11665+ case SUBLANG_ENGLISH_HONGKONG: return "en_HK";
11666+ case SUBLANG_ENGLISH_INDIA: return "en_IN";
11667+ case SUBLANG_ENGLISH_MALAYSIA: return "en_MY";
11668+ case SUBLANG_ENGLISH_SINGAPORE: return "en_SG";
11669+ }
11670+ return "en";
11671+ case LANG_ESTONIAN: return "et_EE";
11672+ case LANG_FAEROESE: return "fo_FO";
11673+ case LANG_FARSI: return "fa_IR";
11674+ case LANG_FINNISH: return "fi_FI";
11675+ case LANG_FRENCH:
11676+ switch (sub)
11677+ {
11678+ case SUBLANG_FRENCH: return "fr_FR";
11679+ case SUBLANG_FRENCH_BELGIAN: /* WALLOON */ return "fr_BE";
11680+ case SUBLANG_FRENCH_CANADIAN: return "fr_CA";
11681+ case SUBLANG_FRENCH_SWISS: return "fr_CH";
11682+ case SUBLANG_FRENCH_LUXEMBOURG: return "fr_LU";
11683+ case SUBLANG_FRENCH_MONACO: return "fr_MC";
11684+ case SUBLANG_FRENCH_WESTINDIES: return "fr"; /* Caribbean? */
11685+ case SUBLANG_FRENCH_REUNION: return "fr_RE";
11686+ case SUBLANG_FRENCH_CONGO: return "fr_CG";
11687+ case SUBLANG_FRENCH_SENEGAL: return "fr_SN";
11688+ case SUBLANG_FRENCH_CAMEROON: return "fr_CM";
11689+ case SUBLANG_FRENCH_COTEDIVOIRE: return "fr_CI";
11690+ case SUBLANG_FRENCH_MALI: return "fr_ML";
11691+ case SUBLANG_FRENCH_MOROCCO: return "fr_MA";
11692+ case SUBLANG_FRENCH_HAITI: return "fr_HT";
11693+ }
11694+ return "fr";
11695+ case LANG_FRISIAN: return "fy_NL";
11696+ case LANG_FULFULDE:
11697+ /* Spoken in Nigeria, Guinea, Senegal, Mali, Niger, Cameroon, Benin. */
11698+ return "ff_NG";
11699+ case LANG_GAELIC:
11700+ switch (sub)
11701+ {
11702+ case 0x01: /* SCOTTISH */ return "gd_GB";
11703+ case 0x02: /* IRISH */ return "ga_IE";
11704+ }
11705+ return "C";
11706+ case LANG_GALICIAN: return "gl_ES";
11707+ case LANG_GEORGIAN: return "ka_GE";
11708+ case LANG_GERMAN:
11709+ switch (sub)
11710+ {
11711+ case SUBLANG_GERMAN: return "de_DE";
11712+ case SUBLANG_GERMAN_SWISS: return "de_CH";
11713+ case SUBLANG_GERMAN_AUSTRIAN: return "de_AT";
11714+ case SUBLANG_GERMAN_LUXEMBOURG: return "de_LU";
11715+ case SUBLANG_GERMAN_LIECHTENSTEIN: return "de_LI";
11716+ }
11717+ return "de";
11718+ case LANG_GREEK: return "el_GR";
11719+ case LANG_GUARANI: return "gn_PY";
11720+ case LANG_GUJARATI: return "gu_IN";
11721+ case LANG_HAUSA: return "ha_NG";
11722+ case LANG_HAWAIIAN:
11723+ /* FIXME: Do they mean Hawaiian ("haw_US", 1000 speakers)
11724+ or Hawaii Creole English ("cpe_US", 600000 speakers)? */
11725+ return "cpe_US";
11726+ case LANG_HEBREW: return "he_IL";
11727+ case LANG_HINDI: return "hi_IN";
11728+ case LANG_HUNGARIAN: return "hu_HU";
11729+ case LANG_IBIBIO: return "nic_NG";
11730+ case LANG_ICELANDIC: return "is_IS";
11731+ case LANG_IGBO: return "ig_NG";
11732+ case LANG_INDONESIAN: return "id_ID";
11733+ case LANG_INUKTITUT: return "iu_CA";
11734+ case LANG_ITALIAN:
11735+ switch (sub)
11736+ {
11737+ case SUBLANG_ITALIAN: return "it_IT";
11738+ case SUBLANG_ITALIAN_SWISS: return "it_CH";
11739+ }
11740+ return "it";
11741+ case LANG_JAPANESE: return "ja_JP";
11742+ case LANG_KANNADA: return "kn_IN";
11743+ case LANG_KANURI: return "kr_NG";
11744+ case LANG_KASHMIRI:
11745+ switch (sub)
11746+ {
11747+ case SUBLANG_DEFAULT: return "ks_PK";
11748+ case SUBLANG_KASHMIRI_INDIA: return "ks_IN";
11749+ }
11750+ return "ks";
11751+ case LANG_KAZAK: return "kk_KZ";
11752+ case LANG_KONKANI:
11753+ /* FIXME: Adjust this when such locales appear on Unix. */
11754+ return "kok_IN";
11755+ case LANG_KOREAN: return "ko_KR";
11756+ case LANG_KYRGYZ: return "ky_KG";
11757+ case LANG_LAO: return "lo_LA";
11758+ case LANG_LATIN: return "la_VA";
11759+ case LANG_LATVIAN: return "lv_LV";
11760+ case LANG_LITHUANIAN: return "lt_LT";
11761+ case LANG_MACEDONIAN: return "mk_MK";
11762+ case LANG_MALAY:
11763+ switch (sub)
11764+ {
11765+ case SUBLANG_MALAY_MALAYSIA: return "ms_MY";
11766+ case SUBLANG_MALAY_BRUNEI_DARUSSALAM: return "ms_BN";
11767+ }
11768+ return "ms";
11769+ case LANG_MALAYALAM: return "ml_IN";
11770+ case LANG_MALTESE: return "mt_MT";
11771+ case LANG_MANIPURI:
11772+ /* FIXME: Adjust this when such locales appear on Unix. */
11773+ return "mni_IN";
11774+ case LANG_MARATHI: return "mr_IN";
11775+ case LANG_MONGOLIAN:
11776+ return "mn"; /* Ambiguous: could be "mn_CN" or "mn_MN". */
11777+ case LANG_NEPALI:
11778+ switch (sub)
11779+ {
11780+ case SUBLANG_DEFAULT: return "ne_NP";
11781+ case SUBLANG_NEPALI_INDIA: return "ne_IN";
11782+ }
11783+ return "ne";
11784+ case LANG_NORWEGIAN:
11785+ switch (sub)
11786+ {
11787+ case SUBLANG_NORWEGIAN_BOKMAL: return "no_NO";
11788+ case SUBLANG_NORWEGIAN_NYNORSK: return "nn_NO";
11789+ }
11790+ return "no";
11791+ case LANG_ORIYA: return "or_IN";
11792+ case LANG_OROMO: return "om_ET";
11793+ case LANG_PAPIAMENTU: return "pap_AN";
11794+ case LANG_PASHTO:
11795+ return "ps"; /* Ambiguous: could be "ps_PK" or "ps_AF". */
11796+ case LANG_POLISH: return "pl_PL";
11797+ case LANG_PORTUGUESE:
11798+ switch (sub)
11799+ {
11800+ case SUBLANG_PORTUGUESE: return "pt_PT";
11801+ /* Hmm. SUBLANG_PORTUGUESE_BRAZILIAN == SUBLANG_DEFAULT.
11802+ Same phenomenon as SUBLANG_ENGLISH_US == SUBLANG_DEFAULT. */
11803+ case SUBLANG_PORTUGUESE_BRAZILIAN: return "pt_BR";
11804+ }
11805+ return "pt";
11806+ case LANG_PUNJABI:
11807+ switch (sub)
11808+ {
11809+ case SUBLANG_PUNJABI_INDIA: return "pa_IN"; /* Gurmukhi script */
11810+ case SUBLANG_PUNJABI_PAKISTAN: return "pa_PK"; /* Arabic script */
11811+ }
11812+ return "pa";
11813+ case LANG_RHAETO_ROMANCE: return "rm_CH";
11814+ case LANG_ROMANIAN:
11815+ switch (sub)
11816+ {
11817+ case SUBLANG_ROMANIAN_ROMANIA: return "ro_RO";
11818+ case SUBLANG_ROMANIAN_MOLDOVA: return "ro_MD";
11819+ }
11820+ return "ro";
11821+ case LANG_RUSSIAN:
11822+ return "ru"; /* Ambiguous: could be "ru_RU" or "ru_UA" or "ru_MD". */
11823+ case LANG_SAAMI: /* actually Northern Sami */ return "se_NO";
11824+ case LANG_SANSKRIT: return "sa_IN";
11825+ case LANG_SINDHI:
11826+ switch (sub)
11827+ {
11828+ case SUBLANG_SINDHI_INDIA: return "sd_IN";
11829+ case SUBLANG_SINDHI_PAKISTAN: return "sd_PK";
11830+ }
11831+ return "sd";
11832+ case LANG_SINHALESE: return "si_LK";
11833+ case LANG_SLOVAK: return "sk_SK";
11834+ case LANG_SLOVENIAN: return "sl_SI";
11835+ case LANG_SOMALI: return "so_SO";
11836+ case LANG_SORBIAN:
11837+ /* FIXME: Adjust this when such locales appear on Unix. */
11838+ return "wen_DE";
11839+ case LANG_SPANISH:
11840+ switch (sub)
11841+ {
11842+ case SUBLANG_SPANISH: return "es_ES";
11843+ case SUBLANG_SPANISH_MEXICAN: return "es_MX";
11844+ case SUBLANG_SPANISH_MODERN:
11845+ return "es_ES@modern"; /* not seen on Unix */
11846+ case SUBLANG_SPANISH_GUATEMALA: return "es_GT";
11847+ case SUBLANG_SPANISH_COSTA_RICA: return "es_CR";
11848+ case SUBLANG_SPANISH_PANAMA: return "es_PA";
11849+ case SUBLANG_SPANISH_DOMINICAN_REPUBLIC: return "es_DO";
11850+ case SUBLANG_SPANISH_VENEZUELA: return "es_VE";
11851+ case SUBLANG_SPANISH_COLOMBIA: return "es_CO";
11852+ case SUBLANG_SPANISH_PERU: return "es_PE";
11853+ case SUBLANG_SPANISH_ARGENTINA: return "es_AR";
11854+ case SUBLANG_SPANISH_ECUADOR: return "es_EC";
11855+ case SUBLANG_SPANISH_CHILE: return "es_CL";
11856+ case SUBLANG_SPANISH_URUGUAY: return "es_UY";
11857+ case SUBLANG_SPANISH_PARAGUAY: return "es_PY";
11858+ case SUBLANG_SPANISH_BOLIVIA: return "es_BO";
11859+ case SUBLANG_SPANISH_EL_SALVADOR: return "es_SV";
11860+ case SUBLANG_SPANISH_HONDURAS: return "es_HN";
11861+ case SUBLANG_SPANISH_NICARAGUA: return "es_NI";
11862+ case SUBLANG_SPANISH_PUERTO_RICO: return "es_PR";
11863+ }
11864+ return "es";
11865+ case LANG_SUTU: return "bnt_TZ"; /* or "st_LS" or "nso_ZA"? */
11866+ case LANG_SWAHILI: return "sw_KE";
11867+ case LANG_SWEDISH:
11868+ switch (sub)
11869+ {
11870+ case SUBLANG_DEFAULT: return "sv_SE";
11871+ case SUBLANG_SWEDISH_FINLAND: return "sv_FI";
11872+ }
11873+ return "sv";
11874+ case LANG_SYRIAC: return "syr_TR"; /* An extinct language. */
11875+ case LANG_TAGALOG: return "tl_PH";
11876+ case LANG_TAJIK: return "tg_TJ";
11877+ case LANG_TAMAZIGHT:
11878+ switch (sub)
11879+ {
11880+ /* FIXME: Adjust this when Tamazight locales appear on Unix. */
11881+ case SUBLANG_TAMAZIGHT_ARABIC: return "ber_MA@arabic";
11882+ case SUBLANG_TAMAZIGHT_LATIN: return "ber_MA@latin";
11883+ }
11884+ return "ber_MA";
11885+ case LANG_TAMIL:
11886+ return "ta"; /* Ambiguous: could be "ta_IN" or "ta_LK" or "ta_SG". */
11887+ case LANG_TATAR: return "tt_RU";
11888+ case LANG_TELUGU: return "te_IN";
11889+ case LANG_THAI: return "th_TH";
11890+ case LANG_TIBETAN: return "bo_CN";
11891+ case LANG_TIGRINYA:
11892+ switch (sub)
11893+ {
11894+ case SUBLANG_TIGRINYA_ETHIOPIA: return "ti_ET";
11895+ case SUBLANG_TIGRINYA_ERITREA: return "ti_ER";
11896+ }
11897+ return "ti";
11898+ case LANG_TSONGA: return "ts_ZA";
11899+ case LANG_TSWANA: return "tn_BW";
11900+ case LANG_TURKISH: return "tr_TR";
11901+ case LANG_TURKMEN: return "tk_TM";
11902+ case LANG_UKRAINIAN: return "uk_UA";
11903+ case LANG_URDU:
11904+ switch (sub)
11905+ {
11906+ case SUBLANG_URDU_PAKISTAN: return "ur_PK";
11907+ case SUBLANG_URDU_INDIA: return "ur_IN";
11908+ }
11909+ return "ur";
11910+ case LANG_UZBEK:
11911+ switch (sub)
11912+ {
11913+ case SUBLANG_UZBEK_LATIN: return "uz_UZ";
11914+ case SUBLANG_UZBEK_CYRILLIC: return "uz_UZ@cyrillic";
11915+ }
11916+ return "uz";
11917+ case LANG_VENDA: return "ve_ZA";
11918+ case LANG_VIETNAMESE: return "vi_VN";
11919+ case LANG_WELSH: return "cy_GB";
11920+ case LANG_XHOSA: return "xh_ZA";
11921+ case LANG_YI: return "sit_CN";
11922+ case LANG_YIDDISH: return "yi_IL";
11923+ case LANG_YORUBA: return "yo_NG";
11924+ case LANG_ZULU: return "zu_ZA";
11925+ default: return "C";
11926+ }
11927+
11928+#endif
11929+}
11930--- lrzsz-0.12.20.safe/intl/log.c 1969-12-31 19:00:00.000000000 -0500
11931+++ lrzsz-0.12.20/intl/log.c 2004-09-12 14:40:34.515723768 -0400
11932@@ -0,0 +1,98 @@
11933+/* Log file output.
11934+ Copyright (C) 2003 Free Software Foundation, Inc.
11935+
11936+ This program is free software; you can redistribute it and/or modify it
11937+ under the terms of the GNU Library General Public License as published
11938+ by the Free Software Foundation; either version 2, or (at your option)
11939+ any later version.
11940+
11941+ This program is distributed in the hope that it will be useful,
11942+ but WITHOUT ANY WARRANTY; without even the implied warranty of
11943+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
11944+ Library General Public License for more details.
11945+
11946+ You should have received a copy of the GNU Library General Public
11947+ License along with this program; if not, write to the Free Software
11948+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
11949+ USA. */
11950+
11951+/* Written by Bruno Haible <bruno@clisp.org>. */
11952+
11953+#ifdef HAVE_CONFIG_H
11954+# include <config.h>
11955+#endif
11956+
11957+#include <stdio.h>
11958+#include <stdlib.h>
11959+#include <string.h>
11960+
11961+/* Print an ASCII string with quotes and escape sequences where needed. */
11962+static void
11963+print_escaped (FILE *stream, const char *str)
11964+{
11965+ putc ('"', stream);
11966+ for (; *str != '\0'; str++)
11967+ if (*str == '\n')
11968+ {
11969+ fputs ("\\n\"", stream);
11970+ if (str[1] == '\0')
11971+ return;
11972+ fputs ("\n\"", stream);
11973+ }
11974+ else
11975+ {
11976+ if (*str == '"' || *str == '\\')
11977+ putc ('\\', stream);
11978+ putc (*str, stream);
11979+ }
11980+ putc ('"', stream);
11981+}
11982+
11983+/* Add to the log file an entry denoting a failed translation. */
11984+void
11985+_nl_log_untranslated (const char *logfilename, const char *domainname,
11986+ const char *msgid1, const char *msgid2, int plural)
11987+{
11988+ static char *last_logfilename = NULL;
11989+ static FILE *last_logfile = NULL;
11990+ FILE *logfile;
11991+
11992+ /* Can we reuse the last opened logfile? */
11993+ if (last_logfilename == NULL || strcmp (logfilename, last_logfilename) != 0)
11994+ {
11995+ /* Close the last used logfile. */
11996+ if (last_logfilename != NULL)
11997+ {
11998+ if (last_logfile != NULL)
11999+ {
12000+ fclose (last_logfile);
12001+ last_logfile = NULL;
12002+ }
12003+ free (last_logfilename);
12004+ last_logfilename = NULL;
12005+ }
12006+ /* Open the logfile. */
12007+ last_logfilename = (char *) malloc (strlen (logfilename) + 1);
12008+ if (last_logfilename == NULL)
12009+ return;
12010+ strcpy (last_logfilename, logfilename);
12011+ last_logfile = fopen (logfilename, "a");
12012+ if (last_logfile == NULL)
12013+ return;
12014+ }
12015+ logfile = last_logfile;
12016+
12017+ fprintf (logfile, "domain ");
12018+ print_escaped (logfile, domainname);
12019+ fprintf (logfile, "\nmsgid ");
12020+ print_escaped (logfile, msgid1);
12021+ if (plural)
12022+ {
12023+ fprintf (logfile, "\nmsgid_plural ");
12024+ print_escaped (logfile, msgid2);
12025+ fprintf (logfile, "\nmsgstr[0] \"\"\n");
12026+ }
12027+ else
12028+ fprintf (logfile, "\nmsgstr \"\"\n");
12029+ putc ('\n', logfile);
12030+}
12031--- lrzsz-0.12.20.safe/intl/Makefile.in 1998-04-26 09:22:35.000000000 -0400
12032+++ lrzsz-0.12.20/intl/Makefile.in 2004-09-12 14:40:34.521722856 -0400
12033@@ -1,19 +1,20 @@
12034-# Makefile for directory with message catalog handling in GNU NLS Utilities.
12035-# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
12036+# Makefile for directory with message catalog handling library of GNU gettext
12037+# Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
12038 #
12039-# This program is free software; you can redistribute it and/or modify
12040-# it under the terms of the GNU General Public License as published by
12041-# the Free Software Foundation; either version 2, or (at your option)
12042+# This program is free software; you can redistribute it and/or modify it
12043+# under the terms of the GNU Library General Public License as published
12044+# by the Free Software Foundation; either version 2, or (at your option)
12045 # any later version.
12046 #
12047 # This program is distributed in the hope that it will be useful,
12048 # but WITHOUT ANY WARRANTY; without even the implied warranty of
12049-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12050-# GNU General Public License for more details.
12051+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12052+# Library General Public License for more details.
12053 #
12054-# You should have received a copy of the GNU General Public License
12055-# along with this program; if not, write to the Free Software
12056-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
12057+# You should have received a copy of the GNU Library General Public
12058+# License along with this program; if not, write to the Free Software
12059+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12060+# USA.
12061
12062 PACKAGE = @PACKAGE@
12063 VERSION = @VERSION@
12064@@ -23,118 +24,341 @@
12065 srcdir = @srcdir@
12066 top_srcdir = @top_srcdir@
12067 top_builddir = ..
12068-VPATH = @srcdir@
12069+#VPATH = $(srcdir)
12070
12071 prefix = @prefix@
12072 exec_prefix = @exec_prefix@
12073 transform = @program_transform_name@
12074-libdir = $(exec_prefix)/lib
12075-includedir = $(prefix)/include
12076-datadir = $(prefix)/@DATADIRNAME@
12077+libdir = @libdir@
12078+includedir = @includedir@
12079+datadir = @datadir@
12080 localedir = $(datadir)/locale
12081-gnulocaledir = $(prefix)/share/locale
12082-gettextsrcdir = @datadir@/gettext/intl
12083-aliaspath = $(localedir):.
12084+gettextsrcdir = $(datadir)/gettext/intl
12085+aliaspath = $(localedir)
12086 subdir = intl
12087
12088 INSTALL = @INSTALL@
12089 INSTALL_DATA = @INSTALL_DATA@
12090 MKINSTALLDIRS = @MKINSTALLDIRS@
12091+mkinstalldirs = $(SHELL) $(MKINSTALLDIRS)
12092
12093-l = @l@
12094+l = @INTL_LIBTOOL_SUFFIX_PREFIX@
12095
12096 AR = ar
12097 CC = @CC@
12098 LIBTOOL = @LIBTOOL@
12099 RANLIB = @RANLIB@
12100+YACC = @INTLBISON@ -y -d
12101+YFLAGS = --name-prefix=__gettext
12102
12103-DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
12104--DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
12105+DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
12106+-DLIBDIR=\"$(libdir)\" -DIN_LIBINTL \
12107+-DENABLE_RELOCATABLE=1 -DIN_LIBRARY -DINSTALLDIR=\"$(libdir)\" -DNO_XMALLOC \
12108+-Dset_relocation_prefix=libintl_set_relocation_prefix \
12109+-Drelocate=libintl_relocate \
12110+-DDEPENDS_ON_LIBICONV=1 @DEFS@
12111 CPPFLAGS = @CPPFLAGS@
12112 CFLAGS = @CFLAGS@
12113 LDFLAGS = @LDFLAGS@
12114+LIBS = @LIBS@
12115
12116 COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
12117
12118-HEADERS = $(COMHDRS) libgettext.h loadinfo.h
12119-COMHDRS = gettext.h gettextP.h hash-string.h
12120-SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
12121-COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
12122-finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
12123-explodename.c
12124-OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
12125-finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
12126-explodename.$lo
12127-CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
12128-GETTOBJS = intl-compat.$lo
12129-DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
12130-xopen-msg.sed $(HEADERS) $(SOURCES)
12131+HEADERS = \
12132+ gmo.h \
12133+ gettextP.h \
12134+ hash-string.h \
12135+ loadinfo.h \
12136+ plural-exp.h \
12137+ eval-plural.h \
12138+ localcharset.h \
12139+ relocatable.h \
12140+ xsize.h \
12141+ printf-args.h printf-args.c \
12142+ printf-parse.h wprintf-parse.h printf-parse.c \
12143+ vasnprintf.h vasnwprintf.h vasnprintf.c \
12144+ os2compat.h \
12145+ libgnuintl.h.in
12146+SOURCES = \
12147+ bindtextdom.c \
12148+ dcgettext.c \
12149+ dgettext.c \
12150+ gettext.c \
12151+ finddomain.c \
12152+ loadmsgcat.c \
12153+ localealias.c \
12154+ textdomain.c \
12155+ l10nflist.c \
12156+ explodename.c \
12157+ dcigettext.c \
12158+ dcngettext.c \
12159+ dngettext.c \
12160+ ngettext.c \
12161+ plural.y \
12162+ plural-exp.c \
12163+ localcharset.c \
12164+ relocatable.c \
12165+ localename.c \
12166+ log.c \
12167+ printf.c \
12168+ osdep.c \
12169+ os2compat.c \
12170+ intl-compat.c
12171+OBJECTS = \
12172+ bindtextdom.$lo \
12173+ dcgettext.$lo \
12174+ dgettext.$lo \
12175+ gettext.$lo \
12176+ finddomain.$lo \
12177+ loadmsgcat.$lo \
12178+ localealias.$lo \
12179+ textdomain.$lo \
12180+ l10nflist.$lo \
12181+ explodename.$lo \
12182+ dcigettext.$lo \
12183+ dcngettext.$lo \
12184+ dngettext.$lo \
12185+ ngettext.$lo \
12186+ plural.$lo \
12187+ plural-exp.$lo \
12188+ localcharset.$lo \
12189+ relocatable.$lo \
12190+ localename.$lo \
12191+ log.$lo \
12192+ printf.$lo \
12193+ osdep.$lo \
12194+ intl-compat.$lo
12195+DISTFILES.common = Makefile.in \
12196+config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
12197+DISTFILES.generated = plural.c
12198 DISTFILES.normal = VERSION
12199-DISTFILES.gettext = libintl.glibc intlh.inst.in
12200+DISTFILES.gettext = COPYING.LIB-2.0 COPYING.LIB-2.1 libintl.glibc \
12201+libgnuintl.h_vms Makefile.vms \
12202+libgnuintl.h.msvc-static libgnuintl.h.msvc-shared README.woe32 Makefile.msvc
12203+DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c \
12204+COPYING.LIB-2 gettext.h libgettext.h plural-eval.c libgnuintl.h
12205+
12206+all: all-@USE_INCLUDED_LIBINTL@
12207+all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
12208+all-no: all-no-@BUILD_INCLUDED_LIBINTL@
12209+all-no-yes: libgnuintl.$la
12210+all-no-no:
12211+
12212+libintl.a libgnuintl.a: $(OBJECTS)
12213+ rm -f $@
12214+ $(AR) cru $@ $(OBJECTS)
12215+ $(RANLIB) $@
12216+
12217+libintl.la libgnuintl.la: $(OBJECTS)
12218+ $(LIBTOOL) --mode=link \
12219+ $(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
12220+ $(OBJECTS) @LTLIBICONV@ $(LIBS) -lc \
12221+ -version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
12222+ -rpath $(libdir) \
12223+ -no-undefined
12224+
12225+# Libtool's library version information for libintl.
12226+# Before making a gettext release, the gettext maintainer must change this
12227+# according to the libtool documentation, section "Library interface versions".
12228+# Maintainers of other packages that include the intl directory must *not*
12229+# change these values.
12230+LTV_CURRENT=7
12231+LTV_REVISION=0
12232+LTV_AGE=4
12233
12234 .SUFFIXES:
12235-.SUFFIXES: .c .o .lo
12236+.SUFFIXES: .c .y .o .lo .sin .sed
12237+
12238 .c.o:
12239 $(COMPILE) $<
12240-.c.lo:
12241- $(LIBTOOL) --mode=compile $(COMPILE) $<
12242
12243-INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
12244+.y.c:
12245+ $(YACC) $(YFLAGS) --output $@ $<
12246+ rm -f $*.h
12247
12248-all: all-@USE_INCLUDED_LIBINTL@
12249+bindtextdom.lo: $(srcdir)/bindtextdom.c
12250+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/bindtextdom.c
12251+dcgettext.lo: $(srcdir)/dcgettext.c
12252+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcgettext.c
12253+dgettext.lo: $(srcdir)/dgettext.c
12254+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dgettext.c
12255+gettext.lo: $(srcdir)/gettext.c
12256+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/gettext.c
12257+finddomain.lo: $(srcdir)/finddomain.c
12258+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/finddomain.c
12259+loadmsgcat.lo: $(srcdir)/loadmsgcat.c
12260+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/loadmsgcat.c
12261+localealias.lo: $(srcdir)/localealias.c
12262+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localealias.c
12263+textdomain.lo: $(srcdir)/textdomain.c
12264+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/textdomain.c
12265+l10nflist.lo: $(srcdir)/l10nflist.c
12266+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/l10nflist.c
12267+explodename.lo: $(srcdir)/explodename.c
12268+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/explodename.c
12269+dcigettext.lo: $(srcdir)/dcigettext.c
12270+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcigettext.c
12271+dcngettext.lo: $(srcdir)/dcngettext.c
12272+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dcngettext.c
12273+dngettext.lo: $(srcdir)/dngettext.c
12274+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/dngettext.c
12275+ngettext.lo: $(srcdir)/ngettext.c
12276+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/ngettext.c
12277+plural.lo: $(srcdir)/plural.c
12278+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural.c
12279+plural-exp.lo: $(srcdir)/plural-exp.c
12280+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/plural-exp.c
12281+localcharset.lo: $(srcdir)/localcharset.c
12282+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localcharset.c
12283+relocatable.lo: $(srcdir)/relocatable.c
12284+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/relocatable.c
12285+localename.lo: $(srcdir)/localename.c
12286+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/localename.c
12287+log.lo: $(srcdir)/log.c
12288+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/log.c
12289+printf.lo: $(srcdir)/printf.c
12290+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/printf.c
12291+osdep.lo: $(srcdir)/osdep.c
12292+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/osdep.c
12293+intl-compat.lo: $(srcdir)/intl-compat.c
12294+ $(LIBTOOL) --mode=compile $(COMPILE) $(srcdir)/intl-compat.c
12295
12296-all-yes: libintl.$la intlh.inst
12297-all-no:
12298+ref-add.sed: $(srcdir)/ref-add.sin
12299+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-add.sin > t-ref-add.sed
12300+ mv t-ref-add.sed ref-add.sed
12301+ref-del.sed: $(srcdir)/ref-del.sin
12302+ sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $(srcdir)/ref-del.sin > t-ref-del.sed
12303+ mv t-ref-del.sed ref-del.sed
12304
12305-libintl.a: $(OBJECTS)
12306- rm -f $@
12307- $(AR) cru $@ $(OBJECTS)
12308- $(RANLIB) $@
12309+INCLUDES = -I. -I$(srcdir) -I..
12310
12311-libintl.la: $(OBJECTS)
12312- $(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
12313- -version-info 1:0 -rpath $(libdir)
12314+libgnuintl.h: $(srcdir)/libgnuintl.h.in
12315+ sed -e 's,@''HAVE_POSIX_PRINTF''@,@HAVE_POSIX_PRINTF@,g' \
12316+ -e 's,@''HAVE_ASPRINTF''@,@HAVE_ASPRINTF@,g' \
12317+ -e 's,@''HAVE_SNPRINTF''@,@HAVE_SNPRINTF@,g' \
12318+ -e 's,@''HAVE_WPRINTF''@,@HAVE_WPRINTF@,g' \
12319+ < $(srcdir)/libgnuintl.h.in > libgnuintl.h
12320
12321-../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
12322- cd ../po && $(MAKE) cat-id-tbl.$lo
12323+libintl.h: libgnuintl.h
12324+ cp libgnuintl.h libintl.h
12325
12326-check: all
12327+charset.alias: $(srcdir)/config.charset
12328+ $(SHELL) $(srcdir)/config.charset '@host@' > t-$@
12329+ mv t-$@ $@
12330
12331-# This installation goal is only used in GNU gettext. Packages which
12332-# only use the library should use install instead.
12333+check: all
12334
12335 # We must not install the libintl.h/libintl.a files if we are on a
12336-# system which has the gettext() function in its C library or in a
12337-# separate library or use the catgets interface. A special case is
12338-# where configure found a previously installed GNU gettext library.
12339+# system which has the GNU gettext() function in its C library or in a
12340+# separate library.
12341 # If you want to use the one which comes with this version of the
12342 # package, you have to use `configure --with-included-gettext'.
12343 install: install-exec install-data
12344 install-exec: all
12345- if test "$(PACKAGE)" = "gettext" \
12346- && test '@INTLOBJS@' = '$(GETTOBJS)'; then \
12347- if test -r $(MKINSTALLDIRS); then \
12348- $(MKINSTALLDIRS) $(libdir) $(includedir); \
12349- else \
12350- $(top_srcdir)/mkinstalldirs $(libdir) $(includedir); \
12351+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12352+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12353+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12354+ $(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
12355+ $(LIBTOOL) --mode=install \
12356+ $(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
12357+ if test "@RELOCATABLE@" = yes; then \
12358+ dependencies=`sed -n -e 's,^dependency_libs=\(.*\),\1,p' < $(DESTDIR)$(libdir)/libintl.la | sed -e "s,^',," -e "s,'\$$,,"`; \
12359+ if test -n "$$dependencies"; then \
12360+ rm -f $(DESTDIR)$(libdir)/libintl.la; \
12361+ fi; \
12362 fi; \
12363- $(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
12364- $(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
12365 else \
12366 : ; \
12367 fi
12368-install-data: all
12369- if test "$(PACKAGE)" = "gettext"; then \
12370- if test -r $(MKINSTALLDIRS); then \
12371- $(MKINSTALLDIRS) $(gettextsrcdir); \
12372+ if test "$(PACKAGE)" = "gettext-tools" \
12373+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12374+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12375+ $(LIBTOOL) --mode=install \
12376+ $(INSTALL_DATA) libgnuintl.$la $(DESTDIR)$(libdir)/libgnuintl.$la; \
12377+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12378+ $(INSTALL_DATA) $(DESTDIR)$(libdir)/libgnuintl.so $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12379+ $(LIBTOOL) --mode=uninstall \
12380+ rm -f $(DESTDIR)$(libdir)/libgnuintl.$la; \
12381+ else \
12382+ : ; \
12383+ fi
12384+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12385+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12386+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12387+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12388+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12389+ orig=$(DESTDIR)$(libdir)/charset.alias; \
12390+ sed -f ref-add.sed $$orig > $$temp; \
12391+ $(INSTALL_DATA) $$temp $$dest; \
12392+ rm -f $$temp; \
12393 else \
12394- $(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
12395+ if test @GLIBC21@ = no; then \
12396+ orig=charset.alias; \
12397+ sed -f ref-add.sed $$orig > $$temp; \
12398+ $(INSTALL_DATA) $$temp $$dest; \
12399+ rm -f $$temp; \
12400+ fi; \
12401 fi; \
12402- $(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
12403- dists="$(DISTFILES.common)"; \
12404+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12405+ test -f $(DESTDIR)$(localedir)/locale.alias \
12406+ && orig=$(DESTDIR)$(localedir)/locale.alias \
12407+ || orig=$(srcdir)/locale.alias; \
12408+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12409+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12410+ sed -f ref-add.sed $$orig > $$temp; \
12411+ $(INSTALL_DATA) $$temp $$dest; \
12412+ rm -f $$temp; \
12413+ else \
12414+ : ; \
12415+ fi
12416+install-data: all
12417+ if test "$(PACKAGE)" = "gettext-tools"; then \
12418+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12419+ $(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
12420+ $(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
12421+ dists="COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common)"; \
12422 for file in $$dists; do \
12423- $(INSTALL_DATA) $(srcdir)/$$file $(gettextsrcdir)/$$file; \
12424+ $(INSTALL_DATA) $(srcdir)/$$file \
12425+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12426 done; \
12427+ chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
12428+ dists="$(DISTFILES.generated)"; \
12429+ for file in $$dists; do \
12430+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12431+ $(INSTALL_DATA) $$dir/$$file \
12432+ $(DESTDIR)$(gettextsrcdir)/$$file; \
12433+ done; \
12434+ dists="$(DISTFILES.obsolete)"; \
12435+ for file in $$dists; do \
12436+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12437+ done; \
12438+ else \
12439+ : ; \
12440+ fi
12441+
12442+install-strip: install
12443+
12444+installdirs:
12445+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12446+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12447+ $(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
12448+ else \
12449+ : ; \
12450+ fi
12451+ if test "$(PACKAGE)" = "gettext-tools" \
12452+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12453+ $(mkinstalldirs) $(DESTDIR)$(libdir); \
12454+ else \
12455+ : ; \
12456+ fi
12457+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12458+ test @GLIBC21@ != no || $(mkinstalldirs) $(DESTDIR)$(libdir); \
12459+ $(mkinstalldirs) $(DESTDIR)$(localedir); \
12460+ else \
12461+ : ; \
12462+ fi
12463+ if test "$(PACKAGE)" = "gettext-tools"; then \
12464+ $(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
12465 else \
12466 : ; \
12467 fi
12468@@ -143,22 +367,76 @@
12469 installcheck:
12470
12471 uninstall:
12472- dists="$(DISTFILES.common)"; \
12473- for file in $$dists; do \
12474- rm -f $(gettextsrcdir)/$$file; \
12475- done
12476+ if { test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; } \
12477+ && test '@USE_INCLUDED_LIBINTL@' = yes; then \
12478+ rm -f $(DESTDIR)$(includedir)/libintl.h; \
12479+ $(LIBTOOL) --mode=uninstall \
12480+ rm -f $(DESTDIR)$(libdir)/libintl.$la; \
12481+ else \
12482+ : ; \
12483+ fi
12484+ if test "$(PACKAGE)" = "gettext-tools" \
12485+ && test '@USE_INCLUDED_LIBINTL@' = no; then \
12486+ rm -f $(DESTDIR)$(libdir)/preloadable_libintl.so; \
12487+ else \
12488+ : ; \
12489+ fi
12490+ if test '@USE_INCLUDED_LIBINTL@' = yes; then \
12491+ if test -f $(DESTDIR)$(libdir)/charset.alias; then \
12492+ temp=$(DESTDIR)$(libdir)/t-charset.alias; \
12493+ dest=$(DESTDIR)$(libdir)/charset.alias; \
12494+ sed -f ref-del.sed $$dest > $$temp; \
12495+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12496+ rm -f $$dest; \
12497+ else \
12498+ $(INSTALL_DATA) $$temp $$dest; \
12499+ fi; \
12500+ rm -f $$temp; \
12501+ fi; \
12502+ if test -f $(DESTDIR)$(localedir)/locale.alias; then \
12503+ temp=$(DESTDIR)$(localedir)/t-locale.alias; \
12504+ dest=$(DESTDIR)$(localedir)/locale.alias; \
12505+ sed -f ref-del.sed $$dest > $$temp; \
12506+ if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
12507+ rm -f $$dest; \
12508+ else \
12509+ $(INSTALL_DATA) $$temp $$dest; \
12510+ fi; \
12511+ rm -f $$temp; \
12512+ fi; \
12513+ else \
12514+ : ; \
12515+ fi
12516+ if test "$(PACKAGE)" = "gettext-tools"; then \
12517+ for file in VERSION ChangeLog COPYING.LIB-2.0 COPYING.LIB-2.1 $(DISTFILES.common) $(DISTFILES.generated); do \
12518+ rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
12519+ done; \
12520+ else \
12521+ : ; \
12522+ fi
12523
12524-info dvi:
12525+info dvi ps pdf html:
12526
12527-$(OBJECTS): ../config.h libgettext.h
12528-bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
12529-dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
12530+$(OBJECTS): ../config.h libgnuintl.h
12531+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
12532+dcigettext.$lo loadmsgcat.$lo: $(srcdir)/hash-string.h
12533+explodename.$lo l10nflist.$lo: $(srcdir)/loadinfo.h
12534+dcigettext.$lo loadmsgcat.$lo plural.$lo plural-exp.$lo: $(srcdir)/plural-exp.h
12535+dcigettext.$lo: $(srcdir)/eval-plural.h
12536+localcharset.$lo: $(srcdir)/localcharset.h
12537+localealias.$lo localcharset.$lo relocatable.$lo: $(srcdir)/relocatable.h
12538+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
12539
12540 tags: TAGS
12541
12542 TAGS: $(HEADERS) $(SOURCES)
12543 here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
12544
12545+ctags: CTAGS
12546+
12547+CTAGS: $(HEADERS) $(SOURCES)
12548+ here=`pwd`; cd $(srcdir) && ctags -o $$here/CTAGS $(HEADERS) $(SOURCES)
12549+
12550 id: ID
12551
12552 ID: $(HEADERS) $(SOURCES)
12553@@ -166,12 +444,19 @@
12554
12555
12556 mostlyclean:
12557- rm -f *.a *.o *.lo core core.*
12558+ rm -f *.a *.la *.o *.obj *.lo core core.*
12559+ rm -f libgnuintl.h libintl.h charset.alias ref-add.sed ref-del.sed
12560+ rm -f -r .libs _libs
12561
12562 clean: mostlyclean
12563
12564 distclean: clean
12565- rm -f Makefile ID TAGS po2msg.sed po2tbl.sed libintl.h
12566+ rm -f Makefile ID TAGS
12567+ if test "$(PACKAGE)" = "gettext-runtime" || test "$(PACKAGE)" = "gettext-tools"; then \
12568+ rm -f ChangeLog.inst $(DISTFILES.normal); \
12569+ else \
12570+ : ; \
12571+ fi
12572
12573 maintainer-clean: distclean
12574 @echo "This command is intended for maintainers to use;"
12575@@ -181,33 +466,27 @@
12576 # GNU gettext needs not contain the file `VERSION' but contains some
12577 # other files which should not be distributed in other packages.
12578 distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
12579-dist distdir: Makefile $(DISTFILES)
12580- if test "$(PACKAGE)" = gettext; then \
12581- additional="$(DISTFILES.gettext)"; \
12582+dist distdir: Makefile
12583+ if test "$(PACKAGE)" = "gettext-tools"; then \
12584+ : ; \
12585 else \
12586- additional="$(DISTFILES.normal)"; \
12587- fi; \
12588- for file in $(DISTFILES.common) $$additional; do \
12589- ln $(srcdir)/$$file $(distdir) 2> /dev/null \
12590- || cp -p $(srcdir)/$$file $(distdir); \
12591- done
12592-
12593-dist-libc:
12594- tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
12595-
12596-Makefile: Makefile.in ../config.status
12597- cd .. \
12598- && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12599+ if test "$(PACKAGE)" = "gettext-runtime"; then \
12600+ additional="$(DISTFILES.gettext)"; \
12601+ else \
12602+ additional="$(DISTFILES.normal)"; \
12603+ fi; \
12604+ $(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
12605+ for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
12606+ if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
12607+ cp -p $$dir/$$file $(distdir); \
12608+ done; \
12609+ fi
12610
12611-# The dependency for intlh.inst is different in gettext and all other
12612-# packages. Because we cannot you GNU make features we have to solve
12613-# the problem while rewriting Makefile.in.
12614-@GT_YES@intlh.inst: intlh.inst.in ../config.status
12615-@GT_YES@ cd .. \
12616-@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
12617-@GT_YES@ $(SHELL) ./config.status
12618-@GT_NO@.PHONY: intlh.inst
12619-@GT_NO@intlh.inst:
12620+Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status
12621+ cd $(top_builddir) && $(SHELL) ./config.status
12622+# This would be more efficient, but doesn't work any more with autoconf-2.57,
12623+# when AC_CONFIG_FILES([intl/Makefile:somedir/Makefile.in]) is used.
12624+# cd $(top_builddir) && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
12625
12626 # Tell versions [3.59,3.63) of GNU make not to export all variables.
12627 # Otherwise a system limit (for SysV at least) may be exceeded.
12628--- lrzsz-0.12.20.safe/intl/ngettext.c 1969-12-31 19:00:00.000000000 -0500
12629+++ lrzsz-0.12.20/intl/ngettext.c 2004-09-12 14:40:34.533721032 -0400
12630@@ -0,0 +1,65 @@
12631+/* Implementation of ngettext(3) function.
12632+ Copyright (C) 1995, 1997, 2000-2003 Free Software Foundation, Inc.
12633+
12634+ This program is free software; you can redistribute it and/or modify it
12635+ under the terms of the GNU Library General Public License as published
12636+ by the Free Software Foundation; either version 2, or (at your option)
12637+ any later version.
12638+
12639+ This program is distributed in the hope that it will be useful,
12640+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12641+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12642+ Library General Public License for more details.
12643+
12644+ You should have received a copy of the GNU Library General Public
12645+ License along with this program; if not, write to the Free Software
12646+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12647+ USA. */
12648+
12649+#ifdef HAVE_CONFIG_H
12650+# include <config.h>
12651+#endif
12652+
12653+#ifdef _LIBC
12654+# define __need_NULL
12655+# include <stddef.h>
12656+#else
12657+# include <stdlib.h> /* Just for NULL. */
12658+#endif
12659+
12660+#include "gettextP.h"
12661+#ifdef _LIBC
12662+# include <libintl.h>
12663+#else
12664+# include "libgnuintl.h"
12665+#endif
12666+
12667+#include <locale.h>
12668+
12669+/* @@ end of prolog @@ */
12670+
12671+/* Names for the libintl functions are a problem. They must not clash
12672+ with existing names and they should follow ANSI C. But this source
12673+ code is also used in GNU C Library where the names have a __
12674+ prefix. So we have to make a difference here. */
12675+#ifdef _LIBC
12676+# define NGETTEXT __ngettext
12677+# define DCNGETTEXT __dcngettext
12678+#else
12679+# define NGETTEXT libintl_ngettext
12680+# define DCNGETTEXT libintl_dcngettext
12681+#endif
12682+
12683+/* Look up MSGID in the current default message catalog for the current
12684+ LC_MESSAGES locale. If not found, returns MSGID itself (the default
12685+ text). */
12686+char *
12687+NGETTEXT (const char *msgid1, const char *msgid2, unsigned long int n)
12688+{
12689+ return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
12690+}
12691+
12692+#ifdef _LIBC
12693+/* Alias for function name in GNU C Library. */
12694+weak_alias (__ngettext, ngettext);
12695+#endif
12696--- lrzsz-0.12.20.safe/intl/os2compat.c 1969-12-31 19:00:00.000000000 -0500
12697+++ lrzsz-0.12.20/intl/os2compat.c 2004-09-12 14:40:34.539720120 -0400
12698@@ -0,0 +1,98 @@
12699+/* OS/2 compatibility functions.
12700+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12701+
12702+ This program is free software; you can redistribute it and/or modify it
12703+ under the terms of the GNU Library General Public License as published
12704+ by the Free Software Foundation; either version 2, or (at your option)
12705+ any later version.
12706+
12707+ This program is distributed in the hope that it will be useful,
12708+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12709+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12710+ Library General Public License for more details.
12711+
12712+ You should have received a copy of the GNU Library General Public
12713+ License along with this program; if not, write to the Free Software
12714+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12715+ USA. */
12716+
12717+#define OS2_AWARE
12718+#ifdef HAVE_CONFIG_H
12719+#include <config.h>
12720+#endif
12721+
12722+#include <stdlib.h>
12723+#include <string.h>
12724+#include <sys/param.h>
12725+
12726+/* A version of getenv() that works from DLLs */
12727+extern unsigned long DosScanEnv (const unsigned char *pszName, unsigned char **ppszValue);
12728+
12729+char *
12730+_nl_getenv (const char *name)
12731+{
12732+ unsigned char *value;
12733+ if (DosScanEnv (name, &value))
12734+ return NULL;
12735+ else
12736+ return value;
12737+}
12738+
12739+/* A fixed size buffer. */
12740+char libintl_nl_default_dirname[MAXPATHLEN+1];
12741+
12742+char *_nlos2_libdir = NULL;
12743+char *_nlos2_localealiaspath = NULL;
12744+char *_nlos2_localedir = NULL;
12745+
12746+static __attribute__((constructor)) void
12747+nlos2_initialize ()
12748+{
12749+ char *root = getenv ("UNIXROOT");
12750+ char *gnulocaledir = getenv ("GNULOCALEDIR");
12751+
12752+ _nlos2_libdir = gnulocaledir;
12753+ if (!_nlos2_libdir)
12754+ {
12755+ if (root)
12756+ {
12757+ size_t sl = strlen (root);
12758+ _nlos2_libdir = (char *) malloc (sl + strlen (LIBDIR) + 1);
12759+ memcpy (_nlos2_libdir, root, sl);
12760+ memcpy (_nlos2_libdir + sl, LIBDIR, strlen (LIBDIR) + 1);
12761+ }
12762+ else
12763+ _nlos2_libdir = LIBDIR;
12764+ }
12765+
12766+ _nlos2_localealiaspath = gnulocaledir;
12767+ if (!_nlos2_localealiaspath)
12768+ {
12769+ if (root)
12770+ {
12771+ size_t sl = strlen (root);
12772+ _nlos2_localealiaspath = (char *) malloc (sl + strlen (LOCALE_ALIAS_PATH) + 1);
12773+ memcpy (_nlos2_localealiaspath, root, sl);
12774+ memcpy (_nlos2_localealiaspath + sl, LOCALE_ALIAS_PATH, strlen (LOCALE_ALIAS_PATH) + 1);
12775+ }
12776+ else
12777+ _nlos2_localealiaspath = LOCALE_ALIAS_PATH;
12778+ }
12779+
12780+ _nlos2_localedir = gnulocaledir;
12781+ if (!_nlos2_localedir)
12782+ {
12783+ if (root)
12784+ {
12785+ size_t sl = strlen (root);
12786+ _nlos2_localedir = (char *) malloc (sl + strlen (LOCALEDIR) + 1);
12787+ memcpy (_nlos2_localedir, root, sl);
12788+ memcpy (_nlos2_localedir + sl, LOCALEDIR, strlen (LOCALEDIR) + 1);
12789+ }
12790+ else
12791+ _nlos2_localedir = LOCALEDIR;
12792+ }
12793+
12794+ if (strlen (_nlos2_localedir) <= MAXPATHLEN)
12795+ strcpy (libintl_nl_default_dirname, _nlos2_localedir);
12796+}
12797--- lrzsz-0.12.20.safe/intl/os2compat.h 1969-12-31 19:00:00.000000000 -0500
12798+++ lrzsz-0.12.20/intl/os2compat.h 2004-09-12 14:40:34.544719360 -0400
12799@@ -0,0 +1,46 @@
12800+/* OS/2 compatibility defines.
12801+ This file is intended to be included from config.h
12802+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12803+
12804+ This program is free software; you can redistribute it and/or modify it
12805+ under the terms of the GNU Library General Public License as published
12806+ by the Free Software Foundation; either version 2, or (at your option)
12807+ any later version.
12808+
12809+ This program is distributed in the hope that it will be useful,
12810+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12811+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12812+ Library General Public License for more details.
12813+
12814+ You should have received a copy of the GNU Library General Public
12815+ License along with this program; if not, write to the Free Software
12816+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12817+ USA. */
12818+
12819+/* When included from os2compat.h we need all the original definitions */
12820+#ifndef OS2_AWARE
12821+
12822+#undef LIBDIR
12823+#define LIBDIR _nlos2_libdir
12824+extern char *_nlos2_libdir;
12825+
12826+#undef LOCALEDIR
12827+#define LOCALEDIR _nlos2_localedir
12828+extern char *_nlos2_localedir;
12829+
12830+#undef LOCALE_ALIAS_PATH
12831+#define LOCALE_ALIAS_PATH _nlos2_localealiaspath
12832+extern char *_nlos2_localealiaspath;
12833+
12834+#endif
12835+
12836+#undef HAVE_STRCASECMP
12837+#define HAVE_STRCASECMP 1
12838+#define strcasecmp stricmp
12839+#define strncasecmp strnicmp
12840+
12841+/* We have our own getenv() which works even if library is compiled as DLL */
12842+#define getenv _nl_getenv
12843+
12844+/* Older versions of gettext used -1 as the value of LC_MESSAGES */
12845+#define LC_MESSAGES_COMPAT (-1)
12846--- lrzsz-0.12.20.safe/intl/osdep.c 1969-12-31 19:00:00.000000000 -0500
12847+++ lrzsz-0.12.20/intl/osdep.c 2004-09-12 14:40:34.550718448 -0400
12848@@ -0,0 +1,24 @@
12849+/* OS dependent parts of libintl.
12850+ Copyright (C) 2001-2002 Free Software Foundation, Inc.
12851+
12852+ This program is free software; you can redistribute it and/or modify it
12853+ under the terms of the GNU Library General Public License as published
12854+ by the Free Software Foundation; either version 2, or (at your option)
12855+ any later version.
12856+
12857+ This program is distributed in the hope that it will be useful,
12858+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12859+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12860+ Library General Public License for more details.
12861+
12862+ You should have received a copy of the GNU Library General Public
12863+ License along with this program; if not, write to the Free Software
12864+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12865+ USA. */
12866+
12867+#if defined __EMX__
12868+# include "os2compat.c"
12869+#else
12870+/* Avoid AIX compiler warning. */
12871+typedef int dummy;
12872+#endif
12873--- lrzsz-0.12.20.safe/intl/plural.c 1969-12-31 19:00:00.000000000 -0500
12874+++ lrzsz-0.12.20/intl/plural.c 2004-09-12 14:40:36.571411256 -0400
12875@@ -0,0 +1,1490 @@
12876+/* A Bison parser, made from plural.y
12877+ by GNU bison 1.35. */
12878+
12879+#define YYBISON 1 /* Identify Bison output. */
12880+
12881+#define yyparse __gettextparse
12882+#define yylex __gettextlex
12883+#define yyerror __gettexterror
12884+#define yylval __gettextlval
12885+#define yychar __gettextchar
12886+#define yydebug __gettextdebug
12887+#define yynerrs __gettextnerrs
12888+# define EQUOP2 257
12889+# define CMPOP2 258
12890+# define ADDOP2 259
12891+# define MULOP2 260
12892+# define NUMBER 261
12893+
12894+#line 1 "plural.y"
12895+
12896+/* Expression parsing for plural form selection.
12897+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
12898+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
12899+
12900+ This program is free software; you can redistribute it and/or modify it
12901+ under the terms of the GNU Library General Public License as published
12902+ by the Free Software Foundation; either version 2, or (at your option)
12903+ any later version.
12904+
12905+ This program is distributed in the hope that it will be useful,
12906+ but WITHOUT ANY WARRANTY; without even the implied warranty of
12907+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12908+ Library General Public License for more details.
12909+
12910+ You should have received a copy of the GNU Library General Public
12911+ License along with this program; if not, write to the Free Software
12912+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
12913+ USA. */
12914+
12915+/* The bison generated parser uses alloca. AIX 3 forces us to put this
12916+ declaration at the beginning of the file. The declaration in bison's
12917+ skeleton file comes too late. This must come before <config.h>
12918+ because <config.h> may include arbitrary system headers. */
12919+#if defined _AIX && !defined __GNUC__
12920+ #pragma alloca
12921+#endif
12922+
12923+#ifdef HAVE_CONFIG_H
12924+# include <config.h>
12925+#endif
12926+
12927+#include <stddef.h>
12928+#include <stdlib.h>
12929+#include "plural-exp.h"
12930+
12931+/* The main function generated by the parser is called __gettextparse,
12932+ but we want it to be called PLURAL_PARSE. */
12933+#ifndef _LIBC
12934+# define __gettextparse PLURAL_PARSE
12935+#endif
12936+
12937+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
12938+#define YYPARSE_PARAM arg
12939+
12940+#line 49 "plural.y"
12941+#ifndef YYSTYPE
12942+typedef union {
12943+ unsigned long int num;
12944+ enum operator op;
12945+ struct expression *exp;
12946+} yystype;
12947+# define YYSTYPE yystype
12948+# define YYSTYPE_IS_TRIVIAL 1
12949+#endif
12950+#line 55 "plural.y"
12951+
12952+/* Prototypes for local functions. */
12953+static int yylex (YYSTYPE *lval, const char **pexp);
12954+static void yyerror (const char *str);
12955+
12956+/* Allocation of expressions. */
12957+
12958+static struct expression *
12959+new_exp (int nargs, enum operator op, struct expression * const *args)
12960+{
12961+ int i;
12962+ struct expression *newp;
12963+
12964+ /* If any of the argument could not be malloc'ed, just return NULL. */
12965+ for (i = nargs - 1; i >= 0; i--)
12966+ if (args[i] == NULL)
12967+ goto fail;
12968+
12969+ /* Allocate a new expression. */
12970+ newp = (struct expression *) malloc (sizeof (*newp));
12971+ if (newp != NULL)
12972+ {
12973+ newp->nargs = nargs;
12974+ newp->operation = op;
12975+ for (i = nargs - 1; i >= 0; i--)
12976+ newp->val.args[i] = args[i];
12977+ return newp;
12978+ }
12979+
12980+ fail:
12981+ for (i = nargs - 1; i >= 0; i--)
12982+ FREE_EXPRESSION (args[i]);
12983+
12984+ return NULL;
12985+}
12986+
12987+static inline struct expression *
12988+new_exp_0 (enum operator op)
12989+{
12990+ return new_exp (0, op, NULL);
12991+}
12992+
12993+static inline struct expression *
12994+new_exp_1 (enum operator op, struct expression *right)
12995+{
12996+ struct expression *args[1];
12997+
12998+ args[0] = right;
12999+ return new_exp (1, op, args);
13000+}
13001+
13002+static struct expression *
13003+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
13004+{
13005+ struct expression *args[2];
13006+
13007+ args[0] = left;
13008+ args[1] = right;
13009+ return new_exp (2, op, args);
13010+}
13011+
13012+static inline struct expression *
13013+new_exp_3 (enum operator op, struct expression *bexp,
13014+ struct expression *tbranch, struct expression *fbranch)
13015+{
13016+ struct expression *args[3];
13017+
13018+ args[0] = bexp;
13019+ args[1] = tbranch;
13020+ args[2] = fbranch;
13021+ return new_exp (3, op, args);
13022+}
13023+
13024+#ifndef YYDEBUG
13025+# define YYDEBUG 0
13026+#endif
13027+
13028+
13029+
13030+#define YYFINAL 27
13031+#define YYFLAG -32768
13032+#define YYNTBASE 16
13033+
13034+/* YYTRANSLATE(YYLEX) -- Bison token number corresponding to YYLEX. */
13035+#define YYTRANSLATE(x) ((unsigned)(x) <= 261 ? yytranslate[x] : 18)
13036+
13037+/* YYTRANSLATE[YYLEX] -- Bison token number corresponding to YYLEX. */
13038+static const char yytranslate[] =
13039+{
13040+ 0, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13041+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13042+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13043+ 2, 2, 2, 10, 2, 2, 2, 2, 5, 2,
13044+ 14, 15, 2, 2, 2, 2, 2, 2, 2, 2,
13045+ 2, 2, 2, 2, 2, 2, 2, 2, 12, 2,
13046+ 2, 2, 2, 3, 2, 2, 2, 2, 2, 2,
13047+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13048+ 2, 2, 2, 2, 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+ 13, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13052+ 2, 2, 2, 2, 4, 2, 2, 2, 2, 2,
13053+ 2, 2, 2, 2, 2, 2, 2, 2, 2, 2,
13054+ 2, 2, 2, 2, 2, 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, 1, 6, 7, 8,
13066+ 9, 11
13067+};
13068+
13069+#if YYDEBUG
13070+static const short yyprhs[] =
13071+{
13072+ 0, 0, 2, 8, 12, 16, 20, 24, 28, 32,
13073+ 35, 37, 39
13074+};
13075+static const short yyrhs[] =
13076+{
13077+ 17, 0, 17, 3, 17, 12, 17, 0, 17, 4,
13078+ 17, 0, 17, 5, 17, 0, 17, 6, 17, 0,
13079+ 17, 7, 17, 0, 17, 8, 17, 0, 17, 9,
13080+ 17, 0, 10, 17, 0, 13, 0, 11, 0, 14,
13081+ 17, 15, 0
13082+};
13083+
13084+#endif
13085+
13086+#if YYDEBUG
13087+/* YYRLINE[YYN] -- source line where rule number YYN was defined. */
13088+static const short yyrline[] =
13089+{
13090+ 0, 150, 158, 162, 166, 170, 174, 178, 182, 186,
13091+ 190, 194, 199
13092+};
13093+#endif
13094+
13095+
13096+#if (YYDEBUG) || defined YYERROR_VERBOSE
13097+
13098+/* YYTNAME[TOKEN_NUM] -- String name of the token TOKEN_NUM. */
13099+static const char *const yytname[] =
13100+{
13101+ "$", "error", "$undefined.", "'?'", "'|'", "'&'", "EQUOP2", "CMPOP2",
13102+ "ADDOP2", "MULOP2", "'!'", "NUMBER", "':'", "'n'", "'('", "')'",
13103+ "start", "exp", 0
13104+};
13105+#endif
13106+
13107+/* YYR1[YYN] -- Symbol number of symbol that rule YYN derives. */
13108+static const short yyr1[] =
13109+{
13110+ 0, 16, 17, 17, 17, 17, 17, 17, 17, 17,
13111+ 17, 17, 17
13112+};
13113+
13114+/* YYR2[YYN] -- Number of symbols composing right hand side of rule YYN. */
13115+static const short yyr2[] =
13116+{
13117+ 0, 1, 5, 3, 3, 3, 3, 3, 3, 2,
13118+ 1, 1, 3
13119+};
13120+
13121+/* YYDEFACT[S] -- default rule to reduce with in state S when YYTABLE
13122+ doesn't specify something else to do. Zero means the default is an
13123+ error. */
13124+static const short yydefact[] =
13125+{
13126+ 0, 0, 11, 10, 0, 1, 9, 0, 0, 0,
13127+ 0, 0, 0, 0, 0, 12, 0, 3, 4, 5,
13128+ 6, 7, 8, 0, 2, 0, 0, 0
13129+};
13130+
13131+static const short yydefgoto[] =
13132+{
13133+ 25, 5
13134+};
13135+
13136+static const short yypact[] =
13137+{
13138+ -9, -9,-32768,-32768, -9, 34,-32768, 11, -9, -9,
13139+ -9, -9, -9, -9, -9,-32768, 24, 39, 43, 16,
13140+ 26, -3,-32768, -9, 34, 21, 53,-32768
13141+};
13142+
13143+static const short yypgoto[] =
13144+{
13145+ -32768, -1
13146+};
13147+
13148+
13149+#define YYLAST 53
13150+
13151+
13152+static const short yytable[] =
13153+{
13154+ 6, 1, 2, 7, 3, 4, 14, 16, 17, 18,
13155+ 19, 20, 21, 22, 8, 9, 10, 11, 12, 13,
13156+ 14, 26, 24, 12, 13, 14, 15, 8, 9, 10,
13157+ 11, 12, 13, 14, 13, 14, 23, 8, 9, 10,
13158+ 11, 12, 13, 14, 10, 11, 12, 13, 14, 11,
13159+ 12, 13, 14, 27
13160+};
13161+
13162+static const short yycheck[] =
13163+{
13164+ 1, 10, 11, 4, 13, 14, 9, 8, 9, 10,
13165+ 11, 12, 13, 14, 3, 4, 5, 6, 7, 8,
13166+ 9, 0, 23, 7, 8, 9, 15, 3, 4, 5,
13167+ 6, 7, 8, 9, 8, 9, 12, 3, 4, 5,
13168+ 6, 7, 8, 9, 5, 6, 7, 8, 9, 6,
13169+ 7, 8, 9, 0
13170+};
13171+#define YYPURE 1
13172+
13173+/* -*-C-*- Note some compilers choke on comments on `#line' lines. */
13174+#line 3 "/usr/local/share/bison/bison.simple"
13175+
13176+/* Skeleton output parser for bison,
13177+
13178+ Copyright (C) 1984, 1989, 1990, 2000, 2001, 2002 Free Software
13179+ Foundation, Inc.
13180+
13181+ This program is free software; you can redistribute it and/or modify
13182+ it under the terms of the GNU General Public License as published by
13183+ the Free Software Foundation; either version 2, or (at your option)
13184+ any later version.
13185+
13186+ This program is distributed in the hope that it will be useful,
13187+ but WITHOUT ANY WARRANTY; without even the implied warranty of
13188+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13189+ GNU General Public License for more details.
13190+
13191+ You should have received a copy of the GNU General Public License
13192+ along with this program; if not, write to the Free Software
13193+ Foundation, Inc., 59 Temple Place - Suite 330,
13194+ Boston, MA 02111-1307, USA. */
13195+
13196+/* As a special exception, when this file is copied by Bison into a
13197+ Bison output file, you may use that output file without restriction.
13198+ This special exception was added by the Free Software Foundation
13199+ in version 1.24 of Bison. */
13200+
13201+/* This is the parser code that is written into each bison parser when
13202+ the %semantic_parser declaration is not specified in the grammar.
13203+ It was written by Richard Stallman by simplifying the hairy parser
13204+ used when %semantic_parser is specified. */
13205+
13206+/* All symbols defined below should begin with yy or YY, to avoid
13207+ infringing on user name space. This should be done even for local
13208+ variables, as they might otherwise be expanded by user macros.
13209+ There are some unavoidable exceptions within include files to
13210+ define necessary library symbols; they are noted "INFRINGES ON
13211+ USER NAME SPACE" below. */
13212+
13213+#if ! defined (yyoverflow) || defined (YYERROR_VERBOSE)
13214+
13215+/* The parser invokes alloca or malloc; define the necessary symbols. */
13216+
13217+# if YYSTACK_USE_ALLOCA
13218+# define YYSTACK_ALLOC alloca
13219+# else
13220+# ifndef YYSTACK_USE_ALLOCA
13221+# if defined (alloca) || defined (_ALLOCA_H)
13222+# define YYSTACK_ALLOC alloca
13223+# else
13224+# ifdef __GNUC__
13225+# define YYSTACK_ALLOC __builtin_alloca
13226+# endif
13227+# endif
13228+# endif
13229+# endif
13230+
13231+# ifdef YYSTACK_ALLOC
13232+ /* Pacify GCC's `empty if-body' warning. */
13233+# define YYSTACK_FREE(Ptr) do { /* empty */; } while (0)
13234+# else
13235+# if defined (__STDC__) || defined (__cplusplus)
13236+# include <stdlib.h> /* INFRINGES ON USER NAME SPACE */
13237+# define YYSIZE_T size_t
13238+# endif
13239+# define YYSTACK_ALLOC malloc
13240+# define YYSTACK_FREE free
13241+# endif
13242+#endif /* ! defined (yyoverflow) || defined (YYERROR_VERBOSE) */
13243+
13244+
13245+#if (! defined (yyoverflow) \
13246+ && (! defined (__cplusplus) \
13247+ || (YYLTYPE_IS_TRIVIAL && YYSTYPE_IS_TRIVIAL)))
13248+
13249+/* A type that is properly aligned for any stack member. */
13250+union yyalloc
13251+{
13252+ short yyss;
13253+ YYSTYPE yyvs;
13254+# if YYLSP_NEEDED
13255+ YYLTYPE yyls;
13256+# endif
13257+};
13258+
13259+/* The size of the maximum gap between one aligned stack and the next. */
13260+# define YYSTACK_GAP_MAX (sizeof (union yyalloc) - 1)
13261+
13262+/* The size of an array large to enough to hold all stacks, each with
13263+ N elements. */
13264+# if YYLSP_NEEDED
13265+# define YYSTACK_BYTES(N) \
13266+ ((N) * (sizeof (short) + sizeof (YYSTYPE) + sizeof (YYLTYPE)) \
13267+ + 2 * YYSTACK_GAP_MAX)
13268+# else
13269+# define YYSTACK_BYTES(N) \
13270+ ((N) * (sizeof (short) + sizeof (YYSTYPE)) \
13271+ + YYSTACK_GAP_MAX)
13272+# endif
13273+
13274+/* Copy COUNT objects from FROM to TO. The source and destination do
13275+ not overlap. */
13276+# ifndef YYCOPY
13277+# if 1 < __GNUC__
13278+# define YYCOPY(To, From, Count) \
13279+ __builtin_memcpy (To, From, (Count) * sizeof (*(From)))
13280+# else
13281+# define YYCOPY(To, From, Count) \
13282+ do \
13283+ { \
13284+ register YYSIZE_T yyi; \
13285+ for (yyi = 0; yyi < (Count); yyi++) \
13286+ (To)[yyi] = (From)[yyi]; \
13287+ } \
13288+ while (0)
13289+# endif
13290+# endif
13291+
13292+/* Relocate STACK from its old location to the new one. The
13293+ local variables YYSIZE and YYSTACKSIZE give the old and new number of
13294+ elements in the stack, and YYPTR gives the new location of the
13295+ stack. Advance YYPTR to a properly aligned location for the next
13296+ stack. */
13297+# define YYSTACK_RELOCATE(Stack) \
13298+ do \
13299+ { \
13300+ YYSIZE_T yynewbytes; \
13301+ YYCOPY (&yyptr->Stack, Stack, yysize); \
13302+ Stack = &yyptr->Stack; \
13303+ yynewbytes = yystacksize * sizeof (*Stack) + YYSTACK_GAP_MAX; \
13304+ yyptr += yynewbytes / sizeof (*yyptr); \
13305+ } \
13306+ while (0)
13307+
13308+#endif
13309+
13310+
13311+#if ! defined (YYSIZE_T) && defined (__SIZE_TYPE__)
13312+# define YYSIZE_T __SIZE_TYPE__
13313+#endif
13314+#if ! defined (YYSIZE_T) && defined (size_t)
13315+# define YYSIZE_T size_t
13316+#endif
13317+#if ! defined (YYSIZE_T)
13318+# if defined (__STDC__) || defined (__cplusplus)
13319+# include <stddef.h> /* INFRINGES ON USER NAME SPACE */
13320+# define YYSIZE_T size_t
13321+# endif
13322+#endif
13323+#if ! defined (YYSIZE_T)
13324+# define YYSIZE_T unsigned int
13325+#endif
13326+
13327+#define yyerrok (yyerrstatus = 0)
13328+#define yyclearin (yychar = YYEMPTY)
13329+#define YYEMPTY -2
13330+#define YYEOF 0
13331+#define YYACCEPT goto yyacceptlab
13332+#define YYABORT goto yyabortlab
13333+#define YYERROR goto yyerrlab1
13334+/* Like YYERROR except do call yyerror. This remains here temporarily
13335+ to ease the transition to the new meaning of YYERROR, for GCC.
13336+ Once GCC version 2 has supplanted version 1, this can go. */
13337+#define YYFAIL goto yyerrlab
13338+#define YYRECOVERING() (!!yyerrstatus)
13339+#define YYBACKUP(Token, Value) \
13340+do \
13341+ if (yychar == YYEMPTY && yylen == 1) \
13342+ { \
13343+ yychar = (Token); \
13344+ yylval = (Value); \
13345+ yychar1 = YYTRANSLATE (yychar); \
13346+ YYPOPSTACK; \
13347+ goto yybackup; \
13348+ } \
13349+ else \
13350+ { \
13351+ yyerror ("syntax error: cannot back up"); \
13352+ YYERROR; \
13353+ } \
13354+while (0)
13355+
13356+#define YYTERROR 1
13357+#define YYERRCODE 256
13358+
13359+
13360+/* YYLLOC_DEFAULT -- Compute the default location (before the actions
13361+ are run).
13362+
13363+ When YYLLOC_DEFAULT is run, CURRENT is set the location of the
13364+ first token. By default, to implement support for ranges, extend
13365+ its range to the last symbol. */
13366+
13367+#ifndef YYLLOC_DEFAULT
13368+# define YYLLOC_DEFAULT(Current, Rhs, N) \
13369+ Current.last_line = Rhs[N].last_line; \
13370+ Current.last_column = Rhs[N].last_column;
13371+#endif
13372+
13373+
13374+/* YYLEX -- calling `yylex' with the right arguments. */
13375+
13376+#if YYPURE
13377+# if YYLSP_NEEDED
13378+# ifdef YYLEX_PARAM
13379+# define YYLEX yylex (&yylval, &yylloc, YYLEX_PARAM)
13380+# else
13381+# define YYLEX yylex (&yylval, &yylloc)
13382+# endif
13383+# else /* !YYLSP_NEEDED */
13384+# ifdef YYLEX_PARAM
13385+# define YYLEX yylex (&yylval, YYLEX_PARAM)
13386+# else
13387+# define YYLEX yylex (&yylval)
13388+# endif
13389+# endif /* !YYLSP_NEEDED */
13390+#else /* !YYPURE */
13391+# define YYLEX yylex ()
13392+#endif /* !YYPURE */
13393+
13394+
13395+/* Enable debugging if requested. */
13396+#if YYDEBUG
13397+
13398+# ifndef YYFPRINTF
13399+# include <stdio.h> /* INFRINGES ON USER NAME SPACE */
13400+# define YYFPRINTF fprintf
13401+# endif
13402+
13403+# define YYDPRINTF(Args) \
13404+do { \
13405+ if (yydebug) \
13406+ YYFPRINTF Args; \
13407+} while (0)
13408+/* Nonzero means print parse trace. It is left uninitialized so that
13409+ multiple parsers can coexist. */
13410+int yydebug;
13411+#else /* !YYDEBUG */
13412+# define YYDPRINTF(Args)
13413+#endif /* !YYDEBUG */
13414+
13415+/* YYINITDEPTH -- initial size of the parser's stacks. */
13416+#ifndef YYINITDEPTH
13417+# define YYINITDEPTH 200
13418+#endif
13419+
13420+/* YYMAXDEPTH -- maximum size the stacks can grow to (effective only
13421+ if the built-in stack extension method is used).
13422+
13423+ Do not make this value too large; the results are undefined if
13424+ SIZE_MAX < YYSTACK_BYTES (YYMAXDEPTH)
13425+ evaluated with infinite-precision integer arithmetic. */
13426+
13427+#if YYMAXDEPTH == 0
13428+# undef YYMAXDEPTH
13429+#endif
13430+
13431+#ifndef YYMAXDEPTH
13432+# define YYMAXDEPTH 10000
13433+#endif
13434+
13435+#ifdef YYERROR_VERBOSE
13436+
13437+# ifndef yystrlen
13438+# if defined (__GLIBC__) && defined (_STRING_H)
13439+# define yystrlen strlen
13440+# else
13441+/* Return the length of YYSTR. */
13442+static YYSIZE_T
13443+# if defined (__STDC__) || defined (__cplusplus)
13444+yystrlen (const char *yystr)
13445+# else
13446+yystrlen (yystr)
13447+ const char *yystr;
13448+# endif
13449+{
13450+ register const char *yys = yystr;
13451+
13452+ while (*yys++ != '\0')
13453+ continue;
13454+
13455+ return yys - yystr - 1;
13456+}
13457+# endif
13458+# endif
13459+
13460+# ifndef yystpcpy
13461+# if defined (__GLIBC__) && defined (_STRING_H) && defined (_GNU_SOURCE)
13462+# define yystpcpy stpcpy
13463+# else
13464+/* Copy YYSRC to YYDEST, returning the address of the terminating '\0' in
13465+ YYDEST. */
13466+static char *
13467+# if defined (__STDC__) || defined (__cplusplus)
13468+yystpcpy (char *yydest, const char *yysrc)
13469+# else
13470+yystpcpy (yydest, yysrc)
13471+ char *yydest;
13472+ const char *yysrc;
13473+# endif
13474+{
13475+ register char *yyd = yydest;
13476+ register const char *yys = yysrc;
13477+
13478+ while ((*yyd++ = *yys++) != '\0')
13479+ continue;
13480+
13481+ return yyd - 1;
13482+}
13483+# endif
13484+# endif
13485+#endif
13486+
13487+#line 315 "/usr/local/share/bison/bison.simple"
13488+
13489+
13490+/* The user can define YYPARSE_PARAM as the name of an argument to be passed
13491+ into yyparse. The argument should have type void *.
13492+ It should actually point to an object.
13493+ Grammar actions can access the variable by casting it
13494+ to the proper pointer type. */
13495+
13496+#ifdef YYPARSE_PARAM
13497+# if defined (__STDC__) || defined (__cplusplus)
13498+# define YYPARSE_PARAM_ARG void *YYPARSE_PARAM
13499+# define YYPARSE_PARAM_DECL
13500+# else
13501+# define YYPARSE_PARAM_ARG YYPARSE_PARAM
13502+# define YYPARSE_PARAM_DECL void *YYPARSE_PARAM;
13503+# endif
13504+#else /* !YYPARSE_PARAM */
13505+# define YYPARSE_PARAM_ARG
13506+# define YYPARSE_PARAM_DECL
13507+#endif /* !YYPARSE_PARAM */
13508+
13509+/* Prevent warning if -Wstrict-prototypes. */
13510+#ifdef __GNUC__
13511+# ifdef YYPARSE_PARAM
13512+int yyparse (void *);
13513+# else
13514+int yyparse (void);
13515+# endif
13516+#endif
13517+
13518+/* YY_DECL_VARIABLES -- depending whether we use a pure parser,
13519+ variables are global, or local to YYPARSE. */
13520+
13521+#define YY_DECL_NON_LSP_VARIABLES \
13522+/* The lookahead symbol. */ \
13523+int yychar; \
13524+ \
13525+/* The semantic value of the lookahead symbol. */ \
13526+YYSTYPE yylval; \
13527+ \
13528+/* Number of parse errors so far. */ \
13529+int yynerrs;
13530+
13531+#if YYLSP_NEEDED
13532+# define YY_DECL_VARIABLES \
13533+YY_DECL_NON_LSP_VARIABLES \
13534+ \
13535+/* Location data for the lookahead symbol. */ \
13536+YYLTYPE yylloc;
13537+#else
13538+# define YY_DECL_VARIABLES \
13539+YY_DECL_NON_LSP_VARIABLES
13540+#endif
13541+
13542+
13543+/* If nonreentrant, generate the variables here. */
13544+
13545+#if !YYPURE
13546+YY_DECL_VARIABLES
13547+#endif /* !YYPURE */
13548+
13549+int
13550+yyparse (YYPARSE_PARAM_ARG)
13551+ YYPARSE_PARAM_DECL
13552+{
13553+ /* If reentrant, generate the variables here. */
13554+#if YYPURE
13555+ YY_DECL_VARIABLES
13556+#endif /* !YYPURE */
13557+
13558+ register int yystate;
13559+ register int yyn;
13560+ int yyresult;
13561+ /* Number of tokens to shift before error messages enabled. */
13562+ int yyerrstatus;
13563+ /* Lookahead token as an internal (translated) token number. */
13564+ int yychar1 = 0;
13565+
13566+ /* Three stacks and their tools:
13567+ `yyss': related to states,
13568+ `yyvs': related to semantic values,
13569+ `yyls': related to locations.
13570+
13571+ Refer to the stacks thru separate pointers, to allow yyoverflow
13572+ to reallocate them elsewhere. */
13573+
13574+ /* The state stack. */
13575+ short yyssa[YYINITDEPTH];
13576+ short *yyss = yyssa;
13577+ register short *yyssp;
13578+
13579+ /* The semantic value stack. */
13580+ YYSTYPE yyvsa[YYINITDEPTH];
13581+ YYSTYPE *yyvs = yyvsa;
13582+ register YYSTYPE *yyvsp;
13583+
13584+#if YYLSP_NEEDED
13585+ /* The location stack. */
13586+ YYLTYPE yylsa[YYINITDEPTH];
13587+ YYLTYPE *yyls = yylsa;
13588+ YYLTYPE *yylsp;
13589+#endif
13590+
13591+#if YYLSP_NEEDED
13592+# define YYPOPSTACK (yyvsp--, yyssp--, yylsp--)
13593+#else
13594+# define YYPOPSTACK (yyvsp--, yyssp--)
13595+#endif
13596+
13597+ YYSIZE_T yystacksize = YYINITDEPTH;
13598+
13599+
13600+ /* The variables used to return semantic value and location from the
13601+ action routines. */
13602+ YYSTYPE yyval;
13603+#if YYLSP_NEEDED
13604+ YYLTYPE yyloc;
13605+#endif
13606+
13607+ /* When reducing, the number of symbols on the RHS of the reduced
13608+ rule. */
13609+ int yylen;
13610+
13611+ YYDPRINTF ((stderr, "Starting parse\n"));
13612+
13613+ yystate = 0;
13614+ yyerrstatus = 0;
13615+ yynerrs = 0;
13616+ yychar = YYEMPTY; /* Cause a token to be read. */
13617+
13618+ /* Initialize stack pointers.
13619+ Waste one element of value and location stack
13620+ so that they stay on the same level as the state stack.
13621+ The wasted elements are never initialized. */
13622+
13623+ yyssp = yyss;
13624+ yyvsp = yyvs;
13625+#if YYLSP_NEEDED
13626+ yylsp = yyls;
13627+#endif
13628+ goto yysetstate;
13629+
13630+/*------------------------------------------------------------.
13631+| yynewstate -- Push a new state, which is found in yystate. |
13632+`------------------------------------------------------------*/
13633+ yynewstate:
13634+ /* In all cases, when you get here, the value and location stacks
13635+ have just been pushed. so pushing a state here evens the stacks.
13636+ */
13637+ yyssp++;
13638+
13639+ yysetstate:
13640+ *yyssp = yystate;
13641+
13642+ if (yyssp >= yyss + yystacksize - 1)
13643+ {
13644+ /* Get the current used size of the three stacks, in elements. */
13645+ YYSIZE_T yysize = yyssp - yyss + 1;
13646+
13647+#ifdef yyoverflow
13648+ {
13649+ /* Give user a chance to reallocate the stack. Use copies of
13650+ these so that the &'s don't force the real ones into
13651+ memory. */
13652+ YYSTYPE *yyvs1 = yyvs;
13653+ short *yyss1 = yyss;
13654+
13655+ /* Each stack pointer address is followed by the size of the
13656+ data in use in that stack, in bytes. */
13657+# if YYLSP_NEEDED
13658+ YYLTYPE *yyls1 = yyls;
13659+ /* This used to be a conditional around just the two extra args,
13660+ but that might be undefined if yyoverflow is a macro. */
13661+ yyoverflow ("parser stack overflow",
13662+ &yyss1, yysize * sizeof (*yyssp),
13663+ &yyvs1, yysize * sizeof (*yyvsp),
13664+ &yyls1, yysize * sizeof (*yylsp),
13665+ &yystacksize);
13666+ yyls = yyls1;
13667+# else
13668+ yyoverflow ("parser stack overflow",
13669+ &yyss1, yysize * sizeof (*yyssp),
13670+ &yyvs1, yysize * sizeof (*yyvsp),
13671+ &yystacksize);
13672+# endif
13673+ yyss = yyss1;
13674+ yyvs = yyvs1;
13675+ }
13676+#else /* no yyoverflow */
13677+# ifndef YYSTACK_RELOCATE
13678+ goto yyoverflowlab;
13679+# else
13680+ /* Extend the stack our own way. */
13681+ if (yystacksize >= YYMAXDEPTH)
13682+ goto yyoverflowlab;
13683+ yystacksize *= 2;
13684+ if (yystacksize > YYMAXDEPTH)
13685+ yystacksize = YYMAXDEPTH;
13686+
13687+ {
13688+ short *yyss1 = yyss;
13689+ union yyalloc *yyptr =
13690+ (union yyalloc *) YYSTACK_ALLOC (YYSTACK_BYTES (yystacksize));
13691+ if (! yyptr)
13692+ goto yyoverflowlab;
13693+ YYSTACK_RELOCATE (yyss);
13694+ YYSTACK_RELOCATE (yyvs);
13695+# if YYLSP_NEEDED
13696+ YYSTACK_RELOCATE (yyls);
13697+# endif
13698+# undef YYSTACK_RELOCATE
13699+ if (yyss1 != yyssa)
13700+ YYSTACK_FREE (yyss1);
13701+ }
13702+# endif
13703+#endif /* no yyoverflow */
13704+
13705+ yyssp = yyss + yysize - 1;
13706+ yyvsp = yyvs + yysize - 1;
13707+#if YYLSP_NEEDED
13708+ yylsp = yyls + yysize - 1;
13709+#endif
13710+
13711+ YYDPRINTF ((stderr, "Stack size increased to %lu\n",
13712+ (unsigned long int) yystacksize));
13713+
13714+ if (yyssp >= yyss + yystacksize - 1)
13715+ YYABORT;
13716+ }
13717+
13718+ YYDPRINTF ((stderr, "Entering state %d\n", yystate));
13719+
13720+ goto yybackup;
13721+
13722+
13723+/*-----------.
13724+| yybackup. |
13725+`-----------*/
13726+yybackup:
13727+
13728+/* Do appropriate processing given the current state. */
13729+/* Read a lookahead token if we need one and don't already have one. */
13730+/* yyresume: */
13731+
13732+ /* First try to decide what to do without reference to lookahead token. */
13733+
13734+ yyn = yypact[yystate];
13735+ if (yyn == YYFLAG)
13736+ goto yydefault;
13737+
13738+ /* Not known => get a lookahead token if don't already have one. */
13739+
13740+ /* yychar is either YYEMPTY or YYEOF
13741+ or a valid token in external form. */
13742+
13743+ if (yychar == YYEMPTY)
13744+ {
13745+ YYDPRINTF ((stderr, "Reading a token: "));
13746+ yychar = YYLEX;
13747+ }
13748+
13749+ /* Convert token to internal form (in yychar1) for indexing tables with */
13750+
13751+ if (yychar <= 0) /* This means end of input. */
13752+ {
13753+ yychar1 = 0;
13754+ yychar = YYEOF; /* Don't call YYLEX any more */
13755+
13756+ YYDPRINTF ((stderr, "Now at end of input.\n"));
13757+ }
13758+ else
13759+ {
13760+ yychar1 = YYTRANSLATE (yychar);
13761+
13762+#if YYDEBUG
13763+ /* We have to keep this `#if YYDEBUG', since we use variables
13764+ which are defined only if `YYDEBUG' is set. */
13765+ if (yydebug)
13766+ {
13767+ YYFPRINTF (stderr, "Next token is %d (%s",
13768+ yychar, yytname[yychar1]);
13769+ /* Give the individual parser a way to print the precise
13770+ meaning of a token, for further debugging info. */
13771+# ifdef YYPRINT
13772+ YYPRINT (stderr, yychar, yylval);
13773+# endif
13774+ YYFPRINTF (stderr, ")\n");
13775+ }
13776+#endif
13777+ }
13778+
13779+ yyn += yychar1;
13780+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != yychar1)
13781+ goto yydefault;
13782+
13783+ yyn = yytable[yyn];
13784+
13785+ /* yyn is what to do for this token type in this state.
13786+ Negative => reduce, -yyn is rule number.
13787+ Positive => shift, yyn is new state.
13788+ New state is final state => don't bother to shift,
13789+ just return success.
13790+ 0, or most negative number => error. */
13791+
13792+ if (yyn < 0)
13793+ {
13794+ if (yyn == YYFLAG)
13795+ goto yyerrlab;
13796+ yyn = -yyn;
13797+ goto yyreduce;
13798+ }
13799+ else if (yyn == 0)
13800+ goto yyerrlab;
13801+
13802+ if (yyn == YYFINAL)
13803+ YYACCEPT;
13804+
13805+ /* Shift the lookahead token. */
13806+ YYDPRINTF ((stderr, "Shifting token %d (%s), ",
13807+ yychar, yytname[yychar1]));
13808+
13809+ /* Discard the token being shifted unless it is eof. */
13810+ if (yychar != YYEOF)
13811+ yychar = YYEMPTY;
13812+
13813+ *++yyvsp = yylval;
13814+#if YYLSP_NEEDED
13815+ *++yylsp = yylloc;
13816+#endif
13817+
13818+ /* Count tokens shifted since error; after three, turn off error
13819+ status. */
13820+ if (yyerrstatus)
13821+ yyerrstatus--;
13822+
13823+ yystate = yyn;
13824+ goto yynewstate;
13825+
13826+
13827+/*-----------------------------------------------------------.
13828+| yydefault -- do the default action for the current state. |
13829+`-----------------------------------------------------------*/
13830+yydefault:
13831+ yyn = yydefact[yystate];
13832+ if (yyn == 0)
13833+ goto yyerrlab;
13834+ goto yyreduce;
13835+
13836+
13837+/*-----------------------------.
13838+| yyreduce -- Do a reduction. |
13839+`-----------------------------*/
13840+yyreduce:
13841+ /* yyn is the number of a rule to reduce with. */
13842+ yylen = yyr2[yyn];
13843+
13844+ /* If YYLEN is nonzero, implement the default value of the action:
13845+ `$$ = $1'.
13846+
13847+ Otherwise, the following line sets YYVAL to the semantic value of
13848+ the lookahead token. This behavior is undocumented and Bison
13849+ users should not rely upon it. Assigning to YYVAL
13850+ unconditionally makes the parser a bit smaller, and it avoids a
13851+ GCC warning that YYVAL may be used uninitialized. */
13852+ yyval = yyvsp[1-yylen];
13853+
13854+#if YYLSP_NEEDED
13855+ /* Similarly for the default location. Let the user run additional
13856+ commands if for instance locations are ranges. */
13857+ yyloc = yylsp[1-yylen];
13858+ YYLLOC_DEFAULT (yyloc, (yylsp - yylen), yylen);
13859+#endif
13860+
13861+#if YYDEBUG
13862+ /* We have to keep this `#if YYDEBUG', since we use variables which
13863+ are defined only if `YYDEBUG' is set. */
13864+ if (yydebug)
13865+ {
13866+ int yyi;
13867+
13868+ YYFPRINTF (stderr, "Reducing via rule %d (line %d), ",
13869+ yyn, yyrline[yyn]);
13870+
13871+ /* Print the symbols being reduced, and their result. */
13872+ for (yyi = yyprhs[yyn]; yyrhs[yyi] > 0; yyi++)
13873+ YYFPRINTF (stderr, "%s ", yytname[yyrhs[yyi]]);
13874+ YYFPRINTF (stderr, " -> %s\n", yytname[yyr1[yyn]]);
13875+ }
13876+#endif
13877+
13878+ switch (yyn) {
13879+
13880+case 1:
13881+#line 151 "plural.y"
13882+{
13883+ if (yyvsp[0].exp == NULL)
13884+ YYABORT;
13885+ ((struct parse_args *) arg)->res = yyvsp[0].exp;
13886+ }
13887+ break;
13888+case 2:
13889+#line 159 "plural.y"
13890+{
13891+ yyval.exp = new_exp_3 (qmop, yyvsp[-4].exp, yyvsp[-2].exp, yyvsp[0].exp);
13892+ }
13893+ break;
13894+case 3:
13895+#line 163 "plural.y"
13896+{
13897+ yyval.exp = new_exp_2 (lor, yyvsp[-2].exp, yyvsp[0].exp);
13898+ }
13899+ break;
13900+case 4:
13901+#line 167 "plural.y"
13902+{
13903+ yyval.exp = new_exp_2 (land, yyvsp[-2].exp, yyvsp[0].exp);
13904+ }
13905+ break;
13906+case 5:
13907+#line 171 "plural.y"
13908+{
13909+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13910+ }
13911+ break;
13912+case 6:
13913+#line 175 "plural.y"
13914+{
13915+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13916+ }
13917+ break;
13918+case 7:
13919+#line 179 "plural.y"
13920+{
13921+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13922+ }
13923+ break;
13924+case 8:
13925+#line 183 "plural.y"
13926+{
13927+ yyval.exp = new_exp_2 (yyvsp[-1].op, yyvsp[-2].exp, yyvsp[0].exp);
13928+ }
13929+ break;
13930+case 9:
13931+#line 187 "plural.y"
13932+{
13933+ yyval.exp = new_exp_1 (lnot, yyvsp[0].exp);
13934+ }
13935+ break;
13936+case 10:
13937+#line 191 "plural.y"
13938+{
13939+ yyval.exp = new_exp_0 (var);
13940+ }
13941+ break;
13942+case 11:
13943+#line 195 "plural.y"
13944+{
13945+ if ((yyval.exp = new_exp_0 (num)) != NULL)
13946+ yyval.exp->val.num = yyvsp[0].num;
13947+ }
13948+ break;
13949+case 12:
13950+#line 200 "plural.y"
13951+{
13952+ yyval.exp = yyvsp[-1].exp;
13953+ }
13954+ break;
13955+}
13956+
13957+#line 705 "/usr/local/share/bison/bison.simple"
13958+
13959+
13960+ yyvsp -= yylen;
13961+ yyssp -= yylen;
13962+#if YYLSP_NEEDED
13963+ yylsp -= yylen;
13964+#endif
13965+
13966+#if YYDEBUG
13967+ if (yydebug)
13968+ {
13969+ short *yyssp1 = yyss - 1;
13970+ YYFPRINTF (stderr, "state stack now");
13971+ while (yyssp1 != yyssp)
13972+ YYFPRINTF (stderr, " %d", *++yyssp1);
13973+ YYFPRINTF (stderr, "\n");
13974+ }
13975+#endif
13976+
13977+ *++yyvsp = yyval;
13978+#if YYLSP_NEEDED
13979+ *++yylsp = yyloc;
13980+#endif
13981+
13982+ /* Now `shift' the result of the reduction. Determine what state
13983+ that goes to, based on the state we popped back to and the rule
13984+ number reduced by. */
13985+
13986+ yyn = yyr1[yyn];
13987+
13988+ yystate = yypgoto[yyn - YYNTBASE] + *yyssp;
13989+ if (yystate >= 0 && yystate <= YYLAST && yycheck[yystate] == *yyssp)
13990+ yystate = yytable[yystate];
13991+ else
13992+ yystate = yydefgoto[yyn - YYNTBASE];
13993+
13994+ goto yynewstate;
13995+
13996+
13997+/*------------------------------------.
13998+| yyerrlab -- here on detecting error |
13999+`------------------------------------*/
14000+yyerrlab:
14001+ /* If not already recovering from an error, report this error. */
14002+ if (!yyerrstatus)
14003+ {
14004+ ++yynerrs;
14005+
14006+#ifdef YYERROR_VERBOSE
14007+ yyn = yypact[yystate];
14008+
14009+ if (yyn > YYFLAG && yyn < YYLAST)
14010+ {
14011+ YYSIZE_T yysize = 0;
14012+ char *yymsg;
14013+ int yyx, yycount;
14014+
14015+ yycount = 0;
14016+ /* Start YYX at -YYN if negative to avoid negative indexes in
14017+ YYCHECK. */
14018+ for (yyx = yyn < 0 ? -yyn : 0;
14019+ yyx < (int) (sizeof (yytname) / sizeof (char *)); yyx++)
14020+ if (yycheck[yyx + yyn] == yyx)
14021+ yysize += yystrlen (yytname[yyx]) + 15, yycount++;
14022+ yysize += yystrlen ("parse error, unexpected ") + 1;
14023+ yysize += yystrlen (yytname[YYTRANSLATE (yychar)]);
14024+ yymsg = (char *) YYSTACK_ALLOC (yysize);
14025+ if (yymsg != 0)
14026+ {
14027+ char *yyp = yystpcpy (yymsg, "parse error, unexpected ");
14028+ yyp = yystpcpy (yyp, yytname[YYTRANSLATE (yychar)]);
14029+
14030+ if (yycount < 5)
14031+ {
14032+ yycount = 0;
14033+ for (yyx = yyn < 0 ? -yyn : 0;
14034+ yyx < (int) (sizeof (yytname) / sizeof (char *));
14035+ yyx++)
14036+ if (yycheck[yyx + yyn] == yyx)
14037+ {
14038+ const char *yyq = ! yycount ? ", expecting " : " or ";
14039+ yyp = yystpcpy (yyp, yyq);
14040+ yyp = yystpcpy (yyp, yytname[yyx]);
14041+ yycount++;
14042+ }
14043+ }
14044+ yyerror (yymsg);
14045+ YYSTACK_FREE (yymsg);
14046+ }
14047+ else
14048+ yyerror ("parse error; also virtual memory exhausted");
14049+ }
14050+ else
14051+#endif /* defined (YYERROR_VERBOSE) */
14052+ yyerror ("parse error");
14053+ }
14054+ goto yyerrlab1;
14055+
14056+
14057+/*--------------------------------------------------.
14058+| yyerrlab1 -- error raised explicitly by an action |
14059+`--------------------------------------------------*/
14060+yyerrlab1:
14061+ if (yyerrstatus == 3)
14062+ {
14063+ /* If just tried and failed to reuse lookahead token after an
14064+ error, discard it. */
14065+
14066+ /* return failure if at end of input */
14067+ if (yychar == YYEOF)
14068+ YYABORT;
14069+ YYDPRINTF ((stderr, "Discarding token %d (%s).\n",
14070+ yychar, yytname[yychar1]));
14071+ yychar = YYEMPTY;
14072+ }
14073+
14074+ /* Else will try to reuse lookahead token after shifting the error
14075+ token. */
14076+
14077+ yyerrstatus = 3; /* Each real token shifted decrements this */
14078+
14079+ goto yyerrhandle;
14080+
14081+
14082+/*-------------------------------------------------------------------.
14083+| yyerrdefault -- current state does not do anything special for the |
14084+| error token. |
14085+`-------------------------------------------------------------------*/
14086+yyerrdefault:
14087+#if 0
14088+ /* This is wrong; only states that explicitly want error tokens
14089+ should shift them. */
14090+
14091+ /* If its default is to accept any token, ok. Otherwise pop it. */
14092+ yyn = yydefact[yystate];
14093+ if (yyn)
14094+ goto yydefault;
14095+#endif
14096+
14097+
14098+/*---------------------------------------------------------------.
14099+| yyerrpop -- pop the current state because it cannot handle the |
14100+| error token |
14101+`---------------------------------------------------------------*/
14102+yyerrpop:
14103+ if (yyssp == yyss)
14104+ YYABORT;
14105+ yyvsp--;
14106+ yystate = *--yyssp;
14107+#if YYLSP_NEEDED
14108+ yylsp--;
14109+#endif
14110+
14111+#if YYDEBUG
14112+ if (yydebug)
14113+ {
14114+ short *yyssp1 = yyss - 1;
14115+ YYFPRINTF (stderr, "Error: state stack now");
14116+ while (yyssp1 != yyssp)
14117+ YYFPRINTF (stderr, " %d", *++yyssp1);
14118+ YYFPRINTF (stderr, "\n");
14119+ }
14120+#endif
14121+
14122+/*--------------.
14123+| yyerrhandle. |
14124+`--------------*/
14125+yyerrhandle:
14126+ yyn = yypact[yystate];
14127+ if (yyn == YYFLAG)
14128+ goto yyerrdefault;
14129+
14130+ yyn += YYTERROR;
14131+ if (yyn < 0 || yyn > YYLAST || yycheck[yyn] != YYTERROR)
14132+ goto yyerrdefault;
14133+
14134+ yyn = yytable[yyn];
14135+ if (yyn < 0)
14136+ {
14137+ if (yyn == YYFLAG)
14138+ goto yyerrpop;
14139+ yyn = -yyn;
14140+ goto yyreduce;
14141+ }
14142+ else if (yyn == 0)
14143+ goto yyerrpop;
14144+
14145+ if (yyn == YYFINAL)
14146+ YYACCEPT;
14147+
14148+ YYDPRINTF ((stderr, "Shifting error token, "));
14149+
14150+ *++yyvsp = yylval;
14151+#if YYLSP_NEEDED
14152+ *++yylsp = yylloc;
14153+#endif
14154+
14155+ yystate = yyn;
14156+ goto yynewstate;
14157+
14158+
14159+/*-------------------------------------.
14160+| yyacceptlab -- YYACCEPT comes here. |
14161+`-------------------------------------*/
14162+yyacceptlab:
14163+ yyresult = 0;
14164+ goto yyreturn;
14165+
14166+/*-----------------------------------.
14167+| yyabortlab -- YYABORT comes here. |
14168+`-----------------------------------*/
14169+yyabortlab:
14170+ yyresult = 1;
14171+ goto yyreturn;
14172+
14173+/*---------------------------------------------.
14174+| yyoverflowab -- parser overflow comes here. |
14175+`---------------------------------------------*/
14176+yyoverflowlab:
14177+ yyerror ("parser stack overflow");
14178+ yyresult = 2;
14179+ /* Fall through. */
14180+
14181+yyreturn:
14182+#ifndef yyoverflow
14183+ if (yyss != yyssa)
14184+ YYSTACK_FREE (yyss);
14185+#endif
14186+ return yyresult;
14187+}
14188+#line 205 "plural.y"
14189+
14190+
14191+void
14192+internal_function
14193+FREE_EXPRESSION (struct expression *exp)
14194+{
14195+ if (exp == NULL)
14196+ return;
14197+
14198+ /* Handle the recursive case. */
14199+ switch (exp->nargs)
14200+ {
14201+ case 3:
14202+ FREE_EXPRESSION (exp->val.args[2]);
14203+ /* FALLTHROUGH */
14204+ case 2:
14205+ FREE_EXPRESSION (exp->val.args[1]);
14206+ /* FALLTHROUGH */
14207+ case 1:
14208+ FREE_EXPRESSION (exp->val.args[0]);
14209+ /* FALLTHROUGH */
14210+ default:
14211+ break;
14212+ }
14213+
14214+ free (exp);
14215+}
14216+
14217+
14218+static int
14219+yylex (YYSTYPE *lval, const char **pexp)
14220+{
14221+ const char *exp = *pexp;
14222+ int result;
14223+
14224+ while (1)
14225+ {
14226+ if (exp[0] == '\0')
14227+ {
14228+ *pexp = exp;
14229+ return YYEOF;
14230+ }
14231+
14232+ if (exp[0] != ' ' && exp[0] != '\t')
14233+ break;
14234+
14235+ ++exp;
14236+ }
14237+
14238+ result = *exp++;
14239+ switch (result)
14240+ {
14241+ case '0': case '1': case '2': case '3': case '4':
14242+ case '5': case '6': case '7': case '8': case '9':
14243+ {
14244+ unsigned long int n = result - '0';
14245+ while (exp[0] >= '0' && exp[0] <= '9')
14246+ {
14247+ n *= 10;
14248+ n += exp[0] - '0';
14249+ ++exp;
14250+ }
14251+ lval->num = n;
14252+ result = NUMBER;
14253+ }
14254+ break;
14255+
14256+ case '=':
14257+ if (exp[0] == '=')
14258+ {
14259+ ++exp;
14260+ lval->op = equal;
14261+ result = EQUOP2;
14262+ }
14263+ else
14264+ result = YYERRCODE;
14265+ break;
14266+
14267+ case '!':
14268+ if (exp[0] == '=')
14269+ {
14270+ ++exp;
14271+ lval->op = not_equal;
14272+ result = EQUOP2;
14273+ }
14274+ break;
14275+
14276+ case '&':
14277+ case '|':
14278+ if (exp[0] == result)
14279+ ++exp;
14280+ else
14281+ result = YYERRCODE;
14282+ break;
14283+
14284+ case '<':
14285+ if (exp[0] == '=')
14286+ {
14287+ ++exp;
14288+ lval->op = less_or_equal;
14289+ }
14290+ else
14291+ lval->op = less_than;
14292+ result = CMPOP2;
14293+ break;
14294+
14295+ case '>':
14296+ if (exp[0] == '=')
14297+ {
14298+ ++exp;
14299+ lval->op = greater_or_equal;
14300+ }
14301+ else
14302+ lval->op = greater_than;
14303+ result = CMPOP2;
14304+ break;
14305+
14306+ case '*':
14307+ lval->op = mult;
14308+ result = MULOP2;
14309+ break;
14310+
14311+ case '/':
14312+ lval->op = divide;
14313+ result = MULOP2;
14314+ break;
14315+
14316+ case '%':
14317+ lval->op = module;
14318+ result = MULOP2;
14319+ break;
14320+
14321+ case '+':
14322+ lval->op = plus;
14323+ result = ADDOP2;
14324+ break;
14325+
14326+ case '-':
14327+ lval->op = minus;
14328+ result = ADDOP2;
14329+ break;
14330+
14331+ case 'n':
14332+ case '?':
14333+ case ':':
14334+ case '(':
14335+ case ')':
14336+ /* Nothing, just return the character. */
14337+ break;
14338+
14339+ case ';':
14340+ case '\n':
14341+ case '\0':
14342+ /* Be safe and let the user call this function again. */
14343+ --exp;
14344+ result = YYEOF;
14345+ break;
14346+
14347+ default:
14348+ result = YYERRCODE;
14349+#if YYDEBUG != 0
14350+ --exp;
14351+#endif
14352+ break;
14353+ }
14354+
14355+ *pexp = exp;
14356+
14357+ return result;
14358+}
14359+
14360+
14361+static void
14362+yyerror (const char *str)
14363+{
14364+ /* Do nothing. We don't print error messages here. */
14365+}
14366--- lrzsz-0.12.20.safe/intl/plural-exp.c 1969-12-31 19:00:00.000000000 -0500
14367+++ lrzsz-0.12.20/intl/plural-exp.c 2004-09-12 14:40:34.578714192 -0400
14368@@ -0,0 +1,154 @@
14369+/* Expression parsing for plural form selection.
14370+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14371+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14372+
14373+ This program is free software; you can redistribute it and/or modify it
14374+ under the terms of the GNU Library General Public License as published
14375+ by the Free Software Foundation; either version 2, or (at your option)
14376+ any later version.
14377+
14378+ This program is distributed in the hope that it will be useful,
14379+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14380+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14381+ Library General Public License for more details.
14382+
14383+ You should have received a copy of the GNU Library General Public
14384+ License along with this program; if not, write to the Free Software
14385+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14386+ USA. */
14387+
14388+#ifdef HAVE_CONFIG_H
14389+# include <config.h>
14390+#endif
14391+
14392+#include <ctype.h>
14393+#include <stdlib.h>
14394+#include <string.h>
14395+
14396+#include "plural-exp.h"
14397+
14398+#if (defined __GNUC__ && !defined __APPLE_CC__) \
14399+ || (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
14400+
14401+/* These structs are the constant expression for the germanic plural
14402+ form determination. It represents the expression "n != 1". */
14403+static const struct expression plvar =
14404+{
14405+ .nargs = 0,
14406+ .operation = var,
14407+};
14408+static const struct expression plone =
14409+{
14410+ .nargs = 0,
14411+ .operation = num,
14412+ .val =
14413+ {
14414+ .num = 1
14415+ }
14416+};
14417+struct expression GERMANIC_PLURAL =
14418+{
14419+ .nargs = 2,
14420+ .operation = not_equal,
14421+ .val =
14422+ {
14423+ .args =
14424+ {
14425+ [0] = (struct expression *) &plvar,
14426+ [1] = (struct expression *) &plone
14427+ }
14428+ }
14429+};
14430+
14431+# define INIT_GERMANIC_PLURAL()
14432+
14433+#else
14434+
14435+/* For compilers without support for ISO C 99 struct/union initializers:
14436+ Initialization at run-time. */
14437+
14438+static struct expression plvar;
14439+static struct expression plone;
14440+struct expression GERMANIC_PLURAL;
14441+
14442+static void
14443+init_germanic_plural ()
14444+{
14445+ if (plone.val.num == 0)
14446+ {
14447+ plvar.nargs = 0;
14448+ plvar.operation = var;
14449+
14450+ plone.nargs = 0;
14451+ plone.operation = num;
14452+ plone.val.num = 1;
14453+
14454+ GERMANIC_PLURAL.nargs = 2;
14455+ GERMANIC_PLURAL.operation = not_equal;
14456+ GERMANIC_PLURAL.val.args[0] = &plvar;
14457+ GERMANIC_PLURAL.val.args[1] = &plone;
14458+ }
14459+}
14460+
14461+# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
14462+
14463+#endif
14464+
14465+void
14466+internal_function
14467+EXTRACT_PLURAL_EXPRESSION (const char *nullentry, struct expression **pluralp,
14468+ unsigned long int *npluralsp)
14469+{
14470+ if (nullentry != NULL)
14471+ {
14472+ const char *plural;
14473+ const char *nplurals;
14474+
14475+ plural = strstr (nullentry, "plural=");
14476+ nplurals = strstr (nullentry, "nplurals=");
14477+ if (plural == NULL || nplurals == NULL)
14478+ goto no_plural;
14479+ else
14480+ {
14481+ char *endp;
14482+ unsigned long int n;
14483+ struct parse_args args;
14484+
14485+ /* First get the number. */
14486+ nplurals += 9;
14487+ while (*nplurals != '\0' && isspace ((unsigned char) *nplurals))
14488+ ++nplurals;
14489+ if (!(*nplurals >= '0' && *nplurals <= '9'))
14490+ goto no_plural;
14491+#if defined HAVE_STRTOUL || defined _LIBC
14492+ n = strtoul (nplurals, &endp, 10);
14493+#else
14494+ for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
14495+ n = n * 10 + (*endp - '0');
14496+#endif
14497+ if (nplurals == endp)
14498+ goto no_plural;
14499+ *npluralsp = n;
14500+
14501+ /* Due to the restrictions bison imposes onto the interface of the
14502+ scanner function we have to put the input string and the result
14503+ passed up from the parser into the same structure which address
14504+ is passed down to the parser. */
14505+ plural += 7;
14506+ args.cp = plural;
14507+ if (PLURAL_PARSE (&args) != 0)
14508+ goto no_plural;
14509+ *pluralp = args.res;
14510+ }
14511+ }
14512+ else
14513+ {
14514+ /* By default we are using the Germanic form: singular form only
14515+ for `one', the plural form otherwise. Yes, this is also what
14516+ English is using since English is a Germanic language. */
14517+ no_plural:
14518+ INIT_GERMANIC_PLURAL ();
14519+ *pluralp = &GERMANIC_PLURAL;
14520+ *npluralsp = 2;
14521+ }
14522+}
14523--- lrzsz-0.12.20.safe/intl/plural-exp.h 1969-12-31 19:00:00.000000000 -0500
14524+++ lrzsz-0.12.20/intl/plural-exp.h 2004-09-12 14:40:34.584713280 -0400
14525@@ -0,0 +1,118 @@
14526+/* Expression parsing and evaluation for plural form selection.
14527+ Copyright (C) 2000-2003 Free Software Foundation, Inc.
14528+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14529+
14530+ This program is free software; you can redistribute it and/or modify it
14531+ under the terms of the GNU Library General Public License as published
14532+ by the Free Software Foundation; either version 2, or (at your option)
14533+ any later version.
14534+
14535+ This program is distributed in the hope that it will be useful,
14536+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14537+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14538+ Library General Public License for more details.
14539+
14540+ You should have received a copy of the GNU Library General Public
14541+ License along with this program; if not, write to the Free Software
14542+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14543+ USA. */
14544+
14545+#ifndef _PLURAL_EXP_H
14546+#define _PLURAL_EXP_H
14547+
14548+#ifndef internal_function
14549+# define internal_function
14550+#endif
14551+
14552+#ifndef attribute_hidden
14553+# define attribute_hidden
14554+#endif
14555+
14556+
14557+/* This is the representation of the expressions to determine the
14558+ plural form. */
14559+struct expression
14560+{
14561+ int nargs; /* Number of arguments. */
14562+ enum operator
14563+ {
14564+ /* Without arguments: */
14565+ var, /* The variable "n". */
14566+ num, /* Decimal number. */
14567+ /* Unary operators: */
14568+ lnot, /* Logical NOT. */
14569+ /* Binary operators: */
14570+ mult, /* Multiplication. */
14571+ divide, /* Division. */
14572+ module, /* Modulo operation. */
14573+ plus, /* Addition. */
14574+ minus, /* Subtraction. */
14575+ less_than, /* Comparison. */
14576+ greater_than, /* Comparison. */
14577+ less_or_equal, /* Comparison. */
14578+ greater_or_equal, /* Comparison. */
14579+ equal, /* Comparison for equality. */
14580+ not_equal, /* Comparison for inequality. */
14581+ land, /* Logical AND. */
14582+ lor, /* Logical OR. */
14583+ /* Ternary operators: */
14584+ qmop /* Question mark operator. */
14585+ } operation;
14586+ union
14587+ {
14588+ unsigned long int num; /* Number value for `num'. */
14589+ struct expression *args[3]; /* Up to three arguments. */
14590+ } val;
14591+};
14592+
14593+/* This is the data structure to pass information to the parser and get
14594+ the result in a thread-safe way. */
14595+struct parse_args
14596+{
14597+ const char *cp;
14598+ struct expression *res;
14599+};
14600+
14601+
14602+/* Names for the libintl functions are a problem. This source code is used
14603+ 1. in the GNU C Library library,
14604+ 2. in the GNU libintl library,
14605+ 3. in the GNU gettext tools.
14606+ The function names in each situation must be different, to allow for
14607+ binary incompatible changes in 'struct expression'. Furthermore,
14608+ 1. in the GNU C Library library, the names have a __ prefix,
14609+ 2.+3. in the GNU libintl library and in the GNU gettext tools, the names
14610+ must follow ANSI C and not start with __.
14611+ So we have to distinguish the three cases. */
14612+#ifdef _LIBC
14613+# define FREE_EXPRESSION __gettext_free_exp
14614+# define PLURAL_PARSE __gettextparse
14615+# define GERMANIC_PLURAL __gettext_germanic_plural
14616+# define EXTRACT_PLURAL_EXPRESSION __gettext_extract_plural
14617+#elif defined (IN_LIBINTL)
14618+# define FREE_EXPRESSION libintl_gettext_free_exp
14619+# define PLURAL_PARSE libintl_gettextparse
14620+# define GERMANIC_PLURAL libintl_gettext_germanic_plural
14621+# define EXTRACT_PLURAL_EXPRESSION libintl_gettext_extract_plural
14622+#else
14623+# define FREE_EXPRESSION free_plural_expression
14624+# define PLURAL_PARSE parse_plural_expression
14625+# define GERMANIC_PLURAL germanic_plural
14626+# define EXTRACT_PLURAL_EXPRESSION extract_plural_expression
14627+#endif
14628+
14629+extern void FREE_EXPRESSION (struct expression *exp)
14630+ internal_function;
14631+extern int PLURAL_PARSE (void *arg);
14632+extern struct expression GERMANIC_PLURAL attribute_hidden;
14633+extern void EXTRACT_PLURAL_EXPRESSION (const char *nullentry,
14634+ struct expression **pluralp,
14635+ unsigned long int *npluralsp)
14636+ internal_function;
14637+
14638+#if !defined (_LIBC) && !defined (IN_LIBINTL)
14639+extern unsigned long int plural_eval (struct expression *pexp,
14640+ unsigned long int n);
14641+#endif
14642+
14643+#endif /* _PLURAL_EXP_H */
14644--- lrzsz-0.12.20.safe/intl/plural.y 1969-12-31 19:00:00.000000000 -0500
14645+++ lrzsz-0.12.20/intl/plural.y 2004-09-12 14:40:34.589712520 -0400
14646@@ -0,0 +1,381 @@
14647+%{
14648+/* Expression parsing for plural form selection.
14649+ Copyright (C) 2000-2001, 2003 Free Software Foundation, Inc.
14650+ Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
14651+
14652+ This program is free software; you can redistribute it and/or modify it
14653+ under the terms of the GNU Library General Public License as published
14654+ by the Free Software Foundation; either version 2, or (at your option)
14655+ any later version.
14656+
14657+ This program is distributed in the hope that it will be useful,
14658+ but WITHOUT ANY WARRANTY; without even the implied warranty of
14659+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14660+ Library General Public License for more details.
14661+
14662+ You should have received a copy of the GNU Library General Public
14663+ License along with this program; if not, write to the Free Software
14664+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
14665+ USA. */
14666+
14667+/* The bison generated parser uses alloca. AIX 3 forces us to put this
14668+ declaration at the beginning of the file. The declaration in bison's
14669+ skeleton file comes too late. This must come before <config.h>
14670+ because <config.h> may include arbitrary system headers. */
14671+#if defined _AIX && !defined __GNUC__
14672+ #pragma alloca
14673+#endif
14674+
14675+#ifdef HAVE_CONFIG_H
14676+# include <config.h>
14677+#endif
14678+
14679+#include <stddef.h>
14680+#include <stdlib.h>
14681+#include "plural-exp.h"
14682+
14683+/* The main function generated by the parser is called __gettextparse,
14684+ but we want it to be called PLURAL_PARSE. */
14685+#ifndef _LIBC
14686+# define __gettextparse PLURAL_PARSE
14687+#endif
14688+
14689+#define YYLEX_PARAM &((struct parse_args *) arg)->cp
14690+#define YYPARSE_PARAM arg
14691+%}
14692+%pure_parser
14693+%expect 7
14694+
14695+%union {
14696+ unsigned long int num;
14697+ enum operator op;
14698+ struct expression *exp;
14699+}
14700+
14701+%{
14702+/* Prototypes for local functions. */
14703+static int yylex (YYSTYPE *lval, const char **pexp);
14704+static void yyerror (const char *str);
14705+
14706+/* Allocation of expressions. */
14707+
14708+static struct expression *
14709+new_exp (int nargs, enum operator op, struct expression * const *args)
14710+{
14711+ int i;
14712+ struct expression *newp;
14713+
14714+ /* If any of the argument could not be malloc'ed, just return NULL. */
14715+ for (i = nargs - 1; i >= 0; i--)
14716+ if (args[i] == NULL)
14717+ goto fail;
14718+
14719+ /* Allocate a new expression. */
14720+ newp = (struct expression *) malloc (sizeof (*newp));
14721+ if (newp != NULL)
14722+ {
14723+ newp->nargs = nargs;
14724+ newp->operation = op;
14725+ for (i = nargs - 1; i >= 0; i--)
14726+ newp->val.args[i] = args[i];
14727+ return newp;
14728+ }
14729+
14730+ fail:
14731+ for (i = nargs - 1; i >= 0; i--)
14732+ FREE_EXPRESSION (args[i]);
14733+
14734+ return NULL;
14735+}
14736+
14737+static inline struct expression *
14738+new_exp_0 (enum operator op)
14739+{
14740+ return new_exp (0, op, NULL);
14741+}
14742+
14743+static inline struct expression *
14744+new_exp_1 (enum operator op, struct expression *right)
14745+{
14746+ struct expression *args[1];
14747+
14748+ args[0] = right;
14749+ return new_exp (1, op, args);
14750+}
14751+
14752+static struct expression *
14753+new_exp_2 (enum operator op, struct expression *left, struct expression *right)
14754+{
14755+ struct expression *args[2];
14756+
14757+ args[0] = left;
14758+ args[1] = right;
14759+ return new_exp (2, op, args);
14760+}
14761+
14762+static inline struct expression *
14763+new_exp_3 (enum operator op, struct expression *bexp,
14764+ struct expression *tbranch, struct expression *fbranch)
14765+{
14766+ struct expression *args[3];
14767+
14768+ args[0] = bexp;
14769+ args[1] = tbranch;
14770+ args[2] = fbranch;
14771+ return new_exp (3, op, args);
14772+}
14773+
14774+%}
14775+
14776+/* This declares that all operators have the same associativity and the
14777+ precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
14778+ There is no unary minus and no bitwise operators.
14779+ Operators with the same syntactic behaviour have been merged into a single
14780+ token, to save space in the array generated by bison. */
14781+%right '?' /* ? */
14782+%left '|' /* || */
14783+%left '&' /* && */
14784+%left EQUOP2 /* == != */
14785+%left CMPOP2 /* < > <= >= */
14786+%left ADDOP2 /* + - */
14787+%left MULOP2 /* * / % */
14788+%right '!' /* ! */
14789+
14790+%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
14791+%token <num> NUMBER
14792+%type <exp> exp
14793+
14794+%%
14795+
14796+start: exp
14797+ {
14798+ if ($1 == NULL)
14799+ YYABORT;
14800+ ((struct parse_args *) arg)->res = $1;
14801+ }
14802+ ;
14803+
14804+exp: exp '?' exp ':' exp
14805+ {
14806+ $$ = new_exp_3 (qmop, $1, $3, $5);
14807+ }
14808+ | exp '|' exp
14809+ {
14810+ $$ = new_exp_2 (lor, $1, $3);
14811+ }
14812+ | exp '&' exp
14813+ {
14814+ $$ = new_exp_2 (land, $1, $3);
14815+ }
14816+ | exp EQUOP2 exp
14817+ {
14818+ $$ = new_exp_2 ($2, $1, $3);
14819+ }
14820+ | exp CMPOP2 exp
14821+ {
14822+ $$ = new_exp_2 ($2, $1, $3);
14823+ }
14824+ | exp ADDOP2 exp
14825+ {
14826+ $$ = new_exp_2 ($2, $1, $3);
14827+ }
14828+ | exp MULOP2 exp
14829+ {
14830+ $$ = new_exp_2 ($2, $1, $3);
14831+ }
14832+ | '!' exp
14833+ {
14834+ $$ = new_exp_1 (lnot, $2);
14835+ }
14836+ | 'n'
14837+ {
14838+ $$ = new_exp_0 (var);
14839+ }
14840+ | NUMBER
14841+ {
14842+ if (($$ = new_exp_0 (num)) != NULL)
14843+ $$->val.num = $1;
14844+ }
14845+ | '(' exp ')'
14846+ {
14847+ $$ = $2;
14848+ }
14849+ ;
14850+
14851+%%
14852+
14853+void
14854+internal_function
14855+FREE_EXPRESSION (struct expression *exp)
14856+{
14857+ if (exp == NULL)
14858+ return;
14859+
14860+ /* Handle the recursive case. */
14861+ switch (exp->nargs)
14862+ {
14863+ case 3:
14864+ FREE_EXPRESSION (exp->val.args[2]);
14865+ /* FALLTHROUGH */
14866+ case 2:
14867+ FREE_EXPRESSION (exp->val.args[1]);
14868+ /* FALLTHROUGH */
14869+ case 1:
14870+ FREE_EXPRESSION (exp->val.args[0]);
14871+ /* FALLTHROUGH */
14872+ default:
14873+ break;
14874+ }
14875+
14876+ free (exp);
14877+}
14878+
14879+
14880+static int
14881+yylex (YYSTYPE *lval, const char **pexp)
14882+{
14883+ const char *exp = *pexp;
14884+ int result;
14885+
14886+ while (1)
14887+ {
14888+ if (exp[0] == '\0')
14889+ {
14890+ *pexp = exp;
14891+ return YYEOF;
14892+ }
14893+
14894+ if (exp[0] != ' ' && exp[0] != '\t')
14895+ break;
14896+
14897+ ++exp;
14898+ }
14899+
14900+ result = *exp++;
14901+ switch (result)
14902+ {
14903+ case '0': case '1': case '2': case '3': case '4':
14904+ case '5': case '6': case '7': case '8': case '9':
14905+ {
14906+ unsigned long int n = result - '0';
14907+ while (exp[0] >= '0' && exp[0] <= '9')
14908+ {
14909+ n *= 10;
14910+ n += exp[0] - '0';
14911+ ++exp;
14912+ }
14913+ lval->num = n;
14914+ result = NUMBER;
14915+ }
14916+ break;
14917+
14918+ case '=':
14919+ if (exp[0] == '=')
14920+ {
14921+ ++exp;
14922+ lval->op = equal;
14923+ result = EQUOP2;
14924+ }
14925+ else
14926+ result = YYERRCODE;
14927+ break;
14928+
14929+ case '!':
14930+ if (exp[0] == '=')
14931+ {
14932+ ++exp;
14933+ lval->op = not_equal;
14934+ result = EQUOP2;
14935+ }
14936+ break;
14937+
14938+ case '&':
14939+ case '|':
14940+ if (exp[0] == result)
14941+ ++exp;
14942+ else
14943+ result = YYERRCODE;
14944+ break;
14945+
14946+ case '<':
14947+ if (exp[0] == '=')
14948+ {
14949+ ++exp;
14950+ lval->op = less_or_equal;
14951+ }
14952+ else
14953+ lval->op = less_than;
14954+ result = CMPOP2;
14955+ break;
14956+
14957+ case '>':
14958+ if (exp[0] == '=')
14959+ {
14960+ ++exp;
14961+ lval->op = greater_or_equal;
14962+ }
14963+ else
14964+ lval->op = greater_than;
14965+ result = CMPOP2;
14966+ break;
14967+
14968+ case '*':
14969+ lval->op = mult;
14970+ result = MULOP2;
14971+ break;
14972+
14973+ case '/':
14974+ lval->op = divide;
14975+ result = MULOP2;
14976+ break;
14977+
14978+ case '%':
14979+ lval->op = module;
14980+ result = MULOP2;
14981+ break;
14982+
14983+ case '+':
14984+ lval->op = plus;
14985+ result = ADDOP2;
14986+ break;
14987+
14988+ case '-':
14989+ lval->op = minus;
14990+ result = ADDOP2;
14991+ break;
14992+
14993+ case 'n':
14994+ case '?':
14995+ case ':':
14996+ case '(':
14997+ case ')':
14998+ /* Nothing, just return the character. */
14999+ break;
15000+
15001+ case ';':
15002+ case '\n':
15003+ case '\0':
15004+ /* Be safe and let the user call this function again. */
15005+ --exp;
15006+ result = YYEOF;
15007+ break;
15008+
15009+ default:
15010+ result = YYERRCODE;
15011+#if YYDEBUG != 0
15012+ --exp;
15013+#endif
15014+ break;
15015+ }
15016+
15017+ *pexp = exp;
15018+
15019+ return result;
15020+}
15021+
15022+
15023+static void
15024+yyerror (const char *str)
15025+{
15026+ /* Do nothing. We don't print error messages here. */
15027+}
15028--- lrzsz-0.12.20.safe/intl/po2tbl.sed.in 1998-04-26 09:20:52.000000000 -0400
15029+++ lrzsz-0.12.20/intl/po2tbl.sed.in 1969-12-31 19:00:00.000000000 -0500
15030@@ -1,102 +0,0 @@
15031-# po2tbl.sed - Convert Uniforum style .po file to lookup table for catgets
15032-# Copyright (C) 1995 Free Software Foundation, Inc.
15033-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
15034-#
15035-# This program is free software; you can redistribute it and/or modify
15036-# it under the terms of the GNU General Public License as published by
15037-# the Free Software Foundation; either version 2, or (at your option)
15038-# any later version.
15039-#
15040-# This program is distributed in the hope that it will be useful,
15041-# but WITHOUT ANY WARRANTY; without even the implied warranty of
15042-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15043-# GNU General Public License for more details.
15044-#
15045-# You should have received a copy of the GNU General Public License
15046-# along with this program; if not, write to the Free Software
15047-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
15048-#
15049-1 {
15050- i\
15051-/* Automatically generated by po2tbl.sed from @PACKAGE NAME@.pot. */\
15052-\
15053-#if HAVE_CONFIG_H\
15054-# include <config.h>\
15055-#endif\
15056-\
15057-#include "libgettext.h"\
15058-\
15059-const struct _msg_ent _msg_tbl[] = {
15060- h
15061- s/.*/0/
15062- x
15063-}
15064-#
15065-# Write msgid entries in C array form.
15066-#
15067-/^msgid/ {
15068- s/msgid[ ]*\(".*"\)/ {\1/
15069- tb
15070-# Append the next line
15071- :b
15072- N
15073-# Look whether second part is continuation line.
15074- s/\(.*\)"\(\n\)"\(.*"\)/\1\2\3/
15075-# Yes, then branch.
15076- ta
15077-# Because we assume that the input file correctly formed the line
15078-# just read cannot be again be a msgid line. So it's safe to ignore
15079-# it.
15080- s/\(.*\)\n.*/\1/
15081- bc
15082-# We found a continuation line. But before printing insert '\'.
15083- :a
15084- s/\(.*\)\(\n.*\)/\1\\\2/
15085- P
15086-# We cannot use D here.
15087- s/.*\n\(.*\)/\1/
15088-# Some buggy seds do not clear the `successful substitution since last ``t'''
15089-# flag on `N', so we do a `t' here to clear it.
15090- tb
15091-# Not reached
15092- :c
15093- x
15094-# The following nice solution is by
15095-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
15096- td
15097-# Increment a decimal number in pattern space.
15098-# First hide trailing `9' digits.
15099- :d
15100- s/9\(_*\)$/_\1/
15101- td
15102-# Assure at least one digit is available.
15103- s/^\(_*\)$/0\1/
15104-# Increment the last digit.
15105- s/8\(_*\)$/9\1/
15106- s/7\(_*\)$/8\1/
15107- s/6\(_*\)$/7\1/
15108- s/5\(_*\)$/6\1/
15109- s/4\(_*\)$/5\1/
15110- s/3\(_*\)$/4\1/
15111- s/2\(_*\)$/3\1/
15112- s/1\(_*\)$/2\1/
15113- s/0\(_*\)$/1\1/
15114-# Convert the hidden `9' digits to `0's.
15115- s/_/0/g
15116- x
15117- G
15118- s/\(.*\)\n\([0-9]*\)/\1, \2},/
15119- s/\(.*\)"$/\1/
15120- p
15121-}
15122-#
15123-# Last line.
15124-#
15125-$ {
15126- i\
15127-};\
15128-
15129- g
15130- s/0*\(.*\)/int _msg_tbl_length = \1;/p
15131-}
15132-d
15133--- lrzsz-0.12.20.safe/intl/printf-args.c 1969-12-31 19:00:00.000000000 -0500
15134+++ lrzsz-0.12.20/intl/printf-args.c 2004-09-12 14:40:34.595711608 -0400
15135@@ -0,0 +1,119 @@
15136+/* Decomposed printf argument list.
15137+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15138+
15139+ This program is free software; you can redistribute it and/or modify it
15140+ under the terms of the GNU Library General Public License as published
15141+ by the Free Software Foundation; either version 2, or (at your option)
15142+ any later version.
15143+
15144+ This program is distributed in the hope that it will be useful,
15145+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15146+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15147+ Library General Public License for more details.
15148+
15149+ You should have received a copy of the GNU Library General Public
15150+ License along with this program; if not, write to the Free Software
15151+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15152+ USA. */
15153+
15154+#ifdef HAVE_CONFIG_H
15155+# include <config.h>
15156+#endif
15157+
15158+/* Specification. */
15159+#include "printf-args.h"
15160+
15161+#ifdef STATIC
15162+STATIC
15163+#endif
15164+int
15165+printf_fetchargs (va_list args, arguments *a)
15166+{
15167+ size_t i;
15168+ argument *ap;
15169+
15170+ for (i = 0, ap = &a->arg[0]; i < a->count; i++, ap++)
15171+ switch (ap->type)
15172+ {
15173+ case TYPE_SCHAR:
15174+ ap->a.a_schar = va_arg (args, /*signed char*/ int);
15175+ break;
15176+ case TYPE_UCHAR:
15177+ ap->a.a_uchar = va_arg (args, /*unsigned char*/ int);
15178+ break;
15179+ case TYPE_SHORT:
15180+ ap->a.a_short = va_arg (args, /*short*/ int);
15181+ break;
15182+ case TYPE_USHORT:
15183+ ap->a.a_ushort = va_arg (args, /*unsigned short*/ int);
15184+ break;
15185+ case TYPE_INT:
15186+ ap->a.a_int = va_arg (args, int);
15187+ break;
15188+ case TYPE_UINT:
15189+ ap->a.a_uint = va_arg (args, unsigned int);
15190+ break;
15191+ case TYPE_LONGINT:
15192+ ap->a.a_longint = va_arg (args, long int);
15193+ break;
15194+ case TYPE_ULONGINT:
15195+ ap->a.a_ulongint = va_arg (args, unsigned long int);
15196+ break;
15197+#ifdef HAVE_LONG_LONG
15198+ case TYPE_LONGLONGINT:
15199+ ap->a.a_longlongint = va_arg (args, long long int);
15200+ break;
15201+ case TYPE_ULONGLONGINT:
15202+ ap->a.a_ulonglongint = va_arg (args, unsigned long long int);
15203+ break;
15204+#endif
15205+ case TYPE_DOUBLE:
15206+ ap->a.a_double = va_arg (args, double);
15207+ break;
15208+#ifdef HAVE_LONG_DOUBLE
15209+ case TYPE_LONGDOUBLE:
15210+ ap->a.a_longdouble = va_arg (args, long double);
15211+ break;
15212+#endif
15213+ case TYPE_CHAR:
15214+ ap->a.a_char = va_arg (args, int);
15215+ break;
15216+#ifdef HAVE_WINT_T
15217+ case TYPE_WIDE_CHAR:
15218+ ap->a.a_wide_char = va_arg (args, wint_t);
15219+ break;
15220+#endif
15221+ case TYPE_STRING:
15222+ ap->a.a_string = va_arg (args, const char *);
15223+ break;
15224+#ifdef HAVE_WCHAR_T
15225+ case TYPE_WIDE_STRING:
15226+ ap->a.a_wide_string = va_arg (args, const wchar_t *);
15227+ break;
15228+#endif
15229+ case TYPE_POINTER:
15230+ ap->a.a_pointer = va_arg (args, void *);
15231+ break;
15232+ case TYPE_COUNT_SCHAR_POINTER:
15233+ ap->a.a_count_schar_pointer = va_arg (args, signed char *);
15234+ break;
15235+ case TYPE_COUNT_SHORT_POINTER:
15236+ ap->a.a_count_short_pointer = va_arg (args, short *);
15237+ break;
15238+ case TYPE_COUNT_INT_POINTER:
15239+ ap->a.a_count_int_pointer = va_arg (args, int *);
15240+ break;
15241+ case TYPE_COUNT_LONGINT_POINTER:
15242+ ap->a.a_count_longint_pointer = va_arg (args, long int *);
15243+ break;
15244+#ifdef HAVE_LONG_LONG
15245+ case TYPE_COUNT_LONGLONGINT_POINTER:
15246+ ap->a.a_count_longlongint_pointer = va_arg (args, long long int *);
15247+ break;
15248+#endif
15249+ default:
15250+ /* Unknown type. */
15251+ return -1;
15252+ }
15253+ return 0;
15254+}
15255--- lrzsz-0.12.20.safe/intl/printf-args.h 1969-12-31 19:00:00.000000000 -0500
15256+++ lrzsz-0.12.20/intl/printf-args.h 2004-09-12 14:40:34.601710696 -0400
15257@@ -0,0 +1,137 @@
15258+/* Decomposed printf argument list.
15259+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
15260+
15261+ This program is free software; you can redistribute it and/or modify it
15262+ under the terms of the GNU Library General Public License as published
15263+ by the Free Software Foundation; either version 2, or (at your option)
15264+ any later version.
15265+
15266+ This program is distributed in the hope that it will be useful,
15267+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15268+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15269+ Library General Public License for more details.
15270+
15271+ You should have received a copy of the GNU Library General Public
15272+ License along with this program; if not, write to the Free Software
15273+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15274+ USA. */
15275+
15276+#ifndef _PRINTF_ARGS_H
15277+#define _PRINTF_ARGS_H
15278+
15279+/* Get size_t. */
15280+#include <stddef.h>
15281+
15282+/* Get wchar_t. */
15283+#ifdef HAVE_WCHAR_T
15284+# include <stddef.h>
15285+#endif
15286+
15287+/* Get wint_t. */
15288+#ifdef HAVE_WINT_T
15289+# include <wchar.h>
15290+#endif
15291+
15292+/* Get va_list. */
15293+#include <stdarg.h>
15294+
15295+
15296+/* Argument types */
15297+typedef enum
15298+{
15299+ TYPE_NONE,
15300+ TYPE_SCHAR,
15301+ TYPE_UCHAR,
15302+ TYPE_SHORT,
15303+ TYPE_USHORT,
15304+ TYPE_INT,
15305+ TYPE_UINT,
15306+ TYPE_LONGINT,
15307+ TYPE_ULONGINT,
15308+#ifdef HAVE_LONG_LONG
15309+ TYPE_LONGLONGINT,
15310+ TYPE_ULONGLONGINT,
15311+#endif
15312+ TYPE_DOUBLE,
15313+#ifdef HAVE_LONG_DOUBLE
15314+ TYPE_LONGDOUBLE,
15315+#endif
15316+ TYPE_CHAR,
15317+#ifdef HAVE_WINT_T
15318+ TYPE_WIDE_CHAR,
15319+#endif
15320+ TYPE_STRING,
15321+#ifdef HAVE_WCHAR_T
15322+ TYPE_WIDE_STRING,
15323+#endif
15324+ TYPE_POINTER,
15325+ TYPE_COUNT_SCHAR_POINTER,
15326+ TYPE_COUNT_SHORT_POINTER,
15327+ TYPE_COUNT_INT_POINTER,
15328+ TYPE_COUNT_LONGINT_POINTER
15329+#ifdef HAVE_LONG_LONG
15330+, TYPE_COUNT_LONGLONGINT_POINTER
15331+#endif
15332+} arg_type;
15333+
15334+/* Polymorphic argument */
15335+typedef struct
15336+{
15337+ arg_type type;
15338+ union
15339+ {
15340+ signed char a_schar;
15341+ unsigned char a_uchar;
15342+ short a_short;
15343+ unsigned short a_ushort;
15344+ int a_int;
15345+ unsigned int a_uint;
15346+ long int a_longint;
15347+ unsigned long int a_ulongint;
15348+#ifdef HAVE_LONG_LONG
15349+ long long int a_longlongint;
15350+ unsigned long long int a_ulonglongint;
15351+#endif
15352+ float a_float;
15353+ double a_double;
15354+#ifdef HAVE_LONG_DOUBLE
15355+ long double a_longdouble;
15356+#endif
15357+ int a_char;
15358+#ifdef HAVE_WINT_T
15359+ wint_t a_wide_char;
15360+#endif
15361+ const char* a_string;
15362+#ifdef HAVE_WCHAR_T
15363+ const wchar_t* a_wide_string;
15364+#endif
15365+ void* a_pointer;
15366+ signed char * a_count_schar_pointer;
15367+ short * a_count_short_pointer;
15368+ int * a_count_int_pointer;
15369+ long int * a_count_longint_pointer;
15370+#ifdef HAVE_LONG_LONG
15371+ long long int * a_count_longlongint_pointer;
15372+#endif
15373+ }
15374+ a;
15375+}
15376+argument;
15377+
15378+typedef struct
15379+{
15380+ size_t count;
15381+ argument *arg;
15382+}
15383+arguments;
15384+
15385+
15386+/* Fetch the arguments, putting them into a. */
15387+#ifdef STATIC
15388+STATIC
15389+#else
15390+extern
15391+#endif
15392+int printf_fetchargs (va_list args, arguments *a);
15393+
15394+#endif /* _PRINTF_ARGS_H */
15395--- lrzsz-0.12.20.safe/intl/printf.c 1969-12-31 19:00:00.000000000 -0500
15396+++ lrzsz-0.12.20/intl/printf.c 2004-09-12 14:40:34.607709784 -0400
15397@@ -0,0 +1,371 @@
15398+/* Formatted output to strings, using POSIX/XSI format strings with positions.
15399+ Copyright (C) 2003 Free Software Foundation, Inc.
15400+ Written by Bruno Haible <bruno@clisp.org>, 2003.
15401+
15402+ This program is free software; you can redistribute it and/or modify it
15403+ under the terms of the GNU Library General Public License as published
15404+ by the Free Software Foundation; either version 2, or (at your option)
15405+ any later version.
15406+
15407+ This program is distributed in the hope that it will be useful,
15408+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15409+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15410+ Library General Public License for more details.
15411+
15412+ You should have received a copy of the GNU Library General Public
15413+ License along with this program; if not, write to the Free Software
15414+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15415+ USA. */
15416+
15417+#ifdef HAVE_CONFIG_H
15418+# include <config.h>
15419+#endif
15420+
15421+#ifdef __GNUC__
15422+# define alloca __builtin_alloca
15423+# define HAVE_ALLOCA 1
15424+#else
15425+# ifdef _MSC_VER
15426+# include <malloc.h>
15427+# define alloca _alloca
15428+# else
15429+# if defined HAVE_ALLOCA_H || defined _LIBC
15430+# include <alloca.h>
15431+# else
15432+# ifdef _AIX
15433+ #pragma alloca
15434+# else
15435+# ifndef alloca
15436+char *alloca ();
15437+# endif
15438+# endif
15439+# endif
15440+# endif
15441+#endif
15442+
15443+#include <stdio.h>
15444+
15445+#if !HAVE_POSIX_PRINTF
15446+
15447+#include <stdlib.h>
15448+#include <string.h>
15449+
15450+/* When building a DLL, we must export some functions. Note that because
15451+ the functions are only defined for binary backward compatibility, we
15452+ don't need to use __declspec(dllimport) in any case. */
15453+#if defined _MSC_VER && BUILDING_DLL
15454+# define DLL_EXPORTED __declspec(dllexport)
15455+#else
15456+# define DLL_EXPORTED
15457+#endif
15458+
15459+#define STATIC static
15460+
15461+/* Define auxiliary functions declared in "printf-args.h". */
15462+#include "printf-args.c"
15463+
15464+/* Define auxiliary functions declared in "printf-parse.h". */
15465+#include "printf-parse.c"
15466+
15467+/* Define functions declared in "vasnprintf.h". */
15468+#define vasnprintf libintl_vasnprintf
15469+#include "vasnprintf.c"
15470+#if 0 /* not needed */
15471+#define asnprintf libintl_asnprintf
15472+#include "asnprintf.c"
15473+#endif
15474+
15475+DLL_EXPORTED
15476+int
15477+libintl_vfprintf (FILE *stream, const char *format, va_list args)
15478+{
15479+ if (strchr (format, '$') == NULL)
15480+ return vfprintf (stream, format, args);
15481+ else
15482+ {
15483+ size_t length;
15484+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15485+ int retval = -1;
15486+ if (result != NULL)
15487+ {
15488+ if (fwrite (result, 1, length, stream) == length)
15489+ retval = length;
15490+ free (result);
15491+ }
15492+ return retval;
15493+ }
15494+}
15495+
15496+DLL_EXPORTED
15497+int
15498+libintl_fprintf (FILE *stream, const char *format, ...)
15499+{
15500+ va_list args;
15501+ int retval;
15502+
15503+ va_start (args, format);
15504+ retval = libintl_vfprintf (stream, format, args);
15505+ va_end (args);
15506+ return retval;
15507+}
15508+
15509+DLL_EXPORTED
15510+int
15511+libintl_vprintf (const char *format, va_list args)
15512+{
15513+ return libintl_vfprintf (stdout, format, args);
15514+}
15515+
15516+DLL_EXPORTED
15517+int
15518+libintl_printf (const char *format, ...)
15519+{
15520+ va_list args;
15521+ int retval;
15522+
15523+ va_start (args, format);
15524+ retval = libintl_vprintf (format, args);
15525+ va_end (args);
15526+ return retval;
15527+}
15528+
15529+DLL_EXPORTED
15530+int
15531+libintl_vsprintf (char *resultbuf, const char *format, va_list args)
15532+{
15533+ if (strchr (format, '$') == NULL)
15534+ return vsprintf (resultbuf, format, args);
15535+ else
15536+ {
15537+ size_t length = (size_t) ~0 / (4 * sizeof (char));
15538+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15539+ if (result != resultbuf)
15540+ {
15541+ free (result);
15542+ return -1;
15543+ }
15544+ else
15545+ return length;
15546+ }
15547+}
15548+
15549+DLL_EXPORTED
15550+int
15551+libintl_sprintf (char *resultbuf, const char *format, ...)
15552+{
15553+ va_list args;
15554+ int retval;
15555+
15556+ va_start (args, format);
15557+ retval = libintl_vsprintf (resultbuf, format, args);
15558+ va_end (args);
15559+ return retval;
15560+}
15561+
15562+#if HAVE_SNPRINTF
15563+
15564+# if HAVE_DECL__SNPRINTF
15565+ /* Windows. */
15566+# define system_vsnprintf _vsnprintf
15567+# else
15568+ /* Unix. */
15569+# define system_vsnprintf vsnprintf
15570+# endif
15571+
15572+DLL_EXPORTED
15573+int
15574+libintl_vsnprintf (char *resultbuf, size_t length, const char *format, va_list args)
15575+{
15576+ if (strchr (format, '$') == NULL)
15577+ return system_vsnprintf (resultbuf, length, format, args);
15578+ else
15579+ {
15580+ size_t maxlength = length;
15581+ char *result = libintl_vasnprintf (resultbuf, &length, format, args);
15582+ if (result != resultbuf)
15583+ {
15584+ if (maxlength > 0)
15585+ {
15586+ if (length < maxlength)
15587+ abort ();
15588+ memcpy (resultbuf, result, maxlength - 1);
15589+ resultbuf[maxlength - 1] = '\0';
15590+ }
15591+ free (result);
15592+ return -1;
15593+ }
15594+ else
15595+ return length;
15596+ }
15597+}
15598+
15599+DLL_EXPORTED
15600+int
15601+libintl_snprintf (char *resultbuf, size_t length, const char *format, ...)
15602+{
15603+ va_list args;
15604+ int retval;
15605+
15606+ va_start (args, format);
15607+ retval = libintl_vsnprintf (resultbuf, length, format, args);
15608+ va_end (args);
15609+ return retval;
15610+}
15611+
15612+#endif
15613+
15614+#if HAVE_ASPRINTF
15615+
15616+DLL_EXPORTED
15617+int
15618+libintl_vasprintf (char **resultp, const char *format, va_list args)
15619+{
15620+ size_t length;
15621+ char *result = libintl_vasnprintf (NULL, &length, format, args);
15622+ if (result == NULL)
15623+ return -1;
15624+ *resultp = result;
15625+ return length;
15626+}
15627+
15628+DLL_EXPORTED
15629+int
15630+libintl_asprintf (char **resultp, const char *format, ...)
15631+{
15632+ va_list args;
15633+ int retval;
15634+
15635+ va_start (args, format);
15636+ retval = libintl_vasprintf (resultp, format, args);
15637+ va_end (args);
15638+ return retval;
15639+}
15640+
15641+#endif
15642+
15643+#if HAVE_FWPRINTF
15644+
15645+#include <wchar.h>
15646+
15647+#define WIDE_CHAR_VERSION 1
15648+
15649+/* Define auxiliary functions declared in "wprintf-parse.h". */
15650+#include "printf-parse.c"
15651+
15652+/* Define functions declared in "vasnprintf.h". */
15653+#define vasnwprintf libintl_vasnwprintf
15654+#include "vasnprintf.c"
15655+#if 0 /* not needed */
15656+#define asnwprintf libintl_asnwprintf
15657+#include "asnprintf.c"
15658+#endif
15659+
15660+# if HAVE_DECL__SNWPRINTF
15661+ /* Windows. */
15662+# define system_vswprintf _vsnwprintf
15663+# else
15664+ /* Unix. */
15665+# define system_vswprintf vswprintf
15666+# endif
15667+
15668+DLL_EXPORTED
15669+int
15670+libintl_vfwprintf (FILE *stream, const wchar_t *format, va_list args)
15671+{
15672+ if (wcschr (format, '$') == NULL)
15673+ return vfwprintf (stream, format, args);
15674+ else
15675+ {
15676+ size_t length;
15677+ wchar_t *result = libintl_vasnwprintf (NULL, &length, format, args);
15678+ int retval = -1;
15679+ if (result != NULL)
15680+ {
15681+ size_t i;
15682+ for (i = 0; i < length; i++)
15683+ if (fputwc (result[i], stream) == WEOF)
15684+ break;
15685+ if (i == length)
15686+ retval = length;
15687+ free (result);
15688+ }
15689+ return retval;
15690+ }
15691+}
15692+
15693+DLL_EXPORTED
15694+int
15695+libintl_fwprintf (FILE *stream, const wchar_t *format, ...)
15696+{
15697+ va_list args;
15698+ int retval;
15699+
15700+ va_start (args, format);
15701+ retval = libintl_vfwprintf (stream, format, args);
15702+ va_end (args);
15703+ return retval;
15704+}
15705+
15706+DLL_EXPORTED
15707+int
15708+libintl_vwprintf (const wchar_t *format, va_list args)
15709+{
15710+ return libintl_vfwprintf (stdout, format, args);
15711+}
15712+
15713+DLL_EXPORTED
15714+int
15715+libintl_wprintf (const wchar_t *format, ...)
15716+{
15717+ va_list args;
15718+ int retval;
15719+
15720+ va_start (args, format);
15721+ retval = libintl_vwprintf (format, args);
15722+ va_end (args);
15723+ return retval;
15724+}
15725+
15726+DLL_EXPORTED
15727+int
15728+libintl_vswprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, va_list args)
15729+{
15730+ if (wcschr (format, '$') == NULL)
15731+ return system_vswprintf (resultbuf, length, format, args);
15732+ else
15733+ {
15734+ size_t maxlength = length;
15735+ wchar_t *result = libintl_vasnwprintf (resultbuf, &length, format, args);
15736+ if (result != resultbuf)
15737+ {
15738+ if (maxlength > 0)
15739+ {
15740+ if (length < maxlength)
15741+ abort ();
15742+ memcpy (resultbuf, result, (maxlength - 1) * sizeof (wchar_t));
15743+ resultbuf[maxlength - 1] = 0;
15744+ }
15745+ free (result);
15746+ return -1;
15747+ }
15748+ else
15749+ return length;
15750+ }
15751+}
15752+
15753+DLL_EXPORTED
15754+int
15755+libintl_swprintf (wchar_t *resultbuf, size_t length, const wchar_t *format, ...)
15756+{
15757+ va_list args;
15758+ int retval;
15759+
15760+ va_start (args, format);
15761+ retval = libintl_vswprintf (resultbuf, length, format, args);
15762+ va_end (args);
15763+ return retval;
15764+}
15765+
15766+#endif
15767+
15768+#endif
15769--- lrzsz-0.12.20.safe/intl/printf-parse.c 1969-12-31 19:00:00.000000000 -0500
15770+++ lrzsz-0.12.20/intl/printf-parse.c 2004-09-12 14:40:34.622707504 -0400
15771@@ -0,0 +1,537 @@
15772+/* Formatted output to strings.
15773+ Copyright (C) 1999-2000, 2002-2003 Free Software Foundation, Inc.
15774+
15775+ This program is free software; you can redistribute it and/or modify it
15776+ under the terms of the GNU Library General Public License as published
15777+ by the Free Software Foundation; either version 2, or (at your option)
15778+ any later version.
15779+
15780+ This program is distributed in the hope that it will be useful,
15781+ but WITHOUT ANY WARRANTY; without even the implied warranty of
15782+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15783+ Library General Public License for more details.
15784+
15785+ You should have received a copy of the GNU Library General Public
15786+ License along with this program; if not, write to the Free Software
15787+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
15788+ USA. */
15789+
15790+#ifdef HAVE_CONFIG_H
15791+# include <config.h>
15792+#endif
15793+
15794+/* Specification. */
15795+#if WIDE_CHAR_VERSION
15796+# include "wprintf-parse.h"
15797+#else
15798+# include "printf-parse.h"
15799+#endif
15800+
15801+/* Get size_t, NULL. */
15802+#include <stddef.h>
15803+
15804+/* Get intmax_t. */
15805+#if HAVE_STDINT_H_WITH_UINTMAX
15806+# include <stdint.h>
15807+#endif
15808+#if HAVE_INTTYPES_H_WITH_UINTMAX
15809+# include <inttypes.h>
15810+#endif
15811+
15812+/* malloc(), realloc(), free(). */
15813+#include <stdlib.h>
15814+
15815+/* Checked size_t computations. */
15816+#include "xsize.h"
15817+
15818+#if WIDE_CHAR_VERSION
15819+# define PRINTF_PARSE wprintf_parse
15820+# define CHAR_T wchar_t
15821+# define DIRECTIVE wchar_t_directive
15822+# define DIRECTIVES wchar_t_directives
15823+#else
15824+# define PRINTF_PARSE printf_parse
15825+# define CHAR_T char
15826+# define DIRECTIVE char_directive
15827+# define DIRECTIVES char_directives
15828+#endif
15829+
15830+#ifdef STATIC
15831+STATIC
15832+#endif
15833+int
15834+PRINTF_PARSE (const CHAR_T *format, DIRECTIVES *d, arguments *a)
15835+{
15836+ const CHAR_T *cp = format; /* pointer into format */
15837+ size_t arg_posn = 0; /* number of regular arguments consumed */
15838+ size_t d_allocated; /* allocated elements of d->dir */
15839+ size_t a_allocated; /* allocated elements of a->arg */
15840+ size_t max_width_length = 0;
15841+ size_t max_precision_length = 0;
15842+
15843+ d->count = 0;
15844+ d_allocated = 1;
15845+ d->dir = malloc (d_allocated * sizeof (DIRECTIVE));
15846+ if (d->dir == NULL)
15847+ /* Out of memory. */
15848+ return -1;
15849+
15850+ a->count = 0;
15851+ a_allocated = 0;
15852+ a->arg = NULL;
15853+
15854+#define REGISTER_ARG(_index_,_type_) \
15855+ { \
15856+ size_t n = (_index_); \
15857+ if (n >= a_allocated) \
15858+ { \
15859+ size_t memory_size; \
15860+ argument *memory; \
15861+ \
15862+ a_allocated = xtimes (a_allocated, 2); \
15863+ if (a_allocated <= n) \
15864+ a_allocated = xsum (n, 1); \
15865+ memory_size = xtimes (a_allocated, sizeof (argument)); \
15866+ if (size_overflow_p (memory_size)) \
15867+ /* Overflow, would lead to out of memory. */ \
15868+ goto error; \
15869+ memory = (a->arg \
15870+ ? realloc (a->arg, memory_size) \
15871+ : malloc (memory_size)); \
15872+ if (memory == NULL) \
15873+ /* Out of memory. */ \
15874+ goto error; \
15875+ a->arg = memory; \
15876+ } \
15877+ while (a->count <= n) \
15878+ a->arg[a->count++].type = TYPE_NONE; \
15879+ if (a->arg[n].type == TYPE_NONE) \
15880+ a->arg[n].type = (_type_); \
15881+ else if (a->arg[n].type != (_type_)) \
15882+ /* Ambiguous type for positional argument. */ \
15883+ goto error; \
15884+ }
15885+
15886+ while (*cp != '\0')
15887+ {
15888+ CHAR_T c = *cp++;
15889+ if (c == '%')
15890+ {
15891+ size_t arg_index = ARG_NONE;
15892+ DIRECTIVE *dp = &d->dir[d->count];/* pointer to next directive */
15893+
15894+ /* Initialize the next directive. */
15895+ dp->dir_start = cp - 1;
15896+ dp->flags = 0;
15897+ dp->width_start = NULL;
15898+ dp->width_end = NULL;
15899+ dp->width_arg_index = ARG_NONE;
15900+ dp->precision_start = NULL;
15901+ dp->precision_end = NULL;
15902+ dp->precision_arg_index = ARG_NONE;
15903+ dp->arg_index = ARG_NONE;
15904+
15905+ /* Test for positional argument. */
15906+ if (*cp >= '0' && *cp <= '9')
15907+ {
15908+ const CHAR_T *np;
15909+
15910+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15911+ ;
15912+ if (*np == '$')
15913+ {
15914+ size_t n = 0;
15915+
15916+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15917+ n = xsum (xtimes (n, 10), *np - '0');
15918+ if (n == 0)
15919+ /* Positional argument 0. */
15920+ goto error;
15921+ if (size_overflow_p (n))
15922+ /* n too large, would lead to out of memory later. */
15923+ goto error;
15924+ arg_index = n - 1;
15925+ cp = np + 1;
15926+ }
15927+ }
15928+
15929+ /* Read the flags. */
15930+ for (;;)
15931+ {
15932+ if (*cp == '\'')
15933+ {
15934+ dp->flags |= FLAG_GROUP;
15935+ cp++;
15936+ }
15937+ else if (*cp == '-')
15938+ {
15939+ dp->flags |= FLAG_LEFT;
15940+ cp++;
15941+ }
15942+ else if (*cp == '+')
15943+ {
15944+ dp->flags |= FLAG_SHOWSIGN;
15945+ cp++;
15946+ }
15947+ else if (*cp == ' ')
15948+ {
15949+ dp->flags |= FLAG_SPACE;
15950+ cp++;
15951+ }
15952+ else if (*cp == '#')
15953+ {
15954+ dp->flags |= FLAG_ALT;
15955+ cp++;
15956+ }
15957+ else if (*cp == '0')
15958+ {
15959+ dp->flags |= FLAG_ZERO;
15960+ cp++;
15961+ }
15962+ else
15963+ break;
15964+ }
15965+
15966+ /* Parse the field width. */
15967+ if (*cp == '*')
15968+ {
15969+ dp->width_start = cp;
15970+ cp++;
15971+ dp->width_end = cp;
15972+ if (max_width_length < 1)
15973+ max_width_length = 1;
15974+
15975+ /* Test for positional argument. */
15976+ if (*cp >= '0' && *cp <= '9')
15977+ {
15978+ const CHAR_T *np;
15979+
15980+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15981+ ;
15982+ if (*np == '$')
15983+ {
15984+ size_t n = 0;
15985+
15986+ for (np = cp; *np >= '0' && *np <= '9'; np++)
15987+ n = xsum (xtimes (n, 10), *np - '0');
15988+ if (n == 0)
15989+ /* Positional argument 0. */
15990+ goto error;
15991+ if (size_overflow_p (n))
15992+ /* n too large, would lead to out of memory later. */
15993+ goto error;
15994+ dp->width_arg_index = n - 1;
15995+ cp = np + 1;
15996+ }
15997+ }
15998+ if (dp->width_arg_index == ARG_NONE)
15999+ {
16000+ dp->width_arg_index = arg_posn++;
16001+ if (dp->width_arg_index == ARG_NONE)
16002+ /* arg_posn wrapped around. */
16003+ goto error;
16004+ }
16005+ REGISTER_ARG (dp->width_arg_index, TYPE_INT);
16006+ }
16007+ else if (*cp >= '0' && *cp <= '9')
16008+ {
16009+ size_t width_length;
16010+
16011+ dp->width_start = cp;
16012+ for (; *cp >= '0' && *cp <= '9'; cp++)
16013+ ;
16014+ dp->width_end = cp;
16015+ width_length = dp->width_end - dp->width_start;
16016+ if (max_width_length < width_length)
16017+ max_width_length = width_length;
16018+ }
16019+
16020+ /* Parse the precision. */
16021+ if (*cp == '.')
16022+ {
16023+ cp++;
16024+ if (*cp == '*')
16025+ {
16026+ dp->precision_start = cp - 1;
16027+ cp++;
16028+ dp->precision_end = cp;
16029+ if (max_precision_length < 2)
16030+ max_precision_length = 2;
16031+
16032+ /* Test for positional argument. */
16033+ if (*cp >= '0' && *cp <= '9')
16034+ {
16035+ const CHAR_T *np;
16036+
16037+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16038+ ;
16039+ if (*np == '$')
16040+ {
16041+ size_t n = 0;
16042+
16043+ for (np = cp; *np >= '0' && *np <= '9'; np++)
16044+ n = xsum (xtimes (n, 10), *np - '0');
16045+ if (n == 0)
16046+ /* Positional argument 0. */
16047+ goto error;
16048+ if (size_overflow_p (n))
16049+ /* n too large, would lead to out of memory
16050+ later. */
16051+ goto error;
16052+ dp->precision_arg_index = n - 1;
16053+ cp = np + 1;
16054+ }
16055+ }
16056+ if (dp->precision_arg_index == ARG_NONE)
16057+ {
16058+ dp->precision_arg_index = arg_posn++;
16059+ if (dp->precision_arg_index == ARG_NONE)
16060+ /* arg_posn wrapped around. */
16061+ goto error;
16062+ }
16063+ REGISTER_ARG (dp->precision_arg_index, TYPE_INT);
16064+ }
16065+ else
16066+ {
16067+ size_t precision_length;
16068+
16069+ dp->precision_start = cp - 1;
16070+ for (; *cp >= '0' && *cp <= '9'; cp++)
16071+ ;
16072+ dp->precision_end = cp;
16073+ precision_length = dp->precision_end - dp->precision_start;
16074+ if (max_precision_length < precision_length)
16075+ max_precision_length = precision_length;
16076+ }
16077+ }
16078+
16079+ {
16080+ arg_type type;
16081+
16082+ /* Parse argument type/size specifiers. */
16083+ {
16084+ int flags = 0;
16085+
16086+ for (;;)
16087+ {
16088+ if (*cp == 'h')
16089+ {
16090+ flags |= (1 << (flags & 1));
16091+ cp++;
16092+ }
16093+ else if (*cp == 'L')
16094+ {
16095+ flags |= 4;
16096+ cp++;
16097+ }
16098+ else if (*cp == 'l')
16099+ {
16100+ flags += 8;
16101+ cp++;
16102+ }
16103+#ifdef HAVE_INTMAX_T
16104+ else if (*cp == 'j')
16105+ {
16106+ if (sizeof (intmax_t) > sizeof (long))
16107+ {
16108+ /* intmax_t = long long */
16109+ flags += 16;
16110+ }
16111+ else if (sizeof (intmax_t) > sizeof (int))
16112+ {
16113+ /* intmax_t = long */
16114+ flags += 8;
16115+ }
16116+ cp++;
16117+ }
16118+#endif
16119+ else if (*cp == 'z' || *cp == 'Z')
16120+ {
16121+ /* 'z' is standardized in ISO C 99, but glibc uses 'Z'
16122+ because the warning facility in gcc-2.95.2 understands
16123+ only 'Z' (see gcc-2.95.2/gcc/c-common.c:1784). */
16124+ if (sizeof (size_t) > sizeof (long))
16125+ {
16126+ /* size_t = long long */
16127+ flags += 16;
16128+ }
16129+ else if (sizeof (size_t) > sizeof (int))
16130+ {
16131+ /* size_t = long */
16132+ flags += 8;
16133+ }
16134+ cp++;
16135+ }
16136+ else if (*cp == 't')
16137+ {
16138+ if (sizeof (ptrdiff_t) > sizeof (long))
16139+ {
16140+ /* ptrdiff_t = long long */
16141+ flags += 16;
16142+ }
16143+ else if (sizeof (ptrdiff_t) > sizeof (int))
16144+ {
16145+ /* ptrdiff_t = long */
16146+ flags += 8;
16147+ }
16148+ cp++;
16149+ }
16150+ else
16151+ break;
16152+ }
16153+
16154+ /* Read the conversion character. */
16155+ c = *cp++;
16156+ switch (c)
16157+ {
16158+ case 'd': case 'i':
16159+#ifdef HAVE_LONG_LONG
16160+ if (flags >= 16 || (flags & 4))
16161+ type = TYPE_LONGLONGINT;
16162+ else
16163+#endif
16164+ if (flags >= 8)
16165+ type = TYPE_LONGINT;
16166+ else if (flags & 2)
16167+ type = TYPE_SCHAR;
16168+ else if (flags & 1)
16169+ type = TYPE_SHORT;
16170+ else
16171+ type = TYPE_INT;
16172+ break;
16173+ case 'o': case 'u': case 'x': case 'X':
16174+#ifdef HAVE_LONG_LONG
16175+ if (flags >= 16 || (flags & 4))
16176+ type = TYPE_ULONGLONGINT;
16177+ else
16178+#endif
16179+ if (flags >= 8)
16180+ type = TYPE_ULONGINT;
16181+ else if (flags & 2)
16182+ type = TYPE_UCHAR;
16183+ else if (flags & 1)
16184+ type = TYPE_USHORT;
16185+ else
16186+ type = TYPE_UINT;
16187+ break;
16188+ case 'f': case 'F': case 'e': case 'E': case 'g': case 'G':
16189+ case 'a': case 'A':
16190+#ifdef HAVE_LONG_DOUBLE
16191+ if (flags >= 16 || (flags & 4))
16192+ type = TYPE_LONGDOUBLE;
16193+ else
16194+#endif
16195+ type = TYPE_DOUBLE;
16196+ break;
16197+ case 'c':
16198+ if (flags >= 8)
16199+#ifdef HAVE_WINT_T
16200+ type = TYPE_WIDE_CHAR;
16201+#else
16202+ goto error;
16203+#endif
16204+ else
16205+ type = TYPE_CHAR;
16206+ break;
16207+#ifdef HAVE_WINT_T
16208+ case 'C':
16209+ type = TYPE_WIDE_CHAR;
16210+ c = 'c';
16211+ break;
16212+#endif
16213+ case 's':
16214+ if (flags >= 8)
16215+#ifdef HAVE_WCHAR_T
16216+ type = TYPE_WIDE_STRING;
16217+#else
16218+ goto error;
16219+#endif
16220+ else
16221+ type = TYPE_STRING;
16222+ break;
16223+#ifdef HAVE_WCHAR_T
16224+ case 'S':
16225+ type = TYPE_WIDE_STRING;
16226+ c = 's';
16227+ break;
16228+#endif
16229+ case 'p':
16230+ type = TYPE_POINTER;
16231+ break;
16232+ case 'n':
16233+#ifdef HAVE_LONG_LONG
16234+ if (flags >= 16 || (flags & 4))
16235+ type = TYPE_COUNT_LONGLONGINT_POINTER;
16236+ else
16237+#endif
16238+ if (flags >= 8)
16239+ type = TYPE_COUNT_LONGINT_POINTER;
16240+ else if (flags & 2)
16241+ type = TYPE_COUNT_SCHAR_POINTER;
16242+ else if (flags & 1)
16243+ type = TYPE_COUNT_SHORT_POINTER;
16244+ else
16245+ type = TYPE_COUNT_INT_POINTER;
16246+ break;
16247+ case '%':
16248+ type = TYPE_NONE;
16249+ break;
16250+ default:
16251+ /* Unknown conversion character. */
16252+ goto error;
16253+ }
16254+ }
16255+
16256+ if (type != TYPE_NONE)
16257+ {
16258+ dp->arg_index = arg_index;
16259+ if (dp->arg_index == ARG_NONE)
16260+ {
16261+ dp->arg_index = arg_posn++;
16262+ if (dp->arg_index == ARG_NONE)
16263+ /* arg_posn wrapped around. */
16264+ goto error;
16265+ }
16266+ REGISTER_ARG (dp->arg_index, type);
16267+ }
16268+ dp->conversion = c;
16269+ dp->dir_end = cp;
16270+ }
16271+
16272+ d->count++;
16273+ if (d->count >= d_allocated)
16274+ {
16275+ size_t memory_size;
16276+ DIRECTIVE *memory;
16277+
16278+ d_allocated = xtimes (d_allocated, 2);
16279+ memory_size = xtimes (d_allocated, sizeof (DIRECTIVE));
16280+ if (size_overflow_p (memory_size))
16281+ /* Overflow, would lead to out of memory. */
16282+ goto error;
16283+ memory = realloc (d->dir, memory_size);
16284+ if (memory == NULL)
16285+ /* Out of memory. */
16286+ goto error;
16287+ d->dir = memory;
16288+ }
16289+ }
16290+ }
16291+ d->dir[d->count].dir_start = cp;
16292+
16293+ d->max_width_length = max_width_length;
16294+ d->max_precision_length = max_precision_length;
16295+ return 0;
16296+
16297+error:
16298+ if (a->arg)
16299+ free (a->arg);
16300+ if (d->dir)
16301+ free (d->dir);
16302+ return -1;
16303+}
16304+
16305+#undef DIRECTIVES
16306+#undef DIRECTIVE
16307+#undef CHAR_T
16308+#undef PRINTF_PARSE
16309--- lrzsz-0.12.20.safe/intl/printf-parse.h 1969-12-31 19:00:00.000000000 -0500
16310+++ lrzsz-0.12.20/intl/printf-parse.h 2004-09-12 14:40:34.628706592 -0400
16311@@ -0,0 +1,75 @@
16312+/* Parse printf format string.
16313+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
16314+
16315+ This program is free software; you can redistribute it and/or modify it
16316+ under the terms of the GNU Library General Public License as published
16317+ by the Free Software Foundation; either version 2, or (at your option)
16318+ any later version.
16319+
16320+ This program is distributed in the hope that it will be useful,
16321+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16322+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16323+ Library General Public License for more details.
16324+
16325+ You should have received a copy of the GNU Library General Public
16326+ License along with this program; if not, write to the Free Software
16327+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16328+ USA. */
16329+
16330+#ifndef _PRINTF_PARSE_H
16331+#define _PRINTF_PARSE_H
16332+
16333+#include "printf-args.h"
16334+
16335+
16336+/* Flags */
16337+#define FLAG_GROUP 1 /* ' flag */
16338+#define FLAG_LEFT 2 /* - flag */
16339+#define FLAG_SHOWSIGN 4 /* + flag */
16340+#define FLAG_SPACE 8 /* space flag */
16341+#define FLAG_ALT 16 /* # flag */
16342+#define FLAG_ZERO 32
16343+
16344+/* arg_index value indicating that no argument is consumed. */
16345+#define ARG_NONE (~(size_t)0)
16346+
16347+/* A parsed directive. */
16348+typedef struct
16349+{
16350+ const char* dir_start;
16351+ const char* dir_end;
16352+ int flags;
16353+ const char* width_start;
16354+ const char* width_end;
16355+ size_t width_arg_index;
16356+ const char* precision_start;
16357+ const char* precision_end;
16358+ size_t precision_arg_index;
16359+ char conversion; /* d i o u x X f e E g G c s p n U % but not C S */
16360+ size_t arg_index;
16361+}
16362+char_directive;
16363+
16364+/* A parsed format string. */
16365+typedef struct
16366+{
16367+ size_t count;
16368+ char_directive *dir;
16369+ size_t max_width_length;
16370+ size_t max_precision_length;
16371+}
16372+char_directives;
16373+
16374+
16375+/* Parses the format string. Fills in the number N of directives, and fills
16376+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
16377+ to the end of the format string. Also fills in the arg_type fields of the
16378+ arguments and the needed count of arguments. */
16379+#ifdef STATIC
16380+STATIC
16381+#else
16382+extern
16383+#endif
16384+int printf_parse (const char *format, char_directives *d, arguments *a);
16385+
16386+#endif /* _PRINTF_PARSE_H */
16387--- lrzsz-0.12.20.safe/intl/ref-add.sin 1969-12-31 19:00:00.000000000 -0500
16388+++ lrzsz-0.12.20/intl/ref-add.sin 2004-09-12 14:40:34.633705832 -0400
16389@@ -0,0 +1,31 @@
16390+# Add this package to a list of references stored in a text file.
16391+#
16392+# Copyright (C) 2000 Free Software Foundation, Inc.
16393+#
16394+# This program is free software; you can redistribute it and/or modify it
16395+# under the terms of the GNU Library General Public License as published
16396+# by the Free Software Foundation; either version 2, or (at your option)
16397+# any later version.
16398+#
16399+# This program is distributed in the hope that it will be useful,
16400+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16401+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16402+# Library General Public License for more details.
16403+#
16404+# You should have received a copy of the GNU Library General Public
16405+# License along with this program; if not, write to the Free Software
16406+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16407+# USA.
16408+#
16409+# Written by Bruno Haible <haible@clisp.cons.org>.
16410+#
16411+/^# Packages using this file: / {
16412+ s/# Packages using this file://
16413+ ta
16414+ :a
16415+ s/ @PACKAGE@ / @PACKAGE@ /
16416+ tb
16417+ s/ $/ @PACKAGE@ /
16418+ :b
16419+ s/^/# Packages using this file:/
16420+}
16421--- lrzsz-0.12.20.safe/intl/ref-del.sin 1969-12-31 19:00:00.000000000 -0500
16422+++ lrzsz-0.12.20/intl/ref-del.sin 2004-09-12 14:40:34.638705072 -0400
16423@@ -0,0 +1,26 @@
16424+# Remove this package from a list of references stored in a text file.
16425+#
16426+# Copyright (C) 2000 Free Software Foundation, Inc.
16427+#
16428+# This program is free software; you can redistribute it and/or modify it
16429+# under the terms of the GNU Library General Public License as published
16430+# by the Free Software Foundation; either version 2, or (at your option)
16431+# any later version.
16432+#
16433+# This program is distributed in the hope that it will be useful,
16434+# but WITHOUT ANY WARRANTY; without even the implied warranty of
16435+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16436+# Library General Public License for more details.
16437+#
16438+# You should have received a copy of the GNU Library General Public
16439+# License along with this program; if not, write to the Free Software
16440+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16441+# USA.
16442+#
16443+# Written by Bruno Haible <haible@clisp.cons.org>.
16444+#
16445+/^# Packages using this file: / {
16446+ s/# Packages using this file://
16447+ s/ @PACKAGE@ / /
16448+ s/^/# Packages using this file:/
16449+}
16450--- lrzsz-0.12.20.safe/intl/relocatable.c 1969-12-31 19:00:00.000000000 -0500
16451+++ lrzsz-0.12.20/intl/relocatable.c 2004-09-12 14:40:34.644704160 -0400
16452@@ -0,0 +1,449 @@
16453+/* Provide relocatable packages.
16454+ Copyright (C) 2003 Free Software Foundation, Inc.
16455+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16456+
16457+ This program is free software; you can redistribute it and/or modify it
16458+ under the terms of the GNU Library General Public License as published
16459+ by the Free Software Foundation; either version 2, or (at your option)
16460+ any later version.
16461+
16462+ This program is distributed in the hope that it will be useful,
16463+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16464+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16465+ Library General Public License for more details.
16466+
16467+ You should have received a copy of the GNU Library General Public
16468+ License along with this program; if not, write to the Free Software
16469+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16470+ USA. */
16471+
16472+
16473+/* Tell glibc's <stdio.h> to provide a prototype for getline().
16474+ This must come before <config.h> because <config.h> may include
16475+ <features.h>, and once <features.h> has been included, it's too late. */
16476+#ifndef _GNU_SOURCE
16477+# define _GNU_SOURCE 1
16478+#endif
16479+
16480+#ifdef HAVE_CONFIG_H
16481+# include "config.h"
16482+#endif
16483+
16484+/* Specification. */
16485+#include "relocatable.h"
16486+
16487+#if ENABLE_RELOCATABLE
16488+
16489+#include <stddef.h>
16490+#include <stdio.h>
16491+#include <stdlib.h>
16492+#include <string.h>
16493+
16494+#ifdef NO_XMALLOC
16495+# define xmalloc malloc
16496+#else
16497+# include "xalloc.h"
16498+#endif
16499+
16500+#if defined _WIN32 || defined __WIN32__
16501+# define WIN32_LEAN_AND_MEAN
16502+# include <windows.h>
16503+#endif
16504+
16505+#if DEPENDS_ON_LIBCHARSET
16506+# include <libcharset.h>
16507+#endif
16508+#if DEPENDS_ON_LIBICONV && HAVE_ICONV
16509+# include <iconv.h>
16510+#endif
16511+#if DEPENDS_ON_LIBINTL && ENABLE_NLS
16512+# include <libintl.h>
16513+#endif
16514+
16515+/* Faked cheap 'bool'. */
16516+#undef bool
16517+#undef false
16518+#undef true
16519+#define bool int
16520+#define false 0
16521+#define true 1
16522+
16523+/* Pathname support.
16524+ ISSLASH(C) tests whether C is a directory separator character.
16525+ IS_PATH_WITH_DIR(P) tests whether P contains a directory specification.
16526+ */
16527+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16528+ /* Win32, OS/2, DOS */
16529+# define ISSLASH(C) ((C) == '/' || (C) == '\\')
16530+# define HAS_DEVICE(P) \
16531+ ((((P)[0] >= 'A' && (P)[0] <= 'Z') || ((P)[0] >= 'a' && (P)[0] <= 'z')) \
16532+ && (P)[1] == ':')
16533+# define IS_PATH_WITH_DIR(P) \
16534+ (strchr (P, '/') != NULL || strchr (P, '\\') != NULL || HAS_DEVICE (P))
16535+# define FILESYSTEM_PREFIX_LEN(P) (HAS_DEVICE (P) ? 2 : 0)
16536+#else
16537+ /* Unix */
16538+# define ISSLASH(C) ((C) == '/')
16539+# define IS_PATH_WITH_DIR(P) (strchr (P, '/') != NULL)
16540+# define FILESYSTEM_PREFIX_LEN(P) 0
16541+#endif
16542+
16543+/* Original installation prefix. */
16544+static char *orig_prefix;
16545+static size_t orig_prefix_len;
16546+/* Current installation prefix. */
16547+static char *curr_prefix;
16548+static size_t curr_prefix_len;
16549+/* These prefixes do not end in a slash. Anything that will be concatenated
16550+ to them must start with a slash. */
16551+
16552+/* Sets the original and the current installation prefix of this module.
16553+ Relocation simply replaces a pathname starting with the original prefix
16554+ by the corresponding pathname with the current prefix instead. Both
16555+ prefixes should be directory names without trailing slash (i.e. use ""
16556+ instead of "/"). */
16557+static void
16558+set_this_relocation_prefix (const char *orig_prefix_arg,
16559+ const char *curr_prefix_arg)
16560+{
16561+ if (orig_prefix_arg != NULL && curr_prefix_arg != NULL
16562+ /* Optimization: if orig_prefix and curr_prefix are equal, the
16563+ relocation is a nop. */
16564+ && strcmp (orig_prefix_arg, curr_prefix_arg) != 0)
16565+ {
16566+ /* Duplicate the argument strings. */
16567+ char *memory;
16568+
16569+ orig_prefix_len = strlen (orig_prefix_arg);
16570+ curr_prefix_len = strlen (curr_prefix_arg);
16571+ memory = (char *) xmalloc (orig_prefix_len + 1 + curr_prefix_len + 1);
16572+#ifdef NO_XMALLOC
16573+ if (memory != NULL)
16574+#endif
16575+ {
16576+ memcpy (memory, orig_prefix_arg, orig_prefix_len + 1);
16577+ orig_prefix = memory;
16578+ memory += orig_prefix_len + 1;
16579+ memcpy (memory, curr_prefix_arg, curr_prefix_len + 1);
16580+ curr_prefix = memory;
16581+ return;
16582+ }
16583+ }
16584+ orig_prefix = NULL;
16585+ curr_prefix = NULL;
16586+ /* Don't worry about wasted memory here - this function is usually only
16587+ called once. */
16588+}
16589+
16590+/* Sets the original and the current installation prefix of the package.
16591+ Relocation simply replaces a pathname starting with the original prefix
16592+ by the corresponding pathname with the current prefix instead. Both
16593+ prefixes should be directory names without trailing slash (i.e. use ""
16594+ instead of "/"). */
16595+void
16596+set_relocation_prefix (const char *orig_prefix_arg, const char *curr_prefix_arg)
16597+{
16598+ set_this_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16599+
16600+ /* Now notify all dependent libraries. */
16601+#if DEPENDS_ON_LIBCHARSET
16602+ libcharset_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16603+#endif
16604+#if DEPENDS_ON_LIBICONV && HAVE_ICONV && _LIBICONV_VERSION >= 0x0109
16605+ libiconv_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16606+#endif
16607+#if DEPENDS_ON_LIBINTL && ENABLE_NLS && defined libintl_set_relocation_prefix
16608+ libintl_set_relocation_prefix (orig_prefix_arg, curr_prefix_arg);
16609+#endif
16610+}
16611+
16612+#if !defined IN_LIBRARY || (defined PIC && defined INSTALLDIR)
16613+
16614+/* Convenience function:
16615+ Computes the current installation prefix, based on the original
16616+ installation prefix, the original installation directory of a particular
16617+ file, and the current pathname of this file. Returns NULL upon failure. */
16618+#ifdef IN_LIBRARY
16619+#define compute_curr_prefix local_compute_curr_prefix
16620+static
16621+#endif
16622+const char *
16623+compute_curr_prefix (const char *orig_installprefix,
16624+ const char *orig_installdir,
16625+ const char *curr_pathname)
16626+{
16627+ const char *curr_installdir;
16628+ const char *rel_installdir;
16629+
16630+ if (curr_pathname == NULL)
16631+ return NULL;
16632+
16633+ /* Determine the relative installation directory, relative to the prefix.
16634+ This is simply the difference between orig_installprefix and
16635+ orig_installdir. */
16636+ if (strncmp (orig_installprefix, orig_installdir, strlen (orig_installprefix))
16637+ != 0)
16638+ /* Shouldn't happen - nothing should be installed outside $(prefix). */
16639+ return NULL;
16640+ rel_installdir = orig_installdir + strlen (orig_installprefix);
16641+
16642+ /* Determine the current installation directory. */
16643+ {
16644+ const char *p_base = curr_pathname + FILESYSTEM_PREFIX_LEN (curr_pathname);
16645+ const char *p = curr_pathname + strlen (curr_pathname);
16646+ char *q;
16647+
16648+ while (p > p_base)
16649+ {
16650+ p--;
16651+ if (ISSLASH (*p))
16652+ break;
16653+ }
16654+
16655+ q = (char *) xmalloc (p - curr_pathname + 1);
16656+#ifdef NO_XMALLOC
16657+ if (q == NULL)
16658+ return NULL;
16659+#endif
16660+ memcpy (q, curr_pathname, p - curr_pathname);
16661+ q[p - curr_pathname] = '\0';
16662+ curr_installdir = q;
16663+ }
16664+
16665+ /* Compute the current installation prefix by removing the trailing
16666+ rel_installdir from it. */
16667+ {
16668+ const char *rp = rel_installdir + strlen (rel_installdir);
16669+ const char *cp = curr_installdir + strlen (curr_installdir);
16670+ const char *cp_base =
16671+ curr_installdir + FILESYSTEM_PREFIX_LEN (curr_installdir);
16672+
16673+ while (rp > rel_installdir && cp > cp_base)
16674+ {
16675+ bool same = false;
16676+ const char *rpi = rp;
16677+ const char *cpi = cp;
16678+
16679+ while (rpi > rel_installdir && cpi > cp_base)
16680+ {
16681+ rpi--;
16682+ cpi--;
16683+ if (ISSLASH (*rpi) || ISSLASH (*cpi))
16684+ {
16685+ if (ISSLASH (*rpi) && ISSLASH (*cpi))
16686+ same = true;
16687+ break;
16688+ }
16689+#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
16690+ /* Win32, OS/2, DOS - case insignificant filesystem */
16691+ if ((*rpi >= 'a' && *rpi <= 'z' ? *rpi - 'a' + 'A' : *rpi)
16692+ != (*cpi >= 'a' && *cpi <= 'z' ? *cpi - 'a' + 'A' : *cpi))
16693+ break;
16694+#else
16695+ if (*rpi != *cpi)
16696+ break;
16697+#endif
16698+ }
16699+ if (!same)
16700+ break;
16701+ /* The last pathname component was the same. opi and cpi now point
16702+ to the slash before it. */
16703+ rp = rpi;
16704+ cp = cpi;
16705+ }
16706+
16707+ if (rp > rel_installdir)
16708+ /* Unexpected: The curr_installdir does not end with rel_installdir. */
16709+ return NULL;
16710+
16711+ {
16712+ size_t curr_prefix_len = cp - curr_installdir;
16713+ char *curr_prefix;
16714+
16715+ curr_prefix = (char *) xmalloc (curr_prefix_len + 1);
16716+#ifdef NO_XMALLOC
16717+ if (curr_prefix == NULL)
16718+ return NULL;
16719+#endif
16720+ memcpy (curr_prefix, curr_installdir, curr_prefix_len);
16721+ curr_prefix[curr_prefix_len] = '\0';
16722+
16723+ return curr_prefix;
16724+ }
16725+ }
16726+}
16727+
16728+#endif /* !IN_LIBRARY || PIC */
16729+
16730+#if defined PIC && defined INSTALLDIR
16731+
16732+/* Full pathname of shared library, or NULL. */
16733+static char *shared_library_fullname;
16734+
16735+#if defined _WIN32 || defined __WIN32__
16736+
16737+/* Determine the full pathname of the shared library when it is loaded. */
16738+
16739+BOOL WINAPI
16740+DllMain (HINSTANCE module_handle, DWORD event, LPVOID reserved)
16741+{
16742+ (void) reserved;
16743+
16744+ if (event == DLL_PROCESS_ATTACH)
16745+ {
16746+ /* The DLL is being loaded into an application's address range. */
16747+ static char location[MAX_PATH];
16748+
16749+ if (!GetModuleFileName (module_handle, location, sizeof (location)))
16750+ /* Shouldn't happen. */
16751+ return FALSE;
16752+
16753+ if (!IS_PATH_WITH_DIR (location))
16754+ /* Shouldn't happen. */
16755+ return FALSE;
16756+
16757+ shared_library_fullname = strdup (location);
16758+ }
16759+
16760+ return TRUE;
16761+}
16762+
16763+#else /* Unix */
16764+
16765+static void
16766+find_shared_library_fullname ()
16767+{
16768+#if defined __linux__ && __GLIBC__ >= 2
16769+ /* Linux has /proc/self/maps. glibc 2 has the getline() function. */
16770+ FILE *fp;
16771+
16772+ /* Open the current process' maps file. It describes one VMA per line. */
16773+ fp = fopen ("/proc/self/maps", "r");
16774+ if (fp)
16775+ {
16776+ unsigned long address = (unsigned long) &find_shared_library_fullname;
16777+ for (;;)
16778+ {
16779+ unsigned long start, end;
16780+ int c;
16781+
16782+ if (fscanf (fp, "%lx-%lx", &start, &end) != 2)
16783+ break;
16784+ if (address >= start && address <= end - 1)
16785+ {
16786+ /* Found it. Now see if this line contains a filename. */
16787+ while (c = getc (fp), c != EOF && c != '\n' && c != '/')
16788+ continue;
16789+ if (c == '/')
16790+ {
16791+ size_t size;
16792+ int len;
16793+
16794+ ungetc (c, fp);
16795+ shared_library_fullname = NULL; size = 0;
16796+ len = getline (&shared_library_fullname, &size, fp);
16797+ if (len >= 0)
16798+ {
16799+ /* Success: filled shared_library_fullname. */
16800+ if (len > 0 && shared_library_fullname[len - 1] == '\n')
16801+ shared_library_fullname[len - 1] = '\0';
16802+ }
16803+ }
16804+ break;
16805+ }
16806+ while (c = getc (fp), c != EOF && c != '\n')
16807+ continue;
16808+ }
16809+ fclose (fp);
16810+ }
16811+#endif
16812+}
16813+
16814+#endif /* WIN32 / Unix */
16815+
16816+/* Return the full pathname of the current shared library.
16817+ Return NULL if unknown.
16818+ Guaranteed to work only on Linux and Woe32. */
16819+static char *
16820+get_shared_library_fullname ()
16821+{
16822+#if !(defined _WIN32 || defined __WIN32__)
16823+ static bool tried_find_shared_library_fullname;
16824+ if (!tried_find_shared_library_fullname)
16825+ {
16826+ find_shared_library_fullname ();
16827+ tried_find_shared_library_fullname = true;
16828+ }
16829+#endif
16830+ return shared_library_fullname;
16831+}
16832+
16833+#endif /* PIC */
16834+
16835+/* Returns the pathname, relocated according to the current installation
16836+ directory. */
16837+const char *
16838+relocate (const char *pathname)
16839+{
16840+#if defined PIC && defined INSTALLDIR
16841+ static int initialized;
16842+
16843+ /* Initialization code for a shared library. */
16844+ if (!initialized)
16845+ {
16846+ /* At this point, orig_prefix and curr_prefix likely have already been
16847+ set through the main program's set_program_name_and_installdir
16848+ function. This is sufficient in the case that the library has
16849+ initially been installed in the same orig_prefix. But we can do
16850+ better, to also cover the cases that 1. it has been installed
16851+ in a different prefix before being moved to orig_prefix and (later)
16852+ to curr_prefix, 2. unlike the program, it has not moved away from
16853+ orig_prefix. */
16854+ const char *orig_installprefix = INSTALLPREFIX;
16855+ const char *orig_installdir = INSTALLDIR;
16856+ const char *curr_prefix_better;
16857+
16858+ curr_prefix_better =
16859+ compute_curr_prefix (orig_installprefix, orig_installdir,
16860+ get_shared_library_fullname ());
16861+ if (curr_prefix_better == NULL)
16862+ curr_prefix_better = curr_prefix;
16863+
16864+ set_relocation_prefix (orig_installprefix, curr_prefix_better);
16865+
16866+ initialized = 1;
16867+ }
16868+#endif
16869+
16870+ /* Note: It is not necessary to perform case insensitive comparison here,
16871+ even for DOS-like filesystems, because the pathname argument was
16872+ typically created from the same Makefile variable as orig_prefix came
16873+ from. */
16874+ if (orig_prefix != NULL && curr_prefix != NULL
16875+ && strncmp (pathname, orig_prefix, orig_prefix_len) == 0)
16876+ {
16877+ if (pathname[orig_prefix_len] == '\0')
16878+ /* pathname equals orig_prefix. */
16879+ return curr_prefix;
16880+ if (ISSLASH (pathname[orig_prefix_len]))
16881+ {
16882+ /* pathname starts with orig_prefix. */
16883+ const char *pathname_tail = &pathname[orig_prefix_len];
16884+ char *result =
16885+ (char *) xmalloc (curr_prefix_len + strlen (pathname_tail) + 1);
16886+
16887+#ifdef NO_XMALLOC
16888+ if (result != NULL)
16889+#endif
16890+ {
16891+ memcpy (result, curr_prefix, curr_prefix_len);
16892+ strcpy (result + curr_prefix_len, pathname_tail);
16893+ return result;
16894+ }
16895+ }
16896+ }
16897+ /* Nothing to relocate. */
16898+ return pathname;
16899+}
16900+
16901+#endif
16902--- lrzsz-0.12.20.safe/intl/relocatable.h 1969-12-31 19:00:00.000000000 -0500
16903+++ lrzsz-0.12.20/intl/relocatable.h 2004-09-12 14:40:34.651703096 -0400
16904@@ -0,0 +1,77 @@
16905+/* Provide relocatable packages.
16906+ Copyright (C) 2003 Free Software Foundation, Inc.
16907+ Written by Bruno Haible <bruno@clisp.org>, 2003.
16908+
16909+ This program is free software; you can redistribute it and/or modify it
16910+ under the terms of the GNU Library General Public License as published
16911+ by the Free Software Foundation; either version 2, or (at your option)
16912+ any later version.
16913+
16914+ This program is distributed in the hope that it will be useful,
16915+ but WITHOUT ANY WARRANTY; without even the implied warranty of
16916+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16917+ Library General Public License for more details.
16918+
16919+ You should have received a copy of the GNU Library General Public
16920+ License along with this program; if not, write to the Free Software
16921+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
16922+ USA. */
16923+
16924+#ifndef _RELOCATABLE_H
16925+#define _RELOCATABLE_H
16926+
16927+#ifdef __cplusplus
16928+extern "C" {
16929+#endif
16930+
16931+
16932+/* This can be enabled through the configure --enable-relocatable option. */
16933+#if ENABLE_RELOCATABLE
16934+
16935+/* When building a DLL, we must export some functions. Note that because
16936+ this is a private .h file, we don't need to use __declspec(dllimport)
16937+ in any case. */
16938+#if defined _MSC_VER && BUILDING_DLL
16939+# define RELOCATABLE_DLL_EXPORTED __declspec(dllexport)
16940+#else
16941+# define RELOCATABLE_DLL_EXPORTED
16942+#endif
16943+
16944+/* Sets the original and the current installation prefix of the package.
16945+ Relocation simply replaces a pathname starting with the original prefix
16946+ by the corresponding pathname with the current prefix instead. Both
16947+ prefixes should be directory names without trailing slash (i.e. use ""
16948+ instead of "/"). */
16949+extern RELOCATABLE_DLL_EXPORTED void
16950+ set_relocation_prefix (const char *orig_prefix,
16951+ const char *curr_prefix);
16952+
16953+/* Returns the pathname, relocated according to the current installation
16954+ directory. */
16955+extern const char * relocate (const char *pathname);
16956+
16957+/* Memory management: relocate() leaks memory, because it has to construct
16958+ a fresh pathname. If this is a problem because your program calls
16959+ relocate() frequently, think about caching the result. */
16960+
16961+/* Convenience function:
16962+ Computes the current installation prefix, based on the original
16963+ installation prefix, the original installation directory of a particular
16964+ file, and the current pathname of this file. Returns NULL upon failure. */
16965+extern const char * compute_curr_prefix (const char *orig_installprefix,
16966+ const char *orig_installdir,
16967+ const char *curr_pathname);
16968+
16969+#else
16970+
16971+/* By default, we use the hardwired pathnames. */
16972+#define relocate(pathname) (pathname)
16973+
16974+#endif
16975+
16976+
16977+#ifdef __cplusplus
16978+}
16979+#endif
16980+
16981+#endif /* _RELOCATABLE_H */
16982--- lrzsz-0.12.20.safe/intl/textdomain.c 1998-04-26 09:22:37.000000000 -0400
16983+++ lrzsz-0.12.20/intl/textdomain.c 2004-09-12 14:40:34.656702336 -0400
16984@@ -1,51 +1,60 @@
16985-/* Implementation of the textdomain(3) function
16986- Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
16987- Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
16988+/* Implementation of the textdomain(3) function.
16989+ Copyright (C) 1995-1998, 2000-2003 Free Software Foundation, Inc.
16990
16991- This program is free software; you can redistribute it and/or modify
16992- it under the terms of the GNU General Public License as published by
16993- the Free Software Foundation; either version 2, or (at your option)
16994+ This program is free software; you can redistribute it and/or modify it
16995+ under the terms of the GNU Library General Public License as published
16996+ by the Free Software Foundation; either version 2, or (at your option)
16997 any later version.
16998
16999 This program is distributed in the hope that it will be useful,
17000 but WITHOUT ANY WARRANTY; without even the implied warranty of
17001- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17002- GNU General Public License for more details.
17003+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17004+ Library General Public License for more details.
17005
17006- You should have received a copy of the GNU General Public License
17007- along with this program; if not, write to the Free Software Foundation,
17008- Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
17009+ You should have received a copy of the GNU Library General Public
17010+ License along with this program; if not, write to the Free Software
17011+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17012+ USA. */
17013
17014 #ifdef HAVE_CONFIG_H
17015 # include <config.h>
17016 #endif
17017
17018-#if defined STDC_HEADERS || defined _LIBC
17019-# include <stdlib.h>
17020-#endif
17021+#include <stdlib.h>
17022+#include <string.h>
17023
17024-#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
17025-# include <string.h>
17026+#ifdef _LIBC
17027+# include <libintl.h>
17028 #else
17029-# include <strings.h>
17030-# ifndef memcpy
17031-# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
17032-# endif
17033+# include "libgnuintl.h"
17034 #endif
17035+#include "gettextP.h"
17036
17037 #ifdef _LIBC
17038-# include <libintl.h>
17039+/* We have to handle multi-threaded applications. */
17040+# include <bits/libc-lock.h>
17041 #else
17042-# include "libgettext.h"
17043+/* Provide dummy implementation if this is outside glibc. */
17044+# define __libc_rwlock_define(CLASS, NAME)
17045+# define __libc_rwlock_wrlock(NAME)
17046+# define __libc_rwlock_unlock(NAME)
17047+#endif
17048+
17049+/* The internal variables in the standalone libintl.a must have different
17050+ names than the internal variables in GNU libc, otherwise programs
17051+ using libintl.a cannot be linked statically. */
17052+#if !defined _LIBC
17053+# define _nl_default_default_domain libintl_nl_default_default_domain
17054+# define _nl_current_default_domain libintl_nl_current_default_domain
17055 #endif
17056
17057 /* @@ end of prolog @@ */
17058
17059 /* Name of the default text domain. */
17060-extern const char _nl_default_default_domain[];
17061+extern const char _nl_default_default_domain[] attribute_hidden;
17062
17063 /* Default text domain in which entries for gettext(3) are to be found. */
17064-extern const char *_nl_current_default_domain;
17065+extern const char *_nl_current_default_domain attribute_hidden;
17066
17067
17068 /* Names for the libintl functions are a problem. They must not clash
17069@@ -54,50 +63,76 @@
17070 prefix. So we have to make a difference here. */
17071 #ifdef _LIBC
17072 # define TEXTDOMAIN __textdomain
17073-# define strdup(str) __strdup (str)
17074+# ifndef strdup
17075+# define strdup(str) __strdup (str)
17076+# endif
17077 #else
17078-# define TEXTDOMAIN textdomain__
17079+# define TEXTDOMAIN libintl_textdomain
17080 #endif
17081
17082+/* Lock variable to protect the global data in the gettext implementation. */
17083+__libc_rwlock_define (extern, _nl_state_lock attribute_hidden)
17084+
17085 /* Set the current default message catalog to DOMAINNAME.
17086 If DOMAINNAME is null, return the current default.
17087 If DOMAINNAME is "", reset to the default of "messages". */
17088 char *
17089-TEXTDOMAIN (domainname)
17090- const char *domainname;
17091+TEXTDOMAIN (const char *domainname)
17092 {
17093- char *old;
17094+ char *new_domain;
17095+ char *old_domain;
17096
17097 /* A NULL pointer requests the current setting. */
17098 if (domainname == NULL)
17099 return (char *) _nl_current_default_domain;
17100
17101- old = (char *) _nl_current_default_domain;
17102+ __libc_rwlock_wrlock (_nl_state_lock);
17103+
17104+ old_domain = (char *) _nl_current_default_domain;
17105
17106 /* If domain name is the null string set to default domain "messages". */
17107 if (domainname[0] == '\0'
17108 || strcmp (domainname, _nl_default_default_domain) == 0)
17109- _nl_current_default_domain = _nl_default_default_domain;
17110+ {
17111+ _nl_current_default_domain = _nl_default_default_domain;
17112+ new_domain = (char *) _nl_current_default_domain;
17113+ }
17114+ else if (strcmp (domainname, old_domain) == 0)
17115+ /* This can happen and people will use it to signal that some
17116+ environment variable changed. */
17117+ new_domain = old_domain;
17118 else
17119 {
17120 /* If the following malloc fails `_nl_current_default_domain'
17121 will be NULL. This value will be returned and so signals we
17122 are out of core. */
17123 #if defined _LIBC || defined HAVE_STRDUP
17124- _nl_current_default_domain = strdup (domainname);
17125+ new_domain = strdup (domainname);
17126 #else
17127 size_t len = strlen (domainname) + 1;
17128- char *cp = (char *) malloc (len);
17129- if (cp != NULL)
17130- memcpy (cp, domainname, len);
17131- _nl_current_default_domain = cp;
17132+ new_domain = (char *) malloc (len);
17133+ if (new_domain != NULL)
17134+ memcpy (new_domain, domainname, len);
17135 #endif
17136+
17137+ if (new_domain != NULL)
17138+ _nl_current_default_domain = new_domain;
17139 }
17140
17141- if (old != _nl_default_default_domain)
17142- free (old);
17143+ /* We use this possibility to signal a change of the loaded catalogs
17144+ since this is most likely the case and there is no other easy we
17145+ to do it. Do it only when the call was successful. */
17146+ if (new_domain != NULL)
17147+ {
17148+ ++_nl_msg_cat_cntr;
17149
17150- return (char *) _nl_current_default_domain;
17151+ if (old_domain != new_domain && old_domain != _nl_default_default_domain)
17152+ free (old_domain);
17153+ }
17154+
17155+ __libc_rwlock_unlock (_nl_state_lock);
17156+
17157+ return new_domain;
17158 }
17159
17160 #ifdef _LIBC
17161--- lrzsz-0.12.20.safe/intl/vasnprintf.c 1969-12-31 19:00:00.000000000 -0500
17162+++ lrzsz-0.12.20/intl/vasnprintf.c 2004-09-12 14:40:34.662701424 -0400
17163@@ -0,0 +1,887 @@
17164+/* vsprintf with automatic memory allocation.
17165+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
17166+
17167+ This program is free software; you can redistribute it and/or modify it
17168+ under the terms of the GNU Library General Public License as published
17169+ by the Free Software Foundation; either version 2, or (at your option)
17170+ any later version.
17171+
17172+ This program is distributed in the hope that it will be useful,
17173+ but WITHOUT ANY WARRANTY; without even the implied warranty of
17174+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17175+ Library General Public License for more details.
17176+
17177+ You should have received a copy of the GNU Library General Public
17178+ License along with this program; if not, write to the Free Software
17179+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
17180+ USA. */
17181+
17182+/* Tell glibc's <stdio.h> to provide a prototype for snprintf().
17183+ This must come before <config.h> because <config.h> may include
17184+ <features.h>, and once <features.h> has been included, it's too late. */
17185+#ifndef _GNU_SOURCE
17186+# define _GNU_SOURCE 1
17187+#endif
17188+
17189+#ifdef HAVE_CONFIG_H
17190+# include <config.h>
17191+#endif
17192+#ifndef IN_LIBINTL
17193+# include <alloca.h>
17194+#endif
17195+
17196+/* Specification. */
17197+#if WIDE_CHAR_VERSION
17198+# include "vasnwprintf.h"
17199+#else
17200+# include "vasnprintf.h"
17201+#endif
17202+
17203+#include <stdio.h> /* snprintf(), sprintf() */
17204+#include <stdlib.h> /* abort(), malloc(), realloc(), free() */
17205+#include <string.h> /* memcpy(), strlen() */
17206+#include <errno.h> /* errno */
17207+#include <limits.h> /* CHAR_BIT */
17208+#include <float.h> /* DBL_MAX_EXP, LDBL_MAX_EXP */
17209+#if WIDE_CHAR_VERSION
17210+# include "wprintf-parse.h"
17211+#else
17212+# include "printf-parse.h"
17213+#endif
17214+
17215+/* Checked size_t computations. */
17216+#include "xsize.h"
17217+
17218+#ifdef HAVE_WCHAR_T
17219+# ifdef HAVE_WCSLEN
17220+# define local_wcslen wcslen
17221+# else
17222+ /* Solaris 2.5.1 has wcslen() in a separate library libw.so. To avoid
17223+ a dependency towards this library, here is a local substitute.
17224+ Define this substitute only once, even if this file is included
17225+ twice in the same compilation unit. */
17226+# ifndef local_wcslen_defined
17227+# define local_wcslen_defined 1
17228+static size_t
17229+local_wcslen (const wchar_t *s)
17230+{
17231+ const wchar_t *ptr;
17232+
17233+ for (ptr = s; *ptr != (wchar_t) 0; ptr++)
17234+ ;
17235+ return ptr - s;
17236+}
17237+# endif
17238+# endif
17239+#endif
17240+
17241+#if WIDE_CHAR_VERSION
17242+# define VASNPRINTF vasnwprintf
17243+# define CHAR_T wchar_t
17244+# define DIRECTIVE wchar_t_directive
17245+# define DIRECTIVES wchar_t_directives
17246+# define PRINTF_PARSE wprintf_parse
17247+# define USE_SNPRINTF 1
17248+# if HAVE_DECL__SNWPRINTF
17249+ /* On Windows, the function swprintf() has a different signature than
17250+ on Unix; we use the _snwprintf() function instead. */
17251+# define SNPRINTF _snwprintf
17252+# else
17253+ /* Unix. */
17254+# define SNPRINTF swprintf
17255+# endif
17256+#else
17257+# define VASNPRINTF vasnprintf
17258+# define CHAR_T char
17259+# define DIRECTIVE char_directive
17260+# define DIRECTIVES char_directives
17261+# define PRINTF_PARSE printf_parse
17262+# define USE_SNPRINTF (HAVE_DECL__SNPRINTF || HAVE_SNPRINTF)
17263+# if HAVE_DECL__SNPRINTF
17264+ /* Windows. */
17265+# define SNPRINTF _snprintf
17266+# else
17267+ /* Unix. */
17268+# define SNPRINTF snprintf
17269+# endif
17270+#endif
17271+
17272+CHAR_T *
17273+VASNPRINTF (CHAR_T *resultbuf, size_t *lengthp, const CHAR_T *format, va_list args)
17274+{
17275+ DIRECTIVES d;
17276+ arguments a;
17277+
17278+ if (PRINTF_PARSE (format, &d, &a) < 0)
17279+ {
17280+ errno = EINVAL;
17281+ return NULL;
17282+ }
17283+
17284+#define CLEANUP() \
17285+ free (d.dir); \
17286+ if (a.arg) \
17287+ free (a.arg);
17288+
17289+ if (printf_fetchargs (args, &a) < 0)
17290+ {
17291+ CLEANUP ();
17292+ errno = EINVAL;
17293+ return NULL;
17294+ }
17295+
17296+ {
17297+ size_t buf_neededlength;
17298+ CHAR_T *buf;
17299+ CHAR_T *buf_malloced;
17300+ const CHAR_T *cp;
17301+ size_t i;
17302+ DIRECTIVE *dp;
17303+ /* Output string accumulator. */
17304+ CHAR_T *result;
17305+ size_t allocated;
17306+ size_t length;
17307+
17308+ /* Allocate a small buffer that will hold a directive passed to
17309+ sprintf or snprintf. */
17310+ buf_neededlength =
17311+ xsum4 (7, d.max_width_length, d.max_precision_length, 6);
17312+#if HAVE_ALLOCA
17313+ if (buf_neededlength < 4000 / sizeof (CHAR_T))
17314+ {
17315+ buf = (CHAR_T *) alloca (buf_neededlength * sizeof (CHAR_T));
17316+ buf_malloced = NULL;
17317+ }
17318+ else
17319+#endif
17320+ {
17321+ size_t buf_memsize = xtimes (buf_neededlength, sizeof (CHAR_T));
17322+ if (size_overflow_p (buf_memsize))
17323+ goto out_of_memory_1;
17324+ buf = (CHAR_T *) malloc (buf_memsize);
17325+ if (buf == NULL)
17326+ goto out_of_memory_1;
17327+ buf_malloced = buf;
17328+ }
17329+
17330+ if (resultbuf != NULL)
17331+ {
17332+ result = resultbuf;
17333+ allocated = *lengthp;
17334+ }
17335+ else
17336+ {
17337+ result = NULL;
17338+ allocated = 0;
17339+ }
17340+ length = 0;
17341+ /* Invariants:
17342+ result is either == resultbuf or == NULL or malloc-allocated.
17343+ If length > 0, then result != NULL. */
17344+
17345+ /* Ensures that allocated >= needed. Aborts through a jump to
17346+ out_of_memory if needed is SIZE_MAX or otherwise too big. */
17347+#define ENSURE_ALLOCATION(needed) \
17348+ if ((needed) > allocated) \
17349+ { \
17350+ size_t memory_size; \
17351+ CHAR_T *memory; \
17352+ \
17353+ allocated = (allocated > 0 ? xtimes (allocated, 2) : 12); \
17354+ if ((needed) > allocated) \
17355+ allocated = (needed); \
17356+ memory_size = xtimes (allocated, sizeof (CHAR_T)); \
17357+ if (size_overflow_p (memory_size)) \
17358+ goto out_of_memory; \
17359+ if (result == resultbuf || result == NULL) \
17360+ memory = (CHAR_T *) malloc (memory_size); \
17361+ else \
17362+ memory = (CHAR_T *) realloc (result, memory_size); \
17363+ if (memory == NULL) \
17364+ goto out_of_memory; \
17365+ if (result == resultbuf && length > 0) \
17366+ memcpy (memory, result, length * sizeof (CHAR_T)); \
17367+ result = memory; \
17368+ }
17369+
17370+ for (cp = format, i = 0, dp = &d.dir[0]; ; cp = dp->dir_end, i++, dp++)
17371+ {
17372+ if (cp != dp->dir_start)
17373+ {
17374+ size_t n = dp->dir_start - cp;
17375+ size_t augmented_length = xsum (length, n);
17376+
17377+ ENSURE_ALLOCATION (augmented_length);
17378+ memcpy (result + length, cp, n * sizeof (CHAR_T));
17379+ length = augmented_length;
17380+ }
17381+ if (i == d.count)
17382+ break;
17383+
17384+ /* Execute a single directive. */
17385+ if (dp->conversion == '%')
17386+ {
17387+ size_t augmented_length;
17388+
17389+ if (!(dp->arg_index == ARG_NONE))
17390+ abort ();
17391+ augmented_length = xsum (length, 1);
17392+ ENSURE_ALLOCATION (augmented_length);
17393+ result[length] = '%';
17394+ length = augmented_length;
17395+ }
17396+ else
17397+ {
17398+ if (!(dp->arg_index != ARG_NONE))
17399+ abort ();
17400+
17401+ if (dp->conversion == 'n')
17402+ {
17403+ switch (a.arg[dp->arg_index].type)
17404+ {
17405+ case TYPE_COUNT_SCHAR_POINTER:
17406+ *a.arg[dp->arg_index].a.a_count_schar_pointer = length;
17407+ break;
17408+ case TYPE_COUNT_SHORT_POINTER:
17409+ *a.arg[dp->arg_index].a.a_count_short_pointer = length;
17410+ break;
17411+ case TYPE_COUNT_INT_POINTER:
17412+ *a.arg[dp->arg_index].a.a_count_int_pointer = length;
17413+ break;
17414+ case TYPE_COUNT_LONGINT_POINTER:
17415+ *a.arg[dp->arg_index].a.a_count_longint_pointer = length;
17416+ break;
17417+#ifdef HAVE_LONG_LONG
17418+ case TYPE_COUNT_LONGLONGINT_POINTER:
17419+ *a.arg[dp->arg_index].a.a_count_longlongint_pointer = length;
17420+ break;
17421+#endif
17422+ default:
17423+ abort ();
17424+ }
17425+ }
17426+ else
17427+ {
17428+ arg_type type = a.arg[dp->arg_index].type;
17429+ CHAR_T *p;
17430+ unsigned int prefix_count;
17431+ int prefixes[2];
17432+#if !USE_SNPRINTF
17433+ size_t tmp_length;
17434+ CHAR_T tmpbuf[700];
17435+ CHAR_T *tmp;
17436+
17437+ /* Allocate a temporary buffer of sufficient size for calling
17438+ sprintf. */
17439+ {
17440+ size_t width;
17441+ size_t precision;
17442+
17443+ width = 0;
17444+ if (dp->width_start != dp->width_end)
17445+ {
17446+ if (dp->width_arg_index != ARG_NONE)
17447+ {
17448+ int arg;
17449+
17450+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17451+ abort ();
17452+ arg = a.arg[dp->width_arg_index].a.a_int;
17453+ width = (arg < 0 ? (unsigned int) (-arg) : arg);
17454+ }
17455+ else
17456+ {
17457+ const CHAR_T *digitp = dp->width_start;
17458+
17459+ do
17460+ width = xsum (xtimes (width, 10), *digitp++ - '0');
17461+ while (digitp != dp->width_end);
17462+ }
17463+ }
17464+
17465+ precision = 6;
17466+ if (dp->precision_start != dp->precision_end)
17467+ {
17468+ if (dp->precision_arg_index != ARG_NONE)
17469+ {
17470+ int arg;
17471+
17472+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17473+ abort ();
17474+ arg = a.arg[dp->precision_arg_index].a.a_int;
17475+ precision = (arg < 0 ? 0 : arg);
17476+ }
17477+ else
17478+ {
17479+ const CHAR_T *digitp = dp->precision_start + 1;
17480+
17481+ precision = 0;
17482+ do
17483+ precision = xsum (xtimes (precision, 10), *digitp++ - '0');
17484+ while (digitp != dp->precision_end);
17485+ }
17486+ }
17487+
17488+ switch (dp->conversion)
17489+ {
17490+
17491+ case 'd': case 'i': case 'u':
17492+# ifdef HAVE_LONG_LONG
17493+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17494+ tmp_length =
17495+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17496+ * 0.30103 /* binary -> decimal */
17497+ * 2 /* estimate for FLAG_GROUP */
17498+ )
17499+ + 1 /* turn floor into ceil */
17500+ + 1; /* account for leading sign */
17501+ else
17502+# endif
17503+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17504+ tmp_length =
17505+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17506+ * 0.30103 /* binary -> decimal */
17507+ * 2 /* estimate for FLAG_GROUP */
17508+ )
17509+ + 1 /* turn floor into ceil */
17510+ + 1; /* account for leading sign */
17511+ else
17512+ tmp_length =
17513+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17514+ * 0.30103 /* binary -> decimal */
17515+ * 2 /* estimate for FLAG_GROUP */
17516+ )
17517+ + 1 /* turn floor into ceil */
17518+ + 1; /* account for leading sign */
17519+ break;
17520+
17521+ case 'o':
17522+# ifdef HAVE_LONG_LONG
17523+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17524+ tmp_length =
17525+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17526+ * 0.333334 /* binary -> octal */
17527+ )
17528+ + 1 /* turn floor into ceil */
17529+ + 1; /* account for leading sign */
17530+ else
17531+# endif
17532+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17533+ tmp_length =
17534+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17535+ * 0.333334 /* binary -> octal */
17536+ )
17537+ + 1 /* turn floor into ceil */
17538+ + 1; /* account for leading sign */
17539+ else
17540+ tmp_length =
17541+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17542+ * 0.333334 /* binary -> octal */
17543+ )
17544+ + 1 /* turn floor into ceil */
17545+ + 1; /* account for leading sign */
17546+ break;
17547+
17548+ case 'x': case 'X':
17549+# ifdef HAVE_LONG_LONG
17550+ if (type == TYPE_LONGLONGINT || type == TYPE_ULONGLONGINT)
17551+ tmp_length =
17552+ (unsigned int) (sizeof (unsigned long long) * CHAR_BIT
17553+ * 0.25 /* binary -> hexadecimal */
17554+ )
17555+ + 1 /* turn floor into ceil */
17556+ + 2; /* account for leading sign or alternate form */
17557+ else
17558+# endif
17559+ if (type == TYPE_LONGINT || type == TYPE_ULONGINT)
17560+ tmp_length =
17561+ (unsigned int) (sizeof (unsigned long) * CHAR_BIT
17562+ * 0.25 /* binary -> hexadecimal */
17563+ )
17564+ + 1 /* turn floor into ceil */
17565+ + 2; /* account for leading sign or alternate form */
17566+ else
17567+ tmp_length =
17568+ (unsigned int) (sizeof (unsigned int) * CHAR_BIT
17569+ * 0.25 /* binary -> hexadecimal */
17570+ )
17571+ + 1 /* turn floor into ceil */
17572+ + 2; /* account for leading sign or alternate form */
17573+ break;
17574+
17575+ case 'f': case 'F':
17576+# ifdef HAVE_LONG_DOUBLE
17577+ if (type == TYPE_LONGDOUBLE)
17578+ tmp_length =
17579+ (unsigned int) (LDBL_MAX_EXP
17580+ * 0.30103 /* binary -> decimal */
17581+ * 2 /* estimate for FLAG_GROUP */
17582+ )
17583+ + 1 /* turn floor into ceil */
17584+ + 10; /* sign, decimal point etc. */
17585+ else
17586+# endif
17587+ tmp_length =
17588+ (unsigned int) (DBL_MAX_EXP
17589+ * 0.30103 /* binary -> decimal */
17590+ * 2 /* estimate for FLAG_GROUP */
17591+ )
17592+ + 1 /* turn floor into ceil */
17593+ + 10; /* sign, decimal point etc. */
17594+ tmp_length = xsum (tmp_length, precision);
17595+ break;
17596+
17597+ case 'e': case 'E': case 'g': case 'G':
17598+ case 'a': case 'A':
17599+ tmp_length =
17600+ 12; /* sign, decimal point, exponent etc. */
17601+ tmp_length = xsum (tmp_length, precision);
17602+ break;
17603+
17604+ case 'c':
17605+# if defined HAVE_WINT_T && !WIDE_CHAR_VERSION
17606+ if (type == TYPE_WIDE_CHAR)
17607+ tmp_length = MB_CUR_MAX;
17608+ else
17609+# endif
17610+ tmp_length = 1;
17611+ break;
17612+
17613+ case 's':
17614+# ifdef HAVE_WCHAR_T
17615+ if (type == TYPE_WIDE_STRING)
17616+ {
17617+ tmp_length =
17618+ local_wcslen (a.arg[dp->arg_index].a.a_wide_string);
17619+
17620+# if !WIDE_CHAR_VERSION
17621+ tmp_length = xtimes (tmp_length, MB_CUR_MAX);
17622+# endif
17623+ }
17624+ else
17625+# endif
17626+ tmp_length = strlen (a.arg[dp->arg_index].a.a_string);
17627+ break;
17628+
17629+ case 'p':
17630+ tmp_length =
17631+ (unsigned int) (sizeof (void *) * CHAR_BIT
17632+ * 0.25 /* binary -> hexadecimal */
17633+ )
17634+ + 1 /* turn floor into ceil */
17635+ + 2; /* account for leading 0x */
17636+ break;
17637+
17638+ default:
17639+ abort ();
17640+ }
17641+
17642+ if (tmp_length < width)
17643+ tmp_length = width;
17644+
17645+ tmp_length = xsum (tmp_length, 1); /* account for trailing NUL */
17646+ }
17647+
17648+ if (tmp_length <= sizeof (tmpbuf) / sizeof (CHAR_T))
17649+ tmp = tmpbuf;
17650+ else
17651+ {
17652+ size_t tmp_memsize = xtimes (tmp_length, sizeof (CHAR_T));
17653+
17654+ if (size_overflow_p (tmp_memsize))
17655+ /* Overflow, would lead to out of memory. */
17656+ goto out_of_memory;
17657+ tmp = (CHAR_T *) malloc (tmp_memsize);
17658+ if (tmp == NULL)
17659+ /* Out of memory. */
17660+ goto out_of_memory;
17661+ }
17662+#endif
17663+
17664+ /* Construct the format string for calling snprintf or
17665+ sprintf. */
17666+ p = buf;
17667+ *p++ = '%';
17668+ if (dp->flags & FLAG_GROUP)
17669+ *p++ = '\'';
17670+ if (dp->flags & FLAG_LEFT)
17671+ *p++ = '-';
17672+ if (dp->flags & FLAG_SHOWSIGN)
17673+ *p++ = '+';
17674+ if (dp->flags & FLAG_SPACE)
17675+ *p++ = ' ';
17676+ if (dp->flags & FLAG_ALT)
17677+ *p++ = '#';
17678+ if (dp->flags & FLAG_ZERO)
17679+ *p++ = '0';
17680+ if (dp->width_start != dp->width_end)
17681+ {
17682+ size_t n = dp->width_end - dp->width_start;
17683+ memcpy (p, dp->width_start, n * sizeof (CHAR_T));
17684+ p += n;
17685+ }
17686+ if (dp->precision_start != dp->precision_end)
17687+ {
17688+ size_t n = dp->precision_end - dp->precision_start;
17689+ memcpy (p, dp->precision_start, n * sizeof (CHAR_T));
17690+ p += n;
17691+ }
17692+
17693+ switch (type)
17694+ {
17695+#ifdef HAVE_LONG_LONG
17696+ case TYPE_LONGLONGINT:
17697+ case TYPE_ULONGLONGINT:
17698+ *p++ = 'l';
17699+ /*FALLTHROUGH*/
17700+#endif
17701+ case TYPE_LONGINT:
17702+ case TYPE_ULONGINT:
17703+#ifdef HAVE_WINT_T
17704+ case TYPE_WIDE_CHAR:
17705+#endif
17706+#ifdef HAVE_WCHAR_T
17707+ case TYPE_WIDE_STRING:
17708+#endif
17709+ *p++ = 'l';
17710+ break;
17711+#ifdef HAVE_LONG_DOUBLE
17712+ case TYPE_LONGDOUBLE:
17713+ *p++ = 'L';
17714+ break;
17715+#endif
17716+ default:
17717+ break;
17718+ }
17719+ *p = dp->conversion;
17720+#if USE_SNPRINTF
17721+ p[1] = '%';
17722+ p[2] = 'n';
17723+ p[3] = '\0';
17724+#else
17725+ p[1] = '\0';
17726+#endif
17727+
17728+ /* Construct the arguments for calling snprintf or sprintf. */
17729+ prefix_count = 0;
17730+ if (dp->width_arg_index != ARG_NONE)
17731+ {
17732+ if (!(a.arg[dp->width_arg_index].type == TYPE_INT))
17733+ abort ();
17734+ prefixes[prefix_count++] = a.arg[dp->width_arg_index].a.a_int;
17735+ }
17736+ if (dp->precision_arg_index != ARG_NONE)
17737+ {
17738+ if (!(a.arg[dp->precision_arg_index].type == TYPE_INT))
17739+ abort ();
17740+ prefixes[prefix_count++] = a.arg[dp->precision_arg_index].a.a_int;
17741+ }
17742+
17743+#if USE_SNPRINTF
17744+ /* Prepare checking whether snprintf returns the count
17745+ via %n. */
17746+ ENSURE_ALLOCATION (xsum (length, 1));
17747+ result[length] = '\0';
17748+#endif
17749+
17750+ for (;;)
17751+ {
17752+ size_t maxlen;
17753+ int count;
17754+ int retcount;
17755+
17756+ maxlen = allocated - length;
17757+ count = -1;
17758+ retcount = 0;
17759+
17760+#if USE_SNPRINTF
17761+# define SNPRINTF_BUF(arg) \
17762+ switch (prefix_count) \
17763+ { \
17764+ case 0: \
17765+ retcount = SNPRINTF (result + length, maxlen, buf, \
17766+ arg, &count); \
17767+ break; \
17768+ case 1: \
17769+ retcount = SNPRINTF (result + length, maxlen, buf, \
17770+ prefixes[0], arg, &count); \
17771+ break; \
17772+ case 2: \
17773+ retcount = SNPRINTF (result + length, maxlen, buf, \
17774+ prefixes[0], prefixes[1], arg, \
17775+ &count); \
17776+ break; \
17777+ default: \
17778+ abort (); \
17779+ }
17780+#else
17781+# define SNPRINTF_BUF(arg) \
17782+ switch (prefix_count) \
17783+ { \
17784+ case 0: \
17785+ count = sprintf (tmp, buf, arg); \
17786+ break; \
17787+ case 1: \
17788+ count = sprintf (tmp, buf, prefixes[0], arg); \
17789+ break; \
17790+ case 2: \
17791+ count = sprintf (tmp, buf, prefixes[0], prefixes[1],\
17792+ arg); \
17793+ break; \
17794+ default: \
17795+ abort (); \
17796+ }
17797+#endif
17798+
17799+ switch (type)
17800+ {
17801+ case TYPE_SCHAR:
17802+ {
17803+ int arg = a.arg[dp->arg_index].a.a_schar;
17804+ SNPRINTF_BUF (arg);
17805+ }
17806+ break;
17807+ case TYPE_UCHAR:
17808+ {
17809+ unsigned int arg = a.arg[dp->arg_index].a.a_uchar;
17810+ SNPRINTF_BUF (arg);
17811+ }
17812+ break;
17813+ case TYPE_SHORT:
17814+ {
17815+ int arg = a.arg[dp->arg_index].a.a_short;
17816+ SNPRINTF_BUF (arg);
17817+ }
17818+ break;
17819+ case TYPE_USHORT:
17820+ {
17821+ unsigned int arg = a.arg[dp->arg_index].a.a_ushort;
17822+ SNPRINTF_BUF (arg);
17823+ }
17824+ break;
17825+ case TYPE_INT:
17826+ {
17827+ int arg = a.arg[dp->arg_index].a.a_int;
17828+ SNPRINTF_BUF (arg);
17829+ }
17830+ break;
17831+ case TYPE_UINT:
17832+ {
17833+ unsigned int arg = a.arg[dp->arg_index].a.a_uint;
17834+ SNPRINTF_BUF (arg);
17835+ }
17836+ break;
17837+ case TYPE_LONGINT:
17838+ {
17839+ long int arg = a.arg[dp->arg_index].a.a_longint;
17840+ SNPRINTF_BUF (arg);
17841+ }
17842+ break;
17843+ case TYPE_ULONGINT:
17844+ {
17845+ unsigned long int arg = a.arg[dp->arg_index].a.a_ulongint;
17846+ SNPRINTF_BUF (arg);
17847+ }
17848+ break;
17849+#ifdef HAVE_LONG_LONG
17850+ case TYPE_LONGLONGINT:
17851+ {
17852+ long long int arg = a.arg[dp->arg_index].a.a_longlongint;
17853+ SNPRINTF_BUF (arg);
17854+ }
17855+ break;
17856+ case TYPE_ULONGLONGINT:
17857+ {
17858+ unsigned long long int arg = a.arg[dp->arg_index].a.a_ulonglongint;
17859+ SNPRINTF_BUF (arg);
17860+ }
17861+ break;
17862+#endif
17863+ case TYPE_DOUBLE:
17864+ {
17865+ double arg = a.arg[dp->arg_index].a.a_double;
17866+ SNPRINTF_BUF (arg);
17867+ }
17868+ break;
17869+#ifdef HAVE_LONG_DOUBLE
17870+ case TYPE_LONGDOUBLE:
17871+ {
17872+ long double arg = a.arg[dp->arg_index].a.a_longdouble;
17873+ SNPRINTF_BUF (arg);
17874+ }
17875+ break;
17876+#endif
17877+ case TYPE_CHAR:
17878+ {
17879+ int arg = a.arg[dp->arg_index].a.a_char;
17880+ SNPRINTF_BUF (arg);
17881+ }
17882+ break;
17883+#ifdef HAVE_WINT_T
17884+ case TYPE_WIDE_CHAR:
17885+ {
17886+ wint_t arg = a.arg[dp->arg_index].a.a_wide_char;
17887+ SNPRINTF_BUF (arg);
17888+ }
17889+ break;
17890+#endif
17891+ case TYPE_STRING:
17892+ {
17893+ const char *arg = a.arg[dp->arg_index].a.a_string;
17894+ SNPRINTF_BUF (arg);
17895+ }
17896+ break;
17897+#ifdef HAVE_WCHAR_T
17898+ case TYPE_WIDE_STRING:
17899+ {
17900+ const wchar_t *arg = a.arg[dp->arg_index].a.a_wide_string;
17901+ SNPRINTF_BUF (arg);
17902+ }
17903+ break;
17904+#endif
17905+ case TYPE_POINTER:
17906+ {
17907+ void *arg = a.arg[dp->arg_index].a.a_pointer;
17908+ SNPRINTF_BUF (arg);
17909+ }
17910+ break;
17911+ default:
17912+ abort ();
17913+ }
17914+
17915+#if USE_SNPRINTF
17916+ /* Portability: Not all implementations of snprintf()
17917+ are ISO C 99 compliant. Determine the number of
17918+ bytes that snprintf() has produced or would have
17919+ produced. */
17920+ if (count >= 0)
17921+ {
17922+ /* Verify that snprintf() has NUL-terminated its
17923+ result. */
17924+ if (count < maxlen && result[length + count] != '\0')
17925+ abort ();
17926+ /* Portability hack. */
17927+ if (retcount > count)
17928+ count = retcount;
17929+ }
17930+ else
17931+ {
17932+ /* snprintf() doesn't understand the '%n'
17933+ directive. */
17934+ if (p[1] != '\0')
17935+ {
17936+ /* Don't use the '%n' directive; instead, look
17937+ at the snprintf() return value. */
17938+ p[1] = '\0';
17939+ continue;
17940+ }
17941+ else
17942+ {
17943+ /* Look at the snprintf() return value. */
17944+ if (retcount < 0)
17945+ {
17946+ /* HP-UX 10.20 snprintf() is doubly deficient:
17947+ It doesn't understand the '%n' directive,
17948+ *and* it returns -1 (rather than the length
17949+ that would have been required) when the
17950+ buffer is too small. */
17951+ size_t bigger_need =
17952+ xsum (xtimes (allocated, 2), 12);
17953+ ENSURE_ALLOCATION (bigger_need);
17954+ continue;
17955+ }
17956+ else
17957+ count = retcount;
17958+ }
17959+ }
17960+#endif
17961+
17962+ /* Attempt to handle failure. */
17963+ if (count < 0)
17964+ {
17965+ if (!(result == resultbuf || result == NULL))
17966+ free (result);
17967+ if (buf_malloced != NULL)
17968+ free (buf_malloced);
17969+ CLEANUP ();
17970+ errno = EINVAL;
17971+ return NULL;
17972+ }
17973+
17974+#if !USE_SNPRINTF
17975+ if (count >= tmp_length)
17976+ /* tmp_length was incorrectly calculated - fix the
17977+ code above! */
17978+ abort ();
17979+#endif
17980+
17981+ /* Make room for the result. */
17982+ if (count >= maxlen)
17983+ {
17984+ /* Need at least count bytes. But allocate
17985+ proportionally, to avoid looping eternally if
17986+ snprintf() reports a too small count. */
17987+ size_t n =
17988+ xmax (xsum (length, count), xtimes (allocated, 2));
17989+
17990+ ENSURE_ALLOCATION (n);
17991+#if USE_SNPRINTF
17992+ continue;
17993+#endif
17994+ }
17995+
17996+#if USE_SNPRINTF
17997+ /* The snprintf() result did fit. */
17998+#else
17999+ /* Append the sprintf() result. */
18000+ memcpy (result + length, tmp, count * sizeof (CHAR_T));
18001+ if (tmp != tmpbuf)
18002+ free (tmp);
18003+#endif
18004+
18005+ length += count;
18006+ break;
18007+ }
18008+ }
18009+ }
18010+ }
18011+
18012+ /* Add the final NUL. */
18013+ ENSURE_ALLOCATION (xsum (length, 1));
18014+ result[length] = '\0';
18015+
18016+ if (result != resultbuf && length + 1 < allocated)
18017+ {
18018+ /* Shrink the allocated memory if possible. */
18019+ CHAR_T *memory;
18020+
18021+ memory = (CHAR_T *) realloc (result, (length + 1) * sizeof (CHAR_T));
18022+ if (memory != NULL)
18023+ result = memory;
18024+ }
18025+
18026+ if (buf_malloced != NULL)
18027+ free (buf_malloced);
18028+ CLEANUP ();
18029+ *lengthp = length;
18030+ return result;
18031+
18032+ out_of_memory:
18033+ if (!(result == resultbuf || result == NULL))
18034+ free (result);
18035+ if (buf_malloced != NULL)
18036+ free (buf_malloced);
18037+ out_of_memory_1:
18038+ CLEANUP ();
18039+ errno = ENOMEM;
18040+ return NULL;
18041+ }
18042+}
18043+
18044+#undef SNPRINTF
18045+#undef USE_SNPRINTF
18046+#undef PRINTF_PARSE
18047+#undef DIRECTIVES
18048+#undef DIRECTIVE
18049+#undef CHAR_T
18050+#undef VASNPRINTF
18051--- lrzsz-0.12.20.safe/intl/vasnprintf.h 1969-12-31 19:00:00.000000000 -0500
18052+++ lrzsz-0.12.20/intl/vasnprintf.h 2004-09-12 14:40:34.667700664 -0400
18053@@ -0,0 +1,61 @@
18054+/* vsprintf with automatic memory allocation.
18055+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18056+
18057+ This program is free software; you can redistribute it and/or modify it
18058+ under the terms of the GNU Library General Public License as published
18059+ by the Free Software Foundation; either version 2, or (at your option)
18060+ any later version.
18061+
18062+ This program is distributed in the hope that it will be useful,
18063+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18064+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18065+ Library General Public License for more details.
18066+
18067+ You should have received a copy of the GNU Library General Public
18068+ License along with this program; if not, write to the Free Software
18069+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18070+ USA. */
18071+
18072+#ifndef _VASNPRINTF_H
18073+#define _VASNPRINTF_H
18074+
18075+/* Get va_list. */
18076+#include <stdarg.h>
18077+
18078+/* Get size_t. */
18079+#include <stddef.h>
18080+
18081+#ifndef __attribute__
18082+/* This feature is available in gcc versions 2.5 and later. */
18083+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 5) || __STRICT_ANSI__
18084+# define __attribute__(Spec) /* empty */
18085+# endif
18086+/* The __-protected variants of `format' and `printf' attributes
18087+ are accepted by gcc versions 2.6.4 (effectively 2.7) and later. */
18088+# if __GNUC__ < 2 || (__GNUC__ == 2 && __GNUC_MINOR__ < 7)
18089+# define __format__ format
18090+# define __printf__ printf
18091+# endif
18092+#endif
18093+
18094+#ifdef __cplusplus
18095+extern "C" {
18096+#endif
18097+
18098+/* Write formatted output to a string dynamically allocated with malloc().
18099+ You can pass a preallocated buffer for the result in RESULTBUF and its
18100+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18101+ If successful, return the address of the string (this may be = RESULTBUF
18102+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18103+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18104+ errno and return NULL. */
18105+extern char * asnprintf (char *resultbuf, size_t *lengthp, const char *format, ...)
18106+ __attribute__ ((__format__ (__printf__, 3, 4)));
18107+extern char * vasnprintf (char *resultbuf, size_t *lengthp, const char *format, va_list args)
18108+ __attribute__ ((__format__ (__printf__, 3, 0)));
18109+
18110+#ifdef __cplusplus
18111+}
18112+#endif
18113+
18114+#endif /* _VASNPRINTF_H */
18115--- lrzsz-0.12.20.safe/intl/vasnwprintf.h 1969-12-31 19:00:00.000000000 -0500
18116+++ lrzsz-0.12.20/intl/vasnwprintf.h 2004-09-12 14:40:34.673699752 -0400
18117@@ -0,0 +1,46 @@
18118+/* vswprintf with automatic memory allocation.
18119+ Copyright (C) 2002-2003 Free Software Foundation, Inc.
18120+
18121+ This program is free software; you can redistribute it and/or modify it
18122+ under the terms of the GNU Library General Public License as published
18123+ by the Free Software Foundation; either version 2, or (at your option)
18124+ any later version.
18125+
18126+ This program is distributed in the hope that it will be useful,
18127+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18128+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18129+ Library General Public License for more details.
18130+
18131+ You should have received a copy of the GNU Library General Public
18132+ License along with this program; if not, write to the Free Software
18133+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18134+ USA. */
18135+
18136+#ifndef _VASNWPRINTF_H
18137+#define _VASNWPRINTF_H
18138+
18139+/* Get va_list. */
18140+#include <stdarg.h>
18141+
18142+/* Get wchar_t, size_t. */
18143+#include <stddef.h>
18144+
18145+#ifdef __cplusplus
18146+extern "C" {
18147+#endif
18148+
18149+/* Write formatted output to a string dynamically allocated with malloc().
18150+ You can pass a preallocated buffer for the result in RESULTBUF and its
18151+ size in *LENGTHP; otherwise you pass RESULTBUF = NULL.
18152+ If successful, return the address of the string (this may be = RESULTBUF
18153+ if no dynamic memory allocation was necessary) and set *LENGTHP to the
18154+ number of resulting bytes, excluding the trailing NUL. Upon error, set
18155+ errno and return NULL. */
18156+extern wchar_t * asnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, ...);
18157+extern wchar_t * vasnwprintf (wchar_t *resultbuf, size_t *lengthp, const wchar_t *format, va_list args);
18158+
18159+#ifdef __cplusplus
18160+}
18161+#endif
18162+
18163+#endif /* _VASNWPRINTF_H */
18164--- lrzsz-0.12.20.safe/intl/VERSION 1998-04-26 09:22:37.000000000 -0400
18165+++ lrzsz-0.12.20/intl/VERSION 2004-09-12 14:40:34.679698840 -0400
18166@@ -1 +1 @@
18167-GNU gettext library from gettext-0.10.32
18168+GNU gettext library from gettext-0.14.1
18169--- lrzsz-0.12.20.safe/intl/wprintf-parse.h 1969-12-31 19:00:00.000000000 -0500
18170+++ lrzsz-0.12.20/intl/wprintf-parse.h 2004-09-12 14:40:34.695696408 -0400
18171@@ -0,0 +1,75 @@
18172+/* Parse printf format string.
18173+ Copyright (C) 1999, 2002-2003 Free Software Foundation, Inc.
18174+
18175+ This program is free software; you can redistribute it and/or modify it
18176+ under the terms of the GNU Library General Public License as published
18177+ by the Free Software Foundation; either version 2, or (at your option)
18178+ any later version.
18179+
18180+ This program is distributed in the hope that it will be useful,
18181+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18182+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18183+ Library General Public License for more details.
18184+
18185+ You should have received a copy of the GNU Library General Public
18186+ License along with this program; if not, write to the Free Software
18187+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18188+ USA. */
18189+
18190+#ifndef _WPRINTF_PARSE_H
18191+#define _WPRINTF_PARSE_H
18192+
18193+#include "printf-args.h"
18194+
18195+
18196+/* Flags */
18197+#define FLAG_GROUP 1 /* ' flag */
18198+#define FLAG_LEFT 2 /* - flag */
18199+#define FLAG_SHOWSIGN 4 /* + flag */
18200+#define FLAG_SPACE 8 /* space flag */
18201+#define FLAG_ALT 16 /* # flag */
18202+#define FLAG_ZERO 32
18203+
18204+/* arg_index value indicating that no argument is consumed. */
18205+#define ARG_NONE (~(size_t)0)
18206+
18207+/* A parsed directive. */
18208+typedef struct
18209+{
18210+ const wchar_t* dir_start;
18211+ const wchar_t* dir_end;
18212+ int flags;
18213+ const wchar_t* width_start;
18214+ const wchar_t* width_end;
18215+ size_t width_arg_index;
18216+ const wchar_t* precision_start;
18217+ const wchar_t* precision_end;
18218+ size_t precision_arg_index;
18219+ wchar_t conversion; /* d i o u x X f e E g G c s p n U % but not C S */
18220+ size_t arg_index;
18221+}
18222+wchar_t_directive;
18223+
18224+/* A parsed format string. */
18225+typedef struct
18226+{
18227+ size_t count;
18228+ wchar_t_directive *dir;
18229+ size_t max_width_length;
18230+ size_t max_precision_length;
18231+}
18232+wchar_t_directives;
18233+
18234+
18235+/* Parses the format string. Fills in the number N of directives, and fills
18236+ in directives[0], ..., directives[N-1], and sets directives[N].dir_start
18237+ to the end of the format string. Also fills in the arg_type fields of the
18238+ arguments and the needed count of arguments. */
18239+#ifdef STATIC
18240+STATIC
18241+#else
18242+extern
18243+#endif
18244+int wprintf_parse (const wchar_t *format, wchar_t_directives *d, arguments *a);
18245+
18246+#endif /* _WPRINTF_PARSE_H */
18247--- lrzsz-0.12.20.safe/intl/xopen-msg.sed 1998-04-26 09:20:52.000000000 -0400
18248+++ lrzsz-0.12.20/intl/xopen-msg.sed 1969-12-31 19:00:00.000000000 -0500
18249@@ -1,104 +0,0 @@
18250-# po2msg.sed - Convert Uniforum style .po file to X/Open style .msg file
18251-# Copyright (C) 1995 Free Software Foundation, Inc.
18252-# Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
18253-#
18254-# This program is free software; you can redistribute it and/or modify
18255-# it under the terms of the GNU General Public License as published by
18256-# the Free Software Foundation; either version 2, or (at your option)
18257-# any later version.
18258-#
18259-# This program is distributed in the hope that it will be useful,
18260-# but WITHOUT ANY WARRANTY; without even the implied warranty of
18261-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18262-# GNU General Public License for more details.
18263-#
18264-# You should have received a copy of the GNU General Public License
18265-# along with this program; if not, write to the Free Software
18266-# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
18267-#
18268-#
18269-# The first directive in the .msg should be the definition of the
18270-# message set number. We use always set number 1.
18271-#
18272-1 {
18273- i\
18274-$set 1 # Automatically created by po2msg.sed
18275- h
18276- s/.*/0/
18277- x
18278-}
18279-#
18280-# We copy all comments into the .msg file. Perhaps they can help.
18281-#
18282-/^#/ s/^#[ ]*/$ /p
18283-#
18284-# We copy the original message as a comment into the .msg file.
18285-#
18286-/^msgid/ {
18287-# Does not work now
18288-# /"$/! {
18289-# s/\\$//
18290-# s/$/ ... (more lines following)"/
18291-# }
18292- s/^msgid[ ]*"\(.*\)"$/$ Original Message: \1/
18293- p
18294-}
18295-#
18296-# The .msg file contains, other then the .po file, only the translations
18297-# but each given a unique ID. Starting from 1 and incrementing by 1 for
18298-# each message we assign them to the messages.
18299-# It is important that the .po file used to generate the cat-id-tbl.c file
18300-# (with po-to-tbl) is the same as the one used here. (At least the order
18301-# of declarations must not be changed.)
18302-#
18303-/^msgstr/ {
18304- s/msgstr[ ]*"\(.*\)"/\1/
18305- x
18306-# The following nice solution is by
18307-# Bruno <Haible@ma2s2.mathematik.uni-karlsruhe.de>
18308- td
18309-# Increment a decimal number in pattern space.
18310-# First hide trailing `9' digits.
18311- :d
18312- s/9\(_*\)$/_\1/
18313- td
18314-# Assure at least one digit is available.
18315- s/^\(_*\)$/0\1/
18316-# Increment the last digit.
18317- s/8\(_*\)$/9\1/
18318- s/7\(_*\)$/8\1/
18319- s/6\(_*\)$/7\1/
18320- s/5\(_*\)$/6\1/
18321- s/4\(_*\)$/5\1/
18322- s/3\(_*\)$/4\1/
18323- s/2\(_*\)$/3\1/
18324- s/1\(_*\)$/2\1/
18325- s/0\(_*\)$/1\1/
18326-# Convert the hidden `9' digits to `0's.
18327- s/_/0/g
18328- x
18329-# Bring the line in the format `<number> <message>'
18330- G
18331- s/^[^\n]*$/& /
18332- s/\(.*\)\n\([0-9]*\)/\2 \1/
18333-# Clear flag from last substitution.
18334- tb
18335-# Append the next line.
18336- :b
18337- N
18338-# Look whether second part is a continuation line.
18339- s/\(.*\n\)"\(.*\)"/\1\2/
18340-# Yes, then branch.
18341- ta
18342- P
18343- D
18344-# Note that `D' includes a jump to the start!!
18345-# We found a continuation line. But before printing insert '\'.
18346- :a
18347- s/\(.*\)\(\n.*\)/\1\\\2/
18348- P
18349-# We cannot use the sed command `D' here
18350- s/.*\n\(.*\)/\1/
18351- tb
18352-}
18353-d
18354--- lrzsz-0.12.20.safe/intl/xsize.h 1969-12-31 19:00:00.000000000 -0500
18355+++ lrzsz-0.12.20/intl/xsize.h 2004-09-12 14:40:34.700695648 -0400
18356@@ -0,0 +1,109 @@
18357+/* xsize.h -- Checked size_t computations.
18358+
18359+ Copyright (C) 2003 Free Software Foundation, Inc.
18360+
18361+ This program is free software; you can redistribute it and/or modify it
18362+ under the terms of the GNU Library General Public License as published
18363+ by the Free Software Foundation; either version 2, or (at your option)
18364+ any later version.
18365+
18366+ This program is distributed in the hope that it will be useful,
18367+ but WITHOUT ANY WARRANTY; without even the implied warranty of
18368+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18369+ Library General Public License for more details.
18370+
18371+ You should have received a copy of the GNU Library General Public
18372+ License along with this program; if not, write to the Free Software
18373+ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
18374+ USA. */
18375+
18376+#ifndef _XSIZE_H
18377+#define _XSIZE_H
18378+
18379+/* Get size_t. */
18380+#include <stddef.h>
18381+
18382+/* Get SIZE_MAX. */
18383+#include <limits.h>
18384+#if HAVE_STDINT_H
18385+# include <stdint.h>
18386+#endif
18387+
18388+/* The size of memory objects is often computed through expressions of
18389+ type size_t. Example:
18390+ void* p = malloc (header_size + n * element_size).
18391+ These computations can lead to overflow. When this happens, malloc()
18392+ returns a piece of memory that is way too small, and the program then
18393+ crashes while attempting to fill the memory.
18394+ To avoid this, the functions and macros in this file check for overflow.
18395+ The convention is that SIZE_MAX represents overflow.
18396+ malloc (SIZE_MAX) is not guaranteed to fail -- think of a malloc
18397+ implementation that uses mmap --, it's recommended to use size_overflow_p()
18398+ or size_in_bounds_p() before invoking malloc().
18399+ The example thus becomes:
18400+ size_t size = xsum (header_size, xtimes (n, element_size));
18401+ void *p = (size_in_bounds_p (size) ? malloc (size) : NULL);
18402+*/
18403+
18404+/* Convert an arbitrary value >= 0 to type size_t. */
18405+#define xcast_size_t(N) \
18406+ ((N) <= SIZE_MAX ? (size_t) (N) : SIZE_MAX)
18407+
18408+/* Sum of two sizes, with overflow check. */
18409+static inline size_t
18410+#if __GNUC__ >= 3
18411+__attribute__ ((__pure__))
18412+#endif
18413+xsum (size_t size1, size_t size2)
18414+{
18415+ size_t sum = size1 + size2;
18416+ return (sum >= size1 ? sum : SIZE_MAX);
18417+}
18418+
18419+/* Sum of three sizes, with overflow check. */
18420+static inline size_t
18421+#if __GNUC__ >= 3
18422+__attribute__ ((__pure__))
18423+#endif
18424+xsum3 (size_t size1, size_t size2, size_t size3)
18425+{
18426+ return xsum (xsum (size1, size2), size3);
18427+}
18428+
18429+/* Sum of four sizes, with overflow check. */
18430+static inline size_t
18431+#if __GNUC__ >= 3
18432+__attribute__ ((__pure__))
18433+#endif
18434+xsum4 (size_t size1, size_t size2, size_t size3, size_t size4)
18435+{
18436+ return xsum (xsum (xsum (size1, size2), size3), size4);
18437+}
18438+
18439+/* Maximum of two sizes, with overflow check. */
18440+static inline size_t
18441+#if __GNUC__ >= 3
18442+__attribute__ ((__pure__))
18443+#endif
18444+xmax (size_t size1, size_t size2)
18445+{
18446+ /* No explicit check is needed here, because for any n:
18447+ max (SIZE_MAX, n) == SIZE_MAX and max (n, SIZE_MAX) == SIZE_MAX. */
18448+ return (size1 >= size2 ? size1 : size2);
18449+}
18450+
18451+/* Multiplication of a count with an element size, with overflow check.
18452+ The count must be >= 0 and the element size must be > 0.
18453+ This is a macro, not an inline function, so that it works correctly even
18454+ when N is of a wider tupe and N > SIZE_MAX. */
18455+#define xtimes(N, ELSIZE) \
18456+ ((N) <= SIZE_MAX / (ELSIZE) ? (size_t) (N) * (ELSIZE) : SIZE_MAX)
18457+
18458+/* Check for overflow. */
18459+#define size_overflow_p(SIZE) \
18460+ ((SIZE) == SIZE_MAX)
18461+/* Check against overflow. */
18462+#define size_in_bounds_p(SIZE) \
18463+ ((SIZE) != SIZE_MAX)
18464+
18465+#endif /* _XSIZE_H */
18466--- lrzsz-0.12.20.safe/m4/ChangeLog 1969-12-31 19:00:00.000000000 -0500
18467+++ lrzsz-0.12.20/m4/ChangeLog 2004-09-12 14:40:35.054641840 -0400
18468@@ -0,0 +1,32 @@
18469+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
18470+
18471+ * codeset.m4: New file, from gettext-0.14.1.
18472+ * gettext.m4: New file, from gettext-0.14.1.
18473+ * glibc21.m4: New file, from gettext-0.14.1.
18474+ * iconv.m4: New file, from gettext-0.14.1.
18475+ * intdiv0.m4: New file, from gettext-0.14.1.
18476+ * intmax.m4: New file, from gettext-0.14.1.
18477+ * inttypes.m4: New file, from gettext-0.14.1.
18478+ * inttypes_h.m4: New file, from gettext-0.14.1.
18479+ * inttypes-pri.m4: New file, from gettext-0.14.1.
18480+ * isc-posix.m4: New file, from gettext-0.14.1.
18481+ * lcmessage.m4: New file, from gettext-0.14.1.
18482+ * lib-ld.m4: New file, from gettext-0.14.1.
18483+ * lib-link.m4: New file, from gettext-0.14.1.
18484+ * lib-prefix.m4: New file, from gettext-0.14.1.
18485+ * longdouble.m4: New file, from gettext-0.14.1.
18486+ * longlong.m4: New file, from gettext-0.14.1.
18487+ * nls.m4: New file, from gettext-0.14.1.
18488+ * po.m4: New file, from gettext-0.14.1.
18489+ * printf-posix.m4: New file, from gettext-0.14.1.
18490+ * progtest.m4: New file, from gettext-0.14.1.
18491+ * signed.m4: New file, from gettext-0.14.1.
18492+ * size_max.m4: New file, from gettext-0.14.1.
18493+ * stdint_h.m4: New file, from gettext-0.14.1.
18494+ * uintmax_t.m4: New file, from gettext-0.14.1.
18495+ * ulonglong.m4: New file, from gettext-0.14.1.
18496+ * wchar_t.m4: New file, from gettext-0.14.1.
18497+ * wint_t.m4: New file, from gettext-0.14.1.
18498+ * xsize.m4: New file, from gettext-0.14.1.
18499+ * Makefile.am: New file.
18500+
18501--- lrzsz-0.12.20.safe/m4/codeset.m4 1969-12-31 19:00:00.000000000 -0500
18502+++ lrzsz-0.12.20/m4/codeset.m4 2004-09-12 14:40:34.820677408 -0400
18503@@ -0,0 +1,23 @@
18504+# codeset.m4 serial AM1 (gettext-0.10.40)
18505+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
18506+dnl This file is free software, distributed under the terms of the GNU
18507+dnl General Public License. As a special exception to the GNU General
18508+dnl Public License, this file may be distributed as part of a program
18509+dnl that contains a configuration script generated by Autoconf, under
18510+dnl the same distribution terms as the rest of that program.
18511+
18512+dnl From Bruno Haible.
18513+
18514+AC_DEFUN([AM_LANGINFO_CODESET],
18515+[
18516+ AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
18517+ [AC_TRY_LINK([#include <langinfo.h>],
18518+ [char* cs = nl_langinfo(CODESET);],
18519+ am_cv_langinfo_codeset=yes,
18520+ am_cv_langinfo_codeset=no)
18521+ ])
18522+ if test $am_cv_langinfo_codeset = yes; then
18523+ AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
18524+ [Define if you have <langinfo.h> and nl_langinfo(CODESET).])
18525+ fi
18526+])
18527--- lrzsz-0.12.20.safe/m4/gettext.m4 1969-12-31 19:00:00.000000000 -0500
18528+++ lrzsz-0.12.20/m4/gettext.m4 2004-09-12 14:40:34.826676496 -0400
18529@@ -0,0 +1,487 @@
18530+# gettext.m4 serial 28 (gettext-0.13)
18531+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
18532+dnl This file is free software, distributed under the terms of the GNU
18533+dnl General Public License. As a special exception to the GNU General
18534+dnl Public License, this file may be distributed as part of a program
18535+dnl that contains a configuration script generated by Autoconf, under
18536+dnl the same distribution terms as the rest of that program.
18537+dnl
18538+dnl This file can can be used in projects which are not available under
18539+dnl the GNU General Public License or the GNU Library General Public
18540+dnl License but which still want to provide support for the GNU gettext
18541+dnl functionality.
18542+dnl Please note that the actual code of the GNU gettext library is covered
18543+dnl by the GNU Library General Public License, and the rest of the GNU
18544+dnl gettext package package is covered by the GNU General Public License.
18545+dnl They are *not* in the public domain.
18546+
18547+dnl Authors:
18548+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
18549+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
18550+
18551+dnl Macro to add for using GNU gettext.
18552+
18553+dnl Usage: AM_GNU_GETTEXT([INTLSYMBOL], [NEEDSYMBOL], [INTLDIR]).
18554+dnl INTLSYMBOL can be one of 'external', 'no-libtool', 'use-libtool'. The
18555+dnl default (if it is not specified or empty) is 'no-libtool'.
18556+dnl INTLSYMBOL should be 'external' for packages with no intl directory,
18557+dnl and 'no-libtool' or 'use-libtool' for packages with an intl directory.
18558+dnl If INTLSYMBOL is 'use-libtool', then a libtool library
18559+dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
18560+dnl depending on --{enable,disable}-{shared,static} and on the presence of
18561+dnl AM-DISABLE-SHARED). If INTLSYMBOL is 'no-libtool', a static library
18562+dnl $(top_builddir)/intl/libintl.a will be created.
18563+dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
18564+dnl implementations (in libc or libintl) without the ngettext() function
18565+dnl will be ignored. If NEEDSYMBOL is specified and is
18566+dnl 'need-formatstring-macros', then GNU gettext implementations that don't
18567+dnl support the ISO C 99 <inttypes.h> formatstring macros will be ignored.
18568+dnl INTLDIR is used to find the intl libraries. If empty,
18569+dnl the value `$(top_builddir)/intl/' is used.
18570+dnl
18571+dnl The result of the configuration is one of three cases:
18572+dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
18573+dnl and used.
18574+dnl Catalog format: GNU --> install in $(datadir)
18575+dnl Catalog extension: .mo after installation, .gmo in source tree
18576+dnl 2) GNU gettext has been found in the system's C library.
18577+dnl Catalog format: GNU --> install in $(datadir)
18578+dnl Catalog extension: .mo after installation, .gmo in source tree
18579+dnl 3) No internationalization, always use English msgid.
18580+dnl Catalog format: none
18581+dnl Catalog extension: none
18582+dnl If INTLSYMBOL is 'external', only cases 2 and 3 can occur.
18583+dnl The use of .gmo is historical (it was needed to avoid overwriting the
18584+dnl GNU format catalogs when building on a platform with an X/Open gettext),
18585+dnl but we keep it in order not to force irrelevant filename changes on the
18586+dnl maintainers.
18587+dnl
18588+AC_DEFUN([AM_GNU_GETTEXT],
18589+[
18590+ dnl Argument checking.
18591+ ifelse([$1], [], , [ifelse([$1], [external], , [ifelse([$1], [no-libtool], , [ifelse([$1], [use-libtool], ,
18592+ [errprint([ERROR: invalid first argument to AM_GNU_GETTEXT
18593+])])])])])
18594+ ifelse([$2], [], , [ifelse([$2], [need-ngettext], , [ifelse([$2], [need-formatstring-macros], ,
18595+ [errprint([ERROR: invalid second argument to AM_GNU_GETTEXT
18596+])])])])
18597+ define(gt_included_intl, ifelse([$1], [external], [no], [yes]))
18598+ define(gt_libtool_suffix_prefix, ifelse([$1], [use-libtool], [l], []))
18599+
18600+ AC_REQUIRE([AM_PO_SUBDIRS])dnl
18601+ ifelse(gt_included_intl, yes, [
18602+ AC_REQUIRE([AM_INTL_SUBDIR])dnl
18603+ ])
18604+
18605+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
18606+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
18607+ AC_REQUIRE([AC_LIB_RPATH])
18608+
18609+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18610+ dnl Ideally we would do this search only after the
18611+ dnl if test "$USE_NLS" = "yes"; then
18612+ dnl if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18613+ dnl tests. But if configure.in invokes AM_ICONV after AM_GNU_GETTEXT
18614+ dnl the configure script would need to contain the same shell code
18615+ dnl again, outside any 'if'. There are two solutions:
18616+ dnl - Invoke AM_ICONV_LINKFLAGS_BODY here, outside any 'if'.
18617+ dnl - Control the expansions in more detail using AC_PROVIDE_IFELSE.
18618+ dnl Since AC_PROVIDE_IFELSE is only in autoconf >= 2.52 and not
18619+ dnl documented, we avoid it.
18620+ ifelse(gt_included_intl, yes, , [
18621+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
18622+ ])
18623+
18624+ dnl Set USE_NLS.
18625+ AM_NLS
18626+
18627+ ifelse(gt_included_intl, yes, [
18628+ BUILD_INCLUDED_LIBINTL=no
18629+ USE_INCLUDED_LIBINTL=no
18630+ ])
18631+ LIBINTL=
18632+ LTLIBINTL=
18633+ POSUB=
18634+
18635+ dnl If we use NLS figure out what method
18636+ if test "$USE_NLS" = "yes"; then
18637+ gt_use_preinstalled_gnugettext=no
18638+ ifelse(gt_included_intl, yes, [
18639+ AC_MSG_CHECKING([whether included gettext is requested])
18640+ AC_ARG_WITH(included-gettext,
18641+ [ --with-included-gettext use the GNU gettext library included here],
18642+ nls_cv_force_use_gnu_gettext=$withval,
18643+ nls_cv_force_use_gnu_gettext=no)
18644+ AC_MSG_RESULT($nls_cv_force_use_gnu_gettext)
18645+
18646+ nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
18647+ if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
18648+ ])
18649+ dnl User does not insist on using GNU NLS library. Figure out what
18650+ dnl to use. If GNU gettext is available we use this. Else we have
18651+ dnl to fall back to GNU NLS library.
18652+
18653+ dnl Add a version number to the cache macros.
18654+ define([gt_api_version], ifelse([$2], [need-formatstring-macros], 3, ifelse([$2], [need-ngettext], 2, 1)))
18655+ define([gt_cv_func_gnugettext_libc], [gt_cv_func_gnugettext]gt_api_version[_libc])
18656+ define([gt_cv_func_gnugettext_libintl], [gt_cv_func_gnugettext]gt_api_version[_libintl])
18657+
18658+ AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
18659+ [AC_TRY_LINK([#include <libintl.h>
18660+]ifelse([$2], [need-formatstring-macros],
18661+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18662+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18663+#endif
18664+changequote(,)dnl
18665+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18666+changequote([,])dnl
18667+], [])[extern int _nl_msg_cat_cntr;
18668+extern int *_nl_domain_bindings;],
18669+ [bindtextdomain ("", "");
18670+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_domain_bindings],
18671+ gt_cv_func_gnugettext_libc=yes,
18672+ gt_cv_func_gnugettext_libc=no)])
18673+
18674+ if test "$gt_cv_func_gnugettext_libc" != "yes"; then
18675+ dnl Sometimes libintl requires libiconv, so first search for libiconv.
18676+ ifelse(gt_included_intl, yes, , [
18677+ AM_ICONV_LINK
18678+ ])
18679+ dnl Search for libintl and define LIBINTL, LTLIBINTL and INCINTL
18680+ dnl accordingly. Don't use AC_LIB_LINKFLAGS_BODY([intl],[iconv])
18681+ dnl because that would add "-liconv" to LIBINTL and LTLIBINTL
18682+ dnl even if libiconv doesn't exist.
18683+ AC_LIB_LINKFLAGS_BODY([intl])
18684+ AC_CACHE_CHECK([for GNU gettext in libintl],
18685+ gt_cv_func_gnugettext_libintl,
18686+ [gt_save_CPPFLAGS="$CPPFLAGS"
18687+ CPPFLAGS="$CPPFLAGS $INCINTL"
18688+ gt_save_LIBS="$LIBS"
18689+ LIBS="$LIBS $LIBINTL"
18690+ dnl Now see whether libintl exists and does not depend on libiconv.
18691+ AC_TRY_LINK([#include <libintl.h>
18692+]ifelse([$2], [need-formatstring-macros],
18693+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18694+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18695+#endif
18696+changequote(,)dnl
18697+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18698+changequote([,])dnl
18699+], [])[extern int _nl_msg_cat_cntr;
18700+extern
18701+#ifdef __cplusplus
18702+"C"
18703+#endif
18704+const char *_nl_expand_alias ();],
18705+ [bindtextdomain ("", "");
18706+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18707+ gt_cv_func_gnugettext_libintl=yes,
18708+ gt_cv_func_gnugettext_libintl=no)
18709+ dnl Now see whether libintl exists and depends on libiconv.
18710+ if test "$gt_cv_func_gnugettext_libintl" != yes && test -n "$LIBICONV"; then
18711+ LIBS="$LIBS $LIBICONV"
18712+ AC_TRY_LINK([#include <libintl.h>
18713+]ifelse([$2], [need-formatstring-macros],
18714+[#ifndef __GNU_GETTEXT_SUPPORTED_REVISION
18715+#define __GNU_GETTEXT_SUPPORTED_REVISION(major) ((major) == 0 ? 0 : -1)
18716+#endif
18717+changequote(,)dnl
18718+typedef int array [2 * (__GNU_GETTEXT_SUPPORTED_REVISION(0) >= 1) - 1];
18719+changequote([,])dnl
18720+], [])[extern int _nl_msg_cat_cntr;
18721+extern
18722+#ifdef __cplusplus
18723+"C"
18724+#endif
18725+const char *_nl_expand_alias ();],
18726+ [bindtextdomain ("", "");
18727+return (int) gettext ("")]ifelse([$2], [need-ngettext], [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr + *_nl_expand_alias (0)],
18728+ [LIBINTL="$LIBINTL $LIBICONV"
18729+ LTLIBINTL="$LTLIBINTL $LTLIBICONV"
18730+ gt_cv_func_gnugettext_libintl=yes
18731+ ])
18732+ fi
18733+ CPPFLAGS="$gt_save_CPPFLAGS"
18734+ LIBS="$gt_save_LIBS"])
18735+ fi
18736+
18737+ dnl If an already present or preinstalled GNU gettext() is found,
18738+ dnl use it. But if this macro is used in GNU gettext, and GNU
18739+ dnl gettext is already preinstalled in libintl, we update this
18740+ dnl libintl. (Cf. the install rule in intl/Makefile.in.)
18741+ if test "$gt_cv_func_gnugettext_libc" = "yes" \
18742+ || { test "$gt_cv_func_gnugettext_libintl" = "yes" \
18743+ && test "$PACKAGE" != gettext-runtime \
18744+ && test "$PACKAGE" != gettext-tools; }; then
18745+ gt_use_preinstalled_gnugettext=yes
18746+ else
18747+ dnl Reset the values set by searching for libintl.
18748+ LIBINTL=
18749+ LTLIBINTL=
18750+ INCINTL=
18751+ fi
18752+
18753+ ifelse(gt_included_intl, yes, [
18754+ if test "$gt_use_preinstalled_gnugettext" != "yes"; then
18755+ dnl GNU gettext is not found in the C library.
18756+ dnl Fall back on included GNU gettext library.
18757+ nls_cv_use_gnu_gettext=yes
18758+ fi
18759+ fi
18760+
18761+ if test "$nls_cv_use_gnu_gettext" = "yes"; then
18762+ dnl Mark actions used to generate GNU NLS library.
18763+ BUILD_INCLUDED_LIBINTL=yes
18764+ USE_INCLUDED_LIBINTL=yes
18765+ LIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LIBICONV"
18766+ LTLIBINTL="ifelse([$3],[],\${top_builddir}/intl,[$3])/libintl.[]gt_libtool_suffix_prefix[]a $LTLIBICONV"
18767+ LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
18768+ fi
18769+
18770+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18771+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18772+ dnl Mark actions to use GNU gettext tools.
18773+ CATOBJEXT=.gmo
18774+ fi
18775+ ])
18776+
18777+ if test "$gt_use_preinstalled_gnugettext" = "yes" \
18778+ || test "$nls_cv_use_gnu_gettext" = "yes"; then
18779+ AC_DEFINE(ENABLE_NLS, 1,
18780+ [Define to 1 if translation of program messages to the user's native language
18781+ is requested.])
18782+ else
18783+ USE_NLS=no
18784+ fi
18785+ fi
18786+
18787+ AC_MSG_CHECKING([whether to use NLS])
18788+ AC_MSG_RESULT([$USE_NLS])
18789+ if test "$USE_NLS" = "yes"; then
18790+ AC_MSG_CHECKING([where the gettext function comes from])
18791+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18792+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18793+ gt_source="external libintl"
18794+ else
18795+ gt_source="libc"
18796+ fi
18797+ else
18798+ gt_source="included intl directory"
18799+ fi
18800+ AC_MSG_RESULT([$gt_source])
18801+ fi
18802+
18803+ if test "$USE_NLS" = "yes"; then
18804+
18805+ if test "$gt_use_preinstalled_gnugettext" = "yes"; then
18806+ if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
18807+ AC_MSG_CHECKING([how to link with libintl])
18808+ AC_MSG_RESULT([$LIBINTL])
18809+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCINTL])
18810+ fi
18811+
18812+ dnl For backward compatibility. Some packages may be using this.
18813+ AC_DEFINE(HAVE_GETTEXT, 1,
18814+ [Define if the GNU gettext() function is already present or preinstalled.])
18815+ AC_DEFINE(HAVE_DCGETTEXT, 1,
18816+ [Define if the GNU dcgettext() function is already present or preinstalled.])
18817+ fi
18818+
18819+ dnl We need to process the po/ directory.
18820+ POSUB=po
18821+ fi
18822+
18823+ ifelse(gt_included_intl, yes, [
18824+ dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
18825+ dnl to 'yes' because some of the testsuite requires it.
18826+ if test "$PACKAGE" = gettext-runtime || test "$PACKAGE" = gettext-tools; then
18827+ BUILD_INCLUDED_LIBINTL=yes
18828+ fi
18829+
18830+ dnl Make all variables we use known to autoconf.
18831+ AC_SUBST(BUILD_INCLUDED_LIBINTL)
18832+ AC_SUBST(USE_INCLUDED_LIBINTL)
18833+ AC_SUBST(CATOBJEXT)
18834+
18835+ dnl For backward compatibility. Some configure.ins may be using this.
18836+ nls_cv_header_intl=
18837+ nls_cv_header_libgt=
18838+
18839+ dnl For backward compatibility. Some Makefiles may be using this.
18840+ DATADIRNAME=share
18841+ AC_SUBST(DATADIRNAME)
18842+
18843+ dnl For backward compatibility. Some Makefiles may be using this.
18844+ INSTOBJEXT=.mo
18845+ AC_SUBST(INSTOBJEXT)
18846+
18847+ dnl For backward compatibility. Some Makefiles may be using this.
18848+ GENCAT=gencat
18849+ AC_SUBST(GENCAT)
18850+
18851+ dnl For backward compatibility. Some Makefiles may be using this.
18852+ if test "$USE_INCLUDED_LIBINTL" = yes; then
18853+ INTLOBJS="\$(GETTOBJS)"
18854+ fi
18855+ AC_SUBST(INTLOBJS)
18856+
18857+ dnl Enable libtool support if the surrounding package wishes it.
18858+ INTL_LIBTOOL_SUFFIX_PREFIX=gt_libtool_suffix_prefix
18859+ AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
18860+ ])
18861+
18862+ dnl For backward compatibility. Some Makefiles may be using this.
18863+ INTLLIBS="$LIBINTL"
18864+ AC_SUBST(INTLLIBS)
18865+
18866+ dnl Make all documented variables known to autoconf.
18867+ AC_SUBST(LIBINTL)
18868+ AC_SUBST(LTLIBINTL)
18869+ AC_SUBST(POSUB)
18870+])
18871+
18872+
18873+dnl Checks for all prerequisites of the intl subdirectory,
18874+dnl except for INTL_LIBTOOL_SUFFIX_PREFIX (and possibly LIBTOOL), INTLOBJS,
18875+dnl USE_INCLUDED_LIBINTL, BUILD_INCLUDED_LIBINTL.
18876+AC_DEFUN([AM_INTL_SUBDIR],
18877+[
18878+ AC_REQUIRE([AC_PROG_INSTALL])dnl
18879+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
18880+ AC_REQUIRE([AC_PROG_CC])dnl
18881+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
18882+ AC_REQUIRE([AC_PROG_RANLIB])dnl
18883+ AC_REQUIRE([AC_ISC_POSIX])dnl
18884+ AC_REQUIRE([AC_HEADER_STDC])dnl
18885+ AC_REQUIRE([AC_C_CONST])dnl
18886+ AC_REQUIRE([bh_C_SIGNED])dnl
18887+ AC_REQUIRE([AC_C_INLINE])dnl
18888+ AC_REQUIRE([AC_TYPE_OFF_T])dnl
18889+ AC_REQUIRE([AC_TYPE_SIZE_T])dnl
18890+ AC_REQUIRE([jm_AC_TYPE_LONG_LONG])dnl
18891+ AC_REQUIRE([gt_TYPE_LONGDOUBLE])dnl
18892+ AC_REQUIRE([gt_TYPE_WCHAR_T])dnl
18893+ AC_REQUIRE([gt_TYPE_WINT_T])dnl
18894+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
18895+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
18896+ AC_REQUIRE([gt_TYPE_INTMAX_T])
18897+ AC_REQUIRE([gt_PRINTF_POSIX])
18898+ AC_REQUIRE([AC_FUNC_ALLOCA])dnl
18899+ AC_REQUIRE([AC_FUNC_MMAP])dnl
18900+ AC_REQUIRE([jm_GLIBC21])dnl
18901+ AC_REQUIRE([gt_INTDIV0])dnl
18902+ AC_REQUIRE([jm_AC_TYPE_UINTMAX_T])dnl
18903+ AC_REQUIRE([gt_HEADER_INTTYPES_H])dnl
18904+ AC_REQUIRE([gt_INTTYPES_PRI])dnl
18905+ AC_REQUIRE([gl_XSIZE])dnl
18906+
18907+ AC_CHECK_TYPE([ptrdiff_t], ,
18908+ [AC_DEFINE([ptrdiff_t], [long],
18909+ [Define as the type of the result of subtracting two pointers, if the system doesn't define it.])
18910+ ])
18911+ AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
18912+stdlib.h string.h unistd.h sys/param.h])
18913+ AC_CHECK_FUNCS([asprintf fwprintf getcwd getegid geteuid getgid getuid \
18914+mempcpy munmap putenv setenv setlocale snprintf stpcpy strcasecmp strdup \
18915+strtoul tsearch wcslen __argz_count __argz_stringify __argz_next \
18916+__fsetlocking])
18917+
18918+ dnl Use the _snprintf function only if it is declared (because on NetBSD it
18919+ dnl is defined as a weak alias of snprintf; we prefer to use the latter).
18920+ gt_CHECK_DECL(_snprintf, [#include <stdio.h>])
18921+ gt_CHECK_DECL(_snwprintf, [#include <stdio.h>])
18922+
18923+ dnl Use the *_unlocked functions only if they are declared.
18924+ dnl (because some of them were defined without being declared in Solaris
18925+ dnl 2.5.1 but were removed in Solaris 2.6, whereas we want binaries built
18926+ dnl on Solaris 2.5.1 to run on Solaris 2.6).
18927+ dnl Don't use AC_CHECK_DECLS because it isn't supported in autoconf-2.13.
18928+ gt_CHECK_DECL(feof_unlocked, [#include <stdio.h>])
18929+ gt_CHECK_DECL(fgets_unlocked, [#include <stdio.h>])
18930+ gt_CHECK_DECL(getc_unlocked, [#include <stdio.h>])
18931+
18932+ case $gt_cv_func_printf_posix in
18933+ *yes) HAVE_POSIX_PRINTF=1 ;;
18934+ *) HAVE_POSIX_PRINTF=0 ;;
18935+ esac
18936+ AC_SUBST([HAVE_POSIX_PRINTF])
18937+ if test "$ac_cv_func_asprintf" = yes; then
18938+ HAVE_ASPRINTF=1
18939+ else
18940+ HAVE_ASPRINTF=0
18941+ fi
18942+ AC_SUBST([HAVE_ASPRINTF])
18943+ if test "$ac_cv_func_snprintf" = yes; then
18944+ HAVE_SNPRINTF=1
18945+ else
18946+ HAVE_SNPRINTF=0
18947+ fi
18948+ AC_SUBST([HAVE_SNPRINTF])
18949+ if test "$ac_cv_func_wprintf" = yes; then
18950+ HAVE_WPRINTF=1
18951+ else
18952+ HAVE_WPRINTF=0
18953+ fi
18954+ AC_SUBST([HAVE_WPRINTF])
18955+
18956+ AM_ICONV
18957+ AM_LANGINFO_CODESET
18958+ if test $ac_cv_header_locale_h = yes; then
18959+ AM_LC_MESSAGES
18960+ fi
18961+
18962+ dnl intl/plural.c is generated from intl/plural.y. It requires bison,
18963+ dnl because plural.y uses bison specific features. It requires at least
18964+ dnl bison-1.26 because earlier versions generate a plural.c that doesn't
18965+ dnl compile.
18966+ dnl bison is only needed for the maintainer (who touches plural.y). But in
18967+ dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
18968+ dnl the rule in general Makefile. Now, some people carelessly touch the
18969+ dnl files or have a broken "make" program, hence the plural.c rule will
18970+ dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
18971+ dnl present or too old.
18972+ AC_CHECK_PROGS([INTLBISON], [bison])
18973+ if test -z "$INTLBISON"; then
18974+ ac_verc_fail=yes
18975+ else
18976+ dnl Found it, now check the version.
18977+ AC_MSG_CHECKING([version of bison])
18978+changequote(<<,>>)dnl
18979+ ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
18980+ case $ac_prog_version in
18981+ '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
18982+ 1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
18983+changequote([,])dnl
18984+ ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
18985+ *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
18986+ esac
18987+ AC_MSG_RESULT([$ac_prog_version])
18988+ fi
18989+ if test $ac_verc_fail = yes; then
18990+ INTLBISON=:
18991+ fi
18992+])
18993+
18994+
18995+dnl gt_CHECK_DECL(FUNC, INCLUDES)
18996+dnl Check whether a function is declared.
18997+AC_DEFUN([gt_CHECK_DECL],
18998+[
18999+ AC_CACHE_CHECK([whether $1 is declared], ac_cv_have_decl_$1,
19000+ [AC_TRY_COMPILE([$2], [
19001+#ifndef $1
19002+ char *p = (char *) $1;
19003+#endif
19004+], ac_cv_have_decl_$1=yes, ac_cv_have_decl_$1=no)])
19005+ if test $ac_cv_have_decl_$1 = yes; then
19006+ gt_value=1
19007+ else
19008+ gt_value=0
19009+ fi
19010+ AC_DEFINE_UNQUOTED([HAVE_DECL_]translit($1, [a-z], [A-Z]), [$gt_value],
19011+ [Define to 1 if you have the declaration of `$1', and to 0 if you don't.])
19012+])
19013+
19014+
19015+dnl Usage: AM_GNU_GETTEXT_VERSION([gettext-version])
19016+AC_DEFUN([AM_GNU_GETTEXT_VERSION], [])
19017--- lrzsz-0.12.20.safe/m4/glibc21.m4 1969-12-31 19:00:00.000000000 -0500
19018+++ lrzsz-0.12.20/m4/glibc21.m4 2004-09-12 14:40:34.833675432 -0400
19019@@ -0,0 +1,32 @@
19020+# glibc21.m4 serial 2 (fileutils-4.1.3, gettext-0.10.40)
19021+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19022+dnl This file is free software, distributed under the terms of the GNU
19023+dnl General Public License. As a special exception to the GNU General
19024+dnl Public License, this file may be distributed as part of a program
19025+dnl that contains a configuration script generated by Autoconf, under
19026+dnl the same distribution terms as the rest of that program.
19027+
19028+# Test for the GNU C Library, version 2.1 or newer.
19029+# From Bruno Haible.
19030+
19031+AC_DEFUN([jm_GLIBC21],
19032+ [
19033+ AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
19034+ ac_cv_gnu_library_2_1,
19035+ [AC_EGREP_CPP([Lucky GNU user],
19036+ [
19037+#include <features.h>
19038+#ifdef __GNU_LIBRARY__
19039+ #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
19040+ Lucky GNU user
19041+ #endif
19042+#endif
19043+ ],
19044+ ac_cv_gnu_library_2_1=yes,
19045+ ac_cv_gnu_library_2_1=no)
19046+ ]
19047+ )
19048+ AC_SUBST(GLIBC21)
19049+ GLIBC21="$ac_cv_gnu_library_2_1"
19050+ ]
19051+)
19052--- lrzsz-0.12.20.safe/m4/iconv.m4 1969-12-31 19:00:00.000000000 -0500
19053+++ lrzsz-0.12.20/m4/iconv.m4 2004-09-12 14:40:34.839674520 -0400
19054@@ -0,0 +1,103 @@
19055+# iconv.m4 serial AM4 (gettext-0.11.3)
19056+dnl Copyright (C) 2000-2002 Free Software Foundation, Inc.
19057+dnl This file is free software, distributed under the terms of the GNU
19058+dnl General Public License. As a special exception to the GNU General
19059+dnl Public License, this file may be distributed as part of a program
19060+dnl that contains a configuration script generated by Autoconf, under
19061+dnl the same distribution terms as the rest of that program.
19062+
19063+dnl From Bruno Haible.
19064+
19065+AC_DEFUN([AM_ICONV_LINKFLAGS_BODY],
19066+[
19067+ dnl Prerequisites of AC_LIB_LINKFLAGS_BODY.
19068+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19069+ AC_REQUIRE([AC_LIB_RPATH])
19070+
19071+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19072+ dnl accordingly.
19073+ AC_LIB_LINKFLAGS_BODY([iconv])
19074+])
19075+
19076+AC_DEFUN([AM_ICONV_LINK],
19077+[
19078+ dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
19079+ dnl those with the standalone portable GNU libiconv installed).
19080+
19081+ dnl Search for libiconv and define LIBICONV, LTLIBICONV and INCICONV
19082+ dnl accordingly.
19083+ AC_REQUIRE([AM_ICONV_LINKFLAGS_BODY])
19084+
19085+ dnl Add $INCICONV to CPPFLAGS before performing the following checks,
19086+ dnl because if the user has installed libiconv and not disabled its use
19087+ dnl via --without-libiconv-prefix, he wants to use it. The first
19088+ dnl AC_TRY_LINK will then fail, the second AC_TRY_LINK will succeed.
19089+ am_save_CPPFLAGS="$CPPFLAGS"
19090+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INCICONV])
19091+
19092+ AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
19093+ am_cv_func_iconv="no, consider installing GNU libiconv"
19094+ am_cv_lib_iconv=no
19095+ AC_TRY_LINK([#include <stdlib.h>
19096+#include <iconv.h>],
19097+ [iconv_t cd = iconv_open("","");
19098+ iconv(cd,NULL,NULL,NULL,NULL);
19099+ iconv_close(cd);],
19100+ am_cv_func_iconv=yes)
19101+ if test "$am_cv_func_iconv" != yes; then
19102+ am_save_LIBS="$LIBS"
19103+ LIBS="$LIBS $LIBICONV"
19104+ AC_TRY_LINK([#include <stdlib.h>
19105+#include <iconv.h>],
19106+ [iconv_t cd = iconv_open("","");
19107+ iconv(cd,NULL,NULL,NULL,NULL);
19108+ iconv_close(cd);],
19109+ am_cv_lib_iconv=yes
19110+ am_cv_func_iconv=yes)
19111+ LIBS="$am_save_LIBS"
19112+ fi
19113+ ])
19114+ if test "$am_cv_func_iconv" = yes; then
19115+ AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
19116+ fi
19117+ if test "$am_cv_lib_iconv" = yes; then
19118+ AC_MSG_CHECKING([how to link with libiconv])
19119+ AC_MSG_RESULT([$LIBICONV])
19120+ else
19121+ dnl If $LIBICONV didn't lead to a usable library, we don't need $INCICONV
19122+ dnl either.
19123+ CPPFLAGS="$am_save_CPPFLAGS"
19124+ LIBICONV=
19125+ LTLIBICONV=
19126+ fi
19127+ AC_SUBST(LIBICONV)
19128+ AC_SUBST(LTLIBICONV)
19129+])
19130+
19131+AC_DEFUN([AM_ICONV],
19132+[
19133+ AM_ICONV_LINK
19134+ if test "$am_cv_func_iconv" = yes; then
19135+ AC_MSG_CHECKING([for iconv declaration])
19136+ AC_CACHE_VAL(am_cv_proto_iconv, [
19137+ AC_TRY_COMPILE([
19138+#include <stdlib.h>
19139+#include <iconv.h>
19140+extern
19141+#ifdef __cplusplus
19142+"C"
19143+#endif
19144+#if defined(__STDC__) || defined(__cplusplus)
19145+size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
19146+#else
19147+size_t iconv();
19148+#endif
19149+], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
19150+ 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);"])
19151+ am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
19152+ AC_MSG_RESULT([$]{ac_t:-
19153+ }[$]am_cv_proto_iconv)
19154+ AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
19155+ [Define as const if the declaration of iconv() needs const.])
19156+ fi
19157+])
19158--- lrzsz-0.12.20.safe/m4/intdiv0.m4 1969-12-31 19:00:00.000000000 -0500
19159+++ lrzsz-0.12.20/m4/intdiv0.m4 2004-09-12 14:40:34.845673608 -0400
19160@@ -0,0 +1,72 @@
19161+# intdiv0.m4 serial 1 (gettext-0.11.3)
19162+dnl Copyright (C) 2002 Free Software Foundation, Inc.
19163+dnl This file is free software, distributed under the terms of the GNU
19164+dnl General Public License. As a special exception to the GNU General
19165+dnl Public License, this file may be distributed as part of a program
19166+dnl that contains a configuration script generated by Autoconf, under
19167+dnl the same distribution terms as the rest of that program.
19168+
19169+dnl From Bruno Haible.
19170+
19171+AC_DEFUN([gt_INTDIV0],
19172+[
19173+ AC_REQUIRE([AC_PROG_CC])dnl
19174+ AC_REQUIRE([AC_CANONICAL_HOST])dnl
19175+
19176+ AC_CACHE_CHECK([whether integer division by zero raises SIGFPE],
19177+ gt_cv_int_divbyzero_sigfpe,
19178+ [
19179+ AC_TRY_RUN([
19180+#include <stdlib.h>
19181+#include <signal.h>
19182+
19183+static void
19184+#ifdef __cplusplus
19185+sigfpe_handler (int sig)
19186+#else
19187+sigfpe_handler (sig) int sig;
19188+#endif
19189+{
19190+ /* Exit with code 0 if SIGFPE, with code 1 if any other signal. */
19191+ exit (sig != SIGFPE);
19192+}
19193+
19194+int x = 1;
19195+int y = 0;
19196+int z;
19197+int nan;
19198+
19199+int main ()
19200+{
19201+ signal (SIGFPE, sigfpe_handler);
19202+/* IRIX and AIX (when "xlc -qcheck" is used) yield signal SIGTRAP. */
19203+#if (defined (__sgi) || defined (_AIX)) && defined (SIGTRAP)
19204+ signal (SIGTRAP, sigfpe_handler);
19205+#endif
19206+/* Linux/SPARC yields signal SIGILL. */
19207+#if defined (__sparc__) && defined (__linux__)
19208+ signal (SIGILL, sigfpe_handler);
19209+#endif
19210+
19211+ z = x / y;
19212+ nan = y / y;
19213+ exit (1);
19214+}
19215+], gt_cv_int_divbyzero_sigfpe=yes, gt_cv_int_divbyzero_sigfpe=no,
19216+ [
19217+ # Guess based on the CPU.
19218+ case "$host_cpu" in
19219+ alpha* | i[34567]86 | m68k | s390*)
19220+ gt_cv_int_divbyzero_sigfpe="guessing yes";;
19221+ *)
19222+ gt_cv_int_divbyzero_sigfpe="guessing no";;
19223+ esac
19224+ ])
19225+ ])
19226+ case "$gt_cv_int_divbyzero_sigfpe" in
19227+ *yes) value=1;;
19228+ *) value=0;;
19229+ esac
19230+ AC_DEFINE_UNQUOTED(INTDIV0_RAISES_SIGFPE, $value,
19231+ [Define if integer division by zero raises signal SIGFPE.])
19232+])
19233--- lrzsz-0.12.20.safe/m4/intmax.m4 1969-12-31 19:00:00.000000000 -0500
19234+++ lrzsz-0.12.20/m4/intmax.m4 2004-09-12 14:40:34.855672088 -0400
19235@@ -0,0 +1,32 @@
19236+# intmax.m4 serial 1 (gettext-0.12)
19237+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
19238+dnl This file is free software, distributed under the terms of the GNU
19239+dnl General Public License. As a special exception to the GNU General
19240+dnl Public License, this file may be distributed as part of a program
19241+dnl that contains a configuration script generated by Autoconf, under
19242+dnl the same distribution terms as the rest of that program.
19243+
19244+dnl From Bruno Haible.
19245+dnl Test whether the system has the 'intmax_t' type, but don't attempt to
19246+dnl find a replacement if it is lacking.
19247+
19248+AC_DEFUN([gt_TYPE_INTMAX_T],
19249+[
19250+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
19251+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
19252+ AC_CACHE_CHECK(for intmax_t, gt_cv_c_intmax_t,
19253+ [AC_TRY_COMPILE([
19254+#include <stddef.h>
19255+#include <stdlib.h>
19256+#if HAVE_STDINT_H_WITH_UINTMAX
19257+#include <stdint.h>
19258+#endif
19259+#if HAVE_INTTYPES_H_WITH_UINTMAX
19260+#include <inttypes.h>
19261+#endif
19262+], [intmax_t x = -1;], gt_cv_c_intmax_t=yes, gt_cv_c_intmax_t=no)])
19263+ if test $gt_cv_c_intmax_t = yes; then
19264+ AC_DEFINE(HAVE_INTMAX_T, 1,
19265+ [Define if you have the 'intmax_t' type in <stdint.h> or <inttypes.h>.])
19266+ fi
19267+])
19268--- lrzsz-0.12.20.safe/m4/inttypes_h.m4 1969-12-31 19:00:00.000000000 -0500
19269+++ lrzsz-0.12.20/m4/inttypes_h.m4 2004-09-12 14:40:34.868670112 -0400
19270@@ -0,0 +1,28 @@
19271+# inttypes_h.m4 serial 5 (gettext-0.12)
19272+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
19273+dnl This file is free software, distributed under the terms of the GNU
19274+dnl General Public License. As a special exception to the GNU General
19275+dnl Public License, this file may be distributed as part of a program
19276+dnl that contains a configuration script generated by Autoconf, under
19277+dnl the same distribution terms as the rest of that program.
19278+
19279+dnl From Paul Eggert.
19280+
19281+# Define HAVE_INTTYPES_H_WITH_UINTMAX if <inttypes.h> exists,
19282+# doesn't clash with <sys/types.h>, and declares uintmax_t.
19283+
19284+AC_DEFUN([jm_AC_HEADER_INTTYPES_H],
19285+[
19286+ AC_CACHE_CHECK([for inttypes.h], jm_ac_cv_header_inttypes_h,
19287+ [AC_TRY_COMPILE(
19288+ [#include <sys/types.h>
19289+#include <inttypes.h>],
19290+ [uintmax_t i = (uintmax_t) -1;],
19291+ jm_ac_cv_header_inttypes_h=yes,
19292+ jm_ac_cv_header_inttypes_h=no)])
19293+ if test $jm_ac_cv_header_inttypes_h = yes; then
19294+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H_WITH_UINTMAX, 1,
19295+ [Define if <inttypes.h> exists, doesn't clash with <sys/types.h>,
19296+ and declares uintmax_t. ])
19297+ fi
19298+])
19299--- lrzsz-0.12.20.safe/m4/inttypes.m4 1969-12-31 19:00:00.000000000 -0500
19300+++ lrzsz-0.12.20/m4/inttypes.m4 2004-09-12 14:40:34.861671176 -0400
19301@@ -0,0 +1,27 @@
19302+# inttypes.m4 serial 1 (gettext-0.11.4)
19303+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19304+dnl This file is free software, distributed under the terms of the GNU
19305+dnl General Public License. As a special exception to the GNU General
19306+dnl Public License, this file may be distributed as part of a program
19307+dnl that contains a configuration script generated by Autoconf, under
19308+dnl the same distribution terms as the rest of that program.
19309+
19310+dnl From Paul Eggert.
19311+
19312+# Define HAVE_INTTYPES_H if <inttypes.h> exists and doesn't clash with
19313+# <sys/types.h>.
19314+
19315+AC_DEFUN([gt_HEADER_INTTYPES_H],
19316+[
19317+ AC_CACHE_CHECK([for inttypes.h], gt_cv_header_inttypes_h,
19318+ [
19319+ AC_TRY_COMPILE(
19320+ [#include <sys/types.h>
19321+#include <inttypes.h>],
19322+ [], gt_cv_header_inttypes_h=yes, gt_cv_header_inttypes_h=no)
19323+ ])
19324+ if test $gt_cv_header_inttypes_h = yes; then
19325+ AC_DEFINE_UNQUOTED(HAVE_INTTYPES_H, 1,
19326+ [Define if <inttypes.h> exists and doesn't clash with <sys/types.h>.])
19327+ fi
19328+])
19329--- lrzsz-0.12.20.safe/m4/inttypes-pri.m4 1969-12-31 19:00:00.000000000 -0500
19330+++ lrzsz-0.12.20/m4/inttypes-pri.m4 2004-09-12 14:40:34.874669200 -0400
19331@@ -0,0 +1,32 @@
19332+# inttypes-pri.m4 serial 1 (gettext-0.11.4)
19333+dnl Copyright (C) 1997-2002 Free Software Foundation, Inc.
19334+dnl This file is free software, distributed under the terms of the GNU
19335+dnl General Public License. As a special exception to the GNU General
19336+dnl Public License, this file may be distributed as part of a program
19337+dnl that contains a configuration script generated by Autoconf, under
19338+dnl the same distribution terms as the rest of that program.
19339+
19340+dnl From Bruno Haible.
19341+
19342+# Define PRI_MACROS_BROKEN if <inttypes.h> exists and defines the PRI*
19343+# macros to non-string values. This is the case on AIX 4.3.3.
19344+
19345+AC_DEFUN([gt_INTTYPES_PRI],
19346+[
19347+ AC_REQUIRE([gt_HEADER_INTTYPES_H])
19348+ if test $gt_cv_header_inttypes_h = yes; then
19349+ AC_CACHE_CHECK([whether the inttypes.h PRIxNN macros are broken],
19350+ gt_cv_inttypes_pri_broken,
19351+ [
19352+ AC_TRY_COMPILE([#include <inttypes.h>
19353+#ifdef PRId32
19354+char *p = PRId32;
19355+#endif
19356+], [], gt_cv_inttypes_pri_broken=no, gt_cv_inttypes_pri_broken=yes)
19357+ ])
19358+ fi
19359+ if test "$gt_cv_inttypes_pri_broken" = yes; then
19360+ AC_DEFINE_UNQUOTED(PRI_MACROS_BROKEN, 1,
19361+ [Define if <inttypes.h> exists and defines unusable PRI* macros.])
19362+ fi
19363+])
19364--- lrzsz-0.12.20.safe/m4/isc-posix.m4 1969-12-31 19:00:00.000000000 -0500
19365+++ lrzsz-0.12.20/m4/isc-posix.m4 2004-09-12 14:40:34.885667528 -0400
19366@@ -0,0 +1,26 @@
19367+# isc-posix.m4 serial 2 (gettext-0.11.2)
19368+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19369+dnl This file is free software, distributed under the terms of the GNU
19370+dnl General Public License. As a special exception to the GNU General
19371+dnl Public License, this file may be distributed as part of a program
19372+dnl that contains a configuration script generated by Autoconf, under
19373+dnl the same distribution terms as the rest of that program.
19374+
19375+# This file is not needed with autoconf-2.53 and newer. Remove it in 2005.
19376+
19377+# This test replaces the one in autoconf.
19378+# Currently this macro should have the same name as the autoconf macro
19379+# because gettext's gettext.m4 (distributed in the automake package)
19380+# still uses it. Otherwise, the use in gettext.m4 makes autoheader
19381+# give these diagnostics:
19382+# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
19383+# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
19384+
19385+undefine([AC_ISC_POSIX])
19386+
19387+AC_DEFUN([AC_ISC_POSIX],
19388+ [
19389+ dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
19390+ AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
19391+ ]
19392+)
19393--- lrzsz-0.12.20.safe/m4/lcmessage.m4 1969-12-31 19:00:00.000000000 -0500
19394+++ lrzsz-0.12.20/m4/lcmessage.m4 2004-09-12 14:40:34.902664944 -0400
19395@@ -0,0 +1,32 @@
19396+# lcmessage.m4 serial 3 (gettext-0.11.3)
19397+dnl Copyright (C) 1995-2002 Free Software Foundation, Inc.
19398+dnl This file is free software, distributed under the terms of the GNU
19399+dnl General Public License. As a special exception to the GNU General
19400+dnl Public License, this file may be distributed as part of a program
19401+dnl that contains a configuration script generated by Autoconf, under
19402+dnl the same distribution terms as the rest of that program.
19403+dnl
19404+dnl This file can can be used in projects which are not available under
19405+dnl the GNU General Public License or the GNU Library General Public
19406+dnl License but which still want to provide support for the GNU gettext
19407+dnl functionality.
19408+dnl Please note that the actual code of the GNU gettext library is covered
19409+dnl by the GNU Library General Public License, and the rest of the GNU
19410+dnl gettext package package is covered by the GNU General Public License.
19411+dnl They are *not* in the public domain.
19412+
19413+dnl Authors:
19414+dnl Ulrich Drepper <drepper@cygnus.com>, 1995.
19415+
19416+# Check whether LC_MESSAGES is available in <locale.h>.
19417+
19418+AC_DEFUN([AM_LC_MESSAGES],
19419+[
19420+ AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
19421+ [AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
19422+ am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
19423+ if test $am_cv_val_LC_MESSAGES = yes; then
19424+ AC_DEFINE(HAVE_LC_MESSAGES, 1,
19425+ [Define if your <locale.h> file defines LC_MESSAGES.])
19426+ fi
19427+])
19428--- lrzsz-0.12.20.safe/m4/lib-ld.m4 1969-12-31 19:00:00.000000000 -0500
19429+++ lrzsz-0.12.20/m4/lib-ld.m4 2004-09-12 14:40:34.908664032 -0400
19430@@ -0,0 +1,112 @@
19431+# lib-ld.m4 serial 3 (gettext-0.13)
19432+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
19433+dnl This file is free software, distributed under the terms of the GNU
19434+dnl General Public License. As a special exception to the GNU General
19435+dnl Public License, this file may be distributed as part of a program
19436+dnl that contains a configuration script generated by Autoconf, under
19437+dnl the same distribution terms as the rest of that program.
19438+
19439+dnl Subroutines of libtool.m4,
19440+dnl with replacements s/AC_/AC_LIB/ and s/lt_cv/acl_cv/ to avoid collision
19441+dnl with libtool.m4.
19442+
19443+dnl From libtool-1.4. Sets the variable with_gnu_ld to yes or no.
19444+AC_DEFUN([AC_LIB_PROG_LD_GNU],
19445+[AC_CACHE_CHECK([if the linker ($LD) is GNU ld], acl_cv_prog_gnu_ld,
19446+[# I'd rather use --version here, but apparently some GNU ld's only accept -v.
19447+case `$LD -v 2>&1 </dev/null` in
19448+*GNU* | *'with BFD'*)
19449+ acl_cv_prog_gnu_ld=yes ;;
19450+*)
19451+ acl_cv_prog_gnu_ld=no ;;
19452+esac])
19453+with_gnu_ld=$acl_cv_prog_gnu_ld
19454+])
19455+
19456+dnl From libtool-1.4. Sets the variable LD.
19457+AC_DEFUN([AC_LIB_PROG_LD],
19458+[AC_ARG_WITH(gnu-ld,
19459+[ --with-gnu-ld assume the C compiler uses GNU ld [default=no]],
19460+test "$withval" = no || with_gnu_ld=yes, with_gnu_ld=no)
19461+AC_REQUIRE([AC_PROG_CC])dnl
19462+AC_REQUIRE([AC_CANONICAL_HOST])dnl
19463+# Prepare PATH_SEPARATOR.
19464+# The user is always right.
19465+if test "${PATH_SEPARATOR+set}" != set; then
19466+ echo "#! /bin/sh" >conf$$.sh
19467+ echo "exit 0" >>conf$$.sh
19468+ chmod +x conf$$.sh
19469+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
19470+ PATH_SEPARATOR=';'
19471+ else
19472+ PATH_SEPARATOR=:
19473+ fi
19474+ rm -f conf$$.sh
19475+fi
19476+ac_prog=ld
19477+if test "$GCC" = yes; then
19478+ # Check if gcc -print-prog-name=ld gives a path.
19479+ AC_MSG_CHECKING([for ld used by GCC])
19480+ case $host in
19481+ *-*-mingw*)
19482+ # gcc leaves a trailing carriage return which upsets mingw
19483+ ac_prog=`($CC -print-prog-name=ld) 2>&5 | tr -d '\015'` ;;
19484+ *)
19485+ ac_prog=`($CC -print-prog-name=ld) 2>&5` ;;
19486+ esac
19487+ case $ac_prog in
19488+ # Accept absolute paths.
19489+ [[\\/]* | [A-Za-z]:[\\/]*)]
19490+ [re_direlt='/[^/][^/]*/\.\./']
19491+ # Canonicalize the path of ld
19492+ ac_prog=`echo $ac_prog| sed 's%\\\\%/%g'`
19493+ while echo $ac_prog | grep "$re_direlt" > /dev/null 2>&1; do
19494+ ac_prog=`echo $ac_prog| sed "s%$re_direlt%/%"`
19495+ done
19496+ test -z "$LD" && LD="$ac_prog"
19497+ ;;
19498+ "")
19499+ # If it fails, then pretend we aren't using GCC.
19500+ ac_prog=ld
19501+ ;;
19502+ *)
19503+ # If it is relative, then search for the first ld in PATH.
19504+ with_gnu_ld=unknown
19505+ ;;
19506+ esac
19507+elif test "$with_gnu_ld" = yes; then
19508+ AC_MSG_CHECKING([for GNU ld])
19509+else
19510+ AC_MSG_CHECKING([for non-GNU ld])
19511+fi
19512+AC_CACHE_VAL(acl_cv_path_LD,
19513+[if test -z "$LD"; then
19514+ IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR-:}"
19515+ for ac_dir in $PATH; do
19516+ test -z "$ac_dir" && ac_dir=.
19517+ if test -f "$ac_dir/$ac_prog" || test -f "$ac_dir/$ac_prog$ac_exeext"; then
19518+ acl_cv_path_LD="$ac_dir/$ac_prog"
19519+ # Check to see if the program is GNU ld. I'd rather use --version,
19520+ # but apparently some GNU ld's only accept -v.
19521+ # Break only if it was the GNU/non-GNU ld that we prefer.
19522+ case `"$acl_cv_path_LD" -v 2>&1 < /dev/null` in
19523+ *GNU* | *'with BFD'*)
19524+ test "$with_gnu_ld" != no && break ;;
19525+ *)
19526+ test "$with_gnu_ld" != yes && break ;;
19527+ esac
19528+ fi
19529+ done
19530+ IFS="$ac_save_ifs"
19531+else
19532+ acl_cv_path_LD="$LD" # Let the user override the test with a path.
19533+fi])
19534+LD="$acl_cv_path_LD"
19535+if test -n "$LD"; then
19536+ AC_MSG_RESULT($LD)
19537+else
19538+ AC_MSG_RESULT(no)
19539+fi
19540+test -z "$LD" && AC_MSG_ERROR([no acceptable ld found in \$PATH])
19541+AC_LIB_PROG_LD_GNU
19542+])
19543--- lrzsz-0.12.20.safe/m4/lib-link.m4 1969-12-31 19:00:00.000000000 -0500
19544+++ lrzsz-0.12.20/m4/lib-link.m4 2004-09-12 14:40:34.914663120 -0400
19545@@ -0,0 +1,551 @@
19546+# lib-link.m4 serial 4 (gettext-0.12)
19547+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
19548+dnl This file is free software, distributed under the terms of the GNU
19549+dnl General Public License. As a special exception to the GNU General
19550+dnl Public License, this file may be distributed as part of a program
19551+dnl that contains a configuration script generated by Autoconf, under
19552+dnl the same distribution terms as the rest of that program.
19553+
19554+dnl From Bruno Haible.
19555+
19556+dnl AC_LIB_LINKFLAGS(name [, dependencies]) searches for libname and
19557+dnl the libraries corresponding to explicit and implicit dependencies.
19558+dnl Sets and AC_SUBSTs the LIB${NAME} and LTLIB${NAME} variables and
19559+dnl augments the CPPFLAGS variable.
19560+AC_DEFUN([AC_LIB_LINKFLAGS],
19561+[
19562+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19563+ AC_REQUIRE([AC_LIB_RPATH])
19564+ define([Name],[translit([$1],[./-], [___])])
19565+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19566+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19567+ AC_CACHE_CHECK([how to link with lib[]$1], [ac_cv_lib[]Name[]_libs], [
19568+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19569+ ac_cv_lib[]Name[]_libs="$LIB[]NAME"
19570+ ac_cv_lib[]Name[]_ltlibs="$LTLIB[]NAME"
19571+ ac_cv_lib[]Name[]_cppflags="$INC[]NAME"
19572+ ])
19573+ LIB[]NAME="$ac_cv_lib[]Name[]_libs"
19574+ LTLIB[]NAME="$ac_cv_lib[]Name[]_ltlibs"
19575+ INC[]NAME="$ac_cv_lib[]Name[]_cppflags"
19576+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19577+ AC_SUBST([LIB]NAME)
19578+ AC_SUBST([LTLIB]NAME)
19579+ dnl Also set HAVE_LIB[]NAME so that AC_LIB_HAVE_LINKFLAGS can reuse the
19580+ dnl results of this search when this library appears as a dependency.
19581+ HAVE_LIB[]NAME=yes
19582+ undefine([Name])
19583+ undefine([NAME])
19584+])
19585+
19586+dnl AC_LIB_HAVE_LINKFLAGS(name, dependencies, includes, testcode)
19587+dnl searches for libname and the libraries corresponding to explicit and
19588+dnl implicit dependencies, together with the specified include files and
19589+dnl the ability to compile and link the specified testcode. If found, it
19590+dnl sets and AC_SUBSTs HAVE_LIB${NAME}=yes and the LIB${NAME} and
19591+dnl LTLIB${NAME} variables and augments the CPPFLAGS variable, and
19592+dnl #defines HAVE_LIB${NAME} to 1. Otherwise, it sets and AC_SUBSTs
19593+dnl HAVE_LIB${NAME}=no and LIB${NAME} and LTLIB${NAME} to empty.
19594+AC_DEFUN([AC_LIB_HAVE_LINKFLAGS],
19595+[
19596+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
19597+ AC_REQUIRE([AC_LIB_RPATH])
19598+ define([Name],[translit([$1],[./-], [___])])
19599+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19600+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19601+
19602+ dnl Search for lib[]Name and define LIB[]NAME, LTLIB[]NAME and INC[]NAME
19603+ dnl accordingly.
19604+ AC_LIB_LINKFLAGS_BODY([$1], [$2])
19605+
19606+ dnl Add $INC[]NAME to CPPFLAGS before performing the following checks,
19607+ dnl because if the user has installed lib[]Name and not disabled its use
19608+ dnl via --without-lib[]Name-prefix, he wants to use it.
19609+ ac_save_CPPFLAGS="$CPPFLAGS"
19610+ AC_LIB_APPENDTOVAR([CPPFLAGS], [$INC]NAME)
19611+
19612+ AC_CACHE_CHECK([for lib[]$1], [ac_cv_lib[]Name], [
19613+ ac_save_LIBS="$LIBS"
19614+ LIBS="$LIBS $LIB[]NAME"
19615+ AC_TRY_LINK([$3], [$4], [ac_cv_lib[]Name=yes], [ac_cv_lib[]Name=no])
19616+ LIBS="$ac_save_LIBS"
19617+ ])
19618+ if test "$ac_cv_lib[]Name" = yes; then
19619+ HAVE_LIB[]NAME=yes
19620+ AC_DEFINE([HAVE_LIB]NAME, 1, [Define if you have the $1 library.])
19621+ AC_MSG_CHECKING([how to link with lib[]$1])
19622+ AC_MSG_RESULT([$LIB[]NAME])
19623+ else
19624+ HAVE_LIB[]NAME=no
19625+ dnl If $LIB[]NAME didn't lead to a usable library, we don't need
19626+ dnl $INC[]NAME either.
19627+ CPPFLAGS="$ac_save_CPPFLAGS"
19628+ LIB[]NAME=
19629+ LTLIB[]NAME=
19630+ fi
19631+ AC_SUBST([HAVE_LIB]NAME)
19632+ AC_SUBST([LIB]NAME)
19633+ AC_SUBST([LTLIB]NAME)
19634+ undefine([Name])
19635+ undefine([NAME])
19636+])
19637+
19638+dnl Determine the platform dependent parameters needed to use rpath:
19639+dnl libext, shlibext, hardcode_libdir_flag_spec, hardcode_libdir_separator,
19640+dnl hardcode_direct, hardcode_minus_L.
19641+AC_DEFUN([AC_LIB_RPATH],
19642+[
19643+ AC_REQUIRE([AC_PROG_CC]) dnl we use $CC, $GCC, $LDFLAGS
19644+ AC_REQUIRE([AC_LIB_PROG_LD]) dnl we use $LD, $with_gnu_ld
19645+ AC_REQUIRE([AC_CANONICAL_HOST]) dnl we use $host
19646+ AC_REQUIRE([AC_CONFIG_AUX_DIR_DEFAULT]) dnl we use $ac_aux_dir
19647+ AC_CACHE_CHECK([for shared library run path origin], acl_cv_rpath, [
19648+ CC="$CC" GCC="$GCC" LDFLAGS="$LDFLAGS" LD="$LD" with_gnu_ld="$with_gnu_ld" \
19649+ ${CONFIG_SHELL-/bin/sh} "$ac_aux_dir/config.rpath" "$host" > conftest.sh
19650+ . ./conftest.sh
19651+ rm -f ./conftest.sh
19652+ acl_cv_rpath=done
19653+ ])
19654+ wl="$acl_cv_wl"
19655+ libext="$acl_cv_libext"
19656+ shlibext="$acl_cv_shlibext"
19657+ hardcode_libdir_flag_spec="$acl_cv_hardcode_libdir_flag_spec"
19658+ hardcode_libdir_separator="$acl_cv_hardcode_libdir_separator"
19659+ hardcode_direct="$acl_cv_hardcode_direct"
19660+ hardcode_minus_L="$acl_cv_hardcode_minus_L"
19661+ dnl Determine whether the user wants rpath handling at all.
19662+ AC_ARG_ENABLE(rpath,
19663+ [ --disable-rpath do not hardcode runtime library paths],
19664+ :, enable_rpath=yes)
19665+])
19666+
19667+dnl AC_LIB_LINKFLAGS_BODY(name [, dependencies]) searches for libname and
19668+dnl the libraries corresponding to explicit and implicit dependencies.
19669+dnl Sets the LIB${NAME}, LTLIB${NAME} and INC${NAME} variables.
19670+AC_DEFUN([AC_LIB_LINKFLAGS_BODY],
19671+[
19672+ define([NAME],[translit([$1],[abcdefghijklmnopqrstuvwxyz./-],
19673+ [ABCDEFGHIJKLMNOPQRSTUVWXYZ___])])
19674+ dnl By default, look in $includedir and $libdir.
19675+ use_additional=yes
19676+ AC_LIB_WITH_FINAL_PREFIX([
19677+ eval additional_includedir=\"$includedir\"
19678+ eval additional_libdir=\"$libdir\"
19679+ ])
19680+ AC_LIB_ARG_WITH([lib$1-prefix],
19681+[ --with-lib$1-prefix[=DIR] search for lib$1 in DIR/include and DIR/lib
19682+ --without-lib$1-prefix don't search for lib$1 in includedir and libdir],
19683+[
19684+ if test "X$withval" = "Xno"; then
19685+ use_additional=no
19686+ else
19687+ if test "X$withval" = "X"; then
19688+ AC_LIB_WITH_FINAL_PREFIX([
19689+ eval additional_includedir=\"$includedir\"
19690+ eval additional_libdir=\"$libdir\"
19691+ ])
19692+ else
19693+ additional_includedir="$withval/include"
19694+ additional_libdir="$withval/lib"
19695+ fi
19696+ fi
19697+])
19698+ dnl Search the library and its dependencies in $additional_libdir and
19699+ dnl $LDFLAGS. Using breadth-first-seach.
19700+ LIB[]NAME=
19701+ LTLIB[]NAME=
19702+ INC[]NAME=
19703+ rpathdirs=
19704+ ltrpathdirs=
19705+ names_already_handled=
19706+ names_next_round='$1 $2'
19707+ while test -n "$names_next_round"; do
19708+ names_this_round="$names_next_round"
19709+ names_next_round=
19710+ for name in $names_this_round; do
19711+ already_handled=
19712+ for n in $names_already_handled; do
19713+ if test "$n" = "$name"; then
19714+ already_handled=yes
19715+ break
19716+ fi
19717+ done
19718+ if test -z "$already_handled"; then
19719+ names_already_handled="$names_already_handled $name"
19720+ dnl See if it was already located by an earlier AC_LIB_LINKFLAGS
19721+ dnl or AC_LIB_HAVE_LINKFLAGS call.
19722+ uppername=`echo "$name" | sed -e 'y|abcdefghijklmnopqrstuvwxyz./-|ABCDEFGHIJKLMNOPQRSTUVWXYZ___|'`
19723+ eval value=\"\$HAVE_LIB$uppername\"
19724+ if test -n "$value"; then
19725+ if test "$value" = yes; then
19726+ eval value=\"\$LIB$uppername\"
19727+ test -z "$value" || LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$value"
19728+ eval value=\"\$LTLIB$uppername\"
19729+ test -z "$value" || LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$value"
19730+ else
19731+ dnl An earlier call to AC_LIB_HAVE_LINKFLAGS has determined
19732+ dnl that this library doesn't exist. So just drop it.
19733+ :
19734+ fi
19735+ else
19736+ dnl Search the library lib$name in $additional_libdir and $LDFLAGS
19737+ dnl and the already constructed $LIBNAME/$LTLIBNAME.
19738+ found_dir=
19739+ found_la=
19740+ found_so=
19741+ found_a=
19742+ if test $use_additional = yes; then
19743+ if test -n "$shlibext" && test -f "$additional_libdir/lib$name.$shlibext"; then
19744+ found_dir="$additional_libdir"
19745+ found_so="$additional_libdir/lib$name.$shlibext"
19746+ if test -f "$additional_libdir/lib$name.la"; then
19747+ found_la="$additional_libdir/lib$name.la"
19748+ fi
19749+ else
19750+ if test -f "$additional_libdir/lib$name.$libext"; then
19751+ found_dir="$additional_libdir"
19752+ found_a="$additional_libdir/lib$name.$libext"
19753+ if test -f "$additional_libdir/lib$name.la"; then
19754+ found_la="$additional_libdir/lib$name.la"
19755+ fi
19756+ fi
19757+ fi
19758+ fi
19759+ if test "X$found_dir" = "X"; then
19760+ for x in $LDFLAGS $LTLIB[]NAME; do
19761+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19762+ case "$x" in
19763+ -L*)
19764+ dir=`echo "X$x" | sed -e 's/^X-L//'`
19765+ if test -n "$shlibext" && test -f "$dir/lib$name.$shlibext"; then
19766+ found_dir="$dir"
19767+ found_so="$dir/lib$name.$shlibext"
19768+ if test -f "$dir/lib$name.la"; then
19769+ found_la="$dir/lib$name.la"
19770+ fi
19771+ else
19772+ if test -f "$dir/lib$name.$libext"; then
19773+ found_dir="$dir"
19774+ found_a="$dir/lib$name.$libext"
19775+ if test -f "$dir/lib$name.la"; then
19776+ found_la="$dir/lib$name.la"
19777+ fi
19778+ fi
19779+ fi
19780+ ;;
19781+ esac
19782+ if test "X$found_dir" != "X"; then
19783+ break
19784+ fi
19785+ done
19786+ fi
19787+ if test "X$found_dir" != "X"; then
19788+ dnl Found the library.
19789+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$found_dir -l$name"
19790+ if test "X$found_so" != "X"; then
19791+ dnl Linking with a shared library. We attempt to hardcode its
19792+ dnl directory into the executable's runpath, unless it's the
19793+ dnl standard /usr/lib.
19794+ if test "$enable_rpath" = no || test "X$found_dir" = "X/usr/lib"; then
19795+ dnl No hardcoding is needed.
19796+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19797+ else
19798+ dnl Use an explicit option to hardcode DIR into the resulting
19799+ dnl binary.
19800+ dnl Potentially add DIR to ltrpathdirs.
19801+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
19802+ haveit=
19803+ for x in $ltrpathdirs; do
19804+ if test "X$x" = "X$found_dir"; then
19805+ haveit=yes
19806+ break
19807+ fi
19808+ done
19809+ if test -z "$haveit"; then
19810+ ltrpathdirs="$ltrpathdirs $found_dir"
19811+ fi
19812+ dnl The hardcoding into $LIBNAME is system dependent.
19813+ if test "$hardcode_direct" = yes; then
19814+ dnl Using DIR/libNAME.so during linking hardcodes DIR into the
19815+ dnl resulting binary.
19816+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19817+ else
19818+ if test -n "$hardcode_libdir_flag_spec" && test "$hardcode_minus_L" = no; then
19819+ dnl Use an explicit option to hardcode DIR into the resulting
19820+ dnl binary.
19821+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19822+ dnl Potentially add DIR to rpathdirs.
19823+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19824+ haveit=
19825+ for x in $rpathdirs; do
19826+ if test "X$x" = "X$found_dir"; then
19827+ haveit=yes
19828+ break
19829+ fi
19830+ done
19831+ if test -z "$haveit"; then
19832+ rpathdirs="$rpathdirs $found_dir"
19833+ fi
19834+ else
19835+ dnl Rely on "-L$found_dir".
19836+ dnl But don't add it if it's already contained in the LDFLAGS
19837+ dnl or the already constructed $LIBNAME
19838+ haveit=
19839+ for x in $LDFLAGS $LIB[]NAME; do
19840+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19841+ if test "X$x" = "X-L$found_dir"; then
19842+ haveit=yes
19843+ break
19844+ fi
19845+ done
19846+ if test -z "$haveit"; then
19847+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir"
19848+ fi
19849+ if test "$hardcode_minus_L" != no; then
19850+ dnl FIXME: Not sure whether we should use
19851+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19852+ dnl here.
19853+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_so"
19854+ else
19855+ dnl We cannot use $hardcode_runpath_var and LD_RUN_PATH
19856+ dnl here, because this doesn't fit in flags passed to the
19857+ dnl compiler. So give up. No hardcoding. This affects only
19858+ dnl very old systems.
19859+ dnl FIXME: Not sure whether we should use
19860+ dnl "-L$found_dir -l$name" or "-L$found_dir $found_so"
19861+ dnl here.
19862+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
19863+ fi
19864+ fi
19865+ fi
19866+ fi
19867+ else
19868+ if test "X$found_a" != "X"; then
19869+ dnl Linking with a static library.
19870+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$found_a"
19871+ else
19872+ dnl We shouldn't come here, but anyway it's good to have a
19873+ dnl fallback.
19874+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$found_dir -l$name"
19875+ fi
19876+ fi
19877+ dnl Assume the include files are nearby.
19878+ additional_includedir=
19879+ case "$found_dir" in
19880+ */lib | */lib/)
19881+ basedir=`echo "X$found_dir" | sed -e 's,^X,,' -e 's,/lib/*$,,'`
19882+ additional_includedir="$basedir/include"
19883+ ;;
19884+ esac
19885+ if test "X$additional_includedir" != "X"; then
19886+ dnl Potentially add $additional_includedir to $INCNAME.
19887+ dnl But don't add it
19888+ dnl 1. if it's the standard /usr/include,
19889+ dnl 2. if it's /usr/local/include and we are using GCC on Linux,
19890+ dnl 3. if it's already present in $CPPFLAGS or the already
19891+ dnl constructed $INCNAME,
19892+ dnl 4. if it doesn't exist as a directory.
19893+ if test "X$additional_includedir" != "X/usr/include"; then
19894+ haveit=
19895+ if test "X$additional_includedir" = "X/usr/local/include"; then
19896+ if test -n "$GCC"; then
19897+ case $host_os in
19898+ linux*) haveit=yes;;
19899+ esac
19900+ fi
19901+ fi
19902+ if test -z "$haveit"; then
19903+ for x in $CPPFLAGS $INC[]NAME; do
19904+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19905+ if test "X$x" = "X-I$additional_includedir"; then
19906+ haveit=yes
19907+ break
19908+ fi
19909+ done
19910+ if test -z "$haveit"; then
19911+ if test -d "$additional_includedir"; then
19912+ dnl Really add $additional_includedir to $INCNAME.
19913+ INC[]NAME="${INC[]NAME}${INC[]NAME:+ }-I$additional_includedir"
19914+ fi
19915+ fi
19916+ fi
19917+ fi
19918+ fi
19919+ dnl Look for dependencies.
19920+ if test -n "$found_la"; then
19921+ dnl Read the .la file. It defines the variables
19922+ dnl dlname, library_names, old_library, dependency_libs, current,
19923+ dnl age, revision, installed, dlopen, dlpreopen, libdir.
19924+ save_libdir="$libdir"
19925+ case "$found_la" in
19926+ */* | *\\*) . "$found_la" ;;
19927+ *) . "./$found_la" ;;
19928+ esac
19929+ libdir="$save_libdir"
19930+ dnl We use only dependency_libs.
19931+ for dep in $dependency_libs; do
19932+ case "$dep" in
19933+ -L*)
19934+ additional_libdir=`echo "X$dep" | sed -e 's/^X-L//'`
19935+ dnl Potentially add $additional_libdir to $LIBNAME and $LTLIBNAME.
19936+ dnl But don't add it
19937+ dnl 1. if it's the standard /usr/lib,
19938+ dnl 2. if it's /usr/local/lib and we are using GCC on Linux,
19939+ dnl 3. if it's already present in $LDFLAGS or the already
19940+ dnl constructed $LIBNAME,
19941+ dnl 4. if it doesn't exist as a directory.
19942+ if test "X$additional_libdir" != "X/usr/lib"; then
19943+ haveit=
19944+ if test "X$additional_libdir" = "X/usr/local/lib"; then
19945+ if test -n "$GCC"; then
19946+ case $host_os in
19947+ linux*) haveit=yes;;
19948+ esac
19949+ fi
19950+ fi
19951+ if test -z "$haveit"; then
19952+ haveit=
19953+ for x in $LDFLAGS $LIB[]NAME; do
19954+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19955+ if test "X$x" = "X-L$additional_libdir"; then
19956+ haveit=yes
19957+ break
19958+ fi
19959+ done
19960+ if test -z "$haveit"; then
19961+ if test -d "$additional_libdir"; then
19962+ dnl Really add $additional_libdir to $LIBNAME.
19963+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-L$additional_libdir"
19964+ fi
19965+ fi
19966+ haveit=
19967+ for x in $LDFLAGS $LTLIB[]NAME; do
19968+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
19969+ if test "X$x" = "X-L$additional_libdir"; then
19970+ haveit=yes
19971+ break
19972+ fi
19973+ done
19974+ if test -z "$haveit"; then
19975+ if test -d "$additional_libdir"; then
19976+ dnl Really add $additional_libdir to $LTLIBNAME.
19977+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-L$additional_libdir"
19978+ fi
19979+ fi
19980+ fi
19981+ fi
19982+ ;;
19983+ -R*)
19984+ dir=`echo "X$dep" | sed -e 's/^X-R//'`
19985+ if test "$enable_rpath" != no; then
19986+ dnl Potentially add DIR to rpathdirs.
19987+ dnl The rpathdirs will be appended to $LIBNAME at the end.
19988+ haveit=
19989+ for x in $rpathdirs; do
19990+ if test "X$x" = "X$dir"; then
19991+ haveit=yes
19992+ break
19993+ fi
19994+ done
19995+ if test -z "$haveit"; then
19996+ rpathdirs="$rpathdirs $dir"
19997+ fi
19998+ dnl Potentially add DIR to ltrpathdirs.
19999+ dnl The ltrpathdirs will be appended to $LTLIBNAME at the end.
20000+ haveit=
20001+ for x in $ltrpathdirs; do
20002+ if test "X$x" = "X$dir"; then
20003+ haveit=yes
20004+ break
20005+ fi
20006+ done
20007+ if test -z "$haveit"; then
20008+ ltrpathdirs="$ltrpathdirs $dir"
20009+ fi
20010+ fi
20011+ ;;
20012+ -l*)
20013+ dnl Handle this in the next round.
20014+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's/^X-l//'`
20015+ ;;
20016+ *.la)
20017+ dnl Handle this in the next round. Throw away the .la's
20018+ dnl directory; it is already contained in a preceding -L
20019+ dnl option.
20020+ names_next_round="$names_next_round "`echo "X$dep" | sed -e 's,^X.*/,,' -e 's,^lib,,' -e 's,\.la$,,'`
20021+ ;;
20022+ *)
20023+ dnl Most likely an immediate library name.
20024+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$dep"
20025+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }$dep"
20026+ ;;
20027+ esac
20028+ done
20029+ fi
20030+ else
20031+ dnl Didn't find the library; assume it is in the system directories
20032+ dnl known to the linker and runtime loader. (All the system
20033+ dnl directories known to the linker should also be known to the
20034+ dnl runtime loader, otherwise the system is severely misconfigured.)
20035+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }-l$name"
20036+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-l$name"
20037+ fi
20038+ fi
20039+ fi
20040+ done
20041+ done
20042+ if test "X$rpathdirs" != "X"; then
20043+ if test -n "$hardcode_libdir_separator"; then
20044+ dnl Weird platform: only the last -rpath option counts, the user must
20045+ dnl pass all path elements in one option. We can arrange that for a
20046+ dnl single library, but not when more than one $LIBNAMEs are used.
20047+ alldirs=
20048+ for found_dir in $rpathdirs; do
20049+ alldirs="${alldirs}${alldirs:+$hardcode_libdir_separator}$found_dir"
20050+ done
20051+ dnl Note: hardcode_libdir_flag_spec uses $libdir and $wl.
20052+ acl_save_libdir="$libdir"
20053+ libdir="$alldirs"
20054+ eval flag=\"$hardcode_libdir_flag_spec\"
20055+ libdir="$acl_save_libdir"
20056+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20057+ else
20058+ dnl The -rpath options are cumulative.
20059+ for found_dir in $rpathdirs; do
20060+ acl_save_libdir="$libdir"
20061+ libdir="$found_dir"
20062+ eval flag=\"$hardcode_libdir_flag_spec\"
20063+ libdir="$acl_save_libdir"
20064+ LIB[]NAME="${LIB[]NAME}${LIB[]NAME:+ }$flag"
20065+ done
20066+ fi
20067+ fi
20068+ if test "X$ltrpathdirs" != "X"; then
20069+ dnl When using libtool, the option that works for both libraries and
20070+ dnl executables is -R. The -R options are cumulative.
20071+ for found_dir in $ltrpathdirs; do
20072+ LTLIB[]NAME="${LTLIB[]NAME}${LTLIB[]NAME:+ }-R$found_dir"
20073+ done
20074+ fi
20075+])
20076+
20077+dnl AC_LIB_APPENDTOVAR(VAR, CONTENTS) appends the elements of CONTENTS to VAR,
20078+dnl unless already present in VAR.
20079+dnl Works only for CPPFLAGS, not for LIB* variables because that sometimes
20080+dnl contains two or three consecutive elements that belong together.
20081+AC_DEFUN([AC_LIB_APPENDTOVAR],
20082+[
20083+ for element in [$2]; do
20084+ haveit=
20085+ for x in $[$1]; do
20086+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20087+ if test "X$x" = "X$element"; then
20088+ haveit=yes
20089+ break
20090+ fi
20091+ done
20092+ if test -z "$haveit"; then
20093+ [$1]="${[$1]}${[$1]:+ }$element"
20094+ fi
20095+ done
20096+])
20097--- lrzsz-0.12.20.safe/m4/lib-prefix.m4 1969-12-31 19:00:00.000000000 -0500
20098+++ lrzsz-0.12.20/m4/lib-prefix.m4 2004-09-12 14:40:34.921662056 -0400
20099@@ -0,0 +1,155 @@
20100+# lib-prefix.m4 serial 3 (gettext-0.13)
20101+dnl Copyright (C) 2001-2003 Free Software Foundation, Inc.
20102+dnl This file is free software, distributed under the terms of the GNU
20103+dnl General Public License. As a special exception to the GNU General
20104+dnl Public License, this file may be distributed as part of a program
20105+dnl that contains a configuration script generated by Autoconf, under
20106+dnl the same distribution terms as the rest of that program.
20107+
20108+dnl From Bruno Haible.
20109+
20110+dnl AC_LIB_ARG_WITH is synonymous to AC_ARG_WITH in autoconf-2.13, and
20111+dnl similar to AC_ARG_WITH in autoconf 2.52...2.57 except that is doesn't
20112+dnl require excessive bracketing.
20113+ifdef([AC_HELP_STRING],
20114+[AC_DEFUN([AC_LIB_ARG_WITH], [AC_ARG_WITH([$1],[[$2]],[$3],[$4])])],
20115+[AC_DEFUN([AC_][LIB_ARG_WITH], [AC_ARG_WITH([$1],[$2],[$3],[$4])])])
20116+
20117+dnl AC_LIB_PREFIX adds to the CPPFLAGS and LDFLAGS the flags that are needed
20118+dnl to access previously installed libraries. The basic assumption is that
20119+dnl a user will want packages to use other packages he previously installed
20120+dnl with the same --prefix option.
20121+dnl This macro is not needed if only AC_LIB_LINKFLAGS is used to locate
20122+dnl libraries, but is otherwise very convenient.
20123+AC_DEFUN([AC_LIB_PREFIX],
20124+[
20125+ AC_BEFORE([$0], [AC_LIB_LINKFLAGS])
20126+ AC_REQUIRE([AC_PROG_CC])
20127+ AC_REQUIRE([AC_CANONICAL_HOST])
20128+ AC_REQUIRE([AC_LIB_PREPARE_PREFIX])
20129+ dnl By default, look in $includedir and $libdir.
20130+ use_additional=yes
20131+ AC_LIB_WITH_FINAL_PREFIX([
20132+ eval additional_includedir=\"$includedir\"
20133+ eval additional_libdir=\"$libdir\"
20134+ ])
20135+ AC_LIB_ARG_WITH([lib-prefix],
20136+[ --with-lib-prefix[=DIR] search for libraries in DIR/include and DIR/lib
20137+ --without-lib-prefix don't search for libraries in includedir and libdir],
20138+[
20139+ if test "X$withval" = "Xno"; then
20140+ use_additional=no
20141+ else
20142+ if test "X$withval" = "X"; then
20143+ AC_LIB_WITH_FINAL_PREFIX([
20144+ eval additional_includedir=\"$includedir\"
20145+ eval additional_libdir=\"$libdir\"
20146+ ])
20147+ else
20148+ additional_includedir="$withval/include"
20149+ additional_libdir="$withval/lib"
20150+ fi
20151+ fi
20152+])
20153+ if test $use_additional = yes; then
20154+ dnl Potentially add $additional_includedir to $CPPFLAGS.
20155+ dnl But don't add it
20156+ dnl 1. if it's the standard /usr/include,
20157+ dnl 2. if it's already present in $CPPFLAGS,
20158+ dnl 3. if it's /usr/local/include and we are using GCC on Linux,
20159+ dnl 4. if it doesn't exist as a directory.
20160+ if test "X$additional_includedir" != "X/usr/include"; then
20161+ haveit=
20162+ for x in $CPPFLAGS; do
20163+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20164+ if test "X$x" = "X-I$additional_includedir"; then
20165+ haveit=yes
20166+ break
20167+ fi
20168+ done
20169+ if test -z "$haveit"; then
20170+ if test "X$additional_includedir" = "X/usr/local/include"; then
20171+ if test -n "$GCC"; then
20172+ case $host_os in
20173+ linux*) haveit=yes;;
20174+ esac
20175+ fi
20176+ fi
20177+ if test -z "$haveit"; then
20178+ if test -d "$additional_includedir"; then
20179+ dnl Really add $additional_includedir to $CPPFLAGS.
20180+ CPPFLAGS="${CPPFLAGS}${CPPFLAGS:+ }-I$additional_includedir"
20181+ fi
20182+ fi
20183+ fi
20184+ fi
20185+ dnl Potentially add $additional_libdir to $LDFLAGS.
20186+ dnl But don't add it
20187+ dnl 1. if it's the standard /usr/lib,
20188+ dnl 2. if it's already present in $LDFLAGS,
20189+ dnl 3. if it's /usr/local/lib and we are using GCC on Linux,
20190+ dnl 4. if it doesn't exist as a directory.
20191+ if test "X$additional_libdir" != "X/usr/lib"; then
20192+ haveit=
20193+ for x in $LDFLAGS; do
20194+ AC_LIB_WITH_FINAL_PREFIX([eval x=\"$x\"])
20195+ if test "X$x" = "X-L$additional_libdir"; then
20196+ haveit=yes
20197+ break
20198+ fi
20199+ done
20200+ if test -z "$haveit"; then
20201+ if test "X$additional_libdir" = "X/usr/local/lib"; then
20202+ if test -n "$GCC"; then
20203+ case $host_os in
20204+ linux*) haveit=yes;;
20205+ esac
20206+ fi
20207+ fi
20208+ if test -z "$haveit"; then
20209+ if test -d "$additional_libdir"; then
20210+ dnl Really add $additional_libdir to $LDFLAGS.
20211+ LDFLAGS="${LDFLAGS}${LDFLAGS:+ }-L$additional_libdir"
20212+ fi
20213+ fi
20214+ fi
20215+ fi
20216+ fi
20217+])
20218+
20219+dnl AC_LIB_PREPARE_PREFIX creates variables acl_final_prefix,
20220+dnl acl_final_exec_prefix, containing the values to which $prefix and
20221+dnl $exec_prefix will expand at the end of the configure script.
20222+AC_DEFUN([AC_LIB_PREPARE_PREFIX],
20223+[
20224+ dnl Unfortunately, prefix and exec_prefix get only finally determined
20225+ dnl at the end of configure.
20226+ if test "X$prefix" = "XNONE"; then
20227+ acl_final_prefix="$ac_default_prefix"
20228+ else
20229+ acl_final_prefix="$prefix"
20230+ fi
20231+ if test "X$exec_prefix" = "XNONE"; then
20232+ acl_final_exec_prefix='${prefix}'
20233+ else
20234+ acl_final_exec_prefix="$exec_prefix"
20235+ fi
20236+ acl_save_prefix="$prefix"
20237+ prefix="$acl_final_prefix"
20238+ eval acl_final_exec_prefix=\"$acl_final_exec_prefix\"
20239+ prefix="$acl_save_prefix"
20240+])
20241+
20242+dnl AC_LIB_WITH_FINAL_PREFIX([statement]) evaluates statement, with the
20243+dnl variables prefix and exec_prefix bound to the values they will have
20244+dnl at the end of the configure script.
20245+AC_DEFUN([AC_LIB_WITH_FINAL_PREFIX],
20246+[
20247+ acl_save_prefix="$prefix"
20248+ prefix="$acl_final_prefix"
20249+ acl_save_exec_prefix="$exec_prefix"
20250+ exec_prefix="$acl_final_exec_prefix"
20251+ $1
20252+ exec_prefix="$acl_save_exec_prefix"
20253+ prefix="$acl_save_prefix"
20254+])
20255--- lrzsz-0.12.20.safe/m4/longdouble.m4 1969-12-31 19:00:00.000000000 -0500
20256+++ lrzsz-0.12.20/m4/longdouble.m4 2004-09-12 14:40:34.942658864 -0400
20257@@ -0,0 +1,30 @@
20258+# longdouble.m4 serial 1 (gettext-0.12)
20259+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
20260+dnl This file is free software, distributed under the terms of the GNU
20261+dnl General Public License. As a special exception to the GNU General
20262+dnl Public License, this file may be distributed as part of a program
20263+dnl that contains a configuration script generated by Autoconf, under
20264+dnl the same distribution terms as the rest of that program.
20265+
20266+dnl From Bruno Haible.
20267+dnl Test whether the compiler supports the 'long double' type.
20268+dnl Prerequisite: AC_PROG_CC
20269+
20270+AC_DEFUN([gt_TYPE_LONGDOUBLE],
20271+[
20272+ AC_CACHE_CHECK([for long double], gt_cv_c_long_double,
20273+ [if test "$GCC" = yes; then
20274+ gt_cv_c_long_double=yes
20275+ else
20276+ AC_TRY_COMPILE([
20277+ /* The Stardent Vistra knows sizeof(long double), but does not support it. */
20278+ long double foo = 0.0;
20279+ /* On Ultrix 4.3 cc, long double is 4 and double is 8. */
20280+ int array [2*(sizeof(long double) >= sizeof(double)) - 1];
20281+ ], ,
20282+ gt_cv_c_long_double=yes, gt_cv_c_long_double=no)
20283+ fi])
20284+ if test $gt_cv_c_long_double = yes; then
20285+ AC_DEFINE(HAVE_LONG_DOUBLE, 1, [Define if you have the 'long double' type.])
20286+ fi
20287+])
20288--- lrzsz-0.12.20.safe/m4/longlong.m4 1969-12-31 19:00:00.000000000 -0500
20289+++ lrzsz-0.12.20/m4/longlong.m4 2004-09-12 14:40:34.949657800 -0400
20290@@ -0,0 +1,25 @@
20291+# longlong.m4 serial 4
20292+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
20293+dnl This file is free software, distributed under the terms of the GNU
20294+dnl General Public License. As a special exception to the GNU General
20295+dnl Public License, this file may be distributed as part of a program
20296+dnl that contains a configuration script generated by Autoconf, under
20297+dnl the same distribution terms as the rest of that program.
20298+
20299+dnl From Paul Eggert.
20300+
20301+# Define HAVE_LONG_LONG if 'long long' works.
20302+
20303+AC_DEFUN([jm_AC_TYPE_LONG_LONG],
20304+[
20305+ AC_CACHE_CHECK([for long long], ac_cv_type_long_long,
20306+ [AC_TRY_LINK([long long ll = 1LL; int i = 63;],
20307+ [long long llmax = (long long) -1;
20308+ return ll << i | ll >> i | llmax / ll | llmax % ll;],
20309+ ac_cv_type_long_long=yes,
20310+ ac_cv_type_long_long=no)])
20311+ if test $ac_cv_type_long_long = yes; then
20312+ AC_DEFINE(HAVE_LONG_LONG, 1,
20313+ [Define if you have the 'long long' type.])
20314+ fi
20315+])
20316--- lrzsz-0.12.20.safe/m4/Makefile.am 1969-12-31 19:00:00.000000000 -0500
20317+++ lrzsz-0.12.20/m4/Makefile.am 2004-09-12 14:40:35.048642752 -0400
20318@@ -0,0 +1 @@
20319+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
20320--- lrzsz-0.12.20.safe/m4/nls.m4 1969-12-31 19:00:00.000000000 -0500
20321+++ lrzsz-0.12.20/m4/nls.m4 2004-09-12 14:40:34.955656888 -0400
20322@@ -0,0 +1,49 @@
20323+# nls.m4 serial 1 (gettext-0.12)
20324+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20325+dnl This file is free software, distributed under the terms of the GNU
20326+dnl General Public License. As a special exception to the GNU General
20327+dnl Public License, this file may be distributed as part of a program
20328+dnl that contains a configuration script generated by Autoconf, under
20329+dnl the same distribution terms as the rest of that program.
20330+dnl
20331+dnl This file can can be used in projects which are not available under
20332+dnl the GNU General Public License or the GNU Library General Public
20333+dnl License but which still want to provide support for the GNU gettext
20334+dnl functionality.
20335+dnl Please note that the actual code of the GNU gettext library is covered
20336+dnl by the GNU Library General Public License, and the rest of the GNU
20337+dnl gettext package package is covered by the GNU General Public License.
20338+dnl They are *not* in the public domain.
20339+
20340+dnl Authors:
20341+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20342+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20343+
20344+AC_DEFUN([AM_NLS],
20345+[
20346+ AC_MSG_CHECKING([whether NLS is requested])
20347+ dnl Default is enabled NLS
20348+ AC_ARG_ENABLE(nls,
20349+ [ --disable-nls do not use Native Language Support],
20350+ USE_NLS=$enableval, USE_NLS=yes)
20351+ AC_MSG_RESULT($USE_NLS)
20352+ AC_SUBST(USE_NLS)
20353+])
20354+
20355+AC_DEFUN([AM_MKINSTALLDIRS],
20356+[
20357+ dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
20358+ dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
20359+ dnl Try to locate it.
20360+ MKINSTALLDIRS=
20361+ if test -n "$ac_aux_dir"; then
20362+ case "$ac_aux_dir" in
20363+ /*) MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs" ;;
20364+ *) MKINSTALLDIRS="\$(top_builddir)/$ac_aux_dir/mkinstalldirs" ;;
20365+ esac
20366+ fi
20367+ if test -z "$MKINSTALLDIRS"; then
20368+ MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
20369+ fi
20370+ AC_SUBST(MKINSTALLDIRS)
20371+])
20372--- lrzsz-0.12.20.safe/m4/po.m4 1969-12-31 19:00:00.000000000 -0500
20373+++ lrzsz-0.12.20/m4/po.m4 2004-09-12 14:40:34.961655976 -0400
20374@@ -0,0 +1,426 @@
20375+# po.m4 serial 3 (gettext-0.14)
20376+dnl Copyright (C) 1995-2003 Free Software Foundation, Inc.
20377+dnl This file is free software, distributed under the terms of the GNU
20378+dnl General Public License. As a special exception to the GNU General
20379+dnl Public License, this file may be distributed as part of a program
20380+dnl that contains a configuration script generated by Autoconf, under
20381+dnl the same distribution terms as the rest of that program.
20382+dnl
20383+dnl This file can can be used in projects which are not available under
20384+dnl the GNU General Public License or the GNU Library General Public
20385+dnl License but which still want to provide support for the GNU gettext
20386+dnl functionality.
20387+dnl Please note that the actual code of the GNU gettext library is covered
20388+dnl by the GNU Library General Public License, and the rest of the GNU
20389+dnl gettext package package is covered by the GNU General Public License.
20390+dnl They are *not* in the public domain.
20391+
20392+dnl Authors:
20393+dnl Ulrich Drepper <drepper@cygnus.com>, 1995-2000.
20394+dnl Bruno Haible <haible@clisp.cons.org>, 2000-2003.
20395+
20396+dnl Checks for all prerequisites of the po subdirectory.
20397+AC_DEFUN([AM_PO_SUBDIRS],
20398+[
20399+ AC_REQUIRE([AC_PROG_MAKE_SET])dnl
20400+ AC_REQUIRE([AC_PROG_INSTALL])dnl
20401+ AC_REQUIRE([AM_MKINSTALLDIRS])dnl
20402+ AC_REQUIRE([AM_NLS])dnl
20403+
20404+ dnl Perform the following tests also if --disable-nls has been given,
20405+ dnl because they are needed for "make dist" to work.
20406+
20407+ dnl Search for GNU msgfmt in the PATH.
20408+ dnl The first test excludes Solaris msgfmt and early GNU msgfmt versions.
20409+ dnl The second test excludes FreeBSD msgfmt.
20410+ AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
20411+ [$ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1 &&
20412+ (if $ac_dir/$ac_word --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi)],
20413+ :)
20414+ AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
20415+
20416+ dnl Search for GNU xgettext 0.12 or newer in the PATH.
20417+ dnl The first test excludes Solaris xgettext and early GNU xgettext versions.
20418+ dnl The second test excludes FreeBSD xgettext.
20419+ AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
20420+ [$ac_dir/$ac_word --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20421+ (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)],
20422+ :)
20423+ dnl Remove leftover from FreeBSD xgettext call.
20424+ rm -f messages.po
20425+
20426+ dnl Search for GNU msgmerge 0.11 or newer in the PATH.
20427+ AM_PATH_PROG_WITH_TEST(MSGMERGE, msgmerge,
20428+ [$ac_dir/$ac_word --update -q /dev/null /dev/null >/dev/null 2>&1], :)
20429+
20430+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20431+ dnl Test whether we really found GNU msgfmt.
20432+ if test "$GMSGFMT" != ":"; then
20433+ dnl If it is no GNU msgfmt we define it as : so that the
20434+ dnl Makefiles still can work.
20435+ if $GMSGFMT --statistics /dev/null >/dev/null 2>&1 &&
20436+ (if $GMSGFMT --statistics /dev/null 2>&1 >/dev/null | grep usage >/dev/null; then exit 1; else exit 0; fi); then
20437+ : ;
20438+ else
20439+ GMSGFMT=`echo "$GMSGFMT" | sed -e 's,^.*/,,'`
20440+ AC_MSG_RESULT(
20441+ [found $GMSGFMT program is not GNU msgfmt; ignore it])
20442+ GMSGFMT=":"
20443+ fi
20444+ fi
20445+
20446+ dnl This could go away some day; the PATH_PROG_WITH_TEST already does it.
20447+ dnl Test whether we really found GNU xgettext.
20448+ if test "$XGETTEXT" != ":"; then
20449+ dnl If it is no GNU xgettext we define it as : so that the
20450+ dnl Makefiles still can work.
20451+ if $XGETTEXT --omit-header --copyright-holder= --msgid-bugs-address= /dev/null >/dev/null 2>&1 &&
20452+ (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
20453+ : ;
20454+ else
20455+ AC_MSG_RESULT(
20456+ [found xgettext program is not GNU xgettext; ignore it])
20457+ XGETTEXT=":"
20458+ fi
20459+ dnl Remove leftover from FreeBSD xgettext call.
20460+ rm -f messages.po
20461+ fi
20462+
20463+ AC_OUTPUT_COMMANDS([
20464+ for ac_file in $CONFIG_FILES; do
20465+ # Support "outfile[:infile[:infile...]]"
20466+ case "$ac_file" in
20467+ *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
20468+ esac
20469+ # PO directories have a Makefile.in generated from Makefile.in.in.
20470+ case "$ac_file" in */Makefile.in)
20471+ # Adjust a relative srcdir.
20472+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20473+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20474+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20475+ # In autoconf-2.13 it is called $ac_given_srcdir.
20476+ # In autoconf-2.50 it is called $srcdir.
20477+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20478+ case "$ac_given_srcdir" in
20479+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20480+ /*) top_srcdir="$ac_given_srcdir" ;;
20481+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20482+ esac
20483+ if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
20484+ rm -f "$ac_dir/POTFILES"
20485+ test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
20486+ cat "$ac_given_srcdir/$ac_dir/POTFILES.in" | sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," | sed -e "\$s/\(.*\) \\\\/\1/" > "$ac_dir/POTFILES"
20487+ POMAKEFILEDEPS="POTFILES.in"
20488+ # ALL_LINGUAS, POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES depend
20489+ # on $ac_dir but don't depend on user-specified configuration
20490+ # parameters.
20491+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20492+ # The LINGUAS file contains the set of available languages.
20493+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20494+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20495+ fi
20496+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20497+ # Hide the ALL_LINGUAS assigment from automake.
20498+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20499+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20500+ else
20501+ # The set of available languages was given in configure.in.
20502+ eval 'ALL_LINGUAS''=$OBSOLETE_ALL_LINGUAS'
20503+ fi
20504+ # Compute POFILES
20505+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20506+ # Compute UPDATEPOFILES
20507+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20508+ # Compute DUMMYPOFILES
20509+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20510+ # Compute GMOFILES
20511+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20512+ case "$ac_given_srcdir" in
20513+ .) srcdirpre= ;;
20514+ *) srcdirpre='$(srcdir)/' ;;
20515+ esac
20516+ POFILES=
20517+ UPDATEPOFILES=
20518+ DUMMYPOFILES=
20519+ GMOFILES=
20520+ for lang in $ALL_LINGUAS; do
20521+ POFILES="$POFILES $srcdirpre$lang.po"
20522+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20523+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20524+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20525+ done
20526+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20527+ # environment variable.
20528+ INST_LINGUAS=
20529+ if test -n "$ALL_LINGUAS"; then
20530+ for presentlang in $ALL_LINGUAS; do
20531+ useit=no
20532+ if test "%UNSET%" != "$LINGUAS"; then
20533+ desiredlanguages="$LINGUAS"
20534+ else
20535+ desiredlanguages="$ALL_LINGUAS"
20536+ fi
20537+ for desiredlang in $desiredlanguages; do
20538+ # Use the presentlang catalog if desiredlang is
20539+ # a. equal to presentlang, or
20540+ # b. a variant of presentlang (because in this case,
20541+ # presentlang can be used as a fallback for messages
20542+ # which are not translated in the desiredlang catalog).
20543+ case "$desiredlang" in
20544+ "$presentlang"*) useit=yes;;
20545+ esac
20546+ done
20547+ if test $useit = yes; then
20548+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20549+ fi
20550+ done
20551+ fi
20552+ CATALOGS=
20553+ if test -n "$INST_LINGUAS"; then
20554+ for lang in $INST_LINGUAS; do
20555+ CATALOGS="$CATALOGS $lang.gmo"
20556+ done
20557+ fi
20558+ test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
20559+ 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"
20560+ for f in "$ac_given_srcdir/$ac_dir"/Rules-*; do
20561+ if test -f "$f"; then
20562+ case "$f" in
20563+ *.orig | *.bak | *~) ;;
20564+ *) cat "$f" >> "$ac_dir/Makefile" ;;
20565+ esac
20566+ fi
20567+ done
20568+ fi
20569+ ;;
20570+ esac
20571+ done],
20572+ [# Capture the value of obsolete ALL_LINGUAS because we need it to compute
20573+ # POFILES, UPDATEPOFILES, DUMMYPOFILES, GMOFILES, CATALOGS. But hide it
20574+ # from automake.
20575+ eval 'OBSOLETE_ALL_LINGUAS''="$ALL_LINGUAS"'
20576+ # Capture the value of LINGUAS because we need it to compute CATALOGS.
20577+ LINGUAS="${LINGUAS-%UNSET%}"
20578+ ])
20579+])
20580+
20581+dnl Postprocesses a Makefile in a directory containing PO files.
20582+AC_DEFUN([AM_POSTPROCESS_PO_MAKEFILE],
20583+[
20584+ # When this code is run, in config.status, two variables have already been
20585+ # set:
20586+ # - OBSOLETE_ALL_LINGUAS is the value of LINGUAS set in configure.in,
20587+ # - LINGUAS is the value of the environment variable LINGUAS at configure
20588+ # time.
20589+
20590+changequote(,)dnl
20591+ # Adjust a relative srcdir.
20592+ ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
20593+ ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
20594+ ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
20595+ # In autoconf-2.13 it is called $ac_given_srcdir.
20596+ # In autoconf-2.50 it is called $srcdir.
20597+ test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
20598+ case "$ac_given_srcdir" in
20599+ .) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
20600+ /*) top_srcdir="$ac_given_srcdir" ;;
20601+ *) top_srcdir="$ac_dots$ac_given_srcdir" ;;
20602+ esac
20603+
20604+ # Find a way to echo strings without interpreting backslash.
20605+ if test "X`(echo '\t') 2>/dev/null`" = 'X\t'; then
20606+ gt_echo='echo'
20607+ else
20608+ if test "X`(printf '%s\n' '\t') 2>/dev/null`" = 'X\t'; then
20609+ gt_echo='printf %s\n'
20610+ else
20611+ echo_func () {
20612+ cat <<EOT
20613+$*
20614+EOT
20615+ }
20616+ gt_echo='echo_func'
20617+ fi
20618+ fi
20619+
20620+ # A sed script that extracts the value of VARIABLE from a Makefile.
20621+ sed_x_variable='
20622+# Test if the hold space is empty.
20623+x
20624+s/P/P/
20625+x
20626+ta
20627+# Yes it was empty. Look if we have the expected variable definition.
20628+/^[ ]*VARIABLE[ ]*=/{
20629+ # Seen the first line of the variable definition.
20630+ s/^[ ]*VARIABLE[ ]*=//
20631+ ba
20632+}
20633+bd
20634+:a
20635+# Here we are processing a line from the variable definition.
20636+# Remove comment, more precisely replace it with a space.
20637+s/#.*$/ /
20638+# See if the line ends in a backslash.
20639+tb
20640+:b
20641+s/\\$//
20642+# Print the line, without the trailing backslash.
20643+p
20644+tc
20645+# There was no trailing backslash. The end of the variable definition is
20646+# reached. Clear the hold space.
20647+s/^.*$//
20648+x
20649+bd
20650+:c
20651+# A trailing backslash means that the variable definition continues in the
20652+# next line. Put a nonempty string into the hold space to indicate this.
20653+s/^.*$/P/
20654+x
20655+:d
20656+'
20657+changequote([,])dnl
20658+
20659+ # Set POTFILES to the value of the Makefile variable POTFILES.
20660+ sed_x_POTFILES="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/POTFILES/g'`"
20661+ POTFILES=`sed -n -e "$sed_x_POTFILES" < "$ac_file"`
20662+ # Compute POTFILES_DEPS as
20663+ # $(foreach file, $(POTFILES), $(top_srcdir)/$(file))
20664+ POTFILES_DEPS=
20665+ for file in $POTFILES; do
20666+ POTFILES_DEPS="$POTFILES_DEPS "'$(top_srcdir)/'"$file"
20667+ done
20668+ POMAKEFILEDEPS=""
20669+
20670+ if test -n "$OBSOLETE_ALL_LINGUAS"; then
20671+ test -n "$as_me" && echo "$as_me: setting ALL_LINGUAS in configure.in is obsolete" || echo "setting ALL_LINGUAS in configure.in is obsolete"
20672+ fi
20673+ if test -f "$ac_given_srcdir/$ac_dir/LINGUAS"; then
20674+ # The LINGUAS file contains the set of available languages.
20675+ ALL_LINGUAS_=`sed -e "/^#/d" "$ac_given_srcdir/$ac_dir/LINGUAS"`
20676+ POMAKEFILEDEPS="$POMAKEFILEDEPS LINGUAS"
20677+ else
20678+ # Set ALL_LINGUAS to the value of the Makefile variable LINGUAS.
20679+ sed_x_LINGUAS="`$gt_echo \"$sed_x_variable\" | sed -e '/^ *#/d' -e 's/VARIABLE/LINGUAS/g'`"
20680+ ALL_LINGUAS_=`sed -n -e "$sed_x_LINGUAS" < "$ac_file"`
20681+ fi
20682+ # Hide the ALL_LINGUAS assigment from automake.
20683+ eval 'ALL_LINGUAS''=$ALL_LINGUAS_'
20684+ # Compute POFILES
20685+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).po)
20686+ # Compute UPDATEPOFILES
20687+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).po-update)
20688+ # Compute DUMMYPOFILES
20689+ # as $(foreach lang, $(ALL_LINGUAS), $(lang).nop)
20690+ # Compute GMOFILES
20691+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).gmo)
20692+ # Compute PROPERTIESFILES
20693+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).properties)
20694+ # Compute CLASSFILES
20695+ # as $(foreach lang, $(ALL_LINGUAS), $(top_srcdir)/$(DOMAIN)_$(lang).class)
20696+ # Compute QMFILES
20697+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(lang).qm)
20698+ # Compute MSGFILES
20699+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang)).msg)
20700+ # Compute RESOURCESDLLFILES
20701+ # as $(foreach lang, $(ALL_LINGUAS), $(srcdir)/$(frob $(lang))/$(DOMAIN).resources.dll)
20702+ case "$ac_given_srcdir" in
20703+ .) srcdirpre= ;;
20704+ *) srcdirpre='$(srcdir)/' ;;
20705+ esac
20706+ POFILES=
20707+ UPDATEPOFILES=
20708+ DUMMYPOFILES=
20709+ GMOFILES=
20710+ PROPERTIESFILES=
20711+ CLASSFILES=
20712+ QMFILES=
20713+ MSGFILES=
20714+ RESOURCESDLLFILES=
20715+ for lang in $ALL_LINGUAS; do
20716+ POFILES="$POFILES $srcdirpre$lang.po"
20717+ UPDATEPOFILES="$UPDATEPOFILES $lang.po-update"
20718+ DUMMYPOFILES="$DUMMYPOFILES $lang.nop"
20719+ GMOFILES="$GMOFILES $srcdirpre$lang.gmo"
20720+ PROPERTIESFILES="$PROPERTIESFILES \$(top_srcdir)/\$(DOMAIN)_$lang.properties"
20721+ CLASSFILES="$CLASSFILES \$(top_srcdir)/\$(DOMAIN)_$lang.class"
20722+ QMFILES="$QMFILES $srcdirpre$lang.qm"
20723+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20724+ MSGFILES="$MSGFILES $srcdirpre$frobbedlang.msg"
20725+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20726+ RESOURCESDLLFILES="$RESOURCESDLLFILES $srcdirpre$frobbedlang/\$(DOMAIN).resources.dll"
20727+ done
20728+ # CATALOGS depends on both $ac_dir and the user's LINGUAS
20729+ # environment variable.
20730+ INST_LINGUAS=
20731+ if test -n "$ALL_LINGUAS"; then
20732+ for presentlang in $ALL_LINGUAS; do
20733+ useit=no
20734+ if test "%UNSET%" != "$LINGUAS"; then
20735+ desiredlanguages="$LINGUAS"
20736+ else
20737+ desiredlanguages="$ALL_LINGUAS"
20738+ fi
20739+ for desiredlang in $desiredlanguages; do
20740+ # Use the presentlang catalog if desiredlang is
20741+ # a. equal to presentlang, or
20742+ # b. a variant of presentlang (because in this case,
20743+ # presentlang can be used as a fallback for messages
20744+ # which are not translated in the desiredlang catalog).
20745+ case "$desiredlang" in
20746+ "$presentlang"*) useit=yes;;
20747+ esac
20748+ done
20749+ if test $useit = yes; then
20750+ INST_LINGUAS="$INST_LINGUAS $presentlang"
20751+ fi
20752+ done
20753+ fi
20754+ CATALOGS=
20755+ JAVACATALOGS=
20756+ QTCATALOGS=
20757+ TCLCATALOGS=
20758+ CSHARPCATALOGS=
20759+ if test -n "$INST_LINGUAS"; then
20760+ for lang in $INST_LINGUAS; do
20761+ CATALOGS="$CATALOGS $lang.gmo"
20762+ JAVACATALOGS="$JAVACATALOGS \$(DOMAIN)_$lang.properties"
20763+ QTCATALOGS="$QTCATALOGS $lang.qm"
20764+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20765+ TCLCATALOGS="$TCLCATALOGS $frobbedlang.msg"
20766+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20767+ CSHARPCATALOGS="$CSHARPCATALOGS $frobbedlang/\$(DOMAIN).resources.dll"
20768+ done
20769+ fi
20770+
20771+ 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"
20772+ if grep -l '@TCLCATALOGS@' "$ac_file" > /dev/null; then
20773+ # Add dependencies that cannot be formulated as a simple suffix rule.
20774+ for lang in $ALL_LINGUAS; do
20775+ frobbedlang=`echo $lang | sed -e 's/\..*$//' -e 'y/ABCDEFGHIJKLMNOPQRSTUVWXYZ/abcdefghijklmnopqrstuvwxyz/'`
20776+ cat >> "$ac_file.tmp" <<EOF
20777+$frobbedlang.msg: $lang.po
20778+ @echo "\$(MSGFMT) -c --tcl -d \$(srcdir) -l $lang $srcdirpre$lang.po"; \
20779+ \$(MSGFMT) -c --tcl -d "\$(srcdir)" -l $lang $srcdirpre$lang.po || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20780+EOF
20781+ done
20782+ fi
20783+ if grep -l '@CSHARPCATALOGS@' "$ac_file" > /dev/null; then
20784+ # Add dependencies that cannot be formulated as a simple suffix rule.
20785+ for lang in $ALL_LINGUAS; do
20786+ frobbedlang=`echo $lang | sed -e 's/_/-/g'`
20787+ cat >> "$ac_file.tmp" <<EOF
20788+$frobbedlang/\$(DOMAIN).resources.dll: $lang.po
20789+ @echo "\$(MSGFMT) -c --csharp -d \$(srcdir) -l $lang $srcdirpre$lang.po -r \$(DOMAIN)"; \
20790+ \$(MSGFMT) -c --csharp -d "\$(srcdir)" -l $lang $srcdirpre$lang.po -r "\$(DOMAIN)" || { rm -f "\$(srcdir)/$frobbedlang.msg"; exit 1; }
20791+EOF
20792+ done
20793+ fi
20794+ if test -n "$POMAKEFILEDEPS"; then
20795+ cat >> "$ac_file.tmp" <<EOF
20796+Makefile: $POMAKEFILEDEPS
20797+EOF
20798+ fi
20799+ mv "$ac_file.tmp" "$ac_file"
20800+])
20801--- lrzsz-0.12.20.safe/m4/printf-posix.m4 1969-12-31 19:00:00.000000000 -0500
20802+++ lrzsz-0.12.20/m4/printf-posix.m4 2004-09-12 14:40:34.974654000 -0400
20803@@ -0,0 +1,46 @@
20804+# printf-posix.m4 serial 2 (gettext-0.13.1)
20805+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20806+dnl This file is free software, distributed under the terms of the GNU
20807+dnl General Public License. As a special exception to the GNU General
20808+dnl Public License, this file may be distributed as part of a program
20809+dnl that contains a configuration script generated by Autoconf, under
20810+dnl the same distribution terms as the rest of that program.
20811+
20812+dnl From Bruno Haible.
20813+dnl Test whether the printf() function supports POSIX/XSI format strings with
20814+dnl positions.
20815+
20816+AC_DEFUN([gt_PRINTF_POSIX],
20817+[
20818+ AC_REQUIRE([AC_PROG_CC])
20819+ AC_CACHE_CHECK([whether printf() supports POSIX/XSI format strings],
20820+ gt_cv_func_printf_posix,
20821+ [
20822+ AC_TRY_RUN([
20823+#include <stdio.h>
20824+#include <string.h>
20825+/* The string "%2$d %1$d", with dollar characters protected from the shell's
20826+ dollar expansion (possibly an autoconf bug). */
20827+static char format[] = { '%', '2', '$', 'd', ' ', '%', '1', '$', 'd', '\0' };
20828+static char buf[100];
20829+int main ()
20830+{
20831+ sprintf (buf, format, 33, 55);
20832+ return (strcmp (buf, "55 33") != 0);
20833+}], gt_cv_func_printf_posix=yes, gt_cv_func_printf_posix=no,
20834+ [
20835+ AC_EGREP_CPP(notposix, [
20836+#if defined __NetBSD__ || defined _MSC_VER || defined __MINGW32__ || defined __CYGWIN__
20837+ notposix
20838+#endif
20839+ ], gt_cv_func_printf_posix="guessing no",
20840+ gt_cv_func_printf_posix="guessing yes")
20841+ ])
20842+ ])
20843+ case $gt_cv_func_printf_posix in
20844+ *yes)
20845+ AC_DEFINE(HAVE_POSIX_PRINTF, 1,
20846+ [Define if your printf() function supports format strings with positions.])
20847+ ;;
20848+ esac
20849+])
20850--- lrzsz-0.12.20.safe/m4/progtest.m4 1969-12-31 19:00:00.000000000 -0500
20851+++ lrzsz-0.12.20/m4/progtest.m4 2004-09-12 14:40:34.990651568 -0400
20852@@ -0,0 +1,91 @@
20853+# progtest.m4 serial 3 (gettext-0.12)
20854+dnl Copyright (C) 1996-2003 Free Software Foundation, Inc.
20855+dnl This file is free software, distributed under the terms of the GNU
20856+dnl General Public License. As a special exception to the GNU General
20857+dnl Public License, this file may be distributed as part of a program
20858+dnl that contains a configuration script generated by Autoconf, under
20859+dnl the same distribution terms as the rest of that program.
20860+dnl
20861+dnl This file can can be used in projects which are not available under
20862+dnl the GNU General Public License or the GNU Library General Public
20863+dnl License but which still want to provide support for the GNU gettext
20864+dnl functionality.
20865+dnl Please note that the actual code of the GNU gettext library is covered
20866+dnl by the GNU Library General Public License, and the rest of the GNU
20867+dnl gettext package package is covered by the GNU General Public License.
20868+dnl They are *not* in the public domain.
20869+
20870+dnl Authors:
20871+dnl Ulrich Drepper <drepper@cygnus.com>, 1996.
20872+
20873+# Search path for a program which passes the given test.
20874+
20875+dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
20876+dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
20877+AC_DEFUN([AM_PATH_PROG_WITH_TEST],
20878+[
20879+# Prepare PATH_SEPARATOR.
20880+# The user is always right.
20881+if test "${PATH_SEPARATOR+set}" != set; then
20882+ echo "#! /bin/sh" >conf$$.sh
20883+ echo "exit 0" >>conf$$.sh
20884+ chmod +x conf$$.sh
20885+ if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
20886+ PATH_SEPARATOR=';'
20887+ else
20888+ PATH_SEPARATOR=:
20889+ fi
20890+ rm -f conf$$.sh
20891+fi
20892+
20893+# Find out how to test for executable files. Don't use a zero-byte file,
20894+# as systems may use methods other than mode bits to determine executability.
20895+cat >conf$$.file <<_ASEOF
20896+#! /bin/sh
20897+exit 0
20898+_ASEOF
20899+chmod +x conf$$.file
20900+if test -x conf$$.file >/dev/null 2>&1; then
20901+ ac_executable_p="test -x"
20902+else
20903+ ac_executable_p="test -f"
20904+fi
20905+rm -f conf$$.file
20906+
20907+# Extract the first word of "$2", so it can be a program name with args.
20908+set dummy $2; ac_word=[$]2
20909+AC_MSG_CHECKING([for $ac_word])
20910+AC_CACHE_VAL(ac_cv_path_$1,
20911+[case "[$]$1" in
20912+ [[\\/]]* | ?:[[\\/]]*)
20913+ ac_cv_path_$1="[$]$1" # Let the user override the test with a path.
20914+ ;;
20915+ *)
20916+ ac_save_IFS="$IFS"; IFS=$PATH_SEPARATOR
20917+ for ac_dir in ifelse([$5], , $PATH, [$5]); do
20918+ IFS="$ac_save_IFS"
20919+ test -z "$ac_dir" && ac_dir=.
20920+ for ac_exec_ext in '' $ac_executable_extensions; do
20921+ if $ac_executable_p "$ac_dir/$ac_word$ac_exec_ext"; then
20922+ if [$3]; then
20923+ ac_cv_path_$1="$ac_dir/$ac_word$ac_exec_ext"
20924+ break 2
20925+ fi
20926+ fi
20927+ done
20928+ done
20929+ IFS="$ac_save_IFS"
20930+dnl If no 4th arg is given, leave the cache variable unset,
20931+dnl so AC_PATH_PROGS will keep looking.
20932+ifelse([$4], , , [ test -z "[$]ac_cv_path_$1" && ac_cv_path_$1="$4"
20933+])dnl
20934+ ;;
20935+esac])dnl
20936+$1="$ac_cv_path_$1"
20937+if test ifelse([$4], , [-n "[$]$1"], ["[$]$1" != "$4"]); then
20938+ AC_MSG_RESULT([$]$1)
20939+else
20940+ AC_MSG_RESULT(no)
20941+fi
20942+AC_SUBST($1)dnl
20943+])
20944--- lrzsz-0.12.20.safe/m4/signed.m4 1969-12-31 19:00:00.000000000 -0500
20945+++ lrzsz-0.12.20/m4/signed.m4 2004-09-12 14:40:34.996650656 -0400
20946@@ -0,0 +1,19 @@
20947+# signed.m4 serial 1 (gettext-0.10.40)
20948+dnl Copyright (C) 2001-2002 Free Software Foundation, Inc.
20949+dnl This file is free software, distributed under the terms of the GNU
20950+dnl General Public License. As a special exception to the GNU General
20951+dnl Public License, this file may be distributed as part of a program
20952+dnl that contains a configuration script generated by Autoconf, under
20953+dnl the same distribution terms as the rest of that program.
20954+
20955+dnl From Bruno Haible.
20956+
20957+AC_DEFUN([bh_C_SIGNED],
20958+[
20959+ AC_CACHE_CHECK([for signed], bh_cv_c_signed,
20960+ [AC_TRY_COMPILE(, [signed char x;], bh_cv_c_signed=yes, bh_cv_c_signed=no)])
20961+ if test $bh_cv_c_signed = no; then
20962+ AC_DEFINE(signed, ,
20963+ [Define to empty if the C compiler doesn't support this keyword.])
20964+ fi
20965+])
20966--- lrzsz-0.12.20.safe/m4/size_max.m4 1969-12-31 19:00:00.000000000 -0500
20967+++ lrzsz-0.12.20/m4/size_max.m4 2004-09-12 14:40:35.003649592 -0400
20968@@ -0,0 +1,61 @@
20969+# size_max.m4 serial 2
20970+dnl Copyright (C) 2003 Free Software Foundation, Inc.
20971+dnl This file is free software, distributed under the terms of the GNU
20972+dnl General Public License. As a special exception to the GNU General
20973+dnl Public License, this file may be distributed as part of a program
20974+dnl that contains a configuration script generated by Autoconf, under
20975+dnl the same distribution terms as the rest of that program.
20976+
20977+dnl From Bruno Haible.
20978+
20979+AC_DEFUN([gl_SIZE_MAX],
20980+[
20981+ AC_CHECK_HEADERS(stdint.h)
20982+ dnl First test whether the system already has SIZE_MAX.
20983+ AC_MSG_CHECKING([for SIZE_MAX])
20984+ result=
20985+ AC_EGREP_CPP([Found it], [
20986+#include <limits.h>
20987+#if HAVE_STDINT_H
20988+#include <stdint.h>
20989+#endif
20990+#ifdef SIZE_MAX
20991+Found it
20992+#endif
20993+], result=yes)
20994+ if test -z "$result"; then
20995+ dnl Define it ourselves. Here we assume that the type 'size_t' is not wider
20996+ dnl than the type 'unsigned long'.
20997+ dnl The _AC_COMPUTE_INT macro works up to LONG_MAX, since it uses 'expr',
20998+ dnl which is guaranteed to work from LONG_MIN to LONG_MAX.
20999+ _AC_COMPUTE_INT([~(size_t)0 / 10], res_hi,
21000+ [#include <stddef.h>], result=?)
21001+ _AC_COMPUTE_INT([~(size_t)0 % 10], res_lo,
21002+ [#include <stddef.h>], result=?)
21003+ _AC_COMPUTE_INT([sizeof (size_t) <= sizeof (unsigned int)], fits_in_uint,
21004+ [#include <stddef.h>], result=?)
21005+ if test "$fits_in_uint" = 1; then
21006+ dnl Even though SIZE_MAX fits in an unsigned int, it must be of type
21007+ dnl 'unsigned long' if the type 'size_t' is the same as 'unsigned long'.
21008+ AC_TRY_COMPILE([#include <stddef.h>
21009+ extern size_t foo;
21010+ extern unsigned long foo;
21011+ ], [], fits_in_uint=0)
21012+ fi
21013+ if test -z "$result"; then
21014+ if test "$fits_in_uint" = 1; then
21015+ result="$res_hi$res_lo"U
21016+ else
21017+ result="$res_hi$res_lo"UL
21018+ fi
21019+ else
21020+ dnl Shouldn't happen, but who knows...
21021+ result='~(size_t)0'
21022+ fi
21023+ fi
21024+ AC_MSG_RESULT([$result])
21025+ if test "$result" != yes; then
21026+ AC_DEFINE_UNQUOTED([SIZE_MAX], [$result],
21027+ [Define as the maximum value of type 'size_t', if the system doesn't define it.])
21028+ fi
21029+])
21030--- lrzsz-0.12.20.safe/m4/stdint_h.m4 1969-12-31 19:00:00.000000000 -0500
21031+++ lrzsz-0.12.20/m4/stdint_h.m4 2004-09-12 14:40:35.009648680 -0400
21032@@ -0,0 +1,28 @@
21033+# stdint_h.m4 serial 3 (gettext-0.12)
21034+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21035+dnl This file is free software, distributed under the terms of the GNU
21036+dnl General Public License. As a special exception to the GNU General
21037+dnl Public License, this file may be distributed as part of a program
21038+dnl that contains a configuration script generated by Autoconf, under
21039+dnl the same distribution terms as the rest of that program.
21040+
21041+dnl From Paul Eggert.
21042+
21043+# Define HAVE_STDINT_H_WITH_UINTMAX if <stdint.h> exists,
21044+# doesn't clash with <sys/types.h>, and declares uintmax_t.
21045+
21046+AC_DEFUN([jm_AC_HEADER_STDINT_H],
21047+[
21048+ AC_CACHE_CHECK([for stdint.h], jm_ac_cv_header_stdint_h,
21049+ [AC_TRY_COMPILE(
21050+ [#include <sys/types.h>
21051+#include <stdint.h>],
21052+ [uintmax_t i = (uintmax_t) -1;],
21053+ jm_ac_cv_header_stdint_h=yes,
21054+ jm_ac_cv_header_stdint_h=no)])
21055+ if test $jm_ac_cv_header_stdint_h = yes; then
21056+ AC_DEFINE_UNQUOTED(HAVE_STDINT_H_WITH_UINTMAX, 1,
21057+ [Define if <stdint.h> exists, doesn't clash with <sys/types.h>,
21058+ and declares uintmax_t. ])
21059+ fi
21060+])
21061--- lrzsz-0.12.20.safe/m4/uintmax_t.m4 1969-12-31 19:00:00.000000000 -0500
21062+++ lrzsz-0.12.20/m4/uintmax_t.m4 2004-09-12 14:40:35.021646856 -0400
21063@@ -0,0 +1,32 @@
21064+# uintmax_t.m4 serial 7 (gettext-0.12)
21065+dnl Copyright (C) 1997-2003 Free Software Foundation, Inc.
21066+dnl This file is free software, distributed under the terms of the GNU
21067+dnl General Public License. As a special exception to the GNU General
21068+dnl Public License, this file may be distributed as part of a program
21069+dnl that contains a configuration script generated by Autoconf, under
21070+dnl the same distribution terms as the rest of that program.
21071+
21072+dnl From Paul Eggert.
21073+
21074+AC_PREREQ(2.13)
21075+
21076+# Define uintmax_t to 'unsigned long' or 'unsigned long long'
21077+# if it is not already defined in <stdint.h> or <inttypes.h>.
21078+
21079+AC_DEFUN([jm_AC_TYPE_UINTMAX_T],
21080+[
21081+ AC_REQUIRE([jm_AC_HEADER_INTTYPES_H])
21082+ AC_REQUIRE([jm_AC_HEADER_STDINT_H])
21083+ if test $jm_ac_cv_header_inttypes_h = no && test $jm_ac_cv_header_stdint_h = no; then
21084+ AC_REQUIRE([jm_AC_TYPE_UNSIGNED_LONG_LONG])
21085+ test $ac_cv_type_unsigned_long_long = yes \
21086+ && ac_type='unsigned long long' \
21087+ || ac_type='unsigned long'
21088+ AC_DEFINE_UNQUOTED(uintmax_t, $ac_type,
21089+ [Define to unsigned long or unsigned long long
21090+ if <stdint.h> and <inttypes.h> don't define.])
21091+ else
21092+ AC_DEFINE(HAVE_UINTMAX_T, 1,
21093+ [Define if you have the 'uintmax_t' type in <stdint.h> or <inttypes.h>.])
21094+ fi
21095+])
21096--- lrzsz-0.12.20.safe/m4/ulonglong.m4 1969-12-31 19:00:00.000000000 -0500
21097+++ lrzsz-0.12.20/m4/ulonglong.m4 2004-09-12 14:40:35.028645792 -0400
21098@@ -0,0 +1,25 @@
21099+# ulonglong.m4 serial 3
21100+dnl Copyright (C) 1999-2003 Free Software Foundation, Inc.
21101+dnl This file is free software, distributed under the terms of the GNU
21102+dnl General Public License. As a special exception to the GNU General
21103+dnl Public License, this file may be distributed as part of a program
21104+dnl that contains a configuration script generated by Autoconf, under
21105+dnl the same distribution terms as the rest of that program.
21106+
21107+dnl From Paul Eggert.
21108+
21109+# Define HAVE_UNSIGNED_LONG_LONG if 'unsigned long long' works.
21110+
21111+AC_DEFUN([jm_AC_TYPE_UNSIGNED_LONG_LONG],
21112+[
21113+ AC_CACHE_CHECK([for unsigned long long], ac_cv_type_unsigned_long_long,
21114+ [AC_TRY_LINK([unsigned long long ull = 1ULL; int i = 63;],
21115+ [unsigned long long ullmax = (unsigned long long) -1;
21116+ return ull << i | ull >> i | ullmax / ull | ullmax % ull;],
21117+ ac_cv_type_unsigned_long_long=yes,
21118+ ac_cv_type_unsigned_long_long=no)])
21119+ if test $ac_cv_type_unsigned_long_long = yes; then
21120+ AC_DEFINE(HAVE_UNSIGNED_LONG_LONG, 1,
21121+ [Define if you have the 'unsigned long long' type.])
21122+ fi
21123+])
21124--- lrzsz-0.12.20.safe/m4/wchar_t.m4 1969-12-31 19:00:00.000000000 -0500
21125+++ lrzsz-0.12.20/m4/wchar_t.m4 2004-09-12 14:40:35.034644880 -0400
21126@@ -0,0 +1,22 @@
21127+# wchar_t.m4 serial 1 (gettext-0.12)
21128+dnl Copyright (C) 2002-2003 Free Software Foundation, Inc.
21129+dnl This file is free software, distributed under the terms of the GNU
21130+dnl General Public License. As a special exception to the GNU General
21131+dnl Public License, this file may be distributed as part of a program
21132+dnl that contains a configuration script generated by Autoconf, under
21133+dnl the same distribution terms as the rest of that program.
21134+
21135+dnl From Bruno Haible.
21136+dnl Test whether <stddef.h> has the 'wchar_t' type.
21137+dnl Prerequisite: AC_PROG_CC
21138+
21139+AC_DEFUN([gt_TYPE_WCHAR_T],
21140+[
21141+ AC_CACHE_CHECK([for wchar_t], gt_cv_c_wchar_t,
21142+ [AC_TRY_COMPILE([#include <stddef.h>
21143+ wchar_t foo = (wchar_t)'\0';], ,
21144+ gt_cv_c_wchar_t=yes, gt_cv_c_wchar_t=no)])
21145+ if test $gt_cv_c_wchar_t = yes; then
21146+ AC_DEFINE(HAVE_WCHAR_T, 1, [Define if you have the 'wchar_t' type.])
21147+ fi
21148+])
21149--- lrzsz-0.12.20.safe/m4/wint_t.m4 1969-12-31 19:00:00.000000000 -0500
21150+++ lrzsz-0.12.20/m4/wint_t.m4 2004-09-12 14:40:35.040643968 -0400
21151@@ -0,0 +1,22 @@
21152+# wint_t.m4 serial 1 (gettext-0.12)
21153+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21154+dnl This file is free software, distributed under the terms of the GNU
21155+dnl General Public License. As a special exception to the GNU General
21156+dnl Public License, this file may be distributed as part of a program
21157+dnl that contains a configuration script generated by Autoconf, under
21158+dnl the same distribution terms as the rest of that program.
21159+
21160+dnl From Bruno Haible.
21161+dnl Test whether <wchar.h> has the 'wint_t' type.
21162+dnl Prerequisite: AC_PROG_CC
21163+
21164+AC_DEFUN([gt_TYPE_WINT_T],
21165+[
21166+ AC_CACHE_CHECK([for wint_t], gt_cv_c_wint_t,
21167+ [AC_TRY_COMPILE([#include <wchar.h>
21168+ wint_t foo = (wchar_t)'\0';], ,
21169+ gt_cv_c_wint_t=yes, gt_cv_c_wint_t=no)])
21170+ if test $gt_cv_c_wint_t = yes; then
21171+ AC_DEFINE(HAVE_WINT_T, 1, [Define if you have the 'wint_t' type.])
21172+ fi
21173+])
21174--- lrzsz-0.12.20.safe/m4/xsize.m4 1969-12-31 19:00:00.000000000 -0500
21175+++ lrzsz-0.12.20/m4/xsize.m4 2004-09-12 14:40:35.047642904 -0400
21176@@ -0,0 +1,14 @@
21177+# xsize.m4 serial 2
21178+dnl Copyright (C) 2003 Free Software Foundation, Inc.
21179+dnl This file is free software, distributed under the terms of the GNU
21180+dnl General Public License. As a special exception to the GNU General
21181+dnl Public License, this file may be distributed as part of a program
21182+dnl that contains a configuration script generated by Autoconf, under
21183+dnl the same distribution terms as the rest of that program.
21184+
21185+AC_DEFUN([gl_XSIZE],
21186+[
21187+ dnl Prerequisites of lib/xsize.h.
21188+ AC_REQUIRE([gl_SIZE_MAX])
21189+ AC_CHECK_HEADERS(stdint.h)
21190+])
21191--- lrzsz-0.12.20.safe/Makefile.am 1998-12-30 06:19:40.000000000 -0500
21192+++ lrzsz-0.12.20/Makefile.am 2004-09-12 14:40:35.121631656 -0400
21193@@ -1,5 +1,5 @@
21194 SUBDIRS = lib intl src po man testsuite
21195-EXTRA_DIST = check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21196+EXTRA_DIST = config.rpath check.lrzsz COMPATABILITY README.cvs README.isdn4linux \
21197 README.gettext rpmrc buildrpm systype.in fastcheck.sh README.tests \
21198 beos-runpiped.c fastcheck.beos
21199 noinst_SCRIPTS=systype
21200@@ -83,3 +83,5 @@
21201 rpm: $(PR).tar.gz Specfile
21202 $(srcdir)/buildrpm $(srcdir)
21203
21204+
21205+ACLOCAL_AMFLAGS = -I m4
21206--- lrzsz-0.12.20.safe/Makefile.in 1998-12-30 11:31:40.000000000 -0500
21207+++ lrzsz-0.12.20/Makefile.in 2004-09-12 14:40:35.109633480 -0400
21208@@ -125,7 +125,7 @@
21209 && CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
21210
21211 $(ACLOCAL_M4): configure.in acinclude.m4
21212- cd $(srcdir) && $(ACLOCAL)
21213+ cd $(srcdir) && $(ACLOCAL) -I m4
21214
21215 config.status: $(srcdir)/configure
21216 $(SHELL) ./config.status --recheck
21217--- lrzsz-0.12.20.safe/mkinstalldirs 1998-04-26 09:20:52.000000000 -0400
21218+++ lrzsz-0.12.20/mkinstalldirs 2004-09-12 14:40:34.337750824 -0400
21219@@ -1,34 +1,150 @@
21220 #! /bin/sh
21221 # mkinstalldirs --- make directory hierarchy
21222-# Author: Noah Friedman <friedman@prep.ai.mit.edu>
21223+
21224+scriptversion=2004-02-15.20
21225+
21226+# Original author: Noah Friedman <friedman@prep.ai.mit.edu>
21227 # Created: 1993-05-16
21228-# Last modified: 1995-03-05
21229-# Public domain
21230+# Public domain.
21231+#
21232+# This file is maintained in Automake, please report
21233+# bugs to <bug-automake@gnu.org> or send patches to
21234+# <automake-patches@gnu.org>.
21235
21236 errstatus=0
21237+dirmode=""
21238
21239-for file in ${1+"$@"} ; do
21240- set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21241- shift
21242+usage="\
21243+Usage: mkinstalldirs [-h] [--help] [--version] [-m MODE] DIR ...
21244
21245- pathcomp=
21246- for d in ${1+"$@"} ; do
21247- pathcomp="$pathcomp$d"
21248- case "$pathcomp" in
21249- -* ) pathcomp=./$pathcomp ;;
21250- esac
21251+Create each directory DIR (with mode MODE, if specified), including all
21252+leading file name components.
21253
21254- if test ! -d "$pathcomp"; then
21255- echo "mkdir $pathcomp" 1>&2
21256- mkdir "$pathcomp" > /dev/null 2>&1 || lasterr=$?
21257- fi
21258+Report bugs to <bug-automake@gnu.org>."
21259
21260- if test ! -d "$pathcomp"; then
21261+# process command line arguments
21262+while test $# -gt 0 ; do
21263+ case $1 in
21264+ -h | --help | --h*) # -h for help
21265+ echo "$usage"
21266+ exit 0
21267+ ;;
21268+ -m) # -m PERM arg
21269+ shift
21270+ test $# -eq 0 && { echo "$usage" 1>&2; exit 1; }
21271+ dirmode=$1
21272+ shift
21273+ ;;
21274+ --version)
21275+ echo "$0 $scriptversion"
21276+ exit 0
21277+ ;;
21278+ --) # stop option processing
21279+ shift
21280+ break
21281+ ;;
21282+ -*) # unknown option
21283+ echo "$usage" 1>&2
21284+ exit 1
21285+ ;;
21286+ *) # first non-opt arg
21287+ break
21288+ ;;
21289+ esac
21290+done
21291+
21292+for file
21293+do
21294+ if test -d "$file"; then
21295+ shift
21296+ else
21297+ break
21298+ fi
21299+done
21300+
21301+case $# in
21302+ 0) exit 0 ;;
21303+esac
21304+
21305+# Solaris 8's mkdir -p isn't thread-safe. If you mkdir -p a/b and
21306+# mkdir -p a/c at the same time, both will detect that a is missing,
21307+# one will create a, then the other will try to create a and die with
21308+# a "File exists" error. This is a problem when calling mkinstalldirs
21309+# from a parallel make. We use --version in the probe to restrict
21310+# ourselves to GNU mkdir, which is thread-safe.
21311+case $dirmode in
21312+ '')
21313+ if mkdir -p --version . >/dev/null 2>&1 && test ! -d ./--version; then
21314+ echo "mkdir -p -- $*"
21315+ exec mkdir -p -- "$@"
21316+ else
21317+ # On NextStep and OpenStep, the `mkdir' command does not
21318+ # recognize any option. It will interpret all options as
21319+ # directories to create, and then abort because `.' already
21320+ # exists.
21321+ test -d ./-p && rmdir ./-p
21322+ test -d ./--version && rmdir ./--version
21323+ fi
21324+ ;;
21325+ *)
21326+ if mkdir -m "$dirmode" -p --version . >/dev/null 2>&1 &&
21327+ test ! -d ./--version; then
21328+ echo "mkdir -m $dirmode -p -- $*"
21329+ exec mkdir -m "$dirmode" -p -- "$@"
21330+ else
21331+ # Clean up after NextStep and OpenStep mkdir.
21332+ for d in ./-m ./-p ./--version "./$dirmode";
21333+ do
21334+ test -d $d && rmdir $d
21335+ done
21336+ fi
21337+ ;;
21338+esac
21339+
21340+for file
21341+do
21342+ set fnord `echo ":$file" | sed -ne 's/^:\//#/;s/^://;s/\// /g;s/^#/\//;p'`
21343+ shift
21344+
21345+ pathcomp=
21346+ for d
21347+ do
21348+ pathcomp="$pathcomp$d"
21349+ case $pathcomp in
21350+ -*) pathcomp=./$pathcomp ;;
21351+ esac
21352+
21353+ if test ! -d "$pathcomp"; then
21354+ echo "mkdir $pathcomp"
21355+
21356+ mkdir "$pathcomp" || lasterr=$?
21357+
21358+ if test ! -d "$pathcomp"; then
21359 errstatus=$lasterr
21360- fi
21361+ else
21362+ if test ! -z "$dirmode"; then
21363+ echo "chmod $dirmode $pathcomp"
21364+ lasterr=""
21365+ chmod "$dirmode" "$pathcomp" || lasterr=$?
21366
21367- pathcomp="$pathcomp/"
21368- done
21369+ if test ! -z "$lasterr"; then
21370+ errstatus=$lasterr
21371+ fi
21372+ fi
21373+ fi
21374+ fi
21375+
21376+ pathcomp="$pathcomp/"
21377+ done
21378 done
21379
21380 exit $errstatus
21381+
21382+# Local Variables:
21383+# mode: shell-script
21384+# sh-indentation: 2
21385+# eval: (add-hook 'write-file-hooks 'time-stamp)
21386+# time-stamp-start: "scriptversion="
21387+# time-stamp-format: "%:y-%02m-%02d.%02H"
21388+# time-stamp-end: "$"
21389+# End:
21390--- lrzsz-0.12.20.safe/po/boldquot.sed 1969-12-31 19:00:00.000000000 -0500
21391+++ lrzsz-0.12.20/po/boldquot.sed 2004-09-12 14:40:34.723692152 -0400
21392@@ -0,0 +1,10 @@
21393+s/"\([^"]*\)"/“\1â€/g
21394+s/`\([^`']*\)'/‘\1’/g
21395+s/ '\([^`']*\)' / ‘\1’ /g
21396+s/ '\([^`']*\)'$/ ‘\1’/g
21397+s/^'\([^`']*\)' /‘\1’ /g
21398+s/“â€/""/g
21399+s/“/“/g
21400+s/â€/â€/g
21401+s/‘/‘/g
21402+s/’/’/g
21403--- lrzsz-0.12.20.safe/po/cat-id-tbl.c 1998-12-29 04:24:24.000000000 -0500
21404+++ lrzsz-0.12.20/po/cat-id-tbl.c 1969-12-31 19:00:00.000000000 -0500
21405@@ -1,234 +0,0 @@
21406-/* Automatically generated by po2tbl.sed from lrzsz.pot. */
21407-
21408-#if HAVE_CONFIG_H
21409-# include <config.h>
21410-#endif
21411-
21412-#include "libgettext.h"
21413-
21414-const struct _msg_ent _msg_tbl[] = {
21415- {"", 1},
21416- {"io_mode(,2) in rbsb.c not implemented\n", 2},
21417- {"caught signal %d; exiting", 3},
21418- {"command tries", 4},
21419- {"packetlength", 5},
21420- {"packetlength out of range 24..%ld", 6},
21421- {"framelength", 7},
21422- {"framelength out of range 32..%ld", 8},
21423- {"min_bps", 9},
21424- {"min_bps must be >= 0", 10},
21425- {"min_bps_time", 11},
21426- {"min_bps_time must be > 1", 12},
21427- {"hour to large (0..23)", 13},
21428- {"unparsable stop time\n", 14},
21429- {"minute to large (0..59)", 15},
21430- {"stop time to small", 16},
21431- {"stop-at", 17},
21432- {"timeout", 18},
21433- {"timeout out of range 10..1000", 19},
21434- {"security violation: can't do that under restricted shell\n", 20},
21435- {"window size", 21},
21436- {"cannot turnoff syslog", 22},
21437- {"startup delay", 23},
21438- {"out of memory", 24},
21439- {"this program was never intended to be used setuid\n", 25},
21440- {"need at least one file to send", 26},
21441- {"Can't send command in restricted mode\n", 27},
21442- {"hostname too long\n", 28},
21443- {"illegal server address\n", 29},
21444- {"can read only one file from stdin", 30},
21445- {"Transfer incomplete\n", 31},
21446- {"Transfer complete\n", 32},
21447- {"send_pseudo %s: cannot open tmpfile %s: %s", 33},
21448- {"send_pseudo %s: cannot lstat tmpfile %s: %s", 34},
21449- {"send_pseudo %s: avoiding symlink trap", 35},
21450- {"send_pseudo %s: cannot write to tmpfile %s: %s", 36},
21451- {"send_pseudo %s: failed", 37},
21452- {"send_pseudo %s: ok", 38},
21453- {"tcp protocol init failed\n", 39},
21454- {"Answering TIMESYNC at %s", 40},
21455- {"timezone", 41},
21456- {"timezone unknown", 42},
21457- {"Can't open any requested files.", 43},
21458- {"security violation: not allowed to upload from %s", 44},
21459- {"cannot open %s", 45},
21460- {"is not a file: %s", 46},
21461- {"%s/%s: error occured", 47},
21462- {"skipped: %s", 48},
21463- {"%s/%s: skipped", 49},
21464- {"Bytes Sent:%7ld BPS:%-8ld \n", 50},
21465- {"Sending %s, %ld blocks: ", 51},
21466- {"Give your local XMODEM receive command now.", 52},
21467- {"Sending: %s\n", 53},
21468- {"Timeout on pathname", 54},
21469- {"Receiver Cancelled", 55},
21470- {"No ACK on EOT", 56},
21471- {"Xmodem sectors/kbytes sent: %3d/%2dk", 57},
21472- {"Ymodem sectors/kbytes sent: %3d/%2dk", 58},
21473- {"Cancelled", 59},
21474- {"Timeout on sector ACK", 60},
21475- {"NAK on sector", 61},
21476- {"Got burst for sector ACK", 62},
21477- {"Got %02x for sector ACK", 63},
21478- {"Retry Count Exceeded", 64},
21479- {"Try `%s --help' for more information.\n", 65},
21480- {"%s version %s\n", 66},
21481- {"Usage: %s [options] file ...\n", 67},
21482- {" or: %s [options] -{c|i} COMMAND\n", 68},
21483- {"Send file(s) with ZMODEM/YMODEM/XMODEM protocol\n", 69},
21484- {"\
21485- (X) = option applies to XMODEM only\n\
21486- (Y) = option applies to YMODEM only\n\
21487- (Z) = option applies to ZMODEM only\n", 70},
21488- {"\
21489- -+, --append append to existing destination file (Z)\n\
21490- -2, --twostop use 2 stop bits\n\
21491- -4, --try-4k go up to 4K blocksize\n\
21492- --start-4k start with 4K blocksize (doesn't try 8)\n\
21493- -8, --try-8k go up to 8K blocksize\n\
21494- --start-8k start with 8K blocksize\n\
21495- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21496- -b, --binary binary transfer\n\
21497- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21498- -c, --command COMMAND execute remote command COMMAND (Z)\n\
21499- -C, --command-tries N try N times to execute a command (Z)\n\
21500- -d, --dot-to-slash change '.' to '/' in pathnames (Y/Z)\n\
21501- --delay-startup N sleep N seconds before doing anything\n\
21502- -e, --escape escape all control characters (Z)\n\
21503- -E, --rename force receiver to rename files it already has\n\
21504- -f, --full-path send full pathname (Y/Z)\n\
21505- -i, --immediate-command CMD send remote CMD, return immediately (Z)\n\
21506- -h, --help print this usage message\n\
21507- -k, --1k send 1024 byte packets (X)\n\
21508- -L, --packetlen N limit subpacket length to N bytes (Z)\n\
21509- -l, --framelen N limit frame length to N bytes (l>=L) (Z)\n\
21510- -m, --min-bps N stop transmission if BPS below N\n\
21511- -M, --min-bps-time N for at least N seconds (default: 120)\n", 71},
21512- {"\
21513- -n, --newer send file if source newer (Z)\n\
21514- -N, --newer-or-longer send file if source newer or longer (Z)\n\
21515- -o, --16-bit-crc use 16 bit CRC instead of 32 bit CRC (Z)\n\
21516- -O, --disable-timeouts disable timeout code, wait forever\n\
21517- -p, --protect protect existing destination file (Z)\n\
21518- -r, --resume resume interrupted file transfer (Z)\n\
21519- -R, --restricted restricted, more secure mode\n\
21520- -q, --quiet quiet (no progress reports)\n\
21521- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21522- --tcp build a TCP connection to transmit files\n\
21523- --tcp-server open socket, wait for connection\n\
21524- -u, --unlink unlink file after transmission\n\
21525- -U, --unrestrict turn off restricted mode (if allowed to)\n\
21526- -v, --verbose be verbose, provide debugging information\n\
21527- -w, --windowsize N Window is N bytes (Z)\n\
21528- -X, --xmodem use XMODEM protocol\n\
21529- -y, --overwrite overwrite existing files\n\
21530- -Y, --overwrite-or-skip overwrite existing files, else skip\n\
21531- --ymodem use YMODEM protocol\n\
21532- -Z, --zmodem use ZMODEM protocol\n\
21533-\n\
21534-short options use the same arguments as the long ones\n", 72},
21535- {"got ZRQINIT", 73},
21536- {"got ZCAN", 74},
21537- {"blklen now %d\n", 75},
21538- {"zsendfdata: bps rate %ld below min %ld", 76},
21539- {"zsendfdata: reached stop time", 77},
21540- {"Bytes Sent:%7ld/%7ld BPS:%-8ld ETA %02d:%02d ", 78},
21541- {"calc_blklen: reduced to %d due to error\n", 79},
21542- {"calc_blklen: returned old value %d due to low bpe diff\n", 80},
21543- {"calc_blklen: old %ld, new %ld, d %ld\n", 81},
21544- {"calc_blklen: calc total_bytes=%ld, bpe=%ld, ec=%ld\n", 82},
21545- {"calc_blklen: blklen %d, ok %ld, failed %ld -> %lu\n", 83},
21546- {"calc_blklen: returned %d as best\n", 84},
21547- {"\
21548-\n\
21549-countem: Total %d %ld\n", 85},
21550- {"Bad escape sequence %x", 86},
21551- {"Sender Canceled", 87},
21552- {"TIMEOUT", 88},
21553- {"Bad data subpacket", 89},
21554- {"Data subpacket too long", 90},
21555- {"Garbage count exceeded", 91},
21556- {"Got %s", 92},
21557- {"Retry %d: ", 93},
21558- {"don't have settimeofday, will not set time\n", 94},
21559- {"not running as root (this is good!), can not set time\n", 95},
21560- {"bytes_per_error", 96},
21561- {"bytes-per-error should be >100", 97},
21562- {"O_SYNC not supported by the kernel", 98},
21563- {"garbage on commandline", 99},
21564- {"Usage: %s [options] [filename.if.xmodem]\n", 100},
21565- {"Receive files with ZMODEM/YMODEM/XMODEM protocol\n", 101},
21566- {"\
21567- -+, --append append to existing files\n\
21568- -a, --ascii ASCII transfer (change CR/LF to LF)\n\
21569- -b, --binary binary transfer\n\
21570- -B, --bufsize N buffer N bytes (N==auto: buffer whole file)\n\
21571- -c, --with-crc Use 16 bit CRC (X)\n\
21572- -C, --allow-remote-commands allow execution of remote commands (Z)\n\
21573- -D, --null write all received data to /dev/null\n\
21574- --delay-startup N sleep N seconds before doing anything\n\
21575- -e, --escape Escape control characters (Z)\n\
21576- -E, --rename rename any files already existing\n\
21577- --errors N generate CRC error every N bytes (debugging)\n\
21578- -h, --help Help, print this usage message\n\
21579- -m, --min-bps N stop transmission if BPS below N\n\
21580- -M, --min-bps-time N for at least N seconds (default: 120)\n\
21581- -O, --disable-timeouts disable timeout code, wait forever for data\n\
21582- --o-sync open output file(s) in synchronous write mode\n\
21583- -p, --protect protect existing files\n\
21584- -q, --quiet quiet, no progress reports\n\
21585- -r, --resume try to resume interrupted file transfer (Z)\n\
21586- -R, --restricted restricted, more secure mode\n\
21587- -s, --stop-at {HH:MM|+N} stop transmission at HH:MM or in N seconds\n\
21588- -S, --timesync request remote time (twice: set local time)\n\
21589- --syslog[=off] turn syslog on or off, if possible\n\
21590- -t, --timeout N set timeout to N tenths of a second\n\
21591- -u, --keep-uppercase keep upper case filenames\n\
21592- -U, --unrestrict disable restricted mode (if allowed to)\n\
21593- -v, --verbose be verbose, provide debugging information\n\
21594- -w, --windowsize N Window is N bytes (Z)\n\
21595- -X --xmodem use XMODEM protocol\n\
21596- -y, --overwrite Yes, clobber existing file if any\n\
21597- --ymodem use YMODEM protocol\n\
21598- -Z, --zmodem use ZMODEM protocol\n\
21599-\n\
21600-short options use the same arguments as the long ones\n", 102},
21601- {"%s waiting to receive.", 103},
21602- {"\rBytes received: %7ld/%7ld BPS:%-6ld \r\n", 104},
21603- {"%s: ready to receive %s", 105},
21604- {"\rBytes received: %7ld BPS:%-6ld \r\n", 106},
21605- {"\
21606-\r\n\
21607-%s: %s removed.\r\n", 107},
21608- {"Pathname fetch returned EOT", 108},
21609- {"Received dup Sector", 109},
21610- {"Sync Error", 110},
21611- {"CRC", 111},
21612- {"Checksum", 112},
21613- {"Sector number garbled", 113},
21614- {"Sender Cancelled", 114},
21615- {"Got 0%o sector header", 115},
21616- {"file name ends with a /, skipped: %s\n", 116},
21617- {"zmanag=%d, Lzmanag=%d\n", 117},
21618- {"zconv=%d\n", 118},
21619- {"file exists, skipped: %s\n", 119},
21620- {"TIMESYNC: here %ld, remote %ld, diff %ld seconds\n", 120},
21621- {"TIMESYNC: cannot set time: %s\n", 121},
21622- {"cannot tmpfile() for tcp protocol synchronization", 122},
21623- {"Topipe", 123},
21624- {"Receiving: %s\n", 124},
21625- {"Blocks received: %d", 125},
21626- {"%s: %s exists\n", 126},
21627- {"%s:\tSecurity Violation", 127},
21628- {"remote command execution requested", 128},
21629- {"not executed", 129},
21630- {"got ZRINIT", 130},
21631- {"Skipped", 131},
21632- {"rzfile: bps rate %ld below min %ld", 132},
21633- {"rzfile: reached stop time", 133},
21634- {"\rBytes received: %7ld/%7ld BPS:%-6ld ETA %02d:%02d ", 134},
21635- {"fgets for tcp protocol synchronization failed: ", 135},
21636- {"file close error", 136},
21637-};
21638-
21639-int _msg_tbl_length = 136;
21640--- lrzsz-0.12.20.safe/po/ChangeLog 1998-04-26 09:20:52.000000000 -0400
21641+++ lrzsz-0.12.20/po/ChangeLog 2004-09-12 14:40:34.793681512 -0400
21642@@ -1,3 +1,15 @@
21643+2004-09-12 gettextize <bug-gnu-gettext@gnu.org>
21644+
21645+ * boldquot.sed: New file, from gettext-0.14.1.
21646+ * en@boldquot.header: New file, from gettext-0.14.1.
21647+ * en@quot.header: New file, from gettext-0.14.1.
21648+ * insert-header.sin: New file, from gettext-0.14.1.
21649+ * quot.sed: New file, from gettext-0.14.1.
21650+ * remove-potcdate.sin: New file, from gettext-0.14.1.
21651+ * Rules-quot: New file, from gettext-0.14.1.
21652+ * cat-id-tbl.c: Remove file.
21653+ * stamp-cat-id: Remove file.
21654+
21655 /* Automatically generated by po2tbl.sed from lrzsz.pot. */
21656
21657 #if HAVE_CONFIG_H
21658--- lrzsz-0.12.20.safe/po/en@boldquot.header 1969-12-31 19:00:00.000000000 -0500
21659+++ lrzsz-0.12.20/po/en@boldquot.header 2004-09-12 14:40:34.731690936 -0400
21660@@ -0,0 +1,25 @@
21661+# All this catalog "translates" are quotation characters.
21662+# The msgids must be ASCII and therefore cannot contain real quotation
21663+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21664+# and double quote (0x22). These substitutes look strange; see
21665+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21666+#
21667+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21668+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21669+# It also translates pairs of apostrophe (0x27) to
21670+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21671+# and pairs of quotation mark (0x22) to
21672+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21673+#
21674+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21675+# When output to an ISO-8859-1 terminal, the single quotation marks are
21676+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21677+# grave/acute accent (by libiconv), and the double quotation marks are
21678+# transliterated to 0x22.
21679+# When output to an ASCII terminal, the single quotation marks are
21680+# transliterated to apostrophes, and the double quotation marks are
21681+# transliterated to 0x22.
21682+#
21683+# This catalog furthermore displays the text between the quotation marks in
21684+# bold face, assuming the VT100/XTerm escape sequences.
21685+#
21686--- lrzsz-0.12.20.safe/po/en@quot.header 1969-12-31 19:00:00.000000000 -0500
21687+++ lrzsz-0.12.20/po/en@quot.header 2004-09-12 14:40:34.737690024 -0400
21688@@ -0,0 +1,22 @@
21689+# All this catalog "translates" are quotation characters.
21690+# The msgids must be ASCII and therefore cannot contain real quotation
21691+# characters, only substitutes like grave accent (0x60), apostrophe (0x27)
21692+# and double quote (0x22). These substitutes look strange; see
21693+# http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
21694+#
21695+# This catalog translates grave accent (0x60) and apostrophe (0x27) to
21696+# left single quotation mark (U+2018) and right single quotation mark (U+2019).
21697+# It also translates pairs of apostrophe (0x27) to
21698+# left single quotation mark (U+2018) and right single quotation mark (U+2019)
21699+# and pairs of quotation mark (0x22) to
21700+# left double quotation mark (U+201C) and right double quotation mark (U+201D).
21701+#
21702+# When output to an UTF-8 terminal, the quotation characters appear perfectly.
21703+# When output to an ISO-8859-1 terminal, the single quotation marks are
21704+# transliterated to apostrophes (by iconv in glibc 2.2 or newer) or to
21705+# grave/acute accent (by libiconv), and the double quotation marks are
21706+# transliterated to 0x22.
21707+# When output to an ASCII terminal, the single quotation marks are
21708+# transliterated to apostrophes, and the double quotation marks are
21709+# transliterated to 0x22.
21710+#
21711--- lrzsz-0.12.20.safe/po/insert-header.sin 1969-12-31 19:00:00.000000000 -0500
21712+++ lrzsz-0.12.20/po/insert-header.sin 2004-09-12 14:40:34.743689112 -0400
21713@@ -0,0 +1,23 @@
21714+# Sed script that inserts the file called HEADER before the header entry.
21715+#
21716+# At each occurrence of a line starting with "msgid ", we execute the following
21717+# commands. At the first occurrence, insert the file. At the following
21718+# occurrences, do nothing. The distinction between the first and the following
21719+# occurrences is achieved by looking at the hold space.
21720+/^msgid /{
21721+x
21722+# Test if the hold space is empty.
21723+s/m/m/
21724+ta
21725+# Yes it was empty. First occurrence. Read the file.
21726+r HEADER
21727+# Output the file's contents by reading the next line. But don't lose the
21728+# current line while doing this.
21729+g
21730+N
21731+bb
21732+:a
21733+# The hold space was nonempty. Following occurrences. Do nothing.
21734+x
21735+:b
21736+}
21737--- lrzsz-0.12.20.safe/po/Makevars 1969-12-31 19:00:00.000000000 -0500
21738+++ lrzsz-0.12.20/po/Makevars 2004-09-12 14:40:34.748688352 -0400
21739@@ -0,0 +1,41 @@
21740+# Makefile variables for PO directory in any package using GNU gettext.
21741+
21742+# Usually the message domain is the same as the package name.
21743+DOMAIN = $(PACKAGE)
21744+
21745+# These two variables depend on the location of this directory.
21746+subdir = po
21747+top_builddir = ..
21748+
21749+# These options get passed to xgettext.
21750+XGETTEXT_OPTIONS = --keyword=_ --keyword=N_
21751+
21752+# This is the copyright holder that gets inserted into the header of the
21753+# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
21754+# package. (Note that the msgstr strings, extracted from the package's
21755+# sources, belong to the copyright holder of the package.) Translators are
21756+# expected to transfer the copyright for their translations to this person
21757+# or entity, or to disclaim their copyright. The empty string stands for
21758+# the public domain; in this case the translators are expected to disclaim
21759+# their copyright.
21760+COPYRIGHT_HOLDER = Free Software Foundation, Inc.
21761+
21762+# This is the email address or URL to which the translators shall report
21763+# bugs in the untranslated strings:
21764+# - Strings which are not entire sentences, see the maintainer guidelines
21765+# in the GNU gettext documentation, section 'Preparing Strings'.
21766+# - Strings which use unclear terms or require additional context to be
21767+# understood.
21768+# - Strings which make invalid assumptions about notation of date, time or
21769+# money.
21770+# - Pluralisation problems.
21771+# - Incorrect English spelling.
21772+# - Incorrect formatting.
21773+# It can be your email address, or a mailing list address where translators
21774+# can write to without being subscribed, or the URL of a web page through
21775+# which the translators can contact you.
21776+MSGID_BUGS_ADDRESS =
21777+
21778+# This is the list of locale categories, beyond LC_MESSAGES, for which the
21779+# message catalogs shall be used. It is usually empty.
21780+EXTRA_LOCALE_CATEGORIES =
21781--- lrzsz-0.12.20.safe/po/quot.sed 1969-12-31 19:00:00.000000000 -0500
21782+++ lrzsz-0.12.20/po/quot.sed 2004-09-12 14:40:34.754687440 -0400
21783@@ -0,0 +1,6 @@
21784+s/"\([^"]*\)"/“\1â€/g
21785+s/`\([^`']*\)'/‘\1’/g
21786+s/ '\([^`']*\)' / ‘\1’ /g
21787+s/ '\([^`']*\)'$/ ‘\1’/g
21788+s/^'\([^`']*\)' /‘\1’ /g
21789+s/“â€/""/g
21790--- lrzsz-0.12.20.safe/po/remove-potcdate.sin 1969-12-31 19:00:00.000000000 -0500
21791+++ lrzsz-0.12.20/po/remove-potcdate.sin 2004-09-12 14:40:34.762686224 -0400
21792@@ -0,0 +1,19 @@
21793+# Sed script that remove the POT-Creation-Date line in the header entry
21794+# from a POT file.
21795+#
21796+# The distinction between the first and the following occurrences of the
21797+# pattern is achieved by looking at the hold space.
21798+/^"POT-Creation-Date: .*"$/{
21799+x
21800+# Test if the hold space is empty.
21801+s/P/P/
21802+ta
21803+# Yes it was empty. First occurrence. Remove the line.
21804+g
21805+d
21806+bb
21807+:a
21808+# The hold space was nonempty. Following occurrences. Do nothing.
21809+x
21810+:b
21811+}
21812--- lrzsz-0.12.20.safe/po/Rules-quot 1969-12-31 19:00:00.000000000 -0500
21813+++ lrzsz-0.12.20/po/Rules-quot 2004-09-12 14:40:34.778683792 -0400
21814@@ -0,0 +1,47 @@
21815+# Special Makefile rules for English message catalogs with quotation marks.
21816+
21817+DISTFILES.common.extra1 = quot.sed boldquot.sed en@quot.header en@boldquot.header insert-header.sin Rules-quot
21818+
21819+.SUFFIXES: .insert-header .po-update-en
21820+
21821+en@quot.po-create:
21822+ $(MAKE) en@quot.po-update
21823+en@boldquot.po-create:
21824+ $(MAKE) en@boldquot.po-update
21825+
21826+en@quot.po-update: en@quot.po-update-en
21827+en@boldquot.po-update: en@boldquot.po-update-en
21828+
21829+.insert-header.po-update-en:
21830+ @lang=`echo $@ | sed -e 's/\.po-update-en$$//'`; \
21831+ if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; GETTEXTLIBDIR=`cd $(top_srcdir)/src && pwd`; export GETTEXTLIBDIR; fi; \
21832+ tmpdir=`pwd`; \
21833+ echo "$$lang:"; \
21834+ ll=`echo $$lang | sed -e 's/@.*//'`; \
21835+ LC_ALL=C; export LC_ALL; \
21836+ cd $(srcdir); \
21837+ 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 \
21838+ if cmp $$lang.po $$tmpdir/$$lang.new.po >/dev/null 2>&1; then \
21839+ rm -f $$tmpdir/$$lang.new.po; \
21840+ else \
21841+ if mv -f $$tmpdir/$$lang.new.po $$lang.po; then \
21842+ :; \
21843+ else \
21844+ echo "creation of $$lang.po failed: cannot move $$tmpdir/$$lang.new.po to $$lang.po" 1>&2; \
21845+ exit 1; \
21846+ fi; \
21847+ fi; \
21848+ else \
21849+ echo "creation of $$lang.po failed!" 1>&2; \
21850+ rm -f $$tmpdir/$$lang.new.po; \
21851+ fi
21852+
21853+en@quot.insert-header: insert-header.sin
21854+ sed -e '/^#/d' -e 's/HEADER/en@quot.header/g' $(srcdir)/insert-header.sin > en@quot.insert-header
21855+
21856+en@boldquot.insert-header: insert-header.sin
21857+ sed -e '/^#/d' -e 's/HEADER/en@boldquot.header/g' $(srcdir)/insert-header.sin > en@boldquot.insert-header
21858+
21859+mostlyclean: mostlyclean-quot
21860+mostlyclean-quot:
21861+ rm -f *.insert-header
21862--- lrzsz-0.12.20.safe/po/stamp-cat-id 1998-12-30 02:50:01.000000000 -0500
21863+++ lrzsz-0.12.20/po/stamp-cat-id 1969-12-31 19:00:00.000000000 -0500
21864@@ -1 +0,0 @@
21865-timestamp
21866--- lrzsz-0.12.20.safe/src/Makefile.am 1998-12-28 03:38:47.000000000 -0500
21867+++ lrzsz-0.12.20/src/Makefile.am 2004-09-12 14:40:53.665812512 -0400
21868@@ -2,12 +2,12 @@
21869 lrz_SOURCES=lrz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21870 lsz_SOURCES=lsz.c timing.c zperr.c zreadline.c crctab.c rbsb.c zm.c protname.c tcp.c lsyslog.c canit.c
21871 noinst_HEADERS = timing.h zglobal.h zmodem.h
21872-datadir = $(prefix)/@DATADIRNAME@
21873+datadir = $(prefix)/share
21874 localedir = $(datadir)/locale
21875 CFLAGS=@CFLAGS@
21876 DISTCLEAN_FILES=lrzszbug
21877
21878-LDADD = ../lib/libzmodem.a @INTLLIBS@
21879+LDADD = ../lib/libzmodem.a @LIBINTL@
21880 AUTOMAKE_OPTIONS=ansi2knr
21881 EXTRA_DIST = ansi2knr.1 ansi2knr.c lrzszbug.in
21882 INCLUDES = -I.. -I$(srcdir) -I$(top_srcdir)/src -I../intl -I$(top_srcdir)/lib
diff --git a/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/makefile.patch b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/makefile.patch
new file mode 100644
index 0000000000..c553c8bf34
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz-0.12.20/makefile.patch
@@ -0,0 +1,20 @@
1diff -ruN lrzsz-0.12.20_org/src/Makefile.in lrzsz-0.12.20_patch/src/Makefile.in
2--- lrzsz-0.12.20_org/src/Makefile.in 1998-12-30 17:31:46.000000000 +0100
3+++ lrzsz-0.12.20_patch/src/Makefile.in 2004-04-29 13:57:33.434909656 +0200
4@@ -372,13 +372,13 @@
5 rm -f $(DESTDIR)/$(bindir)/`echo lsb | sed -e '$(transform)'`
6 ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
7 $(DESTDIR)/$(bindir)/`echo lsb |sed -e '$(transform)'`
8- rm -f $(bindir)/`echo lsx | sed -e '$(transform)'`
9+ rm -f $(DESTDIR)/$(bindir)/`echo lsx | sed -e '$(transform)'`
10 ln $(DESTDIR)/$(bindir)/`echo lsz |sed -e '$(transform)'` \
11 $(DESTDIR)/$(bindir)/`echo lsx |sed -e '$(transform)'`
12- rm -f $(bindir)/`echo lrb | sed -e '$(transform)'`
13+ rm -f $(DESTDIR)/$(bindir)/`echo lrb | sed -e '$(transform)'`
14 ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
15 $(DESTDIR)/$(bindir)/`echo lrb |sed -e '$(transform)'`
16- rm -f $(bindir)/`echo lrx | sed -e '$(transform)'`
17+ rm -f $(DESTDIR)/$(bindir)/`echo lrx | sed -e '$(transform)'`
18 ln $(DESTDIR)/$(bindir)/`echo lrz |sed -e '$(transform)'` \
19 $(DESTDIR)/$(bindir)/`echo lrx |sed -e '$(transform)'`
20 # rm -f $(bindir)/`echo lrzszbug | sed -e '$(transform)'`
diff --git a/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
new file mode 100644
index 0000000000..af2db23102
--- /dev/null
+++ b/meta/recipes-bsp/lrzsz/lrzsz_0.12.20.bb
@@ -0,0 +1,33 @@
1DESCRIPTION = "Tools for zmodem/xmodem/ymodem file transfer"
2HOMEPAGE = "http://www.ohse.de/uwe/software/lrzsz.html"
3LICENSE = "GPLv2+"
4LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
5 file://src/lrz.c;beginline=1;endline=10;md5=5276956373ff7d8758837f6399a1045f"
6SECTION = "console/network"
7PRIORITY = "standard"
8DEPENDS = ""
9PR = "r3"
10
11SRC_URI = "http://www.ohse.de/uwe/releases/lrzsz-${PV}.tar.gz \
12 file://autotools.patch;patch=1 \
13 file://makefile.patch;patch=1 \
14 file://gettext.patch;patch=1"
15
16inherit autotools gettext
17
18do_install() {
19 install -d ${D}${bindir}/
20 install -m 0755 src/lrz src/lsz ${D}${bindir}/
21}
22
23pkg_postinst() {
24 for util in rz rx rb sz sx sb; do
25 update-alternatives --install ${bindir}/$util $util lrz 100
26 done
27}
28
29pkg_postrm() {
30 for util in rz rx rb sz sx sb; do
31 update-alternatives --remove $util ${bindir}/lrz
32 done
33} \ No newline at end of file
diff --git a/meta/recipes-bsp/pm-utils/pm-utils_1.3.0.bb b/meta/recipes-bsp/pm-utils/pm-utils_1.3.0.bb
new file mode 100644
index 0000000000..cb90f87acc
--- /dev/null
+++ b/meta/recipes-bsp/pm-utils/pm-utils_1.3.0.bb
@@ -0,0 +1,16 @@
1SECTION = "base"
2DESCRIPTION = "PM hooks"
3LICENSE="GPL"
4
5PR = "r0"
6
7SRC_URI = "http://pm-utils.freedesktop.org/releases/pm-utils-${PV}.tar.gz"
8
9inherit pkgconfig autotools
10
11FILES_${PN}-dbg += "${libdir}/pm-utils/bin/.debug \
12 ${datadir}/doc/pm-utils/README.debugging"
13
14do_configure_prepend () {
15 autoreconf -f -i -s
16}
diff --git a/meta/recipes-bsp/qemu-config/qemu-config.bb b/meta/recipes-bsp/qemu-config/qemu-config.bb
new file mode 100644
index 0000000000..fc59320282
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config.bb
@@ -0,0 +1,36 @@
1DESCRIPTION = "Adds scripts to use distcc on the host system under qemu"
2LICENSE = "GPL"
3RDEPENDS = "distcc task-poky-nfs-server oprofileui-server rsync bash"
4PR = "r17"
5
6SRC_URI = "file://distcc.sh \
7 file://anjuta-remote-run \
8 file://exports \
9 file://shutdown.desktop \
10 file://qemu-autostart"
11
12S = "${WORKDIR}"
13
14COMPATIBLE_MACHINE = "(qemuarm|qemux86)"
15PACKAGE_ARCH = "all"
16
17do_install() {
18 install -d ${D}${sysconfdir}/profile.d
19
20 install -m 0755 distcc.sh ${D}${sysconfdir}/profile.d/
21 install -m 0644 exports ${D}${sysconfdir}/
22
23 install -d ${D}${bindir}
24 install -m 0755 anjuta-remote-run ${D}${bindir}/
25
26 install -d ${D}${datadir}/applications
27 install -m 0644 shutdown.desktop ${D}${datadir}/applications/
28
29 install -d ${D}/etc/init.d
30 install qemu-autostart ${D}/etc/init.d/
31}
32
33inherit update-rc.d
34
35INITSCRIPT_NAME = "qemu-autostart"
36INITSCRIPT_PARAMS = "start 999 5 2 . stop 20 0 1 6 ."
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run b/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run
new file mode 100644
index 0000000000..620e3a705b
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/anjuta-remote-run
@@ -0,0 +1,7 @@
1#!/bin/sh
2
3. /etc/profile
4export DISPLAY=:0
5dbus-launch $@
6
7
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh b/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh
new file mode 100644
index 0000000000..a2b543d6b8
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/distcc.sh
@@ -0,0 +1,4 @@
1DISTCC_HOSTS="192.168.7.1"
2#DISTCC_VERBOSE="1"
3
4export DISTCC_HOSTS
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/exports b/meta/recipes-bsp/qemu-config/qemu-config/exports
new file mode 100644
index 0000000000..b7257aa008
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/exports
@@ -0,0 +1 @@
/ *(rw,no_root_squash,async)
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart b/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart
new file mode 100755
index 0000000000..db2668eb4e
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/qemu-autostart
@@ -0,0 +1,37 @@
1#!/bin/sh
2### BEGIN INIT INFO
3# Provides: hddtemp
4# Required-Start: $network
5# Required-Stop: $network
6# Default-Start: 2 3 4 5
7# Default-Stop: 0 1 6
8# Short-Description: OProfile server
9# Description:
10### END INIT INFO
11
12. /etc/init.d/functions
13
14case "$1" in
15 start)
16 echo "Starting automatic qemu services"
17 . /etc/profile
18 /usr/bin/oprofile-server &
19 ;;
20
21 stop)
22 echo "Stopping qemu services"
23 killproc oprofile-server
24 ;;
25
26 restart)
27 $0 stop
28 sleep 1
29 $0 start
30 ;;
31
32 *)
33 echo "usage: $0 { start | stop | restart }"
34 ;;
35esac
36
37exit 0
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop b/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop
new file mode 100644
index 0000000000..b973d4318e
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/qemuarm/shutdown.desktop
@@ -0,0 +1,10 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Shutdown
5Comment=Close down the machine safely
6Exec=reboot
7Icon=system-shutdown
8Terminal=false
9Categories=Utility;
10StartupNotify=true \ No newline at end of file
diff --git a/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop b/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop
new file mode 100644
index 0000000000..272688922c
--- /dev/null
+++ b/meta/recipes-bsp/qemu-config/qemu-config/shutdown.desktop
@@ -0,0 +1,10 @@
1[Desktop Entry]
2Encoding=UTF-8
3Type=Application
4Name=Shutdown
5Comment=Close down the machine safely
6Exec=halt
7Icon=system-shutdown
8Terminal=false
9Categories=Utility;
10StartupNotify=true \ No newline at end of file
diff --git a/meta/recipes-bsp/setserial/setserial_2.17.bb b/meta/recipes-bsp/setserial/setserial_2.17.bb
new file mode 100644
index 0000000000..4e0d1b66e4
--- /dev/null
+++ b/meta/recipes-bsp/setserial/setserial_2.17.bb
@@ -0,0 +1,18 @@
1DESCRIPTION = "setserial is a program designed to set and/or report the configuration information associated with a serial port"
2HOMEPAGE = "http://setserial.sourceforge.net"
3AUTHOR = "Theodore Ts'o <tytso@mit.edu>"
4SECTION = "console/utils"
5LICENSE = "GPL"
6PR = "r2"
7
8inherit autotools
9
10SRC_URI = "${SOURCEFORGE_MIRROR}/setserial/${PN}-${PV}.tar.gz"
11
12do_install() {
13 install -d ${D}${bindir}
14 install -d ${D}${mandir}/man8
15
16 install -m 0755 ${S}/setserial ${D}${bindir}
17 install -m 0644 ${S}/setserial.8 ${D}${mandir}/man8
18}
diff --git a/meta/recipes-bsp/uboot/files/fix-arm920t-eabi.patch b/meta/recipes-bsp/uboot/files/fix-arm920t-eabi.patch
new file mode 100644
index 0000000000..69cb75891d
--- /dev/null
+++ b/meta/recipes-bsp/uboot/files/fix-arm920t-eabi.patch
@@ -0,0 +1,22 @@
1---
2 cpu/arm920t/config.mk | 4 ++--
3 1 file changed, 2 insertions(+), 2 deletions(-)
4
5--- u-boot-1.3.2.orig/cpu/arm920t/config.mk
6+++ u-boot-1.3.2/cpu/arm920t/config.mk
7@@ -22,13 +22,13 @@
8 #
9
10 PLATFORM_RELFLAGS += -fno-strict-aliasing -fno-common -ffixed-r8 \
11 -msoft-float
12
13-PLATFORM_CPPFLAGS += -march=armv4
14+#PLATFORM_CPPFLAGS += -march=armv4
15 # =========================================================================
16 #
17 # Supply options according to compiler version
18 #
19 # =========================================================================
20-PLATFORM_CPPFLAGS +=$(call cc-option,-mapcs-32,-mabi=apcs-gnu)
21+PLATFORM_CPPFLAGS +=$(call cc-option)
22 PLATFORM_RELFLAGS +=$(call cc-option,-mshort-load-bytes,$(call cc-option,-malignment-traps,))
diff --git a/meta/recipes-bsp/uboot/u-boot-mkimage-native_1.3.2.bb b/meta/recipes-bsp/uboot/u-boot-mkimage-native_1.3.2.bb
new file mode 100644
index 0000000000..fcba0d5662
--- /dev/null
+++ b/meta/recipes-bsp/uboot/u-boot-mkimage-native_1.3.2.bb
@@ -0,0 +1,23 @@
1DESCRIPTION = "U-boot bootloader mkimage tool"
2LICENSE = "GPL"
3SECTION = "bootloader"
4
5SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2 \
6 file://fix-arm920t-eabi.patch;patch=1"
7
8S = "${WORKDIR}/u-boot-${PV}"
9
10inherit native
11
12EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
13
14do_compile () {
15 oe_runmake smdk2410_config
16 oe_runmake tools
17}
18
19do_install () {
20 install -d ${D}${bindir}/
21 install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
22 ln -sf uboot-mkimage ${D}${bindir}/mkimage
23}
diff --git a/meta/recipes-bsp/uboot/u-boot-mkimage_2009.08.bb b/meta/recipes-bsp/uboot/u-boot-mkimage_2009.08.bb
new file mode 100644
index 0000000000..bf07198beb
--- /dev/null
+++ b/meta/recipes-bsp/uboot/u-boot-mkimage_2009.08.bb
@@ -0,0 +1,25 @@
1DESCRIPTION = "U-boot bootloader mkimage tool"
2LICENSE = "GPL"
3SECTION = "bootloader"
4
5PR = "r1"
6
7SRC_URI = "ftp://ftp.denx.de/pub/u-boot/u-boot-${PV}.tar.bz2"
8
9S = "${WORKDIR}/u-boot-${PV}"
10
11EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
12
13BBCLASSEXTEND = "native nativesdk"
14
15do_compile () {
16 oe_runmake smdk2410_config
17 oe_runmake tools
18}
19
20do_install () {
21 install -d ${D}${bindir}
22 install -m 0755 tools/mkimage ${D}${bindir}/uboot-mkimage
23 ln -sf uboot-mkimage ${D}${bindir}/mkimage
24}
25
diff --git a/meta/recipes-bsp/uboot/u-boot-omap3-git/beagleboard/name.patch b/meta/recipes-bsp/uboot/u-boot-omap3-git/beagleboard/name.patch
new file mode 100644
index 0000000000..ac03e47774
--- /dev/null
+++ b/meta/recipes-bsp/uboot/u-boot-omap3-git/beagleboard/name.patch
@@ -0,0 +1,14 @@
1--- git/Makefile.orig 2008-07-25 16:21:22.000000000 -0700
2+++ git/Makefile 2008-07-27 06:49:08.000000000 -0700
3@@ -2582,8 +2582,8 @@ SMN42_config : unconfig
4 #########################################################################
5 ## ARM CORTEX Systems
6 #########################################################################
7-omap3530beagle_config : unconfig
8- @$(MKCONFIG) $(@:_config=) arm omap3 omap3530beagle
9+beagleboard_config : unconfig
10+ @$(MKCONFIG) omap3530beagle arm omap3 omap3530beagle
11
12 overo_config : unconfig
13 @$(MKCONFIG) $(@:_config=) arm omap3 overo
14
diff --git a/meta/recipes-bsp/uboot/u-boot-omap3_git.bb b/meta/recipes-bsp/uboot/u-boot-omap3_git.bb
new file mode 100644
index 0000000000..480780ebfc
--- /dev/null
+++ b/meta/recipes-bsp/uboot/u-boot-omap3_git.bb
@@ -0,0 +1,20 @@
1require u-boot.inc
2
3FILESDIR = "${@os.path.dirname(bb.data.getVar('FILE',d,1))}/u-boot-omap3-git/${MACHINE}"
4
5SRCREV = "f40f6db278f602b55820693634a7256b0b4e4b80"
6
7PV = "2008.10-rc2+${PR}+git${SRCREV}"
8PR="r2"
9
10SRC_URI = "git://gitorious.org/u-boot-omap3/mainline.git;branch=master;protocol=git"
11
12UBOOT_MACHINE_beagleboard = "omap3_beagle_config"
13UBOOT_MACHINE_omap3evm = "omap3_evm_config"
14UBOOT_MACHINE_overo = "omap3_overo_config"
15
16S = "${WORKDIR}/git"
17
18PACKAGE_ARCH = "${MACHINE_ARCH}"
19
20COMPATIBLE_MACHINE = "(beagleboard|omap3evm|overo)"
diff --git a/meta/recipes-bsp/uboot/u-boot.inc b/meta/recipes-bsp/uboot/u-boot.inc
new file mode 100644
index 0000000000..889f6215ed
--- /dev/null
+++ b/meta/recipes-bsp/uboot/u-boot.inc
@@ -0,0 +1,38 @@
1DESCRIPTION = "U-boot bootloader"
2HOMEPAGE = "http://u-boot.sf.net"
3SECTION = "bootloaders"
4PRIORITY = "optional"
5LICENSE = "GPL"
6PROVIDES = "virtual/bootloader"
7
8inherit deploy
9
10PARALLEL_MAKE=""
11
12EXTRA_OEMAKE = "CROSS_COMPILE=${TARGET_PREFIX}"
13
14UBOOT_MACHINE ?= "${MACHINE}_config"
15UBOOT_IMAGE ?= "u-boot-${MACHINE}-${PV}-${PR}.bin"
16UBOOT_SYMLINK ?= "u-boot-${MACHINE}.bin"
17
18do_compile () {
19 unset LDFLAGS
20 unset CFLAGS
21 unset CPPFLAGS
22 oe_runmake ${UBOOT_MACHINE}
23 oe_runmake all
24}
25
26do_deploy () {
27 install ${S}/u-boot.bin ${DEPLOYDIR}/${UBOOT_IMAGE}
28
29 cd ${DEPLOYDIR}
30 rm -f ${UBOOT_SYMLINK}
31 ln -sf ${UBOOT_IMAGE} ${UBOOT_SYMLINK}
32}
33addtask deploy before do_build after do_compile
34
35do_install() {
36 install -d ${D}${bindir}
37 install -m 755 tools/mkimage ${D}${bindir}/
38}
diff --git a/meta/recipes-bsp/usbinit/usbinit.bb b/meta/recipes-bsp/usbinit/usbinit.bb
new file mode 100644
index 0000000000..1d4575bddb
--- /dev/null
+++ b/meta/recipes-bsp/usbinit/usbinit.bb
@@ -0,0 +1,18 @@
1DESCRIPTION = "Initscript to manage gadget Ethernet"
2LICENSE = "GPL"
3PRIORITY = "optional"
4PR = "r1"
5
6SRC_URI = "file://usb-gether"
7S = "${WORKDIR}"
8
9do_install() {
10 install -d ${D}/etc
11 install -d ${D}/etc/init.d
12 install usb-gether ${D}/etc/init.d
13}
14
15inherit update-rc.d
16
17INITSCRIPT_NAME = "usb-gether"
18INITSCRIPT_PARAMS = "start 99 5 2 . stop 20 0 1 6 ."
diff --git a/meta/recipes-bsp/usbinit/usbinit/usb-gether b/meta/recipes-bsp/usbinit/usbinit/usb-gether
new file mode 100755
index 0000000000..e80a0bb30e
--- /dev/null
+++ b/meta/recipes-bsp/usbinit/usbinit/usb-gether
@@ -0,0 +1,23 @@
1#! /bin/sh
2#
3# usb-ether Start up the gadget usb ethernet interface.
4#
5
6case "$1" in
7 start|"")
8 test "$VERBOSE" != no && echo "Initializing g_ether gadget..."
9 modprobe g_ether
10 ifup usb0
11 ;;
12 stop)
13 test "$VERBOSE" != no && echo "Disabling g_ether..."
14 ifdown usb0
15 rmmod g_ether
16 ;;
17 *)
18 echo "Usage: usb-ether {start|stop}" >&2
19 exit 1
20 ;;
21esac
22
23exit 0
diff --git a/meta/recipes-bsp/usbutils/usbutils_0.86.bb b/meta/recipes-bsp/usbutils/usbutils_0.86.bb
new file mode 100644
index 0000000000..8e4a3da453
--- /dev/null
+++ b/meta/recipes-bsp/usbutils/usbutils_0.86.bb
@@ -0,0 +1,24 @@
1DESCRIPTION = "Host side USB console utilities."
2HOMEPAGE = "http://www.linux-usb.org"
3SECTION = "base"
4PRIORITY = "optional"
5
6LICENSE = "GPLv2+"
7LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
8
9DEPENDS = "libusb zlib"
10RDEPENDS_${PN} = "${PN}-ids"
11PR = "r0"
12
13SRC_URI = "${SOURCEFORGE_MIRROR}/linux-usb/usbutils-${PV}.tar.gz"
14
15inherit autotools
16
17do_install_append() {
18 ln -s ../sbin/lsusb ${D}${bindir}/lsusb
19}
20
21PACKAGES += "${PN}-ids"
22
23FILES_${PN} += "${datadir}/pkgconfig"
24FILES_${PN}-ids = "${datadir}/usb*"