Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

50 lines
861 B

/*
Enhanced NCSA Mosaic from Spyglass
"Guitar"
Copyright 1994 Spyglass, Inc.
All Rights Reserved
Author(s):
Eric W. Sink [email protected]
*/
#include "all.h"
#ifndef MAC
/*
This file contains routines for managing
temporary files.
*/
static struct hash_table gTempFiles;
void TEMP_Init(void)
{
Hash_Init(&gTempFiles);
}
int TEMP_Add(char *filename)
{
return Hash_Add(&gTempFiles, filename, NULL, NULL);
}
void TEMP_Cleanup(void)
{
int count;
int i;
char *filename;
if (gPrefs.bDeleteTempFilesOnExit) /* note preferences setting */
{
count = Hash_Count(&gTempFiles);
for (i=0; i<count; i++)
{
Hash_GetIndexedEntry(&gTempFiles, i, &filename, NULL, NULL);
remove(filename);
}
}
Hash_FreeContents(&gTempFiles);
}
#endif /* !MAC */