This is the mail archive of the
ecos-patches@sourceware.org
mailing list for the eCos project.
Re: Patch for printing long longs from diag_printf
- From: Jonathan Larmour <jifl at eCosCentric dot com>
- To: Rutger Hofman <rutger at cs dot vu dot nl>
- Cc: ecos-patches at ecos dot sourceware dot org
- Date: Thu, 31 May 2007 17:05:41 +0100
- Subject: Re: Patch for printing long longs from diag_printf
- References: <465EEB7A.40908@cs.vu.nl>
Rutger Hofman wrote:
Currently (eCos CVS from 10 minutes ago) diag_printf truncates it
integer-typed arguments to the size of a long or an int. For long longs,
this is obviously wrong: it should just not truncate. See the attached
patch to repair this.
I've applied something similar to your patch, thanks!
Question: what about shorts and chars? Shouldn't those also be
truncated? I did nothing here, because I'm not sure what to do.
diag_printf doesn't claim to be complete, so shorts are not supported at
all, and chars are handled only with '%c', which is handled in a different
block from this. Chars aren't handled with the form %hhd or anything like that.
So I think we're ok there.
Jifl
--
eCosCentric Limited http://www.eCosCentric.com/ The eCos experts
Barnwell House, Barnwell Drive, Cambridge, UK. Tel: +44 1223 245571
Registered in England and Wales: Reg No 4422071.
------["The best things in life aren't things."]------ Opinions==mine