>> +
>> + *gnumber = NULL;
>> + /* No grouping */
>> + if (thousands_sep == NULL || grouping == NULL ||
>> + *thousands_sep == '\0' || *grouping == CHAR_MAX || *grouping <= 0)
>> {
>> + *gnumber = strdup(number);
>> + if (*gnumber == NULL)
>> +
+
+ *gnumber = NULL;
+ /* No grouping */
+ if (thousands_sep == NULL || grouping == NULL ||
+ *thousands_sep == '\0' || *grouping == CHAR_MAX || *grouping = 0)
{
+ *gnumber = strdup(number);
+ if (*gnumber == NULL)
+ ret =
Em Mon, Oct 08, 2012 at 09:43:33AM +0300, Irina Tirdea escreveu:
>
> +/* Group the digits according to the grouping rules of the current locale.
> + The interpretation of GROUPING is as in `struct lconv' from .
> */
> +static int group_number_locale(char *number, char **gnumber)
> +{
> +
From: Irina Tirdea
In glibc, printf supports ' to group numbers with thousands' grouping
characters. Bionic does not support ' for printf.
Implement thousands's grouping for numbers according to locale.
The implementation uses the algorithm from glibc
(http://www.gnu.org/software/libc/).
From: Irina Tirdea irina.tir...@intel.com
In glibc, printf supports ' to group numbers with thousands' grouping
characters. Bionic does not support ' for printf.
Implement thousands's grouping for numbers according to locale.
The implementation uses the algorithm from glibc
Em Mon, Oct 08, 2012 at 09:43:33AM +0300, Irina Tirdea escreveu:
+/* Group the digits according to the grouping rules of the current locale.
+ The interpretation of GROUPING is as in `struct lconv' from locale.h.
*/
+static int group_number_locale(char *number, char **gnumber)
+{
+
6 matches
Mail list logo