From 77701c003a0afa77a8f76bb0a94a7989f8529848 Mon Sep 17 00:00:00 2001 From: Antony Dovgal Date: Fri, 3 Aug 2007 14:30:59 +0000 Subject: 'I32' and 'I' support (per request by Marcus) --- main/snprintf.c | 11 ++++++++++- main/spprintf.c | 11 ++++++++++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'main') diff --git a/main/snprintf.c b/main/snprintf.c index e93913e6f9..3db627ef61 100644 --- a/main/snprintf.c +++ b/main/snprintf.c @@ -714,7 +714,16 @@ static int format_converter(register buffy * odp, const char *fmt, va_list ap) / modifier = LM_LONG_LONG; } else #endif - modifier = LM_LONG; + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } break; case 'l': fmt++; diff --git a/main/spprintf.c b/main/spprintf.c index b790ca0c79..6e2661c4f4 100644 --- a/main/spprintf.c +++ b/main/spprintf.c @@ -347,7 +347,16 @@ static void xbuf_format_converter(int unicode, smart_str *xbuf, const char *fmt, modifier = LM_LONG_LONG; } else #endif - modifier = LM_LONG; + if (*fmt == '3' && *(fmt+1) == '2') { + fmt += 2; + modifier = LM_LONG; + } else { +#ifdef _WIN64 + modifier = LM_LONG_LONG; +#else + modifier = LM_LONG; +#endif + } break; case 'l': fmt++; -- cgit v1.2.1