1999-11-20 Ulrich Drepper <drepper@cygnus.com>
+ * locale/programs/ld-monetary.c (monetary_finish): Don't print
+ individual error message if nothing is defined.
+
* locale/programs/ld-time.c (time_startup): Test for lr being
nonzero, not time.
{
if (strlen (monetary->int_curr_symbol) != 4)
{
- if (!be_quiet)
+ if (! be_quiet && ! nothing)
error (0, 0, _("\
%s: value of field `int_curr_symbol' has wrong length"),
"LC_MONETARY");
if (monetary->cat == -2 && ! be_quiet && ! nothing) \
error (0, 0, _("%s: field `%s' not defined"), \
"LC_MONETARY", #cat); \
- else if ((monetary->cat < min || monetary->cat > max) && !be_quiet) \
+ else if ((monetary->cat < min || monetary->cat > max) && !be_quiet \
+ && !nothing) \
error (0, 0, _("\
%s: value for field `%s' must be in range %d...%d"), \
"LC_MONETARY", #cat, min, max)
!= "". */
if (numeric->decimal_point == NULL)
{
- error (0, 0, _("%s: field `%s' not defined"),
- "LC_NUMERIC", "decimal_point");
+ if (! be_quiet && ! nothing)
+ error (0, 0, _("%s: field `%s' not defined"),
+ "LC_NUMERIC", "decimal_point");
numeric->decimal_point = ".";
}
else if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing)
1999-11-20 Ulrich Drepper <drepper@cygnus.com>
+ * tst-trans.c: New file.
+ * tst-trans.sh: New file.
+ * tests/trans.def: New file.
+ * Makefile: Add rules for character mapping tests.
+
* tests/test1.def: Correct ellipsis syntax.
1999-11-17 Ulrich Drepper <drepper@cygnus.com>
repertoiremaps := $(filter-out $(addprefix repertoiremaps/, CVS RCS SCCS %~), \
$(wildcard repertoiremaps/*))
-test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch
+test-srcs := collate-test xfrm-test tst-fmon tst-rpmatch tst-trans
test-input := de_DE.ISO-8859-1 da_DK.ISO-8859-1 fr_CA,2.13.ISO-8859-1 \
hr_HR.ISO-8859-2 # once it is fixed: cs_CZ.ISO-8859-2
test-input-data = $(addsuffix .in, $(basename $(test-input)))
$(addsuffix .def,$(ld-test-names)))
generated := $(test-input) $(test-output)
-generated-dirs := $(basename $(test-input)) en_US $(ld-test-names)
+generated-dirs := $(basename $(test-input)) en_US $(ld-test-names) tt_TT
distribute := CHECKSUMS README SUPPORTED ChangeLog \
$(charmaps) $(locales) $(repertoiremaps) \
ifeq (no,$(cross-compiling))
ifeq (yes,$(build-shared))
-.PHONY: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch
-#tests: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch
+.PHONY: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch do-tst-trans
+tests: do-collate-test do-tst-fmon do-tst-locale do-tst-rpmatch do-tst-trans
do-collate-test: sort-test.sh $(objpfx)collate-test $(objpfx)xfrm-test \
$(test-input-data)
$(SHELL) -e $< $(common-objpfx) $(test-input)
$(SHELL) -e $< $(common-objpfx)
do-tst-rpmatch: tst-rpmatch.sh $(objpfx)tst-rpmatch do-tst-fmon
$(SHELL) -e $< $(common-objpfx)
+do-tst-trans: tst-trans.sh $(objpfx)tst-trans
+ $(SHELL) -e $< $(common-objpfx)
endif
endif
--- /dev/null
+escape_char /
+comment_char %
+repertoiremap mnemonic.ds
+
+LC_CTYPE
+
+digit <0>;<1>;<2>;<3>;<4>;/
+ <5>;<6>;<7>;<8>;<9>
+
+xdigit <0>;<1>;<2>;<3>;<4>;/
+ <5>;<6>;<7>;<8>;<9>;/
+ <A>;<B>;<C>;<D>;<E>;<F>;/
+ <a>;<b>;<c>;<d>;<e>;<f>
+
+blank <SP>;<HT>;<NS>
+
+space <SP>;<LF>;<VT>;<FF>;/
+ <CR>;<HT>;<NS>
+
+upper <A>;<B>;<C>;<D>;<E>;<F>;<G>;/
+ <H>;<I>;<J>;<K>;<L>;<M>;<N>;/
+ <O>;<P>;<Q>;<R>;<S>;<T>;<U>;/
+ <V>;<W>;<X>;<Y>;<Z>
+
+lower <a>;<b>;<c>;<d>;<e>;<f>;<g>;/
+ <h>;<i>;<j>;<k>;<l>;<m>;<n>;/
+ <o>;<p>;<q>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
+ (<S>,<s>);/
+ (<T>,<t>);/
+ (<U>,<u>);/
+ (<V>,<v>);/
+ (<W>,<w>);/
+ (<X>,<x>);/
+ (<Y>,<y>);/
+ (<Z>,<z>)
+
+toupper (<a>,<A>);/
+ (<b>,<B>);/
+ (<c>,<C>);/
+ (<d>,<D>);/
+ (<e>,<E>);/
+ (<f>,<F>);/
+ (<g>,<G>);/
+ (<h>,<H>);/
+ (<i>,<I>);/
+ (<j>,<J>);/
+ (<k>,<K>);/
+ (<l>,<L>);/
+ (<m>,<M>);/
+ (<n>,<N>);/
+ (<o>,<O>);/
+ (<p>,<P>);/
+ (<q>,<Q>);/
+ (<r>,<R>);/
+ (<s>,<S>);/
+ (<t>,<T>);/
+ (<u>,<U>);/
+ (<v>,<V>);/
+ (<w>,<W>);/
+ (<x>,<X>);/
+ (<y>,<Y>);/
+ (<z>,<Z>)
+
+charconv test
+
+test (<A>,<B>);(<B>,<C>)
+END LC_CTYPE
+
+LC_COLLATE
+copy "en_DK"
+END LC_COLLATE
+
+LC_TIME
+copy "en_DK"
+END LC_TIME
+
+LC_NUMERIC
+copy "en_DK"
+END LC_NUMERIC
+
+LC_MONETARY
+copy "en_DK"
+END LC_MONETARY
+
+LC_MESSAGES
+copy "en_DK"
+END LC_MESSAGES
+
+LC_PAPER
+height 297
+width 210
+END LC_PAPER
+
+LC_NAME
+name_fmt "<%><p><%><t><%><g><%><t><%><m><%><t><%><f>"
+END LC_NAME
+
+LC_ADDRESS
+postal_fmt "<%><a><%><N><%><f><%><N><%><d><%><N><%><b><%><N><%>/
+<%><s><SP><%><h><SP><%><e><SP><%><r><%><N>/
+<%><C><-><%><z><SP><%><T><%><N><%><c><%><N>"
+END LC_ADDRESS
+
+LC_TELEPHONE
+tel_int_fmt "<+><%><c><SP><%><a><SP><%><l>"
+END LC_TELEPHONE
+
+LC_MEASUREMENT
+measurement 1
+END LC_MEASUREMENT
+
+LC_IDENTIFICATION
+END LC_IDENTIFICATION
--- /dev/null
+/* Test program for user-defined character maps.
+ Copyright (C) 1999 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Ulrich Drepper <drepper@cygnus.com>.
+
+ The GNU C Library 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 of the
+ License, or (at your option) any later version.
+
+ The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If not,
+ write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
+ Boston, MA 02111-1307, USA. */
+
+#include <locale.h>
+#include <stdio.h>
+#include <wctype.h>
+
+int
+main (void)
+{
+ wctrans_t t;
+ wint_t wch;
+ int errors = 0;
+
+ setlocale (LC_ALL, "");
+
+ t = wctrans ("test");
+ if (t == (wctrans_t) 0)
+ exit (1);
+
+ wch = towctrans (L'A', t);
+ printf ("towctrans (L'A', t) = %c\n", wch);
+ if (wch != L'B')
+ errors = 1;
+
+ wch = towctrans (L'B', t);
+ printf ("towctrans (L'B', t) = %c\n", wch);
+ if (wch != L'C')
+ errors = 1;
+
+ return errors;
+}
--- /dev/null
+#! /bin/sh
+# Test character mapping definitions.
+# Copyright (C) 1999 Free Software Foundation, Inc.
+# This file is part of the GNU C Library.
+#
+# The GNU C Library 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 of the
+# License, or (at your option) any later version.
+#
+# The GNU C Library 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 the GNU C Library; see the file COPYING.LIB. If
+# not, write to the Free Software Foundation, Inc.,
+# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+common_objpfx=$1
+
+# Generate the necessary locale data.
+I18NPATH=. \
+${common_objpfx}elf/ld-linux --library-path $common_objpfx \
+${common_objpfx}locale/localedef --quiet \
+-i tests/trans.def -f ISO-8859-1 -u mnemonic.ds \
+${common_objpfx}localedata/tt_TT ||
+exit 1
+
+# Run the test program.
+LOCPATH=${common_objpfx}localedata LC_ALL=tt_TT \
+${common_objpfx}elf/ld-linux --library-path $common_objpfx \
+${common_objpfx}localedata/tst-trans
+
+exit $?