Xref: utzoo comp.lang.c:17104 comp.unix.wizards:15144 Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!eecae!tank!mimsy!chris From: chris@mimsy.UUCP (Chris Torek) Newsgroups: comp.lang.c,comp.unix.wizards Subject: Re: How to predict size of outcome of vsprintf? Message-ID: <16484@mimsy.UUCP> Date: 22 Mar 89 09:35:02 GMT References: <993@etnibsd.UUCP> <9872@smoke.BRL.MIL> <28831@bu-cs.BU.EDU> <28874@bu-cs.BU.EDU> Organization: U of Maryland, Dept. of Computer Science, Coll. Pk., MD 20742 Lines: 12 In article <28874@bu-cs.BU.EDU> bzs@bu-cs.BU.EDU (Barry Shein) writes: >The [limiting problem] could be solved completely transparently by adding >a format effector which indicated the maximum buffer size ("must come >first!") Such as using %n# as in: `#' is out; it is a flag (meaning `alternate output format' and used by o, x, and e f and g conversions). But aesthetically speaking, it seems to me that this is almost as bad as the `%n' format. (Well, maybe half as bad.) I would prefer snprintf() and/or msprintf(). -- In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163) Domain: chris@mimsy.umd.edu Path: uunet!mimsy!chris