summaryrefslogtreecommitdiffstats
path: root/LzmaDec.c
diff options
context:
space:
mode:
authorDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:58:52 +0000
committerDaniel Baumann <mail@daniel-baumann.ch>2015-11-07 14:58:52 +0000
commitc173f71f8e7d48b8511825e0790ca1e774c9f04c (patch)
tree0efd97c687c50a173dadea9ed8b9a7160884bf4e /LzmaDec.c
parentAdding debian version 1.5-3. (diff)
downloadpdlzip-c173f71f8e7d48b8511825e0790ca1e774c9f04c.tar.xz
pdlzip-c173f71f8e7d48b8511825e0790ca1e774c9f04c.zip
Merging upstream version 1.6~rc1.
Signed-off-by: Daniel Baumann <mail@daniel-baumann.ch>
Diffstat (limited to 'LzmaDec.c')
-rw-r--r--LzmaDec.c41
1 files changed, 0 insertions, 41 deletions
diff --git a/LzmaDec.c b/LzmaDec.c
index 36ecb32..cc4279d 100644
--- a/LzmaDec.c
+++ b/LzmaDec.c
@@ -14,47 +14,6 @@
#include "lzip.h"
#include "LzmaDec.h"
-
-CRC32 crc32;
-
-
-/* Returns the number of bytes really read.
- If (returned value < size) and (errno == 0), means EOF was reached.
-*/
-int readblock( const int fd, uint8_t * const buf, const int size )
- {
- int rest = size;
- errno = 0;
- while( rest > 0 )
- {
- const int n = read( fd, buf + size - rest, rest );
- if( n > 0 ) rest -= n;
- else if( n == 0 ) break; /* EOF */
- else if( errno != EINTR && errno != EAGAIN ) break;
- errno = 0;
- }
- return size - rest;
- }
-
-
-/* Returns the number of bytes really written.
- If (returned value < size), it is always an error.
-*/
-int writeblock( const int fd, const uint8_t * const buf, const int size )
- {
- int rest = size;
- errno = 0;
- while( rest > 0 )
- {
- const int n = write( fd, buf + size - rest, rest );
- if( n > 0 ) rest -= n;
- else if( n < 0 && errno != EINTR && errno != EAGAIN ) break;
- errno = 0;
- }
- return size - rest;
- }
-
-
#define kNumTopBits 24
#define kTopValue ((uint32_t)1 << kNumTopBits)