* doc open-file binary mode
@ 2004-08-05 23:52 Kevin Ryde
0 siblings, 0 replies; only message in thread
From: Kevin Ryde @ 2004-08-05 23:52 UTC (permalink / raw)
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.)
_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/guile-devel
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2004-08-05 23:52 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-08-05 23:52 doc open-file binary mode Kevin Ryde
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).