aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h
diff options
context:
space:
mode:
authorDavid Walter Seikel2013-01-13 18:54:10 +1000
committerDavid Walter Seikel2013-01-13 18:54:10 +1000
commit959831f4ef5a3e797f576c3de08cd65032c997ad (patch)
treee7351908be5995f0b325b2ebeaa02d5a34b82583 /libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h
parentAdd info about changes to Irrlicht. (diff)
downloadSledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.zip
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.gz
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.bz2
SledjHamr-959831f4ef5a3e797f576c3de08cd65032c997ad.tar.xz
Remove damned ancient DOS line endings from Irrlicht. Hopefully I did not go overboard.
Diffstat (limited to 'libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h')
-rw-r--r--libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h232
1 files changed, 116 insertions, 116 deletions
diff --git a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h
index 7a59263..6b3660d 100644
--- a/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h
+++ b/libraries/irrlicht-1.8/source/Irrlicht/libpng/contrib/gregbook/readpng2.h
@@ -1,116 +1,116 @@
1/*--------------------------------------------------------------------------- 1/*---------------------------------------------------------------------------
2 2
3 rpng2 - progressive-model PNG display program readpng2.h 3 rpng2 - progressive-model PNG display program readpng2.h
4 4
5 --------------------------------------------------------------------------- 5 ---------------------------------------------------------------------------
6 6
7 Copyright (c) 1998-2008 Greg Roelofs. All rights reserved. 7 Copyright (c) 1998-2008 Greg Roelofs. All rights reserved.
8 8
9 This software is provided "as is," without warranty of any kind, 9 This software is provided "as is," without warranty of any kind,
10 express or implied. In no event shall the author or contributors 10 express or implied. In no event shall the author or contributors
11 be held liable for any damages arising in any way from the use of 11 be held liable for any damages arising in any way from the use of
12 this software. 12 this software.
13 13
14 The contents of this file are DUAL-LICENSED. You may modify and/or 14 The contents of this file are DUAL-LICENSED. You may modify and/or
15 redistribute this software according to the terms of one of the 15 redistribute this software according to the terms of one of the
16 following two licenses (at your option): 16 following two licenses (at your option):
17 17
18 18
19 LICENSE 1 ("BSD-like with advertising clause"): 19 LICENSE 1 ("BSD-like with advertising clause"):
20 20
21 Permission is granted to anyone to use this software for any purpose, 21 Permission is granted to anyone to use this software for any purpose,
22 including commercial applications, and to alter it and redistribute 22 including commercial applications, and to alter it and redistribute
23 it freely, subject to the following restrictions: 23 it freely, subject to the following restrictions:
24 24
25 1. Redistributions of source code must retain the above copyright 25 1. Redistributions of source code must retain the above copyright
26 notice, disclaimer, and this list of conditions. 26 notice, disclaimer, and this list of conditions.
27 2. Redistributions in binary form must reproduce the above copyright 27 2. Redistributions in binary form must reproduce the above copyright
28 notice, disclaimer, and this list of conditions in the documenta- 28 notice, disclaimer, and this list of conditions in the documenta-
29 tion and/or other materials provided with the distribution. 29 tion and/or other materials provided with the distribution.
30 3. All advertising materials mentioning features or use of this 30 3. All advertising materials mentioning features or use of this
31 software must display the following acknowledgment: 31 software must display the following acknowledgment:
32 32
33 This product includes software developed by Greg Roelofs 33 This product includes software developed by Greg Roelofs
34 and contributors for the book, "PNG: The Definitive Guide," 34 and contributors for the book, "PNG: The Definitive Guide,"
35 published by O'Reilly and Associates. 35 published by O'Reilly and Associates.
36 36
37 37
38 LICENSE 2 (GNU GPL v2 or later): 38 LICENSE 2 (GNU GPL v2 or later):
39 39
40 This program is free software; you can redistribute it and/or modify 40 This program is free software; you can redistribute it and/or modify
41 it under the terms of the GNU General Public License as published by 41 it under the terms of the GNU General Public License as published by
42 the Free Software Foundation; either version 2 of the License, or 42 the Free Software Foundation; either version 2 of the License, or
43 (at your option) any later version. 43 (at your option) any later version.
44 44
45 This program is distributed in the hope that it will be useful, 45 This program is distributed in the hope that it will be useful,
46 but WITHOUT ANY WARRANTY; without even the implied warranty of 46 but WITHOUT ANY WARRANTY; without even the implied warranty of
47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 47 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
48 GNU General Public License for more details. 48 GNU General Public License for more details.
49 49
50 You should have received a copy of the GNU General Public License 50 You should have received a copy of the GNU General Public License
51 along with this program; if not, write to the Free Software Foundation, 51 along with this program; if not, write to the Free Software Foundation,
52 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA 52 Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
53 53
54 ---------------------------------------------------------------------------*/ 54 ---------------------------------------------------------------------------*/
55 55
56#ifndef TRUE 56#ifndef TRUE
57# define TRUE 1 57# define TRUE 1
58# define FALSE 0 58# define FALSE 0
59#endif 59#endif
60 60
61#ifndef MAX 61#ifndef MAX
62# define MAX(a,b) ((a) > (b)? (a) : (b)) 62# define MAX(a,b) ((a) > (b)? (a) : (b))
63# define MIN(a,b) ((a) < (b)? (a) : (b)) 63# define MIN(a,b) ((a) < (b)? (a) : (b))
64#endif 64#endif
65 65
66#ifdef DEBUG 66#ifdef DEBUG
67# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);} 67# define Trace(x) {fprintf x ; fflush(stderr); fflush(stdout);}
68#else 68#else
69# define Trace(x) ; 69# define Trace(x) ;
70#endif 70#endif
71 71
72enum rpng2_states { 72enum rpng2_states {
73 kPreInit = 0, 73 kPreInit = 0,
74 kWindowInit, 74 kWindowInit,
75 kDone 75 kDone
76}; 76};
77 77
78typedef unsigned char uch; 78typedef unsigned char uch;
79typedef unsigned short ush; 79typedef unsigned short ush;
80typedef unsigned long ulg; 80typedef unsigned long ulg;
81 81
82typedef struct _mainprog_info { 82typedef struct _mainprog_info {
83 double display_exponent; 83 double display_exponent;
84 ulg width; 84 ulg width;
85 ulg height; 85 ulg height;
86 void *png_ptr; 86 void *png_ptr;
87 void *info_ptr; 87 void *info_ptr;
88 void (*mainprog_init)(void); 88 void (*mainprog_init)(void);
89 void (*mainprog_display_row)(ulg row_num); 89 void (*mainprog_display_row)(ulg row_num);
90 void (*mainprog_finish_display)(void); 90 void (*mainprog_finish_display)(void);
91 uch *image_data; 91 uch *image_data;
92 uch **row_pointers; 92 uch **row_pointers;
93 jmp_buf jmpbuf; 93 jmp_buf jmpbuf;
94 int passes; /* not used */ 94 int passes; /* not used */
95 int pass; 95 int pass;
96 int rowbytes; 96 int rowbytes;
97 int channels; 97 int channels;
98 int need_bgcolor; 98 int need_bgcolor;
99 int state; 99 int state;
100 uch bg_red; 100 uch bg_red;
101 uch bg_green; 101 uch bg_green;
102 uch bg_blue; 102 uch bg_blue;
103} mainprog_info; 103} mainprog_info;
104 104
105 105
106/* prototypes for public functions in readpng2.c */ 106/* prototypes for public functions in readpng2.c */
107 107
108void readpng2_version_info(void); 108void readpng2_version_info(void);
109 109
110int readpng2_check_sig(uch *sig, int num); 110int readpng2_check_sig(uch *sig, int num);
111 111
112int readpng2_init(mainprog_info *mainprog_ptr); 112int readpng2_init(mainprog_info *mainprog_ptr);
113 113
114int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length); 114int readpng2_decode_data(mainprog_info *mainprog_ptr, uch *rawbuf, ulg length);
115 115
116void readpng2_cleanup(mainprog_info *mainprog_ptr); 116void readpng2_cleanup(mainprog_info *mainprog_ptr);