From 3364074b48b61e180a3989fa331c410ac0ad05fc Mon Sep 17 00:00:00 2001 From: gambas Date: Tue, 20 Aug 2019 01:23:59 +0200 Subject: [PATCH] Fix incorrect datatype of some driver function arguments. [GB.COMPRESS.BZLIB2] * BUG: Fix incorrect datatype of some driver function arguments. * BUG: Fix a few error messages. [GB.COMPRESS.ZLIB] * BUG: Fix a few error messages. --- gb.compress.bzlib2/src/main.c | 10 +++++----- gb.compress.zlib/src/main.c | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gb.compress.bzlib2/src/main.c b/gb.compress.bzlib2/src/main.c index a29ecdb53..cf401b75b 100644 --- a/gb.compress.bzlib2/src/main.c +++ b/gb.compress.bzlib2/src/main.c @@ -132,7 +132,7 @@ static int BZ2_default_compression(void) /********************************************************************************* The Driver must provide this function: -void c_String(char **target,unsigned long *lent,char *source,unsigned long len,int level) +void c_String(char **target,unsigned int *lent,char *source,unsigned int len,int level) It is called to compress a String and return it compressed. The object will pass the following values: @@ -149,7 +149,7 @@ The function must store the compressed string in 'target', and its length in 'le or NULL and zero if it fails by any reason *********************************************************************************/ -static void BZ2_c_String(char **target,unsigned long *lent,char *source,unsigned long len,int level) +static void BZ2_c_String(char **target,unsigned int *lent,char *source,unsigned int len,int level) { *target=NULL; *lent=len + (len*0.1) + 600; @@ -168,7 +168,7 @@ static void BZ2_c_String(char **target,unsigned long *lent,char *source,unsigned /********************************************************************************* The Driver must provide this function: -void u_String(char **target,unsigned long *lent,char *source,unsigned long len,int level) +void u_String(char **target,unsigned int *lent,char *source,unsigned int len,int level) It is called to decompress a String and return it decompressed. The object will pass the following values: @@ -184,7 +184,7 @@ level = compression level The function must store the decompressed string in 'target', and its length in 'lent', or NULL and zero if it fails by any reason *********************************************************************************/ -static void BZ2_u_String(char **target,unsigned long *lent,char *source,unsigned long len) +static void BZ2_u_String(char **target,unsigned int *lent,char *source,unsigned int len) { int myok=BZ_OUTBUFF_FULL; @@ -219,7 +219,7 @@ static void BZ2_u_String(char **target,unsigned long *lent,char *source,unsigned if (*target)GB.Free((void**)target); *target=NULL; *lent=0; - GB.Error ("Not enough memory: String too long"); + GB.Error ("Not enough memory: string too long"); return; default: diff --git a/gb.compress.zlib/src/main.c b/gb.compress.zlib/src/main.c index 8fc71f301..0b3c05626 100644 --- a/gb.compress.zlib/src/main.c +++ b/gb.compress.zlib/src/main.c @@ -227,7 +227,7 @@ static void u_String(char **target,unsigned int *lent,char *source,unsigned int try_gzip = 1; continue; case Z_MEM_ERROR: - GB.Error("Not enough memory: String too long"); + GB.Error("Not enough memory: string too long"); goto error; default: GB.Error("Unable to inflate string");