summaryrefslogtreecommitdiff
path: root/gs/base/szlibe.c
diff options
context:
space:
mode:
Diffstat (limited to 'gs/base/szlibe.c')
-rw-r--r--gs/base/szlibe.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/gs/base/szlibe.c b/gs/base/szlibe.c
index 64a343007..060788455 100644
--- a/gs/base/szlibe.c
+++ b/gs/base/szlibe.c
@@ -1,6 +1,6 @@
/* Copyright (C) 2001-2006 Artifex Software, Inc.
All Rights Reserved.
-
+
This software is provided AS-IS with no warranty, either express or
implied.
@@ -25,11 +25,11 @@ s_zlibE_init(stream_state * st)
int code = s_zlib_alloc_dynamic_state(ss);
if (code < 0)
- return ERRC; /****** WRONG ******/
+ return ERRC; /****** WRONG ******/
if (deflateInit2(&ss->dynamic->zstate, ss->level, ss->method,
- (ss->no_wrapper ? -ss->windowBits : ss->windowBits),
- ss->memLevel, ss->strategy) != Z_OK)
- return ERRC; /****** WRONG ******/
+ (ss->no_wrapper ? -ss->windowBits : ss->windowBits),
+ ss->memLevel, ss->strategy) != Z_OK)
+ return ERRC; /****** WRONG ******/
return 0;
}
@@ -40,14 +40,14 @@ s_zlibE_reset(stream_state * st)
stream_zlib_state *const ss = (stream_zlib_state *)st;
if (deflateReset(&ss->dynamic->zstate) != Z_OK)
- return ERRC; /****** WRONG ******/
+ return ERRC; /****** WRONG ******/
return 0;
}
/* Process a buffer */
static int
s_zlibE_process(stream_state * st, stream_cursor_read * pr,
- stream_cursor_write * pw, bool last)
+ stream_cursor_write * pw, bool last)
{
stream_zlib_state *const ss = (stream_zlib_state *)st;
z_stream *zs = &ss->dynamic->zstate;
@@ -57,9 +57,9 @@ s_zlibE_process(stream_state * st, stream_cursor_read * pr,
/* Detect no input or full output so that we don't get */
/* a Z_BUF_ERROR return. */
if (pw->ptr == pw->limit)
- return 1;
+ return 1;
if (p == pr->limit && !last)
- return 0;
+ return 0;
zs->next_in = (Bytef *)p + 1;
zs->avail_in = pr->limit - p;
zs->next_out = pw->ptr + 1;
@@ -68,12 +68,12 @@ s_zlibE_process(stream_state * st, stream_cursor_read * pr,
pr->ptr = zs->next_in - 1;
pw->ptr = zs->next_out - 1;
switch (status) {
- case Z_OK:
- return (pw->ptr == pw->limit ? 1 : pr->ptr > p && !last ? 0 : 1);
- case Z_STREAM_END:
- return (last && pr->ptr == pr->limit ? 0 : ERRC);
- default:
- return ERRC;
+ case Z_OK:
+ return (pw->ptr == pw->limit ? 1 : pr->ptr > p && !last ? 0 : 1);
+ case Z_STREAM_END:
+ return (last && pr->ptr == pr->limit ? 0 : ERRC);
+ default:
+ return ERRC;
}
}