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

 
Output of file : FILENO.C contained in archive : VCCRT2.ZIP
/***
*fileno.c - defines fileno()
*
* Copyright (c) 1989-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
* Defines fileno() - return the file handle for the specified stream
*
*******************************************************************************/

#include

/* remove macro definition for _fileno()
*/
#undef _fileno

/***
*int _fileno(stream) - return the file handle for stream
*
*Purpose:
* Returns the file handle for the given stream is. Normally fileno()
* is a macro, but it is also available as a true function (for
* consistency with ANSI, though it is not required).
*
*Entry:
* FILE *stream - stream to fetch handle for
*
*Exit:
* returns the file handle for the given stream
*
*Exceptions:
*
*******************************************************************************/

int _fileno(stream)
FILE *stream;
{
return( ((int)(unsigned char)(stream)->_file) );
}


  3 Responses to “Category : C++ Source Code
Archive   : VCCRT2.ZIP
Filename : FILENO.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/