make distcheck works. building rpms work.. building on rh7.x works (dont know

about 8.x)... releasable as such minus code testing


SVN revision: 6789
This commit is contained in:
Carsten Haitzler 2003-03-27 01:38:03 +00:00
parent fc64da62fa
commit 497cb56a59
43 changed files with 1528 additions and 2593 deletions

300
ABOUT-NLS
View File

@ -113,13 +113,6 @@ But in fact, some languages have dialects in different countries. For
example, `de_AT' is used for Austria, and `pt_BR' for Brazil. The
country code serves to distinguish the dialects.
The locale naming convention of `LL_CC', with `LL' denoting the
language and `CC' denoting the country, is the one use on systems based
on GNU libc. On other systems, some variations of this scheme are
used, such as `LL' or `LL_CC.ENCODING'. You can get the list of
locales supported by your system for your country by running the command
`locale -a | grep '^LL''.
Not all programs have translations for all languages. By default, an
English message is shown in place of a nonexistent translation. If you
understand other languages, you can set up a priority list of languages.
@ -171,193 +164,102 @@ Available Packages
==================
Languages are not equally supported in all packages. The following
matrix shows the current state of internationalization, as of March
2002. The matrix shows, in regard of each package, for which languages
PO files have been submitted to translation coordination, with a
matrix shows the current state of internationalization, as of May 2001.
The matrix shows, in regard of each package, for which languages PO
files have been submitted to translation coordination, with a
translation percentage of at least 50%.
Ready PO files bg ca cs da de el en eo es et fi fr
+-------------------------------------+
a2ps | [] [] [] [] |
bash | [] [] [] [] |
bfd | [] [] |
binutils | [] [] |
bison | [] [] [] |
clisp | [] [] [] [] |
cpio | [] [] [] [] |
diffutils | [] [] [] [] [] [] |
enscript | [] [] |
error | [] [] |
fetchmail | () [] [] [] () |
fileutils | [] [] [] [] [] |
findutils | [] [] [] [] [] |
flex | [] [] [] [] |
gas | [] [] |
gawk | [] [] |
gcal | [] [] |
gcc | [] [] |
gettext | [] [] [] [] [] |
gnupg | [] [] [] [] [] [] |
gprof | [] [] |
grep | [] [] [] [] [] [] |
hello | [] [] [] [] [] [] [] [] |
id-utils | [] [] [] |
indent | [] [] [] [] [] |
jpilot | () [] [] [] |
jwhois | [] [] |
kbd | [] [] |
ld | [] [] |
libc | [] [] [] [] [] [] [] |
lilypond | [] [] |
lynx | [] [] [] [] |
m4 | [] [] [] [] [] |
make | [] [] [] [] |
mysecretdiary | [] [] |
nano | [] () [] [] [] [] |
nano_1_0 | [] () [] [] [] [] |
opcodes | [] [] [] |
parted | [] [] [] [] |
ptx | [] [] [] [] [] |
python | |
recode | [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] |
sketch | () [] () |
soundtracker | [] [] [] |
sp | |
tar | [] [] [] [] [] [] |
texinfo | [] [] [] [] [] |
textutils | [] [] [] [] [] |
util-linux | [] [] [] [] |
vorbis-tools | |
wdiff | [] [] [] [] [] |
wget | [] [] [] [] [] [] [] [] |
+-------------------------------------+
bg ca cs da de el en eo es et fi fr
1 12 11 31 36 9 1 8 39 15 1 50
Ready PO files bg cs da de el en eo es et fi fr gl hr id it
+----------------------------------------------+
a2ps | [] [] |
bash | [] [] [] [] |
bison | [] [] [] [] |
clisp | [] [] [] [] |
cpio | [] [] [] [] |
diffutils | [] [] [] [] [] [] [] |
enscript | [] [] |
error | [] |
fileutils | [] [] [] [] [] [] [] |
findutils | [] [] [] [] [] [] [] [] |
flex | [] [] [] |
gawk | |
gcal | |
gcc | [] |
gettext | [] [] [] [] [] [] [] [] [] |
gnupg | [] [] [] [] [] |
grep | [] [] [] |
hello | [] [] [] [] [] [] [] [] [] |
id-utils | [] [] |
indent | [] [] [] [] [] |
libc | [] [] [] [] [] [] [] [] |
lilypond | |
lynx | [] [] [] |
m4 | [] [] [] [] [] [] [] |
make | [] [] [] [] |
parted | [] [] |
ptx | [] [] [] [] [] [] [] |
python | |
recode | [] [] [] [] [] [] [] [] |
sed | [] [] [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] [] [] [] [] |
sharutils | [] [] [] [] [] [] [] |
soundtracker | |
sp | |
tar | [] [] [] [] [] [] [] [] |
texinfo | [] [] [] [] |
textutils | [] [] [] [] [] [] [] |
util-linux | [] |
wdiff | [] [] [] [] [] [] [] |
wget | [] [] [] [] [] [] [] [] [] |
+----------------------------------------------+
bg cs da de el en eo es et fi fr gl hr id it
0 14 21 27 10 1 8 20 13 1 28 17 0 9 11
gl he hr hu id it ja ko lv nb nl nn
+-------------------------------------+
a2ps | () () [] |
bash | |
bfd | [] |
binutils | [] |
bison | [] [] |
clisp | [] |
cpio | [] [] [] |
diffutils | [] [] [] |
enscript | [] |
error | [] |
fetchmail | |
fileutils | [] [] [] |
findutils | [] [] [] [] [] [] |
flex | [] |
gas | |
gawk | [] |
gcal | |
gcc | |
gettext | [] |
gnupg | [] [] [] |
gprof | |
grep | [] |
hello | [] [] [] [] [] [] [] [] [] [] |
id-utils | [] |
indent | [] [] [] |
jpilot | () () |
jwhois | |
kbd | |
ld | |
libc | [] [] [] [] |
lilypond | [] [] |
lynx | [] [] |
m4 | [] [] [] [] |
make | [] [] [] [] |
mysecretdiary | |
nano | [] [] [] () [] () [] |
nano_1_0 | [] [] [] () [] () [] |
opcodes | [] |
parted | [] [] [] |
ptx | [] [] [] [] |
python | |
recode | [] [] [] |
sed | [] [] [] [] [] [] [] |
sh-utils | [] [] [] [] [] |
sharutils | [] [] [] |
sketch | () |
soundtracker | [] |
sp | |
tar | [] [] [] |
texinfo | [] [] |
textutils | [] [] |
util-linux | () [] |
vorbis-tools | |
wdiff | |
wget | [] [] [] [] [] |
+-------------------------------------+
gl he hr hu id it ja ko lv nb nl nn
19 7 0 4 6 11 22 9 1 8 19 4
no pl pt pt_BR ru sk sl sv tr uk zh_TW
+----------------------------------------+
a2ps | () () () [] [] [] () | 8
bash | | 4
bfd | [] [] | 5
binutils | [] | 4
bison | [] [] [] | 8
clisp | | 5
cpio | [] [] [] [] | 11
diffutils | [] [] [] [] [] | 14
enscript | [] [] [] | 6
error | [] [] [] | 6
fetchmail | () () [] | 4
fileutils | [] [] [] [] | 12
findutils | [] [] [] [] [] [] [] | 18
flex | [] [] [] | 8
gas | [] | 3
gawk | [] [] | 5
gcal | [] [] | 4
gcc | [] | 3
gettext | [] [] [] [] | 10
gnupg | [] [] [] | 12
gprof | [] [] | 4
grep | [] [] [] | 10
hello | [] [] [] [] [] [] [] | 25
id-utils | [] [] | 6
indent | [] [] [] [] | 12
jpilot | () () | 3
jwhois | () () [] | 3
kbd | [] [] | 4
ld | [] [] | 4
libc | [] [] [] [] [] [] | 17
lilypond | [] | 5
lynx | [] [] [] | 9
m4 | [] [] [] | 12
make | [] [] [] [] | 12
mysecretdiary | [] [] | 4
nano | () [] [] [] [] | 14
nano_1_0 | () [] [] [] | 13
opcodes | [] [] | 6
parted | [] [] [] | 10
ptx | [] [] [] [] [] [] | 15
python | | 0
recode | [] [] [] [] | 13
sed | [] [] [] [] [] [] | 21
sh-utils | [] [] [] [] [] [] [] [] [] | 22
sharutils | [] [] [] | 12
sketch | [] () | 3
soundtracker | [] | 5
sp | | 0
tar | [] [] [] [] [] [] [] | 16
texinfo | [] [] [] | 10
textutils | [] [] [] [] | 11
util-linux | [] [] [] | 8
vorbis-tools | [] | 1
wdiff | [] [] [] [] | 9
wget | [] [] [] [] [] [] [] | 20
+----------------------------------------+
35 teams no pl pt pt_BR ru sk sl sv tr uk zh_TW
55 domains 5 13 2 12 25 11 11 41 34 4 7 489
ja ko lv nl no pl pt pt_BR ru sk sl sv tr zh
+----------------------------------------------+
a2ps | [] [] [] | 5
bash | | 4
bison | [] [] [] | 7
clisp | [] | 5
cpio | [] [] [] [] [] | 9
diffutils | [] [] [] | 10
enscript | [] [] [] | 5
error | | 1
fileutils | [] [] [] [] [] [] [] [] [] | 16
findutils | [] [] [] [] [] [] | 14
flex | [] [] [] | 6
gawk | | 0
gcal | | 0
gcc | [] | 2
gettext | [] [] [] [] [] [] [] [] [] [] | 19
gnupg | [] [] [] | 8
grep | | 3
hello | [] [] [] [] [] [] [] [] | 17
id-utils | [] [] [] | 5
indent | [] [] [] [] [] [] [] | 12
libc | [] [] [] [] [] [] [] | 15
lilypond | [] | 1
lynx | [] [] [] [] [] | 8
m4 | [] [] [] [] [] | 12
make | [] [] [] [] [] | 9
parted | [] [] [] | 5
ptx | [] [] [] [] [] [] | 13
python | | 0
recode | [] [] [] | 11
sed | [] [] [] [] [] [] [] | 16
sh-utils | [] [] [] [] [] [] [] [] [] [] | 19
sharutils | [] [] [] [] | 11
soundtracker | | 0
sp | | 0
tar | [] [] [] [] [] [] [] [] | 16
texinfo | [] [] | 6
textutils | [] [] [] [] [] [] [] [] | 15
util-linux | [] | 2
wdiff | [] [] [] [] [] | 12
wget | [] [] [] [] [] [] [] [] | 17
+----------------------------------------------+
29 teams ja ko lv nl no pl pt pt_BR ru sk sl sv tr zh
40 domains 18 8 0 23 6 16 1 15 26 9 9 20 2 3 336
Some counters in the preceding matrix are higher than the number of
visible blocks let us expect. This is because a few extra PO files are
@ -370,7 +272,7 @@ distributed as such by its maintainer. There might be an observable
lag between the mere existence a PO file and its wide availability in a
distribution.
If March 2002 seems to be old, you may fetch a more recent copy of
If May 2001 seems to be old, you may fetch a more recent copy of
this `ABOUT-NLS' file on most GNU archive sites. The most up-to-date
matrix with full percentage details can be found at
`http://www.iro.umontreal.ca/contrib/po/HTML/matrix.html'.
@ -380,15 +282,13 @@ Using `gettext' in new packages
If you are writing a freely available program and want to
internationalize it you are welcome to use GNU `gettext' in your
package. Of course you have to respect the GNU Library General Public
License which covers the use of the GNU `gettext' library. This means
in particular that even non-free programs can use `libintl' as a shared
library, whereas only free software can use `libintl' as a static
library or use modified versions of `libintl'.
package. Of course the GNU Public License applies to your sources from
then if you include `gettext' directly in your distribution on but
since you are writing free software anyway this is no restriction.
Once the sources are changed appropriately and the setup can handle
to use of `gettext' the only thing missing are the translations. The
Free Translation Project is also available for packages which are not
Once the sources are change appropriately and the setup can handle to
use of `gettext' the only thing missing are the translations. The Free
Translation Project is also available for packages which are not
developed inside the GNU project. Therefore the information given above
applies also for every other Free Software Project. Contact
`translation@iro.umontreal.ca' to make the `.pot' files available to

View File

@ -15,7 +15,6 @@ sample-scripts/lcdmover.sh \
sample-scripts/testroller.pl \
sample-scripts/shade-pagers.pl \
e.spec \
e.rh.spec \
configure \
configure.in \
econfig.h.in \

View File

@ -236,4 +236,7 @@ scripts/enlightenment.install
po/Makefile.in
intl/Makefile
debian/Makefile
],
[
cp econfig.h config.h
])

View File

@ -31,7 +31,7 @@ dox_SOURCES = \
LDADD = $(TTF_LIBS) $(FNLIB_LIBS) $(IMLIB_LIBS) $(XINERAMA_LIBS) -lm
INCLUDES=-I$(top_srcdir) $(IMLIB_CFLAGS) -I$(includedir) -I..
INCLUDES=-I$(top_srcdir) $(IMLIB_CFLAGS) -I$(includedir) -I.. -I/usr/include/freetype1
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\" -DENLIGHTENMENT_BIN=\"@ENLIGHTENMENT_BIN@\"

