Subject: Re: printf formats again
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Greg A. Woods <woods@kuma.web.net>
List: current-users
Date: 11/17/1996 02:35:33
[ On Wed, November 13, 1996 at 21:56:53 (-0500), John F. Woods wrote: ]
> Subject: printf formats again
>
> Perhaps, though, at least the popular typedef'd types could use the
> same kind of extension mechanism; %Ioff_t for off_t (however wide your
> compilation system make it), %Isize_t, and so on.  (You can either
> limit it to the "_t" types, or explicitly terminate the name with ' or
> something, or use the ugly string-concatenation hack that's used to
> get around the lack of explicit termination for \x (i.e. "\xaa" "aa"
> to avoid generating the "character" \xaaaa).)

Maybe, but I'd personally far prefer something like

	printf("%B*", sizeof(off_t), (off_t) foo);

This should solve the problem for user-supplied types too.

-- 
							Greg A. Woods

+1 416 443-1734			VE3TCP			robohack!woods
Planix, Inc. <woods@planix.com>; Secrets Of The Weird <woods@weird.com>