Xref: utzoo comp.lang.c:17121 comp.unix.wizards:15166 Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!ucbvax!tut.cis.ohio-state.edu!osu-cis!att!chinet!les From: les@chinet.chi.il.us (Leslie Mikesell) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: How to predict size of outcome of vsprintf? Message-ID: <7992@chinet.chi.il.us> Date: 22 Mar 89 23:26:58 GMT References: <993@etnibsd.UUCP> <9872@smoke.BRL.MIL> <28831@bu-cs.BU.EDU> <1618@thor.acc.stolaf.edu> <9979@bloom-beacon.MIT.EDU> <28874@bu-cs.BU.EDU> Reply-To: les@chinet.chi.il.us (Leslie Mikesell) Followup-To: comp.lang.c Organization: Chinet - Public Access Unix Lines: 15 In article <28874@bu-cs.BU.EDU> bzs@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