Fix REPOSITION-FILE, HISTORY, locked file handle and other problems.
[debian/pforth] / csrc / pfcompil.c
index dcb386f7569f5891b44074c2f38c2d17ff25ef52..84546c4d590be89a985ce8e2294aae6986218b85 100644 (file)
@@ -927,7 +927,7 @@ ThrowCode ffOuterInterpreterLoop( void )
 }\r
 \r
 /***************************************************************\r
-** Include a file\r
+** Include then close a file\r
 ***************************************************************/\r
 \r
 ThrowCode ffIncludeFile( FileStream *InputFile )\r
@@ -963,6 +963,9 @@ ThrowCode ffIncludeFile( FileStream *InputFile )
 /* Pop file stream. */\r
        ffPopInputStream();\r
        \r
+/* ANSI spec specifies that this should also close the file. */\r
+       sdCloseFile(InputFile);\r
+\r
        return exception;\r
 }\r
 \r