Subject: Re: printf formats again
To: Chris G Demetriou <>
From: Don Lewis <>
List: current-users
Date: 11/17/1996 17:09:13
On Nov 17,  7:49pm, Chris G Demetriou wrote:
} Subject: Re: printf formats again
} > 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.
} I like this idea, a lot better than anything that involves having
} printf parse the strings looking for type names and then switching
} based on the type.  That's just too inflexible.

But this only works if the arguments aren't composite types.  If
you wanted to have a 64 bit off_t but didn't have compiler support
for any 64 bit integral types, you'd be out of luck.  For instance
if long was only 32 bits and integral types larger than long were't
allowed ...

I just thought of something totally disgusting -- what if you were willing
to settle for something somewhat less than 64 bits and used a double for
off_t?  You'd break less code because you could still do arithmetic on it.

			---  Truck