annotate modules/zlib/zlib.c @ 265:8efd647ea9ca r20-5b31

Import from CVS: tag r20-5b31
author cvs
date Mon, 13 Aug 2007 10:25:37 +0200
parents
children aabb7f5b1c81
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
265
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
1 /* zlib interface for XEmacs.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
2 Copyright (C) 1998 Free Software Foundation, Inc.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
3
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
4 This file is part of XEmacs.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
5
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
6 XEmacs is free software; you can redistribute it and/or modify it
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
7 under the terms of the GNU General Public License as published by the
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
8 Free Software Foundation; either version 2, or (at your option) any
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
9 later version.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
10
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
11 XEmacs is distributed in the hope that it will be useful, but WITHOUT
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
12 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
13 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
14 for more details.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
15
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
16 You should have received a copy of the GNU General Public License
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
17 along with XEmacs; see the file COPYING. If not, write to
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
18 the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
19 Boston, MA 02111-1307, USA. */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
20
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
21 /* Synched up with: Not in FSF. */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
22
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
23 /* Author: William Perry <wmperry@aventail.com> */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
24
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
25 #include <config.h>
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
26
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
27 #include "lisp.h"
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
28
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
29 DEFUN ("compress", Fcompress, 1, 6, 0, /*
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
30 Return the compressed version of an object.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
31 OBJECT is either a string or a buffer.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
32 Optional argument LEVEL specifies how much to compress - valid range is 0 - 9.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
33 Optional arguments START and END denote buffer positions for compressing
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
34 a portion of OBJECT. The optional CODING argument specifies the coding
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
35 system the text is to be represented in while computing the digest. This only
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
36 has meaning with MULE, and defaults to the current format of the data.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
37 If ERROR-ME-NOT is nil, report an error if the coding system can't be
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
38 determined. Else assume binary coding if all else fails.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
39 */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
40 (object, level, start, end, coding, error_me_not))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
41 {
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
42 return(Qnil);
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
43 }
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
44
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
45 DEFUN ("decompress", Fdecompress, 1, 5, 0, /*
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
46 Uncompress an object.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
47 OBJECT is either a string or a buffer.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
48 Optional arguments START and END denote buffer positions for decompressing
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
49 a portion of OBJECT. The optional CODING argument specifies the coding
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
50 system the text is to be represented in while computing the digest. This only
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
51 has meaning with MULE, and defaults to the current format of the data.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
52 If ERROR-ME-NOT is nil, report an error if the coding system can't be
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
53 determined. Else assume binary coding if all else fails.
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
54 */
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
55 (object, start, end, coding, error_me_not))
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
56 {
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
57 return(Qnil);
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
58 }
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
59
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
60 void
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
61 syms_of (void)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
62 {
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
63 DEFSUBR(Fcompress);
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
64 DEFSUBR(Fdecompress);
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
65 }
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
66
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
67 void
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
68 vars_of (void)
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
69 {
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
70 Fprovide (intern ("zlib"));
8efd647ea9ca Import from CVS: tag r20-5b31
cvs
parents:
diff changeset
71 }