Fix REPOSITION-FILE, HISTORY, locked file handle and other problems.
[debian/pforth] / csrc / pf_core.c
index 41fa5f718226c47885fbe541452246708c8f1747..0564a65b62d89e5b641d293286c95e99c544f5c8 100644 (file)
@@ -371,12 +371,11 @@ cell_t pfIncludeFile( const char *FileName )
        pfCopyMemory( &buffer[4], &FileName[len-numChars], numChars+1 );\r
        CreateDicEntryC( ID_NOOP, buffer, 0 );\r
        \r
-       Result = ffIncludeFile( fid );\r
+       Result = ffIncludeFile( fid ); /* Also close the file. */\r
        \r
 /* Create a dictionary word named ;;;; for FILE? */\r
        CreateDicEntryC( ID_NOOP, ";;;;", 0 );\r
        \r
-       sdCloseFile(fid);\r
        return Result;\r
 }\r
 \r