From f76d7052fa11a71939f658af7ac69bb8d0c732df Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Mon, 26 Apr 1999 14:02:38 +0000 Subject: Update. 1999-04-03 Andreas Jaeger * manual/install.texi (Configuring and compiling): Explain that files are changed in the source directory. Closes PR libc/981. (Configuring and compiling): Explain situation with PARALLELMFLAGS in the source directory. 1999-04-24 Andreas Schwab * locale/programs/ld-ctype.c: Spelling fixes. (ctype_finish): Fix argument of error message format. * locale/programs/ld-messages.c: Spelling fixes. * locale/programs/ld-monetary.c: Spelling fixes. * locale/programs/ld-time.c (time_finish): Make sure that name and format of era_entries are adjacent. (time_output): Reduce the size of the io vector. 1999-04-25 Andreas Schwab * manual/filesys.texi (Attribute Meanings): Move a misplaced paragraph. 1999-04-23 Andreas Schwab * locale/programs/ld-collate.c (collate_output): Convert undefined_offset to an array index. Fix computation of other endian extra table. --- locale/programs/ld-time.c | 48 +++++++++++++++-------------------------------- 1 file changed, 15 insertions(+), 33 deletions(-) (limited to 'locale/programs/ld-time.c') diff --git a/locale/programs/ld-time.c b/locale/programs/ld-time.c index 399f7a77ab..bee0b0ea64 100644 --- a/locale/programs/ld-time.c +++ b/locale/programs/ld-time.c @@ -1,4 +1,4 @@ -/* Copyright (C) 1995, 1996, 1997, 1998 Free Software Foundation, Inc. +/* Copyright (C) 1995, 1996, 1997, 1998, 1999 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Ulrich Drepper , 1995. @@ -357,8 +357,11 @@ time_finish (struct localedef_t *locale) if (!be_quiet) error (0, 0, _("missing era name in string %d in `era' field" " in category `%s'"), idx + 1, "LC_TIME"); - time->era_entries[idx].name = - time->era_entries[idx].format = ""; + /* Make sure that name and format are adjacent strings + in memory. */ + time->era_entries[idx].name = "\0"; + time->era_entries[idx].format + = time->era_entries[idx].name + 1; } else { @@ -370,8 +373,11 @@ time_finish (struct localedef_t *locale) error (0, 0, _("missing era format in string %d in `era'" " field in category `%s'"), idx + 1, "LC_TIME"); - time->era_entries[idx].name = - time->era_entries[idx].format = ""; + /* Make sure that name and format are adjacent strings + in memory. */ + time->era_entries[idx].name = "\0"; + time->era_entries[idx].format + = time->era_entries[idx].name + 1; } else time->era_entries[idx].format = str; @@ -589,22 +595,10 @@ time_output (struct localedef_t *locale, const char *output_path) iov[2 + cnt].iov_len = sizeof (int32_t); ++cnt; iov[2 + cnt].iov_base = (void *) &ERA_B1[num].start_date[0]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B1[num].start_date[1]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B1[num].start_date[2]; - iov[2 + cnt].iov_len = sizeof (int32_t); + iov[2 + cnt].iov_len = 3 * sizeof (int32_t); ++cnt; iov[2 + cnt].iov_base = (void *) &ERA_B1[num].stop_date[0]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B1[num].stop_date[1]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B1[num].stop_date[2]; - iov[2 + cnt].iov_len = sizeof (int32_t); + iov[2 + cnt].iov_len = 3 * sizeof (int32_t); ++cnt; l = (strchr (ERA_B1[num].format, '\0') - ERA_B1[num].name) + 1; @@ -631,22 +625,10 @@ time_output (struct localedef_t *locale, const char *output_path) iov[2 + cnt].iov_len = sizeof (int32_t); ++cnt; iov[2 + cnt].iov_base = (void *) &ERA_B2[num].start_date[0]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B2[num].start_date[1]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B2[num].start_date[2]; - iov[2 + cnt].iov_len = sizeof (int32_t); + iov[2 + cnt].iov_len = 3 * sizeof (int32_t); ++cnt; iov[2 + cnt].iov_base = (void *) &ERA_B2[num].stop_date[0]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B2[num].stop_date[1]; - iov[2 + cnt].iov_len = sizeof (int32_t); - ++cnt; - iov[2 + cnt].iov_base = (void *) &ERA_B2[num].stop_date[2]; - iov[2 + cnt].iov_len = sizeof (int32_t); + iov[2 + cnt].iov_len = 3 * sizeof (int32_t); ++cnt; l = (strchr (ERA_B2[num].format, '\0') - ERA_B2[num].name) + 1; -- cgit v1.2.3