View File

@ -1,5 +1,5 @@
# Note that this is NOT a relocatable package
%define ver 0.16.5
%define ver 0.16.6
%define rel 1
%define prefix /usr

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +1,5 @@
# Makefile for directory with message catalog handling in GNU NLS Utilities.
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
# 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
@ -28,77 +28,106 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
transform = @program_transform_name@
libdir = $(exec_prefix)/lib
includedir = $(prefix)/include
datadir = $(prefix)/@DATADIRNAME@
libdir = @libdir@
includedir = @includedir@
datadir = @datadir@
localedir = $(datadir)/locale
gnulocaledir = $(prefix)/share/locale
gettextsrcdir = @datadir@/gettext/intl
aliaspath = $(localedir):.
gettextsrcdir = $(datadir)/gettext/intl
aliaspath = $(localedir)
subdir = intl
DESTDIR=
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
l = @l@
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
AR = ar
CC = @CC@
LIBTOOL = @LIBTOOL@
RANLIB = @RANLIB@
YACC = @INTLBISON@ -y -d
YFLAGS = --name-prefix=__gettext
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
-DLIBDIR=\"$(libdir)\" @DEFS@
CPPFLAGS = @CPPFLAGS@
CFLAGS = @CFLAGS@
LDFLAGS = @LDFLAGS@
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
HEADERS = $(COMHDRS) libgettext.h loadinfo.h
HEADERS = $(COMHDRS) libgnuintl.h libgettext.h loadinfo.h
COMHDRS = gettext.h gettextP.h hash-string.h
SOURCES = $(COMSRCS) intl-compat.c cat-compat.c
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
explodename.c dcigettext.c dcngettext.c dngettext.c ngettext.c plural.y \
localcharset.c
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
explodename.$lo
CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
plural.$lo localcharset.$lo
GETTOBJS = intl-compat.$lo
DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
xopen-msg.sed $(HEADERS) $(SOURCES)
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 intlh.inst.in
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=1
LTV_AGE=0
.SUFFIXES:
.SUFFIXES: .c .o .lo
.SUFFIXES: .c .y .o .lo .sin .sed
.c.o:
$(COMPILE) $<
.c.lo:
$(LIBTOOL) --mode=compile $(COMPILE) $<
INCLUDES = -I.. -I. -I$(top_srcdir)/intl -I$(top_srcdir)/lib
.y.c:
$(YACC) $(YFLAGS) --output $@ $<
rm -f $*.h
.sin.sed:
sed -e '/^#/d' -e 's/@''PACKAGE''@/@PACKAGE@/g' $< > t-$@
mv t-$@ $@
INCLUDES = -I.. -I. -I$(top_srcdir)/intl
all: all-@USE_INCLUDED_LIBINTL@
all-yes: libintl.$la libintl.h charset.alias ref-add.sed ref-del.sed
all-no: all-no-@BUILD_INCLUDED_LIBINTL@
all-no-yes: libgnuintl.$la
all-no-no:
all-yes: libintl.$la intlh.inst
all-no:
libintl.a: $(OBJECTS)
libintl.a libgnuintl.a: $(OBJECTS)
rm -f $@
$(AR) cru $@ $(OBJECTS)
$(RANLIB) $@
libintl.la: $(OBJECTS)
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
-version-info 1:0 -rpath $(libdir)
libintl.la libgnuintl.la: $(OBJECTS)
$(LIBTOOL) --mode=link \
$(CC) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS) $(LDFLAGS) -o $@ \
$(OBJECTS) @LIBICONV@ \
-version-info $(LTV_CURRENT):$(LTV_REVISION):$(LTV_AGE) \
-rpath $(libdir) \
-no-undefined
../po/cat-id-tbl.$lo: ../po/cat-id-tbl.c $(top_srcdir)/po/$(PACKAGE).pot
cd ../po && $(MAKE) cat-id-tbl.$lo
libintl.h: libgnuintl.h
cp $(srcdir)/libgnuintl.h libintl.h
charset.alias: config.charset
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
mv t-$@ $@
check: all
@ -106,36 +135,70 @@ check: all
# 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 gettext() function in its C library or in a
# separate library or use the catgets interface. A special case is
# where configure found a previously installed GNU gettext library.
# 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 '@INTLOBJS@' = '$(GETTOBJS)'; then \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(libdir) $(includedir); \
$(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 '@USE_INCLUDED_LIBINTL@' = yes; then \
$(mkinstalldirs) $(DESTDIR)$(libdir); \
temp=$(DESTDIR)$(libdir)/t-charset.alias; \
dest=$(DESTDIR)$(libdir)/charset.alias; \
if test -f $(DESTDIR)$(libdir)/charset.alias; then \
orig=$(DESTDIR)$(libdir)/charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
$(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
else \
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
if test @GLIBC21@ = no; then \
orig=charset.alias; \
sed -f ref-add.sed $$orig > $$temp; \
$(INSTALL_DATA) $$temp $$dest; \
rm -f $$temp; \
fi; \
fi; \
$(INSTALL_DATA) intlh.inst $(DESTDIR)$(includedir)/libintl.h; \
$(INSTALL_DATA) libintl.a $(DESTDIR)$(libdir)/libintl.a; \
$(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 \
if test -r $(MKINSTALLDIRS); then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(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; \
$(INSTALL_DATA) $(srcdir)/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
chmod a+x $(DESTDIR)$(gettextsrcdir)/config.charset; \
dists="$(DISTFILES.generated)"; \
for file in $$dists; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
$(INSTALL_DATA) $$dir/$$file \
$(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
dists="$(DISTFILES.obsolete)"; \
for file in $$dists; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
@ -145,14 +208,51 @@ install-data: all
installcheck:
uninstall:
dists="$(DISTFILES.common)"; \
for file in $$dists; do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done
if test "$(PACKAGE)" = "gettext" \
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
rm -f $(DESTDIR)$(includedir)/libintl.h; \
$(LIBTOOL) --mode=uninstall \
rm -f $(DESTDIR)$(libdir)/libintl.$la; \
else \
: ; \
fi
if test '@USE_INCLUDED_LIBINTL@' = 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) $(DISTFILES.generated); do \
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
done; \
else \
: ; \
fi
info dvi:
$(OBJECTS): ../econfig.h libgettext.h
$(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
@ -168,12 +268,19 @@ ID: $(HEADERS) $(SOURCES)
mostlyclean:
rm -f *.a *.o *.lo core core.*
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 po2msg.sed po2tbl.sed
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;"
@ -183,34 +290,23 @@ maintainer-clean: distclean
# 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 $(DISTFILES)
dist distdir: Makefile
if test "$(PACKAGE)" = gettext; then \
additional="$(DISTFILES.gettext)"; \
else \
additional="$(DISTFILES.normal)"; \
fi; \
for file in $(DISTFILES.common) $$additional; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
ln $$dir/$$file $(distdir) 2> /dev/null \
|| cp -p $$dir/$$file $(distdir); \
done
dist-libc:
tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
Makefile: Makefile.in ../config.status
cd .. \
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
# The dependency for intlh.inst is different in gettext and all other
# packages. Because we cannot you GNU make features we have to solve
# the problem while rewriting Makefile.in.
@GT_YES@intlh.inst: intlh.inst.in ../config.status
@GT_YES@ cd .. \
@GT_YES@ && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= \
@GT_YES@ $(SHELL) ./config.status
@GT_NO@.PHONY: intlh.inst
@GT_NO@intlh.inst:
# 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:

View File

@ -1 +1 @@
GNU gettext library from gettext-0.10.35
GNU gettext library from gettext-0.10.38

View File

@ -1,5 +1,5 @@
/* Implementation of the bindtextdomain(3) function
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
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
@ -16,36 +16,43 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#include <stddef.h>
#include <stdlib.h>
#include <string.h>
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
/* We have to handle multi-threaded applications. */
# include <bits/libc-lock.h>
#else
/* Provide dummy implementation if this is outside glibc. */
# define __libc_rwlock_define(CLASS, NAME)
# define __libc_rwlock_wrlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_dirname _nl_default_dirname__
# define _nl_domain_bindings _nl_domain_bindings__
#endif
/* Some compilers, like SunOS4 cc, don't have offsetof in <stddef.h>. */
#ifndef offsetof
# define offsetof(type,ident) ((size_t)&(((type*)0)->ident))
#endif
/* @@ end of prolog @@ */
/* Contains the default location of the message catalogs. */
@ -54,6 +61,9 @@ extern const char _nl_default_dirname[];
/* List with bindings of specific domains. */
extern struct binding *_nl_domain_bindings;
/* Lock variable to protect the global data in the gettext implementation. */
__libc_rwlock_define (extern, _nl_state_lock)
/* Names for the libintl functions are a problem. They must not clash
with existing names and they should follow ANSI C. But this source
@ -61,25 +71,48 @@ extern struct binding *_nl_domain_bindings;
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define BINDTEXTDOMAIN __bindtextdomain
# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
# ifndef strdup
# define strdup(str) __strdup (str)
# endif
#else
# define BINDTEXTDOMAIN bindtextdomain__
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
#endif
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
char *
BINDTEXTDOMAIN (domainname, dirname)
/* Prototypes for local functions. */
static void set_binding_values PARAMS ((const char *domainname,
const char **dirnamep,
const char **codesetp));
/* Specifies the directory name *DIRNAMEP and the output codeset *CODESETP
to be used for the DOMAINNAME message catalog.
If *DIRNAMEP or *CODESETP is NULL, the corresponding attribute is not
modified, only the current value is returned.
If DIRNAMEP or CODESETP is NULL, the corresponding attribute is neither
modified nor returned. */
static void
set_binding_values (domainname, dirnamep, codesetp)
const char *domainname;
const char *dirname;
const char **dirnamep;
const char **codesetp;
{
struct binding *binding;
int modified;
/* Some sanity checks. */
if (domainname == NULL || domainname[0] == '\0')
return NULL;
{
if (dirnamep)
*dirnamep = NULL;
if (codesetp)
*codesetp = NULL;
return;
}
__libc_rwlock_wrlock (_nl_state_lock);
modified = 0;
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
@ -95,83 +128,173 @@ BINDTEXTDOMAIN (domainname, dirname)
}
}
if (dirname == NULL)
/* The current binding has be to returned. */
return binding == NULL ? (char *) _nl_default_dirname : binding->dirname;
if (binding != NULL)
{
/* The domain is already bound. If the new value and the old
one are equal we simply do nothing. Otherwise replace the
old binding. */
if (strcmp (dirname, binding->dirname) != 0)
if (dirnamep)
{
char *new_dirname;
const char *dirname = *dirnamep;
if (strcmp (dirname, _nl_default_dirname) == 0)
new_dirname = (char *) _nl_default_dirname;
if (dirname == NULL)
/* The current binding has be to returned. */
*dirnamep = binding->dirname;
else
{
/* The domain is already bound. If the new value and the old
one are equal we simply do nothing. Otherwise replace the
old binding. */
char *result = binding->dirname;
if (strcmp (dirname, result) != 0)
{
if (strcmp (dirname, _nl_default_dirname) == 0)
result = (char *) _nl_default_dirname;
else
{
#if defined _LIBC || defined HAVE_STRDUP
new_dirname = strdup (dirname);
if (new_dirname == NULL)
return NULL;
result = strdup (dirname);
#else
size_t len = strlen (dirname) + 1;
new_dirname = (char *) malloc (len);
if (new_dirname == NULL)
return NULL;
memcpy (new_dirname, dirname, len);
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result != NULL, 1))
memcpy (result, dirname, len);
#endif
}
if (__builtin_expect (result != NULL, 1))
{
if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
binding->dirname = result;
modified = 1;
}
}
*dirnamep = result;
}
if (binding->dirname != _nl_default_dirname)
free (binding->dirname);
binding->dirname = new_dirname;
}
if (codesetp)
{
const char *codeset = *codesetp;
if (codeset == NULL)
/* The current binding has be to returned. */
*codesetp = binding->codeset;
else
{
/* The domain is already bound. If the new value and the old
one are equal we simply do nothing. Otherwise replace the
old binding. */
char *result = binding->codeset;
if (result == NULL || strcmp (codeset, result) != 0)
{
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (codeset);
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result != NULL, 1))
memcpy (result, codeset, len);
#endif
if (__builtin_expect (result != NULL, 1))
{
if (binding->codeset != NULL)
free (binding->codeset);
binding->codeset = result;
binding->codeset_cntr++;
modified = 1;
}
}
*codesetp = result;
}
}
}
else if ((dirnamep == NULL || *dirnamep == NULL)
&& (codesetp == NULL || *codesetp == NULL))
{
/* Simply return the default values. */
if (dirnamep)
*dirnamep = _nl_default_dirname;
if (codesetp)
*codesetp = NULL;
}
else
{
/* We have to create a new binding. */
#if !defined _LIBC && !defined HAVE_STRDUP
size_t len;
#endif
size_t len = strlen (domainname) + 1;
struct binding *new_binding =
(struct binding *) malloc (sizeof (*new_binding));
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
if (new_binding == NULL)
return NULL;
if (__builtin_expect (new_binding == NULL, 0))
goto failed;
#if defined _LIBC || defined HAVE_STRDUP
new_binding->domainname = strdup (domainname);
if (new_binding->domainname == NULL)
return NULL;
#else
len = strlen (domainname) + 1;
new_binding->domainname = (char *) malloc (len);
if (new_binding->domainname == NULL)
return NULL;
memcpy (new_binding->domainname, domainname, len);
#endif
if (strcmp (dirname, _nl_default_dirname) == 0)
new_binding->dirname = (char *) _nl_default_dirname;
else
if (dirnamep)
{
const char *dirname = *dirnamep;
if (dirname == NULL)
/* The default value. */
dirname = _nl_default_dirname;
else
{
if (strcmp (dirname, _nl_default_dirname) == 0)
dirname = _nl_default_dirname;
else
{
char *result;
#if defined _LIBC || defined HAVE_STRDUP
new_binding->dirname = strdup (dirname);
if (new_binding->dirname == NULL)
return NULL;
result = strdup (dirname);
if (__builtin_expect (result == NULL, 0))
goto failed_dirname;
#else
len = strlen (dirname) + 1;
new_binding->dirname = (char *) malloc (len);
if (new_binding->dirname == NULL)
return NULL;
memcpy (new_binding->dirname, dirname, len);
size_t len = strlen (dirname) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result == NULL, 0))
goto failed_dirname;
memcpy (result, dirname, len);
#endif
dirname = result;
}
}
*dirnamep = dirname;
new_binding->dirname = (char *) dirname;
}
else
/* The default value. */
new_binding->dirname = (char *) _nl_default_dirname;
new_binding->codeset_cntr = 0;
if (codesetp)
{
const char *codeset = *codesetp;
if (codeset != NULL)
{
char *result;
#if defined _LIBC || defined HAVE_STRDUP
result = strdup (codeset);
if (__builtin_expect (result == NULL, 0))
goto failed_codeset;
#else
size_t len = strlen (codeset) + 1;
result = (char *) malloc (len);
if (__builtin_expect (result == NULL, 0))
goto failed_codeset;
memcpy (result, codeset, len);
#endif
codeset = result;
new_binding->codeset_cntr++;
}
*codesetp = codeset;
new_binding->codeset = (char *) codeset;
}
else
new_binding->codeset = NULL;
/* Now enqueue it. */
if (_nl_domain_bindings == NULL
@ -191,13 +314,55 @@ BINDTEXTDOMAIN (domainname, dirname)
binding->next = new_binding;
}
binding = new_binding;
modified = 1;
/* Here we deal with memory allocation failures. */
if (0)
{
failed_codeset:
if (new_binding->dirname != _nl_default_dirname)
free (new_binding->dirname);
failed_dirname:
free (new_binding);
failed:
if (dirnamep)
*dirnamep = NULL;
if (codesetp)
*codesetp = NULL;
}
}
return binding->dirname;
/* If we modified any binding, we flush the caches. */
if (modified)
++_nl_msg_cat_cntr;
__libc_rwlock_unlock (_nl_state_lock);
}
/* Specify that the DOMAINNAME message catalog will be found
in DIRNAME rather than in the system locale data base. */
char *
BINDTEXTDOMAIN (domainname, dirname)
const char *domainname;
const char *dirname;
{
set_binding_values (domainname, &dirname, NULL);
return (char *) dirname;
}
/* Specify the character encoding in which the messages from the
DOMAINNAME message catalog will be returned. */
char *
BIND_TEXTDOMAIN_CODESET (domainname, codeset)
const char *domainname;
const char *codeset;
{
set_binding_values (domainname, NULL, &codeset);
return (char *) codeset;
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
/* Aliases for function names in GNU C Library. */
weak_alias (__bindtextdomain, bindtextdomain);
weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of the dcgettext(3) function.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
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
@ -16,205 +16,28 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#include <sys/types.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <errno.h>
#ifndef errno
extern int errno;
#endif
#ifndef __set_errno
# define __set_errno(val) errno = (val)
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# endif
# include <string.h>
#else
# include <strings.h>
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
#include "hash-string.h"
/* @@ end of prolog @@ */
#ifdef _LIBC
/* Rename the non ANSI C functions. This is required by the standard
because some ANSI C functions will require linking with this object
file and the name space must not be polluted. */
# define getcwd __getcwd
# ifndef stpcpy
# define stpcpy __stpcpy
# endif
#else
# if !defined HAVE_GETCWD
char *getwd ();
# define getcwd(buf, max) getwd (buf)
# else
char *getcwd ();
# endif
# ifndef HAVE_STPCPY
static char *stpcpy PARAMS ((char *dest, const char *src));
# endif
#endif
/* Amount to increase buffer size by in each try. */
#define PATH_INCR 32
/* The following is from pathmax.h. */
/* Non-POSIX BSD systems might have gcc's limits.h, which doesn't define
PATH_MAX but might cause redefinition warnings when sys/param.h is
later included (as on MORE/BSD 4.3). */
#if defined(_POSIX_VERSION) || (defined(HAVE_LIMITS_H) && !defined(__GNUC__))
# include <limits.h>
#endif
#ifndef _POSIX_PATH_MAX
# define _POSIX_PATH_MAX 255
#endif
#if !defined(PATH_MAX) && defined(_PC_PATH_MAX)
# define PATH_MAX (pathconf ("/", _PC_PATH_MAX) < 1 ? 1024 : pathconf ("/", _PC_PATH_MAX))
#endif
/* Don't include sys/param.h if it already has been. */
#if defined(HAVE_SYS_PARAM_H) && !defined(PATH_MAX) && !defined(MAXPATHLEN)
# include <sys/param.h>
#endif
#if !defined(PATH_MAX) && defined(MAXPATHLEN)
# define PATH_MAX MAXPATHLEN
#endif
#ifndef PATH_MAX
# define PATH_MAX _POSIX_PATH_MAX
#endif
/* XPG3 defines the result of `setlocale (category, NULL)' as:
``Directs `setlocale()' to query `category' and return the current
setting of `local'.''
However it does not specify the exact format. And even worse: POSIX
defines this not at all. So we can use this feature only on selected
system (e.g. those using GNU C Library). */
#ifdef _LIBC
# define HAVE_LOCALE_NULL
#endif
/* Name of the default domain used for gettext(3) prior any call to
textdomain(3). The default value for this is "messages". */
const char _nl_default_default_domain[] = "messages";
/* Value used as the default domain for gettext(3). */
const char *_nl_current_default_domain = _nl_default_default_domain;
/* Contains the default location of the message catalogs. */
const char _nl_default_dirname[] = GNULOCALEDIR;
/* List with bindings of specific domains created by bindtextdomain()
calls. */
struct binding *_nl_domain_bindings;
/* Prototypes for local functions. */
static char *find_msg PARAMS ((struct loaded_l10nfile *domain_file,
const char *msgid)) internal_function;
static const char *category_to_name PARAMS ((int category)) internal_function;
static const char *guess_category_value PARAMS ((int category,
const char *categoryname))
internal_function;
/* For those loosing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
/* Nothing has to be done. */
# define ADD_BLOCK(list, address) /* nothing */
# define FREE_BLOCKS(list) /* nothing */
#else
struct block_list
{
void *address;
struct block_list *next;
};
# define ADD_BLOCK(list, addr) \
do { \
struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
/* If we cannot get a free block we cannot add the new element to \
the list. */ \
if (newp != NULL) { \
newp->address = (addr); \
newp->next = (list); \
(list) = newp; \
} \
} while (0)
# define FREE_BLOCKS(list) \
do { \
while (list != NULL) { \
struct block_list *old = list; \
list = list->next; \
free (old); \
} \
} while (0)
# undef alloca
# define alloca(size) (malloc (size))
#endif /* have alloca */
/* 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 DCGETTEXT __dcgettext
# define DCIGETTEXT __dcigettext
#else
# define DCGETTEXT dcgettext__
# define DCIGETTEXT dcigettext__
#endif
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
@ -225,400 +48,10 @@ DCGETTEXT (domainname, msgid, category)
const char *msgid;
int category;
{
#ifndef HAVE_ALLOCA
struct block_list *block_list = NULL;
#endif
struct loaded_l10nfile *domain;
struct binding *binding;
const char *categoryname;
const char *categoryvalue;
char *dirname, *xdomainname;
char *single_locale;
char *retval;
int saved_errno = errno;
/* If no real MSGID is given return NULL. */
if (msgid == NULL)
return NULL;
/* If DOMAINNAME is NULL, we are interested in the default domain. If
CATEGORY is not LC_MESSAGES this might not make much sense but the
defintion left this undefined. */
if (domainname == NULL)
domainname = _nl_current_default_domain;
/* First find matching binding. */
for (binding = _nl_domain_bindings; binding != NULL; binding = binding->next)
{
int compare = strcmp (domainname, binding->domainname);
if (compare == 0)
/* We found it! */
break;
if (compare < 0)
{
/* It is not in the list. */
binding = NULL;
break;
}
}
if (binding == NULL)
dirname = (char *) _nl_default_dirname;
else if (binding->dirname[0] == '/')
dirname = binding->dirname;
else
{
/* We have a relative path. Make it absolute now. */
size_t dirname_len = strlen (binding->dirname) + 1;
size_t path_max;
char *ret;
path_max = (unsigned) PATH_MAX;
path_max += 2; /* The getcwd docs say to do this. */
dirname = (char *) alloca (path_max + dirname_len);
ADD_BLOCK (block_list, dirname);
__set_errno (0);
while ((ret = getcwd (dirname, path_max)) == NULL && errno == ERANGE)
{
path_max += PATH_INCR;
dirname = (char *) alloca (path_max + dirname_len);
ADD_BLOCK (block_list, dirname);
__set_errno (0);
}
if (ret == NULL)
{
/* We cannot get the current working directory. Don't signal an
error but simply return the default string. */
FREE_BLOCKS (block_list);
__set_errno (saved_errno);
return (char *) msgid;
}
stpcpy (stpcpy (strchr (dirname, '\0'), "/"), binding->dirname);
}
/* Now determine the symbolic name of CATEGORY and its value. */
categoryname = category_to_name (category);
categoryvalue = guess_category_value (category, categoryname);
xdomainname = (char *) alloca (strlen (categoryname)
+ strlen (domainname) + 5);
ADD_BLOCK (block_list, xdomainname);
stpcpy (stpcpy (stpcpy (stpcpy (xdomainname, categoryname), "/"),
domainname),
".mo");
/* Creating working area. */
single_locale = (char *) alloca (strlen (categoryvalue) + 1);
ADD_BLOCK (block_list, single_locale);
/* Search for the given string. This is a loop because we perhaps
got an ordered list of languages to consider for th translation. */
while (1)
{
/* Make CATEGORYVALUE point to the next element of the list. */
while (categoryvalue[0] != '\0' && categoryvalue[0] == ':')
++categoryvalue;
if (categoryvalue[0] == '\0')
{
/* The whole contents of CATEGORYVALUE has been searched but
no valid entry has been found. We solve this situation
by implicitly appending a "C" entry, i.e. no translation
will take place. */
single_locale[0] = 'C';
single_locale[1] = '\0';
}
else
{
char *cp = single_locale;
while (categoryvalue[0] != '\0' && categoryvalue[0] != ':')
*cp++ = *categoryvalue++;
*cp = '\0';
}
/* If the current locale value is C (or POSIX) we don't load a
domain. Return the MSGID. */
if (strcmp (single_locale, "C") == 0
|| strcmp (single_locale, "POSIX") == 0)
{
FREE_BLOCKS (block_list);
__set_errno (saved_errno);
return (char *) msgid;
}
/* Find structure describing the message catalog matching the
DOMAINNAME and CATEGORY. */
domain = _nl_find_domain (dirname, single_locale, xdomainname);
if (domain != NULL)
{
retval = find_msg (domain, msgid);
if (retval == NULL)
{
int cnt;
for (cnt = 0; domain->successor[cnt] != NULL; ++cnt)
{
retval = find_msg (domain->successor[cnt], msgid);
if (retval != NULL)
break;
}
}
if (retval != NULL)
{
FREE_BLOCKS (block_list);
__set_errno (saved_errno);
return retval;
}
}
}
/* NOTREACHED */
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
}
#ifdef _LIBC
/* Alias for function name in GNU C Library. */
weak_alias (__dcgettext, dcgettext);
#endif
static char *
internal_function
find_msg (domain_file, msgid)
struct loaded_l10nfile *domain_file;
const char *msgid;
{
size_t top, act, bottom;
struct loaded_domain *domain;
if (domain_file->decided == 0)
_nl_load_domain (domain_file);
if (domain_file->data == NULL)
return NULL;
domain = (struct loaded_domain *) domain_file->data;
/* Locate the MSGID and its translation. */
if (domain->hash_size > 2 && domain->hash_tab != NULL)
{
/* Use the hashing table. */
nls_uint32 len = strlen (msgid);
nls_uint32 hash_val = hash_string (msgid);
nls_uint32 idx = hash_val % domain->hash_size;
nls_uint32 incr = 1 + (hash_val % (domain->hash_size - 2));
nls_uint32 nstr = W (domain->must_swap, domain->hash_tab[idx]);
if (nstr == 0)
/* Hash table entry is empty. */
return NULL;
if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
&& strcmp (msgid,
domain->data + W (domain->must_swap,
domain->orig_tab[nstr - 1].offset)) == 0)
return (char *) domain->data + W (domain->must_swap,
domain->trans_tab[nstr - 1].offset);
while (1)
{
if (idx >= domain->hash_size - incr)
idx -= domain->hash_size - incr;
else
idx += incr;
nstr = W (domain->must_swap, domain->hash_tab[idx]);
if (nstr == 0)
/* Hash table entry is empty. */
return NULL;
if (W (domain->must_swap, domain->orig_tab[nstr - 1].length) == len
&& strcmp (msgid,
domain->data + W (domain->must_swap,
domain->orig_tab[nstr - 1].offset))
== 0)
return (char *) domain->data
+ W (domain->must_swap, domain->trans_tab[nstr - 1].offset);
}
/* NOTREACHED */
}
/* Now we try the default method: binary search in the sorted
array of messages. */
bottom = 0;
top = domain->nstrings;
while (bottom < top)
{
int cmp_val;
act = (bottom + top) / 2;
cmp_val = strcmp (msgid, domain->data
+ W (domain->must_swap,
domain->orig_tab[act].offset));
if (cmp_val < 0)
top = act;
else if (cmp_val > 0)
bottom = act + 1;
else
break;
}
/* If an translation is found return this. */
return bottom >= top ? NULL : (char *) domain->data
+ W (domain->must_swap,
domain->trans_tab[act].offset);
}
/* Return string representation of locale CATEGORY. */
static const char *
internal_function
category_to_name (category)
int category;
{
const char *retval;
switch (category)
{
#ifdef LC_COLLATE
case LC_COLLATE:
retval = "LC_COLLATE";
break;
#endif
#ifdef LC_CTYPE
case LC_CTYPE:
retval = "LC_CTYPE";
break;
#endif
#ifdef LC_MONETARY
case LC_MONETARY:
retval = "LC_MONETARY";
break;
#endif
#ifdef LC_NUMERIC
case LC_NUMERIC:
retval = "LC_NUMERIC";
break;
#endif
#ifdef LC_TIME
case LC_TIME:
retval = "LC_TIME";
break;
#endif
#ifdef LC_MESSAGES
case LC_MESSAGES:
retval = "LC_MESSAGES";
break;
#endif
#ifdef LC_RESPONSE
case LC_RESPONSE:
retval = "LC_RESPONSE";
break;
#endif
#ifdef LC_ALL
case LC_ALL:
/* This might not make sense but is perhaps better than any other
value. */
retval = "LC_ALL";
break;
#endif
default:
/* If you have a better idea for a default value let me know. */
retval = "LC_XXX";
}
return retval;
}
/* Guess value of current locale from value of the environment variables. */
static const char *
internal_function
guess_category_value (category, categoryname)
int category;
const char *categoryname;
{
const char *retval;
/* The highest priority value is the `LANGUAGE' environment
variable. This is a GNU extension. */
retval = getenv ("LANGUAGE");
if (retval != NULL && retval[0] != '\0')
return retval;
/* `LANGUAGE' is not set. So we have to proceed with the POSIX
methods of looking to `LC_ALL', `LC_xxx', and `LANG'. On some
systems this can be done by the `setlocale' function itself. */
#if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
return setlocale (category, NULL);
#else
/* Setting of LC_ALL overwrites all other. */
retval = getenv ("LC_ALL");
if (retval != NULL && retval[0] != '\0')
return retval;
/* Next comes the name of the desired category. */
retval = getenv (categoryname);
if (retval != NULL && retval[0] != '\0')
return retval;
/* Last possibility is the LANG environment variable. */
retval = getenv ("LANG");
if (retval != NULL && retval[0] != '\0')
return retval;
/* We use C as the default domain. POSIX says this is implementation
defined. */
return "C";
#endif
}
/* @@ begin of epilog @@ */
/* We don't want libintl.a to depend on any other library. So we
avoid the non-standard function stpcpy. In GNU C Library this
function is available, though. Also allow the symbol HAVE_STPCPY
to be defined. */
#if !_LIBC && !HAVE_STPCPY
static char *
stpcpy (dest, src)
char *dest;
const char *src;
{
while ((*dest++ = *src++) != '\0')
/* Do nothing. */ ;
return dest - 1;
}
#endif
#ifdef _LIBC
/* If we want to free all resources we have to do some work at
program's end. */
static void __attribute__ ((unused))
free_mem (void)
{
struct binding *runp;
for (runp = _nl_domain_bindings; runp != NULL; runp = runp->next)
{
free (runp->domainname);
if (runp->dirname != _nl_default_dirname)
/* Yes, this is a pointer comparison. */
free (runp->dirname);
}
if (_nl_current_default_domain != _nl_default_default_domain)
/* Yes, again a pointer comparison. */
free ((char *) _nl_current_default_domain);
}
text_set_element (__libc_subfreeres, free_mem);
#endif

