From: simonmar Date: Tue, 2 Jul 2002 10:28:54 +0000 (+0000) Subject: [project @ 2002-07-02 10:28:54 by simonmar] X-Git-Tag: nhc98-1-18-release~958 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=39c6f41cae15d5ef12c347af6b2bdfd2710fc1d5;p=ghc-base.git [project @ 2002-07-02 10:28:54 by simonmar] Documentation for hSetBinaryMode --- 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_ ->