[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:52:43 UTC 2010


The following commit has been merged in the master branch:
commit b4d0be732c9df5fcaae1af3f777589186ef2fe96
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Dec 21 23:37:11 2004 +0100

    Checkpointing
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.7--patch-126)

diff --git a/ChangeLog b/ChangeLog
index 1bdd62e..052ec55 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-21 16:37:11 GMT	John Goerzen <jgoerzen at complete.org>	patch-126
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-126
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/Network/FTP/ParserServer.hs
+
+
 2004-12-21 16:24:37 GMT	John Goerzen <jgoerzen at complete.org>	patch-125
 
     Summary:
diff --git a/libsrc/MissingH/Network/FTP/ParserServer.hs b/libsrc/MissingH/Network/FTP/ParserServer.hs
index f3f4d67..994914f 100644
--- a/libsrc/MissingH/Network/FTP/ParserServer.hs
+++ b/libsrc/MissingH/Network/FTP/ParserServer.hs
@@ -46,9 +46,10 @@ import MissingH.Str
 import MissingH.Logging.Logger
 import Network.Socket(SockAddr(..), PortNumber(..), inet_addr, inet_ntoa)
 import System.IO(Handle, hGetContents)
-import System.IO.Unsafe
+import System.IO(hGetLine)
 import Text.Regex
 import Data.Word
+import MissingH.Hsemail.Rfc2234(alpha)
 type FTPResult = (Int, [String])
 
 logit :: String -> IO ()
@@ -58,3 +59,29 @@ logit m = debugM "MissingH.Network.FTP.ParserServer" ("FTP received: " ++ m)
 -- Utilities
 ----------------------------------------------------------------------
 
+word = many1 alpha
+
+args :: Parser String
+args = try (do char ' '
+               r <- many anyChar
+               eof 
+               return r)
+       <|> return ""
+       
+
+command :: Parser (String, String)
+command = do
+          x <- word
+          y <- args
+          eof
+          return (x, y)
+
+
+parseCommand :: Handle -> IO (String, String)
+parseCommand h =
+    do input <- hGetLine h
+       case parse command "(unknown)" (rstrip input) of
+          Left err -> fail ("FTP: " ++ (show err))
+          Right reply -> return reply
+
+       
\ No newline at end of file

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list