[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

John Goerzen jgoerzen at complete.org
Fri Apr 23 14:55:58 UTC 2010


The following commit has been merged in the master branch:
commit 1b2809c2484309b40931549fd5d5bd05c6edf260
Author: John Goerzen <jgoerzen at complete.org>
Date:   Wed Apr 6 00:15:23 2005 +0100

    Switch to binary I/O where appropriate
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-216)

diff --git a/ChangeLog b/ChangeLog
index e358a6d..e8e98fc 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2005-04-05 18:15:23 GMT	John Goerzen <jgoerzen at complete.org>	patch-216
+
+    Summary:
+      Switch to binary I/O where appropriate
+    Revision:
+      missingh--head--0.7--patch-216
+
+
+    modified files:
+     ChangeLog MissingH/Network/FTP/Client.hs testsrc/GZiptest.hs
+
+
 2005-04-05 18:06:18 GMT	John Goerzen <jgoerzen at complete.org>	patch-215
 
     Summary:
diff --git a/MissingH/Network/FTP/Client.hs b/MissingH/Network/FTP/Client.hs
index 985f8f2..9df8412 100644
--- a/MissingH/Network/FTP/Client.hs
+++ b/MissingH/Network/FTP/Client.hs
@@ -1,5 +1,5 @@
 {- arch-tag: FTP client support
-Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+Copyright (C) 2004-2005 John Goerzen <jgoerzen at complete.org>
 
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
@@ -18,7 +18,7 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 {- |
    Module     : MissingH.Network.FTP.Client
-   Copyright  : Copyright (C) 2004 John Goerzen
+   Copyright  : Copyright (C) 2004-2005 John Goerzen
    License    : GNU GPL, version 2 or above
 
    Maintainer : John Goerzen, 
@@ -225,6 +225,7 @@ where
 import MissingH.Network.FTP.ParserClient
 import Network.BSD
 import Network.Socket
+import MissingH.IO.Binary
 import qualified Network
 import System.IO
 import System.IO.Unsafe
@@ -440,13 +441,13 @@ putbinary h fn input = storbinary h ("STOR " ++ fn) input
 
 {- | Uploads a file from disk in binary mode. Note: filename is used for both local and remote. -}
 uploadbinary :: FTPConnection -> String -> IO FTPResult
-uploadbinary h fn = do input <- readFile fn
+uploadbinary h fn = do input <- readBinaryFile fn
                        putbinary h fn input
 
 {- | Downloads a file from remote and saves to disk in binary mode.  Note: filename is used for both local and remote. -}
 downloadbinary :: FTPConnection -> String -> IO FTPResult
 downloadbinary h fn = do r <- getbinary h fn
-                         writeFile fn (fst r)
+                         writeBinaryFile fn (fst r)
                          return (snd r)
 
 {- | Retrieves a list of files in the given directory. 
diff --git a/testsrc/GZiptest.hs b/testsrc/GZiptest.hs
index f7801bb..f5916de 100644
--- a/testsrc/GZiptest.hs
+++ b/testsrc/GZiptest.hs
@@ -20,12 +20,13 @@ module GZiptest(tests) where
 import HUnit
 import MissingH.FileArchive.GZip
 import MissingH.Compression.Inflate
+import MissingH.IO.Binary
 import System.IO
 import MissingH.Either
 import Data.List
 
 mf fn exp conf = TestLabel fn $ TestCase $
-                     do c <- readFile ("testsrc/gzfiles/" ++ fn)
+                     do c <- readBinaryFile ("testsrc/gzfiles/" ++ fn)
                         assertEqual "" exp (conf c)
 
 {-

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list