mirror of
https://sourceware.org/git/glibc.git
synced 2025-01-18 14:40:06 +00:00
Update.
2000-02-11 Ulrich Drepper <drepper@redhat.com> * locale/langinfo.h: Make CRNCYSTR a separate entry instead of an alias for CURRENCY_SYMBOL. * locale/programs/ld-monetary.c: Add support to write out CRNCYSTR information. [PR libc/1583].
This commit is contained in:
parent
740c223996
commit
a58a476357
@ -1,3 +1,10 @@
|
||||
2000-02-11 Ulrich Drepper <drepper@redhat.com>
|
||||
|
||||
* locale/langinfo.h: Make CRNCYSTR a separate entry instead of an
|
||||
alias for CURRENCY_SYMBOL.
|
||||
* locale/programs/ld-monetary.c: Add support to write out CRNCYSTR
|
||||
information. [PR libc/1583].
|
||||
|
||||
2000-02-08 Shinya Hanataka <hanataka@abyss.rim.or.jp>
|
||||
|
||||
* locale/weightwc.h: Fix problem with collating-element.
|
||||
|
@ -324,10 +324,6 @@ enum
|
||||
#define INT_CURR_SYMBOL INT_CURR_SYMBOL
|
||||
CURRENCY_SYMBOL,
|
||||
#define CURRENCY_SYMBOL CURRENCY_SYMBOL
|
||||
#ifdef __USE_XOPEN
|
||||
CRNCYSTR = CURRENCY_SYMBOL,
|
||||
# define CRNCYSTR CRNCYSTR
|
||||
#endif
|
||||
MON_DECIMAL_POINT,
|
||||
#define MON_DECIMAL_POINT MON_DECIMAL_POINT
|
||||
MON_THOUSANDS_SEP,
|
||||
@ -354,6 +350,10 @@ enum
|
||||
#define P_SIGN_POSN P_SIGN_POSN
|
||||
N_SIGN_POSN,
|
||||
#define N_SIGN_POSN N_SIGN_POSN
|
||||
_NL_MONETARY_CRNCYSTR,
|
||||
#ifdef __USE_XOPEN
|
||||
# define CRNCYSTR __CRNCYSTR
|
||||
#endif
|
||||
_NL_MONETARY_INT_P_CS_PRECEDES,
|
||||
_NL_MONETARY_INT_P_SEP_BY_SPACE,
|
||||
_NL_MONETARY_INT_N_CS_PRECEDES,
|
||||
|
@ -84,6 +84,7 @@ struct locale_monetary_t
|
||||
uint32_t duo_valid_from;
|
||||
uint32_t duo_valid_to;
|
||||
uint32_t conversion_rate[2];
|
||||
char *crncystr;
|
||||
};
|
||||
|
||||
|
||||
@ -345,6 +346,12 @@ not correspond to a valid name in ISO 4217"),
|
||||
monetary->conversion_rate[0] = 1;
|
||||
monetary->conversion_rate[1] = 1;
|
||||
}
|
||||
|
||||
/* Create the crncystr entry. */
|
||||
monetary->crncystr = (char *) xmalloc (strlen (monetary->currency_symbol)
|
||||
+ 2);
|
||||
monetary->crncystr[0] = monetary->p_cs_precedes ? '-' : '+';
|
||||
strcpy (&monetary->crncystr[1], monetary->currency_symbol);
|
||||
}
|
||||
|
||||
|
||||
@ -444,6 +451,11 @@ monetary_output (struct localedef_t *locale, struct charmap_t *charmap,
|
||||
iov[cnt].iov_len = 1;
|
||||
++cnt;
|
||||
|
||||
idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
|
||||
iov[cnt].iov_base = (void *) &monetary->crncystr;
|
||||
iov[cnt].iov_len = strlen (iov[cnt].iov_base) + 1;
|
||||
++cnt;
|
||||
|
||||
idx[cnt - 2] = idx[cnt - 3] + iov[cnt - 1].iov_len;
|
||||
iov[cnt].iov_base = (void *) &monetary->int_p_cs_precedes;
|
||||
iov[cnt].iov_len = 1;
|
||||
|
Loading…
Reference in New Issue
Block a user