"Fossies" - the Fresh Open Source Software Archive 
Member "xearth-1.1/giflib.h" (7 Nov 1999, 4595 Bytes) of package /linux/misc/old/xearth-1.1.tar.gz:
As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C and C++ source code syntax highlighting (style:
standard) with prefixed line numbers and
code folding option.
Alternatively you can here
view or
download the uninterpreted source code file.
1 /*
2 * giflib/giflib.h
3 * kirk johnson
4 * may 1990
5 *
6 * Copyright (C) 1989, 1990, 1993-1995, 1999 Kirk Lauritz Johnson
7 *
8 * Parts of the source code (as marked) are:
9 * Copyright (C) 1989, 1990, 1991 by Jim Frost
10 * Copyright (C) 1992 by Jamie Zawinski <jwz@lucid.com>
11 *
12 * Permission to use, copy, modify and freely distribute xearth for
13 * non-commercial and not-for-profit purposes is hereby granted
14 * without fee, provided that both the above copyright notice and this
15 * permission notice appear in all copies and in supporting
16 * documentation.
17 *
18 * Unisys Corporation holds worldwide patent rights on the Lempel Zev
19 * Welch (LZW) compression technique employed in the CompuServe GIF
20 * image file format as well as in other formats. Unisys has made it
21 * clear, however, that it does not require licensing or fees to be
22 * paid for freely distributed, non-commercial applications (such as
23 * xearth) that employ LZW/GIF technology. Those wishing further
24 * information about licensing the LZW patent should contact Unisys
25 * directly at (lzw_info@unisys.com) or by writing to
26 *
27 * Unisys Corporation
28 * Welch Licensing Department
29 * M/S-C1SW19
30 * P.O. Box 500
31 * Blue Bell, PA 19424
32 *
33 * The author makes no representations about the suitability of this
34 * software for any purpose. It is provided "as is" without express or
35 * implied warranty.
36 *
37 * THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
38 * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS,
39 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, INDIRECT
40 * OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
41 * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
42 * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN
43 * CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
44 */
45
46 #ifndef _GIFLIB_H_
47 #define _GIFLIB_H_
48
49 #include "kljcpyrt.h"
50
51 /*
52 * giflib return codes
53 */
54
55 #define GIFLIB_SUCCESS 0 /* success */
56 #define GIFLIB_DONE 1 /* no more images */
57
58 #define GIFLIB_ERR_BAD_SD -1 /* bad screen descriptor */
59 #define GIFLIB_ERR_BAD_SEP -2 /* bad image separator */
60 #define GIFLIB_ERR_BAD_SIG -3 /* bad signature */
61 #define GIFLIB_ERR_EOD -4 /* unexpected end of raster data */
62 #define GIFLIB_ERR_EOF -5 /* unexpected end of input stream */
63 #define GIFLIB_ERR_OUT -6 /* i/o output error */
64 #define GIFLIB_ERR_FAO -7 /* file already open */
65 #define GIFLIB_ERR_IAO -8 /* image already open */
66 #define GIFLIB_ERR_ISO -9 /* image still open */
67 #define GIFLIB_ERR_NFO -10 /* no file open */
68 #define GIFLIB_ERR_NIO -11 /* no image open */
69
70 /*
71 * colormap indices
72 */
73
74 #define GIFLIB_RED 0
75 #define GIFLIB_GRN 1
76 #define GIFLIB_BLU 2
77
78 /*
79 * typedef BYTE for convenience
80 */
81
82 typedef unsigned char BYTE;
83
84 #ifdef USING_GIF_IN
85
86 /*
87 * procedures exported by gifin.c
88 */
89
90 extern int gifin_open_file();
91 extern int gifin_open_image();
92 extern int gifin_get_pixel();
93 extern int gifin_get_row();
94 extern int gifin_close_image();
95 extern int gifin_close_file();
96
97 /*
98 * variables exported by gifin.c
99 */
100
101 extern int gifin_rast_width; /* raster width */
102 extern int gifin_rast_height; /* raster height */
103 extern BYTE gifin_g_cmap_flag; /* global colormap flag */
104 extern int gifin_g_pixel_bits; /* bits per pixel, global colormap */
105 extern int gifin_g_ncolors; /* number of colors, global colormap */
106 extern BYTE gifin_g_cmap[3][256]; /* global colormap */
107 extern int gifin_bg_color; /* background color index */
108 extern int gifin_color_bits; /* bits of color resolution */
109
110 extern int gifin_img_left; /* image position on raster */
111 extern int gifin_img_top; /* image position on raster */
112 extern int gifin_img_width; /* image width */
113 extern int gifin_img_height; /* image height */
114 extern BYTE gifin_l_cmap_flag; /* local colormap flag */
115 extern int gifin_l_pixel_bits; /* bits per pixel, local colormap */
116 extern int gifin_l_ncolors; /* number of colors, local colormap */
117 extern BYTE gifin_l_cmap[3][256]; /* local colormap */
118 extern BYTE gifin_interlace_flag; /* interlace image format flag */
119
120 #endif /* USING_GIF_IN */
121
122 /*
123 * procedures exported by gifout.c
124 */
125
126 extern int gifout_open_file _P((FILE *, int, int, int, BYTE [3][256], int));
127 extern int gifout_open_image _P((int, int, int, int));
128 extern void gifout_put_pixel _P((int));
129 extern void gifout_put_row _P((int *));
130 extern int gifout_close_image _P((void));
131 extern int gifout_close_file _P((void));
132
133 #endif