How to predict size of outcome of vsprintf?
Leslie Mikesell
les at chinet.chi.il.us
Thu Mar 23 09:26:58 AEST 1989
In article <28874 at bu-cs.BU.EDU> bzs at bu-cs.BU.EDU (Barry Shein) writes:
>Ok, there are two thoughts here:
> 1. How to find out the number of characters a printf
> operation will generate.
> 2. How to limit a printf operation to a buffer size.
Or a third, which is what I usually want:
3. Give me a pointer to a buffer with my formatted string in it.
This is trivial after doing operation (1) but shouldn't it
be possible to do it in one operation?
Les Mikesell
More information about the Comp.unix.wizards
mailing list