Add purge mode.

This commit is contained in:
David F. Skoll
2010-04-20 10:59:57 -04:00
parent 184d29c592
commit 31f90b6c53
5 changed files with 24 additions and 11 deletions
+8
View File
@@ -101,6 +101,14 @@ static int PopFile (void);
static void OpenPurgeFile(char const *fname, char const *mode)
{
DynamicBuffer fname_buf;
/* Do not open a purge file if we're below purge
include depth */
if (IStackPtr-2 >= PurgeIncludeDepth) {
PurgeFP = NULL;
return;
}
DBufInit(&fname_buf);
if (DBufPuts(&fname_buf, fname) != OK) return;
if (DBufPuts(&fname_buf, ".purged") != OK) return;