Skip to content

Commit

Permalink
Update.
Browse files Browse the repository at this point in the history
	* locale/C-monetary.c: Set mon_decimal to empty string.
	Add missing entry _NL_MONETARY_CRNCYSTR.
	* stdio-common/printf_fp.c: If MON_DECIAL_POINT is not provided use
	DECIMAL_POINT information.
	* locale/C-numeric.c: Set mon_grouping entry to empty string.
	* locale/C-time.c: Add date_fmt entries.  Remove two wrong entries.
	Correct value for number of entries.
	* locale/localeconv.c: Normalize result passed back in .grouping.
	Fix assignment to .int_* entries.

	* locale/Makefile (tests): Add tst-C-locale.
	* locale/tst-C-locale.c: New file.

	* locale/setlocale.c: Use LOCALEDIR and not LOCALE_PATH to locate
	locale files.
	* locale/newlocale.c: Likewise.

2000-10-26  GOTO Masanori  <gotom@debian.or.jp>

	* locale/langinfo.h: Define _DATE_FMT and _NL_W_DATE_FMT.
	* locale/categories.def: New support for date_fmt.
	* locale/programs/ld-time.c: Likewise.
	* locale/programs/locfile-kw.gperf: Likewise.
	* locale/programs/locfile-kw.h: Likewise.
	* locale/programs/locfile-token.h: Likewise.

2000-10-26  Jakub Jelinek  <jakub@redhat.com>

	* sysdeps/ieee754/ldbl-128/e_hypotl.c: New.

	* math/libm-test.inc (cabs_test, cexp_test, csqrt_test, hypot_test):
	Increase precision of constants.
	* sysdeps/alpha/fpu/libm-test-ulps: Update.
	* sysdeps/arm/libm-test-ulps: Update.
	* sysdeps/i386/fpu/libm-test-ulps: Update.
	* sysdeps/ia64/fpu/libm-test-ulps: Update.
	* sysdeps/m68k/fpu/libm-test-ulps: Update.
	* sysdeps/mips/fpu/libm-test-ulps: Update.
	* sysdeps/powerpc/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
	* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
	* sysdeps/sh/sh4/fpu/libm-test-ulps: Update.
	* sysdeps/s390/fpu/libm-test-ulps: Update.

2000-10-26  Ulrich Drepper  <drepper@redhat.com>
  • Loading branch information
Ulrich Drepper committed Oct 26, 2000
1 parent 5be068f commit d833721
Show file tree
Hide file tree
Showing 142 changed files with 1,358 additions and 505 deletions.
46 changes: 46 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,49 @@
2000-10-26 Ulrich Drepper <drepper@redhat.com>

* locale/C-monetary.c: Set mon_decimal to empty string.
Add missing entry _NL_MONETARY_CRNCYSTR.
* stdio-common/printf_fp.c: If MON_DECIAL_POINT is not provided use
DECIMAL_POINT information.
* locale/C-numeric.c: Set mon_grouping entry to empty string.
* locale/C-time.c: Add date_fmt entries. Remove two wrong entries.
Correct value for number of entries.
* locale/localeconv.c: Normalize result passed back in .grouping.
Fix assignment to .int_* entries.

* locale/Makefile (tests): Add tst-C-locale.
* locale/tst-C-locale.c: New file.

* locale/setlocale.c: Use LOCALEDIR and not LOCALE_PATH to locate
locale files.
* locale/newlocale.c: Likewise.

2000-10-26 GOTO Masanori <gotom@debian.or.jp>

* locale/langinfo.h: Define _DATE_FMT and _NL_W_DATE_FMT.
* locale/categories.def: New support for date_fmt.
* locale/programs/ld-time.c: Likewise.
* locale/programs/locfile-kw.gperf: Likewise.
* locale/programs/locfile-kw.h: Likewise.
* locale/programs/locfile-token.h: Likewise.

