From 6130e39b18b5f53902e4eab14f6d5cdde5219563 Mon Sep 17 00:00:00 2001 From: Alan Mishchenko Date: Mon, 1 Nov 2010 01:35:04 -0700 Subject: initial commit of public abc --- src/misc/zlib/uncompr.c | 22 ++++++++++++++-------- 1 file changed, 14 insertions(+), 8 deletions(-) (limited to 'src/misc/zlib/uncompr.c') diff --git a/src/misc/zlib/uncompr.c b/src/misc/zlib/uncompr.c index b59e3d0d..e195ec3e 100644 --- a/src/misc/zlib/uncompr.c +++ b/src/misc/zlib/uncompr.c @@ -1,13 +1,20 @@ /* uncompr.c -- decompress a memory buffer - * Copyright (C) 1995-2003 Jean-loup Gailly. + * Copyright (C) 1995-2003, 2010 Jean-loup Gailly. * For conditions of distribution and use, see copyright notice in zlib.h */ /* @(#) $Id$ */ +#include +#include +#include +#include "abc_global.h" + #define ZLIB_INTERNAL #include "zlib.h" +ABC_NAMESPACE_IMPL_START + /* =========================================================================== Decompresses the source buffer into the destination buffer. sourceLen is the byte length of the source buffer. Upon entry, destLen is the total @@ -16,18 +23,12 @@ been saved previously by the compressor and transmitted to the decompressor by some mechanism outside the scope of this compression library.) Upon exit, destLen is the actual size of the compressed buffer. - This function can be used to decompress a whole file at once if the - input file is mmap'ed. uncompress returns Z_OK if success, Z_MEM_ERROR if there was not enough memory, Z_BUF_ERROR if there was not enough room in the output buffer, or Z_DATA_ERROR if the input data was corrupted. */ -int ZEXPORT uncompress (dest, destLen, source, sourceLen) - Bytef *dest; - uLongf *destLen; - const Bytef *source; - uLong sourceLen; +int ZEXPORT uncompress (Bytef *dest, uLongf *destLen, const Bytef *source, uLong sourceLen) { z_stream stream; int err; @@ -59,3 +60,8 @@ int ZEXPORT uncompress (dest, destLen, source, sourceLen) err = inflateEnd(&stream); return err; } + + + +ABC_NAMESPACE_IMPL_END + -- cgit v1.2.3