On Thu, 18 Mar 2010, Mindaugas Kavaliauskas wrote: Hi,
> PROC main() > LOCAL nResult > ? "Len:", HB_BZ2_UNCOMPRESSLEN(HB_BZ2_COMPRESS(""), @nResult) > ? "nResult:", nResult > RETURN > prints: > Len: 0 > nResult: 0 > So I suggest change: > HB_BZ2_UNCOMPRESSLEN( <cCompressedData>, [<@nResult>] ) > -> <nUnCompressedDataLen> or 0 on error > to: > HB_BZ2_UNCOMPRESSLEN( <cCompressedData>, [<@nResult>] ) > -> <nUnCompressedDataLen> or -1 on error > Any objections? Few notes: 1. HB_BZ2_COMPRESS("") returns empty string and HB_BZ2_UNCOMPRES("") accepts empty string without any errors and also return empty string. In the same way are working corresponding ZLIB functions: HB_ZCOMPRESS() and HB_ZUNCOMPRESS() 2. We probably have to add RTE when 1-st parameter is not string 3. HB_ZUNCOMPRESSLEN() should also be updated to return compatible results. I'll commit such modifications soon. best regards, Przemek _______________________________________________ Harbour mailing list (attachment size limit: 40KB) Harbour@harbour-project.org http://lists.harbour-project.org/mailman/listinfo/harbour