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

 
Output of file : RMTMP.C contained in archive : VCCRT2.ZIP
/***
*rmtmp.c - remove temporary files created by tmpfile.
*
* Copyright (c) 1985-1992, Microsoft Corporation. All rights reserved.
*
*Purpose:
*
*******************************************************************************/

#include
#include
#include
#include


/***
*int _rmtmp() - closes and removes temp files created by tmpfile
*
*Purpose:
* closes and deletes all open files that were created by tmpfile.
*
*Entry:
* None.
*
*Exit:
* returns number of streams closed
*
*Exceptions:
*
*******************************************************************************/

int
_rmtmp ()
{
REG1 FILE _NEAR_ *stream = _iob;
REG2 int count = 0;


for (; stream <= _lastiob; stream++) {


if (inuse(stream) && _tmpnum(stream) ) {
fclose(stream);
count++;
}

}


return(count);
}


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