From 1ceb8afe3d8c3c9b1ca7a6f0d13ee762667f397d Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sun, 21 Nov 1999 06:02:35 +0000 Subject: Update. * locale/programs/ld-time.c (time_startup): Test for lr being nonzero, not time. * locale/programs/ld-numeric.c (numeric_finish): Don't crash if decimal_point is not defined. --- ChangeLog | 6 ++++++ locale/programs/ld-numeric.c | 8 +++++++- locale/programs/ld-time.c | 2 +- localedata/ChangeLog | 4 ++++ localedata/tests/test1.def | 2 +- 5 files changed, 19 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 48a033e52e..72f2a16cea 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 1999-11-20 Ulrich Drepper + * locale/programs/ld-time.c (time_startup): Test for lr being + nonzero, not time. + + * locale/programs/ld-numeric.c (numeric_finish): Don't crash if + decimal_point is not defined. + * wctype/wctrans.c (wctrans): Use correct base index to access extra mapping tables. diff --git a/locale/programs/ld-numeric.c b/locale/programs/ld-numeric.c index 697ad35bb9..3bf198aba5 100644 --- a/locale/programs/ld-numeric.c +++ b/locale/programs/ld-numeric.c @@ -114,7 +114,13 @@ numeric_finish (struct localedef_t *locale, struct charmap_t *charmap) /* The decimal point must not be empty. This is not said explicitly in POSIX but ANSI C (ISO/IEC 9899) says in 4.4.2.1 it has to be != "". */ - if (numeric->decimal_point[0] == '\0' && ! be_quiet && ! nothing) + if (numeric->decimal_point == NULL) + { + 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) { error (0, 0, _("\ %s: value for field `%s' must not be the empty string"), diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index 9ec58f6487..b2c06cca7c 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -115,7 +115,7 @@ time_startup (struct linereader *lr, struct localedef_t *locale, locale->categories[LC_TIME].time = (struct locale_time_t *) xcalloc (1, sizeof (struct locale_time_t)); - if (time != NULL) + if (lr != NULL) { lr->translate_strings = 1; lr->return_widestr = 1; diff --git a/localedata/ChangeLog b/localedata/ChangeLog index 811d9d19f4..ec2a562a16 100644 --- a/localedata/ChangeLog +++ b/localedata/ChangeLog @@ -1,3 +1,7 @@ +1999-11-20 Ulrich Drepper + + * tests/test1.def: Correct ellipsis syntax. + 1999-11-17 Ulrich Drepper * charmaps/ISO-8859-1: Don't define values for non-printable diff --git a/localedata/tests/test1.def b/localedata/tests/test1.def index 56dea5c4bb..53a7bbcd9d 100644 --- a/localedata/tests/test1.def +++ b/localedata/tests/test1.def @@ -4,6 +4,6 @@ upper lower space blank -alpha ;;;...; +alpha ;;.. END LC_CTYPE -- cgit v1.2.3