View File

@ -1,5 +1,5 @@
/* Implementation of the dgettext(3) function
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
/* Implementation of the dgettext(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
@ -16,17 +16,16 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#if defined HAVE_LOCALE_H || defined _LIBC
# include <locale.h>
#endif
#include <locale.h>
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
/* Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software; you can redistribute it and/or modify
@ -16,18 +16,11 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
#endif
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
#include "loadinfo.h"
@ -43,6 +36,18 @@
/* @@ end of prolog @@ */
char *
_nl_find_language (name)
const char *name;
{
while (name[0] != '\0' && name[0] != '_' && name[0] != '@'
&& name[0] != '+' && name[0] != ',')
++name;
return (char *) name;
}
int
_nl_explode_name (name, language, modifier, territory, codeset,
normalized_codeset, special, sponsor, revision)
@ -74,9 +79,7 @@ _nl_explode_name (name, language, modifier, territory, codeset,
mask = 0;
syntax = undecided;
*language = cp = name;
while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
&& cp[0] != '+' && cp[0] != ',')
++cp;
cp = _nl_find_language (*language);
if (*language == cp)
/* This does not make sense: language has to be specified. Use

View File

@ -1,6 +1,6 @@
/* Handle list of needed message catalogs
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
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
@ -17,48 +17,23 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <stdio.h>
#include <sys/types.h>
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#if defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#include <stdlib.h>
#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
@ -71,10 +46,11 @@ static struct loaded_l10nfile *_nl_loaded_domains;
established bindings. */
struct loaded_l10nfile *
internal_function
_nl_find_domain (dirname, locale, domainname)
_nl_find_domain (dirname, locale, domainname, domainbinding)
const char *dirname;
char *locale;
const char *domainname;
struct binding *domainbinding;
{
struct loaded_l10nfile *retval;
const char *language;
@ -120,7 +96,7 @@ _nl_find_domain (dirname, locale, domainname)
int cnt;
if (retval->decided == 0)
_nl_load_domain (retval);
_nl_load_domain (retval, domainbinding);
if (retval->data != NULL)
return retval;
@ -128,7 +104,7 @@ _nl_find_domain (dirname, locale, domainname)
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt]);
_nl_load_domain (retval->successor[cnt], domainbinding);
if (retval->successor[cnt]->data != NULL)
break;
@ -175,14 +151,14 @@ _nl_find_domain (dirname, locale, domainname)
return NULL;
if (retval->decided == 0)
_nl_load_domain (retval);
_nl_load_domain (retval, domainbinding);
if (retval->data == NULL)
{
int cnt;
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
{
if (retval->successor[cnt]->decided == 0)
_nl_load_domain (retval->successor[cnt]);
_nl_load_domain (retval->successor[cnt], domainbinding);
if (retval->successor[cnt]->data != NULL)
break;
}
@ -192,6 +168,10 @@ _nl_find_domain (dirname, locale, domainname)
if (alias_value != NULL)
free (locale);
/* The space for normalized_codeset is dynamically allocated. Free it. */
if (mask & XPG_NORM_CODESET)
free ((void *) normalized_codeset);
return retval;
}
@ -208,6 +188,7 @@ free_mem (void)
if (runp->data != NULL)
_nl_unload_domain ((struct loaded_domain *) runp->data);
runp = runp->next;
free ((char *) here->filename);
free (here);
}
}

