aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-11-18 23:56:36 +0000
committerUlrich Drepper <drepper@redhat.com>1999-11-18 23:56:36 +0000
commit450f46015df3bfb75bccb6144b20e48da128dcab (patch)
tree81a0f53362839a3da1b9a4b8aabba441bbd68874
parent2be86203eaf3a618214523be1003b12fa364776a (diff)
downloadglibc-450f46015df3bfb75bccb6144b20e48da128dcab.tar
glibc-450f46015df3bfb75bccb6144b20e48da128dcab.tar.gz
glibc-450f46015df3bfb75bccb6144b20e48da128dcab.tar.bz2
glibc-450f46015df3bfb75bccb6144b20e48da128dcab.zip
Update.
* locale/programs/ld-ctype.c: Punt if character class definitions to not consists of tok_bsymbol (for now).
-rw-r--r--ChangeLog3
-rw-r--r--locale/programs/ld-ctype.c5
-rw-r--r--time/strptime.c12
3 files changed, 17 insertions, 3 deletions
diff --git a/ChangeLog b/ChangeLog
index 57fd977fa3..b7b9d56913 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
1999-11-18 Ulrich Drepper <drepper@cygnus.com>
+ * locale/programs/ld-ctype.c: Punt if character class definitions
+ to not consists of tok_bsymbol (for now).
+
* time/strptime.c (day_of_the_week): Make sure result is never
negative.
(strptime_internal): Allow %C without %y.
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index 90a4492118..c545ba4164 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1835,6 +1835,11 @@ unknown character class `%s' in category `LC_CTYPE'"),
uint32_t wch;
struct charseq *seq;
+ if (now->tok != tok_bsymbol)
+ /* XXX Cannot be handled yet. We will have support
+ for tok_ucs4 soon. */
+ goto err_label;
+
if (ellipsis_token == tok_none)
{
if (get_character (now, charmap, repertoire, &seq, &wch))
diff --git a/time/strptime.c b/time/strptime.c
index 5f8271e250..9499e0f684 100644
--- a/time/strptime.c
+++ b/time/strptime.c
@@ -235,7 +235,7 @@ day_of_the_week (struct tm *tm)
+ (((corr_year / 4) / 25) / 4)
+ __mon_yday[0][tm->tm_mon]
+ tm->tm_mday - 1);
- tm->tm_wday = wday % 7;
+ tm->tm_wday = ((wday % 7) + 7) % 7;
}
/* Compute the day of the year. */
@@ -830,8 +830,14 @@ strptime_internal (buf, format, tm, decided)
if (have_I && is_pm)
tm->tm_hour += 12;
- if (want_century && century != -1)
- tm->tm_year = tm->tm_year % 100 + (century - 19) * 100;
+ if (century != -1)
+ {
+ if (want_century)
+ tm->tm_year = tm->tm_year % 100 + (century - 19) * 100;
+ else
+ /* Only the century, but not the year. Strange, but so be it. */
+ tm->tm_year = (century - 19) * 100;
+ }
if (want_xday && !have_wday) {
if ( !(have_mon && have_mday) && have_yday) {