summaryrefslogtreecommitdiff
path: root/archivers/xmill/files/patch-XMill_BZlib.cpp
blob: 95cd778a6d35b706d57123b4f82cde5f887eefa3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
--- XMill/BZlib.cpp.orig	2016-07-26 12:48:05 UTC
+++ XMill/BZlib.cpp
@@ -44,7 +44,7 @@ BZip::~BZip() 
 
 void BZip::initCompress() 
 {
-	if(bzCompressInit(&bzstate,7,0,0) != BZ_OK)	{
+	if(BZ2_bzCompressInit(&bzstate,7,0,0) != BZ_OK)	{
 		throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
 	}
 }
@@ -60,19 +60,19 @@ int BZip::doCompress(int flag)
 {
 	if (flag == -1)
 		flag = BZ_FINISH;
-	return bzCompress(&bzstate,flag);
+	return BZ2_bzCompress(&bzstate,flag);
 }
 
 void BZip::endCompress() 
 {
-	if(bzCompressEnd(&bzstate) != BZ_OK) {
+	if(BZ2_bzCompressEnd(&bzstate) != BZ_OK) {
 		throw new XMillException (XMILL_ERR_ZLIB, "Error while compressing container!");
 	}
 }
 
 void BZip::initUncompress() 
 {
-	if(bzDecompressInit(&bzstate,0,0) != BZ_OK) {
+	if(BZ2_bzDecompressInit(&bzstate,0,0) != BZ_OK) {
 		throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
 	}
 }
@@ -106,7 +106,7 @@ char **BZip::getNextInPtr() 
 
 void BZip::endUncompress()
 {
-	if(bzDecompressEnd(&bzstate) != BZ_OK) {
+	if(BZ2_bzDecompressEnd(&bzstate) != BZ_OK) {
 		throw new XMillException (XMILL_ERR_ZLIB, "Error while uncompressing container!");
 	}
 }
@@ -138,22 +138,24 @@ int* BZip::getAvailOutPtr()
 
 int BZip::getTotalOut()
 {
-	return bzstate.total_out;
+	return bzstate.total_out_lo32;
 }
 
 int BZip::getTotalIn()
 {
-	return bzstate.total_in;
+	return bzstate.total_in_lo32;
 }
 
 void BZip::resetTotals()
 {
-	bzstate.total_in = 0;
-	bzstate.total_out = 0;
+	bzstate.total_in_lo32 = 0;
+	bzstate.total_in_hi32 = 0;
+	bzstate.total_out_lo32 = 0;
+	bzstate.total_out_hi32 = 0;
 }
 
 int BZip::doUncompress()
 {
-	return bzDecompress(&bzstate);
+	return BZ2_bzDecompress(&bzstate);
 }