Commit 5d6b3bc5 authored by Simon Marlow's avatar Simon Marlow

Unbreak these programs after Unicode IO support was added

Set binary mode on Handles appropriately.
parent 3a2f4aca
......@@ -16,10 +16,13 @@ module Main (main) where
import Defaults
import BinConv -- binary conversion routines
import Encode -- coding routine
import System.IO
main = getContents >>= \ inp ->
putStr (compress inp)
main = do
hSetBinaryMode stdin True
hSetBinaryMode stdout True
inp <- getContents
putStr (compress inp)
{- To compress a string we first encode it, then convert it to n-bit binaries
- convert back to decimal as ascii-bit values and then to characters
......
......@@ -7,9 +7,13 @@ where
import Encode
import WriteRoutines
import System.IO
main = getContents >>= \ i ->
putStr (compress i)
main = do
hSetBinaryMode stdin True
hSetBinaryMode stdout True
i <- getContents
putStr (compress i)
-- The output is given by a magic header consisting of two fixed numbers,
-- and a third representing the maximum number of bits used per code and
......
......@@ -32,6 +32,7 @@ import Matrix
import Patchlevel
import System
import System.IO
main = do
argv <- getArgs
......@@ -39,6 +40,7 @@ main = do
n = case argv of
[a] -> read a
_ -> 7
hSetBinaryMode stdout True
putStr (picture n)
picture n = go n pic
......
......@@ -36,11 +36,14 @@ import Tags
import Parse
import System.IO
--proof_edit : string list * string list -> unit
main = do
hSetBinaryMode stdin True
hSetBinaryMode stdout True
ins <- getContents
putStr (main' ins)
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment