Category : C Source Code
Archive   : CSRC2.ZIP
Filename : FILENO.C

 
Output of file : FILENO.C contained in archive : CSRC2.ZIP
/*
* f i l e n o . c
*/

/*)LIBRARY
*/

#ifdef DOCUMENTATION

title fileno Return file number
index Return file number

synopsis
s.nf
fileno(iop)
FILE *iop;
.s.f
Description

Return file number (small integer)

Bugs

#endif

#include
#ifdef fileno
#undef fileno
#endif

#ifdef rsx
extern char *F_LUN;
#endif

int
fileno(fd)
FILE *fd;
/*
* Return file number
*/
{
#ifdef rt11
return (fd->io_lun);
#else
#ifdef rsx
return (fd->io_fdb[(int) &F_LUN]);
#else
return (fd - _iob);
#endif
#endif
}


  3 Responses to “Category : C Source Code
Archive   : CSRC2.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/