Mail Archives: djgpp/1997/10/16/12:46:34
Jonathan Foster (jgf1 AT ukc DOT ac DOT uk) wrote:
: Peter Palotas wrote:
: > Is there a way to find out the length of the string that sprintf() will
: > generate, without writing it anywhere?
: The "fprintf" command will return the number of characters output,
I thought it returns the number of correctly parsed arguments after
the format string. But my Solaris man pages say you are right.
: and you should fopen DOS's "NULL" file to send the output to.
You mean NUL. Not very portable solution.
: "NULL" is a "black hole" which will swallow and ignore anything you
: send to it. Although "NULL" never appears in a directory, it
: exists everywhere. (I think the UNIX equivalent is "/dev/nul",
: but I've never used UNIX.)
That's "/dev/null" or "/dev/zero". Works for DJGPP too, automagicly :)
--
Groeten, Michel. http://www.cs.vu.nl/~mdruiter
\----/==\----/
\ / \ / "You know, Beavis, you need things that suck,
\/ \/ to have things that are cool", Butt-Head.
- Raw text -