Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : FPRINTF.C

 
Output of file : FPRINTF.C contained in archive : VCCRT2.ZIP
/***
*fprintf.c - print formatted data to stream
*
* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* defines fprintf() - print formatted data to stream
*
*******************************************************************************/

#include
#include
#include
#include
#include
#include
#include


/***
*int fprintf(stream, format, ...) - print formatted data
*
*Purpose:
* Prints formatted data on the given using the format string to
* format data and getting as many arguments as called for
* _output does the real work here
*
*Entry:
* FILE *stream - stream to print on
* char *format - format string to control data format/number of arguments
* followed by arguments to print, number and type controlled by
* format string
*
*Exit:
* returns number of characters printed
*
*Exceptions:
*
*******************************************************************************/

int
fprintf (FILE *str, const char *format, ...)

/*
* 'F'ile (stream) 'PRINT', 'F'ormatted
*/
{
va_list(arglist);
REG1 FILE _NEAR_ *stream;
REG2 int buffing;
int retval;

va_start(arglist, format);

assert(str != NULL);
assert(format != NULL);

/* Init stream pointer */
stream = (FILE _NEAR_ *) FP_OFF(str);

buffing = _stbuf(stream);
retval = _output(stream,format,arglist);
_ftbuf(buffing, stream);

return(retval);
}


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : FPRINTF.C

  1. Very nice! Thank you for this wonderful archive. I wonder why I found it only now. Long live the BBS file archives!

  2. This is so awesome! 😀 I’d be cool if you could download an entire archive of this at once, though.

  3. But one thing that puzzles me is the “mtswslnkmcjklsdlsbdmMICROSOFT” string. There is an article about it here. It is definitely worth a read: http://www.os2museum.com/wp/mtswslnk/