Author: gschneider
Date: Thu Jul 9 00:06:11 2009
New Revision: 41813
URL:
http://svn.reactos.org/svn/reactos?rev=41813&view=rev
Log:
According to
http://msdn.microsoft.com/en-us/library/tcxf1dw6(VS.71).aspx and
http://www.cplusplus.com/reference/clibrary/cstdio/printf/ there are no %le and %lf printf
formats. The 'l' specifier is used for integers or wide characters, 'L'
for long double. Outputting a double doesn't require any additional specifier (see
http://msdn.microsoft.com/en-us/library/hf4y5e3w(VS.71).aspx).
Modified:
trunk/reactos/base/applications/calc/utl.c
Modified: trunk/reactos/base/applications/calc/utl.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/applications/calc/utl…
==============================================================================
--- trunk/reactos/base/applications/calc/utl.c [iso-8859-1] (original)
+++ trunk/reactos/base/applications/calc/utl.c [iso-8859-1] Thu Jul 9 00:06:11 2009
@@ -21,9 +21,9 @@
/* calculate the width of integer number */
width = (rpn->f==0) ? 1 : (int)log10(fabs(rpn->f))+1;
if (calc.sci_out == TRUE || width > MAX_LD_WIDTH || width < -MAX_LD_WIDTH)
- ptr = buffer + _stprintf(buffer, TEXT("%#le"), rpn->f);
+ ptr = buffer + _stprintf(buffer, TEXT("%#e"), rpn->f);
else {
- ptr = buffer + _stprintf(buffer, TEXT("%#*.*lf"), width,
((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f);
+ ptr = buffer + _stprintf(buffer, TEXT("%#*.*f"), width,
((MAX_LD_WIDTH-width-1)>=0) ? MAX_LD_WIDTH-width-1 : 0, rpn->f);
dst = _tcschr(buffer, TEXT('.'));
while (--ptr > dst)
if (*ptr != TEXT('0'))