2000-10-26 Jakub Jelinek <jakub@redhat.com>

* sysdeps/ieee754/ldbl-128/e_hypotl.c: New.

* math/libm-test.inc (cabs_test, cexp_test, csqrt_test, hypot_test):
Increase precision of constants.
* sysdeps/alpha/fpu/libm-test-ulps: Update.
* sysdeps/arm/libm-test-ulps: Update.
* sysdeps/i386/fpu/libm-test-ulps: Update.
* sysdeps/ia64/fpu/libm-test-ulps: Update.
* sysdeps/m68k/fpu/libm-test-ulps: Update.
* sysdeps/mips/fpu/libm-test-ulps: Update.
* sysdeps/powerpc/fpu/libm-test-ulps: Update.
* sysdeps/sparc/sparc32/fpu/libm-test-ulps: Update.
* sysdeps/sparc/sparc64/fpu/libm-test-ulps: Update.
* sysdeps/sh/sh4/fpu/libm-test-ulps: Update.
* sysdeps/s390/fpu/libm-test-ulps: Update.

2000-10-26 Ulrich Drepper <drepper@redhat.com>

* io/Makefile (tests): Add tst-fcntl.
Expand Down
6 changes: 3 additions & 3 deletions locale/C-monetary.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const struct locale_data _nl_C_LC_MONETARY =
{
{ string: "" },
{ string: "" },
{ string: "." },
{ string: "" },
{ string: "" },
{ string: "" },
{ string: "" },
Expand All @@ -52,6 +52,7 @@ const struct locale_data _nl_C_LC_MONETARY =
{ string: not_available },
{ string: not_available },
{ string: not_available },
{ string: "" },
{ string: not_available },
{ string: not_available },
{ string: not_available },
Expand Down Expand Up @@ -79,8 +80,7 @@ const struct locale_data _nl_C_LC_MONETARY =
{ word: 10101 },
{ word: 99991231 },
{ word: 1 },
{ word: 1 },
{ word: (unsigned int) L'.' },
{ word: (unsigned int) L'\0' },
{ word: (unsigned int) L'\0' }
}
};
8 changes: 1 addition & 7 deletions locale/C-numeric.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,12 +21,6 @@

/* This table's entries are taken from POSIX.2 Table 2-10
``LC_NUMERIC Category Definition in the POSIX Locale''. */
#ifdef __CHAR_UNSIGNED__
static const char not_available[] = "\377";
#else
static const char not_available[] = "\177";
#endif

const struct locale_data _nl_C_LC_NUMERIC =
{
_nl_C_name,
Expand All @@ -38,7 +32,7 @@ const struct locale_data _nl_C_LC_NUMERIC =
{
{ string: "." },
{ string: "" },
{ string: not_available },
{ string: "" },
{ word: (unsigned int) L'.' },
{ word: (unsigned int) L'\0' }
}
Expand Down
8 changes: 4 additions & 4 deletions locale/C-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ const struct locale_data _nl_C_LC_TIME =
UNDELETABLE,
0,
NULL,
62,
110,
{
{ string: "Sun" },
{ string: "Mon" },
Expand Down Expand Up @@ -128,7 +128,6 @@ const struct locale_data _nl_C_LC_TIME =
{ wstr: (const uint32_t *) L"%m/%d/%y" },
{ wstr: (const uint32_t *) L"%H:%M:%S" },
{ wstr: (const uint32_t *) L"%I:%M:%S %p" },
{ wstr: NULL },
{ wstr: (const uint32_t *) L"" },
{ wstr: (const uint32_t *) L"" },
{ wstr: (const uint32_t *) L"" },
Expand All @@ -139,8 +138,9 @@ const struct locale_data _nl_C_LC_TIME =
{ word: 19971130 },
{ string: "\7" },
{ string: "\1" },
{ string: "\7" },
{ string: "\1" },
{ string: "" }
{ string: "" },
{ string: "%a %b %e %H:%M:%S %Z %Y" },
{ wstr: (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y" }
}
};
1 change: 1 addition & 0 deletions locale/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ distribute = localeinfo.h categories.def iso-639.def iso-3166.def \
routines = setlocale findlocale loadlocale localeconv nl_langinfo \
nl_langinfo_l mb_cur_max codeset_name \
newlocale duplocale freelocale
tests = tst-C-locale
categories = ctype messages monetary numeric time paper name \
address telephone measurement identification collate
aux = $(categories:%=lc-%) $(categories:%=C-%) SYS_libc C_name
Expand Down
2 changes: 2 additions & 0 deletions locale/categories.def
Original file line number Diff line number Diff line change
Expand Up @@ -240,6 +240,8 @@ DEFINE_CATEGORY
DEFINE_ELEMENT (_NL_TIME_FIRST_WORKDAY, "first_workday", std, byte)
DEFINE_ELEMENT (_NL_TIME_CAL_DIRECTION, "cal_direction", std, byte)
DEFINE_ELEMENT (_NL_TIME_TIMEZONE, "timezone", std, string)
DEFINE_ELEMENT (_DATE_FMT, "date_fmt", opt, string)
DEFINE_ELEMENT (_NL_W_DATE_FMT, "wide-date_fmt", opt, string)
), _nl_postload_time)


