Print this page
4964 nl_langinfo(CRNCYSTR) returns wrong alignment character
4999 libc test suite enhancements
4939 desire wcsnrtombs() function
Reviewed by: Jason King <jason.brian.king@gmail.com>
Reviewed by: Dan McDonald <danmcd@omniti.com>
Reviewed by: Igor Kozhukhov <ikozhukhov@gmail.com>
Approved by: TBD


 139                 lmon->int_##NAME = lmon->NAME;            \
 140         else                                            \
 141                 M_ASSIGN_CHAR(int_##NAME);
 142 
 143         M_ASSIGN_ICHAR(p_cs_precedes);
 144         M_ASSIGN_ICHAR(n_cs_precedes);
 145         M_ASSIGN_ICHAR(p_sep_by_space);
 146         M_ASSIGN_ICHAR(n_sep_by_space);
 147         M_ASSIGN_ICHAR(p_sign_posn);
 148         M_ASSIGN_ICHAR(n_sign_posn);
 149 
 150         /*
 151          * Now calculate the currency string (CRNCYSTR) for nl_langinfo.
 152          * This is a legacy SUSv2 interface.
 153          */
 154         if ((lmon->p_cs_precedes[0] == lmon->n_cs_precedes[0]) &&
 155             (lmon->currency_symbol[0] != '\0')) {
 156                 char sign = '\0';
 157                 switch (lmon->p_cs_precedes[0]) {
 158                 case 0:
 159                         sign = '-';
 160                         break;
 161                 case 1:
 162                         sign = '+';
 163                         break;
 164                 case CHAR_MAX:
 165                         /*
 166                          * Substitute currency string for radix character.
 167                          * To the best of my knowledge, no locale uses this.
 168                          */
 169                         if (strcmp(lmon->mon_decimal_point,
 170                             lmon->currency_symbol) == 0)
 171                                 sign = '.';
 172                         break;
 173                 }
 174                 (void) snprintf(lmon->crncystr, clen, "%c%s", sign,
 175                     lmon->currency_symbol);
 176         }
 177 
 178         return (ldata);
 179 }


 139                 lmon->int_##NAME = lmon->NAME;            \
 140         else                                            \
 141                 M_ASSIGN_CHAR(int_##NAME);
 142 
 143         M_ASSIGN_ICHAR(p_cs_precedes);
 144         M_ASSIGN_ICHAR(n_cs_precedes);
 145         M_ASSIGN_ICHAR(p_sep_by_space);
 146         M_ASSIGN_ICHAR(n_sep_by_space);
 147         M_ASSIGN_ICHAR(p_sign_posn);
 148         M_ASSIGN_ICHAR(n_sign_posn);
 149 
 150         /*
 151          * Now calculate the currency string (CRNCYSTR) for nl_langinfo.
 152          * This is a legacy SUSv2 interface.
 153          */
 154         if ((lmon->p_cs_precedes[0] == lmon->n_cs_precedes[0]) &&
 155             (lmon->currency_symbol[0] != '\0')) {
 156                 char sign = '\0';
 157                 switch (lmon->p_cs_precedes[0]) {
 158                 case 0:
 159                         sign = '+';
 160                         break;
 161                 case 1:
 162                         sign = '-';
 163                         break;
 164                 case CHAR_MAX:
 165                         /*
 166                          * Substitute currency string for radix character.
 167                          * To the best of my knowledge, no locale uses this.
 168                          */
 169                         if (strcmp(lmon->mon_decimal_point,
 170                             lmon->currency_symbol) == 0)
 171                                 sign = '.';
 172                         break;
 173                 }
 174                 (void) snprintf(lmon->crncystr, clen, "%c%s", sign,
 175                     lmon->currency_symbol);
 176         }
 177 
 178         return (ldata);
 179 }