This is the bug/patch tracker for Rockbox. Click here for more information.
Quick links: Bugs · Patches · Rockbox frontpage
FS#7030 - Adds the printf format for pointers (%p or %P)
Attached to Project:
Rockbox
Opened by Alexander Levin (fml2) - Saturday, 14 April 2007, 17:40 GMT+2
Opened by Alexander Levin (fml2) - Saturday, 14 April 2007, 17:40 GMT+2
|
DetailsThis adds the printf format for pointers. Use %p or %P.
Example: int *p; printf("Int value at %p is %d", p, *p); Also corrected the code indentation and factored out duplicated code. |
This task depends upon
Closed by Peter D'Hoye (petur)
Monday, 16 April 2007, 13:33 GMT+2
Reason for closing: Rejected
Additional comments about closing: the addition to the bin size just isn\'t worth it
Monday, 16 April 2007, 13:33 GMT+2
Reason for closing: Rejected
Additional comments about closing: the addition to the bin size just isn\'t worth it
Also fixed copy&paste error.
For example, H300 went from 414528 to 414868 (+340 bytes)
Apart from that, I did look at the patch and enhanced it a bit, so here's my version.
The inline is used because performance is important
I've added the %p tag because I wanted to investigate how pointers are affected by IRAM attributes and found out that the tag isn't present in RB. Should I cast pointers to long to display them?
@petur: why do you think performance in printf is so important? Could we trade a little bit of speed for binary size?