Codechange: rename byte to uint8_t (#12308)

This commit is contained in:
Patric Stout
2024-03-16 23:59:32 +01:00
committed by GitHub
parent bd7120bae4
commit a3cfd23cf9
355 changed files with 1654 additions and 1656 deletions

View File

@@ -664,10 +664,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;
@@ -720,10 +720,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;
@@ -789,12 +789,12 @@ static void Xunzip(byte **bufp, size_t *sizep)
#if defined(WITH_ZLIB)
/* In-place gunzip */
if (textfile.ends_with(".gz")) Gunzip((byte**)&buf, &filesize);
if (textfile.ends_with(".gz")) Gunzip((uint8_t**)&buf, &filesize);
#endif
#if defined(WITH_LIBLZMA)
/* In-place xunzip */
if (textfile.ends_with(".xz")) Xunzip((byte**)&buf, &filesize);
if (textfile.ends_with(".xz")) Xunzip((uint8_t**)&buf, &filesize);
#endif
if (buf == nullptr) return;