Subject: Re: printf formats again
To: John F. Woods <jfw@jfwhome.funhouse.com>
From: Don Lewis <Don.Lewis@tsc.tdk.com>
List: current-users
Date: 11/14/1996 07:06:01
On Nov 13,  9:56pm, "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).)

Would something like %I(off_t) be legal?  Kinda looks like a cast ;-)

} Unfortunately, if you don't do all the system supplied types, users
} have to constantly refer to the manual to figure out which types are
} supported and which aren't; if you resolve to do all the system
} supplied types, you have to update printf.c (and friends) every time
} you add a new type, PLUS you encourage users to whine about it not
} working for THEIR typedefs as well.

How about a table driven mechanism for the types that printf doesn't
understand?

			---  Truck