View File

@ -1,5 +1,5 @@
/* Implementation of gettext(3) function.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
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
@ -16,28 +16,21 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#ifdef _LIBC
# define __need_NULL
# include <stddef.h>
#else
# ifdef STDC_HEADERS
# include <stdlib.h> /* Just for NULL. */
# else
# ifdef HAVE_STRING_H
# include <string.h>
# else
# define NULL ((void *) 0)
# endif
# endif
# include <stdlib.h> /* Just for NULL. */
#endif
#include "gettextP.h"
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
/* @@ end of prolog @@ */
@ -48,10 +41,10 @@
prefix. So we have to make a difference here. */
#ifdef _LIBC
# define GETTEXT __gettext
# define DGETTEXT __dgettext
# define DCGETTEXT __dcgettext
#else
# define GETTEXT gettext__
# define DGETTEXT dgettext__
# define DCGETTEXT dcgettext__
#endif
/* Look up MSGID in the current default message catalog for the current
@ -61,7 +54,7 @@ char *
GETTEXT (msgid)
const char *msgid;
{
return DGETTEXT (NULL, msgid);
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
}
#ifdef _LIBC

View File

@ -1,5 +1,5 @@
/* Internal header for GNU gettext internationalization functions.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
/* Description of GNU message catalog format: general file layout.
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
@ -11,16 +11,13 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _GETTEXT_H
#define _GETTEXT_H 1
#include <stdio.h>
#if HAVE_LIMITS_H || _LIBC
# include <limits.h>
#endif
@ -37,9 +34,8 @@
/* The following contortions are an attempt to use the C preprocessor
to determine an unsigned integral type that is 32 bits wide. An
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
doing that would require that the configure script compile and *run*
the resulting executable. Locally running cross-compiled executables
is usually not possible. */
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
when cross-compiling. */
#if __STDC__
# define UINT_MAX_32_BITS 4294967295U

View File