Expand Down
6 changes: 5 additions & 1 deletion locale/langinfo.h
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,11 @@ enum
_NL_TIME_CAL_DIRECTION,
_NL_TIME_TIMEZONE,

_NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */
_DATE_FMT, /* strftime format for date. */
#define _DATE_FMT _DATE_FMT
_NL_W_DATE_FMT,

_NL_NUM_LC_TIME, /* Number of indices in LC_TIME category. */

/* LC_COLLATE category: text sorting.
This information is accessed by the strcoll and strxfrm functions.
Expand Down
22 changes: 16 additions & 6 deletions locale/localeconv.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ __localeconv (void)
result.decimal_point = (char *) _NL_CURRENT (LC_NUMERIC, DECIMAL_POINT);
result.thousands_sep = (char *) _NL_CURRENT (LC_NUMERIC, THOUSANDS_SEP);
result.grouping = (char *) _NL_CURRENT (LC_NUMERIC, GROUPING);
if (*result.grouping == CHAR_MAX || *result.grouping == -1)
result.grouping = (char *) "";

result.int_curr_symbol = (char *) _NL_CURRENT (LC_MONETARY, INT_CURR_SYMBOL);
result.currency_symbol = (char *) _NL_CURRENT (LC_MONETARY, CURRENCY_SYMBOL);
Expand All @@ -37,6 +39,8 @@ __localeconv (void)
result.mon_thousands_sep = (char *) _NL_CURRENT (LC_MONETARY,
MON_THOUSANDS_SEP);
result.mon_grouping = (char *) _NL_CURRENT (LC_MONETARY, MON_GROUPING);
if (*result.mon_grouping == CHAR_MAX || *result.mon_grouping == -1)
result.mon_grouping = (char *) "";
result.positive_sign = (char *) _NL_CURRENT (LC_MONETARY, POSITIVE_SIGN);
result.negative_sign = (char *) _NL_CURRENT (LC_MONETARY, NEGATIVE_SIGN);
result.int_frac_digits = *(char *) _NL_CURRENT (LC_MONETARY,
Expand All @@ -48,12 +52,18 @@ __localeconv (void)
result.n_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY, N_SEP_BY_SPACE);
result.p_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, P_SIGN_POSN);
result.n_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, N_SIGN_POSN);
result.p_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY, INT_P_CS_PRECEDES);
result.p_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY, INT_P_SEP_BY_SPACE);
result.n_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY, INT_N_CS_PRECEDES);
result.n_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY, INT_N_SEP_BY_SPACE);
result.p_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, INT_P_SIGN_POSN);
result.n_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY, INT_N_SIGN_POSN);
result.int_p_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY,
INT_P_CS_PRECEDES);
result.int_p_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY,
INT_P_SEP_BY_SPACE);
result.int_n_cs_precedes = *(char *) _NL_CURRENT (LC_MONETARY,
INT_N_CS_PRECEDES);
result.int_n_sep_by_space = *(char *) _NL_CURRENT (LC_MONETARY,
INT_N_SEP_BY_SPACE);
result.int_p_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY,
INT_P_SIGN_POSN);
result.int_n_sign_posn = *(char *) _NL_CURRENT (LC_MONETARY,
INT_N_SIGN_POSN);

return &result;
}
Expand Down
2 changes: 1 addition & 1 deletion locale/newlocale.c
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ __newlocale (int category_mask, const char *locale, __locale_t base)
return NULL;

if (__argz_append (&locale_path, &locale_path_len,
LOCALE_PATH, sizeof (LOCALE_PATH)) != 0)
LOCALEDIR, sizeof (LOCALEDIR)) != 0)
return NULL;

/* Get the names for the locales we are interested in. We either
Expand Down
21 changes: 21 additions & 0 deletions locale/programs/ld-time.c
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,8 @@ struct locale_time_t
const uint32_t *wera_d_fmt;
const char *alt_digits[100];
const uint32_t *walt_digits[100];
const char *date_fmt;
const uint32_t *wdate_fmt;
int alt_digits_defined;
unsigned char week_ndays;
uint32_t week_1stday;
Expand Down Expand Up @@ -491,6 +493,11 @@ time_finish (struct localedef_t *locale, struct charmap_t *charmap)
simply useless, stupid $&$!@... */
if (time->timezone == NULL)
time->timezone = "";

