Save a bit of memory (and a few cpu cycles) by not bothering to
[privoxy.git] / deanimate.h
1 #ifndef DEANIMATE_H_INCLUDED
2 #define DEANIMATE_H_INCLUDED
3 #define DEANIMATE_H_VERSION "$Id: deanimate.h,v 1.11 2007/01/12 15:41:00 fabiankeil Exp $"
4 /*********************************************************************
5  *
6  * File        :  $Source: /cvsroot/ijbswa/current/deanimate.h,v $
7  *
8  * Purpose     :  Declares functions to manipulate binary images on the
9  *                fly.  High-level functions include:
10  *                  - Deanimation of GIF images
11  *                
12  *                Functions declared include: gif_deanimate and buf_free.
13  *                
14  *
15  * Copyright   :  Written by and Copyright (C) 2001 - 2004 by the the
16  *                SourceForge Privoxy team. http://www.privoxy.org/
17  *
18  *                Based on ideas from the Image::DeAnim Perl module by
19  *                Ken MacFarlane, <ksm+cpan@universal.dca.net>
20  *
21  *                Based on the Internet Junkbuster originally written
22  *                by and Copyright (C) 1997 Anonymous Coders and 
23  *                Junkbusters Corporation.  http://www.junkbusters.com
24  *
25  *                This program is free software; you can redistribute it 
26  *                and/or modify it under the terms of the GNU General
27  *                Public License as published by the Free Software
28  *                Foundation; either version 2 of the License, or (at
29  *                your option) any later version.
30  *
31  *                This program is distributed in the hope that it will
32  *                be useful, but WITHOUT ANY WARRANTY; without even the
33  *                implied warranty of MERCHANTABILITY or FITNESS FOR A
34  *                PARTICULAR PURPOSE.  See the GNU General Public
35  *                License for more details.
36  *
37  *                The GNU General Public License should be included with
38  *                this file.  If not, you can view it at
39  *                http://www.gnu.org/copyleft/gpl.html
40  *                or write to the Free Software Foundation, Inc., 59
41  *                Temple Place - Suite 330, Boston, MA  02111-1307, USA.
42  *
43  * Revisions   :
44  *    $Log: deanimate.h,v $
45  *    Revision 1.11  2007/01/12 15:41:00  fabiankeil
46  *    Remove some white space at EOL.
47  *
48  *    Revision 1.10  2006/07/18 14:48:45  david__schmidt
49  *    Reorganizing the repository: swapping out what was HEAD (the old 3.1 branch)
50  *    with what was really the latest development (the v_3_0_branch branch)
51  *
52  *    Revision 1.8.2.1  2004/10/03 12:53:32  david__schmidt
53  *    Add the ability to check jpeg images for invalid
54  *    lengths of comment blocks.  Defensive strategy
55  *    against the exploit:
56  *       Microsoft Security Bulletin MS04-028
57  *       Buffer Overrun in JPEG Processing (GDI+) Could
58  *       Allow Code Execution (833987)
59  *    Enabled with +inspect-jpegs in actions files.
60  *
61  *    Revision 1.8  2002/03/26 22:29:54  swa
62  *    we have a new homepage!
63  *
64  *    Revision 1.7  2002/03/24 13:25:43  swa
65  *    name change related issues
66  *
67  *    Revision 1.6  2002/03/08 17:46:04  jongfoster
68  *    Fixing int/size_t warnings
69  *
70  *    Revision 1.5  2002/03/07 03:46:17  oes
71  *    Fixed compiler warnings
72  *
73  *    Revision 1.4  2001/07/29 18:50:04  jongfoster
74  *    Fixing "extern C" block, and renaming #define _DEANIMATE_H
75  *
76  *    Revision 1.3  2001/07/18 12:29:05  oes
77  *    Updated prototype for gif_deanimate
78  *
79  *    Revision 1.2  2001/07/13 13:46:20  oes
80  *    Introduced GIF deanimation feature
81  *
82  *
83  *********************************************************************/
84 \f
85
86 #ifdef __cplusplus
87 extern "C" {
88 #endif
89
90 /*
91  * A struct that holds a buffer, a read/write offset,
92  * and the buffer's capacity.
93  */
94 struct binbuffer
95 {
96    char *buffer;
97    size_t offset;
98    size_t size;
99 };
100
101 /*
102  * Function prototypes
103  */
104 extern int gif_deanimate(struct binbuffer *src, struct binbuffer *dst, int get_first_image);
105 extern void buf_free(struct binbuffer *buf);
106
107 /* 
108  * Revision control strings from this header and associated .c file
109  */
110 extern const char deanimate_rcs[];
111 extern const char deanimate_h_rcs[];
112
113 #ifdef __cplusplus
114 } /* extern "C" */
115 #endif
116
117 #endif /* ndef DEANIMATE_H_INCLUDED */
118
119 /*
120   Local Variables:
121   tab-width: 3
122   end:
123 */