mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-11-29 22:51:49 +01:00
tiny-printf: Reduce size by removing ctype
The ctype array is brought into the image, adding 256 bytes, when it is unlikely to be needed. The extra code for %p is only present when DEBUG is defined, so let's drop ctype as well unless DEBUG is defined. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
2333dc47b8
commit
1c1c8a3a99
@ -289,8 +289,15 @@ static int _vprintf(struct printf_info *info, const char *fmt, va_list va)
|
|||||||
break;
|
break;
|
||||||
case 'p':
|
case 'p':
|
||||||
pointer(info, fmt, va_arg(va, void *));
|
pointer(info, fmt, va_arg(va, void *));
|
||||||
|
/*
|
||||||
|
* Skip this because it pulls in _ctype which is
|
||||||
|
* 256 bytes, and we don't generally implement
|
||||||
|
* pointer anyway
|
||||||
|
*/
|
||||||
|
#ifdef DEBUG
|
||||||
while (isalnum(fmt[0]))
|
while (isalnum(fmt[0]))
|
||||||
fmt++;
|
fmt++;
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
case '%':
|
case '%':
|
||||||
out(info, '%');
|
out(info, '%');
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user