+2009-07-29 Keith Marshall <keithmarshall@users.sourceforge.net>
+
+ Correct disposition of wchar_t output in printf().
+
+ mingwex/stdio/pformat.c (__pformat) [%C]: Create new instance of...
+ (argval): ...this, in inner scope, with singular type `wchar_t'; use
+ it to pass one wchar to __pformat_wputchars(), for output.
+
2009-07-27 Chris Sutcliffe <ir0nh34d@users.sourceforge.net>
* mingwex/stdio/pformat.c: Implement better fix for type punned warning.
* his `__gdtoa()' function in a manner to provide extended precision
* replacements for `ecvt()' and `fcvt()'.
*/
- int k;
- unsigned int e = 0; char *ep;
+ int k; unsigned int e = 0; char *ep;
static FPI fpi = { 64, 1-16383-64+1, 32766-16383-64+1, FPI_Round_near, 0 };
/* Classify the argument into an appropriate `__gdtoa()' category...
/* considering any `long' type modifier as a reference to
* `wchar_t' data, (which is promoted to an `int' argument)...
*/
- argval.__pformat_ullong_t = (wchar_t)(va_arg( argv, int ));
- __pformat_wputchars( (wchar_t *)argval.__pformat_ptr_t, 1, &stream );
+ wchar_t argval = (wchar_t)(va_arg( argv, int ));
+ __pformat_wputchars( &argval, 1, &stream );
}
else