~ubuntu-branches/ubuntu/natty/ntop/natty

« back to all changes in this revision

Viewing changes to gdchart0.94c/gd-1.8.3/libpng-1.0.8/contrib/gregbook/readpng.h

  • Committer: Bazaar Package Importer
  • Author(s): Ola Lundqvist
  • Date: 2005-01-30 21:59:13 UTC
  • mfrom: (2.1.1 warty)
  • Revision ID: james.westby@ubuntu.com-20050130215913-xc3ke963bw49b3k4
Tags: 2:3.0-5
* Updated README.Debian file so users will understand what to do at
  install, closes: #291794, #287802.
* Updated ntop init script to give better output.
* Also changed log directory from /var/lib/ntop to /var/log/ntop,
  closes: #252352.
* Quoted the interface list to allow whitespace, closes: #267248.
* Added a couple of logcheck ignores, closes: #269321, #269319.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/*---------------------------------------------------------------------------
2
 
 
3
 
   rpng - simple PNG display program                              readpng.h
4
 
 
5
 
  ---------------------------------------------------------------------------
6
 
 
7
 
      Copyright (c) 1998-2000 Greg Roelofs.  All rights reserved.
8
 
 
9
 
      This software is provided "as is," without warranty of any kind,
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
12
 
      this software.
13
 
 
14
 
      Permission is granted to anyone to use this software for any purpose,
15
 
      including commercial applications, and to alter it and redistribute
16
 
      it freely, subject to the following restrictions:
17
 
 
18
 
      1. Redistributions of source code must retain the above copyright
19
 
         notice, disclaimer, and this list of conditions.
20
 
      2. Redistributions in binary form must reproduce the above copyright
21
 
         notice, disclaimer, and this list of conditions in the documenta-
22
 
         tion and/or other materials provided with the distribution.
23
 
      3. All advertising materials mentioning features or use of this
24
 
         software must display the following acknowledgment:
25
 
 
26
 
            This product includes software developed by Greg Roelofs
27
 
            and contributors for the book, "PNG: The Definitive Guide,"
28
 
            published by O'Reilly and Associates.
29
 
 
30
 
  ---------------------------------------------------------------------------*/
31
 
 
32
 
#ifndef TRUE
33
 
#  define TRUE 1
34
 
#  define FALSE 0
35
 
#endif
36
 
 
37
 
#ifndef MAX
38
 
#  define MAX(a,b)  ((a) > (b)? (a) : (b))
39
 
#  define MIN(a,b)  ((a) < (b)? (a) : (b))
40
 
#endif
41
 
 
42
 
#ifdef DEBUG
43
 
#  define Trace(x)  {fprintf x ; fflush(stderr); fflush(stdout);}
44
 
#else
45
 
#  define Trace(x)  ;
46
 
#endif
47
 
 
48
 
typedef unsigned char   uch;
49
 
typedef unsigned short  ush;
50
 
typedef unsigned long   ulg;
51
 
 
52
 
 
53
 
/* prototypes for public functions in readpng.c */
54
 
 
55
 
void readpng_version_info(void);
56
 
 
57
 
int readpng_init(FILE *infile, ulg *pWidth, ulg *pHeight);
58
 
 
59
 
int readpng_get_bgcolor(uch *bg_red, uch *bg_green, uch *bg_blue);
60
 
 
61
 
uch *readpng_get_image(double display_exponent, int *pChannels,
62
 
                       ulg *pRowbytes);
63
 
 
64
 
void readpng_cleanup(int free_image_data);