[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
doc open-file binary mode
From: |
Kevin Ryde |
Subject: |
doc open-file binary mode |
Date: |
Fri, 06 Aug 2004 09:52:40 +1000 |
User-agent: |
Gnus/5.110003 (No Gnus v0.3) Emacs/21.3 (gnu/linux) |
A few words for the "b" in open-file. slib seems to make use of this,
so unless it's supposed to be a secret it may as well be described.
`b'
Use binary mode. On DOS systems the default text mode
converts CR+LF in the file to newline for the program,
whereas binary mode reads and writes all bytes unchanged. On
Unix-like systems there is no such distinction, text files
already contain just newlines and no conversion is ever made.
The `b' flag is accepted on all systems, but has no effect
on Unix-like systems.
(For reference, Guile leaves text versus binary up to the C
library, `b' here just adds `O_BINARY' to the underlying
`open' call, when that flag is available.)
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- doc open-file binary mode,
Kevin Ryde <=