diff --git a/Makefile.common b/Makefile.common index e5b26484a1..9aee4e5307 100644 --- a/Makefile.common +++ b/Makefile.common @@ -1072,7 +1072,6 @@ ifeq ($(HAVE_7ZIP),1) $(DEPS_DIR)/7zip/Bra86.o \ $(DEPS_DIR)/7zip/7zFile.o \ $(DEPS_DIR)/7zip/7zStream.o \ - $(DEPS_DIR)/7zip/7zBuf2.o \ $(DEPS_DIR)/7zip/LzmaDec.o \ $(DEPS_DIR)/7zip/7zCrcOpt.o \ $(DEPS_DIR)/7zip/Bra.o \ diff --git a/deps/7zip/7zBuf.h b/deps/7zip/7zBuf.h index 6aee7da80a..66f9005327 100644 --- a/deps/7zip/7zBuf.h +++ b/deps/7zip/7zBuf.h @@ -20,18 +20,6 @@ void Buf_Init(CBuf *p); int Buf_Create(CBuf *p, size_t size, ISzAlloc *alloc); void Buf_Free(CBuf *p, ISzAlloc *alloc); -typedef struct -{ - uint8_t *data; - size_t size; - size_t pos; -} CDynBuf; - -void DynBuf_Construct(CDynBuf *p); -void DynBuf_SeekToBeg(CDynBuf *p); -int DynBuf_Write(CDynBuf *p, const uint8_t *buf, size_t size, ISzAlloc *alloc); -void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc); - #ifdef __cplusplus } #endif diff --git a/deps/7zip/7zBuf2.c b/deps/7zip/7zBuf2.c deleted file mode 100644 index e6de7599a9..0000000000 --- a/deps/7zip/7zBuf2.c +++ /dev/null @@ -1,47 +0,0 @@ -/* 7zBuf2.c -- uint8_t Buffer - 2008-10-04 : Igor Pavlov : Public domain */ - -#include -#include -#include "7zBuf.h" - -void DynBuf_Construct(CDynBuf *p) -{ - p->data = 0; - p->size = 0; - p->pos = 0; -} - -void DynBuf_SeekToBeg(CDynBuf *p) -{ - p->pos = 0; -} - -int DynBuf_Write(CDynBuf *p, const uint8_t *buf, size_t size, ISzAlloc *alloc) -{ - if (size > p->size - p->pos) - { - size_t current_size = p->pos + size; - size_t newSize = (current_size) + (current_size / 4); - uint8_t *data = (uint8_t *)alloc->Alloc(alloc, newSize); - - if (data == 0) - return 0; - - p->size = newSize; - memcpy(data, p->data, p->pos); - alloc->Free(alloc, p->data); - p->data = data; - } - memcpy(p->data + p->pos, buf, size); - p->pos += size; - return 1; -} - -void DynBuf_Free(CDynBuf *p, ISzAlloc *alloc) -{ - alloc->Free(alloc, p->data); - p->data = 0; - p->size = 0; - p->pos = 0; -} diff --git a/deps/7zip/RotateDefs.h b/deps/7zip/RotateDefs.h deleted file mode 100644 index ff9b722902..0000000000 --- a/deps/7zip/RotateDefs.h +++ /dev/null @@ -1,20 +0,0 @@ -/* RotateDefs.h -- Rotate functions -2009-02-07 : Igor Pavlov : Public domain */ - -#ifndef __ROTATE_DEFS_H -#define __ROTATE_DEFS_H - -#ifdef _MSC_VER - -#include -#define rotlFixed(x, n) _rotl((x), (n)) -#define rotrFixed(x, n) _rotr((x), (n)) - -#else - -#define rotlFixed(x, n) (((x) << (n)) | ((x) >> (32 - (n)))) -#define rotrFixed(x, n) (((x) >> (n)) | ((x) << (32 - (n)))) - -#endif - -#endif