rust/cargo-c: update to 0.10.7+cargo-0.84.0
[oi-userland.git] / components / archiver / bzip2 / files / oldapi.c
blobdf795877a1eb1efcd2115b12ae4d49fcda52e9aa
1 /*
2 * CDDL HEADER START
4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
19 * CDDL HEADER END
22 * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
25 #include <stdio.h>
26 #include "bzlib.h"
29 * Wrappers for the old names. For compatibility with Solaris 8.
32 int
33 bzCompressInit(bz_stream *strm, int blockSize100k, int verbosity,
34 int workFactor)
36 return (BZ2_bzCompressInit(strm, blockSize100k, verbosity, workFactor));
39 int
40 bzCompress(bz_stream *strm, int action)
42 return (BZ2_bzCompress(strm, action));
45 int
46 bzCompressEnd(bz_stream *strm)
48 return (BZ2_bzCompressEnd(strm));
51 int
52 bzDecompressInit(bz_stream *strm, int verbosity, int small)
54 return (BZ2_bzDecompressInit(strm, verbosity, small));
57 int
58 bzDecompress(bz_stream *strm)
60 return (BZ2_bzDecompress(strm));
63 int
64 bzDecompressEnd(bz_stream *strm)
66 return (BZ2_bzDecompressEnd(strm));
69 BZFILE *
70 bzReadOpen(int *bzerror, FILE *f, int verbosity, int small, void *unused,
71 int nUnused)
73 return (BZ2_bzReadOpen(bzerror, f, verbosity, small, unused, nUnused));
76 void
77 bzReadClose(int *bzerror, BZFILE *b)
79 BZ2_bzReadClose(bzerror, b);
82 void
83 bzReadGetUnused(int *bzerror, BZFILE *b, void **unused, int *nUnused)
85 BZ2_bzReadGetUnused(bzerror, b, unused, nUnused);
88 int
89 bzRead(int *bzerror, BZFILE *b, void *buf, int len)
91 return (BZ2_bzRead(bzerror, b, buf, len));
94 BZFILE *
95 bzWriteOpen(int *bzerror, FILE *f, int blockSize100k, int verbosity,
96 int workFactor)
98 return (BZ2_bzWriteOpen(bzerror, f, blockSize100k, verbosity,
99 workFactor));
102 void
103 bzWrite(int *bzerror, BZFILE *b, void *buf, int len)
105 BZ2_bzWrite(bzerror, b, buf, len);
108 void
109 bzWriteClose(int *bzerror, BZFILE *b, int abandon, unsigned int *nbytes_in,
110 unsigned int *nbytes_out)
112 BZ2_bzWriteClose(bzerror, b, abandon, nbytes_in, nbytes_out);
116 bzBuffToBuffCompress(char *dest, unsigned int *destLen, char *source,
117 unsigned int sourceLen, int blockSize100k, int verbosity, int workFactor)
119 return (BZ2_bzBuffToBuffCompress(dest, destLen, source, sourceLen,
120 blockSize100k, verbosity, workFactor));
124 bzBuffToBuffDecompress(char *dest, unsigned int *destLen, char *source,
125 unsigned int sourceLen, int small, int verbosity)
127 return (BZ2_bzBuffToBuffDecompress(dest, destLen, source, sourceLen,
128 small, verbosity));
132 const char *
133 bzlibVersion(void)
135 return (BZ2_bzlibVersion());
138 BZFILE *
139 bzopen(const char *path, const char *mode)
141 return (BZ2_bzopen(path, mode));
144 BZFILE *
145 bzdopen(int fd, const char *mode)
147 return (BZ2_bzdopen(fd, mode));
151 bzread(BZFILE *b, void *buf, int len)
153 return (BZ2_bzread(b, buf, len));
157 bzwrite(BZFILE *b, void *buf, int len)
159 return (BZ2_bzwrite(b, buf, len));
163 bzflush(BZFILE *b)
165 return (BZ2_bzflush(b));
168 void
169 bzclose(BZFILE *b)
171 BZ2_bzclose(b);
174 const char *
175 bzerror(BZFILE *b, int *errnum)
177 return (BZ2_bzerror(b, errnum));