Category : Files from Magazines
Archive   : CUJ9201.ZIP
Filename : 1001014A

 
Output of file : 1001014A contained in archive : CUJ9201.ZIP
Listing 2 -- the file fopen.c


/* fopen function */
#include
#include "xstdio.h"

FILE *(fopen)(const char *name, const char *mods)
{ /* open a file */
FILE *str;
size_t i;

for (i = 0; i < FOPEN_MAX; ++i)
if (_Files[i] == NULL)
{ /* setup empty _Files[i] */
str = malloc(sizeof (FILE));
if (str == NULL)
return (NULL);
_Files[i] = str;
str->_Mode = _MALFIL;
break;
}
else if (_Files[i]->_Mode == 0)
{ /* setup preallocated _Files[i] */
str = _Files[i];
break;
}
if (FOPEN_MAX <= i)
return (NULL);
return (_Foprep(name, mods, str));
}




  3 Responses to “Category : Files from Magazines
Archive   : CUJ9201.ZIP
Filename : 1001014A

  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/