mirror of
https://git.savannah.gnu.org/git/bison.git
synced 2026-03-09 12:23:04 +00:00
* config/: New.
* configure.in: Require Autoconf 2.50. Update to gettext 0.10.38.
This commit is contained in:
@@ -1,3 +1,9 @@
|
|||||||
|
2001-07-14 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
|
* config/: New.
|
||||||
|
* configure.in: Require Autoconf 2.50.
|
||||||
|
Update to gettext 0.10.38.
|
||||||
|
|
||||||
2001-03-16 Akim Demaille <akim@epita.fr>
|
2001-03-16 Akim Demaille <akim@epita.fr>
|
||||||
|
|
||||||
* doc/bison.texinfo: ANSIfy the examples.
|
* doc/bison.texinfo: ANSIfy the examples.
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ AUTOMAKE_OPTIONS = 1.4 check-news readme-alpha
|
|||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
SUBDIRS = intl po lib src doc m4 tests
|
SUBDIRS = config intl po lib src doc m4 tests
|
||||||
|
|
||||||
EXTRA_DIST = REFERENCES configure.bat OChangeLog THANKS
|
EXTRA_DIST = REFERENCES configure.bat OChangeLog THANKS
|
||||||
|
|
||||||
|
|||||||
27
Makefile.in
27
Makefile.in
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -57,7 +57,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -67,15 +70,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -90,24 +93,23 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.4 check-news readme-alpha
|
AUTOMAKE_OPTIONS = 1.4 check-news readme-alpha
|
||||||
|
|
||||||
ACLOCAL_AMFLAGS = -I m4
|
ACLOCAL_AMFLAGS = -I m4
|
||||||
|
|
||||||
SUBDIRS = intl po lib src doc m4 tests
|
SUBDIRS = config intl po lib src doc m4 tests
|
||||||
|
|
||||||
EXTRA_DIST = REFERENCES configure.bat OChangeLog THANKS
|
EXTRA_DIST = REFERENCES configure.bat OChangeLog THANKS
|
||||||
|
|
||||||
DISTCLEANFILES = intl/libintl.h
|
DISTCLEANFILES = intl/libintl.h
|
||||||
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
ACLOCAL_M4 = $(top_srcdir)/aclocal.m4
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = config.h
|
CONFIG_HEADER = config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
DIST_COMMON = README ./stamp-h.in ABOUT-NLS AUTHORS COPYING ChangeLog \
|
||||||
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS aclocal.m4 \
|
INSTALL Makefile.am Makefile.in NEWS README-alpha THANKS aclocal.m4 \
|
||||||
config.hin configure configure.in install-sh missing mkinstalldirs
|
config.hin configure configure.in
|
||||||
|
|
||||||
|
|
||||||
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
DISTFILES = $(DIST_COMMON) $(SOURCES) $(HEADERS) $(TEXINFOS) $(EXTRA_DIST)
|
||||||
@@ -123,13 +125,14 @@ Makefile: $(srcdir)/Makefile.in $(top_builddir)/config.status $(BUILT_SOURCES)
|
|||||||
cd $(top_builddir) \
|
cd $(top_builddir) \
|
||||||
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
&& CONFIG_FILES=$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
||||||
|
|
||||||
$(ACLOCAL_M4): configure.in m4/atconfig.m4 m4/c-bs-a.m4 m4/error.m4 \
|
$(ACLOCAL_M4): configure.in m4/atconfig.m4 m4/c-bs-a.m4 m4/codeset.m4 \
|
||||||
m4/gettext.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 \
|
m4/error.m4 m4/gettext.m4 m4/glibc21.m4 m4/iconv.m4 \
|
||||||
|
m4/isc-posix.m4 m4/lcmessage.m4 m4/m4.m4 m4/malloc.m4 \
|
||||||
m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 \
|
m4/mbstate_t.m4 m4/prereq.m4 m4/progtest.m4 \
|
||||||
m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
m4/realloc.m4 m4/strerror_r.m4 m4/warning.m4
|
||||||
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
cd $(srcdir) && $(ACLOCAL) $(ACLOCAL_AMFLAGS)
|
||||||
|
|
||||||
config.status: $(srcdir)/configure $(CONFIG_STATUS_DEPENDENCIES)
|
config.status: $(srcdir)/configure.in $(CONFIG_STATUS_DEPENDENCIES)
|
||||||
$(SHELL) ./config.status --recheck
|
$(SHELL) ./config.status --recheck
|
||||||
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
$(srcdir)/configure: $(srcdir)/configure.in $(ACLOCAL_M4) $(CONFIGURE_DEPENDENCIES)
|
||||||
cd $(srcdir) && $(AUTOCONF)
|
cd $(srcdir) && $(AUTOCONF)
|
||||||
|
|||||||
540
aclocal.m4
vendored
540
aclocal.m4
vendored
@@ -1,4 +1,4 @@
|
|||||||
dnl aclocal.m4 generated automatically by aclocal 1.4
|
dnl aclocal.m4 generated automatically by aclocal 1.4-p4
|
||||||
|
|
||||||
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
dnl Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
dnl This file is free software; the Free Software Foundation
|
dnl This file is free software; the Free Software Foundation
|
||||||
@@ -145,6 +145,24 @@ if test -z "$ECHO_C$ECHO_N$ECHO_T"; then
|
|||||||
fi
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#serial 1
|
||||||
|
# This test replaces the one in autoconf.
|
||||||
|
# Currently this macro should have the same name as the autoconf macro
|
||||||
|
# because gettext's gettext.m4 (distributed in the automake package)
|
||||||
|
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
||||||
|
# give these diagnostics:
|
||||||
|
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
||||||
|
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
||||||
|
|
||||||
|
undefine([AC_ISC_POSIX])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_ISC_POSIX],
|
||||||
|
[
|
||||||
|
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
||||||
|
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
# serial 1
|
# serial 1
|
||||||
|
|
||||||
@@ -233,20 +251,22 @@ case "x$am_cv_prog_cc_stdc" in
|
|||||||
esac
|
esac
|
||||||
])
|
])
|
||||||
|
|
||||||
# serial 1
|
# serial 1 -*- Autoconf -*-
|
||||||
|
|
||||||
# BISON_AC_PROG_GNU_M4
|
# BISON_AC_PROG_GNU_M4
|
||||||
# --------------------
|
# --------------------
|
||||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
# Check for GNU m4, at least 1.3 (supports frozen files).
|
||||||
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
||||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
||||||
AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
|
AC_CACHE_CHECK([whether m4 supports frozen files],
|
||||||
|
[ac_cv_prog_gnu_m4],
|
||||||
[ac_cv_prog_gnu_m4=no
|
[ac_cv_prog_gnu_m4=no
|
||||||
if test x"$M4" != x; then
|
if test x"$M4" != x; then
|
||||||
case `$M4 --help < /dev/null 2>&1` in
|
case `$M4 --help < /dev/null 2>&1` in
|
||||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
||||||
esac
|
esac
|
||||||
fi])])
|
fi])
|
||||||
|
])# BISON_AC_PROG_GNU_M4
|
||||||
|
|
||||||
AC_DEFUN(BISON_WARNING,
|
AC_DEFUN(BISON_WARNING,
|
||||||
[AC_MSG_CHECKING(whether compiler accepts $1)
|
[AC_MSG_CHECKING(whether compiler accepts $1)
|
||||||
@@ -511,11 +531,37 @@ fi
|
|||||||
# but which still want to provide support for the GNU gettext functionality.
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code is *not* freely available.
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
# serial 109
|
# serial 9
|
||||||
|
|
||||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||||
|
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||||
AC_DEFUN(AM_WITH_NLS,
|
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||||
|
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||||
|
dnl AM-DISABLE-SHARED). Otherwise, a static library
|
||||||
|
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||||
|
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||||
|
dnl implementations (in libc or libintl) without the ngettext() function
|
||||||
|
dnl will be ignored.
|
||||||
|
dnl LIBDIR is used to find the intl libraries. If empty,
|
||||||
|
dnl the value `$(top_builddir)/intl/' is used.
|
||||||
|
dnl
|
||||||
|
dnl The result of the configuration is one of three cases:
|
||||||
|
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
||||||
|
dnl and used.
|
||||||
|
dnl Catalog format: GNU --> install in $(datadir)
|
||||||
|
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||||
|
dnl 2) GNU gettext has been found in the system's C library.
|
||||||
|
dnl Catalog format: GNU --> install in $(datadir)
|
||||||
|
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||||
|
dnl 3) No internationalization, always use English msgid.
|
||||||
|
dnl Catalog format: none
|
||||||
|
dnl Catalog extension: none
|
||||||
|
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||||
|
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||||
|
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||||
|
dnl maintainers.
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_WITH_NLS],
|
||||||
[AC_MSG_CHECKING([whether NLS is requested])
|
[AC_MSG_CHECKING([whether NLS is requested])
|
||||||
dnl Default is enabled NLS
|
dnl Default is enabled NLS
|
||||||
AC_ARG_ENABLE(nls,
|
AC_ARG_ENABLE(nls,
|
||||||
@@ -524,11 +570,15 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
AC_MSG_RESULT($USE_NLS)
|
AC_MSG_RESULT($USE_NLS)
|
||||||
AC_SUBST(USE_NLS)
|
AC_SUBST(USE_NLS)
|
||||||
|
|
||||||
|
BUILD_INCLUDED_LIBINTL=no
|
||||||
USE_INCLUDED_LIBINTL=no
|
USE_INCLUDED_LIBINTL=no
|
||||||
|
INTLLIBS=
|
||||||
|
|
||||||
dnl If we use NLS figure out what method
|
dnl If we use NLS figure out what method
|
||||||
if test "$USE_NLS" = "yes"; then
|
if test "$USE_NLS" = "yes"; then
|
||||||
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
|
AC_DEFINE(ENABLE_NLS, 1,
|
||||||
|
[Define to 1 if translation of program messages to the user's native language
|
||||||
|
is requested.])
|
||||||
AC_MSG_CHECKING([whether included gettext is requested])
|
AC_MSG_CHECKING([whether included gettext is requested])
|
||||||
AC_ARG_WITH(included-gettext,
|
AC_ARG_WITH(included-gettext,
|
||||||
[ --with-included-gettext use the GNU gettext library included here],
|
[ --with-included-gettext use the GNU gettext library included here],
|
||||||
@@ -539,83 +589,74 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||||
dnl User does not insist on using GNU NLS library. Figure out what
|
dnl User does not insist on using GNU NLS library. Figure out what
|
||||||
dnl to use. If gettext or catgets are available (in this order) we
|
dnl to use. If GNU gettext is available we use this. Else we have
|
||||||
dnl use this. Else we have to fall back to GNU NLS library.
|
dnl to fall back to GNU NLS library.
|
||||||
dnl catgets is only used if permitted by option --with-catgets.
|
|
||||||
nls_cv_header_intl=
|
|
||||||
nls_cv_header_libgt=
|
|
||||||
CATOBJEXT=NONE
|
CATOBJEXT=NONE
|
||||||
|
|
||||||
AC_CHECK_HEADER(libintl.h,
|
dnl Add a version number to the cache macros.
|
||||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
||||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
||||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
|
||||||
|
|
||||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
AC_CHECK_HEADER(libintl.h,
|
||||||
AC_CHECK_LIB(intl, bindtextdomain,
|
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||||
[AC_CHECK_LIB(intl, gettext)])
|
[AC_TRY_LINK([#include <libintl.h>
|
||||||
|
extern int _nl_msg_cat_cntr;],
|
||||||
|
[bindtextdomain ("", "");
|
||||||
|
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||||
|
gt_cv_func_gnugettext_libc=yes,
|
||||||
|
gt_cv_func_gnugettext_libc=no)])
|
||||||
|
|
||||||
|
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||||
|
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||||
|
gt_cv_func_gnugettext_libintl,
|
||||||
|
[gt_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lintl $LIBICONV"
|
||||||
|
AC_TRY_LINK([#include <libintl.h>
|
||||||
|
extern int _nl_msg_cat_cntr;],
|
||||||
|
[bindtextdomain ("", "");
|
||||||
|
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||||
|
gt_cv_func_gnugettext_libintl=yes,
|
||||||
|
gt_cv_func_gnugettext_libintl=no)
|
||||||
|
LIBS="$gt_save_LIBS"])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
dnl If an already present or preinstalled GNU gettext() is found,
|
||||||
|| test "$ac_cv_lib_intl_gettext" = "yes"; then
|
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
dnl gettext is already preinstalled in libintl, we update this
|
||||||
[Define to 1 if you have gettext and don't want to use GNU gettext.])
|
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||||
if test "$MSGFMT" != "no"; then
|
&& test "$PACKAGE" != gettext; }; then
|
||||||
AC_CHECK_FUNCS(dcgettext)
|
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
dnl If iconv() is in a separate libiconv library, then anyone
|
||||||
return _nl_msg_cat_cntr],
|
dnl linking with libintl{.a,.so} also needs to link with
|
||||||
[CATOBJEXT=.gmo
|
dnl libiconv.
|
||||||
DATADIRNAME=share],
|
INTLLIBS="-lintl $LIBICONV"
|
||||||
[CATOBJEXT=.mo
|
fi
|
||||||
DATADIRNAME=lib])
|
|
||||||
INSTOBJEXT=.mo
|
gt_save_LIBS="$LIBS"
|
||||||
fi
|
LIBS="$LIBS $INTLLIBS"
|
||||||
fi
|
AC_CHECK_FUNCS(dcgettext)
|
||||||
|
LIBS="$gt_save_LIBS"
|
||||||
|
|
||||||
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||||
|
if test "$MSGFMT" != "no"; then
|
||||||
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
|
||||||
|
CATOBJEXT=.gmo
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "$CATOBJEXT" = "NONE"; then
|
if test "$CATOBJEXT" = "NONE"; then
|
||||||
AC_MSG_CHECKING([whether catgets can be used])
|
dnl GNU gettext is not found in the C library.
|
||||||
AC_ARG_WITH(catgets,
|
|
||||||
[ --with-catgets use catgets functions if available],
|
|
||||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
|
||||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
|
||||||
|
|
||||||
if test "$nls_cv_use_catgets" = "yes"; then
|
|
||||||
dnl No gettext in C library. Try catgets next.
|
|
||||||
AC_CHECK_LIB(i, main)
|
|
||||||
AC_CHECK_FUNC(catgets,
|
|
||||||
[AC_DEFINE(HAVE_CATGETS, 1,
|
|
||||||
[Define as 1 if you have \`catgets' and don't want to use GNU gettext.])
|
|
||||||
INTLOBJS="\$(CATOBJS)"
|
|
||||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
|
||||||
if test "$GENCAT" != "no"; then
|
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
|
||||||
if test "$GMSGFMT" = "no"; then
|
|
||||||
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
|
||||||
fi
|
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
|
||||||
USE_INCLUDED_LIBINTL=yes
|
|
||||||
CATOBJEXT=.cat
|
|
||||||
INSTOBJEXT=.cat
|
|
||||||
DATADIRNAME=lib
|
|
||||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
|
||||||
INTLLIBS=$INTLDEPS
|
|
||||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CATOBJEXT" = "NONE"; then
|
|
||||||
dnl Neither gettext nor catgets in included in the C library.
|
|
||||||
dnl Fall back on GNU gettext library.
|
dnl Fall back on GNU gettext library.
|
||||||
nls_cv_use_gnu_gettext=yes
|
nls_cv_use_gnu_gettext=yes
|
||||||
fi
|
fi
|
||||||
@@ -630,15 +671,11 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
AC_SUBST(MSGFMT)
|
AC_SUBST(MSGFMT)
|
||||||
|
BUILD_INCLUDED_LIBINTL=yes
|
||||||
USE_INCLUDED_LIBINTL=yes
|
USE_INCLUDED_LIBINTL=yes
|
||||||
CATOBJEXT=.gmo
|
CATOBJEXT=.gmo
|
||||||
INSTOBJEXT=.mo
|
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
||||||
DATADIRNAME=share
|
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
|
||||||
INTLLIBS=$INTLDEPS
|
|
||||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Test whether we really found GNU xgettext.
|
dnl Test whether we really found GNU xgettext.
|
||||||
@@ -654,29 +691,74 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We need to process the po/ directory.
|
dnl We need to process the po/ directory.
|
||||||
POSUB=po
|
POSUB=po
|
||||||
else
|
|
||||||
DATADIRNAME=share
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi
|
fi
|
||||||
if test -z "$nls_cv_header_intl"; then
|
|
||||||
# Clean out junk possibly left behind by a previous configuration.
|
|
||||||
rm -f intl/libintl.h
|
|
||||||
fi
|
|
||||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
|
||||||
AC_OUTPUT_COMMANDS(
|
AC_OUTPUT_COMMANDS(
|
||||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
[for ac_file in $CONFIG_FILES; do
|
||||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
# Support "outfile[:infile[:infile...]]"
|
||||||
esac])
|
case "$ac_file" in
|
||||||
|
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||||
|
esac
|
||||||
|
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||||
|
case "$ac_file" in */Makefile.in)
|
||||||
|
# Adjust a relative srcdir.
|
||||||
|
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||||
|
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||||
|
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||||
|
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||||
|
case "$ac_given_srcdir" in
|
||||||
|
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||||
|
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||||
|
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||||
|
esac
|
||||||
|
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||||
|
rm -f "$ac_dir/POTFILES"
|
||||||
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||||
|
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
||||||
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||||
|
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done])
|
||||||
|
|
||||||
|
|
||||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||||
# because some of the sources are only built for this goal.
|
dnl to 'yes' because some of the testsuite requires it.
|
||||||
if test "$PACKAGE" = gettext; then
|
if test "$PACKAGE" = gettext; then
|
||||||
USE_NLS=yes
|
BUILD_INCLUDED_LIBINTL=yes
|
||||||
USE_INCLUDED_LIBINTL=yes
|
fi
|
||||||
|
|
||||||
|
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||||
|
dnl because plural.y uses bison specific features. It requires at least
|
||||||
|
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||||
|
dnl compile.
|
||||||
|
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||||
|
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||||
|
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||||
|
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||||
|
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||||
|
dnl present or too old.
|
||||||
|
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||||
|
if test -z "$INTLBISON"; then
|
||||||
|
ac_verc_fail=yes
|
||||||
|
else
|
||||||
|
dnl Found it, now check the version.
|
||||||
|
AC_MSG_CHECKING([version of bison])
|
||||||
|
changequote(<<,>>)dnl
|
||||||
|
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||||
|
case $ac_prog_version in
|
||||||
|
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||||
|
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||||
|
changequote([,])dnl
|
||||||
|
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||||
|
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$ac_prog_version])
|
||||||
|
fi
|
||||||
|
if test $ac_verc_fail = yes; then
|
||||||
|
INTLBISON=:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl These rules are solely for the distribution goal. While doing this
|
dnl These rules are solely for the distribution goal. While doing this
|
||||||
@@ -688,22 +770,38 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
done
|
done
|
||||||
|
|
||||||
dnl Make all variables we use known to autoconf.
|
dnl Make all variables we use known to autoconf.
|
||||||
|
AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
||||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||||
AC_SUBST(CATALOGS)
|
AC_SUBST(CATALOGS)
|
||||||
AC_SUBST(CATOBJEXT)
|
AC_SUBST(CATOBJEXT)
|
||||||
AC_SUBST(DATADIRNAME)
|
|
||||||
AC_SUBST(GMOFILES)
|
AC_SUBST(GMOFILES)
|
||||||
AC_SUBST(INSTOBJEXT)
|
|
||||||
AC_SUBST(INTLDEPS)
|
|
||||||
AC_SUBST(INTLLIBS)
|
AC_SUBST(INTLLIBS)
|
||||||
AC_SUBST(INTLOBJS)
|
AC_SUBST(INTLOBJS)
|
||||||
AC_SUBST(POFILES)
|
AC_SUBST(POFILES)
|
||||||
AC_SUBST(POSUB)
|
AC_SUBST(POSUB)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some configure.ins may be using this.
|
||||||
|
nls_cv_header_intl=
|
||||||
|
nls_cv_header_libgt=
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
DATADIRNAME=share
|
||||||
|
AC_SUBST(DATADIRNAME)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
INSTOBJEXT=.mo
|
||||||
|
AC_SUBST(INSTOBJEXT)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
GENCAT=gencat
|
||||||
|
AC_SUBST(GENCAT)
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN(AM_GNU_GETTEXT,
|
dnl Usage: Just like AM_WITH_NLS, which see.
|
||||||
|
AC_DEFUN([AM_GNU_GETTEXT],
|
||||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
AC_REQUIRE([AC_PROG_CC])dnl
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
@@ -713,22 +811,18 @@ AC_DEFUN(AM_GNU_GETTEXT,
|
|||||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||||
|
AC_REQUIRE([jm_GLIBC21])dnl
|
||||||
|
|
||||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||||
unistd.h sys/param.h])
|
stdlib.h string.h unistd.h sys/param.h])
|
||||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
||||||
strdup __argz_count __argz_stringify __argz_next])
|
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
||||||
|
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
|
||||||
AC_CHECK_FUNCS(stpcpy)
|
|
||||||
fi
|
|
||||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_STPCPY, 1,
|
|
||||||
[Define to 1 if you have the \`stpcpy' function.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
AM_ICONV
|
||||||
|
AM_LANGINFO_CODESET
|
||||||
AM_LC_MESSAGES
|
AM_LC_MESSAGES
|
||||||
AM_WITH_NLS
|
AM_WITH_NLS([$1],[$2],[$3])
|
||||||
|
|
||||||
if test "x$CATOBJEXT" != "x"; then
|
if test "x$CATOBJEXT" != "x"; then
|
||||||
if test "x$ALL_LINGUAS" = "x"; then
|
if test "x$ALL_LINGUAS" = "x"; then
|
||||||
@@ -736,10 +830,21 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
else
|
else
|
||||||
AC_MSG_CHECKING(for catalogs to be installed)
|
AC_MSG_CHECKING(for catalogs to be installed)
|
||||||
NEW_LINGUAS=
|
NEW_LINGUAS=
|
||||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
for presentlang in $ALL_LINGUAS; do
|
||||||
case "$ALL_LINGUAS" in
|
useit=no
|
||||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
||||||
esac
|
# Use the presentlang catalog if desiredlang is
|
||||||
|
# a. equal to presentlang, or
|
||||||
|
# b. a variant of presentlang (because in this case,
|
||||||
|
# presentlang can be used as a fallback for messages
|
||||||
|
# which are not translated in the desiredlang catalog).
|
||||||
|
case "$desiredlang" in
|
||||||
|
"$presentlang"*) useit=yes;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if test $useit = yes; then
|
||||||
|
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
LINGUAS=$NEW_LINGUAS
|
LINGUAS=$NEW_LINGUAS
|
||||||
AC_MSG_RESULT($LINGUAS)
|
AC_MSG_RESULT($LINGUAS)
|
||||||
@@ -751,77 +856,21 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
|
||||||
dnl must be resolved because we cannot expect the users of this
|
|
||||||
dnl to define HAVE_LOCALE_H.
|
|
||||||
if test $ac_cv_header_locale_h = yes; then
|
|
||||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
|
||||||
else
|
|
||||||
INCLUDE_LOCALE_H="\
|
|
||||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
|
||||||
fi
|
|
||||||
AC_SUBST(INCLUDE_LOCALE_H)
|
|
||||||
|
|
||||||
dnl Determine which catalog format we have (if any is needed)
|
|
||||||
dnl For now we know about two different formats:
|
|
||||||
dnl Linux libc-5 and the normal X/Open format
|
|
||||||
test -d intl || mkdir intl
|
|
||||||
if test "$CATOBJEXT" = ".cat"; then
|
|
||||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
|
||||||
|
|
||||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
|
||||||
dnl cannot handle comments.
|
|
||||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
|
||||||
fi
|
|
||||||
dnl po2tbl.sed is always needed.
|
|
||||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
|
||||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
|
||||||
|
|
||||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
|
||||||
dnl only sense for gettext. We comment this out for non-gettext
|
|
||||||
dnl packages.
|
|
||||||
if test "$PACKAGE" = "gettext"; then
|
|
||||||
GT_NO="#NO#"
|
|
||||||
GT_YES=
|
|
||||||
else
|
|
||||||
GT_NO=
|
|
||||||
GT_YES="#YES#"
|
|
||||||
fi
|
|
||||||
AC_SUBST(GT_NO)
|
|
||||||
AC_SUBST(GT_YES)
|
|
||||||
|
|
||||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||||
dnl Try to locate is.
|
dnl Try to locate is.
|
||||||
MKINSTALLDIRS=
|
MKINSTALLDIRS=
|
||||||
if test -n "$ac_aux_dir"; then
|
if test -n "$ac_aux_dir"; then
|
||||||
MKINSTALLDIRS="\$(top_srcdir)/$ac_aux_dir/mkinstalldirs"
|
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||||
fi
|
fi
|
||||||
if test -z "$MKINSTALLDIRS"; then
|
if test -z "$MKINSTALLDIRS"; then
|
||||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(MKINSTALLDIRS)
|
AC_SUBST(MKINSTALLDIRS)
|
||||||
|
|
||||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
dnl Enable libtool support if the surrounding package wishes it.
|
||||||
l=
|
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
||||||
AC_SUBST(l)
|
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||||
|
|
||||||
dnl Generate list of files to be processed by xgettext which will
|
|
||||||
dnl be included in po/Makefile.
|
|
||||||
test -d po || mkdir po
|
|
||||||
changequote(, )dnl
|
|
||||||
case "$srcdir" in
|
|
||||||
.)
|
|
||||||
posrcprefix="../" ;;
|
|
||||||
/* | [A-Za-z]:*)
|
|
||||||
posrcprefix="$srcdir/" ;;
|
|
||||||
*)
|
|
||||||
posrcprefix="../$srcdir/" ;;
|
|
||||||
esac
|
|
||||||
changequote([, ])dnl
|
|
||||||
rm -f po/POTFILES
|
|
||||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
|
||||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
|
||||||
])
|
])
|
||||||
|
|
||||||
# Search path for a program which passes the given test.
|
# Search path for a program which passes the given test.
|
||||||
@@ -836,7 +885,7 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
|
|
||||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||||
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
|
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||||
[# Extract the first word of "$2", so it can be a program name with args.
|
[# Extract the first word of "$2", so it can be a program name with args.
|
||||||
set dummy $2; ac_word=[$]2
|
set dummy $2; ac_word=[$]2
|
||||||
AC_MSG_CHECKING([for $ac_word])
|
AC_MSG_CHECKING([for $ac_word])
|
||||||
@@ -872,6 +921,121 @@ fi
|
|||||||
AC_SUBST($1)dnl
|
AC_SUBST($1)dnl
|
||||||
])
|
])
|
||||||
|
|
||||||
|
#serial 2
|
||||||
|
|
||||||
|
# Test for the GNU C Library, version 2.1 or newer.
|
||||||
|
# From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([jm_GLIBC21],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
||||||
|
ac_cv_gnu_library_2_1,
|
||||||
|
[AC_EGREP_CPP([Lucky GNU user],
|
||||||
|
[
|
||||||
|
#include <features.h>
|
||||||
|
#ifdef __GNU_LIBRARY__
|
||||||
|
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
|
||||||
|
Lucky GNU user
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
ac_cv_gnu_library_2_1=yes,
|
||||||
|
ac_cv_gnu_library_2_1=no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_SUBST(GLIBC21)
|
||||||
|
GLIBC21="$ac_cv_gnu_library_2_1"
|
||||||
|
]
|
||||||
|
)
|
||||||
|
|
||||||
|
#serial AM2
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV],
|
||||||
|
[
|
||||||
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||||
|
dnl those with the standalone portable GNU libiconv installed).
|
||||||
|
|
||||||
|
AC_ARG_WITH([libiconv-prefix],
|
||||||
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||||
|
for dir in `echo "$withval" | tr : ' '`; do
|
||||||
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||||
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||||
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||||
|
am_cv_lib_iconv=no
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
if test "$am_cv_func_iconv" != yes; then
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -liconv"
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_lib_iconv=yes
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||||
|
AC_MSG_CHECKING([for iconv declaration])
|
||||||
|
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
extern
|
||||||
|
#ifdef __cplusplus
|
||||||
|
"C"
|
||||||
|
#endif
|
||||||
|
#if defined(__STDC__) || defined(__cplusplus)
|
||||||
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||||
|
#else
|
||||||
|
size_t iconv();
|
||||||
|
#endif
|
||||||
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
||||||
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||||
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||||
|
AC_MSG_RESULT([$]{ac_t:-
|
||||||
|
}[$]am_cv_proto_iconv)
|
||||||
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||||
|
[Define as const if the declaration of iconv() needs const.])
|
||||||
|
fi
|
||||||
|
LIBICONV=
|
||||||
|
if test "$am_cv_lib_iconv" = yes; then
|
||||||
|
LIBICONV="-liconv"
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBICONV)
|
||||||
|
])
|
||||||
|
|
||||||
|
#serial AM1
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
||||||
|
[AC_TRY_LINK([#include <langinfo.h>],
|
||||||
|
[char* cs = nl_langinfo(CODESET);],
|
||||||
|
am_cv_langinfo_codeset=yes,
|
||||||
|
am_cv_langinfo_codeset=no)
|
||||||
|
])
|
||||||
|
if test $am_cv_langinfo_codeset = yes; then
|
||||||
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
||||||
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
|
||||||
# Check whether LC_MESSAGES is available in <locale.h>.
|
# Check whether LC_MESSAGES is available in <locale.h>.
|
||||||
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
# Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
#
|
#
|
||||||
@@ -880,16 +1044,16 @@ AC_SUBST($1)dnl
|
|||||||
# but which still want to provide support for the GNU gettext functionality.
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code is *not* freely available.
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
# serial 1
|
# serial 2
|
||||||
|
|
||||||
AC_DEFUN(AM_LC_MESSAGES,
|
AC_DEFUN([AM_LC_MESSAGES],
|
||||||
[if test $ac_cv_header_locale_h = yes; then
|
[if test $ac_cv_header_locale_h = yes; then
|
||||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||||
[Define if your locale.h file contains LC_MESSAGES.])
|
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||||
fi
|
fi
|
||||||
fi])
|
fi])
|
||||||
|
|
||||||
|
|||||||
59
config.hin
59
config.hin
@@ -8,7 +8,8 @@
|
|||||||
/* Define if using `alloca.c'. */
|
/* Define if using `alloca.c'. */
|
||||||
#undef C_ALLOCA
|
#undef C_ALLOCA
|
||||||
|
|
||||||
/* Define to 1 if NLS is requested. */
|
/* Define to 1 if translation of program messages to the user's native
|
||||||
|
language is requested. */
|
||||||
#undef ENABLE_NLS
|
#undef ENABLE_NLS
|
||||||
|
|
||||||
/* Define if you have `alloca', as a function or macro. */
|
/* Define if you have `alloca', as a function or macro. */
|
||||||
@@ -20,9 +21,6 @@
|
|||||||
/* Define if you have the <argz.h> header file. */
|
/* Define if you have the <argz.h> header file. */
|
||||||
#undef HAVE_ARGZ_H
|
#undef HAVE_ARGZ_H
|
||||||
|
|
||||||
/* Define as 1 if you have `catgets' and don't want to use GNU gettext. */
|
|
||||||
#undef HAVE_CATGETS
|
|
||||||
|
|
||||||
/* Define if you have the <ctype.h> header file. */
|
/* Define if you have the <ctype.h> header file. */
|
||||||
#undef HAVE_CTYPE_H
|
#undef HAVE_CTYPE_H
|
||||||
|
|
||||||
@@ -61,15 +59,36 @@
|
|||||||
/* Define if you have the `doprnt' function. */
|
/* Define if you have the `doprnt' function. */
|
||||||
#undef HAVE_DOPRNT
|
#undef HAVE_DOPRNT
|
||||||
|
|
||||||
|
/* Define if you have the `feof_unlocked' function. */
|
||||||
|
#undef HAVE_FEOF_UNLOCKED
|
||||||
|
|
||||||
|
/* Define if you have the `fgets_unlocked' function. */
|
||||||
|
#undef HAVE_FGETS_UNLOCKED
|
||||||
|
|
||||||
/* Define if you have the `getcwd' function. */
|
/* Define if you have the `getcwd' function. */
|
||||||
#undef HAVE_GETCWD
|
#undef HAVE_GETCWD
|
||||||
|
|
||||||
|
/* Define if you have the `getegid' function. */
|
||||||
|
#undef HAVE_GETEGID
|
||||||
|
|
||||||
|
/* Define if you have the `geteuid' function. */
|
||||||
|
#undef HAVE_GETEUID
|
||||||
|
|
||||||
|
/* Define if you have the `getgid' function. */
|
||||||
|
#undef HAVE_GETGID
|
||||||
|
|
||||||
/* Define if you have the `getpagesize' function. */
|
/* Define if you have the `getpagesize' function. */
|
||||||
#undef HAVE_GETPAGESIZE
|
#undef HAVE_GETPAGESIZE
|
||||||
|
|
||||||
/* Define to 1 if you have gettext and don't want to use GNU gettext. */
|
/* Define if the GNU gettext() function is already present or preinstalled. */
|
||||||
#undef HAVE_GETTEXT
|
#undef HAVE_GETTEXT
|
||||||
|
|
||||||
|
/* Define if you have the `getuid' function. */
|
||||||
|
#undef HAVE_GETUID
|
||||||
|
|
||||||
|
/* Define if you have the iconv() function. */
|
||||||
|
#undef HAVE_ICONV
|
||||||
|
|
||||||
/* Define if you have the <inttypes.h> header file. */
|
/* Define if you have the <inttypes.h> header file. */
|
||||||
#undef HAVE_INTTYPES_H
|
#undef HAVE_INTTYPES_H
|
||||||
|
|
||||||
@@ -79,15 +98,12 @@
|
|||||||
/* Define if you have the `iswprint' function. */
|
/* Define if you have the `iswprint' function. */
|
||||||
#undef HAVE_ISWPRINT
|
#undef HAVE_ISWPRINT
|
||||||
|
|
||||||
/* Define if your locale.h file contains LC_MESSAGES. */
|
/* Define if you have <langinfo.h> and nl_langinfo(CODESET). */
|
||||||
|
#undef HAVE_LANGINFO_CODESET
|
||||||
|
|
||||||
|
/* Define if your <locale.h> file defines LC_MESSAGES. */
|
||||||
#undef HAVE_LC_MESSAGES
|
#undef HAVE_LC_MESSAGES
|
||||||
|
|
||||||
/* Define if you have the `i' library (-li). */
|
|
||||||
#undef HAVE_LIBI
|
|
||||||
|
|
||||||
/* Define if you have the `intl' library (-lintl). */
|
|
||||||
#undef HAVE_LIBINTL
|
|
||||||
|
|
||||||
/* Define if you have the <limits.h> header file. */
|
/* Define if you have the <limits.h> header file. */
|
||||||
#undef HAVE_LIMITS_H
|
#undef HAVE_LIMITS_H
|
||||||
|
|
||||||
@@ -106,6 +122,9 @@
|
|||||||
/* Define if you have the <memory.h> header file. */
|
/* Define if you have the <memory.h> header file. */
|
||||||
#undef HAVE_MEMORY_H
|
#undef HAVE_MEMORY_H
|
||||||
|
|
||||||
|
/* Define if you have the `mempcpy' function. */
|
||||||
|
#undef HAVE_MEMPCPY
|
||||||
|
|
||||||
/* Define if you have the `mkstemp' function. */
|
/* Define if you have the `mkstemp' function. */
|
||||||
#undef HAVE_MKSTEMP
|
#undef HAVE_MKSTEMP
|
||||||
|
|
||||||
@@ -127,10 +146,13 @@
|
|||||||
/* Define if you have the `setlocale' function. */
|
/* Define if you have the `setlocale' function. */
|
||||||
#undef HAVE_SETLOCALE
|
#undef HAVE_SETLOCALE
|
||||||
|
|
||||||
|
/* Define if you have the <stddef.h> header file. */
|
||||||
|
#undef HAVE_STDDEF_H
|
||||||
|
|
||||||
/* Define if you have the <stdlib.h> header file. */
|
/* Define if you have the <stdlib.h> header file. */
|
||||||
#undef HAVE_STDLIB_H
|
#undef HAVE_STDLIB_H
|
||||||
|
|
||||||
/* Define to 1 if you have the `stpcpy' function. */
|
/* Define if you have the `stpcpy' function. */
|
||||||
#undef HAVE_STPCPY
|
#undef HAVE_STPCPY
|
||||||
|
|
||||||
/* Define if you have the `strcasecmp' function. */
|
/* Define if you have the `strcasecmp' function. */
|
||||||
@@ -160,9 +182,15 @@
|
|||||||
/* Define if you have the `strnlen' function. */
|
/* Define if you have the `strnlen' function. */
|
||||||
#undef HAVE_STRNLEN
|
#undef HAVE_STRNLEN
|
||||||
|
|
||||||
|
/* Define if you have the `strtoul' function. */
|
||||||
|
#undef HAVE_STRTOUL
|
||||||
|
|
||||||
/* Define if you have the <sys/param.h> header file. */
|
/* Define if you have the <sys/param.h> header file. */
|
||||||
#undef HAVE_SYS_PARAM_H
|
#undef HAVE_SYS_PARAM_H
|
||||||
|
|
||||||
|
/* Define if you have the `tsearch' function. */
|
||||||
|
#undef HAVE_TSEARCH
|
||||||
|
|
||||||
/* Define if you have the <unistd.h> header file. */
|
/* Define if you have the <unistd.h> header file. */
|
||||||
#undef HAVE_UNISTD_H
|
#undef HAVE_UNISTD_H
|
||||||
|
|
||||||
@@ -187,6 +215,9 @@
|
|||||||
/* Define if you have the `__argz_stringify' function. */
|
/* Define if you have the `__argz_stringify' function. */
|
||||||
#undef HAVE___ARGZ_STRINGIFY
|
#undef HAVE___ARGZ_STRINGIFY
|
||||||
|
|
||||||
|
/* Define as const if the declaration of iconv() needs const. */
|
||||||
|
#undef ICONV_CONST
|
||||||
|
|
||||||
/* Name of package */
|
/* Name of package */
|
||||||
#undef PACKAGE
|
#undef PACKAGE
|
||||||
|
|
||||||
@@ -217,7 +248,7 @@
|
|||||||
defined. */
|
defined. */
|
||||||
#undef _POSIX_1_SOURCE
|
#undef _POSIX_1_SOURCE
|
||||||
|
|
||||||
/* Define if you need to in order for stat and other things to work. */
|
/* Define if you need to in order for `stat' and other things to work. */
|
||||||
#undef _POSIX_SOURCE
|
#undef _POSIX_SOURCE
|
||||||
|
|
||||||
/* Define to empty if `const' does not conform to ANSI C. */
|
/* Define to empty if `const' does not conform to ANSI C. */
|
||||||
|
|||||||
1
config/.cvsignore
Normal file
1
config/.cvsignore
Normal file
@@ -0,0 +1 @@
|
|||||||
|
Makefile
|
||||||
1
config/Makefile.am
Normal file
1
config/Makefile.am
Normal file
@@ -0,0 +1 @@
|
|||||||
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
1297
config/config.guess
vendored
Executable file
1297
config/config.guess
vendored
Executable file
File diff suppressed because it is too large
Load Diff
1375
config/config.sub
vendored
Executable file
1375
config/config.sub
vendored
Executable file
File diff suppressed because it is too large
Load Diff
92
config/mdate-sh
Executable file
92
config/mdate-sh
Executable file
@@ -0,0 +1,92 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
# Get modification time of a file or directory and pretty-print it.
|
||||||
|
# Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
||||||
|
# written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, June 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
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software Foundation,
|
||||||
|
# Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
# Prevent date giving response in another language.
|
||||||
|
LANG=C
|
||||||
|
export LANG
|
||||||
|
LC_ALL=C
|
||||||
|
export LC_ALL
|
||||||
|
LC_TIME=C
|
||||||
|
export LC_TIME
|
||||||
|
|
||||||
|
# Get the extended ls output of the file or directory.
|
||||||
|
# On HPUX /bin/sh, "set" interprets "-rw-r--r--" as options, so the "x" below.
|
||||||
|
if ls -L /dev/null 1>/dev/null 2>&1; then
|
||||||
|
set - x`ls -L -l -d $1`
|
||||||
|
else
|
||||||
|
set - x`ls -l -d $1`
|
||||||
|
fi
|
||||||
|
# The month is at least the fourth argument
|
||||||
|
# (3 shifts here, the next inside the loop).
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
shift
|
||||||
|
|
||||||
|
# Find the month. Next argument is day, followed by the year or time.
|
||||||
|
month=
|
||||||
|
until test $month
|
||||||
|
do
|
||||||
|
shift
|
||||||
|
case $1 in
|
||||||
|
Jan) month=January; nummonth=1;;
|
||||||
|
Feb) month=February; nummonth=2;;
|
||||||
|
Mar) month=March; nummonth=3;;
|
||||||
|
Apr) month=April; nummonth=4;;
|
||||||
|
May) month=May; nummonth=5;;
|
||||||
|
Jun) month=June; nummonth=6;;
|
||||||
|
Jul) month=July; nummonth=7;;
|
||||||
|
Aug) month=August; nummonth=8;;
|
||||||
|
Sep) month=September; nummonth=9;;
|
||||||
|
Oct) month=October; nummonth=10;;
|
||||||
|
Nov) month=November; nummonth=11;;
|
||||||
|
Dec) month=December; nummonth=12;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
|
||||||
|
day=$2
|
||||||
|
|
||||||
|
# Here we have to deal with the problem that the ls output gives either
|
||||||
|
# the time of day or the year.
|
||||||
|
case $3 in
|
||||||
|
*:*) set `date`; eval year=\$$#
|
||||||
|
case $2 in
|
||||||
|
Jan) nummonthtod=1;;
|
||||||
|
Feb) nummonthtod=2;;
|
||||||
|
Mar) nummonthtod=3;;
|
||||||
|
Apr) nummonthtod=4;;
|
||||||
|
May) nummonthtod=5;;
|
||||||
|
Jun) nummonthtod=6;;
|
||||||
|
Jul) nummonthtod=7;;
|
||||||
|
Aug) nummonthtod=8;;
|
||||||
|
Sep) nummonthtod=9;;
|
||||||
|
Oct) nummonthtod=10;;
|
||||||
|
Nov) nummonthtod=11;;
|
||||||
|
Dec) nummonthtod=12;;
|
||||||
|
esac
|
||||||
|
# For the first six month of the year the time notation can also
|
||||||
|
# be used for files modified in the last year.
|
||||||
|
if (expr $nummonth \> $nummonthtod) > /dev/null;
|
||||||
|
then
|
||||||
|
year=`expr $year - 1`
|
||||||
|
fi;;
|
||||||
|
*) year=$3;;
|
||||||
|
esac
|
||||||
|
|
||||||
|
# The result.
|
||||||
|
echo $day $month $year
|
||||||
13
configure.in
13
configure.in
@@ -1,6 +1,7 @@
|
|||||||
# Process this file with autoconf to produce a configure script.
|
# Process this file with autoconf to produce a configure script.
|
||||||
AC_PREREQ(2.49c)
|
AC_PREREQ(2.50)
|
||||||
AC_INIT(src/reduce.c)
|
AC_INIT(bison, 1.28a, bug-bison@gnu.org)
|
||||||
|
AC_CONFIG_AUX_DIR(config)
|
||||||
AM_INIT_AUTOMAKE(bison, 1.28a)
|
AM_INIT_AUTOMAKE(bison, 1.28a)
|
||||||
AM_CONFIG_HEADER(config.h:config.hin)
|
AM_CONFIG_HEADER(config.h:config.hin)
|
||||||
|
|
||||||
@@ -12,7 +13,6 @@ AC_PROG_CC
|
|||||||
AC_MINIX
|
AC_MINIX
|
||||||
AC_ISC_POSIX
|
AC_ISC_POSIX
|
||||||
AM_PROG_CC_STDC
|
AM_PROG_CC_STDC
|
||||||
AC_PROG_INSTALL
|
|
||||||
AC_PROG_RANLIB
|
AC_PROG_RANLIB
|
||||||
# GNU M4 is needed to build the testsuite.
|
# GNU M4 is needed to build the testsuite.
|
||||||
BISON_AC_PROG_GNU_M4
|
BISON_AC_PROG_GNU_M4
|
||||||
@@ -26,10 +26,8 @@ AC_ARG_ENABLE(gcc-warnings,
|
|||||||
[case "${enableval}" in
|
[case "${enableval}" in
|
||||||
yes|no) ;;
|
yes|no) ;;
|
||||||
*) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;;
|
*) AC_MSG_ERROR([bad value ${enableval} for gcc-warnings option]) ;;
|
||||||
esac
|
esac],
|
||||||
],
|
[enableval=no])
|
||||||
enableval=no
|
|
||||||
)
|
|
||||||
if test "${enableval}" = yes; then
|
if test "${enableval}" = yes; then
|
||||||
BISON_WARNING(-Wall)
|
BISON_WARNING(-Wall)
|
||||||
BISON_WARNING(-W)
|
BISON_WARNING(-W)
|
||||||
@@ -80,6 +78,7 @@ LIBOBJS=`echo $LIBOBJS|sed 's/\.o /\$U.o /g;s/\.o$/\$U.o/'`
|
|||||||
AC_SUBST(LIBOBJS)
|
AC_SUBST(LIBOBJS)
|
||||||
|
|
||||||
AC_OUTPUT([Makefile
|
AC_OUTPUT([Makefile
|
||||||
|
config/Makefile
|
||||||
intl/Makefile po/Makefile.in
|
intl/Makefile po/Makefile.in
|
||||||
lib/Makefile src/Makefile doc/Makefile
|
lib/Makefile src/Makefile doc/Makefile
|
||||||
m4/Makefile
|
m4/Makefile
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -57,7 +57,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -67,15 +70,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -90,7 +93,6 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.4
|
AUTOMAKE_OPTIONS = 1.4
|
||||||
|
|
||||||
@@ -100,10 +102,11 @@ man_MANS = bison.1
|
|||||||
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
|
EXTRA_DIST = FAQ bison.1 bison.rnh refcard.tex
|
||||||
|
|
||||||
CLEANFILES = refcard.dvi refcard.log refcard.ps
|
CLEANFILES = refcard.dvi refcard.log refcard.ps
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = ../config.h
|
CONFIG_HEADER = ../config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
TEXI2DVI = texi2dvi
|
TEXI2DVI = texi2dvi
|
||||||
|
TEXINFO_TEX = $(top_srcdir)/config/texinfo.tex
|
||||||
INFO_DEPS = bison.info
|
INFO_DEPS = bison.info
|
||||||
DVIS = bison.dvi
|
DVIS = bison.dvi
|
||||||
TEXINFOS = bison.texinfo
|
TEXINFOS = bison.texinfo
|
||||||
@@ -134,7 +137,7 @@ $(srcdir)/version.texi: stamp-vti
|
|||||||
@:
|
@:
|
||||||
|
|
||||||
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
|
$(srcdir)/stamp-vti: bison.texinfo $(top_srcdir)/configure.in
|
||||||
@echo "@set UPDATED `$(SHELL) $(srcdir)/mdate-sh $(srcdir)/bison.texinfo`" > vti.tmp
|
@echo "@set UPDATED `$(SHELL) $(top_srcdir)/config/mdate-sh $(srcdir)/bison.texinfo`" > vti.tmp
|
||||||
@echo "@set EDITION $(VERSION)" >> vti.tmp
|
@echo "@set EDITION $(VERSION)" >> vti.tmp
|
||||||
@echo "@set VERSION $(VERSION)" >> vti.tmp
|
@echo "@set VERSION $(VERSION)" >> vti.tmp
|
||||||
@cmp -s vti.tmp $(srcdir)/version.texi \
|
@cmp -s vti.tmp $(srcdir)/version.texi \
|
||||||
@@ -165,7 +168,7 @@ DVIPS = dvips
|
|||||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||||
|
|
||||||
.texi.dvi:
|
.texi.dvi:
|
||||||
TEXINPUTS=.:$$TEXINPUTS \
|
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \
|
||||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||||
|
|
||||||
.texi:
|
.texi:
|
||||||
@@ -184,7 +187,7 @@ DVIPS = dvips
|
|||||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||||
|
|
||||||
.texinfo.dvi:
|
.texinfo.dvi:
|
||||||
TEXINPUTS=.:$$TEXINPUTS \
|
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \
|
||||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||||
|
|
||||||
.txi.info:
|
.txi.info:
|
||||||
@@ -193,7 +196,7 @@ DVIPS = dvips
|
|||||||
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
&& $(MAKEINFO) `echo $< | sed 's,.*/,,'`
|
||||||
|
|
||||||
.txi.dvi:
|
.txi.dvi:
|
||||||
TEXINPUTS=.:$$TEXINPUTS \
|
TEXINPUTS=$(top_srcdir)/config/texinfo.tex:$$TEXINPUTS \
|
||||||
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
MAKEINFO='$(MAKEINFO) -I $(srcdir)' $(TEXI2DVI) $<
|
||||||
|
|
||||||
.txi:
|
.txi:
|
||||||
@@ -232,7 +235,7 @@ uninstall-info:
|
|||||||
else ii=; fi; \
|
else ii=; fi; \
|
||||||
list='$(INFO_DEPS)'; \
|
list='$(INFO_DEPS)'; \
|
||||||
for file in $$list; do \
|
for file in $$list; do \
|
||||||
test -z "$ii" \
|
test -z "$$ii" \
|
||||||
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
|
|| install-info --info-dir=$(DESTDIR)$(infodir) --remove $$file; \
|
||||||
done
|
done
|
||||||
@$(NORMAL_UNINSTALL)
|
@$(NORMAL_UNINSTALL)
|
||||||
|
|||||||
197
doc/bison.info
197
doc/bison.info
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -30,105 +29,105 @@ instead of in the original English.
|
|||||||
|
|
||||||
|
|
||||||
Indirect:
|
Indirect:
|
||||||
bison.info-1: 1306
|
bison.info-1: 1285
|
||||||
bison.info-2: 50276
|
bison.info-2: 50255
|
||||||
bison.info-3: 98079
|
bison.info-3: 98216
|
||||||
bison.info-4: 147596
|
bison.info-4: 147733
|
||||||
bison.info-5: 192129
|
bison.info-5: 192266
|
||||||
|
|
||||||
Tag Table:
|
Tag Table:
|
||||||
(Indirect)
|
(Indirect)
|
||||||
Node: Top1306
|
Node: Top1285
|
||||||
Node: Introduction8542
|
Node: Introduction8521
|
||||||
Node: Conditions9817
|
Node: Conditions9796
|
||||||
Node: Copying11281
|
Node: Copying11260
|
||||||
Node: Concepts30473
|
Node: Concepts30452
|
||||||
Node: Language and Grammar31506
|
Node: Language and Grammar31485
|
||||||
Node: Grammar in Bison36522
|
Node: Grammar in Bison36501
|
||||||
Node: Semantic Values38446
|
Node: Semantic Values38425
|
||||||
Node: Semantic Actions40547
|
Node: Semantic Actions40526
|
||||||
Node: Bison Parser41730
|
Node: Bison Parser41709
|
||||||
Node: Stages44040
|
Node: Stages44019
|
||||||
Node: Grammar Layout45323
|
Node: Grammar Layout45302
|
||||||
Node: Examples46580
|
Node: Examples46559
|
||||||
Node: RPN Calc47715
|
Node: RPN Calc47694
|
||||||
Node: Rpcalc Decls48689
|
Node: Rpcalc Decls48668
|
||||||
Node: Rpcalc Rules50276
|
Node: Rpcalc Rules50255
|
||||||
Node: Rpcalc Input52076
|
Node: Rpcalc Input52055
|
||||||
Node: Rpcalc Line53537
|
Node: Rpcalc Line53516
|
||||||
Node: Rpcalc Expr54652
|
Node: Rpcalc Expr54631
|
||||||
Node: Rpcalc Lexer56597
|
Node: Rpcalc Lexer56576
|
||||||
Node: Rpcalc Main59169
|
Node: Rpcalc Main59148
|
||||||
Node: Rpcalc Error59567
|
Node: Rpcalc Error59546
|
||||||
Node: Rpcalc Gen60575
|
Node: Rpcalc Gen60554
|
||||||
Node: Rpcalc Compile61724
|
Node: Rpcalc Compile61703
|
||||||
Node: Infix Calc62599
|
Node: Infix Calc62578
|
||||||
Node: Simple Error Recovery65306
|
Node: Simple Error Recovery65285
|
||||||
Node: Multi-function Calc67192
|
Node: Multi-function Calc67171
|
||||||
Node: Mfcalc Decl68758
|
Node: Mfcalc Decl68737
|
||||||
Node: Mfcalc Rules70781
|
Node: Mfcalc Rules70760
|
||||||
Node: Mfcalc Symtab72161
|
Node: Mfcalc Symtab72140
|
||||||
Node: Exercises78376
|
Node: Exercises78513
|
||||||
Node: Grammar File78882
|
Node: Grammar File79019
|
||||||
Node: Grammar Outline79650
|
Node: Grammar Outline79787
|
||||||
Node: C Declarations80384
|
Node: C Declarations80521
|
||||||
Node: Bison Declarations80964
|
Node: Bison Declarations81101
|
||||||
Node: Grammar Rules81376
|
Node: Grammar Rules81513
|
||||||
Node: C Code81836
|
Node: C Code81973
|
||||||
Node: Symbols82766
|
Node: Symbols82903
|
||||||
Node: Rules87847
|
Node: Rules87984
|
||||||
Node: Recursion89486
|
Node: Recursion89623
|
||||||
Node: Semantics91205
|
Node: Semantics91342
|
||||||
Node: Value Type92302
|
Node: Value Type92439
|
||||||
Node: Multiple Types92974
|
Node: Multiple Types93111
|
||||||
Node: Actions93991
|
Node: Actions94128
|
||||||
Node: Action Types96776
|
Node: Action Types96913
|
||||||
Node: Mid-Rule Actions98079
|
Node: Mid-Rule Actions98216
|
||||||
Node: Declarations103648
|
Node: Declarations103785
|
||||||
Node: Token Decl104967
|
Node: Token Decl105104
|
||||||
Node: Precedence Decl106980
|
Node: Precedence Decl107117
|
||||||
Node: Union Decl108531
|
Node: Union Decl108668
|
||||||
Node: Type Decl109375
|
Node: Type Decl109512
|
||||||
Node: Expect Decl110281
|
Node: Expect Decl110418
|
||||||
Node: Start Decl111827
|
Node: Start Decl111964
|
||||||
Node: Pure Decl112205
|
Node: Pure Decl112342
|
||||||
Node: Decl Summary113882
|
Node: Decl Summary114019
|
||||||
Node: Multiple Parsers119609
|
Node: Multiple Parsers119746
|
||||||
Node: Interface121103
|
Node: Interface121240
|
||||||
Node: Parser Function121975
|
Node: Parser Function122112
|
||||||
Node: Lexical122810
|
Node: Lexical122947
|
||||||
Node: Calling Convention124216
|
Node: Calling Convention124353
|
||||||
Node: Token Values126987
|
Node: Token Values127124
|
||||||
Node: Token Positions128136
|
Node: Token Positions128273
|
||||||
Node: Pure Calling129028
|
Node: Pure Calling129165
|
||||||
Node: Error Reporting131960
|
Node: Error Reporting132097
|
||||||
Node: Action Features134082
|
Node: Action Features134219
|
||||||
Node: Algorithm137743
|
Node: Algorithm137880
|
||||||
Node: Look-Ahead140036
|
Node: Look-Ahead140173
|
||||||
Node: Shift/Reduce142168
|
Node: Shift/Reduce142305
|
||||||
Node: Precedence145080
|
Node: Precedence145217
|
||||||
Node: Why Precedence145731
|
Node: Why Precedence145868
|
||||||
Node: Using Precedence147596
|
Node: Using Precedence147733
|
||||||
Node: Precedence Examples148564
|
Node: Precedence Examples148701
|
||||||
Node: How Precedence149265
|
Node: How Precedence149402
|
||||||
Node: Contextual Precedence150414
|
Node: Contextual Precedence150551
|
||||||
Node: Parser States152205
|
Node: Parser States152342
|
||||||
Node: Reduce/Reduce153448
|
Node: Reduce/Reduce153585
|
||||||
Node: Mystery Conflicts157009
|
Node: Mystery Conflicts157146
|
||||||
Node: Stack Overflow160395
|
Node: Stack Overflow160532
|
||||||
Node: Error Recovery161768
|
Node: Error Recovery161905
|
||||||
Node: Context Dependency166904
|
Node: Context Dependency167041
|
||||||
Node: Semantic Tokens167752
|
Node: Semantic Tokens167889
|
||||||
Node: Lexical Tie-ins170769
|
Node: Lexical Tie-ins170906
|
||||||
Node: Tie-in Recovery172317
|
Node: Tie-in Recovery172454
|
||||||
Node: Debugging174489
|
Node: Debugging174626
|
||||||
Node: Invocation177790
|
Node: Invocation177927
|
||||||
Node: Bison Options178520
|
Node: Bison Options178657
|
||||||
Node: Environment Variables182031
|
Node: Environment Variables182168
|
||||||
Node: Option Cross Key182879
|
Node: Option Cross Key183016
|
||||||
Node: VMS Invocation183769
|
Node: VMS Invocation183906
|
||||||
Node: Table of Symbols184553
|
Node: Table of Symbols184690
|
||||||
Node: Glossary192129
|
Node: Glossary192266
|
||||||
Node: Index198419
|
Node: Index198556
|
||||||
|
|
||||||
End Tag Table
|
End Tag Table
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
@@ -642,14 +641,18 @@ declarations, but it requires some additional C functions for support.
|
|||||||
definition, which is kept in the header `calc.h', is as follows. It
|
definition, which is kept in the header `calc.h', is as follows. It
|
||||||
provides for either functions or variables to be placed in the table.
|
provides for either functions or variables to be placed in the table.
|
||||||
|
|
||||||
|
/* Fonctions type. */
|
||||||
|
typedef double (*func_t) (double);
|
||||||
|
|
||||||
/* Data type for links in the chain of symbols. */
|
/* Data type for links in the chain of symbols. */
|
||||||
struct symrec
|
struct symrec
|
||||||
{
|
{
|
||||||
char *name; /* name of symbol */
|
char *name; /* name of symbol */
|
||||||
int type; /* type of symbol: either VAR or FNCT */
|
int type; /* type of symbol: either VAR or FNCT */
|
||||||
union {
|
union
|
||||||
double var; /* value of a VAR */
|
{
|
||||||
double (*fnctptr)(); /* value of a FNCT */
|
double var; /* value of a VAR */
|
||||||
|
func_t fnctptr; /* value of a FNCT */
|
||||||
} value;
|
} value;
|
||||||
struct symrec *next; /* link field */
|
struct symrec *next; /* link field */
|
||||||
};
|
};
|
||||||
@@ -659,8 +662,8 @@ provides for either functions or variables to be placed in the table.
|
|||||||
/* The symbol table: a chain of `struct symrec'. */
|
/* The symbol table: a chain of `struct symrec'. */
|
||||||
extern symrec *sym_table;
|
extern symrec *sym_table;
|
||||||
|
|
||||||
symrec *putsym ();
|
symrec *putsym (const char *, func_t);
|
||||||
symrec *getsym ();
|
symrec *getsym (const char *);
|
||||||
|
|
||||||
The new version of `main' includes a call to `init_table', a
|
The new version of `main' includes a call to `init_table', a
|
||||||
function that initializes the symbol table. Here it is, and
|
function that initializes the symbol table. Here it is, and
|
||||||
@@ -684,22 +687,22 @@ function that initializes the symbol table. Here it is, and
|
|||||||
struct init
|
struct init
|
||||||
{
|
{
|
||||||
char *fname;
|
char *fname;
|
||||||
double (*fnct)();
|
double (*fnct)(double);
|
||||||
};
|
};
|
||||||
|
|
||||||
struct init arith_fncts[] =
|
struct init arith_fncts[] =
|
||||||
{
|
{
|
||||||
"sin", sin,
|
"sin", sin,
|
||||||
"cos", cos,
|
"cos", cos,
|
||||||
"atan", atan,
|
"atan", atan,
|
||||||
"ln", log,
|
"ln", log,
|
||||||
"exp", exp,
|
"exp", exp,
|
||||||
"sqrt", sqrt,
|
"sqrt", sqrt,
|
||||||
0, 0
|
0, 0
|
||||||
};
|
};
|
||||||
|
|
||||||
/* The symbol table: a chain of `struct symrec'. */
|
/* The symbol table: a chain of `struct symrec'. */
|
||||||
symrec *sym_table = (symrec *)0;
|
symrec *sym_table = (symrec *) 0;
|
||||||
|
|
||||||
/* Put arithmetic functions in table. */
|
/* Put arithmetic functions in table. */
|
||||||
void
|
void
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
Ceci est le fichier Info bison.info, produit par Makeinfo version 4.0 à
|
This is bison.info, produced by makeinfo version 4.0 from bison.texinfo.
|
||||||
partir bison.texinfo.
|
|
||||||
|
|
||||||
START-INFO-DIR-ENTRY
|
START-INFO-DIR-ENTRY
|
||||||
* bison: (bison). GNU Project parser generator (yacc replacement).
|
* bison: (bison). GNU Project parser generator (yacc replacement).
|
||||||
|
|||||||
251
install-sh
251
install-sh
@@ -1,251 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
#
|
|
||||||
# install - install a program, script, or datafile
|
|
||||||
# This comes from X11R5 (mit/util/scripts/install.sh).
|
|
||||||
#
|
|
||||||
# Copyright 1991 by the Massachusetts Institute of Technology
|
|
||||||
#
|
|
||||||
# Permission to use, copy, modify, distribute, and sell this software and its
|
|
||||||
# documentation for any purpose is hereby granted without fee, provided that
|
|
||||||
# the above copyright notice appear in all copies and that both that
|
|
||||||
# copyright notice and this permission notice appear in supporting
|
|
||||||
# documentation, and that the name of M.I.T. not be used in advertising or
|
|
||||||
# publicity pertaining to distribution of the software without specific,
|
|
||||||
# written prior permission. M.I.T. makes no representations about the
|
|
||||||
# suitability of this software for any purpose. It is provided "as is"
|
|
||||||
# without express or implied warranty.
|
|
||||||
#
|
|
||||||
# Calling this script install-sh is preferred over install.sh, to prevent
|
|
||||||
# `make' implicit rules from creating a file called install from it
|
|
||||||
# when there is no Makefile.
|
|
||||||
#
|
|
||||||
# This script is compatible with the BSD install script, but was written
|
|
||||||
# from scratch. It can only install one file at a time, a restriction
|
|
||||||
# shared with many OS's install programs.
|
|
||||||
|
|
||||||
|
|
||||||
# set DOITPROG to echo to test this script
|
|
||||||
|
|
||||||
# Don't use :- since 4.3BSD and earlier shells don't like it.
|
|
||||||
doit="${DOITPROG-}"
|
|
||||||
|
|
||||||
|
|
||||||
# put in absolute paths if you don't have them in your path; or use env. vars.
|
|
||||||
|
|
||||||
mvprog="${MVPROG-mv}"
|
|
||||||
cpprog="${CPPROG-cp}"
|
|
||||||
chmodprog="${CHMODPROG-chmod}"
|
|
||||||
chownprog="${CHOWNPROG-chown}"
|
|
||||||
chgrpprog="${CHGRPPROG-chgrp}"
|
|
||||||
stripprog="${STRIPPROG-strip}"
|
|
||||||
rmprog="${RMPROG-rm}"
|
|
||||||
mkdirprog="${MKDIRPROG-mkdir}"
|
|
||||||
|
|
||||||
transformbasename=""
|
|
||||||
transform_arg=""
|
|
||||||
instcmd="$mvprog"
|
|
||||||
chmodcmd="$chmodprog 0755"
|
|
||||||
chowncmd=""
|
|
||||||
chgrpcmd=""
|
|
||||||
stripcmd=""
|
|
||||||
rmcmd="$rmprog -f"
|
|
||||||
mvcmd="$mvprog"
|
|
||||||
src=""
|
|
||||||
dst=""
|
|
||||||
dir_arg=""
|
|
||||||
|
|
||||||
while [ x"$1" != x ]; do
|
|
||||||
case $1 in
|
|
||||||
-c) instcmd="$cpprog"
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-d) dir_arg=true
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-m) chmodcmd="$chmodprog $2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-o) chowncmd="$chownprog $2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-g) chgrpcmd="$chgrpprog $2"
|
|
||||||
shift
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-s) stripcmd="$stripprog"
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-t=*) transformarg=`echo $1 | sed 's/-t=//'`
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
-b=*) transformbasename=`echo $1 | sed 's/-b=//'`
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
|
|
||||||
*) if [ x"$src" = x ]
|
|
||||||
then
|
|
||||||
src=$1
|
|
||||||
else
|
|
||||||
# this colon is to work around a 386BSD /bin/sh bug
|
|
||||||
:
|
|
||||||
dst=$1
|
|
||||||
fi
|
|
||||||
shift
|
|
||||||
continue;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
if [ x"$src" = x ]
|
|
||||||
then
|
|
||||||
echo "install: no input file specified"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]; then
|
|
||||||
dst=$src
|
|
||||||
src=""
|
|
||||||
|
|
||||||
if [ -d $dst ]; then
|
|
||||||
instcmd=:
|
|
||||||
chmodcmd=""
|
|
||||||
else
|
|
||||||
instcmd=mkdir
|
|
||||||
fi
|
|
||||||
else
|
|
||||||
|
|
||||||
# Waiting for this to be detected by the "$instcmd $src $dsttmp" command
|
|
||||||
# might cause directories to be created, which would be especially bad
|
|
||||||
# if $src (and thus $dsttmp) contains '*'.
|
|
||||||
|
|
||||||
if [ -f $src -o -d $src ]
|
|
||||||
then
|
|
||||||
true
|
|
||||||
else
|
|
||||||
echo "install: $src does not exist"
|
|
||||||
exit 1
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dst" = x ]
|
|
||||||
then
|
|
||||||
echo "install: no destination specified"
|
|
||||||
exit 1
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# If destination is a directory, append the input filename; if your system
|
|
||||||
# does not like double slashes in filenames, you may need to add some logic
|
|
||||||
|
|
||||||
if [ -d $dst ]
|
|
||||||
then
|
|
||||||
dst="$dst"/`basename $src`
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
## this sed command emulates the dirname command
|
|
||||||
dstdir=`echo $dst | sed -e 's,[^/]*$,,;s,/$,,;s,^$,.,'`
|
|
||||||
|
|
||||||
# Make sure that the destination directory exists.
|
|
||||||
# this part is taken from Noah Friedman's mkinstalldirs script
|
|
||||||
|
|
||||||
# Skip lots of stat calls in the usual case.
|
|
||||||
if [ ! -d "$dstdir" ]; then
|
|
||||||
defaultIFS='
|
|
||||||
'
|
|
||||||
IFS="${IFS-${defaultIFS}}"
|
|
||||||
|
|
||||||
oIFS="${IFS}"
|
|
||||||
# Some sh's can't handle IFS=/ for some reason.
|
|
||||||
IFS='%'
|
|
||||||
set - `echo ${dstdir} | sed -e 's@/@%@g' -e 's@^%@/@'`
|
|
||||||
IFS="${oIFS}"
|
|
||||||
|
|
||||||
pathcomp=''
|
|
||||||
|
|
||||||
while [ $# -ne 0 ] ; do
|
|
||||||
pathcomp="${pathcomp}${1}"
|
|
||||||
shift
|
|
||||||
|
|
||||||
if [ ! -d "${pathcomp}" ] ;
|
|
||||||
then
|
|
||||||
$mkdirprog "${pathcomp}"
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
pathcomp="${pathcomp}/"
|
|
||||||
done
|
|
||||||
fi
|
|
||||||
|
|
||||||
if [ x"$dir_arg" != x ]
|
|
||||||
then
|
|
||||||
$doit $instcmd $dst &&
|
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dst; else true ; fi &&
|
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dst; else true ; fi &&
|
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dst; else true ; fi &&
|
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dst; else true ; fi
|
|
||||||
else
|
|
||||||
|
|
||||||
# If we're going to rename the final executable, determine the name now.
|
|
||||||
|
|
||||||
if [ x"$transformarg" = x ]
|
|
||||||
then
|
|
||||||
dstfile=`basename $dst`
|
|
||||||
else
|
|
||||||
dstfile=`basename $dst $transformbasename |
|
|
||||||
sed $transformarg`$transformbasename
|
|
||||||
fi
|
|
||||||
|
|
||||||
# don't allow the sed command to completely eliminate the filename
|
|
||||||
|
|
||||||
if [ x"$dstfile" = x ]
|
|
||||||
then
|
|
||||||
dstfile=`basename $dst`
|
|
||||||
else
|
|
||||||
true
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Make a temp file name in the proper directory.
|
|
||||||
|
|
||||||
dsttmp=$dstdir/#inst.$$#
|
|
||||||
|
|
||||||
# Move or copy the file name to the temp name
|
|
||||||
|
|
||||||
$doit $instcmd $src $dsttmp &&
|
|
||||||
|
|
||||||
trap "rm -f ${dsttmp}" 0 &&
|
|
||||||
|
|
||||||
# and set any options; do chmod last to preserve setuid bits
|
|
||||||
|
|
||||||
# If any of these fail, we abort the whole thing. If we want to
|
|
||||||
# ignore errors from any of these, just make sure not to ignore
|
|
||||||
# errors from the above "$doit $instcmd $src $dsttmp" command.
|
|
||||||
|
|
||||||
if [ x"$chowncmd" != x ]; then $doit $chowncmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$chgrpcmd" != x ]; then $doit $chgrpcmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$stripcmd" != x ]; then $doit $stripcmd $dsttmp; else true;fi &&
|
|
||||||
if [ x"$chmodcmd" != x ]; then $doit $chmodcmd $dsttmp; else true;fi &&
|
|
||||||
|
|
||||||
# Now rename the file to the real destination.
|
|
||||||
|
|
||||||
$doit $rmcmd -f $dstdir/$dstfile &&
|
|
||||||
$doit $mvcmd $dsttmp $dstdir/$dstfile
|
|
||||||
|
|
||||||
fi &&
|
|
||||||
|
|
||||||
|
|
||||||
exit 0
|
|
||||||
1106
intl/ChangeLog
1106
intl/ChangeLog
File diff suppressed because it is too large
Load Diff
228
intl/Makefile.in
228
intl/Makefile.in
@@ -1,5 +1,5 @@
|
|||||||
# Makefile for directory with message catalog handling in GNU NLS Utilities.
|
# 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
|
# 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
|
# it under the terms of the GNU General Public License as published by
|
||||||
@@ -28,75 +28,106 @@ VPATH = @srcdir@
|
|||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
transform = @program_transform_name@
|
transform = @program_transform_name@
|
||||||
libdir = $(exec_prefix)/lib
|
libdir = @libdir@
|
||||||
includedir = $(prefix)/include
|
includedir = @includedir@
|
||||||
datadir = $(prefix)/@DATADIRNAME@
|
datadir = @datadir@
|
||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
gnulocaledir = $(prefix)/share/locale
|
gettextsrcdir = $(datadir)/gettext/intl
|
||||||
gettextsrcdir = @datadir@/gettext/intl
|
aliaspath = $(localedir)
|
||||||
aliaspath = $(localedir):.
|
|
||||||
subdir = intl
|
subdir = intl
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||||
|
|
||||||
l = @l@
|
l = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
|
||||||
AR = ar
|
AR = ar
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
LIBTOOL = @LIBTOOL@
|
LIBTOOL = @LIBTOOL@
|
||||||
RANLIB = @RANLIB@
|
RANLIB = @RANLIB@
|
||||||
|
YACC = @INTLBISON@ -y -d
|
||||||
|
YFLAGS = --name-prefix=__gettext
|
||||||
|
|
||||||
DEFS = -DLOCALEDIR=\"$(localedir)\" -DGNULOCALEDIR=\"$(gnulocaledir)\" \
|
DEFS = -DLOCALEDIR=\"$(localedir)\" -DLOCALE_ALIAS_PATH=\"$(aliaspath)\" \
|
||||||
-DLOCALE_ALIAS_PATH=\"$(aliaspath)\" @DEFS@
|
-DLIBDIR=\"$(libdir)\" @DEFS@
|
||||||
CPPFLAGS = @CPPFLAGS@
|
CPPFLAGS = @CPPFLAGS@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
LDFLAGS = @LDFLAGS@
|
LDFLAGS = @LDFLAGS@
|
||||||
|
|
||||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
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
|
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 \
|
COMSRCS = bindtextdom.c dcgettext.c dgettext.c gettext.c \
|
||||||
finddomain.c loadmsgcat.c localealias.c textdomain.c l10nflist.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 \
|
OBJECTS = @INTLOBJS@ bindtextdom.$lo dcgettext.$lo dgettext.$lo gettext.$lo \
|
||||||
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
finddomain.$lo loadmsgcat.$lo localealias.$lo textdomain.$lo l10nflist.$lo \
|
||||||
explodename.$lo
|
explodename.$lo dcigettext.$lo dcngettext.$lo dngettext.$lo ngettext.$lo \
|
||||||
CATOBJS = cat-compat.$lo ../po/cat-id-tbl.$lo
|
plural.$lo localcharset.$lo
|
||||||
GETTOBJS = intl-compat.$lo
|
GETTOBJS = intl-compat.$lo
|
||||||
DISTFILES.common = ChangeLog Makefile.in linux-msg.sed po2tbl.sed.in \
|
DISTFILES.common = Makefile.in \
|
||||||
xopen-msg.sed $(HEADERS) $(SOURCES)
|
config.charset locale.alias ref-add.sin ref-del.sin $(HEADERS) $(SOURCES)
|
||||||
|
DISTFILES.generated = plural.c
|
||||||
DISTFILES.normal = VERSION
|
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:
|
||||||
.SUFFIXES: .c .o .lo
|
.SUFFIXES: .c .y .o .lo .sin .sed
|
||||||
.c.o:
|
.c.o:
|
||||||
$(COMPILE) $<
|
$(COMPILE) $<
|
||||||
.c.lo:
|
.c.lo:
|
||||||
$(LIBTOOL) --mode=compile $(COMPILE) $<
|
$(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: 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
|
libintl.a libgnuintl.a: $(OBJECTS)
|
||||||
all-no:
|
|
||||||
|
|
||||||
libintl.a: $(OBJECTS)
|
|
||||||
rm -f $@
|
rm -f $@
|
||||||
$(AR) cru $@ $(OBJECTS)
|
$(AR) cru $@ $(OBJECTS)
|
||||||
$(RANLIB) $@
|
$(RANLIB) $@
|
||||||
|
|
||||||
libintl.la: $(OBJECTS)
|
libintl.la libgnuintl.la: $(OBJECTS)
|
||||||
$(LIBTOOL) --mode=link $(CC) $(LDFLAGS) -o $@ $(OBJECTS) \
|
$(LIBTOOL) --mode=link \
|
||||||
-version-info 1:0 -rpath $(libdir)
|
$(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
|
libintl.h: libgnuintl.h
|
||||||
cd ../po && $(MAKE) cat-id-tbl.$lo
|
cp $(srcdir)/libgnuintl.h libintl.h
|
||||||
|
|
||||||
|
charset.alias: config.charset
|
||||||
|
$(SHELL) $(srcdir)/config.charset '@host@' > t-$@
|
||||||
|
mv t-$@ $@
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
|
|
||||||
@@ -104,36 +135,70 @@ check: all
|
|||||||
# only use the library should use install instead.
|
# only use the library should use install instead.
|
||||||
|
|
||||||
# We must not install the libintl.h/libintl.a files if we are on a
|
# 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
|
# system which has the GNU gettext() function in its C library or in a
|
||||||
# separate library or use the catgets interface. A special case is
|
# separate library.
|
||||||
# where configure found a previously installed GNU gettext library.
|
|
||||||
# If you want to use the one which comes with this version of the
|
# If you want to use the one which comes with this version of the
|
||||||
# package, you have to use `configure --with-included-gettext'.
|
# package, you have to use `configure --with-included-gettext'.
|
||||||
install: install-exec install-data
|
install: install-exec install-data
|
||||||
install-exec: all
|
install-exec: all
|
||||||
if test "$(PACKAGE)" = "gettext" \
|
if test "$(PACKAGE)" = "gettext" \
|
||||||
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
&& test '@INTLOBJS@' = '$(GETTOBJS)'; then \
|
||||||
if test -r $(MKINSTALLDIRS); then \
|
$(mkinstalldirs) $(DESTDIR)$(libdir) $(DESTDIR)$(includedir); \
|
||||||
$(MKINSTALLDIRS) $(libdir) $(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 \
|
else \
|
||||||
$(top_srcdir)/mkinstalldirs $(libdir) $(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; \
|
fi; \
|
||||||
$(INSTALL_DATA) intlh.inst $(includedir)/libintl.h; \
|
$(mkinstalldirs) $(DESTDIR)$(localedir); \
|
||||||
$(INSTALL_DATA) libintl.a $(libdir)/libintl.a; \
|
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 \
|
else \
|
||||||
: ; \
|
: ; \
|
||||||
fi
|
fi
|
||||||
install-data: all
|
install-data: all
|
||||||
if test "$(PACKAGE)" = "gettext"; then \
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
if test -r $(MKINSTALLDIRS); then \
|
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||||
$(MKINSTALLDIRS) $(gettextsrcdir); \
|
$(INSTALL_DATA) VERSION $(DESTDIR)$(gettextsrcdir)/VERSION; \
|
||||||
else \
|
$(INSTALL_DATA) ChangeLog.inst $(DESTDIR)$(gettextsrcdir)/ChangeLog; \
|
||||||
$(top_srcdir)/mkinstalldirs $(gettextsrcdir); \
|
|
||||||
fi; \
|
|
||||||
$(INSTALL_DATA) VERSION $(gettextsrcdir)/VERSION; \
|
|
||||||
dists="$(DISTFILES.common)"; \
|
dists="$(DISTFILES.common)"; \
|
||||||
for file in $$dists; do \
|
for file in $$dists; do \
|
||||||
$(INSTALL_DATA) $(srcdir)/$$file $(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; \
|
done; \
|
||||||
else \
|
else \
|
||||||
: ; \
|
: ; \
|
||||||
@@ -143,10 +208,43 @@ install-data: all
|
|||||||
installcheck:
|
installcheck:
|
||||||
|
|
||||||
uninstall:
|
uninstall:
|
||||||
|
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 \
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
dists="$(DISTFILES.common)"; \
|
for file in VERSION ChangeLog $(DISTFILES.common) $(DISTFILES.generated); do \
|
||||||
for file in $$dists; do \
|
rm -f $(DESTDIR)$(gettextsrcdir)/$$file; \
|
||||||
rm -f $(gettextsrcdir)/$$file; \
|
|
||||||
done; \
|
done; \
|
||||||
else \
|
else \
|
||||||
: ; \
|
: ; \
|
||||||
@@ -154,7 +252,7 @@ uninstall:
|
|||||||
|
|
||||||
info dvi:
|
info dvi:
|
||||||
|
|
||||||
$(OBJECTS): ../config.h libgettext.h
|
$(OBJECTS): ../config.h libgnuintl.h
|
||||||
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
bindtextdom.$lo finddomain.$lo loadmsgcat.$lo: gettextP.h gettext.h loadinfo.h
|
||||||
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
dcgettext.$lo: gettextP.h gettext.h hash-string.h loadinfo.h
|
||||||
|
|
||||||
@@ -170,12 +268,19 @@ ID: $(HEADERS) $(SOURCES)
|
|||||||
|
|
||||||
|
|
||||||
mostlyclean:
|
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
|
clean: mostlyclean
|
||||||
|
|
||||||
distclean: clean
|
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
|
maintainer-clean: distclean
|
||||||
@echo "This command is intended for maintainers to use;"
|
@echo "This command is intended for maintainers to use;"
|
||||||
@@ -185,34 +290,23 @@ maintainer-clean: distclean
|
|||||||
# GNU gettext needs not contain the file `VERSION' but contains some
|
# GNU gettext needs not contain the file `VERSION' but contains some
|
||||||
# other files which should not be distributed in other packages.
|
# other files which should not be distributed in other packages.
|
||||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
dist distdir: Makefile $(DISTFILES)
|
dist distdir: Makefile
|
||||||
if test "$(PACKAGE)" = gettext; then \
|
if test "$(PACKAGE)" = gettext; then \
|
||||||
additional="$(DISTFILES.gettext)"; \
|
additional="$(DISTFILES.gettext)"; \
|
||||||
else \
|
else \
|
||||||
additional="$(DISTFILES.normal)"; \
|
additional="$(DISTFILES.normal)"; \
|
||||||
fi; \
|
fi; \
|
||||||
for file in $(DISTFILES.common) $$additional; do \
|
$(MAKE) $(DISTFILES.common) $(DISTFILES.generated) $$additional; \
|
||||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
for file in ChangeLog $(DISTFILES.common) $(DISTFILES.generated) $$additional; do \
|
||||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||||
|
ln $$dir/$$file $(distdir) 2> /dev/null \
|
||||||
|
|| cp -p $$dir/$$file $(distdir); \
|
||||||
done
|
done
|
||||||
|
|
||||||
dist-libc:
|
|
||||||
tar zcvf intl-glibc.tar.gz $(COMSRCS) $(COMHDRS) libintl.h.glibc
|
|
||||||
|
|
||||||
Makefile: Makefile.in ../config.status
|
Makefile: Makefile.in ../config.status
|
||||||
cd .. \
|
cd .. \
|
||||||
&& CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= $(SHELL) ./config.status
|
&& 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.
|
# 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.
|
# Otherwise a system limit (for SysV at least) may be exceeded.
|
||||||
.NOEXPORT:
|
.NOEXPORT:
|
||||||
|
|||||||
@@ -1 +1 @@
|
|||||||
GNU gettext library from gettext-0.10.35
|
GNU gettext library from gettext-0.10.38
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Implementation of the bindtextdomain(3) function
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,33 +19,40 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#include <stddef.h>
|
||||||
# include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#else
|
#include <string.h>
|
||||||
# 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
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#else
|
||||||
# include "libgettext.h"
|
# include "libgnuintl.h"
|
||||||
#endif
|
#endif
|
||||||
#include "gettext.h"
|
|
||||||
#include "gettextP.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 @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
/* Contains the default location of the message catalogs. */
|
/* Contains the default location of the message catalogs. */
|
||||||
@@ -54,6 +61,9 @@ extern const char _nl_default_dirname[];
|
|||||||
/* List with bindings of specific domains. */
|
/* List with bindings of specific domains. */
|
||||||
extern struct binding *_nl_domain_bindings;
|
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
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
with existing names and they should follow ANSI C. But this source
|
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. */
|
prefix. So we have to make a difference here. */
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# define BINDTEXTDOMAIN __bindtextdomain
|
# define BINDTEXTDOMAIN __bindtextdomain
|
||||||
|
# define BIND_TEXTDOMAIN_CODESET __bind_textdomain_codeset
|
||||||
# ifndef strdup
|
# ifndef strdup
|
||||||
# define strdup(str) __strdup (str)
|
# define strdup(str) __strdup (str)
|
||||||
# endif
|
# endif
|
||||||
#else
|
#else
|
||||||
# define BINDTEXTDOMAIN bindtextdomain__
|
# define BINDTEXTDOMAIN bindtextdomain__
|
||||||
|
# define BIND_TEXTDOMAIN_CODESET bind_textdomain_codeset__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Specify that the DOMAINNAME message catalog will be found
|
/* Prototypes for local functions. */
|
||||||
in DIRNAME rather than in the system locale data base. */
|
static void set_binding_values PARAMS ((const char *domainname,
|
||||||
char *
|
const char **dirnamep,
|
||||||
BINDTEXTDOMAIN (domainname, dirname)
|
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 *domainname;
|
||||||
const char *dirname;
|
const char **dirnamep;
|
||||||
|
const char **codesetp;
|
||||||
{
|
{
|
||||||
struct binding *binding;
|
struct binding *binding;
|
||||||
|
int modified;
|
||||||
|
|
||||||
/* Some sanity checks. */
|
/* Some sanity checks. */
|
||||||
if (domainname == NULL || domainname[0] == '\0')
|
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)
|
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)
|
if (binding != NULL)
|
||||||
{
|
{
|
||||||
/* The domain is already bound. If the new value and the old
|
if (dirnamep)
|
||||||
one are equal we simply do nothing. Otherwise replace the
|
|
||||||
old binding. */
|
|
||||||
if (strcmp (dirname, binding->dirname) != 0)
|
|
||||||
{
|
{
|
||||||
char *new_dirname;
|
const char *dirname = *dirnamep;
|
||||||
|
|
||||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
if (dirname == NULL)
|
||||||
new_dirname = (char *) _nl_default_dirname;
|
/* The current binding has be to returned. */
|
||||||
|
*dirnamep = binding->dirname;
|
||||||
else
|
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
|
#if defined _LIBC || defined HAVE_STRDUP
|
||||||
new_dirname = strdup (dirname);
|
result = strdup (dirname);
|
||||||
if (new_dirname == NULL)
|
|
||||||
return NULL;
|
|
||||||
#else
|
#else
|
||||||
size_t len = strlen (dirname) + 1;
|
size_t len = strlen (dirname) + 1;
|
||||||
new_dirname = (char *) malloc (len);
|
result = (char *) malloc (len);
|
||||||
if (new_dirname == NULL)
|
if (__builtin_expect (result != NULL, 1))
|
||||||
return NULL;
|
memcpy (result, dirname, len);
|
||||||
|
|
||||||
memcpy (new_dirname, dirname, len);
|
|
||||||
#endif
|
#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
|
else
|
||||||
{
|
{
|
||||||
/* We have to create a new binding. */
|
/* We have to create a new binding. */
|
||||||
#if !defined _LIBC && !defined HAVE_STRDUP
|
size_t len = strlen (domainname) + 1;
|
||||||
size_t len;
|
|
||||||
#endif
|
|
||||||
struct binding *new_binding =
|
struct binding *new_binding =
|
||||||
(struct binding *) malloc (sizeof (*new_binding));
|
(struct binding *) malloc (offsetof (struct binding, domainname) + len);
|
||||||
|
|
||||||
if (new_binding == NULL)
|
if (__builtin_expect (new_binding == NULL, 0))
|
||||||
return NULL;
|
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);
|
memcpy (new_binding->domainname, domainname, len);
|
||||||
#endif
|
|
||||||
|
|
||||||
if (strcmp (dirname, _nl_default_dirname) == 0)
|
if (dirnamep)
|
||||||
new_binding->dirname = (char *) _nl_default_dirname;
|
|
||||||
else
|
|
||||||
{
|
{
|
||||||
|
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
|
#if defined _LIBC || defined HAVE_STRDUP
|
||||||
new_binding->dirname = strdup (dirname);
|
result = strdup (dirname);
|
||||||
if (new_binding->dirname == NULL)
|
if (__builtin_expect (result == NULL, 0))
|
||||||
return NULL;
|
goto failed_dirname;
|
||||||
#else
|
#else
|
||||||
len = strlen (dirname) + 1;
|
size_t len = strlen (dirname) + 1;
|
||||||
new_binding->dirname = (char *) malloc (len);
|
result = (char *) malloc (len);
|
||||||
if (new_binding->dirname == NULL)
|
if (__builtin_expect (result == NULL, 0))
|
||||||
return NULL;
|
goto failed_dirname;
|
||||||
memcpy (new_binding->dirname, dirname, len);
|
memcpy (result, dirname, len);
|
||||||
#endif
|
#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. */
|
/* Now enqueue it. */
|
||||||
if (_nl_domain_bindings == NULL
|
if (_nl_domain_bindings == NULL
|
||||||
@@ -191,13 +314,55 @@ BINDTEXTDOMAIN (domainname, dirname)
|
|||||||
binding->next = new_binding;
|
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
|
#ifdef _LIBC
|
||||||
/* Alias for function name in GNU C Library. */
|
/* Aliases for function names in GNU C Library. */
|
||||||
weak_alias (__bindtextdomain, bindtextdomain);
|
weak_alias (__bindtextdomain, bindtextdomain);
|
||||||
|
weak_alias (__bind_textdomain_codeset, bind_textdomain_codeset);
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
438
intl/config.charset
Executable file
438
intl/config.charset
Executable file
@@ -0,0 +1,438 @@
|
|||||||
|
#! /bin/sh
|
||||||
|
# Output a system dependent table of character encoding aliases.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# The table consists of lines of the form
|
||||||
|
# ALIAS CANONICAL
|
||||||
|
#
|
||||||
|
# ALIAS is the (system dependent) result of "nl_langinfo (CODESET)".
|
||||||
|
# ALIAS is compared in a case sensitive way.
|
||||||
|
#
|
||||||
|
# CANONICAL is the GNU canonical name for this character encoding.
|
||||||
|
# It must be an encoding supported by libiconv. Support by GNU libc is
|
||||||
|
# also desirable. CANONICAL is case insensitive. Usually an upper case
|
||||||
|
# MIME charset name is preferred.
|
||||||
|
# The current list of GNU canonical charset names is as follows.
|
||||||
|
#
|
||||||
|
# name used by which systems a MIME name?
|
||||||
|
# ASCII, ANSI_X3.4-1968 glibc solaris freebsd
|
||||||
|
# ISO-8859-1 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-2 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-3 glibc yes
|
||||||
|
# ISO-8859-4 osf solaris freebsd yes
|
||||||
|
# ISO-8859-5 glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# ISO-8859-6 glibc aix hpux solaris yes
|
||||||
|
# ISO-8859-7 glibc aix hpux irix osf solaris yes
|
||||||
|
# ISO-8859-8 glibc aix hpux osf solaris yes
|
||||||
|
# ISO-8859-9 glibc aix hpux irix osf solaris yes
|
||||||
|
# ISO-8859-13 glibc
|
||||||
|
# ISO-8859-15 glibc aix osf solaris freebsd
|
||||||
|
# KOI8-R glibc solaris freebsd yes
|
||||||
|
# KOI8-U glibc freebsd yes
|
||||||
|
# CP437 dos
|
||||||
|
# CP775 dos
|
||||||
|
# CP850 aix osf dos
|
||||||
|
# CP852 dos
|
||||||
|
# CP855 dos
|
||||||
|
# CP856 aix
|
||||||
|
# CP857 dos
|
||||||
|
# CP861 dos
|
||||||
|
# CP862 dos
|
||||||
|
# CP864 dos
|
||||||
|
# CP865 dos
|
||||||
|
# CP866 freebsd dos
|
||||||
|
# CP869 dos
|
||||||
|
# CP874 win32 dos
|
||||||
|
# CP922 aix
|
||||||
|
# CP932 aix win32 dos
|
||||||
|
# CP943 aix
|
||||||
|
# CP949 osf win32 dos
|
||||||
|
# CP950 win32 dos
|
||||||
|
# CP1046 aix
|
||||||
|
# CP1124 aix
|
||||||
|
# CP1129 aix
|
||||||
|
# CP1250 win32
|
||||||
|
# CP1251 glibc win32
|
||||||
|
# CP1252 aix win32
|
||||||
|
# CP1253 win32
|
||||||
|
# CP1254 win32
|
||||||
|
# CP1255 win32
|
||||||
|
# CP1256 win32
|
||||||
|
# CP1257 win32
|
||||||
|
# GB2312 glibc aix hpux irix solaris freebsd yes
|
||||||
|
# EUC-JP glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# EUC-KR glibc aix hpux irix osf solaris freebsd yes
|
||||||
|
# EUC-TW glibc aix hpux irix osf solaris
|
||||||
|
# BIG5 glibc aix hpux osf solaris freebsd yes
|
||||||
|
# BIG5HKSCS glibc
|
||||||
|
# GBK aix osf win32 dos
|
||||||
|
# GB18030 glibc
|
||||||
|
# SJIS hpux osf solaris freebsd
|
||||||
|
# JOHAB glibc win32
|
||||||
|
# TIS-620 glibc aix hpux osf solaris
|
||||||
|
# VISCII glibc yes
|
||||||
|
# HP-ROMAN8 hpux
|
||||||
|
# HP-ARABIC8 hpux
|
||||||
|
# HP-GREEK8 hpux
|
||||||
|
# HP-HEBREW8 hpux
|
||||||
|
# HP-TURKISH8 hpux
|
||||||
|
# HP-KANA8 hpux
|
||||||
|
# DEC-KANJI osf
|
||||||
|
# DEC-HANYU osf
|
||||||
|
# UTF-8 glibc aix hpux osf solaris yes
|
||||||
|
#
|
||||||
|
# Note: Names which are not marked as being a MIME name should not be used in
|
||||||
|
# Internet protocols for information interchange (mail, news, etc.).
|
||||||
|
#
|
||||||
|
# Note: ASCII and ANSI_X3.4-1968 are synonymous canonical names. Applications
|
||||||
|
# must understand both names and treat them as equivalent.
|
||||||
|
#
|
||||||
|
# The first argument passed to this file is the canonical host specification,
|
||||||
|
# CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
|
||||||
|
# or
|
||||||
|
# CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM
|
||||||
|
|
||||||
|
host="$1"
|
||||||
|
os=`echo "$host" | sed -e 's/^[^-]*-[^-]*-\(.*\)$/\1/'`
|
||||||
|
echo "# This file contains a table of character encoding aliases,"
|
||||||
|
echo "# suitable for operating system '${os}'."
|
||||||
|
echo "# It was automatically generated from config.charset."
|
||||||
|
# List of references, updated during installation:
|
||||||
|
echo "# Packages using this file: "
|
||||||
|
case "$os" in
|
||||||
|
linux* | *-gnu*)
|
||||||
|
# With glibc-2.1 or newer, we don't need any canonicalization,
|
||||||
|
# because glibc has iconv and both glibc and libiconv support all
|
||||||
|
# GNU canonical names directly. Therefore, the Makefile does not
|
||||||
|
# need to install the alias file at all.
|
||||||
|
# The following applies only to glibc-2.0.x and older libcs.
|
||||||
|
echo "ISO_646.IRV:1983 ASCII"
|
||||||
|
;;
|
||||||
|
aix*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-6 ISO-8859-6"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "IBM-850 CP850"
|
||||||
|
echo "IBM-856 CP856"
|
||||||
|
echo "IBM-921 ISO-8859-13"
|
||||||
|
echo "IBM-922 CP922"
|
||||||
|
echo "IBM-932 CP932"
|
||||||
|
echo "IBM-943 CP943"
|
||||||
|
echo "IBM-1046 CP1046"
|
||||||
|
echo "IBM-1124 CP1124"
|
||||||
|
echo "IBM-1129 CP1129"
|
||||||
|
echo "IBM-1252 CP1252"
|
||||||
|
echo "IBM-eucCN GB2312"
|
||||||
|
echo "IBM-eucJP EUC-JP"
|
||||||
|
echo "IBM-eucKR EUC-KR"
|
||||||
|
echo "IBM-eucTW EUC-TW"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "TIS-620 TIS-620"
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
hpux*)
|
||||||
|
echo "iso88591 ISO-8859-1"
|
||||||
|
echo "iso88592 ISO-8859-2"
|
||||||
|
echo "iso88595 ISO-8859-5"
|
||||||
|
echo "iso88596 ISO-8859-6"
|
||||||
|
echo "iso88597 ISO-8859-7"
|
||||||
|
echo "iso88598 ISO-8859-8"
|
||||||
|
echo "iso88599 ISO-8859-9"
|
||||||
|
echo "iso885915 ISO-8859-15"
|
||||||
|
echo "roman8 HP-ROMAN8"
|
||||||
|
echo "arabic8 HP-ARABIC8"
|
||||||
|
echo "greek8 HP-GREEK8"
|
||||||
|
echo "hebrew8 HP-HEBREW8"
|
||||||
|
echo "turkish8 HP-TURKISH8"
|
||||||
|
echo "kana8 HP-KANA8"
|
||||||
|
echo "tis620 TIS-620"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
echo "hp15CN GB2312"
|
||||||
|
#echo "ccdc ?" # what is this?
|
||||||
|
echo "SJIS SJIS"
|
||||||
|
echo "utf8 UTF-8"
|
||||||
|
;;
|
||||||
|
irix*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "eucCN GB2312"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
;;
|
||||||
|
osf*)
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "cp850 CP850"
|
||||||
|
echo "big5 BIG5"
|
||||||
|
echo "dechanyu DEC-HANYU"
|
||||||
|
echo "dechanzi GB2312"
|
||||||
|
echo "deckanji DEC-KANJI"
|
||||||
|
echo "deckorean EUC-KR"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "eucKR EUC-KR"
|
||||||
|
echo "eucTW EUC-TW"
|
||||||
|
echo "GBK GBK"
|
||||||
|
echo "KSC5601 CP949"
|
||||||
|
echo "sdeckanji EUC-JP"
|
||||||
|
echo "SJIS SJIS"
|
||||||
|
echo "TACTIS TIS-620"
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
solaris*)
|
||||||
|
echo "646 ASCII"
|
||||||
|
echo "ISO8859-1 ISO-8859-1"
|
||||||
|
echo "ISO8859-2 ISO-8859-2"
|
||||||
|
echo "ISO8859-4 ISO-8859-4"
|
||||||
|
echo "ISO8859-5 ISO-8859-5"
|
||||||
|
echo "ISO8859-6 ISO-8859-6"
|
||||||
|
echo "ISO8859-7 ISO-8859-7"
|
||||||
|
echo "ISO8859-8 ISO-8859-8"
|
||||||
|
echo "ISO8859-9 ISO-8859-9"
|
||||||
|
echo "ISO8859-15 ISO-8859-15"
|
||||||
|
echo "koi8-r KOI8-R"
|
||||||
|
echo "BIG5 BIG5"
|
||||||
|
echo "gb2312 GB2312"
|
||||||
|
echo "cns11643 EUC-TW"
|
||||||
|
echo "5601 EUC-KR"
|
||||||
|
echo "eucJP EUC-JP"
|
||||||
|
echo "PCK SJIS"
|
||||||
|
echo "TIS620.2533 TIS-620"
|
||||||
|
#echo "sun_eu_greek ?" # what is this?
|
||||||
|
echo "UTF-8 UTF-8"
|
||||||
|
;;
|
||||||
|
freebsd*)
|
||||||
|
# FreeBSD 4.2 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "C ASCII"
|
||||||
|
echo "US-ASCII ASCII"
|
||||||
|
for l in la_LN lt_LN; do
|
||||||
|
echo "$l.ASCII ASCII"
|
||||||
|
done
|
||||||
|
for l in da_DK de_AT de_CH de_DE en_AU en_CA en_GB en_US es_ES \
|
||||||
|
fi_FI fr_BE fr_CA fr_CH fr_FR is_IS it_CH it_IT la_LN \
|
||||||
|
lt_LN nl_BE nl_NL no_NO pt_PT sv_SE; do
|
||||||
|
echo "$l.ISO_8859-1 ISO-8859-1"
|
||||||
|
echo "$l.DIS_8859-15 ISO-8859-15"
|
||||||
|
done
|
||||||
|
for l in cs_CZ hr_HR hu_HU la_LN lt_LN pl_PL sl_SI; do
|
||||||
|
echo "$l.ISO_8859-2 ISO-8859-2"
|
||||||
|
done
|
||||||
|
for l in la_LN lt_LT; do
|
||||||
|
echo "$l.ISO_8859-4 ISO-8859-4"
|
||||||
|
done
|
||||||
|
for l in ru_RU ru_SU; do
|
||||||
|
echo "$l.KOI8-R KOI8-R"
|
||||||
|
echo "$l.ISO_8859-5 ISO-8859-5"
|
||||||
|
echo "$l.CP866 CP866"
|
||||||
|
done
|
||||||
|
echo "uk_UA.KOI8-U KOI8-U"
|
||||||
|
echo "zh_TW.BIG5 BIG5"
|
||||||
|
echo "zh_TW.Big5 BIG5"
|
||||||
|
echo "zh_CN.EUC GB2312"
|
||||||
|
echo "ja_JP.EUC EUC-JP"
|
||||||
|
echo "ja_JP.SJIS SJIS"
|
||||||
|
echo "ja_JP.Shift_JIS SJIS"
|
||||||
|
echo "ko_KR.EUC EUC-KR"
|
||||||
|
;;
|
||||||
|
beos*)
|
||||||
|
# BeOS has a single locale, and it has UTF-8 encoding.
|
||||||
|
echo "* UTF-8"
|
||||||
|
;;
|
||||||
|
msdosdjgpp*)
|
||||||
|
# DJGPP 2.03 doesn't have nl_langinfo(CODESET); therefore
|
||||||
|
# localcharset.c falls back to using the full locale name
|
||||||
|
# from the environment variables.
|
||||||
|
echo "#"
|
||||||
|
echo "# The encodings given here may not all be correct."
|
||||||
|
echo "# If you find that the encoding given for your language and"
|
||||||
|
echo "# country is not the one your DOS machine actually uses, just"
|
||||||
|
echo "# correct it in this file, and send a mail to"
|
||||||
|
echo "# Juan Manuel Guerrero <st001906@hrz1.hrz.tu-darmstadt.de>"
|
||||||
|
echo "# and Bruno Haible <haible@clisp.cons.org>."
|
||||||
|
echo "#"
|
||||||
|
echo "C ASCII"
|
||||||
|
# ISO-8859-1 languages
|
||||||
|
echo "ca CP850"
|
||||||
|
echo "ca_ES CP850"
|
||||||
|
echo "da CP865" # not CP850 ??
|
||||||
|
echo "da_DK CP865" # not CP850 ??
|
||||||
|
echo "de CP850"
|
||||||
|
echo "de_AT CP850"
|
||||||
|
echo "de_CH CP850"
|
||||||
|
echo "de_DE CP850"
|
||||||
|
echo "en CP850"
|
||||||
|
echo "en_AU CP850" # not CP437 ??
|
||||||
|
echo "en_CA CP850"
|
||||||
|
echo "en_GB CP850"
|
||||||
|
echo "en_NZ CP437"
|
||||||
|
echo "en_US CP437"
|
||||||
|
echo "en_ZA CP850" # not CP437 ??
|
||||||
|
echo "es CP850"
|
||||||
|
echo "es_AR CP850"
|
||||||
|
echo "es_BO CP850"
|
||||||
|
echo "es_CL CP850"
|
||||||
|
echo "es_CO CP850"
|
||||||
|
echo "es_CR CP850"
|
||||||
|
echo "es_CU CP850"
|
||||||
|
echo "es_DO CP850"
|
||||||
|
echo "es_EC CP850"
|
||||||
|
echo "es_ES CP850"
|
||||||
|
echo "es_GT CP850"
|
||||||
|
echo "es_HN CP850"
|
||||||
|
echo "es_MX CP850"
|
||||||
|
echo "es_NI CP850"
|
||||||
|
echo "es_PA CP850"
|
||||||
|
echo "es_PY CP850"
|
||||||
|
echo "es_PE CP850"
|
||||||
|
echo "es_SV CP850"
|
||||||
|
echo "es_UY CP850"
|
||||||
|
echo "es_VE CP850"
|
||||||
|
echo "et CP850"
|
||||||
|
echo "et_EE CP850"
|
||||||
|
echo "eu CP850"
|
||||||
|
echo "eu_ES CP850"
|
||||||
|
echo "fi CP850"
|
||||||
|
echo "fi_FI CP850"
|
||||||
|
echo "fr CP850"
|
||||||
|
echo "fr_BE CP850"
|
||||||
|
echo "fr_CA CP850"
|
||||||
|
echo "fr_CH CP850"
|
||||||
|
echo "fr_FR CP850"
|
||||||
|
echo "ga CP850"
|
||||||
|
echo "ga_IE CP850"
|
||||||
|
echo "gd CP850"
|
||||||
|
echo "gd_GB CP850"
|
||||||
|
echo "gl CP850"
|
||||||
|
echo "gl_ES CP850"
|
||||||
|
echo "id CP850" # not CP437 ??
|
||||||
|
echo "id_ID CP850" # not CP437 ??
|
||||||
|
echo "is CP861" # not CP850 ??
|
||||||
|
echo "is_IS CP861" # not CP850 ??
|
||||||
|
echo "it CP850"
|
||||||
|
echo "it_CH CP850"
|
||||||
|
echo "it_IT CP850"
|
||||||
|
echo "lt CP775"
|
||||||
|
echo "lt_LT CP775"
|
||||||
|
echo "lv CP775"
|
||||||
|
echo "lv_LV CP775"
|
||||||
|
echo "nb CP865" # not CP850 ??
|
||||||
|
echo "nb_NO CP865" # not CP850 ??
|
||||||
|
echo "nl CP850"
|
||||||
|
echo "nl_BE CP850"
|
||||||
|
echo "nl_NL CP850"
|
||||||
|
echo "nn CP865" # not CP850 ??
|
||||||
|
echo "nn_NO CP865" # not CP850 ??
|
||||||
|
echo "no CP865" # not CP850 ??
|
||||||
|
echo "no_NO CP865" # not CP850 ??
|
||||||
|
echo "pt CP850"
|
||||||
|
echo "pt_BR CP850"
|
||||||
|
echo "pt_PT CP850"
|
||||||
|
echo "sv CP850"
|
||||||
|
echo "sv_SE CP850"
|
||||||
|
# ISO-8859-2 languages
|
||||||
|
echo "cs CP852"
|
||||||
|
echo "cs_CZ CP852"
|
||||||
|
echo "hr CP852"
|
||||||
|
echo "hr_HR CP852"
|
||||||
|
echo "hu CP852"
|
||||||
|
echo "hu_HU CP852"
|
||||||
|
echo "pl CP852"
|
||||||
|
echo "pl_PL CP852"
|
||||||
|
echo "ro CP852"
|
||||||
|
echo "ro_RO CP852"
|
||||||
|
echo "sk CP852"
|
||||||
|
echo "sk_SK CP852"
|
||||||
|
echo "sl CP852"
|
||||||
|
echo "sl_SI CP852"
|
||||||
|
echo "sq CP852"
|
||||||
|
echo "sq_AL CP852"
|
||||||
|
echo "sr CP852" # CP852 or CP866 or CP855 ??
|
||||||
|
echo "sr_YU CP852" # CP852 or CP866 or CP855 ??
|
||||||
|
# ISO-8859-3 languages
|
||||||
|
echo "mt CP850"
|
||||||
|
echo "mt_MT CP850"
|
||||||
|
# ISO-8859-5 languages
|
||||||
|
echo "be CP866"
|
||||||
|
echo "be_BE CP866"
|
||||||
|
echo "bg CP866" # not CP855 ??
|
||||||
|
echo "bg_BG CP866" # not CP855 ??
|
||||||
|
echo "mk CP866" # not CP855 ??
|
||||||
|
echo "mk_MK CP866" # not CP855 ??
|
||||||
|
echo "ru KOI8-R" # not CP866 ??
|
||||||
|
echo "ru_RU KOI8-R" # not CP866 ??
|
||||||
|
# ISO-8859-6 languages
|
||||||
|
echo "ar CP864"
|
||||||
|
echo "ar_AE CP864"
|
||||||
|
echo "ar_DZ CP864"
|
||||||
|
echo "ar_EG CP864"
|
||||||
|
echo "ar_IQ CP864"
|
||||||
|
echo "ar_IR CP864"
|
||||||
|
echo "ar_JO CP864"
|
||||||
|
echo "ar_KW CP864"
|
||||||
|
echo "ar_MA CP864"
|
||||||
|
echo "ar_OM CP864"
|
||||||
|
echo "ar_QA CP864"
|
||||||
|
echo "ar_SA CP864"
|
||||||
|
echo "ar_SY CP864"
|
||||||
|
# ISO-8859-7 languages
|
||||||
|
echo "el CP869"
|
||||||
|
echo "el_GR CP869"
|
||||||
|
# ISO-8859-8 languages
|
||||||
|
echo "he CP862"
|
||||||
|
echo "he_IL CP862"
|
||||||
|
# ISO-8859-9 languages
|
||||||
|
echo "tr CP857"
|
||||||
|
echo "tr_TR CP857"
|
||||||
|
# Japanese
|
||||||
|
echo "ja CP932"
|
||||||
|
echo "ja_JP CP932"
|
||||||
|
# Chinese
|
||||||
|
echo "zh_CN GBK"
|
||||||
|
echo "zh_TW CP950" # not CP938 ??
|
||||||
|
# Korean
|
||||||
|
echo "kr CP949" # not CP934 ??
|
||||||
|
echo "kr_KR CP949" # not CP934 ??
|
||||||
|
# Thai
|
||||||
|
echo "th CP874"
|
||||||
|
echo "th_TH CP874"
|
||||||
|
# Other
|
||||||
|
echo "eo CP850"
|
||||||
|
echo "eo_EO CP850"
|
||||||
|
;;
|
||||||
|
esac
|
||||||
577
intl/dcgettext.c
577
intl/dcgettext.c
@@ -1,5 +1,5 @@
|
|||||||
/* Implementation of the dcgettext(3) function.
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,202 +19,25 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#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"
|
#include "gettextP.h"
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#else
|
||||||
# include "libgettext.h"
|
# include "libgnuintl.h"
|
||||||
#endif
|
#endif
|
||||||
#include "hash-string.h"
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ 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
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
with existing names and they should follow ANSI C. But this source
|
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 __
|
code is also used in GNU C Library where the names have a __
|
||||||
prefix. So we have to make a difference here. */
|
prefix. So we have to make a difference here. */
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# define DCGETTEXT __dcgettext
|
# define DCGETTEXT __dcgettext
|
||||||
|
# define DCIGETTEXT __dcigettext
|
||||||
#else
|
#else
|
||||||
# define DCGETTEXT dcgettext__
|
# define DCGETTEXT dcgettext__
|
||||||
|
# define DCIGETTEXT dcigettext__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
@@ -225,400 +48,10 @@ DCGETTEXT (domainname, msgid, category)
|
|||||||
const char *msgid;
|
const char *msgid;
|
||||||
int category;
|
int category;
|
||||||
{
|
{
|
||||||
#ifndef HAVE_ALLOCA
|
return DCIGETTEXT (domainname, msgid, NULL, 0, 0, category);
|
||||||
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 */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
/* Alias for function name in GNU C Library. */
|
/* Alias for function name in GNU C Library. */
|
||||||
weak_alias (__dcgettext, dcgettext);
|
weak_alias (__dcgettext, dcgettext);
|
||||||
#endif
|
#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
|
|
||||||
|
|||||||
1257
intl/dcigettext.c
Normal file
1257
intl/dcigettext.c
Normal file
File diff suppressed because it is too large
Load Diff
59
intl/dcngettext.c
Normal file
59
intl/dcngettext.c
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
/* Implementation of the dcngettext(3) function.
|
||||||
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
# define DCIGETTEXT __dcigettext
|
||||||
|
#else
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
# define DCIGETTEXT dcigettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
|
locale. */
|
||||||
|
char *
|
||||||
|
DCNGETTEXT (domainname, msgid1, msgid2, n, category)
|
||||||
|
const char *domainname;
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
int category;
|
||||||
|
{
|
||||||
|
return DCIGETTEXT (domainname, msgid1, msgid2, 1, n, category);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__dcngettext, dcngettext);
|
||||||
|
#endif
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Implementation of the dgettext(3) function
|
/* Implementation of the dgettext(3) function.
|
||||||
Copyright (C) 1995, 1996, 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,14 +19,13 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined HAVE_LOCALE_H || defined _LIBC
|
#include <locale.h>
|
||||||
# include <locale.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#else
|
||||||
# include "libgettext.h"
|
# include "libgnuintl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|||||||
60
intl/dngettext.c
Normal file
60
intl/dngettext.c
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
/* Implementation of the dngettext(3) function.
|
||||||
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define DNGETTEXT __dngettext
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
#else
|
||||||
|
# define DNGETTEXT dngettext__
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog of the current
|
||||||
|
LC_MESSAGES locale and skip message according to the plural form. */
|
||||||
|
char *
|
||||||
|
DNGETTEXT (domainname, msgid1, msgid2, n)
|
||||||
|
const char *domainname;
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
{
|
||||||
|
return DCNGETTEXT (domainname, msgid1, msgid2, n, LC_MESSAGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__dngettext, dngettext);
|
||||||
|
#endif
|
||||||
@@ -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.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
This program is free software; you can redistribute it and/or modify
|
||||||
@@ -19,15 +19,8 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#include <stdlib.h>
|
||||||
# include <stdlib.h>
|
#include <string.h>
|
||||||
#endif
|
|
||||||
|
|
||||||
#if defined HAVE_STRING_H || defined _LIBC
|
|
||||||
# include <string.h>
|
|
||||||
#else
|
|
||||||
# include <strings.h>
|
|
||||||
#endif
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
|
||||||
#include "loadinfo.h"
|
#include "loadinfo.h"
|
||||||
@@ -43,6 +36,18 @@
|
|||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ 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
|
int
|
||||||
_nl_explode_name (name, language, modifier, territory, codeset,
|
_nl_explode_name (name, language, modifier, territory, codeset,
|
||||||
normalized_codeset, special, sponsor, revision)
|
normalized_codeset, special, sponsor, revision)
|
||||||
@@ -74,9 +79,7 @@ _nl_explode_name (name, language, modifier, territory, codeset,
|
|||||||
mask = 0;
|
mask = 0;
|
||||||
syntax = undecided;
|
syntax = undecided;
|
||||||
*language = cp = name;
|
*language = cp = name;
|
||||||
while (cp[0] != '\0' && cp[0] != '_' && cp[0] != '@'
|
cp = _nl_find_language (*language);
|
||||||
&& cp[0] != '+' && cp[0] != ',')
|
|
||||||
++cp;
|
|
||||||
|
|
||||||
if (*language == cp)
|
if (*language == cp)
|
||||||
/* This does not make sense: language has to be specified. Use
|
/* This does not make sense: language has to be specified. Use
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* Handle list of needed message catalogs
|
/* Handle list of needed message catalogs
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Written by Ulrich Drepper <drepper@gnu.org>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,45 +20,20 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <ctype.h>
|
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#include <string.h>
|
||||||
# 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
|
|
||||||
|
|
||||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
#if defined HAVE_UNISTD_H || defined _LIBC
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gettext.h"
|
|
||||||
#include "gettextP.h"
|
#include "gettextP.h"
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#else
|
||||||
# include "libgettext.h"
|
# include "libgnuintl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
@@ -71,10 +46,11 @@ static struct loaded_l10nfile *_nl_loaded_domains;
|
|||||||
established bindings. */
|
established bindings. */
|
||||||
struct loaded_l10nfile *
|
struct loaded_l10nfile *
|
||||||
internal_function
|
internal_function
|
||||||
_nl_find_domain (dirname, locale, domainname)
|
_nl_find_domain (dirname, locale, domainname, domainbinding)
|
||||||
const char *dirname;
|
const char *dirname;
|
||||||
char *locale;
|
char *locale;
|
||||||
const char *domainname;
|
const char *domainname;
|
||||||
|
struct binding *domainbinding;
|
||||||
{
|
{
|
||||||
struct loaded_l10nfile *retval;
|
struct loaded_l10nfile *retval;
|
||||||
const char *language;
|
const char *language;
|
||||||
@@ -120,7 +96,7 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
int cnt;
|
int cnt;
|
||||||
|
|
||||||
if (retval->decided == 0)
|
if (retval->decided == 0)
|
||||||
_nl_load_domain (retval);
|
_nl_load_domain (retval, domainbinding);
|
||||||
|
|
||||||
if (retval->data != NULL)
|
if (retval->data != NULL)
|
||||||
return retval;
|
return retval;
|
||||||
@@ -128,7 +104,7 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
||||||
{
|
{
|
||||||
if (retval->successor[cnt]->decided == 0)
|
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)
|
if (retval->successor[cnt]->data != NULL)
|
||||||
break;
|
break;
|
||||||
@@ -175,14 +151,14 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
return NULL;
|
return NULL;
|
||||||
|
|
||||||
if (retval->decided == 0)
|
if (retval->decided == 0)
|
||||||
_nl_load_domain (retval);
|
_nl_load_domain (retval, domainbinding);
|
||||||
if (retval->data == NULL)
|
if (retval->data == NULL)
|
||||||
{
|
{
|
||||||
int cnt;
|
int cnt;
|
||||||
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
for (cnt = 0; retval->successor[cnt] != NULL; ++cnt)
|
||||||
{
|
{
|
||||||
if (retval->successor[cnt]->decided == 0)
|
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)
|
if (retval->successor[cnt]->data != NULL)
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -192,6 +168,10 @@ _nl_find_domain (dirname, locale, domainname)
|
|||||||
if (alias_value != NULL)
|
if (alias_value != NULL)
|
||||||
free (locale);
|
free (locale);
|
||||||
|
|
||||||
|
/* The space for normalized_codeset is dynamically allocated. Free it. */
|
||||||
|
if (mask & XPG_NORM_CODESET)
|
||||||
|
free ((void *) normalized_codeset);
|
||||||
|
|
||||||
return retval;
|
return retval;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -208,6 +188,7 @@ free_mem (void)
|
|||||||
if (runp->data != NULL)
|
if (runp->data != NULL)
|
||||||
_nl_unload_domain ((struct loaded_domain *) runp->data);
|
_nl_unload_domain ((struct loaded_domain *) runp->data);
|
||||||
runp = runp->next;
|
runp = runp->next;
|
||||||
|
free ((char *) here->filename);
|
||||||
free (here);
|
free (here);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Implementation of gettext(3) function.
|
/* 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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -23,21 +23,14 @@
|
|||||||
# define __need_NULL
|
# define __need_NULL
|
||||||
# include <stddef.h>
|
# include <stddef.h>
|
||||||
#else
|
#else
|
||||||
# ifdef STDC_HEADERS
|
# include <stdlib.h> /* Just for NULL. */
|
||||||
# include <stdlib.h> /* Just for NULL. */
|
|
||||||
# else
|
|
||||||
# ifdef HAVE_STRING_H
|
|
||||||
# include <string.h>
|
|
||||||
# else
|
|
||||||
# define NULL ((void *) 0)
|
|
||||||
# endif
|
|
||||||
# endif
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#else
|
||||||
# include "libgettext.h"
|
# include "libgnuintl.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
@@ -48,10 +41,10 @@
|
|||||||
prefix. So we have to make a difference here. */
|
prefix. So we have to make a difference here. */
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# define GETTEXT __gettext
|
# define GETTEXT __gettext
|
||||||
# define DGETTEXT __dgettext
|
# define DCGETTEXT __dcgettext
|
||||||
#else
|
#else
|
||||||
# define GETTEXT gettext__
|
# define GETTEXT gettext__
|
||||||
# define DGETTEXT dgettext__
|
# define DCGETTEXT dcgettext__
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Look up MSGID in the current default message catalog for the current
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
@@ -61,7 +54,7 @@ char *
|
|||||||
GETTEXT (msgid)
|
GETTEXT (msgid)
|
||||||
const char *msgid;
|
const char *msgid;
|
||||||
{
|
{
|
||||||
return DGETTEXT (NULL, msgid);
|
return DCGETTEXT (NULL, msgid, LC_MESSAGES);
|
||||||
}
|
}
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Internal header for GNU gettext internationalization functions.
|
/* Description of GNU message catalog format: general file layout.
|
||||||
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
|
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
|
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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU General Public License
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
#ifndef _GETTEXT_H
|
#ifndef _GETTEXT_H
|
||||||
#define _GETTEXT_H 1
|
#define _GETTEXT_H 1
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#if HAVE_LIMITS_H || _LIBC
|
#if HAVE_LIMITS_H || _LIBC
|
||||||
# include <limits.h>
|
# include <limits.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -37,9 +34,8 @@
|
|||||||
/* The following contortions are an attempt to use the C preprocessor
|
/* The following contortions are an attempt to use the C preprocessor
|
||||||
to determine an unsigned integral type that is 32 bits wide. An
|
to determine an unsigned integral type that is 32 bits wide. An
|
||||||
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
alternative approach is to use autoconf's AC_CHECK_SIZEOF macro, but
|
||||||
doing that would require that the configure script compile and *run*
|
as of version autoconf-2.13, the AC_CHECK_SIZEOF macro doesn't work
|
||||||
the resulting executable. Locally running cross-compiled executables
|
when cross-compiling. */
|
||||||
is usually not possible. */
|
|
||||||
|
|
||||||
#if __STDC__
|
#if __STDC__
|
||||||
# define UINT_MAX_32_BITS 4294967295U
|
# define UINT_MAX_32_BITS 4294967295U
|
||||||
|
|||||||
178
intl/gettextP.h
178
intl/gettextP.h
@@ -1,6 +1,6 @@
|
|||||||
/* Header describing internals of gettext library
|
/* Header describing internals of libintl library.
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Written by Ulrich Drepper <drepper@cygnus.com>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -19,8 +19,20 @@
|
|||||||
#ifndef _GETTEXTP_H
|
#ifndef _GETTEXTP_H
|
||||||
#define _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 "loadinfo.h"
|
||||||
|
|
||||||
|
#include "gettext.h" /* Get nls_uint32. */
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
#ifndef PARAMS
|
#ifndef PARAMS
|
||||||
@@ -35,6 +47,12 @@
|
|||||||
# define internal_function
|
# define internal_function
|
||||||
#endif
|
#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
|
#ifndef W
|
||||||
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
# define W(flag, data) ((flag) ? SWAP (data) : (data))
|
||||||
#endif
|
#endif
|
||||||
@@ -44,8 +62,6 @@
|
|||||||
# include <byteswap.h>
|
# include <byteswap.h>
|
||||||
# define SWAP(i) bswap_32 (i)
|
# define SWAP(i) bswap_32 (i)
|
||||||
#else
|
#else
|
||||||
static nls_uint32 SWAP PARAMS ((nls_uint32 i));
|
|
||||||
|
|
||||||
static inline nls_uint32
|
static inline nls_uint32
|
||||||
SWAP (i)
|
SWAP (i)
|
||||||
nls_uint32 i;
|
nls_uint32 i;
|
||||||
@@ -55,6 +71,52 @@ SWAP (i)
|
|||||||
#endif
|
#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
|
struct loaded_domain
|
||||||
{
|
{
|
||||||
const char *data;
|
const char *data;
|
||||||
@@ -66,23 +128,123 @@ struct loaded_domain
|
|||||||
struct string_desc *trans_tab;
|
struct string_desc *trans_tab;
|
||||||
nls_uint32 hash_size;
|
nls_uint32 hash_size;
|
||||||
nls_uint32 *hash_tab;
|
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
|
||||||
{
|
{
|
||||||
struct binding *next;
|
struct binding *next;
|
||||||
char *domainname;
|
|
||||||
char *dirname;
|
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,
|
struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
|
||||||
char *__locale,
|
char *__locale,
|
||||||
const char *__domainname))
|
const char *__domainname,
|
||||||
|
struct binding *__domainbinding))
|
||||||
internal_function;
|
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;
|
internal_function;
|
||||||
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
|
void _nl_unload_domain PARAMS ((struct loaded_domain *__domain))
|
||||||
internal_function;
|
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 @@ */
|
/* @@ begin of epilog @@ */
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Implements a string hashing function.
|
/* Description of GNU message catalog format: string hashing function.
|
||||||
Copyright (C) 1995, 1997 Free Software Foundation, Inc.
|
Copyright (C) 1995, 1997, 1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
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
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
GNU General Public License for more details.
|
GNU General Public License for more details.
|
||||||
|
|
||||||
You should have received a copy of the GNU Library General Public
|
You should have received a copy of the GNU General Public License
|
||||||
License along with the GNU C Library; see the file COPYING.LIB. If not,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
Boston, MA 02111-1307, USA. */
|
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
@@ -33,9 +32,9 @@
|
|||||||
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
/* Defines the so called `hashpjw' function by P.J. Weinberger
|
||||||
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
[see Aho/Sethi/Ullman, COMPILERS: Principles, Techniques and Tools,
|
||||||
1986, 1987 Bell Telephone Laboratories, Inc.] */
|
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)
|
hash_string (str_param)
|
||||||
const char *str_param;
|
const char *str_param;
|
||||||
{
|
{
|
||||||
@@ -47,8 +46,8 @@ hash_string (str_param)
|
|||||||
while (*str != '\0')
|
while (*str != '\0')
|
||||||
{
|
{
|
||||||
hval <<= 4;
|
hval <<= 4;
|
||||||
hval += (unsigned long) *str++;
|
hval += (unsigned long int) *str++;
|
||||||
g = hval & ((unsigned long) 0xf << (HASHWORDBITS - 4));
|
g = hval & ((unsigned long int) 0xf << (HASHWORDBITS - 4));
|
||||||
if (g != 0)
|
if (g != 0)
|
||||||
{
|
{
|
||||||
hval ^= g >> (HASHWORDBITS - 8);
|
hval ^= g >> (HASHWORDBITS - 8);
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
|
/* intl-compat.c - Stub functions to call gettext functions from GNU gettext
|
||||||
Library.
|
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
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,24 +20,79 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "libgettext.h"
|
#include "libgnuintl.h"
|
||||||
|
#include "gettextP.h"
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ 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 gettext
|
||||||
#undef dgettext
|
#undef dgettext
|
||||||
#undef dcgettext
|
#undef dcgettext
|
||||||
|
#undef ngettext
|
||||||
|
#undef dngettext
|
||||||
|
#undef dcngettext
|
||||||
#undef textdomain
|
#undef textdomain
|
||||||
#undef bindtextdomain
|
#undef bindtextdomain
|
||||||
|
#undef bind_textdomain_codeset
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
bindtextdomain (domainname, dirname)
|
gettext (msgid)
|
||||||
const char *domainname;
|
const char *msgid;
|
||||||
const char *dirname;
|
|
||||||
{
|
{
|
||||||
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 *
|
char *
|
||||||
dgettext (domainname, msgid)
|
ngettext (msgid1, msgid2, n)
|
||||||
const char *domainname;
|
const char *msgid1;
|
||||||
const char *msgid;
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
{
|
{
|
||||||
return dgettext__ (domainname, msgid);
|
return ngettext__ (msgid1, msgid2, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
char *
|
char *
|
||||||
gettext (msgid)
|
dngettext (domainname, msgid1, msgid2, n)
|
||||||
const char *msgid;
|
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);
|
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);
|
||||||
|
}
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
/* Handle list of needed message catalogs
|
/* Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Copyright (C) 1995, 1996, 1997 Free Software Foundation, Inc.
|
|
||||||
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
Contributed by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <string.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
|
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
#if !HAVE_STRCHR && !defined _LIBC
|
||||||
# ifndef strchr
|
# ifndef strchr
|
||||||
# define strchr index
|
# define strchr index
|
||||||
@@ -43,10 +38,7 @@
|
|||||||
#endif
|
#endif
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
|
#include <stdlib.h>
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
|
||||||
# include <stdlib.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "loadinfo.h"
|
#include "loadinfo.h"
|
||||||
|
|
||||||
@@ -224,7 +216,7 @@ _nl_make_l10nflist (l10nfile_list, dirlist, dirlist_len, mask, language,
|
|||||||
|
|
||||||
/* Construct file name. */
|
/* Construct file name. */
|
||||||
memcpy (abs_filename, dirlist, dirlist_len);
|
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 = abs_filename + (dirlist_len - 1);
|
||||||
*cp++ = '/';
|
*cp++ = '/';
|
||||||
cp = stpcpy (cp, language);
|
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
|
/* Normalize codeset name. There is no standard for the codeset
|
||||||
names. Normalization allows the user to use any of the common
|
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 *
|
const char *
|
||||||
_nl_normalize_codeset (codeset, name_len)
|
_nl_normalize_codeset (codeset, name_len)
|
||||||
const unsigned char *codeset;
|
const char *codeset;
|
||||||
size_t name_len;
|
size_t name_len;
|
||||||
{
|
{
|
||||||
int len = 0;
|
int len = 0;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Message catalogs for internationalization.
|
/* Convenience header for conditional use of GNU <libintl.h>.
|
||||||
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
|
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
|
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,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
/* Because on some systems (e.g. Solaris) we sometimes have to include
|
#ifndef _LIBGETTEXT_H
|
||||||
the systems libintl.h as well as this file we have more complex
|
#define _LIBGETTEXT_H 1
|
||||||
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));
|
|
||||||
|
|
||||||
|
/* NLS can be disabled through the configure --disable-nls option. */
|
||||||
#if ENABLE_NLS
|
#if ENABLE_NLS
|
||||||
|
|
||||||
/* Solaris 2.3 has the gettext function but dcgettext is missing.
|
/* Get declarations of GNU message catalog functions. */
|
||||||
So we omit this optimization for Solaris 2.3. BTW, Solaris 2.4
|
# include <libintl.h>
|
||||||
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
|
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
# define gettext(Msgid) (Msgid)
|
# define gettext(Msgid) (Msgid)
|
||||||
# define dgettext(Domainname, Msgid) (Msgid)
|
# define dgettext(Domainname, Msgid) (Msgid)
|
||||||
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
# define dcgettext(Domainname, Msgid, Category) (Msgid)
|
||||||
# define textdomain(Domainname) ((char *) Domainname)
|
# define ngettext(Msgid1, Msgid2, N) \
|
||||||
# define bindtextdomain(Domainname, Dirname) ((char *) Dirname)
|
((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
|
#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 /* _LIBGETTEXT_H */
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
|
||||||
|
|||||||
127
intl/libgnuintl.h
Normal file
127
intl/libgnuintl.h
Normal file
@@ -0,0 +1,127 @@
|
|||||||
|
/* Message catalogs for internationalization.
|
||||||
|
Copyright (C) 1995-1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _LIBINTL_H
|
||||||
|
#define _LIBINTL_H 1
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
/* The LC_MESSAGES locale category is the category used by the functions
|
||||||
|
gettext() and dgettext(). It is specified in POSIX, but not in ANSI C.
|
||||||
|
On systems that don't define it, use an arbitrary value instead.
|
||||||
|
On Solaris, <locale.h> defines __LOCALE_H then includes <libintl.h> (i.e.
|
||||||
|
this file!) and then only defines LC_MESSAGES. To avoid a redefinition
|
||||||
|
warning, don't define LC_MESSAGES in this case. */
|
||||||
|
#if !defined LC_MESSAGES && !defined __LOCALE_H
|
||||||
|
# define LC_MESSAGES 1729
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* We define an additional symbol to signal that we use the GNU
|
||||||
|
implementation of gettext. */
|
||||||
|
#define __USE_GNU_GETTEXT 1
|
||||||
|
|
||||||
|
/* Resolve a platform specific conflict on DJGPP. GNU gettext takes
|
||||||
|
precedence over _conio_gettext. */
|
||||||
|
#ifdef __DJGPP__
|
||||||
|
# undef gettext
|
||||||
|
# define gettext gettext
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef PARAMS
|
||||||
|
# if __STDC__ || defined __cplusplus
|
||||||
|
# define PARAMS(args) args
|
||||||
|
# else
|
||||||
|
# define PARAMS(args) ()
|
||||||
|
# endif
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
extern "C" {
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
|
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||||
|
text). */
|
||||||
|
extern char *gettext PARAMS ((const char *__msgid));
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current
|
||||||
|
LC_MESSAGES locale. */
|
||||||
|
extern char *dgettext PARAMS ((const char *__domainname, const char *__msgid));
|
||||||
|
|
||||||
|
/* Look up MSGID in the DOMAINNAME message catalog for the current CATEGORY
|
||||||
|
locale. */
|
||||||
|
extern char *dcgettext PARAMS ((const char *__domainname, const char *__msgid,
|
||||||
|
int __category));
|
||||||
|
|
||||||
|
|
||||||
|
/* Similar to `gettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *ngettext PARAMS ((const char *__msgid1, const char *__msgid2,
|
||||||
|
unsigned long int __n));
|
||||||
|
|
||||||
|
/* Similar to `dgettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *dngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||||
|
const char *__msgid2, unsigned long int __n));
|
||||||
|
|
||||||
|
/* Similar to `dcgettext' but select the plural form corresponding to the
|
||||||
|
number N. */
|
||||||
|
extern char *dcngettext PARAMS ((const char *__domainname, const char *__msgid1,
|
||||||
|
const char *__msgid2, unsigned long int __n,
|
||||||
|
int __category));
|
||||||
|
|
||||||
|
|
||||||
|
/* Set the current default message catalog to DOMAINNAME.
|
||||||
|
If DOMAINNAME is null, return the current default.
|
||||||
|
If DOMAINNAME is "", reset to the default of "messages". */
|
||||||
|
extern char *textdomain PARAMS ((const char *__domainname));
|
||||||
|
|
||||||
|
/* Specify that the DOMAINNAME message catalog will be found
|
||||||
|
in DIRNAME rather than in the system locale data base. */
|
||||||
|
extern char *bindtextdomain PARAMS ((const char *__domainname,
|
||||||
|
const char *__dirname));
|
||||||
|
|
||||||
|
/* Specify the character encoding in which the messages from the
|
||||||
|
DOMAINNAME message catalog will be returned. */
|
||||||
|
extern char *bind_textdomain_codeset PARAMS ((const char *__domainname,
|
||||||
|
const char *__codeset));
|
||||||
|
|
||||||
|
|
||||||
|
/* Optimized version of the functions above. */
|
||||||
|
#if defined __OPTIMIZED
|
||||||
|
/* These are macros, but could also be inline functions. */
|
||||||
|
|
||||||
|
# define gettext(msgid) \
|
||||||
|
dgettext (NULL, msgid)
|
||||||
|
|
||||||
|
# define dgettext(domainname, msgid) \
|
||||||
|
dcgettext (domainname, msgid, LC_MESSAGES)
|
||||||
|
|
||||||
|
# define ngettext(msgid1, msgid2, n) \
|
||||||
|
dngettext (NULL, msgid1, msgid2, n)
|
||||||
|
|
||||||
|
# define dngettext(domainname, msgid1, msgid2, n) \
|
||||||
|
dcngettext (domainname, msgid1, msgid2, n, LC_MESSAGES)
|
||||||
|
|
||||||
|
#endif /* Optimizing. */
|
||||||
|
|
||||||
|
|
||||||
|
#ifdef __cplusplus
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#endif /* libintl.h */
|
||||||
@@ -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.
|
This file is part of the GNU C Library.
|
||||||
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
Contributed by Ulrich Drepper <drepper@cygnus.com>, 1996.
|
||||||
|
|
||||||
@@ -16,6 +16,9 @@
|
|||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifndef _LOADINFO_H
|
||||||
|
#define _LOADINFO_H 1
|
||||||
|
|
||||||
#ifndef PARAMS
|
#ifndef PARAMS
|
||||||
# if __STDC__
|
# if __STDC__
|
||||||
# define PARAMS(args) args
|
# define PARAMS(args) args
|
||||||
@@ -24,6 +27,25 @@
|
|||||||
# endif
|
# endif
|
||||||
#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. */
|
/* Encoding of locale name parts. */
|
||||||
#define CEN_REVISION 1
|
#define CEN_REVISION 1
|
||||||
#define CEN_SPONSOR 2
|
#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));
|
size_t name_len));
|
||||||
|
|
||||||
extern struct loaded_l10nfile *
|
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));
|
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,
|
extern int _nl_explode_name PARAMS ((char *name, const char **language,
|
||||||
const char **modifier,
|
const char **modifier,
|
||||||
const char **territory,
|
const char **territory,
|
||||||
@@ -74,3 +102,7 @@ extern int _nl_explode_name PARAMS ((char *name, const char **language,
|
|||||||
const char **special,
|
const char **special,
|
||||||
const char **sponsor,
|
const char **sponsor,
|
||||||
const char **revision));
|
const char **revision));
|
||||||
|
|
||||||
|
extern char *_nl_find_language PARAMS ((const char *name));
|
||||||
|
|
||||||
|
#endif /* loadinfo.h */
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/* Load needed message catalogs.
|
/* 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
|
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
|
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,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#include <ctype.h>
|
||||||
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/stat.h>
|
#include <sys/stat.h>
|
||||||
|
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#ifdef __GNUC__
|
||||||
# include <stdlib.h>
|
# 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
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
#if defined HAVE_UNISTD_H || defined _LIBC
|
#if defined HAVE_UNISTD_H || defined _LIBC
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
#endif
|
#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>
|
# include <sys/mman.h>
|
||||||
|
# undef HAVE_MMAP
|
||||||
|
# define HAVE_MMAP 1
|
||||||
|
#else
|
||||||
|
# undef HAVE_MMAP
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gettext.h"
|
#include "gettext.h"
|
||||||
#include "gettextP.h"
|
#include "gettextP.h"
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include "../locale/localeinfo.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
@@ -51,32 +90,275 @@
|
|||||||
# define munmap __munmap
|
# define munmap __munmap
|
||||||
#endif
|
#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
|
/* We need a sign, whether a new catalog was loaded, which can be associated
|
||||||
with all translations. This is important if the translations are
|
with all translations. This is important if the translations are
|
||||||
cached by one of GCC's features. */
|
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
|
/* Load the message catalogs specified by FILENAME. If it is no valid
|
||||||
message catalog do nothing. */
|
message catalog do nothing. */
|
||||||
void
|
void
|
||||||
internal_function
|
internal_function
|
||||||
_nl_load_domain (domain_file)
|
_nl_load_domain (domain_file, domainbinding)
|
||||||
struct loaded_l10nfile *domain_file;
|
struct loaded_l10nfile *domain_file;
|
||||||
|
struct binding *domainbinding;
|
||||||
{
|
{
|
||||||
int fd;
|
int fd;
|
||||||
size_t size;
|
size_t size;
|
||||||
|
#ifdef _LIBC
|
||||||
|
struct stat64 st;
|
||||||
|
#else
|
||||||
struct stat st;
|
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
|
#endif
|
||||||
|
struct mo_file_header *data = (struct mo_file_header *) -1;
|
||||||
|
int use_mmap = 0;
|
||||||
struct loaded_domain *domain;
|
struct loaded_domain *domain;
|
||||||
|
const char *nullentry;
|
||||||
|
|
||||||
domain_file->decided = 1;
|
domain_file->decided = 1;
|
||||||
domain_file->data = NULL;
|
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
|
/* If the record does not represent a valid locale the FILENAME
|
||||||
might be NULL. This can happen when according to the given
|
might be NULL. This can happen when according to the given
|
||||||
specification the locale file name is different for XPG and CEN
|
specification the locale file name is different for XPG and CEN
|
||||||
@@ -85,28 +367,32 @@ _nl_load_domain (domain_file)
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
/* Try to open the addressed file. */
|
/* 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)
|
if (fd == -1)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
/* We must know about the size of the file. */
|
/* We must know about the size of the file. */
|
||||||
if (fstat (fd, &st) != 0
|
if (
|
||||||
|| (size = (size_t) st.st_size) != st.st_size
|
#ifdef _LIBC
|
||||||
|| size < sizeof (struct mo_file_header))
|
__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. */
|
/* Something went wrong. */
|
||||||
close (fd);
|
close (fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
#ifdef HAVE_MMAP
|
||||||
|| defined _LIBC
|
|
||||||
/* Now we are ready to load the file. If mmap() is available we try
|
/* 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. */
|
this first. If not available or it failed we try to load it. */
|
||||||
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
|
data = (struct mo_file_header *) mmap (NULL, size, PROT_READ,
|
||||||
MAP_PRIVATE, fd, 0);
|
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. */
|
/* mmap() call was successful. */
|
||||||
close (fd);
|
close (fd);
|
||||||
@@ -130,12 +416,15 @@ _nl_load_domain (domain_file)
|
|||||||
do
|
do
|
||||||
{
|
{
|
||||||
long int nb = (long int) read (fd, read_ptr, to_read);
|
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);
|
close (fd);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
read_ptr += nb;
|
read_ptr += nb;
|
||||||
to_read -= 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
|
/* Using the magic number we can test whether it really is a message
|
||||||
catalog file. */
|
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. */
|
/* The magic number is wrong: not a message catalog file. */
|
||||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
#ifdef HAVE_MMAP
|
||||||
|| defined _LIBC
|
|
||||||
if (use_mmap)
|
if (use_mmap)
|
||||||
munmap ((caddr_t) data, size);
|
munmap ((caddr_t) data, size);
|
||||||
else
|
else
|
||||||
@@ -159,17 +448,13 @@ _nl_load_domain (domain_file)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
domain_file->data
|
domain = (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
|
||||||
= (struct loaded_domain *) malloc (sizeof (struct loaded_domain));
|
if (domain == NULL)
|
||||||
if (domain_file->data == NULL)
|
|
||||||
return;
|
return;
|
||||||
|
domain_file->data = domain;
|
||||||
|
|
||||||
domain = (struct loaded_domain *) domain_file->data;
|
|
||||||
domain->data = (char *) data;
|
domain->data = (char *) data;
|
||||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
|
||||||
|| defined _LIBC
|
|
||||||
domain->use_mmap = use_mmap;
|
domain->use_mmap = use_mmap;
|
||||||
#endif
|
|
||||||
domain->mmap_size = size;
|
domain->mmap_size = size;
|
||||||
domain->must_swap = data->magic != _MAGIC;
|
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));
|
((char *) data + W (domain->must_swap, data->hash_tab_offset));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
/* This is an illegal revision. */
|
/* This is an invalid revision. */
|
||||||
#if (defined HAVE_MMAP && defined HAVE_MUNMAP && !defined DISALLOW_MMAP) \
|
#ifdef HAVE_MMAP
|
||||||
|| defined _LIBC
|
|
||||||
if (use_mmap)
|
if (use_mmap)
|
||||||
munmap ((caddr_t) data, size);
|
munmap ((caddr_t) data, size);
|
||||||
else
|
else
|
||||||
@@ -200,9 +484,62 @@ _nl_load_domain (domain_file)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Show that one domain is changed. This might make some cached
|
/* Now initialize the character set converter from the character set
|
||||||
translations invalid. */
|
the file is encoded with (found in the header entry) to the domain's
|
||||||
++_nl_msg_cat_cntr;
|
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)
|
_nl_unload_domain (domain)
|
||||||
struct loaded_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)
|
if (domain->use_mmap)
|
||||||
munmap ((caddr_t) domain->data, domain->mmap_size);
|
munmap ((caddr_t) domain->data, domain->mmap_size);
|
||||||
else
|
else
|
||||||
|
# endif /* _POSIX_MAPPED_FILES */
|
||||||
free ((void *) domain->data);
|
free ((void *) domain->data);
|
||||||
|
|
||||||
free (domain);
|
free (domain);
|
||||||
|
|||||||
271
intl/localcharset.c
Normal file
271
intl/localcharset.c
Normal file
@@ -0,0 +1,271 @@
|
|||||||
|
/* Determine a canonical name for the current locale's character encoding.
|
||||||
|
|
||||||
|
Copyright (C) 2000-2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify it
|
||||||
|
under the terms of the GNU Library General Public License as published
|
||||||
|
by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
Library General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU Library General Public
|
||||||
|
License along with this program; if not, write to the Free Software
|
||||||
|
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
USA. */
|
||||||
|
|
||||||
|
/* Written by Bruno Haible <haible@clisp.cons.org>. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if HAVE_STDDEF_H
|
||||||
|
# include <stddef.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
#if HAVE_STRING_H
|
||||||
|
# include <string.h>
|
||||||
|
#else
|
||||||
|
# include <strings.h>
|
||||||
|
#endif
|
||||||
|
#if HAVE_STDLIB_H
|
||||||
|
# include <stdlib.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#if defined _WIN32 || defined __WIN32__
|
||||||
|
# undef WIN32 /* avoid warning on mingw32 */
|
||||||
|
# define WIN32
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
# if HAVE_LANGINFO_CODESET
|
||||||
|
# include <langinfo.h>
|
||||||
|
# else
|
||||||
|
# if HAVE_SETLOCALE
|
||||||
|
# include <locale.h>
|
||||||
|
# endif
|
||||||
|
# endif
|
||||||
|
#else /* WIN32 */
|
||||||
|
# define WIN32_LEAN_AND_MEAN
|
||||||
|
# include <windows.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef DIRECTORY_SEPARATOR
|
||||||
|
# define DIRECTORY_SEPARATOR '/'
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifndef ISSLASH
|
||||||
|
# define ISSLASH(C) ((C) == DIRECTORY_SEPARATOR)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* The following static variable is declared 'volatile' to avoid a
|
||||||
|
possible multithread problem in the function get_charset_aliases. If we
|
||||||
|
are running in a threaded environment, and if two threads initialize
|
||||||
|
'charset_aliases' simultaneously, both will produce the same value,
|
||||||
|
and everything will be ok if the two assignments to 'charset_aliases'
|
||||||
|
are atomic. But I don't know what will happen if the two assignments mix. */
|
||||||
|
#if __STDC__ != 1
|
||||||
|
# define volatile /* empty */
|
||||||
|
#endif
|
||||||
|
/* Pointer to the contents of the charset.alias file, if it has already been
|
||||||
|
read, else NULL. Its format is:
|
||||||
|
ALIAS_1 '\0' CANONICAL_1 '\0' ... ALIAS_n '\0' CANONICAL_n '\0' '\0' */
|
||||||
|
static char * volatile charset_aliases;
|
||||||
|
|
||||||
|
/* Return a pointer to the contents of the charset.alias file. */
|
||||||
|
static const char *
|
||||||
|
get_charset_aliases ()
|
||||||
|
{
|
||||||
|
char *cp;
|
||||||
|
|
||||||
|
cp = charset_aliases;
|
||||||
|
if (cp == NULL)
|
||||||
|
{
|
||||||
|
#ifndef WIN32
|
||||||
|
FILE *fp;
|
||||||
|
const char *dir = LIBDIR;
|
||||||
|
const char *base = "charset.alias";
|
||||||
|
char *file_name;
|
||||||
|
|
||||||
|
/* Concatenate dir and base into freshly allocated file_name. */
|
||||||
|
{
|
||||||
|
size_t dir_len = strlen (dir);
|
||||||
|
size_t base_len = strlen (base);
|
||||||
|
int add_slash = (dir_len > 0 && !ISSLASH (dir[dir_len - 1]));
|
||||||
|
file_name = (char *) malloc (dir_len + add_slash + base_len + 1);
|
||||||
|
if (file_name != NULL)
|
||||||
|
{
|
||||||
|
memcpy (file_name, dir, dir_len);
|
||||||
|
if (add_slash)
|
||||||
|
file_name[dir_len] = DIRECTORY_SEPARATOR;
|
||||||
|
memcpy (file_name + dir_len + add_slash, base, base_len + 1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_name == NULL || (fp = fopen (file_name, "r")) == NULL)
|
||||||
|
/* Out of memory or file not found, treat it as empty. */
|
||||||
|
cp = "";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
/* Parse the file's contents. */
|
||||||
|
int c;
|
||||||
|
char buf1[50+1];
|
||||||
|
char buf2[50+1];
|
||||||
|
char *res_ptr = NULL;
|
||||||
|
size_t res_size = 0;
|
||||||
|
size_t l1, l2;
|
||||||
|
|
||||||
|
for (;;)
|
||||||
|
{
|
||||||
|
c = getc (fp);
|
||||||
|
if (c == EOF)
|
||||||
|
break;
|
||||||
|
if (c == '\n' || c == ' ' || c == '\t')
|
||||||
|
continue;
|
||||||
|
if (c == '#')
|
||||||
|
{
|
||||||
|
/* Skip comment, to end of line. */
|
||||||
|
do
|
||||||
|
c = getc (fp);
|
||||||
|
while (!(c == EOF || c == '\n'));
|
||||||
|
if (c == EOF)
|
||||||
|
break;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
ungetc (c, fp);
|
||||||
|
if (fscanf(fp, "%50s %50s", buf1, buf2) < 2)
|
||||||
|
break;
|
||||||
|
l1 = strlen (buf1);
|
||||||
|
l2 = strlen (buf2);
|
||||||
|
if (res_size == 0)
|
||||||
|
{
|
||||||
|
res_size = l1 + 1 + l2 + 1;
|
||||||
|
res_ptr = malloc (res_size + 1);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
res_size += l1 + 1 + l2 + 1;
|
||||||
|
res_ptr = realloc (res_ptr, res_size + 1);
|
||||||
|
}
|
||||||
|
if (res_ptr == NULL)
|
||||||
|
{
|
||||||
|
/* Out of memory. */
|
||||||
|
res_size = 0;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
strcpy (res_ptr + res_size - (l2 + 1) - (l1 + 1), buf1);
|
||||||
|
strcpy (res_ptr + res_size - (l2 + 1), buf2);
|
||||||
|
}
|
||||||
|
fclose (fp);
|
||||||
|
if (res_size == 0)
|
||||||
|
cp = "";
|
||||||
|
else
|
||||||
|
{
|
||||||
|
*(res_ptr + res_size) = '\0';
|
||||||
|
cp = res_ptr;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (file_name != NULL)
|
||||||
|
free (file_name);
|
||||||
|
|
||||||
|
#else /* WIN32 */
|
||||||
|
|
||||||
|
/* To avoid the troubles of installing a separate file in the same
|
||||||
|
directory as the DLL and of retrieving the DLL's directory at
|
||||||
|
runtime, simply inline the aliases here. */
|
||||||
|
|
||||||
|
cp = "CP936" "\0" "GBK" "\0"
|
||||||
|
"CP1361" "\0" "JOHAB" "\0";
|
||||||
|
#endif
|
||||||
|
|
||||||
|
charset_aliases = cp;
|
||||||
|
}
|
||||||
|
|
||||||
|
return cp;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Determine the current locale's character encoding, and canonicalize it
|
||||||
|
into one of the canonical names listed in config.charset.
|
||||||
|
The result must not be freed; it is statically allocated.
|
||||||
|
If the canonical name cannot be determined, the result is a non-canonical
|
||||||
|
name. */
|
||||||
|
|
||||||
|
#ifdef STATIC
|
||||||
|
STATIC
|
||||||
|
#endif
|
||||||
|
const char *
|
||||||
|
locale_charset ()
|
||||||
|
{
|
||||||
|
const char *codeset;
|
||||||
|
const char *aliases;
|
||||||
|
|
||||||
|
#ifndef WIN32
|
||||||
|
|
||||||
|
# if HAVE_LANGINFO_CODESET
|
||||||
|
|
||||||
|
/* Most systems support nl_langinfo (CODESET) nowadays. */
|
||||||
|
codeset = nl_langinfo (CODESET);
|
||||||
|
|
||||||
|
# else
|
||||||
|
|
||||||
|
/* On old systems which lack it, use setlocale or getenv. */
|
||||||
|
const char *locale = NULL;
|
||||||
|
|
||||||
|
/* But most old systems don't have a complete set of locales. Some
|
||||||
|
(like SunOS 4 or DJGPP) have only the C locale. Therefore we don't
|
||||||
|
use setlocale here; it would return "C" when it doesn't support the
|
||||||
|
locale name the user has set. */
|
||||||
|
# if HAVE_SETLOCALE && 0
|
||||||
|
locale = setlocale (LC_CTYPE, NULL);
|
||||||
|
# endif
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
{
|
||||||
|
locale = getenv ("LC_ALL");
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
{
|
||||||
|
locale = getenv ("LC_CTYPE");
|
||||||
|
if (locale == NULL || locale[0] == '\0')
|
||||||
|
locale = getenv ("LANG");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* On some old systems, one used to set locale = "iso8859_1". On others,
|
||||||
|
you set it to "language_COUNTRY.charset". In any case, we resolve it
|
||||||
|
through the charset.alias file. */
|
||||||
|
codeset = locale;
|
||||||
|
|
||||||
|
# endif
|
||||||
|
|
||||||
|
#else /* WIN32 */
|
||||||
|
|
||||||
|
static char buf[2 + 10 + 1];
|
||||||
|
|
||||||
|
/* Win32 has a function returning the locale's codepage as a number. */
|
||||||
|
sprintf (buf, "CP%u", GetACP ());
|
||||||
|
codeset = buf;
|
||||||
|
|
||||||
|
#endif
|
||||||
|
|
||||||
|
if (codeset == NULL)
|
||||||
|
/* The canonical name cannot be determined. */
|
||||||
|
codeset = "";
|
||||||
|
|
||||||
|
/* Resolve alias. */
|
||||||
|
for (aliases = get_charset_aliases ();
|
||||||
|
*aliases != '\0';
|
||||||
|
aliases += strlen (aliases) + 1, aliases += strlen (aliases) + 1)
|
||||||
|
if (strcmp (codeset, aliases) == 0
|
||||||
|
|| (aliases[0] == '*' && aliases[1] == '\0'))
|
||||||
|
{
|
||||||
|
codeset = aliases + strlen (aliases) + 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
return codeset;
|
||||||
|
}
|
||||||
77
intl/locale.alias
Normal file
77
intl/locale.alias
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
# Locale name alias data base.
|
||||||
|
# Copyright (C) 1996,1997,1998,1999,2000,2001 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License as published by
|
||||||
|
# the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU General Public License
|
||||||
|
# along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||||
|
|
||||||
|
# The format of this file is the same as for the corresponding file of
|
||||||
|
# the X Window System, which normally can be found in
|
||||||
|
# /usr/lib/X11/locale/locale.alias
|
||||||
|
# A single line contains two fields: an alias and a substitution value.
|
||||||
|
# All entries are case independent.
|
||||||
|
|
||||||
|
# Note: This file is far from being complete. If you have a value for
|
||||||
|
# your own site which you think might be useful for others too, share
|
||||||
|
# it with the rest of us. Send it using the `glibcbug' script to
|
||||||
|
# bugs@gnu.org.
|
||||||
|
|
||||||
|
# Packages using this file:
|
||||||
|
|
||||||
|
bokmal no_NO.ISO-8859-1
|
||||||
|
bokmål no_NO.ISO-8859-1
|
||||||
|
catalan ca_ES.ISO-8859-1
|
||||||
|
croatian hr_HR.ISO-8859-2
|
||||||
|
czech cs_CZ.ISO-8859-2
|
||||||
|
danish da_DK.ISO-8859-1
|
||||||
|
dansk da_DK.ISO-8859-1
|
||||||
|
deutsch de_DE.ISO-8859-1
|
||||||
|
dutch nl_NL.ISO-8859-1
|
||||||
|
eesti et_EE.ISO-8859-1
|
||||||
|
estonian et_EE.ISO-8859-1
|
||||||
|
finnish fi_FI.ISO-8859-1
|
||||||
|
français fr_FR.ISO-8859-1
|
||||||
|
french fr_FR.ISO-8859-1
|
||||||
|
galego gl_ES.ISO-8859-1
|
||||||
|
galician gl_ES.ISO-8859-1
|
||||||
|
german de_DE.ISO-8859-1
|
||||||
|
greek el_GR.ISO-8859-7
|
||||||
|
hebrew iw_IL.ISO-8859-8
|
||||||
|
hrvatski hr_HR.ISO-8859-2
|
||||||
|
hungarian hu_HU.ISO-8859-2
|
||||||
|
icelandic is_IS.ISO-8859-1
|
||||||
|
italian it_IT.ISO-8859-1
|
||||||
|
japanese ja_JP.eucJP
|
||||||
|
japanese.euc ja_JP.eucJP
|
||||||
|
ja_JP ja_JP.eucJP
|
||||||
|
ja_JP.ujis ja_JP.eucJP
|
||||||
|
japanese.sjis ja_JP.SJIS
|
||||||
|
korean ko_KR.eucKR
|
||||||
|
korean.euc ko_KR.eucKR
|
||||||
|
ko_KR ko_KR.eucKR
|
||||||
|
lithuanian lt_LT.ISO-8859-13
|
||||||
|
nb_NO no_NO.ISO-8859-1
|
||||||
|
nb_NO.ISO-8859-1 no_NO.ISO-8859-1
|
||||||
|
norwegian no_NO.ISO-8859-1
|
||||||
|
nynorsk nn_NO.ISO-8859-1
|
||||||
|
polish pl_PL.ISO-8859-2
|
||||||
|
portuguese pt_PT.ISO-8859-1
|
||||||
|
romanian ro_RO.ISO-8859-2
|
||||||
|
russian ru_RU.ISO-8859-5
|
||||||
|
slovak sk_SK.ISO-8859-2
|
||||||
|
slovene sl_SI.ISO-8859-2
|
||||||
|
slovenian sl_SI.ISO-8859-2
|
||||||
|
spanish es_ES.ISO-8859-1
|
||||||
|
swedish sv_SE.ISO-8859-1
|
||||||
|
thai th_TH.TIS-620
|
||||||
|
turkish tr_TR.ISO-8859-9
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
/* Handle aliases for locale names.
|
/* Handle aliases for locale names.
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995-1999, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -16,6 +15,13 @@
|
|||||||
along with this program; if not, write to the Free Software Foundation,
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
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
|
#ifdef HAVE_CONFIG_H
|
||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
@@ -41,35 +47,15 @@ char *alloca ();
|
|||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#include <stdlib.h>
|
||||||
# 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
|
#include <string.h>
|
||||||
# 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), Dst)
|
|
||||||
# endif
|
|
||||||
#endif
|
|
||||||
#if !HAVE_STRCHR && !defined _LIBC
|
#if !HAVE_STRCHR && !defined _LIBC
|
||||||
# ifndef strchr
|
# ifndef strchr
|
||||||
# define strchr index
|
# define strchr index
|
||||||
# endif
|
# endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include "gettext.h"
|
|
||||||
#include "gettextP.h"
|
#include "gettextP.h"
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
@@ -80,7 +66,9 @@ void free ();
|
|||||||
file and the name space must not be polluted. */
|
file and the name space must not be polluted. */
|
||||||
# define strcasecmp __strcasecmp
|
# define strcasecmp __strcasecmp
|
||||||
|
|
||||||
# define mempcpy __mempcpy
|
# ifndef mempcpy
|
||||||
|
# define mempcpy __mempcpy
|
||||||
|
# endif
|
||||||
# define HAVE_MEMPCPY 1
|
# define HAVE_MEMPCPY 1
|
||||||
|
|
||||||
/* We need locking here since we can be called from different places. */
|
/* We need locking here since we can be called from different places. */
|
||||||
@@ -89,41 +77,27 @@ void free ();
|
|||||||
__libc_lock_define_initialized (static, lock);
|
__libc_lock_define_initialized (static, lock);
|
||||||
#endif
|
#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. */
|
some additional code emulating it. */
|
||||||
#ifdef HAVE_ALLOCA
|
#ifdef HAVE_ALLOCA
|
||||||
/* Nothing has to be done. */
|
# define freea(p) /* nothing */
|
||||||
# define ADD_BLOCK(list, address) /* nothing */
|
|
||||||
# define FREE_BLOCKS(list) /* nothing */
|
|
||||||
#else
|
#else
|
||||||
struct block_list
|
# define alloca(n) malloc (n)
|
||||||
{
|
# define freea(p) free (p)
|
||||||
void *address;
|
#endif
|
||||||
struct block_list *next;
|
|
||||||
};
|
#if defined _LIBC_REENTRANT || defined HAVE_FGETS_UNLOCKED
|
||||||
# define ADD_BLOCK(list, addr) \
|
# undef fgets
|
||||||
do { \
|
# define fgets(buf, len, s) fgets_unlocked (buf, len, s)
|
||||||
struct block_list *newp = (struct block_list *) malloc (sizeof (*newp)); \
|
#endif
|
||||||
/* If we cannot get a free block we cannot add the new element to \
|
#if defined _LIBC_REENTRANT || defined HAVE_FEOF_UNLOCKED
|
||||||
the list. */ \
|
# undef feof
|
||||||
if (newp != NULL) { \
|
# define feof(s) feof_unlocked (s)
|
||||||
newp->address = (addr); \
|
#endif
|
||||||
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 */
|
|
||||||
|
|
||||||
|
|
||||||
struct alias_map
|
struct alias_map
|
||||||
@@ -133,18 +107,18 @@ struct alias_map
|
|||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
static char *string_space = NULL;
|
static char *string_space;
|
||||||
static size_t string_space_act = 0;
|
static size_t string_space_act;
|
||||||
static size_t string_space_max = 0;
|
static size_t string_space_max;
|
||||||
static struct alias_map *map;
|
static struct alias_map *map;
|
||||||
static size_t nmap = 0;
|
static size_t nmap;
|
||||||
static size_t maxmap = 0;
|
static size_t maxmap;
|
||||||
|
|
||||||
|
|
||||||
/* Prototypes for local functions. */
|
/* Prototypes for local functions. */
|
||||||
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
|
static size_t read_alias_file PARAMS ((const char *fname, int fname_len))
|
||||||
internal_function;
|
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,
|
static int alias_compare PARAMS ((const struct alias_map *map1,
|
||||||
const struct alias_map *map2));
|
const struct alias_map *map2));
|
||||||
|
|
||||||
@@ -190,11 +164,12 @@ _nl_expand_alias (name)
|
|||||||
{
|
{
|
||||||
const char *start;
|
const char *start;
|
||||||
|
|
||||||
while (locale_alias_path[0] == ':')
|
while (locale_alias_path[0] == PATH_SEPARATOR)
|
||||||
++locale_alias_path;
|
++locale_alias_path;
|
||||||
start = 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;
|
++locale_alias_path;
|
||||||
|
|
||||||
if (start < locale_alias_path)
|
if (start < locale_alias_path)
|
||||||
@@ -217,16 +192,12 @@ read_alias_file (fname, fname_len)
|
|||||||
const char *fname;
|
const char *fname;
|
||||||
int fname_len;
|
int fname_len;
|
||||||
{
|
{
|
||||||
#ifndef HAVE_ALLOCA
|
|
||||||
struct block_list *block_list = NULL;
|
|
||||||
#endif
|
|
||||||
FILE *fp;
|
FILE *fp;
|
||||||
char *full_fname;
|
char *full_fname;
|
||||||
size_t added;
|
size_t added;
|
||||||
static const char aliasfile[] = "/locale.alias";
|
static const char aliasfile[] = "/locale.alias";
|
||||||
|
|
||||||
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
|
full_fname = (char *) alloca (fname_len + sizeof aliasfile);
|
||||||
ADD_BLOCK (block_list, full_fname);
|
|
||||||
#ifdef HAVE_MEMPCPY
|
#ifdef HAVE_MEMPCPY
|
||||||
mempcpy (mempcpy (full_fname, fname, fname_len),
|
mempcpy (mempcpy (full_fname, fname, fname_len),
|
||||||
aliasfile, sizeof aliasfile);
|
aliasfile, sizeof aliasfile);
|
||||||
@@ -236,11 +207,9 @@ read_alias_file (fname, fname_len)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
fp = fopen (full_fname, "r");
|
fp = fopen (full_fname, "r");
|
||||||
|
freea (full_fname);
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
return 0;
|
||||||
FREE_BLOCKS (block_list);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
added = 0;
|
added = 0;
|
||||||
while (!feof (fp))
|
while (!feof (fp))
|
||||||
@@ -253,7 +222,7 @@ read_alias_file (fname, fname_len)
|
|||||||
char buf[BUFSIZ];
|
char buf[BUFSIZ];
|
||||||
char *alias;
|
char *alias;
|
||||||
char *value;
|
char *value;
|
||||||
unsigned char *cp;
|
char *cp;
|
||||||
|
|
||||||
if (fgets (buf, sizeof buf, fp) == NULL)
|
if (fgets (buf, sizeof buf, fp) == NULL)
|
||||||
/* EOF reached. */
|
/* EOF reached. */
|
||||||
@@ -272,7 +241,7 @@ read_alias_file (fname, fname_len)
|
|||||||
while (strchr (altbuf, '\n') == NULL);
|
while (strchr (altbuf, '\n') == NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
cp = (unsigned char *) buf;
|
cp = buf;
|
||||||
/* Ignore leading white space. */
|
/* Ignore leading white space. */
|
||||||
while (isspace (cp[0]))
|
while (isspace (cp[0]))
|
||||||
++cp;
|
++cp;
|
||||||
@@ -280,7 +249,7 @@ read_alias_file (fname, fname_len)
|
|||||||
/* A leading '#' signals a comment line. */
|
/* A leading '#' signals a comment line. */
|
||||||
if (cp[0] != '\0' && cp[0] != '#')
|
if (cp[0] != '\0' && cp[0] != '#')
|
||||||
{
|
{
|
||||||
alias = (char *) cp++;
|
alias = cp++;
|
||||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||||
++cp;
|
++cp;
|
||||||
/* Terminate alias name. */
|
/* Terminate alias name. */
|
||||||
@@ -296,7 +265,7 @@ read_alias_file (fname, fname_len)
|
|||||||
size_t alias_len;
|
size_t alias_len;
|
||||||
size_t value_len;
|
size_t value_len;
|
||||||
|
|
||||||
value = (char *) cp++;
|
value = cp++;
|
||||||
while (cp[0] != '\0' && !isspace (cp[0]))
|
while (cp[0] != '\0' && !isspace (cp[0]))
|
||||||
++cp;
|
++cp;
|
||||||
/* Terminate value. */
|
/* Terminate value. */
|
||||||
@@ -312,7 +281,8 @@ read_alias_file (fname, fname_len)
|
|||||||
*cp++ = '\0';
|
*cp++ = '\0';
|
||||||
|
|
||||||
if (nmap >= maxmap)
|
if (nmap >= maxmap)
|
||||||
extend_alias_table ();
|
if (__builtin_expect (extend_alias_table (), 0))
|
||||||
|
return added;
|
||||||
|
|
||||||
alias_len = strlen (alias) + 1;
|
alias_len = strlen (alias) + 1;
|
||||||
value_len = strlen (value) + 1;
|
value_len = strlen (value) + 1;
|
||||||
@@ -325,10 +295,19 @@ read_alias_file (fname, fname_len)
|
|||||||
? alias_len + value_len : 1024));
|
? alias_len + value_len : 1024));
|
||||||
char *new_pool = (char *) realloc (string_space, new_size);
|
char *new_pool = (char *) realloc (string_space, new_size);
|
||||||
if (new_pool == NULL)
|
if (new_pool == NULL)
|
||||||
|
return added;
|
||||||
|
|
||||||
|
if (__builtin_expect (string_space != new_pool, 0))
|
||||||
{
|
{
|
||||||
FREE_BLOCKS (block_list);
|
size_t i;
|
||||||
return added;
|
|
||||||
|
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 = new_pool;
|
||||||
string_space_max = new_size;
|
string_space_max = new_size;
|
||||||
}
|
}
|
||||||
@@ -355,12 +334,11 @@ read_alias_file (fname, fname_len)
|
|||||||
qsort (map, nmap, sizeof (struct alias_map),
|
qsort (map, nmap, sizeof (struct alias_map),
|
||||||
(int (*) PARAMS ((const void *, const void *))) alias_compare);
|
(int (*) PARAMS ((const void *, const void *))) alias_compare);
|
||||||
|
|
||||||
FREE_BLOCKS (block_list);
|
|
||||||
return added;
|
return added;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static void
|
static int
|
||||||
extend_alias_table ()
|
extend_alias_table ()
|
||||||
{
|
{
|
||||||
size_t new_size;
|
size_t new_size;
|
||||||
@@ -371,10 +349,11 @@ extend_alias_table ()
|
|||||||
* sizeof (struct alias_map)));
|
* sizeof (struct alias_map)));
|
||||||
if (new_map == NULL)
|
if (new_map == NULL)
|
||||||
/* Simply don't extend: we don't have any more core. */
|
/* Simply don't extend: we don't have any more core. */
|
||||||
return;
|
return -1;
|
||||||
|
|
||||||
map = new_map;
|
map = new_map;
|
||||||
maxmap = new_size;
|
maxmap = new_size;
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
67
intl/ngettext.c
Normal file
67
intl/ngettext.c
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
/* Implementation of ngettext(3) function.
|
||||||
|
Copyright (C) 1995, 1997, 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define __need_NULL
|
||||||
|
# include <stddef.h>
|
||||||
|
#else
|
||||||
|
# include <stdlib.h> /* Just for NULL. */
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include "gettextP.h"
|
||||||
|
#ifdef _LIBC
|
||||||
|
# include <libintl.h>
|
||||||
|
#else
|
||||||
|
# include "libgnuintl.h"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <locale.h>
|
||||||
|
|
||||||
|
/* @@ end of prolog @@ */
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define NGETTEXT __ngettext
|
||||||
|
# define DCNGETTEXT __dcngettext
|
||||||
|
#else
|
||||||
|
# define NGETTEXT ngettext__
|
||||||
|
# define DCNGETTEXT dcngettext__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
/* Look up MSGID in the current default message catalog for the current
|
||||||
|
LC_MESSAGES locale. If not found, returns MSGID itself (the default
|
||||||
|
text). */
|
||||||
|
char *
|
||||||
|
NGETTEXT (msgid1, msgid2, n)
|
||||||
|
const char *msgid1;
|
||||||
|
const char *msgid2;
|
||||||
|
unsigned long int n;
|
||||||
|
{
|
||||||
|
return DCNGETTEXT (NULL, msgid1, msgid2, n, LC_MESSAGES);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifdef _LIBC
|
||||||
|
/* Alias for function name in GNU C Library. */
|
||||||
|
weak_alias (__ngettext, ngettext);
|
||||||
|
#endif
|
||||||
1325
intl/plural.c
Normal file
1325
intl/plural.c
Normal file
File diff suppressed because it is too large
Load Diff
412
intl/plural.y
Normal file
412
intl/plural.y
Normal file
@@ -0,0 +1,412 @@
|
|||||||
|
%{
|
||||||
|
/* Expression parsing for plural form selection.
|
||||||
|
Copyright (C) 2000, 2001 Free Software Foundation, Inc.
|
||||||
|
Written by Ulrich Drepper <drepper@cygnus.com>, 2000.
|
||||||
|
|
||||||
|
This program is free software; you can redistribute it and/or modify
|
||||||
|
it under the terms of the GNU General Public License as published by
|
||||||
|
the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
any later version.
|
||||||
|
|
||||||
|
This program is distributed in the hope that it will be useful,
|
||||||
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
GNU General Public License for more details.
|
||||||
|
|
||||||
|
You should have received a copy of the GNU General Public License
|
||||||
|
along with this program; if not, write to the Free Software Foundation,
|
||||||
|
Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */
|
||||||
|
|
||||||
|
/* The bison generated parser uses alloca. AIX 3 forces us to put this
|
||||||
|
declaration at the beginning of the file. The declaration in bison's
|
||||||
|
skeleton file comes too late. This must come before <config.h>
|
||||||
|
because <config.h> may include arbitrary system headers. */
|
||||||
|
#if defined _AIX && !defined __GNUC__
|
||||||
|
#pragma alloca
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef HAVE_CONFIG_H
|
||||||
|
# include <config.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include "gettextP.h"
|
||||||
|
|
||||||
|
/* Names for the libintl functions are a problem. They must not clash
|
||||||
|
with existing names and they should follow ANSI C. But this source
|
||||||
|
code is also used in GNU C Library where the names have a __
|
||||||
|
prefix. So we have to make a difference here. */
|
||||||
|
#ifdef _LIBC
|
||||||
|
# define FREE_EXPRESSION __gettext_free_exp
|
||||||
|
#else
|
||||||
|
# define FREE_EXPRESSION gettext_free_exp__
|
||||||
|
# define __gettextparse gettextparse__
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#define YYLEX_PARAM &((struct parse_args *) arg)->cp
|
||||||
|
#define YYPARSE_PARAM arg
|
||||||
|
%}
|
||||||
|
%pure_parser
|
||||||
|
%expect 10
|
||||||
|
|
||||||
|
%union {
|
||||||
|
unsigned long int num;
|
||||||
|
enum operator op;
|
||||||
|
struct expression *exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
%{
|
||||||
|
/* Prototypes for local functions. */
|
||||||
|
static struct expression *new_exp PARAMS ((int nargs, enum operator op,
|
||||||
|
struct expression * const *args));
|
||||||
|
static inline struct expression *new_exp_0 PARAMS ((enum operator op));
|
||||||
|
static inline struct expression *new_exp_1 PARAMS ((enum operator op,
|
||||||
|
struct expression *right));
|
||||||
|
static struct expression *new_exp_2 PARAMS ((enum operator op,
|
||||||
|
struct expression *left,
|
||||||
|
struct expression *right));
|
||||||
|
static inline struct expression *new_exp_3 PARAMS ((enum operator op,
|
||||||
|
struct expression *bexp,
|
||||||
|
struct expression *tbranch,
|
||||||
|
struct expression *fbranch));
|
||||||
|
static int yylex PARAMS ((YYSTYPE *lval, const char **pexp));
|
||||||
|
static void yyerror PARAMS ((const char *str));
|
||||||
|
|
||||||
|
/* Allocation of expressions. */
|
||||||
|
|
||||||
|
static struct expression *
|
||||||
|
new_exp (nargs, op, args)
|
||||||
|
int nargs;
|
||||||
|
enum operator op;
|
||||||
|
struct expression * const *args;
|
||||||
|
{
|
||||||
|
int i;
|
||||||
|
struct expression *newp;
|
||||||
|
|
||||||
|
/* If any of the argument could not be malloc'ed, just return NULL. */
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
if (args[i] == NULL)
|
||||||
|
goto fail;
|
||||||
|
|
||||||
|
/* Allocate a new expression. */
|
||||||
|
newp = (struct expression *) malloc (sizeof (*newp));
|
||||||
|
if (newp != NULL)
|
||||||
|
{
|
||||||
|
newp->nargs = nargs;
|
||||||
|
newp->operation = op;
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
newp->val.args[i] = args[i];
|
||||||
|
return newp;
|
||||||
|
}
|
||||||
|
|
||||||
|
fail:
|
||||||
|
for (i = nargs - 1; i >= 0; i--)
|
||||||
|
FREE_EXPRESSION (args[i]);
|
||||||
|
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_0 (op)
|
||||||
|
enum operator op;
|
||||||
|
{
|
||||||
|
return new_exp (0, op, NULL);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_1 (op, right)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *right;
|
||||||
|
{
|
||||||
|
struct expression *args[1];
|
||||||
|
|
||||||
|
args[0] = right;
|
||||||
|
return new_exp (1, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static struct expression *
|
||||||
|
new_exp_2 (op, left, right)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *left;
|
||||||
|
struct expression *right;
|
||||||
|
{
|
||||||
|
struct expression *args[2];
|
||||||
|
|
||||||
|
args[0] = left;
|
||||||
|
args[1] = right;
|
||||||
|
return new_exp (2, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
static inline struct expression *
|
||||||
|
new_exp_3 (op, bexp, tbranch, fbranch)
|
||||||
|
enum operator op;
|
||||||
|
struct expression *bexp;
|
||||||
|
struct expression *tbranch;
|
||||||
|
struct expression *fbranch;
|
||||||
|
{
|
||||||
|
struct expression *args[3];
|
||||||
|
|
||||||
|
args[0] = bexp;
|
||||||
|
args[1] = tbranch;
|
||||||
|
args[2] = fbranch;
|
||||||
|
return new_exp (3, op, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
%}
|
||||||
|
|
||||||
|
/* This declares that all operators have the same associativity and the
|
||||||
|
precedence order as in C. See [Harbison, Steele: C, A Reference Manual].
|
||||||
|
There is no unary minus and no bitwise operators.
|
||||||
|
Operators with the same syntactic behaviour have been merged into a single
|
||||||
|
token, to save space in the array generated by bison. */
|
||||||
|
%right '?' /* ? */
|
||||||
|
%left '|' /* || */
|
||||||
|
%left '&' /* && */
|
||||||
|
%left EQUOP2 /* == != */
|
||||||
|
%left CMPOP2 /* < > <= >= */
|
||||||
|
%left ADDOP2 /* + - */
|
||||||
|
%left MULOP2 /* * / % */
|
||||||
|
%right '!' /* ! */
|
||||||
|
|
||||||
|
%token <op> EQUOP2 CMPOP2 ADDOP2 MULOP2
|
||||||
|
%token <num> NUMBER
|
||||||
|
%type <exp> exp
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
start: exp
|
||||||
|
{
|
||||||
|
if ($1 == NULL)
|
||||||
|
YYABORT;
|
||||||
|
((struct parse_args *) arg)->res = $1;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
exp: exp '?' exp ':' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_3 (qmop, $1, $3, $5);
|
||||||
|
}
|
||||||
|
| exp '|' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 (lor, $1, $3);
|
||||||
|
}
|
||||||
|
| exp '&' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 (land, $1, $3);
|
||||||
|
}
|
||||||
|
| exp EQUOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp CMPOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp ADDOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| exp MULOP2 exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_2 ($2, $1, $3);
|
||||||
|
}
|
||||||
|
| '!' exp
|
||||||
|
{
|
||||||
|
$$ = new_exp_1 (lnot, $2);
|
||||||
|
}
|
||||||
|
| 'n'
|
||||||
|
{
|
||||||
|
$$ = new_exp_0 (var);
|
||||||
|
}
|
||||||
|
| NUMBER
|
||||||
|
{
|
||||||
|
if (($$ = new_exp_0 (num)) != NULL)
|
||||||
|
$$->val.num = $1;
|
||||||
|
}
|
||||||
|
| '(' exp ')'
|
||||||
|
{
|
||||||
|
$$ = $2;
|
||||||
|
}
|
||||||
|
;
|
||||||
|
|
||||||
|
%%
|
||||||
|
|
||||||
|
void
|
||||||
|
internal_function
|
||||||
|
FREE_EXPRESSION (exp)
|
||||||
|
struct expression *exp;
|
||||||
|
{
|
||||||
|
if (exp == NULL)
|
||||||
|
return;
|
||||||
|
|
||||||
|
/* Handle the recursive case. */
|
||||||
|
switch (exp->nargs)
|
||||||
|
{
|
||||||
|
case 3:
|
||||||
|
FREE_EXPRESSION (exp->val.args[2]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
case 2:
|
||||||
|
FREE_EXPRESSION (exp->val.args[1]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
case 1:
|
||||||
|
FREE_EXPRESSION (exp->val.args[0]);
|
||||||
|
/* FALLTHROUGH */
|
||||||
|
default:
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
free (exp);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static int
|
||||||
|
yylex (lval, pexp)
|
||||||
|
YYSTYPE *lval;
|
||||||
|
const char **pexp;
|
||||||
|
{
|
||||||
|
const char *exp = *pexp;
|
||||||
|
int result;
|
||||||
|
|
||||||
|
while (1)
|
||||||
|
{
|
||||||
|
if (exp[0] == '\0')
|
||||||
|
{
|
||||||
|
*pexp = exp;
|
||||||
|
return YYEOF;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (exp[0] != ' ' && exp[0] != '\t')
|
||||||
|
break;
|
||||||
|
|
||||||
|
++exp;
|
||||||
|
}
|
||||||
|
|
||||||
|
result = *exp++;
|
||||||
|
switch (result)
|
||||||
|
{
|
||||||
|
case '0': case '1': case '2': case '3': case '4':
|
||||||
|
case '5': case '6': case '7': case '8': case '9':
|
||||||
|
{
|
||||||
|
unsigned long int n = result - '0';
|
||||||
|
while (exp[0] >= '0' && exp[0] <= '9')
|
||||||
|
{
|
||||||
|
n *= 10;
|
||||||
|
n += exp[0] - '0';
|
||||||
|
++exp;
|
||||||
|
}
|
||||||
|
lval->num = n;
|
||||||
|
result = NUMBER;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '=':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = equal;
|
||||||
|
result = EQUOP2;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
result = YYERRCODE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '!':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = not_equal;
|
||||||
|
result = EQUOP2;
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '&':
|
||||||
|
case '|':
|
||||||
|
if (exp[0] == result)
|
||||||
|
++exp;
|
||||||
|
else
|
||||||
|
result = YYERRCODE;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '<':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = less_or_equal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lval->op = less_than;
|
||||||
|
result = CMPOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '>':
|
||||||
|
if (exp[0] == '=')
|
||||||
|
{
|
||||||
|
++exp;
|
||||||
|
lval->op = greater_or_equal;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
lval->op = greater_than;
|
||||||
|
result = CMPOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '*':
|
||||||
|
lval->op = mult;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '/':
|
||||||
|
lval->op = divide;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '%':
|
||||||
|
lval->op = module;
|
||||||
|
result = MULOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '+':
|
||||||
|
lval->op = plus;
|
||||||
|
result = ADDOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case '-':
|
||||||
|
lval->op = minus;
|
||||||
|
result = ADDOP2;
|
||||||
|
break;
|
||||||
|
|
||||||
|
case 'n':
|
||||||
|
case '?':
|
||||||
|
case ':':
|
||||||
|
case '(':
|
||||||
|
case ')':
|
||||||
|
/* Nothing, just return the character. */
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ';':
|
||||||
|
case '\n':
|
||||||
|
case '\0':
|
||||||
|
/* Be safe and let the user call this function again. */
|
||||||
|
--exp;
|
||||||
|
result = YYEOF;
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
|
result = YYERRCODE;
|
||||||
|
#if YYDEBUG != 0
|
||||||
|
--exp;
|
||||||
|
#endif
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
*pexp = exp;
|
||||||
|
|
||||||
|
return result;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
static void
|
||||||
|
yyerror (str)
|
||||||
|
const char *str;
|
||||||
|
{
|
||||||
|
/* Do nothing. We don't print error messages here. */
|
||||||
|
}
|
||||||
31
intl/ref-add.sin
Normal file
31
intl/ref-add.sin
Normal file
@@ -0,0 +1,31 @@
|
|||||||
|
# Add this package to a list of references stored in a text file.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||||
|
#
|
||||||
|
/^# Packages using this file: / {
|
||||||
|
s/# Packages using this file://
|
||||||
|
ta
|
||||||
|
:a
|
||||||
|
s/ @PACKAGE@ / @PACKAGE@ /
|
||||||
|
tb
|
||||||
|
s/ $/ @PACKAGE@ /
|
||||||
|
:b
|
||||||
|
s/^/# Packages using this file:/
|
||||||
|
}
|
||||||
26
intl/ref-del.sin
Normal file
26
intl/ref-del.sin
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
# Remove this package from a list of references stored in a text file.
|
||||||
|
#
|
||||||
|
# Copyright (C) 2000 Free Software Foundation, Inc.
|
||||||
|
#
|
||||||
|
# This program is free software; you can redistribute it and/or modify it
|
||||||
|
# under the terms of the GNU Library General Public License as published
|
||||||
|
# by the Free Software Foundation; either version 2, or (at your option)
|
||||||
|
# any later version.
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||||
|
# Library General Public License for more details.
|
||||||
|
#
|
||||||
|
# You should have received a copy of the GNU Library General Public
|
||||||
|
# License along with this program; if not, write to the Free Software
|
||||||
|
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
||||||
|
# USA.
|
||||||
|
#
|
||||||
|
# Written by Bruno Haible <haible@clisp.cons.org>.
|
||||||
|
#
|
||||||
|
/^# Packages using this file: / {
|
||||||
|
s/# Packages using this file://
|
||||||
|
s/ @PACKAGE@ / /
|
||||||
|
s/^/# Packages using this file:/
|
||||||
|
}
|
||||||
@@ -1,6 +1,5 @@
|
|||||||
/* Implementation of the textdomain(3) function.
|
/* Implementation of the textdomain(3) function.
|
||||||
Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc.
|
Copyright (C) 1995-1998, 2000, 2001 Free Software Foundation, Inc.
|
||||||
Written by Ulrich Drepper <drepper@gnu.ai.mit.edu>, 1995.
|
|
||||||
|
|
||||||
This program is free software; you can redistribute it and/or modify
|
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
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -20,23 +19,32 @@
|
|||||||
# include <config.h>
|
# include <config.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined STDC_HEADERS || defined _LIBC
|
#include <stdlib.h>
|
||||||
# include <stdlib.h>
|
#include <string.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
|
|
||||||
|
|
||||||
#ifdef _LIBC
|
#ifdef _LIBC
|
||||||
# include <libintl.h>
|
# include <libintl.h>
|
||||||
#else
|
#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
|
#endif
|
||||||
|
|
||||||
/* @@ end of prolog @@ */
|
/* @@ end of prolog @@ */
|
||||||
@@ -61,6 +69,9 @@ extern const char *_nl_current_default_domain;
|
|||||||
# define TEXTDOMAIN textdomain__
|
# define TEXTDOMAIN textdomain__
|
||||||
#endif
|
#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.
|
/* Set the current default message catalog to DOMAINNAME.
|
||||||
If DOMAINNAME is null, return the current default.
|
If DOMAINNAME is null, return the current default.
|
||||||
If DOMAINNAME is "", reset to the default of "messages". */
|
If DOMAINNAME is "", reset to the default of "messages". */
|
||||||
@@ -68,38 +79,60 @@ char *
|
|||||||
TEXTDOMAIN (domainname)
|
TEXTDOMAIN (domainname)
|
||||||
const char *domainname;
|
const char *domainname;
|
||||||
{
|
{
|
||||||
char *old;
|
char *new_domain;
|
||||||
|
char *old_domain;
|
||||||
|
|
||||||
/* A NULL pointer requests the current setting. */
|
/* A NULL pointer requests the current setting. */
|
||||||
if (domainname == NULL)
|
if (domainname == NULL)
|
||||||
return (char *) _nl_current_default_domain;
|
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 domain name is the null string set to default domain "messages". */
|
||||||
if (domainname[0] == '\0'
|
if (domainname[0] == '\0'
|
||||||
|| strcmp (domainname, _nl_default_default_domain) == 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
|
else
|
||||||
{
|
{
|
||||||
/* If the following malloc fails `_nl_current_default_domain'
|
/* If the following malloc fails `_nl_current_default_domain'
|
||||||
will be NULL. This value will be returned and so signals we
|
will be NULL. This value will be returned and so signals we
|
||||||
are out of core. */
|
are out of core. */
|
||||||
#if defined _LIBC || defined HAVE_STRDUP
|
#if defined _LIBC || defined HAVE_STRDUP
|
||||||
_nl_current_default_domain = strdup (domainname);
|
new_domain = strdup (domainname);
|
||||||
#else
|
#else
|
||||||
size_t len = strlen (domainname) + 1;
|
size_t len = strlen (domainname) + 1;
|
||||||
char *cp = (char *) malloc (len);
|
new_domain = (char *) malloc (len);
|
||||||
if (cp != NULL)
|
if (new_domain != NULL)
|
||||||
memcpy (cp, domainname, len);
|
memcpy (new_domain, domainname, len);
|
||||||
_nl_current_default_domain = cp;
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
if (new_domain != NULL)
|
||||||
|
_nl_current_default_domain = new_domain;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (old != _nl_default_default_domain)
|
/* We use this possibility to signal a change of the loaded catalogs
|
||||||
free (old);
|
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
|
#ifdef _LIBC
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -57,7 +57,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -67,15 +70,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -90,7 +93,6 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = ansi2knr
|
AUTOMAKE_OPTIONS = ansi2knr
|
||||||
|
|
||||||
@@ -108,7 +110,7 @@ libbison_a_SOURCES = error.c error.h getopt.h getopt.c getopt1.c obstack.
|
|||||||
|
|
||||||
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
libbison_a_LIBADD = @LIBOBJS@ @ALLOCA@
|
||||||
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
libbison_a_DEPENDENCIES = $(libbison_a_LIBADD)
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = ../config.h
|
CONFIG_HEADER = ../config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
LIBRARIES = $(noinst_LIBRARIES)
|
LIBRARIES = $(noinst_LIBRARIES)
|
||||||
|
|||||||
@@ -1,15 +1,19 @@
|
|||||||
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
## Process this file with automake to produce Makefile.in -*-Makefile-*-
|
||||||
EXTRA_DIST = \
|
EXTRA_DIST = \
|
||||||
atconfig.m4 \
|
atconfig.m4 \
|
||||||
c-bs-a.m4 \
|
error.m4 \
|
||||||
error.m4 \
|
iconv.m4 \
|
||||||
gettext.m4 \
|
m4.m4 \
|
||||||
lcmessage.m4 \
|
prereq.m4 \
|
||||||
m4.m4 \
|
strerror_r.m4 \
|
||||||
malloc.m4 \
|
c-bs-a.m4 \
|
||||||
mbstate_t.m4 \
|
gettext.m4 \
|
||||||
prereq.m4 \
|
isc-posix.m4 \
|
||||||
progtest.m4 \
|
malloc.m4 \
|
||||||
strerror_r.m4 \
|
progtest.m4 \
|
||||||
realloc.m4 \
|
warning.m4 \
|
||||||
warning.m4
|
codeset.m4 \
|
||||||
|
glibc21.m4 \
|
||||||
|
lcmessage.m4 \
|
||||||
|
mbstate_t.m4 \
|
||||||
|
realloc.m4
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -57,7 +57,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -67,15 +70,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -90,11 +93,10 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
EXTRA_DIST = atconfig.m4 c-bs-a.m4 error.m4 gettext.m4 lcmessage.m4 m4.m4 malloc.m4 mbstate_t.m4 prereq.m4 progtest.m4 strerror_r.m4 realloc.m4 warning.m4
|
EXTRA_DIST = atconfig.m4 error.m4 iconv.m4 m4.m4 prereq.m4 strerror_r.m4 c-bs-a.m4 gettext.m4 isc-posix.m4 malloc.m4 progtest.m4 warning.m4 codeset.m4 glibc21.m4 lcmessage.m4 mbstate_t.m4 realloc.m4
|
||||||
|
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = ../config.h
|
CONFIG_HEADER = ../config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
DIST_COMMON = Makefile.am Makefile.in
|
DIST_COMMON = Makefile.am Makefile.in
|
||||||
|
|||||||
17
m4/codeset.m4
Normal file
17
m4/codeset.m4
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#serial AM1
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_LANGINFO_CODESET],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK([for nl_langinfo and CODESET], am_cv_langinfo_codeset,
|
||||||
|
[AC_TRY_LINK([#include <langinfo.h>],
|
||||||
|
[char* cs = nl_langinfo(CODESET);],
|
||||||
|
am_cv_langinfo_codeset=yes,
|
||||||
|
am_cv_langinfo_codeset=no)
|
||||||
|
])
|
||||||
|
if test $am_cv_langinfo_codeset = yes; then
|
||||||
|
AC_DEFINE(HAVE_LANGINFO_CODESET, 1,
|
||||||
|
[Define if you have <langinfo.h> and nl_langinfo(CODESET).])
|
||||||
|
fi
|
||||||
|
])
|
||||||
389
m4/gettext.m4
389
m4/gettext.m4
@@ -6,11 +6,37 @@
|
|||||||
# but which still want to provide support for the GNU gettext functionality.
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code is *not* freely available.
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
# serial 109
|
# serial 9
|
||||||
|
|
||||||
AC_PREREQ(2.13) dnl Minimum Autoconf version required.
|
dnl Usage: AM_WITH_NLS([TOOLSYMBOL], [NEEDSYMBOL], [LIBDIR]).
|
||||||
|
dnl If TOOLSYMBOL is specified and is 'use-libtool', then a libtool library
|
||||||
AC_DEFUN(AM_WITH_NLS,
|
dnl $(top_builddir)/intl/libintl.la will be created (shared and/or static,
|
||||||
|
dnl depending on --{enable,disable}-{shared,static} and on the presence of
|
||||||
|
dnl AM-DISABLE-SHARED). Otherwise, a static library
|
||||||
|
dnl $(top_builddir)/intl/libintl.a will be created.
|
||||||
|
dnl If NEEDSYMBOL is specified and is 'need-ngettext', then GNU gettext
|
||||||
|
dnl implementations (in libc or libintl) without the ngettext() function
|
||||||
|
dnl will be ignored.
|
||||||
|
dnl LIBDIR is used to find the intl libraries. If empty,
|
||||||
|
dnl the value `$(top_builddir)/intl/' is used.
|
||||||
|
dnl
|
||||||
|
dnl The result of the configuration is one of three cases:
|
||||||
|
dnl 1) GNU gettext, as included in the intl subdirectory, will be compiled
|
||||||
|
dnl and used.
|
||||||
|
dnl Catalog format: GNU --> install in $(datadir)
|
||||||
|
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||||
|
dnl 2) GNU gettext has been found in the system's C library.
|
||||||
|
dnl Catalog format: GNU --> install in $(datadir)
|
||||||
|
dnl Catalog extension: .mo after installation, .gmo in source tree
|
||||||
|
dnl 3) No internationalization, always use English msgid.
|
||||||
|
dnl Catalog format: none
|
||||||
|
dnl Catalog extension: none
|
||||||
|
dnl The use of .gmo is historical (it was needed to avoid overwriting the
|
||||||
|
dnl GNU format catalogs when building on a platform with an X/Open gettext),
|
||||||
|
dnl but we keep it in order not to force irrelevant filename changes on the
|
||||||
|
dnl maintainers.
|
||||||
|
dnl
|
||||||
|
AC_DEFUN([AM_WITH_NLS],
|
||||||
[AC_MSG_CHECKING([whether NLS is requested])
|
[AC_MSG_CHECKING([whether NLS is requested])
|
||||||
dnl Default is enabled NLS
|
dnl Default is enabled NLS
|
||||||
AC_ARG_ENABLE(nls,
|
AC_ARG_ENABLE(nls,
|
||||||
@@ -19,11 +45,15 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
AC_MSG_RESULT($USE_NLS)
|
AC_MSG_RESULT($USE_NLS)
|
||||||
AC_SUBST(USE_NLS)
|
AC_SUBST(USE_NLS)
|
||||||
|
|
||||||
|
BUILD_INCLUDED_LIBINTL=no
|
||||||
USE_INCLUDED_LIBINTL=no
|
USE_INCLUDED_LIBINTL=no
|
||||||
|
INTLLIBS=
|
||||||
|
|
||||||
dnl If we use NLS figure out what method
|
dnl If we use NLS figure out what method
|
||||||
if test "$USE_NLS" = "yes"; then
|
if test "$USE_NLS" = "yes"; then
|
||||||
AC_DEFINE(ENABLE_NLS, 1, [Define to 1 if NLS is requested.])
|
AC_DEFINE(ENABLE_NLS, 1,
|
||||||
|
[Define to 1 if translation of program messages to the user's native language
|
||||||
|
is requested.])
|
||||||
AC_MSG_CHECKING([whether included gettext is requested])
|
AC_MSG_CHECKING([whether included gettext is requested])
|
||||||
AC_ARG_WITH(included-gettext,
|
AC_ARG_WITH(included-gettext,
|
||||||
[ --with-included-gettext use the GNU gettext library included here],
|
[ --with-included-gettext use the GNU gettext library included here],
|
||||||
@@ -34,83 +64,74 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
|
||||||
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
|
||||||
dnl User does not insist on using GNU NLS library. Figure out what
|
dnl User does not insist on using GNU NLS library. Figure out what
|
||||||
dnl to use. If gettext or catgets are available (in this order) we
|
dnl to use. If GNU gettext is available we use this. Else we have
|
||||||
dnl use this. Else we have to fall back to GNU NLS library.
|
dnl to fall back to GNU NLS library.
|
||||||
dnl catgets is only used if permitted by option --with-catgets.
|
|
||||||
nls_cv_header_intl=
|
|
||||||
nls_cv_header_libgt=
|
|
||||||
CATOBJEXT=NONE
|
CATOBJEXT=NONE
|
||||||
|
|
||||||
AC_CHECK_HEADER(libintl.h,
|
dnl Add a version number to the cache macros.
|
||||||
[AC_CACHE_CHECK([for gettext in libc], gt_cv_func_gettext_libc,
|
define(gt_cv_func_gnugettext_libc, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libc])
|
||||||
[AC_TRY_LINK([#include <libintl.h>], [return (int) gettext ("")],
|
define(gt_cv_func_gnugettext_libintl, [gt_cv_func_gnugettext]ifelse([$2], need-ngettext, 2, 1)[_libintl])
|
||||||
gt_cv_func_gettext_libc=yes, gt_cv_func_gettext_libc=no)])
|
|
||||||
|
|
||||||
if test "$gt_cv_func_gettext_libc" != "yes"; then
|
AC_CHECK_HEADER(libintl.h,
|
||||||
AC_CHECK_LIB(intl, bindtextdomain,
|
[AC_CACHE_CHECK([for GNU gettext in libc], gt_cv_func_gnugettext_libc,
|
||||||
[AC_CHECK_LIB(intl, gettext)])
|
[AC_TRY_LINK([#include <libintl.h>
|
||||||
|
extern int _nl_msg_cat_cntr;],
|
||||||
|
[bindtextdomain ("", "");
|
||||||
|
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||||
|
gt_cv_func_gnugettext_libc=yes,
|
||||||
|
gt_cv_func_gnugettext_libc=no)])
|
||||||
|
|
||||||
|
if test "$gt_cv_func_gnugettext_libc" != "yes"; then
|
||||||
|
AC_CACHE_CHECK([for GNU gettext in libintl],
|
||||||
|
gt_cv_func_gnugettext_libintl,
|
||||||
|
[gt_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -lintl $LIBICONV"
|
||||||
|
AC_TRY_LINK([#include <libintl.h>
|
||||||
|
extern int _nl_msg_cat_cntr;],
|
||||||
|
[bindtextdomain ("", "");
|
||||||
|
return (int) gettext ("")]ifelse([$2], need-ngettext, [ + (int) ngettext ("", "", 0)], [])[ + _nl_msg_cat_cntr],
|
||||||
|
gt_cv_func_gnugettext_libintl=yes,
|
||||||
|
gt_cv_func_gnugettext_libintl=no)
|
||||||
|
LIBS="$gt_save_LIBS"])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if test "$gt_cv_func_gettext_libc" = "yes" \
|
dnl If an already present or preinstalled GNU gettext() is found,
|
||||||
|| test "$ac_cv_lib_intl_gettext" = "yes"; then
|
dnl use it. But if this macro is used in GNU gettext, and GNU
|
||||||
AC_DEFINE(HAVE_GETTEXT, 1,
|
dnl gettext is already preinstalled in libintl, we update this
|
||||||
[Define to 1 if you have gettext and don't want to use GNU gettext.])
|
dnl libintl. (Cf. the install rule in intl/Makefile.in.)
|
||||||
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
if test "$gt_cv_func_gnugettext_libc" = "yes" \
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
|| { test "$gt_cv_func_gnugettext_libintl" = "yes" \
|
||||||
if test "$MSGFMT" != "no"; then
|
&& test "$PACKAGE" != gettext; }; then
|
||||||
AC_CHECK_FUNCS(dcgettext)
|
AC_DEFINE(HAVE_GETTEXT, 1,
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
[Define if the GNU gettext() function is already present or preinstalled.])
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
if test "$gt_cv_func_gnugettext_libintl" = "yes"; then
|
||||||
AC_TRY_LINK(, [extern int _nl_msg_cat_cntr;
|
dnl If iconv() is in a separate libiconv library, then anyone
|
||||||
return _nl_msg_cat_cntr],
|
dnl linking with libintl{.a,.so} also needs to link with
|
||||||
[CATOBJEXT=.gmo
|
dnl libiconv.
|
||||||
DATADIRNAME=share],
|
INTLLIBS="-lintl $LIBICONV"
|
||||||
[CATOBJEXT=.mo
|
fi
|
||||||
DATADIRNAME=lib])
|
|
||||||
INSTOBJEXT=.mo
|
gt_save_LIBS="$LIBS"
|
||||||
fi
|
LIBS="$LIBS $INTLLIBS"
|
||||||
fi
|
AC_CHECK_FUNCS(dcgettext)
|
||||||
|
LIBS="$gt_save_LIBS"
|
||||||
|
|
||||||
|
AM_PATH_PROG_WITH_TEST(MSGFMT, msgfmt,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)dnl
|
||||||
|
if test "$MSGFMT" != "no"; then
|
||||||
|
AC_PATH_PROG(GMSGFMT, gmsgfmt, $MSGFMT)
|
||||||
|
fi
|
||||||
|
|
||||||
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
|
|
||||||
|
CATOBJEXT=.gmo
|
||||||
|
fi
|
||||||
])
|
])
|
||||||
|
|
||||||
if test "$CATOBJEXT" = "NONE"; then
|
if test "$CATOBJEXT" = "NONE"; then
|
||||||
AC_MSG_CHECKING([whether catgets can be used])
|
dnl GNU gettext is not found in the C library.
|
||||||
AC_ARG_WITH(catgets,
|
|
||||||
[ --with-catgets use catgets functions if available],
|
|
||||||
nls_cv_use_catgets=$withval, nls_cv_use_catgets=no)
|
|
||||||
AC_MSG_RESULT($nls_cv_use_catgets)
|
|
||||||
|
|
||||||
if test "$nls_cv_use_catgets" = "yes"; then
|
|
||||||
dnl No gettext in C library. Try catgets next.
|
|
||||||
AC_CHECK_LIB(i, main)
|
|
||||||
AC_CHECK_FUNC(catgets,
|
|
||||||
[AC_DEFINE(HAVE_CATGETS, 1,
|
|
||||||
[Define as 1 if you have \`catgets' and don't want to use GNU gettext.])
|
|
||||||
INTLOBJS="\$(CATOBJS)"
|
|
||||||
AC_PATH_PROG(GENCAT, gencat, no)dnl
|
|
||||||
if test "$GENCAT" != "no"; then
|
|
||||||
AC_PATH_PROG(GMSGFMT, gmsgfmt, no)
|
|
||||||
if test "$GMSGFMT" = "no"; then
|
|
||||||
AM_PATH_PROG_WITH_TEST(GMSGFMT, msgfmt,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep 'dv '`"], no)
|
|
||||||
fi
|
|
||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
|
||||||
USE_INCLUDED_LIBINTL=yes
|
|
||||||
CATOBJEXT=.cat
|
|
||||||
INSTOBJEXT=.cat
|
|
||||||
DATADIRNAME=lib
|
|
||||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
|
||||||
INTLLIBS=$INTLDEPS
|
|
||||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi])
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test "$CATOBJEXT" = "NONE"; then
|
|
||||||
dnl Neither gettext nor catgets in included in the C library.
|
|
||||||
dnl Fall back on GNU gettext library.
|
dnl Fall back on GNU gettext library.
|
||||||
nls_cv_use_gnu_gettext=yes
|
nls_cv_use_gnu_gettext=yes
|
||||||
fi
|
fi
|
||||||
@@ -125,15 +146,11 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
AM_PATH_PROG_WITH_TEST(XGETTEXT, xgettext,
|
||||||
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
[test -z "`$ac_dir/$ac_word -h 2>&1 | grep '(HELP)'`"], :)
|
||||||
AC_SUBST(MSGFMT)
|
AC_SUBST(MSGFMT)
|
||||||
|
BUILD_INCLUDED_LIBINTL=yes
|
||||||
USE_INCLUDED_LIBINTL=yes
|
USE_INCLUDED_LIBINTL=yes
|
||||||
CATOBJEXT=.gmo
|
CATOBJEXT=.gmo
|
||||||
INSTOBJEXT=.mo
|
INTLLIBS="ifelse([$3],[],\$(top_builddir)/intl,[$3])/libintl.ifelse([$1], use-libtool, [l], [])a $LIBICONV"
|
||||||
DATADIRNAME=share
|
LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
|
||||||
INTLDEPS='$(top_builddir)/intl/libintl.a'
|
|
||||||
INTLLIBS=$INTLDEPS
|
|
||||||
LIBS=`echo $LIBS | sed -e 's/-lintl//'`
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl Test whether we really found GNU xgettext.
|
dnl Test whether we really found GNU xgettext.
|
||||||
@@ -149,29 +166,74 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# We need to process the po/ directory.
|
dnl We need to process the po/ directory.
|
||||||
POSUB=po
|
POSUB=po
|
||||||
else
|
|
||||||
DATADIRNAME=share
|
|
||||||
nls_cv_header_intl=intl/libintl.h
|
|
||||||
nls_cv_header_libgt=intl/libgettext.h
|
|
||||||
fi
|
fi
|
||||||
if test -z "$nls_cv_header_intl"; then
|
|
||||||
# Clean out junk possibly left behind by a previous configuration.
|
|
||||||
rm -f intl/libintl.h
|
|
||||||
fi
|
|
||||||
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
|
|
||||||
AC_OUTPUT_COMMANDS(
|
AC_OUTPUT_COMMANDS(
|
||||||
[case "$CONFIG_FILES" in *po/Makefile.in*)
|
[for ac_file in $CONFIG_FILES; do
|
||||||
sed -e "/POTFILES =/r po/POTFILES" po/Makefile.in > po/Makefile
|
# Support "outfile[:infile[:infile...]]"
|
||||||
esac])
|
case "$ac_file" in
|
||||||
|
*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
|
||||||
|
esac
|
||||||
|
# PO directories have a Makefile.in generated from Makefile.in.in.
|
||||||
|
case "$ac_file" in */Makefile.in)
|
||||||
|
# Adjust a relative srcdir.
|
||||||
|
ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
|
||||||
|
ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
|
||||||
|
ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
|
||||||
|
test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
|
||||||
|
case "$ac_given_srcdir" in
|
||||||
|
.) top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
|
||||||
|
/*) top_srcdir="$ac_given_srcdir" ;;
|
||||||
|
*) top_srcdir="$ac_dots$ac_given_srcdir" ;;
|
||||||
|
esac
|
||||||
|
if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
|
||||||
|
rm -f "$ac_dir/POTFILES"
|
||||||
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
|
||||||
|
sed -e "/^#/d" -e "/^[ ]*\$/d" -e "s,.*, $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
|
||||||
|
test -n "$as_me" && echo "$as_me: creating $ac_dir/Makefile" || echo "creating $ac_dir/Makefile"
|
||||||
|
sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/Makefile.in" > "$ac_dir/Makefile"
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
done])
|
||||||
|
|
||||||
|
|
||||||
# If this is used in GNU gettext we have to set USE_NLS to `yes'
|
dnl If this is used in GNU gettext we have to set BUILD_INCLUDED_LIBINTL
|
||||||
# because some of the sources are only built for this goal.
|
dnl to 'yes' because some of the testsuite requires it.
|
||||||
if test "$PACKAGE" = gettext; then
|
if test "$PACKAGE" = gettext; then
|
||||||
USE_NLS=yes
|
BUILD_INCLUDED_LIBINTL=yes
|
||||||
USE_INCLUDED_LIBINTL=yes
|
fi
|
||||||
|
|
||||||
|
dnl intl/plural.c is generated from intl/plural.y. It requires bison,
|
||||||
|
dnl because plural.y uses bison specific features. It requires at least
|
||||||
|
dnl bison-1.26 because earlier versions generate a plural.c that doesn't
|
||||||
|
dnl compile.
|
||||||
|
dnl bison is only needed for the maintainer (who touches plural.y). But in
|
||||||
|
dnl order to avoid separate Makefiles or --enable-maintainer-mode, we put
|
||||||
|
dnl the rule in general Makefile. Now, some people carelessly touch the
|
||||||
|
dnl files or have a broken "make" program, hence the plural.c rule will
|
||||||
|
dnl sometimes fire. To avoid an error, defines BISON to ":" if it is not
|
||||||
|
dnl present or too old.
|
||||||
|
AC_CHECK_PROGS([INTLBISON], [bison])
|
||||||
|
if test -z "$INTLBISON"; then
|
||||||
|
ac_verc_fail=yes
|
||||||
|
else
|
||||||
|
dnl Found it, now check the version.
|
||||||
|
AC_MSG_CHECKING([version of bison])
|
||||||
|
changequote(<<,>>)dnl
|
||||||
|
ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison .* \([0-9]*\.[0-9.]*\).*$/\1/p'`
|
||||||
|
case $ac_prog_version in
|
||||||
|
'') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
|
||||||
|
1.2[6-9]* | 1.[3-9][0-9]* | [2-9].*)
|
||||||
|
changequote([,])dnl
|
||||||
|
ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
|
||||||
|
*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
|
||||||
|
esac
|
||||||
|
AC_MSG_RESULT([$ac_prog_version])
|
||||||
|
fi
|
||||||
|
if test $ac_verc_fail = yes; then
|
||||||
|
INTLBISON=:
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl These rules are solely for the distribution goal. While doing this
|
dnl These rules are solely for the distribution goal. While doing this
|
||||||
@@ -183,22 +245,38 @@ AC_DEFUN(AM_WITH_NLS,
|
|||||||
done
|
done
|
||||||
|
|
||||||
dnl Make all variables we use known to autoconf.
|
dnl Make all variables we use known to autoconf.
|
||||||
|
AC_SUBST(BUILD_INCLUDED_LIBINTL)
|
||||||
AC_SUBST(USE_INCLUDED_LIBINTL)
|
AC_SUBST(USE_INCLUDED_LIBINTL)
|
||||||
AC_SUBST(CATALOGS)
|
AC_SUBST(CATALOGS)
|
||||||
AC_SUBST(CATOBJEXT)
|
AC_SUBST(CATOBJEXT)
|
||||||
AC_SUBST(DATADIRNAME)
|
|
||||||
AC_SUBST(GMOFILES)
|
AC_SUBST(GMOFILES)
|
||||||
AC_SUBST(INSTOBJEXT)
|
|
||||||
AC_SUBST(INTLDEPS)
|
|
||||||
AC_SUBST(INTLLIBS)
|
AC_SUBST(INTLLIBS)
|
||||||
AC_SUBST(INTLOBJS)
|
AC_SUBST(INTLOBJS)
|
||||||
AC_SUBST(POFILES)
|
AC_SUBST(POFILES)
|
||||||
AC_SUBST(POSUB)
|
AC_SUBST(POSUB)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some configure.ins may be using this.
|
||||||
|
nls_cv_header_intl=
|
||||||
|
nls_cv_header_libgt=
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
DATADIRNAME=share
|
||||||
|
AC_SUBST(DATADIRNAME)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
INSTOBJEXT=.mo
|
||||||
|
AC_SUBST(INSTOBJEXT)
|
||||||
|
|
||||||
|
dnl For backward compatibility. Some Makefiles may be using this.
|
||||||
|
GENCAT=gencat
|
||||||
|
AC_SUBST(GENCAT)
|
||||||
])
|
])
|
||||||
|
|
||||||
AC_DEFUN(AM_GNU_GETTEXT,
|
dnl Usage: Just like AM_WITH_NLS, which see.
|
||||||
|
AC_DEFUN([AM_GNU_GETTEXT],
|
||||||
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
[AC_REQUIRE([AC_PROG_MAKE_SET])dnl
|
||||||
AC_REQUIRE([AC_PROG_CC])dnl
|
AC_REQUIRE([AC_PROG_CC])dnl
|
||||||
|
AC_REQUIRE([AC_CANONICAL_HOST])dnl
|
||||||
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
AC_REQUIRE([AC_PROG_RANLIB])dnl
|
||||||
AC_REQUIRE([AC_ISC_POSIX])dnl
|
AC_REQUIRE([AC_ISC_POSIX])dnl
|
||||||
AC_REQUIRE([AC_HEADER_STDC])dnl
|
AC_REQUIRE([AC_HEADER_STDC])dnl
|
||||||
@@ -208,22 +286,18 @@ AC_DEFUN(AM_GNU_GETTEXT,
|
|||||||
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
AC_REQUIRE([AC_TYPE_SIZE_T])dnl
|
||||||
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
AC_REQUIRE([AC_FUNC_ALLOCA])dnl
|
||||||
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
AC_REQUIRE([AC_FUNC_MMAP])dnl
|
||||||
|
AC_REQUIRE([jm_GLIBC21])dnl
|
||||||
|
|
||||||
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h string.h \
|
AC_CHECK_HEADERS([argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
|
||||||
unistd.h sys/param.h])
|
stdlib.h string.h unistd.h sys/param.h])
|
||||||
AC_CHECK_FUNCS([getcwd munmap putenv setenv setlocale strchr strcasecmp \
|
AC_CHECK_FUNCS([feof_unlocked fgets_unlocked getcwd getegid geteuid \
|
||||||
strdup __argz_count __argz_stringify __argz_next])
|
getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
|
||||||
|
strdup strtoul tsearch __argz_count __argz_stringify __argz_next])
|
||||||
if test "${ac_cv_func_stpcpy+set}" != "set"; then
|
|
||||||
AC_CHECK_FUNCS(stpcpy)
|
|
||||||
fi
|
|
||||||
if test "${ac_cv_func_stpcpy}" = "yes"; then
|
|
||||||
AC_DEFINE(HAVE_STPCPY, 1,
|
|
||||||
[Define to 1 if you have the \`stpcpy' function.])
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
AM_ICONV
|
||||||
|
AM_LANGINFO_CODESET
|
||||||
AM_LC_MESSAGES
|
AM_LC_MESSAGES
|
||||||
AM_WITH_NLS
|
AM_WITH_NLS([$1],[$2],[$3])
|
||||||
|
|
||||||
if test "x$CATOBJEXT" != "x"; then
|
if test "x$CATOBJEXT" != "x"; then
|
||||||
if test "x$ALL_LINGUAS" = "x"; then
|
if test "x$ALL_LINGUAS" = "x"; then
|
||||||
@@ -231,10 +305,21 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
else
|
else
|
||||||
AC_MSG_CHECKING(for catalogs to be installed)
|
AC_MSG_CHECKING(for catalogs to be installed)
|
||||||
NEW_LINGUAS=
|
NEW_LINGUAS=
|
||||||
for lang in ${LINGUAS=$ALL_LINGUAS}; do
|
for presentlang in $ALL_LINGUAS; do
|
||||||
case "$ALL_LINGUAS" in
|
useit=no
|
||||||
*$lang*) NEW_LINGUAS="$NEW_LINGUAS $lang" ;;
|
for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
|
||||||
esac
|
# Use the presentlang catalog if desiredlang is
|
||||||
|
# a. equal to presentlang, or
|
||||||
|
# b. a variant of presentlang (because in this case,
|
||||||
|
# presentlang can be used as a fallback for messages
|
||||||
|
# which are not translated in the desiredlang catalog).
|
||||||
|
case "$desiredlang" in
|
||||||
|
"$presentlang"*) useit=yes;;
|
||||||
|
esac
|
||||||
|
done
|
||||||
|
if test $useit = yes; then
|
||||||
|
NEW_LINGUAS="$NEW_LINGUAS $presentlang"
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
LINGUAS=$NEW_LINGUAS
|
LINGUAS=$NEW_LINGUAS
|
||||||
AC_MSG_RESULT($LINGUAS)
|
AC_MSG_RESULT($LINGUAS)
|
||||||
@@ -246,75 +331,19 @@ strdup __argz_count __argz_stringify __argz_next])
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
dnl The reference to <locale.h> in the installed <libintl.h> file
|
|
||||||
dnl must be resolved because we cannot expect the users of this
|
|
||||||
dnl to define HAVE_LOCALE_H.
|
|
||||||
if test $ac_cv_header_locale_h = yes; then
|
|
||||||
INCLUDE_LOCALE_H="#include <locale.h>"
|
|
||||||
else
|
|
||||||
INCLUDE_LOCALE_H="\
|
|
||||||
/* The system does not provide the header <locale.h>. Take care yourself. */"
|
|
||||||
fi
|
|
||||||
AC_SUBST(INCLUDE_LOCALE_H)
|
|
||||||
|
|
||||||
dnl Determine which catalog format we have (if any is needed)
|
|
||||||
dnl For now we know about two different formats:
|
|
||||||
dnl Linux libc-5 and the normal X/Open format
|
|
||||||
test -d intl || mkdir intl
|
|
||||||
if test "$CATOBJEXT" = ".cat"; then
|
|
||||||
AC_CHECK_HEADER(linux/version.h, msgformat=linux, msgformat=xopen)
|
|
||||||
|
|
||||||
dnl Transform the SED scripts while copying because some dumb SEDs
|
|
||||||
dnl cannot handle comments.
|
|
||||||
sed -e '/^#/d' $srcdir/intl/$msgformat-msg.sed > intl/po2msg.sed
|
|
||||||
fi
|
|
||||||
dnl po2tbl.sed is always needed.
|
|
||||||
sed -e '/^#.*[^\\]$/d' -e '/^#$/d' \
|
|
||||||
$srcdir/intl/po2tbl.sed.in > intl/po2tbl.sed
|
|
||||||
|
|
||||||
dnl In the intl/Makefile.in we have a special dependency which makes
|
|
||||||
dnl only sense for gettext. We comment this out for non-gettext
|
|
||||||
dnl packages.
|
|
||||||
if test "$PACKAGE" = "gettext"; then
|
|
||||||
GT_NO="#NO#"
|
|
||||||
GT_YES=
|
|
||||||
else
|
|
||||||
GT_NO=
|
|
||||||
GT_YES="#YES#"
|
|
||||||
fi
|
|
||||||
AC_SUBST(GT_NO)
|
|
||||||
AC_SUBST(GT_YES)
|
|
||||||
|
|
||||||
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
dnl If the AC_CONFIG_AUX_DIR macro for autoconf is used we possibly
|
||||||
dnl find the mkinstalldirs script in another subdir but ($top_srcdir).
|
dnl find the mkinstalldirs script in another subdir but $(top_srcdir).
|
||||||
dnl Try to locate is.
|
dnl Try to locate is.
|
||||||
MKINSTALLDIRS=
|
MKINSTALLDIRS=
|
||||||
if test -n "$ac_aux_dir"; then
|
if test -n "$ac_aux_dir"; then
|
||||||
MKINSTALLDIRS="\$(top_srcdir)/$ac_aux_dir/mkinstalldirs"
|
MKINSTALLDIRS="$ac_aux_dir/mkinstalldirs"
|
||||||
fi
|
fi
|
||||||
if test -z "$MKINSTALLDIRS"; then
|
if test -z "$MKINSTALLDIRS"; then
|
||||||
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
MKINSTALLDIRS="\$(top_srcdir)/mkinstalldirs"
|
||||||
fi
|
fi
|
||||||
AC_SUBST(MKINSTALLDIRS)
|
AC_SUBST(MKINSTALLDIRS)
|
||||||
|
|
||||||
dnl *** For now the libtool support in intl/Makefile is not for real.
|
dnl Enable libtool support if the surrounding package wishes it.
|
||||||
l=
|
INTL_LIBTOOL_SUFFIX_PREFIX=ifelse([$1], use-libtool, [l], [])
|
||||||
AC_SUBST(l)
|
AC_SUBST(INTL_LIBTOOL_SUFFIX_PREFIX)
|
||||||
|
|
||||||
dnl Generate list of files to be processed by xgettext which will
|
|
||||||
dnl be included in po/Makefile.
|
|
||||||
test -d po || mkdir po
|
|
||||||
changequote(, )dnl
|
|
||||||
case "$srcdir" in
|
|
||||||
.)
|
|
||||||
posrcprefix="../" ;;
|
|
||||||
/* | [A-Za-z]:*)
|
|
||||||
posrcprefix="$srcdir/" ;;
|
|
||||||
*)
|
|
||||||
posrcprefix="../$srcdir/" ;;
|
|
||||||
esac
|
|
||||||
changequote([, ])dnl
|
|
||||||
rm -f po/POTFILES
|
|
||||||
sed -e "/^#/d" -e "/^\$/d" -e "s,.*, $posrcprefix& \\\\," -e "\$s/\(.*\) \\\\/\1/" \
|
|
||||||
< $srcdir/po/POTFILES.in > po/POTFILES
|
|
||||||
])
|
])
|
||||||
|
|||||||
26
m4/glibc21.m4
Normal file
26
m4/glibc21.m4
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
#serial 2
|
||||||
|
|
||||||
|
# Test for the GNU C Library, version 2.1 or newer.
|
||||||
|
# From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([jm_GLIBC21],
|
||||||
|
[
|
||||||
|
AC_CACHE_CHECK(whether we are using the GNU C Library 2.1 or newer,
|
||||||
|
ac_cv_gnu_library_2_1,
|
||||||
|
[AC_EGREP_CPP([Lucky GNU user],
|
||||||
|
[
|
||||||
|
#include <features.h>
|
||||||
|
#ifdef __GNU_LIBRARY__
|
||||||
|
#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
|
||||||
|
Lucky GNU user
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
],
|
||||||
|
ac_cv_gnu_library_2_1=yes,
|
||||||
|
ac_cv_gnu_library_2_1=no)
|
||||||
|
]
|
||||||
|
)
|
||||||
|
AC_SUBST(GLIBC21)
|
||||||
|
GLIBC21="$ac_cv_gnu_library_2_1"
|
||||||
|
]
|
||||||
|
)
|
||||||
69
m4/iconv.m4
Normal file
69
m4/iconv.m4
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
#serial AM2
|
||||||
|
|
||||||
|
dnl From Bruno Haible.
|
||||||
|
|
||||||
|
AC_DEFUN([AM_ICONV],
|
||||||
|
[
|
||||||
|
dnl Some systems have iconv in libc, some have it in libiconv (OSF/1 and
|
||||||
|
dnl those with the standalone portable GNU libiconv installed).
|
||||||
|
|
||||||
|
AC_ARG_WITH([libiconv-prefix],
|
||||||
|
[ --with-libiconv-prefix=DIR search for libiconv in DIR/include and DIR/lib], [
|
||||||
|
for dir in `echo "$withval" | tr : ' '`; do
|
||||||
|
if test -d $dir/include; then CPPFLAGS="$CPPFLAGS -I$dir/include"; fi
|
||||||
|
if test -d $dir/lib; then LDFLAGS="$LDFLAGS -L$dir/lib"; fi
|
||||||
|
done
|
||||||
|
])
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(for iconv, am_cv_func_iconv, [
|
||||||
|
am_cv_func_iconv="no, consider installing GNU libiconv"
|
||||||
|
am_cv_lib_iconv=no
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
if test "$am_cv_func_iconv" != yes; then
|
||||||
|
am_save_LIBS="$LIBS"
|
||||||
|
LIBS="$LIBS -liconv"
|
||||||
|
AC_TRY_LINK([#include <stdlib.h>
|
||||||
|
#include <iconv.h>],
|
||||||
|
[iconv_t cd = iconv_open("","");
|
||||||
|
iconv(cd,NULL,NULL,NULL,NULL);
|
||||||
|
iconv_close(cd);],
|
||||||
|
am_cv_lib_iconv=yes
|
||||||
|
am_cv_func_iconv=yes)
|
||||||
|
LIBS="$am_save_LIBS"
|
||||||
|
fi
|
||||||
|
])
|
||||||
|
if test "$am_cv_func_iconv" = yes; then
|
||||||
|
AC_DEFINE(HAVE_ICONV, 1, [Define if you have the iconv() function.])
|
||||||
|
AC_MSG_CHECKING([for iconv declaration])
|
||||||
|
AC_CACHE_VAL(am_cv_proto_iconv, [
|
||||||
|
AC_TRY_COMPILE([
|
||||||
|
#include <stdlib.h>
|
||||||
|
#include <iconv.h>
|
||||||
|
extern
|
||||||
|
#ifdef __cplusplus
|
||||||
|
"C"
|
||||||
|
#endif
|
||||||
|
#if defined(__STDC__) || defined(__cplusplus)
|
||||||
|
size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
|
||||||
|
#else
|
||||||
|
size_t iconv();
|
||||||
|
#endif
|
||||||
|
], [], am_cv_proto_iconv_arg1="", am_cv_proto_iconv_arg1="const")
|
||||||
|
am_cv_proto_iconv="extern size_t iconv (iconv_t cd, $am_cv_proto_iconv_arg1 char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);"])
|
||||||
|
am_cv_proto_iconv=`echo "[$]am_cv_proto_iconv" | tr -s ' ' | sed -e 's/( /(/'`
|
||||||
|
AC_MSG_RESULT([$]{ac_t:-
|
||||||
|
}[$]am_cv_proto_iconv)
|
||||||
|
AC_DEFINE_UNQUOTED(ICONV_CONST, $am_cv_proto_iconv_arg1,
|
||||||
|
[Define as const if the declaration of iconv() needs const.])
|
||||||
|
fi
|
||||||
|
LIBICONV=
|
||||||
|
if test "$am_cv_lib_iconv" = yes; then
|
||||||
|
LIBICONV="-liconv"
|
||||||
|
fi
|
||||||
|
AC_SUBST(LIBICONV)
|
||||||
|
])
|
||||||
17
m4/isc-posix.m4
Normal file
17
m4/isc-posix.m4
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
#serial 1
|
||||||
|
# This test replaces the one in autoconf.
|
||||||
|
# Currently this macro should have the same name as the autoconf macro
|
||||||
|
# because gettext's gettext.m4 (distributed in the automake package)
|
||||||
|
# still uses it. Otherwise, the use in gettext.m4 makes autoheader
|
||||||
|
# give these diagnostics:
|
||||||
|
# configure.in:556: AC_TRY_COMPILE was called before AC_ISC_POSIX
|
||||||
|
# configure.in:556: AC_TRY_RUN was called before AC_ISC_POSIX
|
||||||
|
|
||||||
|
undefine([AC_ISC_POSIX])
|
||||||
|
|
||||||
|
AC_DEFUN([AC_ISC_POSIX],
|
||||||
|
[
|
||||||
|
dnl This test replaces the obsolescent AC_ISC_POSIX kludge.
|
||||||
|
AC_CHECK_LIB(cposix, strerror, [LIBS="$LIBS -lcposix"])
|
||||||
|
]
|
||||||
|
)
|
||||||
@@ -6,15 +6,15 @@
|
|||||||
# but which still want to provide support for the GNU gettext functionality.
|
# but which still want to provide support for the GNU gettext functionality.
|
||||||
# Please note that the actual code is *not* freely available.
|
# Please note that the actual code is *not* freely available.
|
||||||
|
|
||||||
# serial 1
|
# serial 2
|
||||||
|
|
||||||
AC_DEFUN(AM_LC_MESSAGES,
|
AC_DEFUN([AM_LC_MESSAGES],
|
||||||
[if test $ac_cv_header_locale_h = yes; then
|
[if test $ac_cv_header_locale_h = yes; then
|
||||||
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
AC_CACHE_CHECK([for LC_MESSAGES], am_cv_val_LC_MESSAGES,
|
||||||
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
[AC_TRY_LINK([#include <locale.h>], [return LC_MESSAGES],
|
||||||
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
am_cv_val_LC_MESSAGES=yes, am_cv_val_LC_MESSAGES=no)])
|
||||||
if test $am_cv_val_LC_MESSAGES = yes; then
|
if test $am_cv_val_LC_MESSAGES = yes; then
|
||||||
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
AC_DEFINE(HAVE_LC_MESSAGES, 1,
|
||||||
[Define if your locale.h file contains LC_MESSAGES.])
|
[Define if your <locale.h> file defines LC_MESSAGES.])
|
||||||
fi
|
fi
|
||||||
fi])
|
fi])
|
||||||
|
|||||||
8
m4/m4.m4
8
m4/m4.m4
@@ -1,14 +1,16 @@
|
|||||||
# serial 1
|
# serial 1 -*- Autoconf -*-
|
||||||
|
|
||||||
# BISON_AC_PROG_GNU_M4
|
# BISON_AC_PROG_GNU_M4
|
||||||
# --------------------
|
# --------------------
|
||||||
# Check for GNU m4, at least 1.3 (supports frozen files).
|
# Check for GNU m4, at least 1.3 (supports frozen files).
|
||||||
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
AC_DEFUN([BISON_AC_PROG_GNU_M4],
|
||||||
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
[AC_PATH_PROGS(M4, gm4 gnum4 m4, m4)
|
||||||
AC_CACHE_CHECK(whether m4 supports frozen files, ac_cv_prog_gnu_m4,
|
AC_CACHE_CHECK([whether m4 supports frozen files],
|
||||||
|
[ac_cv_prog_gnu_m4],
|
||||||
[ac_cv_prog_gnu_m4=no
|
[ac_cv_prog_gnu_m4=no
|
||||||
if test x"$M4" != x; then
|
if test x"$M4" != x; then
|
||||||
case `$M4 --help < /dev/null 2>&1` in
|
case `$M4 --help < /dev/null 2>&1` in
|
||||||
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
*reload-state*) ac_cv_prog_gnu_m4=yes ;;
|
||||||
esac
|
esac
|
||||||
fi])])
|
fi])
|
||||||
|
])# BISON_AC_PROG_GNU_M4
|
||||||
|
|||||||
@@ -10,7 +10,7 @@
|
|||||||
|
|
||||||
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
dnl AM_PATH_PROG_WITH_TEST(VARIABLE, PROG-TO-CHECK-FOR,
|
||||||
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
dnl TEST-PERFORMED-ON-FOUND_PROGRAM [, VALUE-IF-NOT-FOUND [, PATH]])
|
||||||
AC_DEFUN(AM_PATH_PROG_WITH_TEST,
|
AC_DEFUN([AM_PATH_PROG_WITH_TEST],
|
||||||
[# Extract the first word of "$2", so it can be a program name with args.
|
[# Extract the first word of "$2", so it can be a program name with args.
|
||||||
set dummy $2; ac_word=[$]2
|
set dummy $2; ac_word=[$]2
|
||||||
AC_MSG_CHECKING([for $ac_word])
|
AC_MSG_CHECKING([for $ac_word])
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
# Makefile for program source directory in GNU NLS utilities package.
|
# 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
|
# 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
|
# be used in projects which are not available under the GNU Public License
|
||||||
@@ -9,6 +9,10 @@
|
|||||||
PACKAGE = @PACKAGE@
|
PACKAGE = @PACKAGE@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
|
|
||||||
|
# These two variables depend on the location of this directory.
|
||||||
|
subdir = po
|
||||||
|
top_builddir = ..
|
||||||
|
|
||||||
SHELL = /bin/sh
|
SHELL = /bin/sh
|
||||||
@SET_MAKE@
|
@SET_MAKE@
|
||||||
|
|
||||||
@@ -18,22 +22,20 @@ VPATH = @srcdir@
|
|||||||
|
|
||||||
prefix = @prefix@
|
prefix = @prefix@
|
||||||
exec_prefix = @exec_prefix@
|
exec_prefix = @exec_prefix@
|
||||||
datadir = $(prefix)/@DATADIRNAME@
|
datadir = @datadir@
|
||||||
localedir = $(datadir)/locale
|
localedir = $(datadir)/locale
|
||||||
gnulocaledir = $(prefix)/share/locale
|
gettextsrcdir = $(datadir)/gettext/po
|
||||||
gettextsrcdir = $(prefix)/share/gettext/po
|
|
||||||
subdir = po
|
|
||||||
|
|
||||||
INSTALL = @INSTALL@
|
INSTALL = @INSTALL@
|
||||||
INSTALL_DATA = @INSTALL_DATA@
|
INSTALL_DATA = @INSTALL_DATA@
|
||||||
MKINSTALLDIRS = @MKINSTALLDIRS@
|
MKINSTALLDIRS = @MKINSTALLDIRS@
|
||||||
|
mkinstalldirs = $(SHELL) `case "$(MKINSTALLDIRS)" in /*) echo "$(MKINSTALLDIRS)" ;; *) echo "$(top_builddir)/$(MKINSTALLDIRS)" ;; esac`
|
||||||
|
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
GENCAT = @GENCAT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GMSGFMT = PATH=../src:$$PATH @GMSGFMT@
|
|
||||||
MSGFMT = @MSGFMT@
|
MSGFMT = @MSGFMT@
|
||||||
XGETTEXT = PATH=../src:$$PATH @XGETTEXT@
|
XGETTEXT = @XGETTEXT@
|
||||||
MSGMERGE = PATH=../src:$$PATH msgmerge
|
MSGMERGE = msgmerge
|
||||||
|
|
||||||
DEFS = @DEFS@
|
DEFS = @DEFS@
|
||||||
CFLAGS = @CFLAGS@
|
CFLAGS = @CFLAGS@
|
||||||
@@ -43,20 +45,17 @@ INCLUDES = -I.. -I$(top_srcdir)/intl
|
|||||||
|
|
||||||
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
COMPILE = $(CC) -c $(DEFS) $(INCLUDES) $(CPPFLAGS) $(CFLAGS) $(XCFLAGS)
|
||||||
|
|
||||||
SOURCES = cat-id-tbl.c
|
|
||||||
POFILES = @POFILES@
|
POFILES = @POFILES@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
DISTFILES = Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
DISTFILES = ChangeLog Makefile.in.in POTFILES.in $(PACKAGE).pot \
|
||||||
stamp-cat-id $(POFILES) $(GMOFILES) $(SOURCES)
|
$(POFILES) $(GMOFILES)
|
||||||
|
|
||||||
POTFILES = \
|
POTFILES = \
|
||||||
|
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
|
||||||
|
|
||||||
.SUFFIXES:
|
.SUFFIXES:
|
||||||
.SUFFIXES: .c .o .po .pox .gmo .mo .msg .cat
|
.SUFFIXES: .c .o .po .pox .gmo .mo
|
||||||
|
|
||||||
.c.o:
|
.c.o:
|
||||||
$(COMPILE) $<
|
$(COMPILE) $<
|
||||||
@@ -70,19 +69,19 @@ INSTOBJEXT = @INSTOBJEXT@
|
|||||||
|
|
||||||
.po.gmo:
|
.po.gmo:
|
||||||
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
file=$(srcdir)/`echo $* | sed 's,.*/,,'`.gmo \
|
||||||
&& rm -f $$file && $(GMSGFMT) -o $$file $<
|
&& rm -f $$file && $(GMSGFMT) --statistics -o $$file $<
|
||||||
|
|
||||||
.po.cat:
|
|
||||||
sed -f ../intl/po2msg.sed < $< > $*.msg \
|
|
||||||
&& rm -f $@ && $(GENCAT) $@ $*.msg
|
|
||||||
|
|
||||||
|
|
||||||
all: all-@USE_NLS@
|
all: all-@USE_NLS@
|
||||||
|
|
||||||
all-yes: cat-id-tbl.c $(CATALOGS)
|
all-yes: $(CATALOGS)
|
||||||
all-no:
|
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) \
|
$(XGETTEXT) --default-domain=$(PACKAGE) --directory=$(top_srcdir) \
|
||||||
--add-comments --keyword=_ --keyword=N_ \
|
--add-comments --keyword=_ --keyword=N_ \
|
||||||
--files-from=$(srcdir)/POTFILES.in \
|
--files-from=$(srcdir)/POTFILES.in \
|
||||||
@@ -90,78 +89,35 @@ $(srcdir)/$(PACKAGE).pot: $(POTFILES)
|
|||||||
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
|| ( rm -f $(srcdir)/$(PACKAGE).pot \
|
||||||
&& mv $(PACKAGE).po $(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: install-exec install-data
|
||||||
install-exec:
|
install-exec:
|
||||||
install-data: install-data-@USE_NLS@
|
install-data: install-data-@USE_NLS@
|
||||||
install-data-no: all
|
|
||||||
install-data-yes: all
|
|
||||||
if test -x "$(MKINSTALLDIRS)"; then \
|
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(datadir); \
|
|
||||||
else \
|
|
||||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(datadir); \
|
|
||||||
fi
|
|
||||||
@catalogs='$(CATALOGS)'; \
|
|
||||||
for cat in $$catalogs; do \
|
|
||||||
cat=`basename $$cat`; \
|
|
||||||
case "$$cat" in \
|
|
||||||
*.gmo) destdir=$(DESTDIR)$(gnulocaledir);; \
|
|
||||||
*) destdir=$(DESTDIR)$(localedir);; \
|
|
||||||
esac; \
|
|
||||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
|
||||||
dir=$$destdir/$$lang/LC_MESSAGES; \
|
|
||||||
if test -r "$(MKINSTALLDIRS)"; then \
|
|
||||||
$(MKINSTALLDIRS) $$dir; \
|
|
||||||
else \
|
|
||||||
$(SHELL) $(top_srcdir)/mkinstalldirs $$dir; \
|
|
||||||
fi; \
|
|
||||||
if test -r $$cat; then \
|
|
||||||
$(INSTALL_DATA) $$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
|
||||||
echo "installing $$cat as $$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
|
||||||
else \
|
|
||||||
$(INSTALL_DATA) $(srcdir)/$$cat $$dir/$(PACKAGE)$(INSTOBJEXT); \
|
|
||||||
echo "installing $(srcdir)/$$cat as" \
|
|
||||||
"$$dir/$(PACKAGE)$(INSTOBJEXT)"; \
|
|
||||||
fi; \
|
|
||||||
if test -r $$cat.m; then \
|
|
||||||
$(INSTALL_DATA) $$cat.m $$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
|
||||||
echo "installing $$cat.m as $$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
|
||||||
else \
|
|
||||||
if test -r $(srcdir)/$$cat.m ; then \
|
|
||||||
$(INSTALL_DATA) $(srcdir)/$$cat.m \
|
|
||||||
$$dir/$(PACKAGE)$(INSTOBJEXT).m; \
|
|
||||||
echo "installing $(srcdir)/$$cat as" \
|
|
||||||
"$$dir/$(PACKAGE)$(INSTOBJEXT).m"; \
|
|
||||||
else \
|
|
||||||
true; \
|
|
||||||
fi; \
|
|
||||||
fi; \
|
|
||||||
done
|
|
||||||
if test "$(PACKAGE)" = "gettext"; then \
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
if test -x "$(MKINSTALLDIRS)"; then \
|
$(mkinstalldirs) $(DESTDIR)$(gettextsrcdir); \
|
||||||
$(MKINSTALLDIRS) $(DESTDIR)$(gettextsrcdir); \
|
|
||||||
else \
|
|
||||||
$(SHELL) $(top_srcdir)/mkinstalldirs $(DESTDIR)$(gettextsrcdir); \
|
|
||||||
fi; \
|
|
||||||
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
$(INSTALL_DATA) $(srcdir)/Makefile.in.in \
|
||||||
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
$(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||||
else \
|
else \
|
||||||
: ; \
|
: ; \
|
||||||
fi
|
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.
|
# Define this as empty until I found a useful application.
|
||||||
installcheck:
|
installcheck:
|
||||||
@@ -170,76 +126,68 @@ uninstall:
|
|||||||
catalogs='$(CATALOGS)'; \
|
catalogs='$(CATALOGS)'; \
|
||||||
for cat in $$catalogs; do \
|
for cat in $$catalogs; do \
|
||||||
cat=`basename $$cat`; \
|
cat=`basename $$cat`; \
|
||||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE).mo; \
|
||||||
rm -f $(DESTDIR)$(localedir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
|
||||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT); \
|
|
||||||
rm -f $(DESTDIR)$(gnulocaledir)/$$lang/LC_MESSAGES/$(PACKAGE)$(INSTOBJEXT).m; \
|
|
||||||
done
|
done
|
||||||
rm -f $(DESTDIR)$(gettextsrcdir)/po-Makefile.in.in
|
if test "$(PACKAGE)" = "gettext"; then \
|
||||||
|
rm -f $(DESTDIR)$(gettextsrcdir)/Makefile.in.in; \
|
||||||
|
else \
|
||||||
|
: ; \
|
||||||
|
fi
|
||||||
|
|
||||||
check: all
|
check: all
|
||||||
|
|
||||||
cat-id-tbl.o: ../intl/libgettext.h
|
|
||||||
|
|
||||||
dvi info tags TAGS ID:
|
dvi info tags TAGS ID:
|
||||||
|
|
||||||
mostlyclean:
|
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
|
rm -fr *.o
|
||||||
|
|
||||||
clean: mostlyclean
|
clean: mostlyclean
|
||||||
|
|
||||||
distclean: clean
|
distclean: clean
|
||||||
rm -f Makefile Makefile.in POTFILES *.mo *.msg *.cat *.cat.m
|
rm -f Makefile Makefile.in POTFILES *.mo
|
||||||
|
|
||||||
maintainer-clean: distclean
|
maintainer-clean: distclean
|
||||||
@echo "This command is intended for maintainers to use;"
|
@echo "This command is intended for maintainers to use;"
|
||||||
@echo "it deletes files that may require special tools to rebuild."
|
@echo "it deletes files that may require special tools to rebuild."
|
||||||
rm -f $(GMOFILES)
|
rm -f $(GMOFILES)
|
||||||
|
|
||||||
distdir = ../$(PACKAGE)-$(VERSION)/$(subdir)
|
distdir = $(top_builddir)/$(PACKAGE)-$(VERSION)/$(subdir)
|
||||||
dist distdir: update-po $(DISTFILES)
|
dist distdir:
|
||||||
|
$(MAKE) update-po
|
||||||
|
@$(MAKE) dist2
|
||||||
|
# This is a separate target because 'update-po' must be executed before.
|
||||||
|
dist2: $(DISTFILES)
|
||||||
dists="$(DISTFILES)"; \
|
dists="$(DISTFILES)"; \
|
||||||
for file in $$dists; do \
|
for file in $$dists; do \
|
||||||
ln $(srcdir)/$$file $(distdir) 2> /dev/null \
|
if test -f $$file; then dir=.; else dir=$(srcdir); fi; \
|
||||||
|| cp -p $(srcdir)/$$file $(distdir); \
|
cp -p $$dir/$$file $(distdir); \
|
||||||
done
|
done
|
||||||
|
|
||||||
update-po: Makefile
|
update-po: Makefile
|
||||||
$(MAKE) $(PACKAGE).pot
|
$(MAKE) $(PACKAGE).pot
|
||||||
PATH=`pwd`/../src:$$PATH; \
|
if test "$(PACKAGE)" = "gettext"; then PATH=`pwd`/../src:$$PATH; fi; \
|
||||||
cd $(srcdir); \
|
cd $(srcdir); \
|
||||||
catalogs='$(CATALOGS)'; \
|
catalogs='$(GMOFILES)'; \
|
||||||
for cat in $$catalogs; do \
|
for cat in $$catalogs; do \
|
||||||
cat=`basename $$cat`; \
|
cat=`basename $$cat`; \
|
||||||
lang=`echo $$cat | sed 's/\$(CATOBJEXT)$$//'`; \
|
lang=`echo $$cat | sed 's/\.gmo$$//'`; \
|
||||||
mv $$lang.po $$lang.old.po; \
|
|
||||||
echo "$$lang:"; \
|
echo "$$lang:"; \
|
||||||
if $(MSGMERGE) $$lang.old.po $(PACKAGE).pot -o $$lang.po; then \
|
if $(MSGMERGE) $$lang.po $(PACKAGE).pot -o $$lang.new.po; then \
|
||||||
rm -f $$lang.old.po; \
|
mv -f $$lang.new.po $$lang.po; \
|
||||||
else \
|
else \
|
||||||
echo "msgmerge for $$cat failed!"; \
|
echo "msgmerge for $$cat failed!"; \
|
||||||
rm -f $$lang.po; \
|
rm -f $$lang.new.po; \
|
||||||
mv $$lang.old.po $$lang.po; \
|
|
||||||
fi; \
|
fi; \
|
||||||
done
|
done
|
||||||
|
$(MAKE) update-gmo
|
||||||
|
|
||||||
POTFILES: POTFILES.in
|
update-gmo: Makefile $(GMOFILES)
|
||||||
( 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 $@ )
|
|
||||||
|
|
||||||
Makefile: Makefile.in.in ../config.status POTFILES
|
Makefile: Makefile.in.in $(top_builddir)/config.status POTFILES.in
|
||||||
cd .. \
|
cd $(top_builddir) \
|
||||||
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
&& CONFIG_FILES=$(subdir)/$@.in CONFIG_HEADERS= \
|
||||||
$(SHELL) ./config.status
|
$(SHELL) ./config.status
|
||||||
|
|
||||||
|
|||||||
37
po/de.po
37
po/de.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: bison 1.25\n"
|
"Project-Id-Version: bison 1.25\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
|
"PO-Revision-Date: 1996-10-10 17:54 MET DST\n"
|
||||||
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
|
"Last-Translator: Ulrich Drepper <drepper@gnu.ai.mit.edu>\n"
|
||||||
"Language-Team: German <de@li.org>\n"
|
"Language-Team: German <de@li.org>\n"
|
||||||
@@ -118,22 +118,22 @@ msgstr "%s leitet ab"
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -141,9 +141,10 @@ msgid ""
|
|||||||
" -y, --yacc emulate POSIX yacc\n"
|
" -y, --yacc emulate POSIX yacc\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -153,7 +154,7 @@ msgid ""
|
|||||||
" -k, --token-table include a table of token names\n"
|
" -k, --token-table include a table of token names\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -162,38 +163,39 @@ msgid ""
|
|||||||
" -o, --output-file=FILE leave output to FILE\n"
|
" -o, --output-file=FILE leave output to FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: keine Grammatik-Datei angegeben\n"
|
msgstr "%s: keine Grammatik-Datei angegeben\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: zusätzliche Argumente nach »%s« werden ignoriert\n"
|
msgstr "%s: zusätzliche Argumente nach »%s« werden ignoriert\n"
|
||||||
@@ -672,7 +674,7 @@ msgstr ""
|
|||||||
"Reduzierung von %s definiert %d Terminal, %d Nicht-Terminal und %d "
|
"Reduzierung von %s definiert %d Terminal, %d Nicht-Terminal und %d "
|
||||||
"Produktionen.\n"
|
"Produktionen.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -805,7 +807,8 @@ msgstr ""
|
|||||||
#~ "Report bugs to bug-bison@gnu.org\n"
|
#~ "Report bugs to bug-bison@gnu.org\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Benutzung: %s [-dhklntvyV] [-b Datei-Präfix] [-o Ausgabe-Datei]\n"
|
#~ "Benutzung: %s [-dhklntvyV] [-b Datei-Präfix] [-o Ausgabe-Datei]\n"
|
||||||
#~ " [-p Namen-Präfix] [--debug] [--defines] [--fixed-output-files]\n"
|
#~ " [-p Namen-Präfix] [--debug] [--defines] [--fixed-output-"
|
||||||
|
#~ "files]\n"
|
||||||
#~ " [--no-lines] [--verbose] [--version] [--help] [--yacc]\n"
|
#~ " [--no-lines] [--verbose] [--version] [--help] [--yacc]\n"
|
||||||
#~ " [--no-parser] [--token-table]\n"
|
#~ " [--no-parser] [--token-table]\n"
|
||||||
#~ " [--file-prefix=Präfix] [--name-prefix=Präfix]\n"
|
#~ " [--file-prefix=Präfix] [--name-prefix=Präfix]\n"
|
||||||
|
|||||||
38
po/es.po
38
po/es.po
@@ -30,7 +30,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: GNU bison 1.25\n"
|
"Project-Id-Version: GNU bison 1.25\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
|
"PO-Revision-Date: 1998-09-21 10:19+0200\n"
|
||||||
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
|
"Last-Translator: Nicolás García-Pedrajas <ngarcia-pedrajas@acm.org>\n"
|
||||||
"Language-Team: Spanish <es@li.org>\n"
|
"Language-Team: Spanish <es@li.org>\n"
|
||||||
@@ -174,22 +174,22 @@ msgstr "%s deriva"
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -197,9 +197,10 @@ msgid ""
|
|||||||
" -y, --yacc emulate POSIX yacc\n"
|
" -y, --yacc emulate POSIX yacc\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -209,7 +210,7 @@ msgid ""
|
|||||||
" -k, --token-table include a table of token names\n"
|
" -k, --token-table include a table of token names\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -218,41 +219,42 @@ msgid ""
|
|||||||
" -o, --output-file=FILE leave output to FILE\n"
|
" -o, --output-file=FILE leave output to FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
# Me parece menos "computadora" decir "ningún fichero de gramática" - cll
|
# Me parece menos "computadora" decir "ningún fichero de gramática" - cll
|
||||||
#
|
#
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: no se ha especificado ningún fichero de gramática\n"
|
msgstr "%s: no se ha especificado ningún fichero de gramática\n"
|
||||||
|
|
||||||
# Ignorar es no saber, to ignore es no hacer caso, que no es lo mismo. sv
|
# Ignorar es no saber, to ignore es no hacer caso, que no es lo mismo. sv
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: los argumentos extra después de '%s' no se tendrán en cuenta\n"
|
msgstr "%s: los argumentos extra después de '%s' no se tendrán en cuenta\n"
|
||||||
@@ -773,10 +775,10 @@ msgstr "El s
|
|||||||
msgid ""
|
msgid ""
|
||||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la reducción de %s define %d terminal%s, %d no terminal%s, y %d "
|
"la reducción de %s define %d terminal%s, %d no terminal%s, y %d produccion%"
|
||||||
"produccion%s.\n"
|
"s.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
42
po/et.po
42
po/et.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: bison 1.25\n"
|
"Project-Id-Version: bison 1.25\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 2000-04-11 22:19+02:00\n"
|
"PO-Revision-Date: 2000-04-11 22:19+02:00\n"
|
||||||
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
|
"Last-Translator: Toomas Soome <tsoome@ut.ee>\n"
|
||||||
"Language-Team: Estonian <et@li.org>\n"
|
"Language-Team: Estonian <et@li.org>\n"
|
||||||
@@ -124,16 +124,16 @@ msgstr "%s derives"
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr "GNU bison genereerib parsereid LALR(1) grammatikatele.\n"
|
msgstr "GNU bison genereerib parsereid LALR(1) grammatikatele.\n"
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr "Kasuta: %s [VÕTI]...FAIL\n"
|
msgstr "Kasuta: %s [VÕTI]...FAIL\n"
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
@@ -141,7 +141,7 @@ msgstr ""
|
|||||||
"Kui pikk võti näitab, et argument on kohustuslik, siis on see kohustuslik \n"
|
"Kui pikk võti näitab, et argument on kohustuslik, siis on see kohustuslik \n"
|
||||||
"ka lühikese võtme korral. Sama ka vabalt valitavate võtmete korral.\n"
|
"ka lühikese võtme korral. Sama ka vabalt valitavate võtmete korral.\n"
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -153,10 +153,11 @@ msgstr ""
|
|||||||
" -V, --version esita versiooniinfo ja lõpeta töö\n"
|
" -V, --version esita versiooniinfo ja lõpeta töö\n"
|
||||||
" -y, --yacc emuleeri POSIX yacc\n"
|
" -y, --yacc emuleeri POSIX yacc\n"
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -173,7 +174,7 @@ msgstr ""
|
|||||||
" -r, --raw sümbolite number alates 3\n"
|
" -r, --raw sümbolite number alates 3\n"
|
||||||
" -k, --token-table lisa ka sümbolite nimede tabel\n"
|
" -k, --token-table lisa ka sümbolite nimede tabel\n"
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -187,38 +188,39 @@ msgstr ""
|
|||||||
" -b, --file-prefix=PREFIKS kasuta väljundfailide nimedes PREFIKSit\n"
|
" -b, --file-prefix=PREFIKS kasuta väljundfailide nimedes PREFIKSit\n"
|
||||||
" -o, --output-file=FAIL jäta väljund FAILi\n"
|
" -o, --output-file=FAIL jäta väljund FAILi\n"
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr "Teatage palun vigadest aadressil <bug-bison@gnu.org>.\n"
|
msgstr "Teatage palun vigadest aadressil <bug-bison@gnu.org>.\n"
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: puudub grammatikafail\n"
|
msgstr "%s: puudub grammatikafail\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
|
msgstr "%s: ignoreerin lisaargumente peale `%s'\n"
|
||||||
@@ -688,10 +690,10 @@ msgstr "Stardis
|
|||||||
msgid ""
|
msgid ""
|
||||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"redutseeritud %s defineerib %d terminali%s, %d mitteterminali%s ja %d "
|
"redutseeritud %s defineerib %d terminali%s, %d mitteterminali%s ja %d reeglit"
|
||||||
"reeglit%s.\n"
|
"%s.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -859,8 +861,8 @@ msgstr ""
|
|||||||
#~ " [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
#~ " [--file-prefix=prefix] [--name-prefix=prefix]\n"
|
||||||
#~ " [--output=outfile] grammar-file\n"
|
#~ " [--output=outfile] grammar-file\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Kasuta: %s [-dhklntvyV] [-b faili-prefiks] [-o väljundfail] [-p "
|
#~ "Kasuta: %s [-dhklntvyV] [-b faili-prefiks] [-o väljundfail] [-p nime-"
|
||||||
#~ "nime-prefiks]\n"
|
#~ "prefiks]\n"
|
||||||
#~ " [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
#~ " [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||||
#~ " [--verbose] [--version] [--help] [--yacc]\n"
|
#~ " [--verbose] [--version] [--help] [--yacc]\n"
|
||||||
#~ " [--no-parser] [--token-table]\n"
|
#~ " [--no-parser] [--token-table]\n"
|
||||||
|
|||||||
42
po/fr.po
42
po/fr.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: bison 1.25\n"
|
"Project-Id-Version: bison 1.25\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
|
"PO-Revision-Date: 1996-03-19 20:05 EST\n"
|
||||||
"Last-Translator: Dominique Boucher <boucherd@IRO.UMontreal.CA>\n"
|
"Last-Translator: Dominique Boucher <boucherd@IRO.UMontreal.CA>\n"
|
||||||
"Language-Team: French <fr@li.org>\n"
|
"Language-Team: French <fr@li.org>\n"
|
||||||
@@ -125,22 +125,22 @@ msgstr "%s d
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -148,9 +148,10 @@ msgid ""
|
|||||||
" -y, --yacc emulate POSIX yacc\n"
|
" -y, --yacc emulate POSIX yacc\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -160,7 +161,7 @@ msgid ""
|
|||||||
" -k, --token-table include a table of token names\n"
|
" -k, --token-table include a table of token names\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -169,38 +170,39 @@ msgid ""
|
|||||||
" -o, --output-file=FILE leave output to FILE\n"
|
" -o, --output-file=FILE leave output to FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: grammaire manquante\n"
|
msgstr "%s: grammaire manquante\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: paramètres supplémentaires ignorés après «%s»\n"
|
msgstr "%s: paramètres supplémentaires ignorés après «%s»\n"
|
||||||
@@ -673,10 +675,10 @@ msgstr "Aucune phrase ne peut
|
|||||||
msgid ""
|
msgid ""
|
||||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"la réduction de %s définit %d terminal%s, %d catégorie%s et %d "
|
"la réduction de %s définit %d terminal%s, %d catégorie%s et %d production%"
|
||||||
"production%s.\n"
|
"s.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
@@ -854,8 +856,8 @@ msgstr ""
|
|||||||
#~ "\n"
|
#~ "\n"
|
||||||
#~ "Report bugs to bug-bison@gnu.org\n"
|
#~ "Report bugs to bug-bison@gnu.org\n"
|
||||||
#~ msgstr ""
|
#~ msgstr ""
|
||||||
#~ "Usage: %s [-dhklntvyV] [-b préfixe-de-fichier] [-o sortie] [-p "
|
#~ "Usage: %s [-dhklntvyV] [-b préfixe-de-fichier] [-o sortie] [-p préfixe-de-"
|
||||||
#~ "préfixe-de-nom]\n"
|
#~ "nom]\n"
|
||||||
#~ " [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
#~ " [--debug] [--defines] [--fixed-output-files] [--no-lines]\n"
|
||||||
#~ " [--verbose] [--version] [--help] [--yacc]\n"
|
#~ " [--verbose] [--version] [--help] [--yacc]\n"
|
||||||
#~ " [--no-parser] [--token-table]\n"
|
#~ " [--no-parser] [--token-table]\n"
|
||||||
|
|||||||
42
po/ja.po
42
po/ja.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: GNU bison 1.28\n"
|
"Project-Id-Version: GNU bison 1.28\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
|
"PO-Revision-Date: 1999-09-28 21:10+0900\n"
|
||||||
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
|
"Last-Translator: Daisuke Yamashita <yamad@mb.infoweb.ne.jp>\n"
|
||||||
"Language-Team: Japanese <ja@li.org>\n"
|
"Language-Team: Japanese <ja@li.org>\n"
|
||||||
@@ -124,22 +124,22 @@ msgstr "%s
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -147,9 +147,10 @@ msgid ""
|
|||||||
" -y, --yacc emulate POSIX yacc\n"
|
" -y, --yacc emulate POSIX yacc\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -159,7 +160,7 @@ msgid ""
|
|||||||
" -k, --token-table include a table of token names\n"
|
" -k, --token-table include a table of token names\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -168,38 +169,39 @@ msgid ""
|
|||||||
" -o, --output-file=FILE leave output to FILE\n"
|
" -o, --output-file=FILE leave output to FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: 文法ファイルが指定されていません\n"
|
msgstr "%s: 文法ファイルが指定されていません\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: '%s' より後ろの余分な引数は無視されました\n"
|
msgstr "%s: '%s' より後ろの余分な引数は無視されました\n"
|
||||||
@@ -550,8 +552,8 @@ msgstr "
|
|||||||
#, c-format
|
#, c-format
|
||||||
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
msgid "symbol %s is used, but is not defined as a token and has no rules"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"シンボル %s "
|
"シンボル %s が使われていますが、トークンとして定義されておらず、規則を持ちま"
|
||||||
"が使われていますが、トークンとして定義されておらず、規則を持ちません"
|
"せん"
|
||||||
|
|
||||||
#: src/reader.c:1659
|
#: src/reader.c:1659
|
||||||
#, c-format
|
#, c-format
|
||||||
@@ -671,10 +673,10 @@ msgstr "
|
|||||||
msgid ""
|
msgid ""
|
||||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"還元ファイル %s で %d 個の終端子%.0s, %d 個の非終端子%.0s, %d "
|
"還元ファイル %s で %d 個の終端子%.0s, %d 個の非終端子%.0s, %d 個の規則%.0sが"
|
||||||
"個の規則%.0sが定義されました\n"
|
"定義されました\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
38
po/nl.po
38
po/nl.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: bison 1.25\n"
|
"Project-Id-Version: bison 1.25\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
|
"PO-Revision-Date: 1996-08-27 15:34 MET DST\n"
|
||||||
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
|
"Last-Translator: Erick Branderhorst <branderh@debian.org>\n"
|
||||||
"Language-Team: Dutch <nl@li.org>\n"
|
"Language-Team: Dutch <nl@li.org>\n"
|
||||||
@@ -124,22 +124,22 @@ msgstr "%s afgeleiden"
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -147,9 +147,10 @@ msgid ""
|
|||||||
" -y, --yacc emulate POSIX yacc\n"
|
" -y, --yacc emulate POSIX yacc\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -159,7 +160,7 @@ msgid ""
|
|||||||
" -k, --token-table include a table of token names\n"
|
" -k, --token-table include a table of token names\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -168,38 +169,39 @@ msgid ""
|
|||||||
" -o, --output-file=FILE leave output to FILE\n"
|
" -o, --output-file=FILE leave output to FILE\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: geen grammatica bestand gegeven\n"
|
msgstr "%s: geen grammatica bestand gegeven\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, fuzzy, c-format
|
#, fuzzy, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: extra argumenten genegeerd na '%s'\n"
|
msgstr "%s: extra argumenten genegeerd na '%s'\n"
|
||||||
@@ -672,10 +674,10 @@ msgstr "Start symbool %s is niet afkomstig uit een zin"
|
|||||||
msgid ""
|
msgid ""
|
||||||
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
"reduced %s defines %d terminal%s, %d nonterminal%s, and %d production%s.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"gereduceerd %s gedefinieerd %d terminal%s, %d nietterminal%s, en %d "
|
"gereduceerd %s gedefinieerd %d terminal%s, %d nietterminal%s, en %d productie"
|
||||||
"productie%s.\n"
|
"%s.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
34
po/ru.po
34
po/ru.po
@@ -5,7 +5,7 @@
|
|||||||
msgid ""
|
msgid ""
|
||||||
msgstr ""
|
msgstr ""
|
||||||
"Project-Id-Version: bison 1.28a\n"
|
"Project-Id-Version: bison 1.28a\n"
|
||||||
"POT-Creation-Date: 2001-02-21 11:16+0100\n"
|
"POT-Creation-Date: 2001-03-16 16:02+0100\n"
|
||||||
"PO-Revision-Date: 2000-04-12 13:16+04:00\n"
|
"PO-Revision-Date: 2000-04-12 13:16+04:00\n"
|
||||||
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
|
"Last-Translator: Dmitry S. Sivachenko <dima@Chg.RU>\n"
|
||||||
"Language-Team: Russian <ru@li.org>\n"
|
"Language-Team: Russian <ru@li.org>\n"
|
||||||
@@ -125,16 +125,16 @@ msgstr "%s
|
|||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:71
|
#: src/getargs.c:80
|
||||||
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
msgid "GNU bison generates parsers for LALR(1) grammars.\n"
|
||||||
msgstr "GNU bison ÇÅÎÅÒÉÒÕÅÔ ÁÎÁÌÉÚÁÔÏÒÙ ÄÌÑ ÇÒÁÍÍÁÔÉË LALR(1).\n"
|
msgstr "GNU bison ÇÅÎÅÒÉÒÕÅÔ ÁÎÁÌÉÚÁÔÏÒÙ ÄÌÑ ÇÒÁÍÍÁÔÉË LALR(1).\n"
|
||||||
|
|
||||||
#: src/getargs.c:75
|
#: src/getargs.c:84
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Usage: %s [OPTION]... FILE\n"
|
msgid "Usage: %s [OPTION]... FILE\n"
|
||||||
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ëìàþé]... æáêì\n"
|
msgstr "éÓÐÏÌØÚÏ×ÁÎÉÅ: %s [ëìàþé]... æáêì\n"
|
||||||
|
|
||||||
#: src/getargs.c:79
|
#: src/getargs.c:88
|
||||||
msgid ""
|
msgid ""
|
||||||
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
"If a long option shows an argument as mandatory, then it is mandatory\n"
|
||||||
"for the equivalent short option also. Similarly for optional arguments.\n"
|
"for the equivalent short option also. Similarly for optional arguments.\n"
|
||||||
@@ -143,7 +143,7 @@ msgstr ""
|
|||||||
"Ñ×ÌÑÅÔÓÑ ÏÂÑÚÁÔÅÌØÎÙÍ ÄÌÑ ËÏÒÏÔËÏÊ ÆÏÒÍÙ. ôÏ ÖÅ ËÁÓÁÅÔÓÑ ÎÅÏÂÑÚÁÔÅÌØÎÙÈ\n"
|
"Ñ×ÌÑÅÔÓÑ ÏÂÑÚÁÔÅÌØÎÙÍ ÄÌÑ ËÏÒÏÔËÏÊ ÆÏÒÍÙ. ôÏ ÖÅ ËÁÓÁÅÔÓÑ ÎÅÏÂÑÚÁÔÅÌØÎÙÈ\n"
|
||||||
"ÁÒÇÕÍÅÎÔÏ×.\n"
|
"ÁÒÇÕÍÅÎÔÏ×.\n"
|
||||||
|
|
||||||
#: src/getargs.c:85
|
#: src/getargs.c:94
|
||||||
msgid ""
|
msgid ""
|
||||||
"Operation modes:\n"
|
"Operation modes:\n"
|
||||||
" -h, --help display this help and exit\n"
|
" -h, --help display this help and exit\n"
|
||||||
@@ -155,10 +155,11 @@ msgstr ""
|
|||||||
" -V, --version ×Ù×ÅÓÔÉ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ É ×ÙÊÔÉ\n"
|
" -V, --version ×Ù×ÅÓÔÉ ÉÎÆÏÒÍÁÃÉÀ Ï ×ÅÒÓÉÉ É ×ÙÊÔÉ\n"
|
||||||
" -y, --yacc ÜÍÕÌÉÒÏ×ÁÔØ POSIX yacc\n"
|
" -y, --yacc ÜÍÕÌÉÒÏ×ÁÔØ POSIX yacc\n"
|
||||||
|
|
||||||
#: src/getargs.c:92
|
#: src/getargs.c:101
|
||||||
#, fuzzy
|
#, fuzzy
|
||||||
msgid ""
|
msgid ""
|
||||||
"Parser:\n"
|
"Parser:\n"
|
||||||
|
" -S, --skeleton=FILE specify the skeleton to use\n"
|
||||||
" -t, --debug instrument the parser for debugging\n"
|
" -t, --debug instrument the parser for debugging\n"
|
||||||
" --locations enable locations computation\n"
|
" --locations enable locations computation\n"
|
||||||
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
" -p, --name-prefix=PREFIX prepend PREFIX to the external symbols\n"
|
||||||
@@ -175,7 +176,7 @@ msgstr ""
|
|||||||
" -r, --raw ÎÕÍÅÒÏ×ÁÔØ ÌÅËÓÅÍÙ, ÎÁÞÉÎÁÑ Ó 3\n"
|
" -r, --raw ÎÕÍÅÒÏ×ÁÔØ ÌÅËÓÅÍÙ, ÎÁÞÉÎÁÑ Ó 3\n"
|
||||||
" -k, --token-table ×ËÌÀÞÉÔØ ÔÁÂÌÉÃÕ ÉÍÅÎ ÌÅËÓÅÍ\n"
|
" -k, --token-table ×ËÌÀÞÉÔØ ÔÁÂÌÉÃÕ ÉÍÅÎ ÌÅËÓÅÍ\n"
|
||||||
|
|
||||||
#: src/getargs.c:104
|
#: src/getargs.c:114
|
||||||
msgid ""
|
msgid ""
|
||||||
"Output:\n"
|
"Output:\n"
|
||||||
" -d, --defines also produce a header file\n"
|
" -d, --defines also produce a header file\n"
|
||||||
@@ -189,38 +190,39 @@ msgstr ""
|
|||||||
" -b, --file-prefix=ðòåæéëó ÕËÁÚÁÔØ ðòåæéëó ÄÌÑ ×ÙÈÏÄÎÙÈ ÆÁÊÌÏ×\n"
|
" -b, --file-prefix=ðòåæéëó ÕËÁÚÁÔØ ðòåæéëó ÄÌÑ ×ÙÈÏÄÎÙÈ ÆÁÊÌÏ×\n"
|
||||||
" -o, --output-file=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
|
" -o, --output-file=æáêì ÐÏÍÅÓÔÉÔØ ÒÅÚÕÌØÔÁÔ × æáêì\n"
|
||||||
|
|
||||||
#: src/getargs.c:112
|
#: src/getargs.c:122
|
||||||
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
msgid "Report bugs to <bug-bison@gnu.org>.\n"
|
||||||
msgstr "ïÛÉÂËÉ ÓÏÏÂÝÁÊÔÅ ÐÏ ÁÄÒÅÓÕ <bug-bison@gnu.org>.\n"
|
msgstr "ïÛÉÂËÉ ÓÏÏÂÝÁÊÔÅ ÐÏ ÁÄÒÅÓÕ <bug-bison@gnu.org>.\n"
|
||||||
|
|
||||||
#. Some efforts were made to ease the translators' task, please
|
#. Some efforts were made to ease the translators' task, please
|
||||||
#. continue.
|
#. continue.
|
||||||
#: src/getargs.c:126
|
#: src/getargs.c:136
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "bison (GNU Bison) %s"
|
msgid "bison (GNU Bison) %s"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:131
|
#: src/getargs.c:141
|
||||||
msgid "Copyright 1984, 1986, 1989, 1992, 2000 Free Software Foundation, Inc.\n"
|
msgid ""
|
||||||
|
"Copyright 1984, 1986, 1989, 1992, 2000, 2001 Free Software Foundation, Inc.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:135
|
#: src/getargs.c:145
|
||||||
msgid ""
|
msgid ""
|
||||||
"This is free software; see the source for copying conditions. There is NO\n"
|
"This is free software; see the source for copying conditions. There is NO\n"
|
||||||
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
"warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:214
|
#: src/getargs.c:226
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "Try `%s --help' for more information.\n"
|
msgid "Try `%s --help' for more information.\n"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
#: src/getargs.c:222
|
#: src/getargs.c:233
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: no grammar file given\n"
|
msgid "%s: no grammar file given\n"
|
||||||
msgstr "%s: ÎÅ ÚÁÄÁÎ ÆÁÊÌ Ó ÇÒÁÍÍÁÔÉËÏÊ\n"
|
msgstr "%s: ÎÅ ÚÁÄÁÎ ÆÁÊÌ Ó ÇÒÁÍÍÁÔÉËÏÊ\n"
|
||||||
|
|
||||||
#: src/getargs.c:226
|
#: src/getargs.c:237
|
||||||
#, c-format
|
#, c-format
|
||||||
msgid "%s: extra arguments ignored after `%s'\n"
|
msgid "%s: extra arguments ignored after `%s'\n"
|
||||||
msgstr "%s: ÌÉÛÎÉÅ ÁÒÇÕÍÅÎÔÙ ÐÏÓÌÅ `%s' ÉÇÎÏÒÉÒÏ×ÁÎÙ\n"
|
msgstr "%s: ÌÉÛÎÉÅ ÁÒÇÕÍÅÎÔÙ ÐÏÓÌÅ `%s' ÉÇÎÏÒÉÒÏ×ÁÎÙ\n"
|
||||||
@@ -692,7 +694,7 @@ msgstr ""
|
|||||||
"×Ù×ÅÄÅÎÎÙÊ %s ÏÐÒÅÄÅÌÑÅÔ %d ÔÅÒÍÉÎÁÌÏ×%s, %d ÎÅÔÅÒÍÉÎÁÌÏ×%s, É %d ÐÒÁ×ÉÌ "
|
"×Ù×ÅÄÅÎÎÙÊ %s ÏÐÒÅÄÅÌÑÅÔ %d ÔÅÒÍÉÎÁÌÏ×%s, %d ÎÅÔÅÒÍÉÎÁÌÏ×%s, É %d ÐÒÁ×ÉÌ "
|
||||||
"×Ù×ÏÄÁ%s.\n"
|
"×Ù×ÏÄÁ%s.\n"
|
||||||
|
|
||||||
#: lib/error.c:102
|
#: lib/error.c:117
|
||||||
msgid "Unknown system error"
|
msgid "Unknown system error"
|
||||||
msgstr ""
|
msgstr ""
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -57,7 +57,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -67,15 +70,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -90,7 +93,6 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
|
AUTOMAKE_OPTIONS = 1.4 ../lib/ansi2knr
|
||||||
DEFS = @DEFS@ -DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" -DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" -DLOCALEDIR=\"$(datadir)/locale\"
|
DEFS = @DEFS@ -DBISON_SIMPLE=\"$(pkgdatadir)/bison.simple\" -DBISON_HAIRY=\"$(pkgdatadir)/bison.hairy\" -DLOCALEDIR=\"$(datadir)/locale\"
|
||||||
@@ -112,7 +114,7 @@ noinst_HEADERS = LR0.h closure.h complain.h conflicts.h derives.h files.h geta
|
|||||||
pkgdata_DATA = bison.simple bison.hairy
|
pkgdata_DATA = bison.simple bison.hairy
|
||||||
|
|
||||||
EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar
|
EXTRA_DIST = $(pkgdata_DATA) build.com bison.cld vmshlp.mar
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = ../config.h
|
CONFIG_HEADER = ../config.h
|
||||||
CONFIG_CLEAN_FILES =
|
CONFIG_CLEAN_FILES =
|
||||||
PROGRAMS = $(bin_PROGRAMS)
|
PROGRAMS = $(bin_PROGRAMS)
|
||||||
@@ -223,6 +225,8 @@ bison: $(bison_OBJECTS) $(bison_DEPENDENCIES)
|
|||||||
$(LINK) $(bison_LDFLAGS) $(bison_OBJECTS) $(bison_LDADD) $(LIBS)
|
$(LINK) $(bison_LDFLAGS) $(bison_OBJECTS) $(bison_LDADD) $(LIBS)
|
||||||
LR0_.c: LR0.c $(ANSI2KNR)
|
LR0_.c: LR0.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/LR0.c; then echo $(srcdir)/LR0.c; else echo LR0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > LR0_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/LR0.c; then echo $(srcdir)/LR0.c; else echo LR0.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > LR0_.c
|
||||||
|
alloca_.c: alloca.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/alloca.c; then echo $(srcdir)/alloca.c; else echo alloca.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > alloca_.c
|
||||||
closure_.c: closure.c $(ANSI2KNR)
|
closure_.c: closure.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closure.c; then echo $(srcdir)/closure.c; else echo closure.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closure_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/closure.c; then echo $(srcdir)/closure.c; else echo closure.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > closure_.c
|
||||||
complain_.c: complain.c $(ANSI2KNR)
|
complain_.c: complain.c $(ANSI2KNR)
|
||||||
@@ -243,6 +247,8 @@ lex_.c: lex.c $(ANSI2KNR)
|
|||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lex.c; then echo $(srcdir)/lex.c; else echo lex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lex_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/lex.c; then echo $(srcdir)/lex.c; else echo lex.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > lex_.c
|
||||||
main_.c: main.c $(ANSI2KNR)
|
main_.c: main.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/main.c; then echo $(srcdir)/main.c; else echo main.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > main_.c
|
||||||
|
memchr_.c: memchr.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/memchr.c; then echo $(srcdir)/memchr.c; else echo memchr.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > memchr_.c
|
||||||
nullable_.c: nullable.c $(ANSI2KNR)
|
nullable_.c: nullable.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nullable.c; then echo $(srcdir)/nullable.c; else echo nullable.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nullable_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/nullable.c; then echo $(srcdir)/nullable.c; else echo nullable.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > nullable_.c
|
||||||
output_.c: output.c $(ANSI2KNR)
|
output_.c: output.c $(ANSI2KNR)
|
||||||
@@ -253,16 +259,22 @@ reader_.c: reader.c $(ANSI2KNR)
|
|||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reader.c; then echo $(srcdir)/reader.c; else echo reader.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reader_.c
|
||||||
reduce_.c: reduce.c $(ANSI2KNR)
|
reduce_.c: reduce.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/reduce.c; then echo $(srcdir)/reduce.c; else echo reduce.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > reduce_.c
|
||||||
|
stpcpy_.c: stpcpy.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/stpcpy.c; then echo $(srcdir)/stpcpy.c; else echo stpcpy.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > stpcpy_.c
|
||||||
|
strndup_.c: strndup.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strndup.c; then echo $(srcdir)/strndup.c; else echo strndup.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strndup_.c
|
||||||
|
strnlen_.c: strnlen.c $(ANSI2KNR)
|
||||||
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/strnlen.c; then echo $(srcdir)/strnlen.c; else echo strnlen.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > strnlen_.c
|
||||||
symtab_.c: symtab.c $(ANSI2KNR)
|
symtab_.c: symtab.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/symtab.c; then echo $(srcdir)/symtab.c; else echo symtab.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > symtab_.c
|
||||||
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
|
vmsgetargs_.c: vmsgetargs.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vmsgetargs.c; then echo $(srcdir)/vmsgetargs.c; else echo vmsgetargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vmsgetargs_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/vmsgetargs.c; then echo $(srcdir)/vmsgetargs.c; else echo vmsgetargs.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > vmsgetargs_.c
|
||||||
warshall_.c: warshall.c $(ANSI2KNR)
|
warshall_.c: warshall.c $(ANSI2KNR)
|
||||||
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/warshall.c; then echo $(srcdir)/warshall.c; else echo warshall.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > warshall_.c
|
$(CPP) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) `if test -f $(srcdir)/warshall.c; then echo $(srcdir)/warshall.c; else echo warshall.c; fi` | sed 's/^# \([0-9]\)/#line \1/' | $(ANSI2KNR) > warshall_.c
|
||||||
LR0_.o closure_.o complain_.o conflicts_.o derives_.o files_.o \
|
LR0_.o alloca_.o closure_.o complain_.o conflicts_.o derives_.o \
|
||||||
getargs_.o gram_.o lalr_.o lex_.o main_.o nullable_.o output_.o \
|
files_.o getargs_.o gram_.o lalr_.o lex_.o main_.o memchr_.o \
|
||||||
print_.o reader_.o reduce_.o symtab_.o vmsgetargs_.o warshall_.o : \
|
nullable_.o output_.o print_.o reader_.o reduce_.o stpcpy_.o strndup_.o \
|
||||||
$(ANSI2KNR)
|
strnlen_.o symtab_.o vmsgetargs_.o warshall_.o : $(ANSI2KNR)
|
||||||
|
|
||||||
install-pkgdataDATA: $(pkgdata_DATA)
|
install-pkgdataDATA: $(pkgdata_DATA)
|
||||||
@$(NORMAL_INSTALL)
|
@$(NORMAL_INSTALL)
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# Makefile.in generated automatically by automake 1.4 from Makefile.am
|
# Makefile.in generated automatically by automake 1.4-p4 from Makefile.am
|
||||||
|
|
||||||
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
# Copyright (C) 1994, 1995-8, 1999 Free Software Foundation, Inc.
|
||||||
# This Makefile.in is free software; the Free Software Foundation
|
# This Makefile.in is free software; the Free Software Foundation
|
||||||
@@ -59,7 +59,10 @@ POST_INSTALL = :
|
|||||||
NORMAL_UNINSTALL = :
|
NORMAL_UNINSTALL = :
|
||||||
PRE_UNINSTALL = :
|
PRE_UNINSTALL = :
|
||||||
POST_UNINSTALL = :
|
POST_UNINSTALL = :
|
||||||
|
host_alias = @host_alias@
|
||||||
|
host_triplet = @host@
|
||||||
AT_TESTPATH = @AT_TESTPATH@
|
AT_TESTPATH = @AT_TESTPATH@
|
||||||
|
BUILD_INCLUDED_LIBINTL = @BUILD_INCLUDED_LIBINTL@
|
||||||
CATALOGS = @CATALOGS@
|
CATALOGS = @CATALOGS@
|
||||||
CATOBJEXT = @CATOBJEXT@
|
CATOBJEXT = @CATOBJEXT@
|
||||||
CC = @CC@
|
CC = @CC@
|
||||||
@@ -69,15 +72,15 @@ ECHO_C = @ECHO_C@
|
|||||||
ECHO_N = @ECHO_N@
|
ECHO_N = @ECHO_N@
|
||||||
ECHO_T = @ECHO_T@
|
ECHO_T = @ECHO_T@
|
||||||
GENCAT = @GENCAT@
|
GENCAT = @GENCAT@
|
||||||
|
GLIBC21 = @GLIBC21@
|
||||||
GMOFILES = @GMOFILES@
|
GMOFILES = @GMOFILES@
|
||||||
GMSGFMT = @GMSGFMT@
|
GMSGFMT = @GMSGFMT@
|
||||||
GT_NO = @GT_NO@
|
|
||||||
GT_YES = @GT_YES@
|
|
||||||
INCLUDE_LOCALE_H = @INCLUDE_LOCALE_H@
|
|
||||||
INSTOBJEXT = @INSTOBJEXT@
|
INSTOBJEXT = @INSTOBJEXT@
|
||||||
INTLDEPS = @INTLDEPS@
|
INTLBISON = @INTLBISON@
|
||||||
INTLLIBS = @INTLLIBS@
|
INTLLIBS = @INTLLIBS@
|
||||||
INTLOBJS = @INTLOBJS@
|
INTLOBJS = @INTLOBJS@
|
||||||
|
INTL_LIBTOOL_SUFFIX_PREFIX = @INTL_LIBTOOL_SUFFIX_PREFIX@
|
||||||
|
LIBICONV = @LIBICONV@
|
||||||
LIBOBJS = @LIBOBJS@
|
LIBOBJS = @LIBOBJS@
|
||||||
M4 = @M4@
|
M4 = @M4@
|
||||||
MAKEINFO = @MAKEINFO@
|
MAKEINFO = @MAKEINFO@
|
||||||
@@ -92,7 +95,6 @@ USE_INCLUDED_LIBINTL = @USE_INCLUDED_LIBINTL@
|
|||||||
USE_NLS = @USE_NLS@
|
USE_NLS = @USE_NLS@
|
||||||
VERSION = @VERSION@
|
VERSION = @VERSION@
|
||||||
WARNING_CFLAGS = @WARNING_CFLAGS@
|
WARNING_CFLAGS = @WARNING_CFLAGS@
|
||||||
l = @l@
|
|
||||||
|
|
||||||
noinst_SCRIPTS = testsuite
|
noinst_SCRIPTS = testsuite
|
||||||
|
|
||||||
@@ -103,7 +105,7 @@ EXTRA_DIST = atgeneral.m4 suite.at $(SUITE)
|
|||||||
CLEANFILES = debug-*.sh
|
CLEANFILES = debug-*.sh
|
||||||
DISTCLEANFILES = atconfig
|
DISTCLEANFILES = atconfig
|
||||||
MAINTAINERCLEANFILES = testsuite
|
MAINTAINERCLEANFILES = testsuite
|
||||||
mkinstalldirs = $(SHELL) $(top_srcdir)/mkinstalldirs
|
mkinstalldirs = $(SHELL) $(top_srcdir)/config/mkinstalldirs
|
||||||
CONFIG_HEADER = ../config.h
|
CONFIG_HEADER = ../config.h
|
||||||
CONFIG_CLEAN_FILES = atconfig
|
CONFIG_CLEAN_FILES = atconfig
|
||||||
SCRIPTS = $(noinst_SCRIPTS)
|
SCRIPTS = $(noinst_SCRIPTS)
|
||||||
|
|||||||
Reference in New Issue
Block a user