Re: close(writefile)

new topic     » goto parent     » topic index » view thread      » older message » newer message
DerekParnell said...

It might be possible to change the built-in close routine into a function that returns -1 when it successfully closes a file, but we'd have to think that through a bit more for ramifications to existing code.


But -1 is an error flag. A file being closed isn't an error, i have at least 100 lbs of closed files. For now, i set writefile to zero to detect if i ever opened the writefile in question. So 4 = i'm writing, -1 = there's some error, 0 = better open it first. Come to think of it, maybe some other (nested) flag(s) which also show(s) how it was open, like "ab", or "w", and when, and maybe who.

useless

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu