[comp.lang.c] _doprnt and _flsbuf

tada@athena.mit.edu (Michael Zehr) (08/10/89)

(i posed this question locally a few weeks ago but got no response, so
i'm trying again with wider distribution)

i'm trying to port some software from unix to vms operating system.  the
software redefines some standard functions, and makes use of
non-standard macros.  in particular _flsbuf and _doprnt.  on this
system, _flsbuf is referenced in <stdio.h> in putc, but i can't find the
definition for it anywhere.  

i can guess what the definition for each of these is by their context,
but if anyone has the actual definitions, i'd appreciate them just in
case they do something unexpected.

thankx in advance,
michael j zehr

gwyn@smoke.BRL.MIL (Doug Gwyn) (08/11/89)

In article <13411@bloom-beacon.MIT.EDU> tada@athena.mit.edu (Michael Zehr) writes:
>i'm trying to port some software from unix to vms operating system.  the
>software redefines some standard functions, and makes use of
>non-standard macros.  in particular _flsbuf and _doprnt.

_doprnt() is almost always used in a context where the code can be changed
to use the v*printf() standard library functions instead.

I've never heard before of an application using _flsbuf(), but you may be
able to change the code to use the standard library function fflush() instead.

bph@buengc.BU.EDU (Blair P. Houghton) (08/12/89)

In article <13411@bloom-beacon.MIT.EDU> tada@athena.mit.edu (Michael Zehr) writes:
>non-standard macros.  in particular _flsbuf and _doprnt.  on this
>system, _flsbuf is referenced in <stdio.h> in putc, but i can't find the
>definition for it anywhere.  

Aren't these things hidden in the definitions for (s,v,f,vs,vf)printf()?

Similarly _doscan et al in the scan routines?

I've run accross them in debugging, but never had reason to call them
directly.

				--Blair
				  "Heck, I don't even call Mom,
				   much, anymore..."