[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:49:56 UTC 2010


The following commit has been merged in the master branch:
commit 181f3b529d54f566291e3af24085ecb227cad147
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sat Dec 4 09:37:21 2004 +0100

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

diff --git a/ChangeLog b/ChangeLog
index 15b1bb2..19482bb 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
 #
 
+2004-12-04 02:37:21 GMT	John Goerzen <jgoerzen at complete.org>	patch-35
+
+    Summary:
+      Checkpointing
+    Revision:
+      missingh--head--0.7--patch-35
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/FileArchive/GZip.hs
+     testsrc/GZiptest.hs
+
+
 2004-12-04 02:32:59 GMT	John Goerzen <jgoerzen at complete.org>	patch-34
 
     Summary:
diff --git a/libsrc/MissingH/FileArchive/GZip.hs b/libsrc/MissingH/FileArchive/GZip.hs
index c473fd3..5b2bd5a 100644
--- a/libsrc/MissingH/FileArchive/GZip.hs
+++ b/libsrc/MissingH/FileArchive/GZip.hs
@@ -51,7 +51,10 @@ data Header = Header {
                       flags :: Int,
                       extra :: Maybe String,
                       filename :: Maybe String,
-                      comment :: Maybe String
+                      comment :: Maybe String,
+                      mtime :: Word32,
+                      xfl :: Int,
+                      os :: Int
                      } deriving (Eq, Show)
 
 split1 :: String -> (Char, String)
@@ -134,8 +137,12 @@ read_header s =
           else ok
        let (flag_S, rem3) = split1 rem2
        let flag = ord flag_S
-       --let (mtimea, rem3a) = splitAt 4 rem2
-       --let mtime = 
+       let (mtimea, rem3a) = splitAt 4 rem3
+       let mtime = parseword mtimea
+       let (xfla, rem3b) = split1 rem3a
+       let xfl = ord xfla
+       let (osa, rem3c) = split1 rem3b
+       let os = ord osa
        -- skip modtime (4), extraflag (1), and os (1)
        let rem4 = drop 6 rem3
        
@@ -172,4 +179,7 @@ read_header s =
                       flags = flag,
                       extra = extra,
                       filename = filename,
-                      comment = comment}, rem8)
+                      comment = comment,
+                      mtime = mtime,
+                      xfl = xfl,
+                      os = os}, rem8)
diff --git a/testsrc/GZiptest.hs b/testsrc/GZiptest.hs
index be5252a..49fcc9b 100644
--- a/testsrc/GZiptest.hs
+++ b/testsrc/GZiptest.hs
@@ -40,10 +40,12 @@ test_header =
         in
         [
          f "t1.gz" Header {method = 8, flags = 0, extra = Nothing,
-                            filename = Nothing, comment = Nothing}
+                            filename = Nothing, comment = Nothing,
+                          mtime = 1102111446, xfl = 2, os = 3}
         ,f "empty.gz" Header {method = 8, flags = 8, extra = Nothing,
                               filename = Just "empty", 
-                              comment = Nothing}
+                              comment = Nothing,
+                             mtime = 1102127257, xfl = 0, os = 3}
         ]
 
 test_gunzip =

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list