From d1a2fe1a62c10f7b0e976c6fdc8c2f1029d02afd Mon Sep 17 00:00:00 2001 From: Jeff Johnston Date: Tue, 14 Nov 2006 21:29:26 +0000 Subject: [PATCH] 2006-11-14 Eric Blake * libc/stdio/vfprintf.c (_vfprintf_r): Support ' flag. (chclass): ' is a flag. j, t, and z are modifiers. --- newlib/ChangeLog | 5 +++++ newlib/libc/stdio/vfprintf.c | 14 ++++++++++---- 2 files changed, 15 insertions(+), 4 deletions(-) diff --git a/newlib/ChangeLog b/newlib/ChangeLog index 6fc690ef4..baa60d476 100644 --- a/newlib/ChangeLog +++ b/newlib/ChangeLog @@ -1,3 +1,8 @@ +2006-11-14 Eric Blake + + * libc/stdio/vfprintf.c (_vfprintf_r): Support ' flag. + (chclass): ' is a flag. j, t, and z are modifiers. + 2006-11-08 Jie Zhang * configure.host: Add support for bfin. diff --git a/newlib/libc/stdio/vfprintf.c b/newlib/libc/stdio/vfprintf.c index 91b2c234d..d8e46a2d1 100644 --- a/newlib/libc/stdio/vfprintf.c +++ b/newlib/libc/stdio/vfprintf.c @@ -610,6 +610,12 @@ _DEFUN(_VFPRINTF_R, (data, fp, fmt0, ap), rflag: ch = *fmt++; reswitch: switch (ch) { + case '\'': + /* In the C locale, LC_NUMERIC requires + thousands_sep to be the empty string. And since + no other locales are supported (yet), this flag + is currently a no-op. */ + goto rflag; case ' ': /* * ``If the space and + flags both appear, the space @@ -1495,7 +1501,7 @@ _CONST static CH_CLASS chclass[256] = { /* 08-0f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 10-17 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 18-1f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, - /* 20-27 */ FLAG, OTHER, OTHER, FLAG, DOLLAR, OTHER, OTHER, OTHER, + /* 20-27 */ FLAG, OTHER, OTHER, FLAG, DOLLAR, OTHER, OTHER, FLAG, /* 28-2f */ OTHER, OTHER, STAR, FLAG, OTHER, FLAG, DOT, OTHER, /* 30-37 */ ZERO, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, DIGIT, /* 38-3f */ DIGIT, DIGIT, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, @@ -1504,9 +1510,9 @@ _CONST static CH_CLASS chclass[256] = { /* 50-57 */ OTHER, OTHER, OTHER, SPEC, OTHER, SPEC, OTHER, SPEC, /* 58-5f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 60-67 */ OTHER, OTHER, OTHER, SPEC, SPEC, SPEC, SPEC, SPEC, - /* 68-6f */ MODFR, SPEC, OTHER, OTHER, MODFR, OTHER, OTHER, SPEC, - /* 70-77 */ SPEC, MODFR, OTHER, SPEC, OTHER, SPEC, OTHER, OTHER, - /* 78-7f */ SPEC, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, + /* 68-6f */ MODFR, SPEC, MODFR, OTHER, MODFR, OTHER, OTHER, SPEC, + /* 70-77 */ SPEC, MODFR, OTHER, SPEC, MODFR, SPEC, OTHER, OTHER, + /* 78-7f */ SPEC, OTHER, MODFR, OTHER, OTHER, OTHER, OTHER, OTHER, /* 80-87 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 88-8f */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, /* 90-97 */ OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER, OTHER,