@ -1,6 +1,6 @@
/* Header describing internals of gettext library
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
/* Header describing internals of libintl library.
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
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
@ -19,8 +19,20 @@
#ifndef _GETTEXTP_H
#define _GETTEXTP_H
#include <stddef.h> /* Get size_t. */
#ifdef _LIBC
# include "../iconv/gconv_int.h"
#else
# if HAVE_ICONV
# include <iconv.h>
# endif
#endif
#include "loadinfo.h"
#include "gettext.h" /* Get nls_uint32. */
/* @@ end of prolog @@ */
#ifndef PARAMS
@ -35,6 +47,12 @@
# define internal_function
#endif
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
#ifndef HAVE_BUILTIN_EXPECT
# define __builtin_expect(expr, val) (expr)
#endif
#ifndef W
# define W(flag, data) ((flag) ? SWAP (data) : (data))
#endif
@ -44,8 +62,6 @@
# include <byteswap.h>
# define SWAP(i) bswap_32 (i)
#else
static nls_uint32 SWAP PARAMS ((nls_uint32 i));
static inline nls_uint32
SWAP (i)
nls_uint32 i;
@ -55,6 +71,52 @@ SWAP (i)
#endif
/* This is the representation of the expressions to determine the
plural form. */
struct expression
{
int nargs; /* Number of arguments. */
enum operator
{
/* Without arguments: */
var, /* The variable "n". */
num, /* Decimal number. */
/* Unary operators: */
lnot, /* Logical NOT. */
/* Binary operators: */
mult, /* Multiplication. */
divide, /* Division. */
module, /* Module operation. */
plus, /* Addition. */
minus, /* Subtraction. */
less_than, /* Comparison. */
greater_than, /* Comparison. */
less_or_equal, /* Comparison. */
greater_or_equal, /* Comparison. */
equal, /* Comparision for equality. */
not_equal, /* Comparision for inequality. */
land, /* Logical AND. */
lor, /* Logical OR. */
/* Ternary operators: */
qmop /* Question mark operator. */
} operation;
union
{
unsigned long int num; /* Number value for `num'. */
struct expression *args[3]; /* Up to three arguments. */
} val;
};
/* This is the data structure to pass information to the parser and get
the result in a thread-safe way. */
struct parse_args
{
const char *cp;
struct expression *res;
};
/* The representation of an opened message catalog. */
struct loaded_domain
{
const char *data;
@ -66,23 +128,123 @@ struct loaded_domain
struct string_desc *trans_tab;
nls_uint32 hash_size;
nls_uint32 *hash_tab;
int codeset_cntr;
#ifdef _LIBC
__gconv_t conv;
#else
# if HAVE_ICONV
iconv_t conv;
# endif
#endif
char **conv_tab;
struct expression *plural;
unsigned long int nplurals;
};
/* We want to allocate a string at the end of the struct. But ISO C
doesn't allow zero sized arrays. */
#ifdef __GNUC__
# define ZERO 0
#else
# define ZERO 1
#endif
/* A set of settings bound to a message domain. Used to store settings
from bindtextdomain() and bind_textdomain_codeset(). */
struct binding
{
struct binding *next;
char *domainname;
char *dirname;
int codeset_cntr; /* Incremented each time codeset changes. */
char *codeset;
char domainname[ZERO];
};
/* A counter which is incremented each time some previous translations
become invalid.
This variable is part of the external ABI of the GNU libintl. */
extern int _nl_msg_cat_cntr;
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
char *__locale,
const char *__domainname))
const char *__domainname,
struct binding *__domainbinding))
internal_function;
void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain))
void _nl_load_domain PARAMS ((struct loaded_l10nfile *__domain,
struct binding *__domainbinding))
internal_function;
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
internal_function;
const char *_nl_init_domain_conv PARAMS ((struct loaded_l10nfile *__domain_file,
struct loaded_domain *__domain,
struct binding *__domainbinding))
internal_function;
void _nl_free_domain_conv PARAMS ((struct loaded_domain *__domain))
internal_function;
char *_nl_find_msg PARAMS ((struct loaded_l10nfile *domain_file,
struct binding *domainbinding,
const char *msgid, size_t *lengthp))
internal_function;
#ifdef _LIBC
extern char *__gettext PARAMS ((const char *__msgid));
extern char *__dgettext PARAMS ((const char *__domainname,
const char *__msgid));
extern char *__dcgettext PARAMS ((const char *__domainname,
const char *__msgid, int __category));
extern char *__ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *__dngettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int n));
extern char *__dcngettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category));
extern char *__dcigettext PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
int __plural, unsigned long int __n,
int __category));
extern char *__textdomain PARAMS ((const char *__domainname));
extern char *__bindtextdomain PARAMS ((const char *__domainname,
const char *__dirname));
extern char *__bind_textdomain_codeset PARAMS ((const char *__domainname,
const char *__codeset));
#else
extern char *gettext__ PARAMS ((const char *__msgid));
extern char *dgettext__ PARAMS ((const char *__domainname,
const char *__msgid));
extern char *dcgettext__ PARAMS ((const char *__domainname,
const char *__msgid, int __category));
extern char *ngettext__ PARAMS ((const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *dngettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n));
extern char *dcngettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
unsigned long int __n, int __category));
extern char *dcigettext__ PARAMS ((const char *__domainname,
const char *__msgid1, const char *__msgid2,
int __plural, unsigned long int __n,
int __category));
extern char *textdomain__ PARAMS ((const char *__domainname));
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
const char *__dirname));
extern char *bind_textdomain_codeset__ PARAMS ((const char *__domainname,
const char *__codeset));
#endif
#ifdef _LIBC
extern void __gettext_free_exp PARAMS ((struct expression *exp))
internal_function;
extern int __gettextparse PARAMS ((void *arg));
#else
extern void gettext_free_exp__ PARAMS ((struct expression *exp))
internal_function;
extern int gettextparse__ PARAMS ((void *arg));
#endif
/* @@ begin of epilog @@ */

View File

