Handle '%' and 'p' in printf format strings.

'p' support is just the same as 'x'.