diff options
author | John van Groningen | 2013-03-13 14:02:48 +0000 |
---|---|---|
committer | John van Groningen | 2013-03-13 14:02:48 +0000 |
commit | a7235fae6f128e60319488f2821b0fd065aea190 (patch) | |
tree | f2d3819f551e4a5dcb89f4a33892d82c40ce4203 | |
parent | add [rip] to a lea instruction (diff) |
change result type of close_file to long,
decrement number_of_files if the file with the highest number is closed
-rw-r--r-- | ufileIO2.c | 5 |
1 files changed, 4 insertions, 1 deletions
@@ -389,7 +389,7 @@ long open_stderr (void) return 0; } -int close_file (long fn) +long close_file (long fn) { if (fn<FIRST_REAL_FILE){ if (fn==1){ @@ -422,6 +422,9 @@ int close_file (long fn) f->file=NULL; + if (fn==number_of_files-1) + --number_of_files; + return result; } } |