Merge branch 'master' into jgrpp
Remove 'byte' typedef
This commit is contained in:
@@ -666,10 +666,10 @@ void TextfileWindow::ScrollToLine(size_t line)
|
||||
* When decompressing fails, *bufp is set to nullptr and *sizep to 0. The
|
||||
* compressed buffer passed in is still freed in this case.
|
||||
*/
|
||||
static void Gunzip(byte **bufp, size_t *sizep)
|
||||
static void Gunzip(uint8_t **bufp, size_t *sizep)
|
||||
{
|
||||
static const int BLOCKSIZE = 8192;
|
||||
byte *buf = nullptr;
|
||||
uint8_t *buf = nullptr;
|
||||
size_t alloc_size = 0;
|
||||
z_stream z;
|
||||
int res;
|
||||
@@ -722,10 +722,10 @@ static void Gunzip(byte **bufp, size_t *sizep)
|
||||
* When decompressing fails, *bufp is set to nullptr and *sizep to 0. The
|
||||
* compressed buffer passed in is still freed in this case.
|
||||
*/
|
||||
static void Xunzip(byte **bufp, size_t *sizep)
|
||||
static void Xunzip(uint8_t **bufp, size_t *sizep)
|
||||
{
|
||||
static const int BLOCKSIZE = 8192;
|
||||
byte *buf = nullptr;
|
||||
uint8_t *buf = nullptr;
|
||||
size_t alloc_size = 0;
|
||||
lzma_stream z = LZMA_STREAM_INIT;
|
||||
int res;
|
||||
@@ -796,12 +796,12 @@ static void Xunzip(byte **bufp, size_t *sizep)
|
||||
|
||||
#if defined(WITH_ZLIB)
|
||||
/* In-place gunzip */
|
||||
if (std::string_view(textfile).ends_with(".gz")) Gunzip((byte**)&buf, &filesize);
|
||||
if (std::string_view(textfile).ends_with(".gz")) Gunzip((uint8_t**)&buf, &filesize);
|
||||
#endif
|
||||
|
||||
#if defined(WITH_LIBLZMA)
|
||||
/* In-place xunzip */
|
||||
if (std::string_view(textfile).ends_with(".xz")) Xunzip((byte**)&buf, &filesize);
|
||||
if (std::string_view(textfile).ends_with(".xz")) Xunzip((uint8_t**)&buf, &filesize);
|
||||
#endif
|
||||
|
||||
if (buf == nullptr) return;
|
||||
|
Reference in New Issue
Block a user