@ -1,5 +1,5 @@
/* Implements a string hashing function.
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
/* Description of GNU message catalog format: string hashing function.
Copyright (C) 1995, 1997, 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
@ -11,10 +11,9 @@
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU Library General Public
License along with the GNU C Library; see the file COPYING.LIB. If not,
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
Boston, MA 02111-1307, USA. */
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* @@ end of prolog @@ */
@ -33,9 +32,9 @@
/* Defines the so called `hashpjw' function by P.J. Weinberger
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
1986, 1987 Bell Telephone Laboratories, Inc.] */
static unsigned long hash_string PARAMS ((const char *__str_param));
static unsigned long int hash_string PARAMS ((const char *__str_param));
static inline unsigned long
static inline unsigned long int
hash_string (str_param)
const char *str_param;
{
@ -47,8 +46,8 @@ hash_string (str_param)
while (*str != '\0')
{
hval <<= 4;
hval += (unsigned long) *str++;
g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
hval += (unsigned long int) *str++;
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
if (g != 0)
{
hval ^= g >> (HASHWORDBITS - 8);

View File

@ -1,6 +1,6 @@
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
Library.
Copyright (C) 1995 Software Foundation, Inc.
Copyright (C) 1995, 2000, 2001 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
@ -17,27 +17,82 @@ 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 <econfig.h>
# include <config.h>
#endif
#include "libgettext.h"
#include "libgnuintl.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
/* This file redirects the gettext functions (without prefix or suffix) to
those defined in the included GNU gettext library (with "__" suffix).
It is compiled into libintl when the included GNU gettext library is
configured --with-included-gettext.
This redirection works also in the case that the system C library or
the system libintl library contain gettext/textdomain/... functions.
If it didn't, we would need to add preprocessor level redirections to
libgnuintl.h of the following form:
# define gettext gettext__
# define dgettext dgettext__
# define dcgettext dcgettext__
# define ngettext ngettext__
# define dngettext dngettext__
# define dcngettext dcngettext__
# define textdomain textdomain__
# define bindtextdomain bindtextdomain__
# define bind_textdomain_codeset bind_textdomain_codeset__
How does this redirection work? There are two cases.
A. When libintl.a is linked into an executable, it works because
functions defined in the executable always override functions in
the shared libraries.
B. When libintl.so is used, it works because
1. those systems defining gettext/textdomain/... in the C library
(namely, Solaris 2.4 and newer, and GNU libc 2.0 and newer) are
ELF systems and define these symbols as weak, thus explicitly
letting other shared libraries override it.
2. those systems defining gettext/textdomain/... in a standalone
libintl.so library (namely, Solaris 2.3 and newer) have this
shared library in /usr/lib, and the linker will search /usr/lib
*after* the directory where the GNU gettext library is installed.
A third case, namely when libintl.a is linked into a shared library
whose name is not libintl.so, is not supported. In this case, on
Solaris, when -lintl precedes the linker option for the shared library
containing GNU gettext, the system's gettext would indeed override
the GNU gettext. Anyone doing this kind of stuff must be clever enough
to 1. compile libintl.a with -fPIC, 2. remove -lintl from his linker
command line. */
#undef gettext
#undef dgettext
#undef dcgettext
#undef ngettext
#undef dngettext
#undef dcngettext
#undef textdomain
#undef bindtextdomain
#undef bind_textdomain_codeset
char *
bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
gettext (msgid)
const char *msgid;
{
return bindtextdomain__ (domainname, dirname);
return gettext__ (msgid);
}
char *
dgettext (domainname, msgid)
const char *domainname;
const char *msgid;
{
return dgettext__ (domainname, msgid);
}
@ -52,19 +107,35 @@ dcgettext (domainname, msgid, category)
char *
dgettext (domainname, msgid)
const char *domainname;
const char *msgid;
ngettext (msgid1, msgid2, n)
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return dgettext__ (domainname, msgid);
return ngettext__ (msgid1, msgid2, n);
}
char *
gettext (msgid)
const char *msgid;
dngettext (domainname, msgid1, msgid2, n)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
{
return gettext__ (msgid);
return dngettext__ (domainname, msgid1, msgid2, n);
}
char *
dcngettext (domainname, msgid1, msgid2, n, category)
const char *domainname;
const char *msgid1;
const char *msgid2;
unsigned long int n;
int category;
{
return dcngettext__ (domainname, msgid1, msgid2, n, category);
}
@ -74,3 +145,21 @@ textdomain (domainname)
{
return textdomain__ (domainname);
}
char *
bindtextdomain (domainname, dirname)
const char *domainname;
const char *dirname;
{
return bindtextdomain__ (domainname, dirname);
}
char *
bind_textdomain_codeset (domainname, codeset)
const char *domainname;
const char *codeset;
{
return bind_textdomain_codeset__ (domainname, codeset);
}

View File

@ -1,5 +1,4 @@
/* Handle list of needed message catalogs
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
This program is free software; you can redistribute it and/or modify
@ -16,22 +15,18 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Tell glibc's <string.h> to provide a prototype for stpcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#if defined HAVE_STRING_H || defined _LIBC
# ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# endif
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
@ -43,10 +38,7 @@
#endif
#include <ctype.h>
#include <sys/types.h>
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#endif
#include <stdlib.h>
#include "loadinfo.h"
@ -224,7 +216,7 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
/* Construct file name. */
memcpy (abs_filename, dirlist, dirlist_len);
__argz_stringify (abs_filename, dirlist_len, ':');
__argz_stringify (abs_filename, dirlist_len, PATH_SEPARATOR);
cp = abs_filename + (dirlist_len - 1);
*cp++ = '/';
cp = stpcpy (cp, language);
@ -349,10 +341,11 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
names. */
names. The return value is dynamically allocated and has to be
freed by the caller. */
const char *
_nl_normalize_codeset (codeset, name_len)
const unsigned char *codeset;
const char *codeset;
size_t name_len;
{
int len = 0;

View File

@ -1,5 +1,5 @@
/* Message catalogs for internationalization.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
/* Convenience header for conditional use of GNU <libintl.h>.
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
@ -15,168 +15,34 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Because on some systems (e.g. Solaris) we sometimes have to include
the systems libintl.h as well as this file we have more complex
include protection above. But the systems header might perhaps also
define _LIBINTL_H and therefore we have to protect the definition here. */
#if !defined _LIBINTL_H || !defined _LIBGETTEXT_H
#ifndef _LIBINTL_H
# define _LIBINTL_H 1
#endif
#define _LIBGETTEXT_H 1
/* We define an additional symbol to signal that we use the GNU
implementation of gettext. */
#define __USE_GNU_GETTEXT 1
#include <sys/types.h>
#if HAVE_LOCALE_H
# include <locale.h>
#endif
#ifdef __cplusplus
extern "C" {
#endif
/* @@ end of prolog @@ */
#ifndef PARAMS
# if __STDC__ || defined __cplusplus
# define PARAMS(args) args
# else
# define PARAMS(args) ()
# endif
#endif
#ifndef NULL
# if !defined __cplusplus || defined __GNUC__
# define NULL ((void *) 0)
# else
# define NULL (0)
# endif
#endif
#if !HAVE_LC_MESSAGES
/* This value determines the behaviour of the gettext() and dgettext()
function. But some system does not have this defined. Define it
to a default value. */
# define LC_MESSAGES (-1)
#endif
/* Declarations for gettext-using-catgets interface. Derived from
Jim Meyering's libintl.h. */
struct _msg_ent
{
const char *_msg;
int _msg_number;
};
#if HAVE_CATGETS
/* These two variables are defined in the automatically by po-to-tbl.sed
generated file `cat-id-tbl.c'. */
extern const struct _msg_ent _msg_tbl[];
extern int _msg_tbl_length;
#endif
/* For automatical extraction of messages sometimes no real
translation is needed. Instead the string itself is the result. */
#define gettext_noop(Str) (Str)
/* 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));
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));
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));
extern char *dcgettext__ PARAMS ((const char *__domainname,
const char *__msgid, 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));
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));
extern char *bindtextdomain__ PARAMS ((const char *__domainname,
const char *__dirname));
#ifndef _LIBGETTEXT_H
#define _LIBGETTEXT_H 1
/* NLS can be disabled through the configure --disable-nls option. */
#if ENABLE_NLS
/* Solaris 2.3 has the gettext function but dcgettext is missing.
So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
has dcgettext. */
# if !HAVE_CATGETS && (!HAVE_GETTEXT || HAVE_DCGETTEXT)
# define gettext(Msgid) \
dgettext (NULL, Msgid)
# define dgettext(Domainname, Msgid) \
dcgettext (Domainname, Msgid, LC_MESSAGES)
# if defined __GNUC__ && __GNUC__ == 2 && __GNUC_MINOR__ >= 7
/* This global variable is defined in loadmsgcat.c. We need a sign,
whether a new catalog was loaded, which can be associated with all
translations. */
extern int _nl_msg_cat_cntr;
# define dcgettext(Domainname, Msgid, Category) \
(__extension__ \
({ \
char *__result; \
if (__builtin_constant_p (Msgid)) \
{ \
static char *__translation__; \
static int __catalog_counter__; \
if (! __translation__ || __catalog_counter__ != _nl_msg_cat_cntr) \
{ \
__translation__ = \
dcgettext__ (Domainname, Msgid, Category); \
__catalog_counter__ = _nl_msg_cat_cntr; \
} \
__result = __translation__; \
} \
else \
__result = dcgettext__ (Domainname, Msgid, Category); \
__result; \
}))
# endif
# endif
/* Get declarations of GNU message catalog functions. */
# include <libintl.h>
#else
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)
# define textdomain(Domainname) ((char *) Domainname)
# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
# define ngettext(Msgid1, Msgid2, N) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define dngettext(Domainname, Msgid1, Msgid2, N) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define dcngettext(Domainname, Msgid1, Msgid2, N, Category) \
((N) == 1 ? (char *) (Msgid1) : (char *) (Msgid2))
# define textdomain(Domainname) ((char *) (Domainname))
# define bindtextdomain(Domainname, Dirname) ((char *) (Dirname))
# define bind_textdomain_codeset(Domainname, Codeset) ((char *) (Codeset))
#endif
/* @@ begin of epilog @@ */
/* For automatical extraction of messages sometimes no real
translation is needed. Instead the string itself is the result. */
#define gettext_noop(Str) (Str)
#ifdef __cplusplus
}
#endif
#endif
#endif /* _LIBGETTEXT_H */

View File

@ -1,4 +1,4 @@
/* Copyright (C) 1996, 1997 Free Software Foundation, Inc.
/* Copyright (C) 1996-1999, 2000, 2001 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
@ -16,6 +16,9 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifndef _LOADINFO_H
#define _LOADINFO_H 1
#ifndef PARAMS
# if __STDC__
# define PARAMS(args) args
@ -24,6 +27,25 @@
# endif
#endif
#ifndef internal_function
# define internal_function
#endif
/* Tell the compiler when a conditional or integer expression is
almost always true or almost always false. */
#ifndef HAVE_BUILTIN_EXPECT
# define __builtin_expect(expr, val) (expr)
#endif
/* Separator in PATH like lists of pathnames. */
#if defined _WIN32 || defined __WIN32__ || defined __EMX__ || defined __DJGPP__
/* Win32, OS/2, DOS */
# define PATH_SEPARATOR ';'
#else
/* Unix */
# define PATH_SEPARATOR ':'
#endif
/* Encoding of locale name parts. */
#define CEN_REVISION 1
#define CEN_SPONSOR 2
@ -50,7 +72,11 @@ struct loaded_l10nfile
};
extern const char *_nl_normalize_codeset PARAMS ((const unsigned char *codeset,
/* Normalize codeset name. There is no standard for the codeset
names. Normalization allows the user to use any of the common
names. The return value is dynamically allocated and has to be
freed by the caller. */
extern const char *_nl_normalize_codeset PARAMS ((const char *codeset,
size_t name_len));
extern struct loaded_l10nfile *
@ -66,6 +92,8 @@ _nl_make_l10nflist PARAMS ((struct loaded_l10nfile **l10nfile_list,
extern const char *_nl_expand_alias PARAMS ((const char *name));
/* normalized_codeset is dynamically allocated and has to be freed by
the caller. */
extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **modifier,
const char **territory,
@ -74,3 +102,7 @@ extern int _nl_explode_name PARAMS ((char *name, const char **language,
const char **special,
const char **sponsor,
const char **revision));
extern char *_nl_find_language PARAMS ((const char *name));
#endif /* loadinfo.h */

View File

@ -1,5 +1,5 @@
/* Load needed message catalogs.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
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
@ -15,29 +15,68 @@
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 <econfig.h>
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <config.h>
#endif
#include <ctype.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#ifdef __GNUC__
# define alloca __builtin_alloca
# define HAVE_ALLOCA 1
#else
# if defined HAVE_ALLOCA_H || defined _LIBC
# include <alloca.h>
# else
# ifdef _AIX
#pragma alloca
# else
# ifndef alloca
char *alloca ();
# endif
# endif
# endif
#endif
#include <stdlib.h>
#include <string.h>
#if defined HAVE_UNISTD_H || defined _LIBC
# include <unistd.h>
#endif
#if (defined HAVE_MMAP && defined HAVE_MUNMAP) || defined _LIBC
#ifdef _LIBC
# include <langinfo.h>
# include <locale.h>
#endif
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| (defined _LIBC && defined _POSIX_MAPPED_FILES)
# include <sys/mman.h>
# undef HAVE_MMAP
# define HAVE_MMAP 1
#else
# undef HAVE_MMAP
#endif
#include "gettext.h"
#include "gettextP.h"
#ifdef _LIBC
# include "../locale/localeinfo.h"
#endif
/* @@ end of prolog @@ */
#ifdef _LIBC
@ -51,32 +90,275 @@
# define munmap __munmap
#endif
/* 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 PLURAL_PARSE __gettextparse
#else
# define PLURAL_PARSE gettextparse__
#endif
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
# define freea(p) /* nothing */
#else
# define alloca(n) malloc (n)
# define freea(p) free (p)
#endif
/* For systems that distinguish between text and binary I/O.
O_BINARY is usually declared in <fcntl.h>. */
#if !defined O_BINARY && defined _O_BINARY
/* For MSC-compatible compilers. */
# define O_BINARY _O_BINARY
# define O_TEXT _O_TEXT
#endif
#ifdef __BEOS__
/* BeOS 5 has O_BINARY and O_TEXT, but they have no effect. */
# undef O_BINARY
# undef O_TEXT
#endif
/* On reasonable systems, binary I/O is the default. */
#ifndef O_BINARY
# define O_BINARY 0
#endif
/* We need a sign, whether a new catalog was loaded, which can be associated
with all translations. This is important if the translations are
cached by one of GCC's features. */
int _nl_msg_cat_cntr = 0;
int _nl_msg_cat_cntr;
#if (defined __GNUC__ && !defined __APPLE_CC__) \
|| (defined __STDC_VERSION__ && __STDC_VERSION__ >= 199901L)
/* These structs are the constant expression for the germanic plural
form determination. It represents the expression "n != 1". */
static const struct expression plvar =
{
.nargs = 0,
.operation = var,
};
static const struct expression plone =
{
.nargs = 0,
.operation = num,
.val =
{
.num = 1
}
};
static struct expression germanic_plural =
{
.nargs = 2,
.operation = not_equal,
.val =
{
.args =
{
[0] = (struct expression *) &plvar,
[1] = (struct expression *) &plone
}
}
};
# define INIT_GERMANIC_PLURAL()
#else
/* For compilers without support for ISO C 99 struct/union initializers:
Initialization at run-time. */
static struct expression plvar;
static struct expression plone;
static struct expression germanic_plural;
static void
init_germanic_plural ()
{
if (plone.val.num == 0)
{
plvar.nargs = 0;
plvar.operation = var;
plone.nargs = 0;
plone.operation = num;
plone.val.num = 1;
germanic_plural.nargs = 2;
germanic_plural.operation = not_equal;
germanic_plural.val.args[0] = &plvar;
germanic_plural.val.args[1] = &plone;
}
}
# define INIT_GERMANIC_PLURAL() init_germanic_plural ()
#endif
/* Initialize the codeset dependent parts of an opened message catalog.
Return the header entry. */
const char *
internal_function
_nl_init_domain_conv (domain_file, domain, domainbinding)
struct loaded_l10nfile *domain_file;
struct loaded_domain *domain;
struct binding *domainbinding;
{
/* Find out about the character set the file is encoded with.
This can be found (in textual form) in the entry "". If this
entry does not exist or if this does not contain the `charset='
information, we will assume the charset matches the one the
current locale and we don't have to perform any conversion. */
char *nullentry;
size_t nullentrylen;
/* Preinitialize fields, to avoid recursion during _nl_find_msg. */
domain->codeset_cntr =
(domainbinding != NULL ? domainbinding->codeset_cntr : 0);
#ifdef _LIBC
domain->conv = (__gconv_t) -1;
#else
# if HAVE_ICONV
domain->conv = (iconv_t) -1;
# endif
#endif
domain->conv_tab = NULL;
/* Get the header entry. */
nullentry = _nl_find_msg (domain_file, domainbinding, "", &nullentrylen);
if (nullentry != NULL)
{
#if defined _LIBC || HAVE_ICONV
const char *charsetstr;
charsetstr = strstr (nullentry, "charset=");
if (charsetstr != NULL)
{
size_t len;
char *charset;
const char *outcharset;
charsetstr += strlen ("charset=");
len = strcspn (charsetstr, " \t\n");
charset = (char *) alloca (len + 1);
# if defined _LIBC || HAVE_MEMPCPY
*((char *) mempcpy (charset, charsetstr, len)) = '\0';
# else
memcpy (charset, charsetstr, len);
charset[len] = '\0';
# endif
/* The output charset should normally be determined by the
locale. But sometimes the locale is not used or not correctly
set up, so we provide a possibility for the user to override
this. Moreover, the value specified through
bind_textdomain_codeset overrides both. */
if (domainbinding != NULL && domainbinding->codeset != NULL)
outcharset = domainbinding->codeset;
else
{
outcharset = getenv ("OUTPUT_CHARSET");
if (outcharset == NULL || outcharset[0] == '\0')
{
# ifdef _LIBC
outcharset = (*_nl_current[LC_CTYPE])->values[_NL_ITEM_INDEX (CODESET)].string;
# else
# if HAVE_ICONV
extern const char *locale_charset (void);
outcharset = locale_charset ();
# endif
# endif
}
}
# ifdef _LIBC
/* We always want to use transliteration. */
outcharset = norm_add_slashes (outcharset, "TRANSLIT");
charset = norm_add_slashes (charset, NULL);
if (__gconv_open (outcharset, charset, &domain->conv,
GCONV_AVOID_NOCONV)
!= __GCONV_OK)
domain->conv = (__gconv_t) -1;
# else
# if HAVE_ICONV
/* When using GNU libiconv, we want to use transliteration. */
# if _LIBICONV_VERSION >= 0x0105
len = strlen (outcharset);
{
char *tmp = (char *) alloca (len + 10 + 1);
memcpy (tmp, outcharset, len);
memcpy (tmp + len, "//TRANSLIT", 10 + 1);
outcharset = tmp;
}
# endif
domain->conv = iconv_open (outcharset, charset);
# if _LIBICONV_VERSION >= 0x0105
freea (outcharset);
# endif
# endif
# endif
freea (charset);
}
#endif /* _LIBC || HAVE_ICONV */
}
return nullentry;
}
/* Frees the codeset dependent parts of an opened message catalog. */
void
internal_function
_nl_free_domain_conv (domain)
struct loaded_domain *domain;
{
if (domain->conv_tab != NULL && domain->conv_tab != (char **) -1)
free (domain->conv_tab);
#ifdef _LIBC
if (domain->conv != (__gconv_t) -1)
__gconv_close (domain->conv);
#else
# if HAVE_ICONV
if (domain->conv != (iconv_t) -1)
iconv_close (domain->conv);
# endif
#endif
}
/* Load the message catalogs specified by FILENAME. If it is no valid
message catalog do nothing. */
void
internal_function
_nl_load_domain (domain_file)
_nl_load_domain (domain_file, domainbinding)
struct loaded_l10nfile *domain_file;
struct binding *domainbinding;
{
int fd;
size_t size;
#ifdef _LIBC
struct stat64 st;
#else
struct stat st;
struct mo_file_header *data = (struct mo_file_header *) -1;
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
int use_mmap = 0;
#endif
struct mo_file_header *data = (struct mo_file_header *) -1;
int use_mmap = 0;
struct loaded_domain *domain;
const char *nullentry;
domain_file->decided = 1;
domain_file->data = NULL;
/* Note that it would be useless to store domainbinding in domain_file
because domainbinding might be == NULL now but != NULL later (after
a call to bind_textdomain_codeset). */
/* If the record does not represent a valid locale the FILENAME
might be NULL. This can happen when according to the given
specification the locale file name is different for XPG and CEN
@ -85,28 +367,32 @@ _nl_load_domain (domain_file)
return;
/* Try to open the addressed file. */
fd = open (domain_file->filename, O_RDONLY);
fd = open (domain_file->filename, O_RDONLY | O_BINARY);
if (fd == -1)
return;
/* We must know about the size of the file. */
if (fstat (fd, &st) != 0
|| (size = (size_t) st.st_size) != st.st_size
|| size < sizeof (struct mo_file_header))
if (
#ifdef _LIBC
__builtin_expect (fstat64 (fd, &st) != 0, 0)
#else
__builtin_expect (fstat (fd, &st) != 0, 0)
#endif
|| __builtin_expect ((size = (size_t) st.st_size) != st.st_size, 0)
|| __builtin_expect (size < sizeof (struct mo_file_header), 0))
{
/* Something went wrong. */
close (fd);
return;
}
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
#ifdef HAVE_MMAP
/* Now we are ready to load the file. If mmap() is available we try
this first. If not available or it failed we try to load it. */
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
MAP_PRIVATE, fd, 0);
if (data != (struct mo_file_header *) -1)
if (__builtin_expect (data != (struct mo_file_header *) -1, 1))
{
/* mmap() call was successful. */
close (fd);
@ -130,12 +416,15 @@ _nl_load_domain (domain_file)
do
{
long int nb = (long int) read (fd, read_ptr, to_read);
if (nb == -1)
if (nb <= 0)
{
#ifdef EINTR
if (nb == -1 && errno == EINTR)
continue;
#endif
close (fd);
return;
}
read_ptr += nb;
to_read -= nb;
}
@ -146,11 +435,11 @@ _nl_load_domain (domain_file)
/* Using the magic number we can test whether it really is a message
catalog file. */
if (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED)
if (__builtin_expect (data->magic != _MAGIC && data->magic != _MAGIC_SWAPPED,
0))
{
/* The magic number is wrong: not a message catalog file. */
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
else
@ -159,17 +448,13 @@ _nl_load_domain (domain_file)
return;
}
domain_file->data
= (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
if (domain_file->data == NULL)
domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
if (domain == NULL)
return;
domain_file->data = domain;
domain = (struct loaded_domain *) domain_file->data;
domain->data = (char *) data;
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
domain->use_mmap = use_mmap;
#endif
domain->mmap_size = size;
domain->must_swap = data->magic != _MAGIC;
@ -187,9 +472,8 @@ _nl_load_domain (domain_file)
((char *) data + W (domain->must_swap, data->hash_tab_offset));
break;
default:
/* This is an illegal revision. */
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|| defined _LIBC
/* This is an invalid revision. */
#ifdef HAVE_MMAP
if (use_mmap)
munmap ((caddr_t) data, size);
else
@ -200,9 +484,62 @@ _nl_load_domain (domain_file)
return;
}
/* Show that one domain is changed. This might make some cached
translations invalid. */
++_nl_msg_cat_cntr;
/* Now initialize the character set converter from the character set
the file is encoded with (found in the header entry) to the domain's
specified character set or the locale's character set. */
nullentry = _nl_init_domain_conv (domain_file, domain, domainbinding);
/* Also look for a plural specification. */
if (nullentry != NULL)
{
const char *plural;
const char *nplurals;
plural = strstr (nullentry, "plural=");
nplurals = strstr (nullentry, "nplurals=");
if (plural == NULL || nplurals == NULL)
goto no_plural;
else
{
/* First get the number. */
char *endp;
unsigned long int n;
struct parse_args args;
nplurals += 9;
while (*nplurals != '\0' && isspace (*nplurals))
++nplurals;
#if defined HAVE_STRTOUL || defined _LIBC
n = strtoul (nplurals, &endp, 10);
#else
for (endp = nplurals, n = 0; *endp >= '0' && *endp <= '9'; endp++)
n = n * 10 + (*endp - '0');
#endif
domain->nplurals = n;
if (nplurals == endp)
goto no_plural;
/* Due to the restrictions bison imposes onto the interface of the
scanner function we have to put the input string and the result
passed up from the parser into the same structure which address
is passed down to the parser. */
plural += 7;
args.cp = plural;
if (PLURAL_PARSE (&args) != 0)
goto no_plural;
domain->plural = args.res;
}
}
else
{
/* By default we are using the Germanic form: singular form only
for `one', the plural form otherwise. Yes, this is also what
English is using since English is a Germanic language. */
no_plural:
INIT_GERMANIC_PLURAL ();
domain->plural = &germanic_plural;
domain->nplurals = 2;
}
}
@ -212,9 +549,16 @@ internal_function
_nl_unload_domain (domain)
struct loaded_domain *domain;
{
if (domain->plural != &germanic_plural)
__gettext_free_exp (domain->plural);
_nl_free_domain_conv (domain);
# ifdef _POSIX_MAPPED_FILES
if (domain->use_mmap)
munmap ((caddr_t) domain->data, domain->mmap_size);
else
# endif /* _POSIX_MAPPED_FILES */
free ((void *) domain->data);
free (domain);

View File

@ -1,6 +1,5 @@
/* Handle aliases for locale names.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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
@ -16,8 +15,15 @@
along with this program; if not, write to the Free Software Foundation,
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
/* Tell glibc's <string.h> to provide a prototype for mempcpy().
This must come before <config.h> because <config.h> may include
<features.h>, and once <features.h> has been included, it's too late. */
#ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
#endif
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#include <ctype.h>
@ -41,35 +47,15 @@ char *alloca ();
# endif
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#else
char *getenv ();
# ifdef HAVE_MALLOC_H
# include <malloc.h>
# else
void free ();
# endif
#endif
#include <stdlib.h>
#if defined HAVE_STRING_H || defined _LIBC
# ifndef _GNU_SOURCE
# define _GNU_SOURCE 1
# endif
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#include <string.h>
#if !HAVE_STRCHR && !defined _LIBC
# ifndef strchr
# define strchr index
# endif
#endif
#include "gettext.h"
#include "gettextP.h"
/* @@ end of prolog @@ */
@ -80,7 +66,9 @@ void free ();
file and the name space must not be polluted. */
# define strcasecmp __strcasecmp
# define mempcpy __mempcpy
# ifndef mempcpy
# define mempcpy __mempcpy
# endif
# define HAVE_MEMPCPY 1
/* We need locking here since we can be called from different places. */
@ -89,41 +77,27 @@ void free ();
__libc_lock_define_initialized (static, lock);
#endif
#ifndef internal_function
# define internal_function
#endif
/* For those loosing systems which don't have `alloca' we have to add
/* For those losing systems which don't have `alloca' we have to add
some additional code emulating it. */
#ifdef HAVE_ALLOCA
/* Nothing has to be done. */
# define ADD_BLOCK(list, address) /* nothing */
# define FREE_BLOCKS(list) /* nothing */
# define freea(p) /* nothing */
#else
struct block_list
{
void *address;
struct block_list *next;
};
# define ADD_BLOCK(list, addr) \
do { \
struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
/* If we cannot get a free block we cannot add the new element to \
the list. */ \
if (newp != NULL) { \
newp->address = (addr); \
newp->next = (list); \
(list) = newp; \
} \
} while (0)
# define FREE_BLOCKS(list) \
do { \
while (list != NULL) { \
struct block_list *old = list; \
list = list->next; \
free (old); \
} \
} while (0)
# undef alloca
# define alloca(size) (malloc (size))
#endif /* have alloca */
# define alloca(n) malloc (n)
# define freea(p) free (p)
#endif
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
# undef fgets
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
#endif
#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
# undef feof
# define feof(s) feof_unlocked (s)
#endif
struct alias_map
@ -133,18 +107,18 @@ struct alias_map
};
static char *string_space = NULL;
static size_t string_space_act = 0;
static size_t string_space_max = 0;
static char *string_space;
static size_t string_space_act;
static size_t string_space_max;
static struct alias_map *map;
static size_t nmap = 0;
static size_t maxmap = 0;
static size_t nmap;
static size_t maxmap;
/* Prototypes for local functions. */
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
internal_function;
static void extend_alias_table PARAMS ((void));
static int extend_alias_table PARAMS ((void));
static int alias_compare PARAMS ((const struct alias_map *map1,
const struct alias_map *map2));
@ -190,11 +164,12 @@ _nl_expand_alias (name)
{
const char *start;
while (locale_alias_path[0] == ':')
while (locale_alias_path[0] == PATH_SEPARATOR)
++locale_alias_path;
start = locale_alias_path;
while (locale_alias_path[0] != '\0' && locale_alias_path[0] != ':')
while (locale_alias_path[0] != '\0'
&& locale_alias_path[0] != PATH_SEPARATOR)
++locale_alias_path;
if (start < locale_alias_path)
@ -217,16 +192,12 @@ read_alias_file (fname, fname_len)
const char *fname;
int fname_len;
{
#ifndef HAVE_ALLOCA
struct block_list *block_list = NULL;
#endif
FILE *fp;
char *full_fname;
size_t added;
static const char aliasfile[] = "/locale.alias";
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
ADD_BLOCK (block_list, full_fname);
#ifdef HAVE_MEMPCPY
mempcpy (mempcpy (full_fname, fname, fname_len),
aliasfile, sizeof aliasfile);
@ -236,11 +207,9 @@ read_alias_file (fname, fname_len)
#endif
fp = fopen (full_fname, "r");
freea (full_fname);
if (fp == NULL)
{
FREE_BLOCKS (block_list);
return 0;
}
return 0;
added = 0;
while (!feof (fp))
@ -250,10 +219,10 @@ read_alias_file (fname, fname_len)
b) these fields must be usable as file names and so must not
be that long
*/
unsigned char buf[BUFSIZ];
unsigned char *alias;
unsigned char *value;
unsigned char *cp;
char buf[BUFSIZ];
char *alias;
char *value;
char *cp;
if (fgets (buf, sizeof buf, fp) == NULL)
/* EOF reached. */
@ -312,7 +281,8 @@ read_alias_file (fname, fname_len)
*cp++ = '\0';
if (nmap >= maxmap)
extend_alias_table ();
if (__builtin_expect (extend_alias_table (), 0))
return added;
alias_len = strlen (alias) + 1;
value_len = strlen (value) + 1;
@ -325,10 +295,19 @@ read_alias_file (fname, fname_len)
? alias_len + value_len : 1024));
char *new_pool = (char *) realloc (string_space, new_size);
if (new_pool == NULL)
return added;
if (__builtin_expect (string_space != new_pool, 0))
{
FREE_BLOCKS (block_list);
return added;
size_t i;
for (i = 0; i < nmap; i++)
{
map[i].alias += new_pool - string_space;
map[i].value += new_pool - string_space;
}
}
string_space = new_pool;
string_space_max = new_size;
}
@ -355,12 +334,11 @@ read_alias_file (fname, fname_len)
qsort (map, nmap, sizeof (struct alias_map),
(int (*) PARAMS ((const void *, const void *))) alias_compare);
FREE_BLOCKS (block_list);
return added;
}
static void
static int
extend_alias_table ()
{
size_t new_size;
@ -371,10 +349,11 @@ extend_alias_table ()
* sizeof (struct alias_map)));
if (new_map == NULL)
/* Simply don't extend: we don't have any more core. */
return;
return -1;
map = new_map;
maxmap = new_size;
return 0;
}

