zenilib: zenilib/jni/external/libpng/pngtest.c File Reference

zenilib 0.5.3.0

- Main Page
- Modules
- Namespaces
- Classes
- Files

- File List
- File Members

All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
Macros | Typedefs | Functions | Variables
pngtest.c File Reference
`#include "zlib.h"`
`#include "png.h"`
`#include <stdio.h>`
`#include <stdlib.h>`
`#include <string.h>`

Go to the source code of this file.

## Macros

#define | _POSIX_SOURCE 1
#define | CVT_PTR(ptr) (ptr)
#define | CVT_PTR_NOCHECK(ptr) (ptr)
#define | FCLOSE(file) fclose(file)
#define | PNG_DEBUG 0
#define | png_memcmp memcmp
#define | png_memcpy memcpy
#define | png_memset memset
#define | PNG_tIME_STRING_LENGTH 29
#define | pngtest_debug(m) ((void)0)
#define | pngtest_debug1(m, p1) ((void)0)
#define | pngtest_debug2(m, p1, p2) ((void)0)
#define | SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */
#define | STDERR stdout /* For DOS */

## Typedefs

typedef png_libpng_version_1_5_9 | Your_png_h_is_not_version_1_5_9

## Functions

void PNGCBAPI | count_filters (png_structp png_ptr, png_row_infop row_info, png_bytep data)
void PNGCBAPI | count_zero_samples (png_structp png_ptr, png_row_infop row_info, png_bytep data)
int | main (int argc, char *argv[])
int test_one_file | PNGARG ((PNG_CONST char *inname, PNG_CONST char *outname))
void PNGCBAPI | read_row_callback (png_structp png_ptr, png_uint_32 row_number, int pass)
static int PNGCBAPI | read_user_chunk_callback (png_struct *png_ptr, png_unknown_chunkp chunk)
int | test_one_file (PNG_CONST char *inname, PNG_CONST char *outname)
void PNGCBAPI | write_row_callback (png_structp png_ptr, png_uint_32 row_number, int pass)

## Variables

static png_uint_32 | filters_used [256]
static PNG_CONST char * | inname = "pngtest.png"
static PNG_CONST char * | outname = "pngout.png"
static int | status_dots = 1
static int | status_dots_requested = 0
static int | status_pass = 1
static int | strict = 0
static int | tIME_chunk_present = 0
static char | tIME_string [PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"
static png_uint_32 | user_chunk_data [4]
static int | verbose = 0
static int | wrote_question = 0
static png_uint_32 | zero_samples

## Macro Definition Documentation

#define _POSIX_SOURCE 1

Definition at line 34 of file pngtest.c.

#define CVT_PTR | ( |  | ptr | ) | (ptr)

Definition at line 75 of file pngtest.c.

#define CVT_PTR_NOCHECK | ( |  | ptr | ) | (ptr)

Definition at line 76 of file pngtest.c.

#define FCLOSE | ( |  | file | ) | fclose(file)

Definition at line 45 of file pngtest.c.

Referenced by test_one_file().

#define PNG_DEBUG 0

Definition at line 53 of file pngtest.c.

#define png_memcmp memcmp

Definition at line 77 of file pngtest.c.

Referenced by test_one_file().

#define png_memcpy memcpy

Definition at line 78 of file pngtest.c.

Referenced by test_one_file().

#define png_memset memset

Definition at line 79 of file pngtest.c.

#define PNG_tIME_STRING_LENGTH 29

Definition at line 95 of file pngtest.c.

#define pngtest_debug | ( |  | m | ) | ((void)0)

Definition at line 61 of file pngtest.c.

Referenced by test_one_file().

#define pngtest_debug1 | ( |  | m,
|  |  | p1
| ) |  | ((void)0)

Definition at line 62 of file pngtest.c.

Referenced by test_one_file().

#define pngtest_debug2 | ( |  | m,
|  |  | p1,
|  |  | p2
| ) |  | ((void)0)

Definition at line 63 of file pngtest.c.

Referenced by test_one_file().

#define SINGLE_ROWBUF_ALLOC /* Makes buffer overruns easier to nail */

Definition at line 67 of file pngtest.c.

#define STDERR stdout /* For DOS */

Definition at line 111 of file pngtest.c.

Referenced by main(), and test_one_file().

## Typedef Documentation

typedef png_libpng_version_1_5_9 Your_png_h_is_not_version_1_5_9

Definition at line 1820 of file pngtest.c.

## Function Documentation

void PNGCBAPI count_filters | ( | png_structp | png_ptr,
|  | png_row_infop | row_info,
|  | png_bytep | data
| ) |  |

Definition at line 170 of file pngtest.c.

References NULL.

Referenced by test_one_file().

void PNGCBAPI count_zero_samples | ( | png_structp | png_ptr,
|  | png_row_infop | row_info,
|  | png_bytep | data
| ) |  |

Definition at line 187 of file pngtest.c.

References NULL.

Referenced by test_one_file().

int main | ( | int | argc,
|  | char * | argv[]
| ) |  |

Definition at line 1542 of file pngtest.c.

References i, k, NULL, png_access_version_number(), png_get_copyright(), png_get_header_version(), PNG_HEADER_VERSION_STRING, PNG_LIBPNG_VER, png_libpng_ver, PNG_LIBPNG_VER_STRING, STDERR, strict, test_one_file(), tIME_chunk_present, tIME_string, verbose, and ZLIB_VERSION.

