[En-Nut-Discussion] New %P handling in printf

Oliver Schulz olischulz at web.de
Sat Dec 13 00:28:16 CET 2003


Hi all,

I have rewritten the %P support for program space strings in printf. There
are no limitations for the string length and now it supports also formatted
strings. Internally it uses the heap to store the string in RAM before the
output occurs. Please checkout the CVS to obtain the latest version.

The type character 'P' is used instead of the 'S' suggestion from Damian
Slee, because 'S' has a different meaning under X/Open gcc environment.

Unfortunately gcc checks the format type characters used in printf,
scanf..., and always generates a warning if using '%P'. If you want to get
rid of these warnings, add '-Wno-format' to the CPFLAGS setting in Makedefs.

Cheers,
Oliver.








More information about the En-Nut-Discussion mailing list