cvs commit: src/include printf.h src/lib/libc/stdio Makefile.inc xprintf.c xprintf_errno.c xprintf_quote.c xprintf_vis.c

Poul-Henning Kamp phk at phk.freebsd.dk
Wed Jan 25 11:15:58 PST 2006


In message <43D7C838.4000202 at elischer.org>, Julian Elischer writes:
>Poul-Henning Kamp wrote:

>>  FreeBSD src repository
>>
>>  Modified files:
>>    include              printf.h 
>>    lib/libc/stdio       Makefile.inc xprintf.c xprintf_vis.c 
>>  Added files:
>>    lib/libc/stdio       xprintf_errno.c xprintf_quote.c 
>>  Log:
>>  Make the %V{is} extension handle a NULL pointer like %s does: output "(null)"
>>  
>>  Add %M{essage} extension which prints an errno value as the
>>  corresponding string if possible or numerically otherwise.
>
>Is this compatible with anyone else?

Not that I know off.  It is an optional extension which you have to
ask for explicitly, so it is non-intrusive as far as stadnards go.

>basically, did this idea come from somewhere? or is it new?

Extending printf is as old as at least SYSIII.

The specific implementation was written to be compatible with GLIBC.

-- 
Poul-Henning Kamp       | UNIX since Zilog Zeus 3.20
phk at FreeBSD.ORG         | TCP/IP since RFC 956
FreeBSD committer       | BSD since 4.3-tahoe    
Never attribute to malice what can adequately be explained by incompetence.


More information about the cvs-src mailing list