From: steve-simon@ntlworld.nospam.com
To: 9fans@cse.psu.edu
Subject: [9fans] srprint...
Date: Mon, 26 Jan 2004 18:11:39 +0000 [thread overview]
Message-ID: <1e4376178611ea12e72d1a1af020e69b@snellwilcox.com> (raw)
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
next reply other threads:[~2004-01-26 18:11 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-01-26 18:11 steve-simon [this message]
2004-01-26 18:53 ` rog
2004-01-27 10:15 ` Steve Simon
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1e4376178611ea12e72d1a1af020e69b@snellwilcox.com \
--to=steve-simon@ntlworld.nospam.com \
--cc=9fans@cse.psu.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).