From 44ffa3ef93db8a4f5c56dfcb49ec7cb1e4c613f8 Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Thu, 4 Aug 2011 10:44:41 +0000 Subject: [PATCH] format/*printf: Add simple support for %p format specifier. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@30249 a1c6a512-1295-4272-9138-f99709370657 --- firmware/common/format.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/firmware/common/format.c b/firmware/common/format.c index afe1010cfb..60c50ccd89 100644 --- a/firmware/common/format.c +++ b/firmware/common/format.c @@ -111,7 +111,12 @@ void format( } while (uval > 0); break; - + case 'p': + case 'P': + /* for pointers prepend 0x and act like 'X' */ + push(userp, '0'); + push(userp, 'x'); + /* fall through */ case 'x': case 'X': pad='0'; -- 2.11.4.GIT