if (time->date_fmt == NULL)
time->date_fmt = "%a %b %e %H:%M:%S %Z %Y";
if (time->wdate_fmt == NULL)
time->wdate_fmt = (const uint32_t *) L"%a %b %e %H:%M:%S %Z %Y";
}


Expand Down Expand Up @@ -849,6 +856,19 @@ time_output (struct localedef_t *locale, struct charmap_t *charmap,

iov[2 + cnt].iov_base = (void *) time->timezone;
iov[2 + cnt].iov_len = strlen (time->timezone) + 1;
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
++cnt;
++last_idx;

iov[2 + cnt].iov_base = (void *) time->date_fmt;
iov[2 + cnt].iov_len = strlen (iov[2 + cnt].iov_base) + 1;
idx[1 + last_idx] = idx[last_idx] + iov[2 + cnt].iov_len;
++cnt;
++last_idx;

iov[2 + cnt].iov_base = (void *) time->wdate_fmt;
iov[2 + cnt].iov_len = ((wcslen (iov[2 + cnt].iov_base) + 1)
* sizeof (uint32_t));
++cnt;
++last_idx;

Expand Down Expand Up @@ -1080,6 +1100,7 @@ time_read (struct linereader *ldfile, struct localedef_t *result,
STR_ELEM (era_d_fmt);
STR_ELEM (era_t_fmt);
STR_ELEM (timezone);
STR_ELEM (date_fmt);

#define INT_ELEM(cat) \
case tok_##cat: \
Expand Down
1 change: 1 addition & 0 deletions locale/programs/locfile-kw.gperf
Original file line number Diff line number Diff line change
Expand Up @@ -147,6 +147,7 @@ first_weekday, tok_first_weekday, 0
first_workday, tok_first_workday, 0
cal_direction, tok_cal_direction, 0
timezone, tok_timezone, 0
date_fmt, tok_date_fmt, 0
LC_MESSAGES, tok_lc_messages, 0
yesexpr, tok_yesexpr, 0
noexpr, tok_noexpr, 0
Expand Down
Loading

0 comments on commit d833721

Please sign in to comment.