[U-Boot-Users] [PATCH 0/1] vsprintf: add z and t options

2008-07-14 Thread Jean-Christophe PLAGNIOL-VILLARD
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
---
 lib_generic/vsprintf.c |   12 +---
 1 files changed, 9 insertions(+), 3 deletions(-)

diff --git a/lib_generic/vsprintf.c b/lib_generic/vsprintf.c
index 3db6c3f..1d9b25b 100644
--- a/lib_generic/vsprintf.c
+++ b/lib_generic/vsprintf.c
@@ -262,7 +262,9 @@ int vsprintf(char *buf, const char *fmt, va_list args)
 
/* get the conversion qualifier */
qualifier = -1;
-   if (*fmt == 'h' || *fmt == 'l' || *fmt == 'q') {
+   if (*fmt == 'h' || *fmt == 'l' || *fmt == 'L' ||
+   *fmt =='Z' || *fmt == 'z' || *fmt == 't' ||
+   *fmt == 'q' ) {
qualifier = *fmt;
if (qualifier == 'l'  *(fmt+1) == 'l') {
qualifier = 'q';
@@ -355,9 +357,13 @@ int vsprintf(char *buf, const char *fmt, va_list args)
num = va_arg(args, unsigned long long);
else
 #endif
-   if (qualifier == 'l')
+   if (qualifier == 'l') {
num = va_arg(args, unsigned long);
-   else if (qualifier == 'h') {
+   } else if (qualifier == 'Z' || qualifier == 'z') {
+   num = va_arg(args, size_t);
+   } else if (qualifier == 't') {
+   num = va_arg(args, ptrdiff_t);
+   } else if (qualifier == 'h') {
num = (unsigned short) va_arg(args, int);
if (flags  SIGN)
num = (short) num;
-- 
1.5.6


-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users


Re: [U-Boot-Users] [PATCH 0/1] vsprintf: add z and t options

2008-07-14 Thread Wolfgang Denk
In message [EMAIL PROTECTED] you wrote:
 Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD [EMAIL PROTECTED]
 ---
  lib_generic/vsprintf.c |   12 +---
  1 files changed, 9 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH, MD: Wolfgang Denk  Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: [EMAIL PROTECTED]
The optimum committee has no members.
   - Norman Augustine

-
Sponsored by: SourceForge.net Community Choice Awards: VOTE NOW!
Studies have shown that voting for your favorite open source project,
along with a healthy diet, reduces your potential for chronic lameness
and boredom. Vote Now at http://www.sourceforge.net/community/cca08
___
U-Boot-Users mailing list
U-Boot-Users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/u-boot-users