Error checking was added in various places throughout dos33 code.
Notes:
I didn't test thoroughly, but I did run the included tests (which passed), and confirmed my specific use case (from #13)
there are a lot of repetitive checks now; I avoided some repetition with a macro in main(), perhaps I should have introduced an additional macro for the common "check the result of read() or write()" cases as well?
In general I've used an exit status of 2 to indicate a problem with the way the user invoked the program, and 1 to indicate a general problem or failure. This seems to match a common Unix custom.
Intended to address #13.
Error checking was added in various places throughout dos33 code.
Notes:
main()
, perhaps I should have introduced an additional macro for the common "check the result ofread()
orwrite()
" cases as well?2
to indicate a problem with the way the user invoked the program, and1
to indicate a general problem or failure. This seems to match a common Unix custom.