View File

@ -1,6 +1,5 @@
/* Implementation of the textdomain(3) function.
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
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
@ -17,26 +16,35 @@
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
#ifdef HAVE_CONFIG_H
# include <econfig.h>
# include <config.h>
#endif
#if defined STDC_HEADERS || defined _LIBC
# include <stdlib.h>
#endif
#if defined STDC_HEADERS || defined HAVE_STRING_H || defined _LIBC
# include <string.h>
#else
# include <strings.h>
# ifndef memcpy
# define memcpy(Dst, Src, Num) bcopy (Src, Dst, Num)
# endif
#endif
#include <stdlib.h>
#include <string.h>
#ifdef _LIBC
# include <libintl.h>
#else
# include "libgettext.h"
# include "libgnuintl.h"
#endif
#include "gettextP.h"
#ifdef _LIBC
/* We have to handle multi-threaded applications. */
# include <bits/libc-lock.h>
#else
/* Provide dummy implementation if this is outside glibc. */
# define __libc_rwlock_define(CLASS, NAME)
# define __libc_rwlock_wrlock(NAME)
# define __libc_rwlock_unlock(NAME)
#endif
/* The internal variables in the standalone libintl.a must have different
names than the internal variables in GNU libc, otherwise programs
using libintl.a cannot be linked statically. */
#if !defined _LIBC
# define _nl_default_default_domain _nl_default_default_domain__
# define _nl_current_default_domain _nl_current_default_domain__
#endif
/* @@ end of prolog @@ */
@ -61,6 +69,9 @@ extern const char *_nl_current_default_domain;
# define TEXTDOMAIN textdomain__
#endif
/* Lock variable to protect the global data in the gettext implementation. */
__libc_rwlock_define (extern, _nl_state_lock)
/* 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". */
@ -68,38 +79,60 @@ char *
TEXTDOMAIN (domainname)
const char *domainname;
{
char *old;
char *new_domain;
char *old_domain;
/* A NULL pointer requests the current setting. */
if (domainname == NULL)
return (char *) _nl_current_default_domain;
old = (char *) _nl_current_default_domain;
__libc_rwlock_wrlock (_nl_state_lock);
old_domain = (char *) _nl_current_default_domain;
/* If domain name is the null string set to default domain "messages". */
if (domainname[0] == '\0'
|| strcmp (domainname, _nl_default_default_domain) == 0)
_nl_current_default_domain = _nl_default_default_domain;
{
_nl_current_default_domain = _nl_default_default_domain;
new_domain = (char *) _nl_current_default_domain;
}
else if (strcmp (domainname, old_domain) == 0)
/* This can happen and people will use it to signal that some
environment variable changed. */
new_domain = old_domain;
else
{
/* If the following malloc fails `_nl_current_default_domain'
will be NULL. This value will be returned and so signals we
are out of core. */
#if defined _LIBC || defined HAVE_STRDUP
_nl_current_default_domain = strdup (domainname);
new_domain = strdup (domainname);
#else
size_t len = strlen (domainname) + 1;
char *cp = (char *) malloc (len);
if (cp != NULL)
memcpy (cp, domainname, len);
_nl_current_default_domain = cp;
new_domain = (char *) malloc (len);
if (new_domain != NULL)
memcpy (new_domain, domainname, len);
#endif
if (new_domain != NULL)
_nl_current_default_domain = new_domain;
}
if (old != _nl_default_default_domain)
free (old);
/* We use this possibility to signal a change of the loaded catalogs
since this is most likely the case and there is no other easy we
to do it. Do it only when the call was successful. */
if (new_domain != NULL)
{
++_nl_msg_cat_cntr;
return (char *) _nl_current_default_domain;
if (old_domain != new_domain && old_domain != _nl_default_default_domain)
free (old_domain);
}
__libc_rwlock_unlock (_nl_state_lock);
return new_domain;
}
#ifdef _LIBC