int test_one_file PNGARG | ( | (PNG_CONST char *inname, PNG_CONST char *outname) |  | ) |

void PNGCBAPI read_row_callback | ( | png_structp | png_ptr,
|  | png_uint_32 | row_number,
|  | int | pass
| ) |  |

Definition at line 126 of file pngtest.c.

References NULL, and PNG_UINT_31_MAX.

Referenced by test_one_file().

static int PNGCBAPI read_user_chunk_callback | ( | png_struct * | png_ptr,
|  | png_unknown_chunkp | chunk
| ) |  |

static

Definition at line 706 of file pngtest.c.

References png_get_uint_31(), png_get_user_chunk_ptr(), and return.

Referenced by test_one_file().

int test_one_file | ( | PNG_CONST char * | inname,
|  | PNG_CONST char * | outname
| ) |  |

Definition at line 763 of file pngtest.c.

References compression_type, count_filters(), count_zero_samples(), FCLOSE, i, NULL, PNG_COLOR_TYPE_GRAY, PNG_COLOR_TYPE_RGB, png_convert_to_rfc1123(), png_destroy_info_struct(), png_destroy_read_struct(), png_destroy_write_struct(), png_free(), png_free_data(), PNG_FREE_UNKN, png_get_bKGD(), png_get_cHRM(), png_get_cHRM_fixed(), png_get_gAMA(), png_get_gAMA_fixed(), png_get_hIST(), png_get_iCCP(), png_get_IHDR(), png_get_image_height(), png_get_image_width(), png_get_oFFs(), png_get_pCAL(), png_get_pHYs(), png_get_PLTE(), png_get_rowbytes(), png_get_sBIT(), png_get_sCAL(), png_get_sCAL_s(), png_get_sRGB(), png_get_text(), png_get_tIME(), png_get_tRNS(), png_get_unknown_chunks(), PNG_HANDLE_CHUNK_ALWAYS, PNG_HANDLE_CHUNK_IF_SAFE, png_init_io(), PNG_INTERLACE_NONE, png_jmpbuf, PNG_LIBPNG_VER_STRING, png_memcmp, png_memcpy, png_read_end(), png_read_info(), png_read_rows(), png_save_uint_32(), png_set_bKGD(), png_set_cHRM(), png_set_cHRM_fixed(), png_set_error_fn(), png_set_gAMA(), png_set_gAMA_fixed(), png_set_hIST(), png_set_iCCP(), png_set_IHDR(), png_set_interlace_handling(), png_set_keep_unknown_chunks(), png_set_oFFs(), png_set_pCAL(), png_set_pHYs(), png_set_PLTE(), png_set_read_fn(), png_set_read_status_fn(), png_set_read_user_chunk_fn(), png_set_read_user_transform_fn(), png_set_sBIT(), png_set_sCAL(), png_set_sCAL_s(), png_set_sRGB(), png_set_text(), png_set_text_compression_strategy(), png_set_tIME(), png_set_tRNS(), png_set_unknown_chunk_location(), png_set_unknown_chunks(), png_set_write_fn(), png_set_write_status_fn(), png_set_write_user_transform_fn(), png_sizeof, png_sTER, png_write_chunk(), png_write_end(), PNG_WRITE_FLUSH_SUPPORTED, png_write_info(), PNG_WRITE_INTERLACING_SUPPORTED, png_write_rows(), PNG_ZBUF_SIZE, pngtest_debug, pngtest_debug1, pngtest_debug2, profile, read_row_callback(), read_user_chunk_callback(), STDERR, strict, tIME_chunk_present, tIME_string, verbose, write_row_callback(), Z_FILTERED, and ZLIB_VERSION.

Referenced by main().

void PNGCBAPI write_row_callback | ( | png_structp | png_ptr,
|  | png_uint_32 | row_number,
|  | int | pass
| ) |  |

Definition at line 152 of file pngtest.c.

References NULL, and PNG_UINT_31_MAX.

Referenced by test_one_file().

## Variable Documentation

png_uint_32 filters_used[256]

static

Definition at line 166 of file pngtest.c.

PNG_CONST char* inname = "pngtest.png"

static

Definition at line 1537 of file pngtest.c.

PNG_CONST char* outname = "pngout.png"

static

Definition at line 1538 of file pngtest.c.

int status_dots = 1

static

Definition at line 121 of file pngtest.c.

int status_dots_requested = 0

static

Definition at line 120 of file pngtest.c.

int status_pass = 1

static

Definition at line 119 of file pngtest.c.

int strict = 0

static

Definition at line 101 of file pngtest.c.

Referenced by main(), and test_one_file().

int tIME_chunk_present = 0

static

Definition at line 96 of file pngtest.c.

Referenced by main(), and test_one_file().

char tIME_string[PNG_tIME_STRING_LENGTH] = "tIME chunk is not present"

static

Definition at line 97 of file pngtest.c.

Referenced by main(), and test_one_file().

png_uint_32 user_chunk_data[4]

static

Definition at line 698 of file pngtest.c.

int verbose = 0

static

Definition at line 100 of file pngtest.c.

int wrote_question = 0

static

Definition at line 293 of file pngtest.c.

png_uint_32 zero_samples

static

Definition at line 182 of file pngtest.c.