diff options
Diffstat (limited to 'source/compiler/aslfiles.c')
-rw-r--r-- | source/compiler/aslfiles.c | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/source/compiler/aslfiles.c b/source/compiler/aslfiles.c index bc5b52d..7aa426c 100644 --- a/source/compiler/aslfiles.c +++ b/source/compiler/aslfiles.c @@ -63,6 +63,7 @@ FlParseInputPathname ( #endif + /******************************************************************************* * * FUNCTION: AslAbort @@ -376,6 +377,42 @@ FlCloseFile ( /******************************************************************************* * + * FUNCTION: FlDeleteFile + * + * PARAMETERS: FileId - Index into file info array + * + * RETURN: None + * + * DESCRIPTION: Delete a file. + * + ******************************************************************************/ + +void +FlDeleteFile ( + UINT32 FileId) +{ + ASL_FILE_INFO *Info = &Gbl_Files[FileId]; + + + if (!Info->Filename) + { + return; + } + + if (remove (Info->Filename)) + { + printf ("%s (%s file) ", + Info->Filename, Info->Description); + perror ("Could not delete"); + } + + Info->Filename = NULL; + return; +} + + +/******************************************************************************* + * * FUNCTION: FlSetLineNumber * * PARAMETERS: Op - Parse node for the LINE asl statement |