Patch to improve CLHS compliance of file-position
authorNils Bruin <nbruin@sfu.ca>
Tue, 27 Jan 2015 02:30:04 +0000 (18:30 -0800)
committerNils Bruin <nbruin@sfu.ca>
Tue, 27 Jan 2015 02:30:04 +0000 (18:30 -0800)
commit8a2d0c96e8d53187ef8c6d28c49972d197f8d651
tree727e43576d92c9034a979c5f1ea2e362f772b2ba
parente8dd76ffee07193e9e8e06a249a57e56f18a2ae8
Patch to improve CLHS compliance of file-position

CLHS mandates that failure to determine or set the file position on a
stream should be signalled by returning NIL rather than raising an error.

Also, POSIX does not mandate that lseek fail on terminals, but these devices
obviously are not seekable. Hence, CLHS compliance is improved by explicitly
returning NIL when the requested stream is a tty.
src/c/file.d