summaryrefslogtreecommitdiff
path: root/gzread.c
diff options
context:
space:
mode:
authorMika Lindqvist <postmaster@raasu.org>2015-11-22 17:15:58 +0200
committerHans Kristian Rosbach <hk-git@circlestorm.org>2017-01-30 10:35:05 +0100
commit631817cce8dca45d6f725da143ab5fa580a9d5b0 (patch)
tree564f94aba9af7df1274522b5b7755e669428d69d /gzread.c
parent343c4c549107d31f6eeabfb4b31bec4502a2ea0e (diff)
local -> static
* local -> static * Normalize and cleanup line-endings * Fix warnings under Visual Studio. * Whitespace cleanup *** This patch has been edited to merge cleanly and to exclude type changes. Based on 8d7a7c3b82c6e38734bd504dac800b148ab410d0 "Type Cleanup"
Diffstat (limited to 'gzread.c')
-rw-r--r--gzread.c24
1 files changed, 12 insertions, 12 deletions
diff --git a/gzread.c b/gzread.c
index 5db2c50..1405533 100644
--- a/gzread.c
+++ b/gzread.c
@@ -6,18 +6,18 @@
#include "gzguts.h"
/* Local functions */
-local int gz_load(gz_statep, unsigned char *, unsigned, unsigned *);
-local int gz_avail(gz_statep);
-local int gz_look(gz_statep);
-local int gz_decomp(gz_statep);
-local int gz_fetch(gz_statep);
-local int gz_skip(gz_statep, z_off64_t);
+static int gz_load(gz_statep, unsigned char *, unsigned, unsigned *);
+static int gz_avail(gz_statep);
+static int gz_look(gz_statep);
+static int gz_decomp(gz_statep);
+static int gz_fetch(gz_statep);
+static int gz_skip(gz_statep, z_off64_t);
/* Use read() to load a buffer -- return -1 on error, otherwise 0. Read from
state->fd, and update state->eof, state->err, and state->msg as appropriate.
This function needs to loop on read(), since read() is not guaranteed to
read the number of bytes requested, depending on the type of descriptor. */
-local int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *have) {
+static int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *have) {
int ret;
*have = 0;
@@ -43,7 +43,7 @@ local int gz_load(gz_statep state, unsigned char *buf, unsigned len, unsigned *h
If strm->avail_in != 0, then the current data is moved to the beginning of
the input buffer, and then the remainder of the buffer is loaded with the
available data from the input file. */
-local int gz_avail(gz_statep state) {
+static int gz_avail(gz_statep state) {
unsigned got;
z_stream *strm = &(state->strm);
@@ -75,7 +75,7 @@ local int gz_avail(gz_statep state) {
case, all further file reads will be directly to either the output buffer or
a user buffer. If decompressing, the inflate state will be initialized.
gz_look() will return 0 on success or -1 on failure. */
-local int gz_look(gz_statep state) {
+static int gz_look(gz_statep state) {
z_stream *strm = &(state->strm);
/* allocate read buffers and inflate memory */
@@ -159,7 +159,7 @@ local int gz_look(gz_statep state) {
data. If the gzip stream completes, state->how is reset to LOOK to look for
the next gzip stream or raw data, once state->x.have is depleted. Returns 0
on success, -1 on failure. */
-local int gz_decomp(gz_statep state) {
+static int gz_decomp(gz_statep state) {
int ret = Z_OK;
unsigned had;
z_stream *strm = &(state->strm);
@@ -209,7 +209,7 @@ local int gz_decomp(gz_statep state) {
looked for to determine whether to copy or decompress. Returns -1 on error,
otherwise 0. gz_fetch() will leave state->how as COPY or GZIP unless the
end of the input file has been reached and all data has been processed. */
-local int gz_fetch(gz_statep state) {
+static int gz_fetch(gz_statep state) {
z_stream *strm = &(state->strm);
do {
@@ -237,7 +237,7 @@ local int gz_fetch(gz_statep state) {
}
/* Skip len uncompressed bytes of output. Return -1 on error, 0 on success. */
-local int gz_skip(gz_statep state, z_off64_t len) {
+static int gz_skip(gz_statep state, z_off64_t len) {
unsigned n;
/* skip over len bytes or reach end-of-file, whichever comes first */