61N/A/*
61N/A * CDDL HEADER START
61N/A *
61N/A * The contents of this file are subject to the terms of the
61N/A * Common Development and Distribution License (the "License").
61N/A * You may not use this file except in compliance with the License.
61N/A *
61N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
61N/A * or http://www.opensolaris.org/os/licensing.
61N/A * See the License for the specific language governing permissions
61N/A * and limitations under the License.
61N/A *
61N/A * When distributing Covered Code, include this CDDL HEADER in each
61N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
61N/A * If applicable, add the following below this CDDL HEADER, with the
61N/A * fields enclosed by brackets "[]" replaced with your own identifying
61N/A * information: Portions Copyright [yyyy] [name of copyright owner]
61N/A *
61N/A * CDDL HEADER END
61N/A */
61N/A/*
61N/A * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
61N/A */
61N/A
61N/A#include <stdio.h>
61N/A#include "bzlib.h"
61N/A
61N/A/*
61N/A * Wrappers for the old names. For compatibility with Solaris 8.
61N/A */
61N/A
61N/Aint
61N/AbzCompressInit(bz_stream *strm, int blockSize100k, int verbosity,
61N/A int workFactor)
61N/A{
61N/A return (BZ2_bzCompressInit(strm, blockSize100k, verbosity, workFactor));
61N/A}
61N/A
61N/Aint
61N/AbzCompress(bz_stream *strm, int action)
61N/A{
61N/A return (BZ2_bzCompress(strm, action));
61N/A}
61N/A
61N/Aint
61N/AbzCompressEnd(bz_stream *strm)
61N/A{
61N/A return (BZ2_bzCompressEnd(strm));
61N/A}
61N/A
61N/Aint
61N/AbzDecompressInit(bz_stream *strm, int verbosity, int small)
61N/A{
61N/A return (BZ2_bzDecompressInit(strm, verbosity, small));
61N/A}
61N/A
61N/Aint
61N/AbzDecompress(bz_stream *strm)
61N/A{
61N/A return (BZ2_bzDecompress(strm));
61N/A}
61N/A
61N/Aint
61N/AbzDecompressEnd(bz_stream *strm)
61N/A{
61N/A return (BZ2_bzDecompressEnd(strm));
61N/A}
61N/A
61N/ABZFILE *
61N/AbzReadOpen(int *bzerror, FILE *f, int verbosity, int small, void *unused,
61N/A int nUnused)
61N/A{
61N/A return (BZ2_bzReadOpen(bzerror, f, verbosity, small, unused, nUnused));
61N/A}
61N/A
61N/Avoid
61N/AbzReadClose(int *bzerror, BZFILE *b)
61N/A{
61N/A BZ2_bzReadClose(bzerror, b);
61N/A}
61N/A
61N/Avoid
61N/AbzReadGetUnused(int *bzerror, BZFILE *b, void **unused, int *nUnused)
61N/A{
61N/A BZ2_bzReadGetUnused(bzerror, b, unused, nUnused);
61N/A}
61N/A
61N/Aint
61N/AbzRead(int *bzerror, BZFILE *b, void *buf, int len)
61N/A{
61N/A return (BZ2_bzRead(bzerror, b, buf, len));
61N/A}
61N/A
61N/ABZFILE *
61N/AbzWriteOpen(int *bzerror, FILE *f, int blockSize100k, int verbosity,
61N/A int workFactor)
61N/A{
61N/A return (BZ2_bzWriteOpen(bzerror, f, blockSize100k, verbosity,
61N/A workFactor));
61N/A}
61N/A
61N/Avoid
61N/AbzWrite(int *bzerror, BZFILE *b, void *buf, int len)
61N/A{
61N/A BZ2_bzWrite(bzerror, b, buf, len);
61N/A}
61N/A
61N/Avoid
61N/AbzWriteClose(int *bzerror, BZFILE *b, int abandon, unsigned int *nbytes_in,
61N/A unsigned int *nbytes_out)
61N/A{
61N/A BZ2_bzWriteClose(bzerror, b, abandon, nbytes_in, nbytes_out);
61N/A}
61N/A
61N/Aint
61N/AbzBuffToBuffCompress(char *dest, unsigned int *destLen, char *source,
61N/A unsigned int sourceLen, int blockSize100k, int verbosity, int workFactor)
61N/A{
61N/A return (BZ2_bzBuffToBuffCompress(dest, destLen, source, sourceLen,
61N/A blockSize100k, verbosity, workFactor));
61N/A}
61N/A
61N/Aint
61N/AbzBuffToBuffDecompress(char *dest, unsigned int *destLen, char *source,
61N/A unsigned int sourceLen, int small, int verbosity)
61N/A{
61N/A return (BZ2_bzBuffToBuffDecompress(dest, destLen, source, sourceLen,
61N/A small, verbosity));
61N/A}
61N/A
61N/A
61N/Aconst char *
61N/AbzlibVersion(void)
61N/A{
61N/A return (BZ2_bzlibVersion());
61N/A}
61N/A
61N/ABZFILE *
61N/Abzopen(const char *path, const char *mode)
61N/A{
61N/A return (BZ2_bzopen(path, mode));
61N/A}
61N/A
61N/ABZFILE *
61N/Abzdopen(int fd, const char *mode)
61N/A{
61N/A return (BZ2_bzdopen(fd, mode));
61N/A}
61N/A
61N/Aint
61N/Abzread(BZFILE *b, void *buf, int len)
61N/A{
61N/A return (BZ2_bzread(b, buf, len));
61N/A}
61N/A
61N/Aint
61N/Abzwrite(BZFILE *b, void *buf, int len)
61N/A{
61N/A return (BZ2_bzwrite(b, buf, len));
61N/A}
61N/A
61N/Aint
61N/Abzflush(BZFILE *b)
61N/A{
61N/A return (BZ2_bzflush(b));
61N/A}
61N/A
61N/Avoid
61N/Abzclose(BZFILE *b)
61N/A{
61N/A BZ2_bzclose(b);
61N/A}
61N/A
61N/Aconst char *
61N/Abzerror(BZFILE *b, int *errnum)
61N/A{
61N/A return (BZ2_bzerror(b, errnum));
61N/A}