Pádraig Brady <[email protected]> writes:
> There were various other multi-byte blanks issues,
> and multi-byte issues in general when I looked further.
>
> The attached 3 further patches should make numfmt fully support multi-byte.
numfmt is a nice case where we don't need to optimize MB_CUR_MAX == 1,
thanks.
I can't build without this change though, because of a missing
declaration:
diff --git a/src/numfmt.c b/src/numfmt.c
index 57807e3f0..02925d802 100644
--- a/src/numfmt.c
+++ b/src/numfmt.c
@@ -1310,6 +1310,12 @@ print_padded_number (intmax_t padding)
fputs (format_str_suffix, stdout);
}
+static bool
+newline_or_blank (mcel_t g)
+{
+ return g.ch == '\n' || c32isblank (g.ch);
+}
+
/* Converts the TEXT number string to the requested representation,
and handles automatic suffix addition. */
static int
@@ -1356,12 +1362,6 @@ process_suffixed_number (char *text, long double *result,
return (e == SSE_OK || e == SSE_OK_PRECISION_LOSS);
}
-static bool
-newline_or_blank (mcel_t g)
-{
- return g.ch == '\n' || c32isblank (g.ch);
-}
-
/* Return a pointer to the beginning of the next field in line.
The line pointer is moved to the end of the next field. */
static char*
Also, I get this failure:
lcl-suf-8...
numfmt.pl: test lcl-suf-8 failed: exit status mismatch: expected 0, got 2
Collin