From 39c6f41cae15d5ef12c347af6b2bdfd2710fc1d5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Tue, 2 Jul 2002 10:28:54 +0000 Subject: [PATCH] [project @ 2002-07-02 10:28:54 by simonmar] Documentation for hSetBinaryMode --- GHC/Handle.hs | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/GHC/Handle.hs b/GHC/Handle.hs index c927e13..87303f8 100644 --- a/GHC/Handle.hs +++ b/GHC/Handle.hs @@ -1188,6 +1188,14 @@ hIsTerminalDevice handle = do -- ----------------------------------------------------------------------------- -- hSetBinaryMode +-- | On Windows, reading a file in text mode (which is the default) will +-- translate CRLF to LF, and writing will translate LF to CRLF. This +-- is usually what you want with text files. With binary files this is +-- undesirable; also, as usual under Microsoft operating systems, text +-- mode treats control-Z as EOF. Setting binary mode using +-- 'hSetBinaryMode' turns off all special treatment of end-of-line and +-- end-of-file characters. +-- hSetBinaryMode :: Handle -> Bool -> IO () hSetBinaryMode handle bin = withAllHandles__ "hSetBinaryMode" handle $ \ handle_ -> -- 1.7.10.4