Maartan,
I think it is a lo risk change, so go ahead and fix it before you run
away to Colombia :-)
Bourut
Maarten Brock wrote:
> Andy,
>
> Good catch. I think you are right and I programmed the bug.
>
> Borut,
>
> Shall we fix this before the release?
>
> Maarten
>
>
>> To those in the know,
>>
>> The code for printf (printf_large.c) is as follows. My question is,
>> should the space conditions be '>=' rather than just '>' ? (I did some
>> raw byte dumps of a __code U08 *, and the type was 0x80. And with the
>> change made, I get the correct output from printf!
>>
>> Cheers,
>> Andy
>>
>> case 'P':
>> PTR = va_arg(ap,ptr_t);
>>
>> [...]
>> #elif defined (SDCC_mcs51)
>> {
>> unsigned char memtype = value.byte[2];
>> if (memtype > 0x80) // <-- should this
>> be >= 0x80 ???
>> c = 'c';
>> else if (memtype > 0x60) // and these?
>> c = 'p';
>> else if (memtype > 0x40)
>> c = 'i';
>> else
>> c = 'x';
>> }
>> OUTPUT_CHAR(c, p);
>> OUTPUT_CHAR(':', p);
>> OUTPUT_CHAR('0', p);
>> OUTPUT_CHAR('x', p);
>> if ((c != 'I' /* idata */) &&
>> (c != 'P' /* pdata */))
>> {
>> OUTPUT_2DIGITS( value.byte[1] );
>> }
>> OUTPUT_2DIGITS( value.byte[0] );
>> #else
>> [...]
>>
>>
------------------------------------------------------------------------------
Open Source Business Conference (OSBC), March 24-25, 2009, San Francisco, CA
-OSBC tackles the biggest issue in open source: Open Sourcing the Enterprise
-Strategies to boost innovation and cut costs with open source participation
-Receive a $600 discount off the registration fee with the source code: SFAD
http://p.sf.net/sfu/XcvMzF8H
_______________________________________________
Sdcc-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/sdcc-user