Oops, add the new files too
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
Этот коммит содержится в:
родитель
819d46ac71
Коммит
cc0da8ab53
298
intl/Makefile
Обычный файл
298
intl/Makefile
Обычный файл
@ -0,0 +1,298 @@
|
|||||||
|
# Generated automatically from Makefile.in by configure.
|
||||||
|
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
||||||
|
# Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
PACKAGE = nano
|
||||||
|
VERSION = 1.1-cvs
|
||||||
|
|
||||||
|
SHELL = /bin/sh
|
||||||
|
|
||||||
|
srcdir = .
|
||||||
|
top_srcdir = ..
|
||||||
|
top_builddir = ..
|
||||||
|
|
||||||
|
prefix = /usr/local
|
||||||
|
exec_prefix = ${prefix}
|
||||||
|
transform = s,x,x,
|
||||||
|
libdir = $(exec_prefix)/lib
|
||||||
|
includedir = $(prefix)/include
|
||||||
|
datadir = $(prefix)/share
|
||||||
|
localedir = $(datadir)/locale
|
||||||
|
gettextsrcdir = ${prefix}/share/gettext/intl
|
||||||
|
aliaspath = $(localedir)
|
||||||
|
subdir = intl
|
||||||
|
|
||||||
|
INSTALL = /usr/bin/install -c
|
||||||
|
INSTALL_DATA = ${INSTALL} -m 644
|
||||||
|
MKINSTALLDIRS = ./mkinstalldirs
|
||||||
|
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||||
|
|
||||||
|
l =
|
||||||
|
|
||||||
|
AR = ar
|
||||||
|
CC = gcc
|
||||||
|
LIBTOOL = @LIBTOOL@
|
||||||
|
RANLIB = ranlib
|
||||||
|
YACC = bison -y -d
|
||||||
|
YFLAGS = --name-prefix=__gettext
|
||||||
|
|
||||||
|
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
||||||
|
-DLIBDIR=\"$(libdir)\" -DHAVE_CONFIG_H
|
||||||
|
CPPFLAGS =
|
||||||
|
CFLAGS = -g -O2 -Wall
|
||||||
|
LDFLAGS =
|
||||||
|
|
||||||
|
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||||
|
|
||||||
|
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
|
||||||
|
COMHDRS = gettext.h gettextP.h hash-string.h
|
||||||
|
SOURCES = $(COMSRCS) intl-compat.c
|
||||||
|
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
|
||||||
|
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.c \
|
||||||
|
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
|
||||||
|
localcharset.c
|
||||||
|
OBJECTS = bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
|
||||||
|
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
||||||
|
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
|
||||||
|
plural.$lo localcharset.$lo
|
||||||
|
GETTOBJS = intl-compat.$lo
|
||||||
|
DISTFILES.common = Makefile.in \
|
||||||
|
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
||||||
|
DISTFILES.generated = plural.c
|
||||||
|
DISTFILES.normal = VERSION
|
||||||
|
DISTFILES.gettext = libintl.glibc
|
||||||
|
DISTFILES.obsolete = xopen-msg.sed linux-msg.sed po2tbl.sed.in cat-compat.c
|
||||||
|
|
||||||
|
# Libtool's library version information for libintl.
|
||||||
|
# Before making a gettext release, the gettext maintainer must change this
|
||||||
|
# according to the libtool documentation, section "Library interface versions".
|
||||||
|
# Maintainers of other packages that include the intl directory must *not*
|
||||||
|
# change these values.
|
||||||
|
LTV_CURRENT=1
|
||||||
|
LTV_REVISION=0
|
||||||
|
LTV_AGE=0
|
||||||
|
|
||||||
|
.SUFFIXES:
|
||||||
|
.SUFFIXES: .c .y .o .lo .sin .sed
|
||||||
|
.c.o:
|
||||||
|
$(COMPILE) $<
|
||||||
|
.c.lo:
|
||||||
|
$(LIBTOOL) --mode=compile $(COMPILE) $<
|
||||||
|
|
||||||
|
.y.c:
|
||||||
|
$(YACC) $(YFLAGS) --output $@ $<
|
||||||
|
rm -f $*.h
|
||||||
|
|
||||||
|
.sin.sed:
|
||||||
|
sed -e '/^#/d' -e 's/@''PACKAGE''@/nano/g' $< > t-$@
|
||||||
|
mv t-$@ $@
|
||||||
|
|
||||||
|
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
|
||||||
|
|
||||||
|
all: all-no
|
||||||
|
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
|
||||||
|
all-no: all-no-no
|
||||||
|
all-no-yes: libgnuintl.$la
|
||||||
|
all-no-no:
|
||||||
|
|
||||||
|
libintl.a libgnuintl.a: $(OBJECTS)
|
||||||
|
rm -f $@
|
||||||
|
$(AR) cru $@ $(OBJECTS)
|
||||||
|
$(RANLIB) $@
|
||||||
|
|
||||||
|
libintl.la libgnuintl.la: $(OBJECTS)
|
||||||
|
$(LIBTOOL) --mode=link \
|
||||||
|
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
|
||||||
|
$(OBJECTS) \
|
||||||
|
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
|
||||||
|
-rpath $(libdir) \
|
||||||
|
-no-undefined
|
||||||
|
|
||||||
|
libintl.h: libgnuintl.h
|
||||||
|
cp $(srcdir)/libgnuintl.h libintl.h
|
||||||
|
|
||||||
|
charset.alias: config.charset
|
||||||
|
$(SHELL) $(srcdir)/config.charset '' > t-$@
|
||||||
|
mv t-$@ $@
|
||||||
|
|
||||||
|
check: all
|
||||||
|
|
||||||
|
# This installation goal is only used in GNU gettext. Packages which
|
||||||
|
# only use the library should use install instead.
|
||||||
|
|
||||||
|
# We must not install the libintl.h/libintl.a files if we are on a
|
||||||
|
# system which has the GNU gettext() function in its C library or in a
|
||||||
|
# separate library.
|
||||||
|
# If you want to use the one which comes with this version of the
|
||||||
|
# package, you have to use `configure --with-included-gettext'.
|
||||||
|
install: install-exec install-data
|
||||||
|
install-exec: all
|
||||||
|
if test "$(PACKAGE)" = "gettext" \
|
||||||
|
&& test '' = '$(GETTOBJS)'; then \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
|
||||||
|
$(INSTALL_DATA) libintl.h $(DESTDIR)$(includedir)/libintl.h; \
|
||||||
|
$(LIBTOOL) --mode=install \
|
||||||
|
$(INSTALL_DATA) libintl.$la $(DESTDIR)$(libdir)/libintl.$la; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
if test 'no' = yes; then \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(libdir); \
|
||||||
|
test -f $(DESTDIR)$(libdir)/charset.alias \
|
||||||
|
&& orig=$(DESTDIR)$(libdir)/charset.alias \
|
||||||
|
|| orig=charset.alias; \
|
||||||
|
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
||||||
|
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
||||||
|
sed -f ref-add.sed $$orig > $$temp; \
|
||||||
|
$(INSTALL_DATA) $$temp $$dest; \
|
||||||
|
rm -f $$temp; \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
||||||
|
test -f $(DESTDIR)$(localedir)/locale.alias \
|
||||||
|
&& orig=$(DESTDIR)$(localedir)/locale.alias \
|
||||||
|
|| orig=$(srcdir)/locale.alias; \
|
||||||
|
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
||||||
|
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
||||||
|
sed -f ref-add.sed $$orig > $$temp; \
|
||||||
|
$(INSTALL_DATA) $$temp $$dest; \
|
||||||
|
rm -f $$temp; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
install-data: all
|
||||||
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
|
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||||
|
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
||||||
|
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
||||||
|
dists="$(DISTFILES.common)"; \
|
||||||
|
for file in $$dists; do \
|
||||||
|
$(INSTALL_DATA) $(srcdir)/$$file \
|
||||||
|
$(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
|
done; \
|
||||||
|
chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
|
||||||
|
dists="$(DISTFILES.obsolete)"; \
|
||||||
|
for file in $$dists; do \
|
||||||
|
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
|
done; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Define this as empty until I found a useful application.
|
||||||
|
installcheck:
|
||||||
|
|
||||||
|
uninstall:
|
||||||
|
if test "$(PACKAGE)" = "gettext" \
|
||||||
|
&& test '' = '$(GETTOBJS)'; then \
|
||||||
|
rm -f $(DESTDIR)$(includedir)/libintl.h; \
|
||||||
|
$(LIBTOOL) --mode=uninstall \
|
||||||
|
rm -f $(DESTDIR)$(libdir)/libintl.$la; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
if test 'no' = yes; then \
|
||||||
|
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
|
||||||
|
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
|
||||||
|
dest=$(DESTDIR)$(libdir)/charset.alias; \
|
||||||
|
sed -f ref-del.sed $$dest > $$temp; \
|
||||||
|
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
||||||
|
rm -f $$dest; \
|
||||||
|
else \
|
||||||
|
$(INSTALL_DATA) $$temp $$dest; \
|
||||||
|
fi; \
|
||||||
|
rm -f $$temp; \
|
||||||
|
fi; \
|
||||||
|
if test -f $(DESTDIR)$(localedir)/locale.alias; then \
|
||||||
|
temp=$(DESTDIR)$(localedir)/t-locale.alias; \
|
||||||
|
dest=$(DESTDIR)$(localedir)/locale.alias; \
|
||||||
|
sed -f ref-del.sed $$dest > $$temp; \
|
||||||
|
if grep '^# Packages using this file: $$' $$temp > /dev/null; then \
|
||||||
|
rm -f $$dest; \
|
||||||
|
else \
|
||||||
|
$(INSTALL_DATA) $$temp $$dest; \
|
||||||
|
fi; \
|
||||||
|
rm -f $$temp; \
|
||||||
|
fi; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
|
for file in VERSION ChangeLog $(DISTFILES.common); do \
|
||||||
|
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
|
done; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
info dvi:
|
||||||
|
|
||||||
|
$(OBJECTS): ../config.h libgnuintl.h
|
||||||
|
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
||||||
|
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
||||||
|
|
||||||
|
tags: TAGS
|
||||||
|
|
||||||
|
TAGS: $(HEADERS) $(SOURCES)
|
||||||
|
here=`pwd`; cd $(srcdir) && etags -o $$here/TAGS $(HEADERS) $(SOURCES)
|
||||||
|
|
||||||
|
id: ID
|
||||||
|
|
||||||
|
ID: $(HEADERS) $(SOURCES)
|
||||||
|
here=`pwd`; cd $(srcdir) && mkid -f$$here/ID $(HEADERS) $(SOURCES)
|
||||||
|
|
||||||
|
|
||||||
|
mostlyclean:
|
||||||
|
rm -f *.a *.la *.o *.lo core core.*
|
||||||
|
rm -f libintl.h charset.alias ref-add.sed ref-del.sed
|
||||||
|
rm -f -r .libs _libs
|
||||||
|
|
||||||
|
clean: mostlyclean
|
||||||
|
|
||||||
|
distclean: clean
|
||||||
|
rm -f Makefile ID TAGS
|
||||||
|
if test "$(PACKAGE)" = gettext; then \
|
||||||
|
rm -f ChangeLog.inst $(DISTFILES.normal); \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
|
||||||
|
maintainer-clean: distclean
|
||||||
|
@echo "This command is intended for maintainers to use;"
|
||||||
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
|
|
||||||
|
|
||||||
|
# GNU gettext needs not contain the file `VERSION' but contains some
|
||||||
|
# other files which should not be distributed in other packages.
|
||||||
|
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
|
dist distdir: Makefile
|
||||||
|
if test "$(PACKAGE)" = gettext; then \
|
||||||
|
additional="$(DISTFILES.gettext)"; \
|
||||||
|
else \
|
||||||
|
additional="$(DISTFILES.normal)"; \
|
||||||
|
fi; \
|
||||||
|
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
||||||
|
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
||||||
|
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
||||||
|
|| cp -p $(srcdir)/$$file $(distdir); \
|
||||||
|
done
|
||||||
|
|
||||||
|
Makefile: Makefile.in ../config.status
|
||||||
|
cd .. \
|
||||||
|
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
|
# Tell versions [3.59,3.63) of GNU make not to export all variables.
|
||||||
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
|
.NOEXPORT:
|
438
intl/config.charset
Исполняемый файл
438
intl/config.charset
Исполняемый файл
@ -0,0 +1,438 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Output a system dependent table of character encoding aliases.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# The table consists of lines of the form
|
||||||
|
# ALIAS CANONICAL
|
||||||
|
#
|
||||||
|
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
||||||
|
# ALIAS is compared in a case sensitive way.
|
||||||
|
#
|
||||||
|
# CANONICAL is the GNU canonical name for this character encoding.
|
||||||
|
# It must be an encoding supported by libiconv. Support by GNU libc is
|
||||||
|
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
||||||
|
# MIME charset name is preferred.
|
||||||
|
# The current list of GNU canonical charset names is as follows.
|
||||||
|
#
|
||||||
|
# name used by which systems a MIME name?
|
||||||
|
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
||||||
|
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-3 glibc yes
|
||||||
|
# ISO-8859-4 osf solaris freebsd yes
|
||||||
|
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-6 glibc aix hpux solaris yes
|
||||||
|
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||||
|
# ISO-8859-8 glibc aix hpux osf solaris yes
|
||||||
|
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||||
|
# ISO-8859-13 glibc
|
||||||
|
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||||
|
# KOI8-R glibc solaris freebsd yes
|
||||||
|
# KOI8-U glibc freebsd yes
|
||||||
|
# CP437 dos
|
||||||
|
# CP775 dos
|
||||||
|
# CP850 aix osf dos
|
||||||
|
# CP852 dos
|
||||||
|
# CP855 dos
|
||||||
|
# CP856 aix
|
||||||
|
# CP857 dos
|
||||||
|
# CP861 dos
|
||||||
|
# CP862 dos
|
||||||
|
# CP864 dos
|
||||||
|
# CP865 dos
|
||||||
|
# CP866 freebsd dos
|
||||||
|
# CP869 dos
|
||||||
|
# CP874 win32 dos
|
||||||
|
# CP922 aix
|
||||||
|
# CP932 aix win32 dos
|
||||||
|
# CP943 aix
|
||||||
|
# CP949 osf win32 dos
|
||||||
|
# CP950 win32 dos
|
||||||
|
# CP1046 aix
|
||||||
|
# CP1124 aix
|
||||||
|
# CP1129 aix
|
||||||
|
# CP1250 win32
|
||||||
|
# CP1251 glibc win32
|
||||||
|
# CP1252 aix win32
|
||||||
|
# CP1253 win32
|
||||||
|
# CP1254 win32
|
||||||
|
# CP1255 win32
|
||||||
|
# CP1256 win32
|
||||||
|
# CP1257 win32
|
||||||
|
# GB2312 glibc aix hpux irix solaris freebsd yes
|
||||||
|
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# EUC-TW glibc aix hpux irix osf solaris
|
||||||
|
# BIG5 glibc aix hpux osf solaris freebsd yes
|
||||||
|
# BIG5HKSCS glibc
|
||||||
|
# GBK aix osf win32 dos
|
||||||
|
# GB18030 glibc
|
||||||
|
# SJIS hpux osf solaris freebsd
|
||||||
|
# JOHAB glibc win32
|
||||||
|
# TIS-620 glibc aix hpux osf solaris
|
||||||
|
# VISCII glibc yes
|
||||||
|
# HP-ROMAN8 hpux
|
||||||
|
# HP-ARABIC8 hpux
|
||||||
|
# HP-GREEK8 hpux
|
||||||
|
# HP-HEBREW8 hpux
|
||||||
|
# HP-TURKISH8 hpux
|
||||||
|
# HP-KANA8 hpux
|
||||||
|
# DEC-KANJI osf
|
||||||
|
# DEC-HANYU osf
|
||||||
|
# UTF-8 glibc aix hpux osf solaris yes
|
||||||
|
#
|
||||||
|
# Note: Names which are not marked as being a MIME name should not be used in
|
||||||
|
# Internet protocols for information interchange (mail, news, etc.).
|
||||||
|
#
|
||||||
|
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
||||||
|
# must understand both names and treat them as equivalent.
|
||||||
|
#
|
||||||
|
# The first argument passed to this file is the canonical host specification,
|
||||||
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||||
|
# or
|
||||||
|
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||||
|
|
||||||
|
host="$1"
|
||||||
|
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
||||||
|
echo "# This file contains a table of character encoding aliases,"
|
||||||
|
echo "# suitable for operating system '${os}'."
|
||||||
|
echo "# It was automatically generated from config.charset."
|
||||||
|
# List of references, updated during installation:
|
||||||
|
echo "# Packages using this file: "
|
||||||
|
case "$os" in
|
||||||
|
linux* | *-gnu*)
|
||||||
|
# With glibc-2.1 or newer, we don't need any canonicalization,
|
||||||
|
# because glibc has iconv and both glibc and libiconv support all
|
||||||
|
# GNU canonical names directly. Therefore, the Makefile does not
|
||||||
|
# need to install the alias file at all.
|
||||||
|
# The following applies only to glibc-2.0.x and older libcs.
|
||||||
|
echo "ISO_646.IRV:1983 ASCII"
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-6 ISO-8859-6"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "IBM-850 CP850"
|
||||||
|
echo "IBM-856 CP856"
|
||||||
|
echo "IBM-921 ISO-8859-13"
|
||||||
|
echo "IBM-922 CP922"
|
||||||
|
echo "IBM-932 CP932"
|
||||||
|
echo "IBM-943 CP943"
|
||||||
|
echo "IBM-1046 CP1046"
|
||||||
|
echo "IBM-1124 CP1124"
|
||||||
|
echo "IBM-1129 CP1129"
|
||||||
|
echo "IBM-1252 CP1252"
|
||||||
|
echo "IBM-eucCN GB2312"
|
||||||
|
echo "IBM-eucJP EUC-JP"
|
||||||
|
echo "IBM-eucKR EUC-KR"
|
||||||
|
echo "IBM-eucTW EUC-TW"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "TIS-620 TIS-620"
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
hpux*)
|
||||||
|
echo "iso88591 ISO-8859-1"
|
||||||
|
echo "iso88592 ISO-8859-2"
|
||||||
|
echo "iso88595 ISO-8859-5"
|
||||||
|
echo "iso88596 ISO-8859-6"
|
||||||
|
echo "iso88597 ISO-8859-7"
|
||||||
|
echo "iso88598 ISO-8859-8"
|
||||||
|
echo "iso88599 ISO-8859-9"
|
||||||
|
echo "iso885915 ISO-8859-15"
|
||||||
|
echo "roman8 HP-ROMAN8"
|
||||||
|
echo "arabic8 HP-ARABIC8"
|
||||||
|
echo "greek8 HP-GREEK8"
|
||||||
|
echo "hebrew8 HP-HEBREW8"
|
||||||
|
echo "turkish8 HP-TURKISH8"
|
||||||
|
echo "kana8 HP-KANA8"
|
||||||
|
echo "tis620 TIS-620"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
echo "hp15CN GB2312"
|
||||||
|
#echo "ccdc ?" # what is this?
|
||||||
|
echo "SJIS SJIS"
|
||||||
|
echo "utf8 UTF-8"
|
||||||
|
;;
|
||||||
|
irix*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "eucCN GB2312"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
;;
|
||||||
|
osf*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "cp850 CP850"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "dechanyu DEC-HANYU"
|
||||||
|
echo "dechanzi GB2312"
|
||||||
|
echo "deckanji DEC-KANJI"
|
||||||
|
echo "deckorean EUC-KR"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "KSC5601 CP949"
|
||||||
|
echo "sdeckanji EUC-JP"
|
||||||
|
echo "SJIS SJIS"
|
||||||
|
echo "TACTIS TIS-620"
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
echo "646 ASCII"
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-6 ISO-8859-6"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "koi8-r KOI8-R"
|
||||||
|
echo "BIG5 BIG5"
|
||||||
|
echo "gb2312 GB2312"
|
||||||
|
echo "cns11643 EUC-TW"
|
||||||
|
echo "5601 EUC-KR"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "PCK SJIS"
|
||||||
|
echo "TIS620.2533 TIS-620"
|
||||||
|
#echo "sun_eu_greek ?" # what is this?
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "C ASCII"
|
||||||
|
echo "US-ASCII ASCII"
|
||||||
|
for l in la_LN lt_LN; do
|
||||||
|
echo "$l.ASCII ASCII"
|
||||||
|
done
|
||||||
|
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||||
|
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||||
|
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||||
|
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||||
|
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||||
|
done
|
||||||
|
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
||||||
|
echo "$l.ISO_8859-2 ISO-8859-2"
|
||||||
|
done
|
||||||
|
for l in la_LN lt_LT; do
|
||||||
|
echo "$l.ISO_8859-4 ISO-8859-4"
|
||||||
|
done
|
||||||
|
for l in ru_RU ru_SU; do
|
||||||
|
echo "$l.KOI8-R KOI8-R"
|
||||||
|
echo "$l.ISO_8859-5 ISO-8859-5"
|
||||||
|
echo "$l.CP866 CP866"
|
||||||
|
done
|
||||||
|
echo "uk_UA.KOI8-U KOI8-U"
|
||||||
|
echo "zh_TW.BIG5 BIG5"
|
||||||
|
echo "zh_TW.Big5 BIG5"
|
||||||
|
echo "zh_CN.EUC GB2312"
|
||||||
|
echo "ja_JP.EUC EUC-JP"
|
||||||
|
echo "ja_JP.SJIS SJIS"
|
||||||
|
echo "ja_JP.Shift_JIS SJIS"
|
||||||
|
echo "ko_KR.EUC EUC-KR"
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||||
|
echo "* UTF-8"
|
||||||
|
;;
|
||||||
|
msdosdjgpp*)
|
||||||
|
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "#"
|
||||||
|
echo "# The encodings given here may not all be correct."
|
||||||
|
echo "# If you find that the encoding given for your language and"
|
||||||
|
echo "# country is not the one your DOS machine actually uses, just"
|
||||||
|
echo "# correct it in this file, and send a mail to"
|
||||||
|
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||||
|
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
||||||
|
echo "#"
|
||||||
|
echo "C ASCII"
|
||||||
|
# ISO-8859-1 languages
|
||||||
|
echo "ca CP850"
|
||||||
|
echo "ca_ES CP850"
|
||||||
|
echo "da CP865" # not CP850 ??
|
||||||
|
echo "da_DK CP865" # not CP850 ??
|
||||||
|
echo "de CP850"
|
||||||
|
echo "de_AT CP850"
|
||||||
|
echo "de_CH CP850"
|
||||||
|
echo "de_DE CP850"
|
||||||
|
echo "en CP850"
|
||||||
|
echo "en_AU CP850" # not CP437 ??
|
||||||
|
echo "en_CA CP850"
|
||||||
|
echo "en_GB CP850"
|
||||||
|
echo "en_NZ CP437"
|
||||||
|
echo "en_US CP437"
|
||||||
|
echo "en_ZA CP850" # not CP437 ??
|
||||||
|
echo "es CP850"
|
||||||
|
echo "es_AR CP850"
|
||||||
|
echo "es_BO CP850"
|
||||||
|
echo "es_CL CP850"
|
||||||
|
echo "es_CO CP850"
|
||||||
|
echo "es_CR CP850"
|
||||||
|
echo "es_CU CP850"
|
||||||
|
echo "es_DO CP850"
|
||||||
|
echo "es_EC CP850"
|
||||||
|
echo "es_ES CP850"
|
||||||
|
echo "es_GT CP850"
|
||||||
|
echo "es_HN CP850"
|
||||||
|
echo "es_MX CP850"
|
||||||
|
echo "es_NI CP850"
|
||||||
|
echo "es_PA CP850"
|
||||||
|
echo "es_PY CP850"
|
||||||
|
echo "es_PE CP850"
|
||||||
|
echo "es_SV CP850"
|
||||||
|
echo "es_UY CP850"
|
||||||
|
echo "es_VE CP850"
|
||||||
|
echo "et CP850"
|
||||||
|
echo "et_EE CP850"
|
||||||
|
echo "eu CP850"
|
||||||
|
echo "eu_ES CP850"
|
||||||
|
echo "fi CP850"
|
||||||
|
echo "fi_FI CP850"
|
||||||
|
echo "fr CP850"
|
||||||
|
echo "fr_BE CP850"
|
||||||
|
echo "fr_CA CP850"
|
||||||
|
echo "fr_CH CP850"
|
||||||
|
echo "fr_FR CP850"
|
||||||
|
echo "ga CP850"
|
||||||
|
echo "ga_IE CP850"
|
||||||
|
echo "gd CP850"
|
||||||
|
echo "gd_GB CP850"
|
||||||
|
echo "gl CP850"
|
||||||
|
echo "gl_ES CP850"
|
||||||
|
echo "id CP850" # not CP437 ??
|
||||||
|
echo "id_ID CP850" # not CP437 ??
|
||||||
|
echo "is CP861" # not CP850 ??
|
||||||
|
echo "is_IS CP861" # not CP850 ??
|
||||||
|
echo "it CP850"
|
||||||
|
echo "it_CH CP850"
|
||||||
|
echo "it_IT CP850"
|
||||||
|
echo "lt CP775"
|
||||||
|
echo "lt_LT CP775"
|
||||||
|
echo "lv CP775"
|
||||||
|
echo "lv_LV CP775"
|
||||||
|
echo "nb CP865" # not CP850 ??
|
||||||
|
echo "nb_NO CP865" # not CP850 ??
|
||||||
|
echo "nl CP850"
|
||||||
|
echo "nl_BE CP850"
|
||||||
|
echo "nl_NL CP850"
|
||||||
|
echo "nn CP865" # not CP850 ??
|
||||||
|
echo "nn_NO CP865" # not CP850 ??
|
||||||
|
echo "no CP865" # not CP850 ??
|
||||||
|
echo "no_NO CP865" # not CP850 ??
|
||||||
|
echo "pt CP850"
|
||||||
|
echo "pt_BR CP850"
|
||||||
|
echo "pt_PT CP850"
|
||||||
|
echo "sv CP850"
|
||||||
|
echo "sv_SE CP850"
|
||||||
|
# ISO-8859-2 languages
|
||||||
|
echo "cs CP852"
|
||||||
|
echo "cs_CZ CP852"
|
||||||
|
echo "hr CP852"
|
||||||
|
echo "hr_HR CP852"
|
||||||
|
echo "hu CP852"
|
||||||
|
echo "hu_HU CP852"
|
||||||
|
echo "pl CP852"
|
||||||
|
echo "pl_PL CP852"
|
||||||
|
echo "ro CP852"
|
||||||
|
echo "ro_RO CP852"
|
||||||
|
echo "sk CP852"
|
||||||
|
echo "sk_SK CP852"
|
||||||
|
echo "sl CP852"
|
||||||
|
echo "sl_SI CP852"
|
||||||
|
echo "sq CP852"
|
||||||
|
echo "sq_AL CP852"
|
||||||
|
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||||
|
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||||
|
# ISO-8859-3 languages
|
||||||
|
echo "mt CP850"
|
||||||
|
echo "mt_MT CP850"
|
||||||
|
# ISO-8859-5 languages
|
||||||
|
echo "be CP866"
|
||||||
|
echo "be_BE CP866"
|
||||||
|
echo "bg CP866" # not CP855 ??
|
||||||
|
echo "bg_BG CP866" # not CP855 ??
|
||||||
|
echo "mk CP866" # not CP855 ??
|
||||||
|
echo "mk_MK CP866" # not CP855 ??
|
||||||
|
echo "ru KOI8-R" # not CP866 ??
|
||||||
|
echo "ru_RU KOI8-R" # not CP866 ??
|
||||||
|
# ISO-8859-6 languages
|
||||||
|
echo "ar CP864"
|
||||||
|
echo "ar_AE CP864"
|
||||||
|
echo "ar_DZ CP864"
|
||||||
|
echo "ar_EG CP864"
|
||||||
|
echo "ar_IQ CP864"
|
||||||
|
echo "ar_IR CP864"
|
||||||
|
echo "ar_JO CP864"
|
||||||
|
echo "ar_KW CP864"
|
||||||
|
echo "ar_MA CP864"
|
||||||
|
echo "ar_OM CP864"
|
||||||
|
echo "ar_QA CP864"
|
||||||
|
echo "ar_SA CP864"
|
||||||
|
echo "ar_SY CP864"
|
||||||
|
# ISO-8859-7 languages
|
||||||
|
echo "el CP869"
|
||||||
|
echo "el_GR CP869"
|
||||||
|
# ISO-8859-8 languages
|
||||||
|
echo "he CP862"
|
||||||
|
echo "he_IL CP862"
|
||||||
|
# ISO-8859-9 languages
|
||||||
|
echo "tr CP857"
|
||||||
|
echo "tr_TR CP857"
|
||||||
|
# Japanese
|
||||||
|
echo "ja CP932"
|
||||||
|
echo "ja_JP CP932"
|
||||||
|
# Chinese
|
||||||
|
echo "zh_CN GBK"
|
||||||
|
echo "zh_TW CP950" # not CP938 ??
|
||||||
|
# Korean
|
||||||
|
echo "kr CP949" # not CP934 ??
|
||||||
|
echo "kr_KR CP949" # not CP934 ??
|
||||||
|
# Thai
|
||||||
|
echo "th CP874"
|
||||||
|
echo "th_TH CP874"
|
||||||
|
# Other
|
||||||
|
echo "eo CP850"
|
||||||
|
echo "eo_EO CP850"
|
||||||
|
;;
|
||||||
|
esac
|
1234
intl/dcigettext.c
Обычный файл
1234
intl/dcigettext.c
Обычный файл
Разница между файлами не показана из-за своего большого размера
Загрузить разницу
59
intl/dcngettext.c
Обычный файл
59
intl/dcngettext.c
Обычный файл
@ -0,0 +1,59 @@
|
|||||||
|
/* Implementation of the dcngettext(3) function.
|
||||||
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
# define DCIGETTEXT __dcigettext
|
||||||
|
#else
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
# define DCIGETTEXT dcigettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
|
locale. */
|
||||||
|
char *
|
||||||
|
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
|
||||||
|
const char *domainname;
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
int category;
|
||||||
|
{
|
||||||
|
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__dcngettext, dcngettext);
|
||||||
|
#endif
|
60
intl/dngettext.c
Обычный файл
60
intl/dngettext.c
Обычный файл
@ -0,0 +1,60 @@
|
|||||||
|
/* Implementation of the dngettext(3) function.
|
||||||
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define DNGETTEXT __dngettext
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
#else
|
||||||
|
# define DNGETTEXT dngettext__
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||||
|
LC_MESSAGES locale and skip message according to the plural form. */
|
||||||
|
char *
|
||||||
|
DNGETTEXT (domainname, msgid1, msgid2, n)
|
||||||
|
const char *domainname;
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
{
|
||||||
|
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__dngettext, dngettext);
|
||||||
|
#endif
|
127
intl/libgnuintl.h
Обычный файл
127
intl/libgnuintl.h
Обычный файл
@ -0,0 +1,127 @@
|
|||||||
|
/* Message catalogs for internationalization.
|
||||||
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _LIBINTL_H
|
||||||
|
#define _LIBINTL_H 1
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
/* The LC_MESSAGES locale category is the category used by the functions
|
||||||
|
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||||
|
On systems that don't define it, use an arbitrary value instead.
|
||||||
|
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
|
||||||
|
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
|
||||||
|
warning, don't define LC_MESSAGES in this case. */
|
||||||
|
#if !defined LC_MESSAGES && !defined __LOCALE_H
|
||||||
|
# define LC_MESSAGES 1729
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* We define an additional symbol to signal that we use the GNU
|
||||||
|
implementation of gettext. */
|
||||||
|
#define __USE_GNU_GETTEXT 1
|
||||||
|
|
||||||
|
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||||
|
precedence over _conio_gettext. */
|
||||||
|
#ifdef __DJGPP__
|
||||||
|
# undef gettext
|
||||||
|
# define gettext gettext
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PARAMS
|
||||||
|
# if __STDC__ || defined __cplusplus
|
||||||
|
# define PARAMS(args) args
|
||||||
|
# else
|
||||||
|
# define PARAMS(args) ()
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
|
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||||
|
text). */
|
||||||
|
extern char *gettext PARAMS ((const char *__msgid));
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||||
|
LC_MESSAGES locale. */
|
||||||
|
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
|
locale. */
|
||||||
|
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
||||||
|
int __category));
|
||||||
|
|
||||||
|
|
||||||
|
/* Similar to `gettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||||
|
unsigned long int __n));
|
||||||
|
|
||||||
|
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||||
|
const char *__msgid2, unsigned long int __n));
|
||||||
|
|
||||||
|
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||||
|
const char *__msgid2, unsigned long int __n,
|
||||||
|
int __category));
|
||||||
|
|
||||||
|
|
||||||
|
/* Set the current default message catalog to DOMAINNAME.
|
||||||
|
If DOMAINNAME is null, return the current default.
|
||||||
|
If DOMAINNAME is "", reset to the default of "messages". */
|
||||||
|
extern char *textdomain PARAMS ((const char *__domainname));
|
||||||
|
|
||||||
|
/* Specify that the DOMAINNAME message catalog will be found
|
||||||
|
in DIRNAME rather than in the system locale data base. */
|
||||||
|
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
||||||
|
const char *__dirname));
|
||||||
|
|
||||||
|
/* Specify the character encoding in which the messages from the
|
||||||
|
DOMAINNAME message catalog will be returned. */
|
||||||
|
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||||
|
const char *__codeset));
|
||||||
|
|
||||||
|
|
||||||
|
/* Optimized version of the functions above. */
|
||||||
|
#if defined __OPTIMIZED
|
||||||
|
/* These are macros, but could also be inline functions. */
|
||||||
|
|
||||||
|
# define gettext(msgid) \
|
||||||
|
dgettext (NULL, msgid)
|
||||||
|
|
||||||
|
# define dgettext(domainname, msgid) \
|
||||||
|
dcgettext (domainname, msgid, LC_MESSAGES)
|
||||||
|
|
||||||
|
# define ngettext(msgid1, msgid2, n) \
|
||||||
|
dngettext (NULL, msgid1, msgid2, n)
|
||||||
|
|
||||||
|
# define dngettext(domainname, msgid1, msgid2, n) \
|
||||||
|
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
|
||||||
|
|
||||||
|
#endif /* Optimizing. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* libintl.h */
|
271
intl/localcharset.c
Обычный файл
271
intl/localcharset.c
Обычный файл
@ -0,0 +1,271 @@
|
|||||||
|
/* Determine a canonical name for the current locale's character encoding.
|
||||||
|
|
||||||
|
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Library General Public License as published
|
||||||
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
|
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_STDDEF_H
|
||||||
|
# include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#if HAVE_STRING_H
|
||||||
|
# include <string.h>
|
||||||
|
#else
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
#if HAVE_STDLIB_H
|
||||||
|
# include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined _WIN32 || defined __WIN32__
|
||||||
|
# undef WIN32 /* avoid warning on mingw32 */
|
||||||
|
# define WIN32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
# if HAVE_LANGINFO_CODESET
|
||||||
|
# include <langinfo.h>
|
||||||
|
# else
|
||||||
|
# if HAVE_SETLOCALE
|
||||||
|
# include <locale.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#else /* WIN32 */
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DIRECTORY_SEPARATOR
|
||||||
|
# define DIRECTORY_SEPARATOR '/'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ISSLASH
|
||||||
|
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The following static variable is declared 'volatile' to avoid a
|
||||||
|
possible multithread problem in the function get_charset_aliases. If we
|
||||||
|
are running in a threaded environment, and if two threads initialize
|
||||||
|
'charset_aliases' simultaneously, both will produce the same value,
|
||||||
|
and everything will be ok if the two assignments to 'charset_aliases'
|
||||||
|
are atomic. But I don't know what will happen if the two assignments mix. */
|
||||||
|
#if __STDC__ != 1
|
||||||
|
# define volatile /* empty */
|
||||||
|
#endif
|
||||||
|
/* Pointer to the contents of the charset.alias file, if it has already been
|
||||||
|
read, else NULL. Its format is:
|
||||||
|
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
||||||
|
static char * volatile charset_aliases;
|
||||||
|
|
||||||
|
/* Return a pointer to the contents of the charset.alias file. */
|
||||||
|
static const char *
|
||||||
|
get_charset_aliases ()
|
||||||
|
{
|
||||||
|
char *cp;
|
||||||
|
|
||||||
|
cp = charset_aliases;
|
||||||
|
if (cp == NULL)
|
||||||
|
{
|
||||||
|
#ifndef WIN32
|
||||||
|
FILE *fp;
|
||||||
|
const char *dir = LIBDIR;
|
||||||
|
const char *base = "charset.alias";
|
||||||
|
char *file_name;
|
||||||
|
|
||||||
|
/* Concatenate dir and base into freshly allocated file_name. */
|
||||||
|
{
|
||||||
|
size_t dir_len = strlen (dir);
|
||||||
|
size_t base_len = strlen (base);
|
||||||
|
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
|
||||||
|
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
|
||||||
|
if (file_name != NULL)
|
||||||
|
{
|
||||||
|
memcpy (file_name, dir, dir_len);
|
||||||
|
if (add_slash)
|
||||||
|
file_name[dir_len] = DIRECTORY_SEPARATOR;
|
||||||
|
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
|
||||||
|
/* Out of memory or file not found, treat it as empty. */
|
||||||
|
cp = "";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Parse the file's contents. */
|
||||||
|
int c;
|
||||||
|
char buf1[50+1];
|
||||||
|
char buf2[50+1];
|
||||||
|
char *res_ptr = NULL;
|
||||||
|
size_t res_size = 0;
|
||||||
|
size_t l1, l2;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
c = getc (fp);
|
||||||
|
if (c == EOF)
|
||||||
|
break;
|
||||||
|
if (c == '\n' || c == ' ' || c == '\t')
|
||||||
|
continue;
|
||||||
|
if (c == '#')
|
||||||
|
{
|
||||||
|
/* Skip comment, to end of line. */
|
||||||
|
do
|
||||||
|
c = getc (fp);
|
||||||
|
while (!(c == EOF || c == '\n'));
|
||||||
|
if (c == EOF)
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ungetc (c, fp);
|
||||||
|
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||||
|
break;
|
||||||
|
l1 = strlen (buf1);
|
||||||
|
l2 = strlen (buf2);
|
||||||
|
if (res_size == 0)
|
||||||
|
{
|
||||||
|
res_size = l1 + 1 + l2 + 1;
|
||||||
|
res_ptr = malloc (res_size + 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res_size += l1 + 1 + l2 + 1;
|
||||||
|
res_ptr = realloc (res_ptr, res_size + 1);
|
||||||
|
}
|
||||||
|
if (res_ptr == NULL)
|
||||||
|
{
|
||||||
|
/* Out of memory. */
|
||||||
|
res_size = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
||||||
|
strcpy (res_ptr + res_size - (l2 + 1), buf2);
|
||||||
|
}
|
||||||
|
fclose (fp);
|
||||||
|
if (res_size == 0)
|
||||||
|
cp = "";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*(res_ptr + res_size) = '\0';
|
||||||
|
cp = res_ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_name != NULL)
|
||||||
|
free (file_name);
|
||||||
|
|
||||||
|
#else /* WIN32 */
|
||||||
|
|
||||||
|
/* To avoid the troubles of installing a separate file in the same
|
||||||
|
directory as the DLL and of retrieving the DLL's directory at
|
||||||
|
runtime, simply inline the aliases here. */
|
||||||
|
|
||||||
|
cp = "CP936" "\0" "GBK" "\0"
|
||||||
|
"CP1361" "\0" "JOHAB" "\0";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
charset_aliases = cp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Determine the current locale's character encoding, and canonicalize it
|
||||||
|
into one of the canonical names listed in config.charset.
|
||||||
|
The result must not be freed; it is statically allocated.
|
||||||
|
If the canonical name cannot be determined, the result is a non-canonical
|
||||||
|
name. */
|
||||||
|
|
||||||
|
#ifdef STATIC
|
||||||
|
STATIC
|
||||||
|
#endif
|
||||||
|
const char *
|
||||||
|
locale_charset ()
|
||||||
|
{
|
||||||
|
const char *codeset;
|
||||||
|
const char *aliases;
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
|
||||||
|
# if HAVE_LANGINFO_CODESET
|
||||||
|
|
||||||
|
/* Most systems support nl_langinfo (CODESET) nowadays. */
|
||||||
|
codeset = nl_langinfo (CODESET);
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* On old systems which lack it, use setlocale or getenv. */
|
||||||
|
const char *locale = NULL;
|
||||||
|
|
||||||
|
/* But most old systems don't have a complete set of locales. Some
|
||||||
|
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
||||||
|
use setlocale here; it would return "C" when it doesn't support the
|
||||||
|
locale name the user has set. */
|
||||||
|
# if HAVE_SETLOCALE && 0
|
||||||
|
locale = setlocale (LC_CTYPE, NULL);
|
||||||
|
# endif
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
{
|
||||||
|
locale = getenv ("LC_ALL");
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
{
|
||||||
|
locale = getenv ("LC_CTYPE");
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
locale = getenv ("LANG");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* On some old systems, one used to set locale = "iso8859_1". On others,
|
||||||
|
you set it to "language_COUNTRY.charset". In any case, we resolve it
|
||||||
|
through the charset.alias file. */
|
||||||
|
codeset = locale;
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else /* WIN32 */
|
||||||
|
|
||||||
|
static char buf[2 + 10 + 1];
|
||||||
|
|
||||||
|
/* Win32 has a function returning the locale's codepage as a number. */
|
||||||
|
sprintf (buf, "CP%u", GetACP ());
|
||||||
|
codeset = buf;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (codeset == NULL)
|
||||||
|
/* The canonical name cannot be determined. */
|
||||||
|
codeset = "";
|
||||||
|
|
||||||
|
/* Resolve alias. */
|
||||||
|
for (aliases = get_charset_aliases ();
|
||||||
|
*aliases != '\0';
|
||||||
|
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||||
|
if (strcmp (codeset, aliases) == 0
|
||||||
|
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
||||||
|
{
|
||||||
|
codeset = aliases + strlen (aliases) + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return codeset;
|
||||||
|
}
|
77
intl/locale.alias
Обычный файл
77
intl/locale.alias
Обычный файл
@ -0,0 +1,77 @@
|
|||||||
|
# Locale name alias data base.
|
||||||
|
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
# The format of this file is the same as for the corresponding file of
|
||||||
|
# the X Window System, which normally can be found in
|
||||||
|
# /usr/lib/X11/locale/locale.alias
|
||||||
|
# A single line contains two fields: an alias and a substitution value.
|
||||||
|
# All entries are case independent.
|
||||||
|
|
||||||
|
# Note: This file is far from being complete. If you have a value for
|
||||||
|
# your own site which you think might be useful for others too, share
|
||||||
|
# it with the rest of us. Send it using the `glibcbug' script to
|
||||||
|
# bugs@gnu.org.
|
||||||
|
|
||||||
|
# Packages using this file:
|
||||||
|
|
||||||
|
bokmal no_NO.ISO-8859-1
|
||||||
|
bokmхl no_NO.ISO-8859-1
|
||||||
|
catalan ca_ES.ISO-8859-1
|
||||||
|
croatian hr_HR.ISO-8859-2
|
||||||
|
czech cs_CZ.ISO-8859-2
|
||||||
|
danish da_DK.ISO-8859-1
|
||||||
|
dansk da_DK.ISO-8859-1
|
||||||
|
deutsch de_DE.ISO-8859-1
|
||||||
|
dutch nl_NL.ISO-8859-1
|
||||||
|
eesti et_EE.ISO-8859-1
|
||||||
|
estonian et_EE.ISO-8859-1
|
||||||
|
finnish fi_FI.ISO-8859-1
|
||||||
|
franчais fr_FR.ISO-8859-1
|
||||||
|
french fr_FR.ISO-8859-1
|
||||||
|
galego gl_ES.ISO-8859-1
|
||||||
|
galician gl_ES.ISO-8859-1
|
||||||
|
german de_DE.ISO-8859-1
|
||||||
|
greek el_GR.ISO-8859-7
|
||||||
|
hebrew iw_IL.ISO-8859-8
|
||||||
|
hrvatski hr_HR.ISO-8859-2
|
||||||
|
hungarian hu_HU.ISO-8859-2
|
||||||
|
icelandic is_IS.ISO-8859-1
|
||||||
|
italian it_IT.ISO-8859-1
|
||||||
|
japanese ja_JP.eucJP
|
||||||
|
japanese.euc ja_JP.eucJP
|
||||||
|
ja_JP ja_JP.eucJP
|
||||||
|
ja_JP.ujis ja_JP.eucJP
|
||||||
|
japanese.sjis ja_JP.SJIS
|
||||||
|
korean ko_KR.eucKR
|
||||||
|
korean.euc ko_KR.eucKR
|
||||||
|
ko_KR ko_KR.eucKR
|
||||||
|
lithuanian lt_LT.ISO-8859-13
|
||||||
|
nb_NO no_NO.ISO-8859-1
|
||||||
|
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
|
||||||
|
norwegian no_NO.ISO-8859-1
|
||||||
|
nynorsk nn_NO.ISO-8859-1
|
||||||
|
polish pl_PL.ISO-8859-2
|
||||||
|
portuguese pt_PT.ISO-8859-1
|
||||||
|
romanian ro_RO.ISO-8859-2
|
||||||
|
russian ru_RU.ISO-8859-5
|
||||||
|
slovak sk_SK.ISO-8859-2
|
||||||
|
slovene sl_SI.ISO-8859-2
|
||||||
|
slovenian sl_SI.ISO-8859-2
|
||||||
|
spanish es_ES.ISO-8859-1
|
||||||
|
swedish sv_SE.ISO-8859-1
|
||||||
|
thai th_TH.TIS-620
|
||||||
|
turkish tr_TR.ISO-8859-9
|
67
intl/ngettext.c
Обычный файл
67
intl/ngettext.c
Обычный файл
@ -0,0 +1,67 @@
|
|||||||
|
/* Implementation of ngettext(3) function.
|
||||||
|
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define __need_NULL
|
||||||
|
# include <stddef.h>
|
||||||
|
#else
|
||||||
|
# include <stdlib.h> /* Just for NULL. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define NGETTEXT __ngettext
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
#else
|
||||||
|
# define NGETTEXT ngettext__
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
|
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||||
|
text). */
|
||||||
|
char *
|
||||||
|
NGETTEXT (msgid1, msgid2, n)
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
{
|
||||||
|
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__ngettext, ngettext);
|
||||||
|
#endif
|
412
intl/plural.y
Обычный файл
412
intl/plural.y
Обычный файл
@ -0,0 +1,412 @@
|
|||||||
|
%{
|
||||||
|
/* Expression parsing for plural form selection.
|
||||||
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||||
|
declaration at the beginning of the file. The declaration in bison's
|
||||||
|
skeleton file comes too late. This must come before <config.h>
|
||||||
|
because <config.h> may include arbitrary system headers. */
|
||||||
|
#if defined _AIX && !defined __GNUC__
|
||||||
|
#pragma alloca
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "gettextP.h"
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define FREE_EXPRESSION __gettext_free_exp
|
||||||
|
#else
|
||||||
|
# define FREE_EXPRESSION gettext_free_exp__
|
||||||
|
# define __gettextparse gettextparse__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||||
|
#define YYPARSE_PARAM arg
|
||||||
|
%}
|
||||||
|
%pure_parser
|
||||||
|
%expect 10
|
||||||
|
|
||||||
|
%union {
|
||||||
|
unsigned long int num;
|
||||||
|
enum operator op;
|
||||||
|
struct expression *exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
%{
|
||||||
|
/* Prototypes for local functions. */
|
||||||
|
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
||||||
|
struct expression * const *args));
|
||||||
|
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
|
||||||
|
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
|
||||||
|
struct expression *right));
|
||||||
|
static struct expression *new_exp_2 PARAMS ((enum operator op,
|
||||||
|
struct expression *left,
|
||||||
|
struct expression *right));
|
||||||
|
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
|
||||||
|
struct expression *bexp,
|
||||||
|
struct expression *tbranch,
|
||||||
|
struct expression *fbranch));
|
||||||
|
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
|
||||||
|
static void yyerror PARAMS ((const char *str));
|
||||||
|
|
||||||
|
/* Allocation of expressions. */
|
||||||
|
|
||||||
|
static struct expression *
|
||||||
|
new_exp (nargs, op, args)
|
||||||
|
int nargs;
|
||||||
|
enum operator op;
|
||||||
|
struct expression * const *args;
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct expression *newp;
|
||||||
|
|
||||||
|
/* If any of the argument could not be malloc'ed, just return NULL. */
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
if (args[i] == NULL)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
/* Allocate a new expression. */
|
||||||
|
newp = (struct expression *) malloc (sizeof (*newp));
|
||||||
|
if (newp != NULL)
|
||||||
|
{
|
||||||
|
newp->nargs = nargs;
|
||||||
|
newp->operation = op;
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
newp->val.args[i] = args[i];
|
||||||
|
return newp;
|
||||||
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
FREE_EXPRESSION (args[i]);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_0 (op)
|
||||||
|
enum operator op;
|
||||||
|
{
|
||||||
|
return new_exp (0, op, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_1 (op, right)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *right;
|
||||||
|
{
|
||||||
|
struct expression *args[1];
|
||||||
|
|
||||||
|
args[0] = right;
|
||||||
|
return new_exp (1, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct expression *
|
||||||
|
new_exp_2 (op, left, right)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *left;
|
||||||
|
struct expression *right;
|
||||||
|
{
|
||||||
|
struct expression *args[2];
|
||||||
|
|
||||||
|
args[0] = left;
|
||||||
|
args[1] = right;
|
||||||
|
return new_exp (2, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_3 (op, bexp, tbranch, fbranch)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *bexp;
|
||||||
|
struct expression *tbranch;
|
||||||
|
struct expression *fbranch;
|
||||||
|
{
|
||||||
|
struct expression *args[3];
|
||||||
|
|
||||||
|
args[0] = bexp;
|
||||||
|
args[1] = tbranch;
|
||||||
|
args[2] = fbranch;
|
||||||
|
return new_exp (3, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
/* This declares that all operators have the same associativity and the
|
||||||
|
precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
|
||||||
|
There is no unary minus and no bitwise operators.
|
||||||
|
Operators with the same syntactic behaviour have been merged into a single
|
||||||
|
token, to save space in the array generated by bison. */
|
||||||
|
%right '?' /* ? */
|
||||||
|
%left '|' /* || */
|
||||||
|
%left '&' /* && */
|
||||||
|
%left EQUOP2 /* == != */
|
||||||
|
%left CMPOP2 /* < > <= >= */
|
||||||
|
%left ADDOP2 /* + - */
|
||||||
|
%left MULOP2 /* * / % */
|
||||||
|
%right '!' /* ! */
|
||||||
|
|
||||||
|
%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
|
||||||
|
%token <num> NUMBER
|
||||||
|
%type <exp> exp
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
start: exp
|
||||||
|
{
|
||||||
|
if ($1 == NULL)
|
||||||
|
YYABORT;
|
||||||
|
((struct parse_args *) arg)->res = $1;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
exp: exp '?' exp ':' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_3 (qmop, $1, $3, $5);
|
||||||
|
}
|
||||||
|
| exp '|' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 (lor, $1, $3);
|
||||||
|
}
|
||||||
|
| exp '&' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 (land, $1, $3);
|
||||||
|
}
|
||||||
|
| exp EQUOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp CMPOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp ADDOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp MULOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| '!' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_1 (lnot, $2);
|
||||||
|
}
|
||||||
|
| 'n'
|
||||||
|
{
|
||||||
|
$$ = new_exp_0 (var);
|
||||||
|
}
|
||||||
|
| NUMBER
|
||||||
|
{
|
||||||
|
if (($$ = new_exp_0 (num)) != NULL)
|
||||||
|
$$->val.num = $1;
|
||||||
|
}
|
||||||
|
| '(' exp ')'
|
||||||
|
{
|
||||||
|
$$ = $2;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
void
|
||||||
|
internal_function
|
||||||
|
FREE_EXPRESSION (exp)
|
||||||
|
struct expression *exp;
|
||||||
|
{
|
||||||
|
if (exp == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Handle the recursive case. */
|
||||||
|
switch (exp->nargs)
|
||||||
|
{
|
||||||
|
case 3:
|
||||||
|
FREE_EXPRESSION (exp->val.args[2]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
case 2:
|
||||||
|
FREE_EXPRESSION (exp->val.args[1]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
case 1:
|
||||||
|
FREE_EXPRESSION (exp->val.args[0]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
free (exp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
yylex (lval, pexp)
|
||||||
|
YYSTYPE *lval;
|
||||||
|
const char **pexp;
|
||||||
|
{
|
||||||
|
const char *exp = *pexp;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
if (exp[0] == '\0')
|
||||||
|
{
|
||||||
|
*pexp = exp;
|
||||||
|
return YYEOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exp[0] != ' ' && exp[0] != '\t')
|
||||||
|
break;
|
||||||
|
|
||||||
|
++exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = *exp++;
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
case '0': case '1': case '2': case '3': case '4':
|
||||||
|
case '5': case '6': case '7': case '8': case '9':
|
||||||
|
{
|
||||||
|
unsigned long int n = result - '0';
|
||||||
|
while (exp[0] >= '0' && exp[0] <= '9')
|
||||||
|
{
|
||||||
|
n *= 10;
|
||||||
|
n += exp[0] - '0';
|
||||||
|
++exp;
|
||||||
|
}
|
||||||
|
lval->num = n;
|
||||||
|
result = NUMBER;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '=':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = equal;
|
||||||
|
result = EQUOP2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
result = YYERRCODE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '!':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = not_equal;
|
||||||
|
result = EQUOP2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '&':
|
||||||
|
case '|':
|
||||||
|
if (exp[0] == result)
|
||||||
|
++exp;
|
||||||
|
else
|
||||||
|
result = YYERRCODE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '<':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = less_or_equal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lval->op = less_than;
|
||||||
|
result = CMPOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '>':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = greater_or_equal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lval->op = greater_than;
|
||||||
|
result = CMPOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '*':
|
||||||
|
lval->op = mult;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '/':
|
||||||
|
lval->op = divide;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '%':
|
||||||
|
lval->op = module;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '+':
|
||||||
|
lval->op = plus;
|
||||||
|
result = ADDOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '-':
|
||||||
|
lval->op = minus;
|
||||||
|
result = ADDOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
case '?':
|
||||||
|
case ':':
|
||||||
|
case '(':
|
||||||
|
case ')':
|
||||||
|
/* Nothing, just return the character. */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ';':
|
||||||
|
case '\n':
|
||||||
|
case '\0':
|
||||||
|
/* Be safe and let the user call this function again. */
|
||||||
|
--exp;
|
||||||
|
result = YYEOF;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
result = YYERRCODE;
|
||||||
|
#if YYDEBUG != 0
|
||||||
|
--exp;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pexp = exp;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
yyerror (str)
|
||||||
|
const char *str;
|
||||||
|
{
|
||||||
|
/* Do nothing. We don't print error messages here. */
|
||||||
|
}
|
31
intl/ref-add.sin
Обычный файл
31
intl/ref-add.sin
Обычный файл
@ -0,0 +1,31 @@
|
|||||||
|
# Add this package to a list of references stored in a text file.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||||
|
#
|
||||||
|
/^# Packages using this file: / {
|
||||||
|
s/# Packages using this file://
|
||||||
|
ta
|
||||||
|
:a
|
||||||
|
s/ @PACKAGE@ / @PACKAGE@ /
|
||||||
|
tb
|
||||||
|
s/ $/ @PACKAGE@ /
|
||||||
|
:b
|
||||||
|
s/^/# Packages using this file:/
|
||||||
|
}
|
26
intl/ref-del.sin
Обычный файл
26
intl/ref-del.sin
Обычный файл
@ -0,0 +1,26 @@
|
|||||||
|
# Remove this package from a list of references stored in a text file.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||||
|
#
|
||||||
|
/^# Packages using this file: / {
|
||||||
|
s/# Packages using this file://
|
||||||
|
s/ @PACKAGE@ / /
|
||||||
|
s/^/# Packages using this file:/
|
||||||
|
}
|
Загрузка…
x
Ссылка в новой задаче
Block a user