From mboxrd@z Thu Jan 1 00:00:00 1970 Message-ID: <1e4376178611ea12e72d1a1af020e69b@snellwilcox.com> From: steve-simon@ntlworld.nospam.com To: 9fans@cse.psu.edu MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" Content-Transfer-Encoding: 7bit Subject: [9fans] srprint... Date: Mon, 26 Jan 2004 18:11:39 +0000 Topicbox-Message-UUID: c13fe5e4-eacc-11e9-9e20-41e7f4b1d025 Hi, I copied and modified the standard libraries smprint() producing a mutant srprint(Fmt *f, char *fmt, ...); The idea is that you can call it with a zero'ed Fmt pointer and then keep srprint()ing into an growing buffer. I have a filesystem which generates largeish virtual files (<= 10 Kbytes) which is generated when the file is opened, This seemed to be the best way to do it but I cannot beleive noone has had this problem before. The srprint() returns a pointer to the buffer like smprint() for disposition and eventual free()ing. If there is a cleaner way to do this I would like to know. If people think its nice I could submit it. Not sure if I'am proud or ashamed... -Steve