[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lwip-users] bug report
From: |
Martin Velek |
Subject: |
Re: [lwip-users] bug report |
Date: |
Sat, 6 Mar 2010 01:11:46 +0100 |
The problem is not a standard(C89) compiler, the problem is the
standard sprintf function. As you know the embedded system is limited
in source and full sprintf uses a lot of stack and ROM code. For this
reasons, there are many simple replacement of sprintf but of course
with a limited functionality, e.g. only %s, %u, %c, %d...
The question is: Why is in the rest of code used standard data types
defined in cc.h and just here, there is one harcoded?
The second question: Why I am reporting this behavior twice a year
with the same questions and answers? ;-)
> The h in %hx might be the problem, but it's not necessary as Jeff points out
> due to standard integer promotion.
Exactly. The simple sprintf from luminary(TI) does not know %2hx but
can print %2U16_F.
Martin.
On 5 March 2010 18:38, Bill Auerbach <address@hidden> wrote:
>>I think his point is that we're assuming that %x exists on his platform
>>by hardcoding %02x in the code, whereas on his platform he needs to use
>>something other than %x to get a hex output.
>
> Assumptions are made that a standard (C89) compiler is being used. %02x is
> in that and later standards.
>
> The h in %hx might be the problem, but it's not necessary as Jeff points out
> due to standard integer promotion.
>
> Bill
>
>
>
> _______________________________________________
> lwip-users mailing list
> address@hidden
> http://lists.nongnu.org/mailman/listinfo/lwip-users
>
- [lwip-users] bug report, Martin Velek, 2010/03/05
- Re: [lwip-users] bug report, Jeff Barber, 2010/03/05
- Re: [lwip-users] bug report, Kieran Mansley, 2010/03/05
- RE: [lwip-users] bug report, Bill Auerbach, 2010/03/05
- Re: [lwip-users] bug report,
Martin Velek <=
- Re: [lwip-users] bug report, address@hidden, 2010/03/07
- Re: [lwip-users] bug report, robin, 2010/03/07
- Re: [lwip-users] bug report, Martin Velek, 2010/03/07
- Re: [lwip-users] bug report, address@hidden, 2010/03/07
- Re: [lwip-users] bug report, Kieran Mansley, 2010/03/08
- Re: [lwip-users] bug report, Jeff Barber, 2010/03/05