adjust to use UInt16 for block in EState
authorJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 19:14:08 +0000 (15:14 -0400)
committerJoey Hess <joey@kitenet.net>
Mon, 12 Sep 2011 19:14:08 +0000 (15:14 -0400)
This is a bit weird, but the old-bzip2 used a UInt16 rather than a UChar
in the data structire, and the new blocksort code seems to work fine
that way, which avoids needing two data structures.

pristine-tar.spec
zgz/old-bzip2/blocksort-1.0.c

index 0a1b95b..5387e50 100644 (file)
@@ -1,5 +1,5 @@
 Name: pristine-tar
-Version: 1.14
+Version: 1.15
 Release: 2%{?dist}
 Summary: regenerate pristine tarballs
 
index bd2dec1..a790770 100644 (file)
@@ -346,7 +346,7 @@ static
 __inline__
 Bool mainGtU ( UInt32  i1, 
                UInt32  i2,
-               UChar*  block, 
+               UInt16*  block, 
                UInt16* quadrant,
                UInt32  nblock,
                Int32*  budget )
@@ -483,7 +483,7 @@ Int32 incs[14] = { 1, 4, 13, 40, 121, 364, 1093, 3280,
 
 static
 void mainSimpleSort ( UInt32* ptr,
-                      UChar*  block,
+                      UInt16*  block,
                       UInt16* quadrant,
                       Int32   nblock,
                       Int32   lo, 
@@ -619,7 +619,7 @@ UChar mmed3 ( UChar a, UChar b, UChar c )
 
 static
 void mainQSort3 ( UInt32* ptr,
-                  UChar*  block,
+                  UInt16*  block,
                   UInt16* quadrant,
                   Int32   nblock,
                   Int32   loSt, 
@@ -749,7 +749,7 @@ void mainQSort3 ( UInt32* ptr,
 
 static
 void mainSort ( UInt32* ptr, 
-                UChar*  block,
+                UInt16*  block,
                 UInt16* quadrant, 
                 UInt32* ftab,
                 Int32   nblock,
@@ -1028,10 +1028,10 @@ void mainSort ( UInt32* ptr,
       ftab [ 0 .. 65536 ] destroyed
       arr1 [0 .. nblock-1] holds sorted order
 */
-void BZ2_blockSort ( EState* s )
+void blockSort ( EState* s )
 {
    UInt32* ptr    = s->ptr; 
-   UChar*  block  = s->block;
+   UInt16* block  = s->block;
    UInt32* ftab   = s->ftab;
    Int32   nblock = s->nblock;
    Int32   verb   = s->verbosity;