From c173f71f8e7d48b8511825e0790ca1e774c9f04c Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 7 Nov 2015 15:58:52 +0100 Subject: Merging upstream version 1.6~rc1. Signed-off-by: Daniel Baumann --- LzmaDec.c | 41 ----------------------------------------- 1 file changed, 41 deletions(-) (limited to 'LzmaDec.c') 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) -- cgit v1.2.3