[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: printf(3): add support for z and t modifiers



On Sat, 18 Sep 2004, Otto Moerbeek wrote:

> Hi,
> 
> this adds support for the C99 z and t modifiers to printf(3).
> 
> Currently, the only safe way to print a size_t v is:
> 
> 	printf("%llu", (unsigned long long) v);
> 
> Since the size of size_t can be 32 or 64 bits, depending on arch.
> 
> With this diff you can just do:
> 
> 	printf("%zu", v);
> 
> '%td' can be used in the same way for ptrdiff_t.
> 
> Please review and test this diff; it promises to make lives of C 
> programmers easier.

Well, sometimes things move fast. This has just been commited. But that 
does not mean that testing and reviewing is futile... 

	-Otto



Visit your host, monkey.org