]> git.ipfire.org Git - thirdparty/cups.git/blame - pstoraster/gxclzlib.c
Copyright update...
[thirdparty/cups.git] / pstoraster / gxclzlib.c
CommitLineData
c153bcda 1/*
efb2f309 2 Copyright 1993-2002 by Easy Software Products
c153bcda 3 Copyright (C) 1997 Aladdin Enterprises. All rights reserved.
caddbb58 4
5 This file is part of GNU Ghostscript.
6
7 GNU Ghostscript is distributed in the hope that it will be useful, but
8 WITHOUT ANY WARRANTY. No author or distributor accepts responsibility
9 to anyone for the consequences of using it or for whether it serves any
10 particular purpose or works at all, unless he says so in writing. Refer
11 to the GNU General Public License for full details.
12
13 Everyone is granted permission to copy, modify and redistribute GNU
14 Ghostscript, but only under the conditions described in the GNU General
15 Public License. A copy of this license is supposed to have been given
16 to you along with GNU Ghostscript so you can know your rights and
17 responsibilities. It should be in a file named COPYING. Among other
18 things, the copyright notice and this notice must be preserved on all
19 copies.
20
21 Aladdin Enterprises supports the work of the GNU Project, but is not
22 affiliated with the Free Software Foundation or the GNU Project. GNU
23 Ghostscript, as distributed by Aladdin Enterprises, does not require any
24 GNU software to build or run it.
25*/
26
c153bcda 27#include <config.h>
efb2f309 28/*$Id: gxclzlib.c,v 1.5 2002/01/02 17:59:11 mike Exp $ */
caddbb58 29/* zlib filter initialization for RAM-based band lists */
30/* Must be compiled with -I$(ZSRCDIR) */
31#include "std.h"
32#include "gstypes.h"
33#include "gsmemory.h"
34#include "gxclmem.h"
17281382 35
36#ifdef HAVE_LIBZ
caddbb58 37#include "szlibx.h"
38
39private stream_zlib_state cl_zlibE_state;
40private stream_zlib_state cl_zlibD_state;
41
42/* Initialize the states to be copied. */
43void
44gs_cl_zlib_init(gs_memory_t * mem)
45{
46 s_zlib_set_defaults((stream_state *) & cl_zlibE_state);
47 cl_zlibE_state.no_wrapper = true;
48 cl_zlibE_state.template = &s_zlibE_template;
49 s_zlib_set_defaults((stream_state *) & cl_zlibD_state);
50 cl_zlibD_state.no_wrapper = true;
51 cl_zlibD_state.template = &s_zlibD_template;
52}
53
54/* Return the prototypes for compressing/decompressing the band list. */
55const stream_state *
56clist_compressor_state(void *client_data)
57{
58 return (const stream_state *)&cl_zlibE_state;
59}
60const stream_state *
61clist_decompressor_state(void *client_data)
62{
63 return (const stream_state *)&cl_zlibD_state;
64}
17281382 65#else
66const stream_state *
67clist_compressor_state(void *client_data)
68{
69 return (const stream_state *)0;
70}
71const stream_state *
72clist_decompressor_state(void *client_data)
73{
74 return (const stream_state *)0;
75}
c153bcda 76#endif /* HAVE_LIBZ */