bug in ozostream.cc @ mozart-1-3-0-fixes
Boriss Mejias
boris.mejias at uclouvain.be
Sun Apr 16 20:39:58 CEST 2006
Filip Konvicka wrote:
> I've submitted bug report #1869. The problem is that the $ printf
> notation is not standard C++.
Thanks a lot. I moved the bug to Engine and we'll let you know during
next week if we committed to the cvs. (Sorry, no access to a windows
machine during the weekend)
cheers
Boriss
>
> Filip
>
>> Hi,
>>
>> the recent Mozart 1-3-0-fixes prints some garbage instead of floats
>> (like "$.*1$g"). See the included patch.
>>
>> Cheers,
>> Filip
>>
>>
>> ------------------------------------------------------------------------
>>
>> Index: platform/emulator/ozostream.cc
>> ===================================================================
>> RCS file: /services/mozart/CVS/mozart/platform/emulator/ozostream.cc,v
>> retrieving revision 1.18.18.1
>> diff -u -r1.18.18.1 ozostream.cc
>> --- platform/emulator/ozostream.cc 21 Feb 2006 09:36:05 -0000
>> 1.18.18.1
>> +++ platform/emulator/ozostream.cc 16 Apr 2006 08:43:22 -0000
>> @@ -83,9 +83,9 @@
>> {
>> char buf[100];
>> if (ozconf.printScientificFloats)
>> - sprintf(buf,"%2$.*1$e",ozconf.printFloatPrecision,d);
>> + sprintf(buf,"%2.*e",ozconf.printFloatPrecision,d);
>> else
>> - sprintf(buf,"%2$.*1$g",ozconf.printFloatPrecision,d);
>> + sprintf(buf,"%2.*g",ozconf.printFloatPrecision,d);
>> return *this << buf;
>> }
>>
>
>
> _________________________________________________________________________________
>
> mozart-hackers mailing list
> mozart-hackers at ps.uni-sb.de
> http://www.mozart-oz.org/mailman/listinfo/mozart-hackers
>
More information about the mozart-hackers
mailing list