printf implementation again
Chris Torek
chris at mimsy.umd.edu
Sun Feb 4 07:36:32 AEST 1990
In article <29039 at amdcad.AMD.COM> srini at diablo.amd.com writes:
>Does vprintf call _doprnt? From what I have found so far, _doprnt
>is called, _flsbuf is called to flush buffer, and a memory copy
>(memcpy) is done to copy from buffer to file.
If you were to trace my stdio, you would see:
1. printf/fprintf/sprintf
2. vfprintf
3. __spstr (someday, a static symbol)
4. (if buffer fills) __swrite + write
You would also find that there is no function called `_doprnt'.
>If all these are implementation dependent, then let me rephrase my
>original question. What are the factors that are assumed or
>considered to implement printf or in the already existing printf
>implementation(s)?
All the details are implementation dependent: I suspect neither
__spstr nor __swrite appear in any other stdio, nor will I say what
their call sequence is. In my implementation, vfprintf() (with
funopen(), a new function that opens functions to do I/O) gives you
everything you need.
The factors that are assumed and considered are those outlined in
the ANSI standard or the SVID or some other applicable standard.
--
In-Real-Life: Chris Torek, Univ of MD Comp Sci Dept (+1 301 454 7163)
Domain: chris at cs.umd.edu Path: uunet!mimsy!chris
More information about the Comp.unix.questions
mailing list