View File

@ -0,0 +1,6 @@
2003-03-27 gettextize <bug-gnu-utils@gnu.org>
* Makefile.in.in: Upgrade to gettext-0.10.38.
* cat-id-tbl.c: Remove file.
* stamp-cat-id: Remove file.

View File

@ -1,5 +1,5 @@
# Makefile for program source directory in GNU NLS utilities package.
# Copyright (C) 1995, 1996, 1997 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
# Copyright (C) 1995-1997, 2000, 2001 by Ulrich Drepper <drepper@gnu.ai.mit.edu>
#
# This file file be copied and used freely without restrictions. It can
# be used in projects which are not available under the GNU Public License
@ -9,6 +9,10 @@
PACKAGE = @PACKAGE@
VERSION = @VERSION@
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
SHELL = /bin/sh
@SET_MAKE@
@ -18,24 +22,20 @@ VPATH = @srcdir@
prefix = @prefix@
exec_prefix = @exec_prefix@
datadir = $(prefix)/@DATADIRNAME@
localedir = @LOCALEDIR@
gnulocaledir = @LOCALEDIR@
gettextsrcdir = $(prefix)/share/gettext/po
subdir = po
DESTDIR=
datadir = @datadir@
localedir = $(datadir)/locale
gettextsrcdir = $(datadir)/gettext/po
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
MKINSTALLDIRS = $(top_srcdir)/@MKINSTALLDIRS@
MKINSTALLDIRS = @MKINSTALLDIRS@
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
CC = @CC@
GENCAT = @GENCAT@
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
GMSGFMT = @GMSGFMT@
MSGFMT = @MSGFMT@
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
MSGMERGE = PATH=../src:$$PATH msgmerge
XGETTEXT = @XGETTEXT@
MSGMERGE = msgmerge
DEFS = @DEFS@
CFLAGS = @CFLAGS@
@ -45,20 +45,17 @@ INCLUDES = -I.. -I$(top_srcdir)/intl
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
SOURCES = cat-id-tbl.c
POFILES = @POFILES@
GMOFILES = @GMOFILES@
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
$(POFILES) $(GMOFILES)
POTFILES = \
CATALOGS = @CATALOGS@
CATOBJEXT = @CATOBJEXT@
INSTOBJEXT = @INSTOBJEXT@
.SUFFIXES:
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
.SUFFIXES: .c .o .po .pox .gmo .mo
.c.o:
$(COMPILE) $<
@ -72,19 +69,19 @@ INSTOBJEXT = @INSTOBJEXT@
.po.gmo:
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
&& rm -f $$file && $(GMSGFMT) -o $$file $<
.po.cat:
sed -f ../intl/po2msg.sed < $< > $*.msg \
&& rm -f $@ && $(GENCAT) $@ $*.msg
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
all: all-@USE_NLS@
all-yes: cat-id-tbl.c $(CATALOGS)
all-yes: $(CATALOGS)
all-no:
$(srcdir)/$(PACKAGE).pot: $(POTFILES)
# Note: Target 'all' must not depend on target '$(srcdir)/$(PACKAGE).pot',
# otherwise packages like GCC can not be built if only parts of the source
# have been downloaded.
$(srcdir)/$(PACKAGE).pot: $(POTFILES) $(srcdir)/POTFILES.in
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
--add-comments --keyword=_ --keyword=N_ \
--files-from=$(srcdir)/POTFILES.in \
@ -92,78 +89,35 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES)
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
&& mv $(PACKAGE).po $(srcdir)/$(PACKAGE).pot )
$(srcdir)/cat-id-tbl.c: stamp-cat-id; @:
$(srcdir)/stamp-cat-id: $(PACKAGE).pot
rm -f cat-id-tbl.tmp
sed -f ../intl/po2tbl.sed $(srcdir)/$(PACKAGE).pot \
| sed -e "s/@PACKAGE NAME@/$(PACKAGE)/" > cat-id-tbl.tmp
if cmp -s cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; then \
rm cat-id-tbl.tmp; \
else \
echo cat-id-tbl.c changed; \
rm -f $(srcdir)/cat-id-tbl.c; \
mv cat-id-tbl.tmp $(srcdir)/cat-id-tbl.c; \
fi
cd $(srcdir) && rm -f stamp-cat-id && echo timestamp > stamp-cat-id
install: install-exec install-data
install-exec:
install-data: install-data-@USE_NLS@
install-data-no: all
install-data-yes: all
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(datadir); \
fi
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
case "$$cat" in \
*.gmo) destdir=$(gnulocaledir);; \
*) destdir=$(localedir);; \
esac; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
dir=$$destdir/$$lang/LC_MESSAGES; \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$$dir; \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
fi; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT); \
echo "installing $(srcdir)/$$cat as" \
"$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
fi; \
if test -r $$cat.m; then \
$(INSTALL_DATA) $$cat.m $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $$cat.m as $(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
if test -r $(srcdir)/$$cat.m ; then \
$(INSTALL_DATA) $(srcdir)/$$cat.m \
$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
echo "installing $(srcdir)/$$cat as" \
"$(DESTDIR)$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
else \
true; \
fi; \
fi; \
done
if test "$(PACKAGE)" = "gettext"; then \
if test -r "$(MKINSTALLDIRS)"; then \
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
else \
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
fi; \
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
install-data-no: all
install-data-yes: all
$(mkinstalldirs) $(DESTDIR)$(datadir)
@catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
dir=$(localedir)/$$lang/LC_MESSAGES; \
$(mkinstalldirs) $(DESTDIR)$$dir; \
if test -r $$cat; then \
$(INSTALL_DATA) $$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $$cat as $(DESTDIR)$$dir/$(PACKAGE).mo"; \
else \
$(INSTALL_DATA) $(srcdir)/$$cat $(DESTDIR)$$dir/$(PACKAGE).mo; \
echo "installing $(srcdir)/$$cat as" \
"$(DESTDIR)$$dir/$(PACKAGE).mo"; \
fi; \
done
# Define this as empty until I found a useful application.
installcheck:
@ -172,76 +126,68 @@ uninstall:
catalogs='$(CATALOGS)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
rm -f $(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
done
rm -f $(gettextsrcdir)/po-Makefile.in.in
if test "$(PACKAGE)" = "gettext"; then \
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
else \
: ; \
fi
check: all
cat-id-tbl.o: ../intl/libgettext.h
dvi info tags TAGS ID:
mostlyclean:
rm -f core core.* *.pox $(PACKAGE).po *.old.po cat-id-tbl.tmp
rm -f core core.* *.pox $(PACKAGE).po *.new.po
rm -fr *.o
clean: mostlyclean
distclean: clean
rm -f Makefile Makefile.in POTFILES *.mo *.gmo *.msg *.cat *.cat.m
rm -f Makefile Makefile.in POTFILES *.mo
maintainer-clean: distclean
@echo "This command is intended for maintainers to use;"
@echo "it deletes files that may require special tools to rebuild."
rm -f $(GMOFILES)
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir: update-po $(DISTFILES)
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
dist distdir:
$(MAKE) update-po
@$(MAKE) dist2
# This is a separate target because 'update-po' must be executed before.
dist2: $(DISTFILES)
dists="$(DISTFILES)"; \
for file in $$dists; do \
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|| cp -p $(srcdir)/$$file $(distdir); \
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
cp -p $$dir/$$file $(distdir); \
done
update-po: Makefile
$(MAKE) $(PACKAGE).pot
PATH=`pwd`/../src:$$PATH; \
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
cd $(srcdir); \
catalogs='$(CATALOGS)'; \
catalogs='$(GMOFILES)'; \
for cat in $$catalogs; do \
cat=`basename $$cat`; \
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
mv $$lang.po $$lang.old.po; \
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
echo "$$lang:"; \
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
rm -f $$lang.old.po; \
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
mv -f $$lang.new.po $$lang.po; \
else \
echo "msgmerge for $$cat failed!"; \
rm -f $$lang.po; \
mv $$lang.old.po $$lang.po; \
rm -f $$lang.new.po; \
fi; \
done
$(MAKE) update-gmo
POTFILES: POTFILES.in
( if test 'x$(srcdir)' != 'x.'; then \
posrcprefix='$(top_srcdir)/'; \
else \
posrcprefix="../"; \
fi; \
rm -f $@-t $@ \
&& (sed -e '/^#/d' -e '/^[ ]*$$/d' \
-e "s@.*@ $$posrcprefix& \\\\@" < $(srcdir)/$@.in \
| sed -e '$$s/\\$$//') > $@-t \
&& chmod a-w $@-t \
&& mv $@-t $@ )
update-gmo: Makefile $(GMOFILES)
@:
Makefile: Makefile.in.in ../config.status POTFILES
cd .. \
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
cd $(top_builddir) \
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
$(SHELL) ./config.status

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-03-29 21:12+0200\n"
"Last-Translator: Matthias Warkus <mawa@iname.com>\n"
"Language-Team: Enlightenment l10n <e-develop@enlightenment.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-03-02 16:23+0100\n"
"Last-Translator: Birger Langkjer <birger.langkjer@image.dk>\n"
"Language-Team: Dansk/Danish <sslug-locale@sslug.dk>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-04 23:15+0100\n"
"Last-Translator: Peter Kjellerstedt <pkj@axis.com>\n"
"Language-Team: American English <en@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-04-09 18:46+0200\n"
"Last-Translator: Antonio Ognio Cesti <ognio@altavista.net>\n"
"Language-Team: Spanish <es@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-05 00:25+0100\n"
"Last-Translator: Sylvain GIL <tootella@tootella.com>\n"
"Language-Team: French <fr@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-04 23:15+0100\n"
"Last-Translator: Gergely Egerváry <mauzi@poli.hu>\n"
"Language-Team: Hungarian <hu@li.org>\n"

View File

@ -10,7 +10,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2001-01-07 14:00+0900\n"
"Last-Translator: Enlightenment-jp Mailing List <enlightenment-jp@UaUa.ORG>\n"
"Language-Team: Japanese <ja@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-04-10 16:10:30+0900\n"
"Last-Translator: Sung-Hyun Nam <namsh@kldp.org>\n"
"Language-Team: Korean <ko@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-04 23:15+0100\n"
"Last-Translator: Dènis Riedijk <ried@si.tn.tudelft.nl>\n"
"Language-Team: Dutch <nl@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-03-07 12:08+0100\n"
"Last-Translator: Terje Røsten <terjeros@phys.ntnu.no>\n"
"Language-Team: Norwegian <no@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-04 23:15+0100\n"
"Last-Translator: Adam Kisiel <kisiel@if.pw.edu.pl>\n"
"Language-Team: Polshi <pl@li.org>\n"

View File

@ -6,7 +6,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-03-07 16:35+0100\n"
"Last-Translator: Daniel Vieira Pereira <gunsmithcat@ip.pt>\n"
"Language-Team: Portuguese <pt@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-02-24 16:22+0100\n"
"Last-Translator: Roberto S. Teixeira <robteix@zaz.com.br>\n"
"Language-Team: Portuguese <pt@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-01-14 20:43-0300\n"
"Last-Translator: Vladimir STEPANOV <stepanov@bird.iki.rssi.ru>\n"
"Language-Team: Russian <ru@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-04-10 17:30+0200\n"
"Last-Translator: Bernt Holmberg <bernt@grub01.physto.se>\n"
"Language-Team: Swedish <sv@li.org>\n"

View File

@ -5,7 +5,7 @@
msgid ""
msgstr ""
"Project-Id-Version: enlightenment 0.16.5\n"
"POT-Creation-Date: 2003-03-22 09:50-0500\n"
"POT-Creation-Date: 2003-03-27 11:11+1100\n"
"PO-Revision-Date: 2000-07-30 22:39+0200\n"
"Last-Translator: Fatih Demir <kabalak@gmx.net>\n"
"Language-Team: Turkish <tr@li.org>\n"

View File

@ -114,7 +114,7 @@ LDADD = \
$(XINERAMA_LIBS) \
-lm
INCLUDES=-I$(top_srcdir) $(ESD_CFLAGS) $(IMLIB_CFLAGS) -I$(includedir) -I.. -I../intl -I$(top_srcdir)/intl
INCLUDES=-I$(top_srcdir) $(ESD_CFLAGS) $(IMLIB_CFLAGS) -I$(includedir) -I.. -I../intl -I$(top_srcdir)/intl -I/usr/include/freetype1
DEFS=-DENLIGHTENMENT_ROOT=\"@ENLIGHTENMENT_ROOT@\" -DENLIGHTENMENT_BIN=\"@ENLIGHTENMENT_BIN@\" -DLOCALEDIR=\"@LOCALEDIR@\"