Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!decwrl!amdcad!diablo.amd.com!srini From: srini@diablo.amd.com Newsgroups: comp.unix.questions Subject: printf implementation again Message-ID: <29039@amdcad.AMD.COM> Date: 2 Feb 90 23:48:53 GMT Sender: news@amdcad.AMD.COM Reply-To: srini@diablo.amd.com () Organization: Advanced Micro Devices, Inc. Sunnyvale CA Lines: 22 In article <22238@mimsy.umd.edu> you write: >>Also, how is printf implemeted (upto the _write level) in library? >>It calls a function _doprnt. What happens from there? > >What makes you think it calls _doprnt? Mine calls vfprintf. 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. Other functions that are involved are _fwrite (where memcpy is done?), _fconv, which converts everything (?) to strings so that they can be printed. There may be others. 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)? Srini ----- Post reply. Or send to srini@cayman.amd.com.