Update of /cvsroot/vba/VisualBoyAdvance/win32/dependencies/libjasper/include/jasper In directory sc8-pr-cvs9.sourceforge.net:/tmp/cvs-serv20508/win32/dependencies/libjasper/include/jasper Added Files: jas_cm.h jas_config.h jas_config2.h jas_debug.h jas_fix.h jas_getopt.h jas_icc.h jas_image.h jas_init.h jas_malloc.h jas_math.h jas_seq.h jas_stream.h jas_string.h jas_tvp.h jas_types.h jas_version.h jasper.h Log Message: --- NEW FILE: jas_config.h --- /* src/libjasper/include/jasper/jas_config.h. Generated by configure. */ /* src/libjasper/include/jasper/jas_config.h.in. Generated from configure.ac by autoheader. */ /* Avoid problems due to multiple inclusion. */ #ifndef JAS_CONFIG_H #define JAS_CONFIG_H /* This preprocessor symbol identifies the version of JasPer. */ #define JAS_VERSION "1.701.0" /* If configure is being used, this symbol will be defined automatically at this point in the configuration header file. */ /* The preprocessor symbol JAS_WIN_MSVC_BUILD should not be defined unless the JasPer software is being built under Microsoft Windows using Microsoft Visual C. */ #ifndef JAS_WIN_MSVC_BUILD /* A configure-based build is being used. */ /* Extra debugging support */ /* #undef DEBUG */ /* Debugging memory allocator */ /* #undef DEBUG_MEMALLOC */ /* Debugging overflow detection */ /* #undef DEBUG_OVERFLOW */ /* Define to 1 if you have the <dlfcn.h> header file. */ #define HAVE_DLFCN_H 1 /* Define to 1 if you don't have `vprintf' but do have `_doprnt.' */ /* #undef HAVE_DOPRNT */ /* Define to 1 if you have the <fcntl.h> header file. */ #define HAVE_FCNTL_H 1 /* Define to 1 if you have the <inttypes.h> header file. */ #define HAVE_INTTYPES_H 1 /* Define to 1 if you have the <io.h> header file. */ /* #undef HAVE_IO_H */ /* Define to 1 if you have the `m' library (-lm). */ #define HAVE_LIBM 1 /* Define to 1 if you have the <limits.h> header file. */ #define HAVE_LIMITS_H 1 /* Define to 1 if you have the <memory.h> header file. */ #define HAVE_MEMORY_H 1 /* Define to 1 if you have the <stdbool.h> header file. */ #define HAVE_STDBOOL_H 1 /* Define to 1 if you have the <stddef.h> header file. */ #define HAVE_STDDEF_H 1 /* Define to 1 if you have the <stdint.h> header file. */ #define HAVE_STDINT_H 1 /* Define to 1 if you have the <stdlib.h> header file. */ #define HAVE_STDLIB_H 1 /* Define to 1 if you have the <strings.h> header file. */ #define HAVE_STRINGS_H 1 /* Define to 1 if you have the <string.h> header file. */ #define HAVE_STRING_H 1 /* Define to 1 if you have the <sys/stat.h> header file. */ #define HAVE_SYS_STAT_H 1 /* Define to 1 if you have the <sys/types.h> header file. */ #define HAVE_SYS_TYPES_H 1 /* Define to 1 if you have the <unistd.h> header file. */ #define HAVE_UNISTD_H 1 /* Have variable length arrays */ #define HAVE_VLA 1 /* Define to 1 if you have the `vprintf' function. */ #define HAVE_VPRINTF 1 /* Define to 1 if you have the <windows.h> header file. */ /* #undef HAVE_WINDOWS_H */ /* JasPer configure */ #define JAS_CONFIGURE 1 /* JasPer version */ #define JAS_VERSION "1.701.0" /* Name of package */ #define PACKAGE "jasper" /* Define to the address where bug reports for this package should be sent. */ #define PACKAGE_BUGREPORT "" /* Define to the full name of this package. */ #define PACKAGE_NAME "jasper" /* Define to the full name and version of this package. */ #define PACKAGE_STRING "jasper 1.701.0" /* Define to the one symbol short name of this package. */ #define PACKAGE_TARNAME "jasper" /* Define to the version of this package. */ #define PACKAGE_VERSION "1.701.0" /* The size of a `int', as computed by sizeof. */ #define SIZEOF_INT 4 /* The size of a `long', as computed by sizeof. */ #define SIZEOF_LONG 4 /* The size of a `long long', as computed by sizeof. */ #define SIZEOF_LONG_LONG 8 /* The size of a `short', as computed by sizeof. */ #define SIZEOF_SHORT 2 /* The size of a `unsigned int', as computed by sizeof. */ #define SIZEOF_UNSIGNED_INT 4 /* The size of a `unsigned long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG 4 /* The size of a `unsigned long long', as computed by sizeof. */ #define SIZEOF_UNSIGNED_LONG_LONG 8 /* The size of a `unsigned short', as computed by sizeof. */ #define SIZEOF_UNSIGNED_SHORT 2 /* Define to 1 if you have the ANSI C header files. */ #define STDC_HEADERS 1 /* Version number of package */ #define VERSION "1.701.0" /* Define to 1 if your processor stores words with the most significant byte first (like Motorola and SPARC, unlike Intel and VAX). */ /* #undef WORDS_BIGENDIAN */ /* Define to 1 if the X Window System is missing or not being used. */ /* #undef X_DISPLAY_MISSING */ /* Define to empty if `const' does not conform to ANSI C. */ /* #undef const */ /* Define as `__inline' if that's what the C compiler calls it, or to nothing if it is not supported. */ /* #undef inline */ /* Define to `long long' if <sys/types.h> does not define. */ #define longlong long long /* Define to `unsigned' if <sys/types.h> does not define. */ /* #undef size_t */ /* Define to `int' if <sys/types.h> does not define. */ /* #undef ssize_t */ /* Define to `unsigned char' if <sys/types.h> does not define. */ #define uchar unsigned char /* Define to `unsigned int' if <sys/types.h> does not define. */ /* #undef uint */ /* Define to `unsigned long' if <sys/types.h> does not define. */ /* #undef ulong */ /* Define to `unsigned long long' if <sys/types.h> does not define. */ #define ulonglong unsigned long long /* Define to `unsigned short' if <sys/types.h> does not define. */ /* #undef ushort */ #else /* A configure-based build is not being used. */ #include <jasper/jas_config2.h> #endif #endif --- NEW FILE: jasper.h --- /* * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_JASPER_H #define JAS_JASPER_H #include <jasper/jas_config.h> #include <jasper/jas_types.h> #include <jasper/jas_version.h> #include <jasper/jas_init.h> #include <jasper/jas_cm.h> #include <jasper/jas_icc.h> #include <jasper/jas_fix.h> #include <jasper/jas_debug.h> #include <jasper/jas_getopt.h> #include <jasper/jas_image.h> #include <jasper/jas_icc.h> #include <jasper/jas_math.h> #include <jasper/jas_malloc.h> #include <jasper/jas_seq.h> #include <jasper/jas_stream.h> #include <jasper/jas_string.h> #include <jasper/jas_tvp.h> #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_init.h --- /* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_INIT_H #define JAS_INIT_H #include <jasper/jas_config.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Functions. \******************************************************************************/ int jas_init(void); void jas_cleanup(void); #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_version.h --- /* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * $Id: jas_version.h,v 1.1 2006/05/12 21:26:38 spacy51 Exp $ */ #ifndef JAS_VERSION_H #define JAS_VERSION_H #include <jasper/jas_config.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants and types. \******************************************************************************/ #if !defined(JAS_VERSION) /* The version information below should match that specified in the "configure.in" file! */ #define JAS_VERSION "unknown" #endif #define JAS_COPYRIGHT \ "Copyright (c) 1999-2000 Image Power, Inc. and the University of\n" \ " British Columbia.\n" \ "Copyright (c) 2001-2003 Michael David Adams.\n" \ "All rights reserved.\n" #define JAS_NOTES \ "For more information about this software, please visit the following\n" \ "web sites/pages:\n" \ " http://www.ece.uvic.ca/~mdadams/jasper\n" \ " http://www.jpeg.org/software\n" \ "To be added to the (moderated) JasPer software announcements\n" \ "mailing list, send an email to:\n" \ " jas...@ya...\n" \ "To be added to the (unmoderated) JasPer software discussion\n" \ "mailing list, send an email to:\n" \ " jas...@ya...\n" \ "Please send any bug reports to:\n" \ " md...@ie...\n" /******************************************************************************\ * Functions. \******************************************************************************/ const char *jas_getversion(void); /* Get the version information for the JasPer library. */ /* Note: Since libjasper can be built as a shared library, the version returned by this function may not necessarily correspond to JAS_VERSION. */ #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_seq.h --- /* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Sequence/Matrix Library * * $Id: jas_seq.h,v 1.1 2006/05/12 21:26:38 spacy51 Exp $ */ #ifndef JAS_SEQ_H #define JAS_SEQ_H /******************************************************************************\ * Includes. \******************************************************************************/ #include <jasper/jas_config.h> #include <jasper/jas_stream.h> #include <jasper/jas_types.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* This matrix is a reference to another matrix. */ #define JAS_MATRIX_REF 0x0001 /******************************************************************************\ * Types. \******************************************************************************/ /* An element in a sequence. */ typedef int_fast32_t jas_seqent_t; /* An element in a matrix. */ typedef int_fast32_t jas_matent_t; /* Matrix. */ typedef struct { /* Additional state information. */ int flags_; /* The starting horizontal index. */ int_fast32_t xstart_; /* The starting vertical index. */ int_fast32_t ystart_; /* The ending horizontal index. */ int_fast32_t xend_; /* The ending vertical index. */ int_fast32_t yend_; /* The number of rows in the matrix. */ int_fast32_t numrows_; /* The number of columns in the matrix. */ int_fast32_t numcols_; /* Pointers to the start of each row. */ jas_seqent_t **rows_; /* The allocated size of the rows array. */ int_fast32_t maxrows_; /* The matrix data buffer. */ jas_seqent_t *data_; /* The allocated size of the data array. */ int_fast32_t datasize_; } jas_matrix_t; typedef jas_matrix_t jas_seq2d_t; typedef jas_matrix_t jas_seq_t; /******************************************************************************\ * Functions/macros for matrix class. \******************************************************************************/ /* Get the number of rows. */ #define jas_matrix_numrows(matrix) \ ((matrix)->numrows_) /* Get the number of columns. */ #define jas_matrix_numcols(matrix) \ ((matrix)->numcols_) /* Get a matrix element. */ #define jas_matrix_get(matrix, i, j) \ ((matrix)->rows_[i][j]) /* Set a matrix element. */ #define jas_matrix_set(matrix, i, j, v) \ ((matrix)->rows_[i][j] = (v)) /* Get an element from a matrix that is known to be a row or column vector. */ #define jas_matrix_getv(matrix, i) \ (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i]) : \ ((matrix)->rows_[i][0])) /* Set an element in a matrix that is known to be a row or column vector. */ #define jas_matrix_setv(matrix, i, v) \ (((matrix)->numrows_ == 1) ? ((matrix)->rows_[0][i] = (v)) : \ ((matrix)->rows_[i][0] = (v))) /* Get the address of an element in a matrix. */ #define jas_matrix_getref(matrix, i, j) \ (&(matrix)->rows_[i][j]) #define jas_matrix_getvref(matrix, i) \ (((matrix)->numrows_ > 1) ? jas_matrix_getref(matrix, i, 0) : jas_matrix_getref(matrix, 0, i)) #define jas_matrix_length(matrix) \ (max((matrix)->numrows_, (matrix)->numcols_)) /* Create a matrix with the specified dimensions. */ jas_matrix_t *jas_matrix_create(int numrows, int numcols); /* Destroy a matrix. */ void jas_matrix_destroy(jas_matrix_t *matrix); /* Resize a matrix. The previous contents of the matrix are lost. */ int jas_matrix_resize(jas_matrix_t *matrix, int numrows, int numcols); int jas_matrix_output(jas_matrix_t *matrix, FILE *out); /* Create a matrix that references part of another matrix. */ void jas_matrix_bindsub(jas_matrix_t *mat0, jas_matrix_t *mat1, int r0, int c0, int r1, int c1); /* Create a matrix that is a reference to a row of another matrix. */ #define jas_matrix_bindrow(mat0, mat1, r) \ (jas_matrix_bindsub((mat0), (mat1), (r), 0, (r), (mat1)->numcols_ - 1)) /* Create a matrix that is a reference to a column of another matrix. */ #define jas_matrix_bindcol(mat0, mat1, c) \ (jas_matrix_bindsub((mat0), (mat1), 0, (c), (mat1)->numrows_ - 1, (c))) /* Clip the values of matrix elements to the specified range. */ void jas_matrix_clip(jas_matrix_t *matrix, jas_seqent_t minval, jas_seqent_t maxval); /* Arithmetic shift left of all elements in a matrix. */ void jas_matrix_asl(jas_matrix_t *matrix, int n); /* Arithmetic shift right of all elements in a matrix. */ void jas_matrix_asr(jas_matrix_t *matrix, int n); /* Almost-but-not-quite arithmetic shift right of all elements in a matrix. */ void jas_matrix_divpow2(jas_matrix_t *matrix, int n); /* Set all elements of a matrix to the specified value. */ void jas_matrix_setall(jas_matrix_t *matrix, jas_seqent_t val); /* The spacing between rows of a matrix. */ #define jas_matrix_rowstep(matrix) \ (((matrix)->numrows_ > 1) ? ((matrix)->rows_[1] - (matrix)->rows_[0]) : (0)) /* The spacing between columns of a matrix. */ #define jas_matrix_step(matrix) \ (((matrix)->numrows_ > 1) ? (jas_matrix_rowstep(matrix)) : (1)) /* Compare two matrices for equality. */ int jas_matrix_cmp(jas_matrix_t *mat0, jas_matrix_t *mat1); jas_matrix_t *jas_matrix_copy(jas_matrix_t *x); /******************************************************************************\ * Functions/macros for 2-D sequence class. \******************************************************************************/ jas_seq2d_t *jas_seq2d_copy(jas_seq2d_t *x); jas_matrix_t *jas_seq2d_create(int xstart, int ystart, int xend, int yend); #define jas_seq2d_destroy(s) \ jas_matrix_destroy(s) #define jas_seq2d_xstart(s) \ ((s)->xstart_) #define jas_seq2d_ystart(s) \ ((s)->ystart_) #define jas_seq2d_xend(s) \ ((s)->xend_) #define jas_seq2d_yend(s) \ ((s)->yend_) #define jas_seq2d_getref(s, x, y) \ (jas_matrix_getref(s, (y) - (s)->ystart_, (x) - (s)->xstart_)) #define jas_seq2d_get(s, x, y) \ (jas_matrix_get(s, (y) - (s)->ystart_, (x) - (s)->xstart_)) #define jas_seq2d_rowstep(s) \ jas_matrix_rowstep(s) #define jas_seq2d_width(s) \ ((s)->xend_ - (s)->xstart_) #define jas_seq2d_height(s) \ ((s)->yend_ - (s)->ystart_) #define jas_seq2d_setshift(s, x, y) \ ((s)->xstart_ = (x), (s)->ystart_ = (y), \ (s)->xend_ = (s)->xstart_ + (s)->numcols_, \ (s)->yend_ = (s)->ystart_ + (s)->numrows_) void jas_seq2d_bindsub(jas_matrix_t *s, jas_matrix_t *s1, int xstart, int ystart, int xend, int yend); /******************************************************************************\ * Functions/macros for 1-D sequence class. \******************************************************************************/ #define jas_seq_create(start, end) \ (jas_seq2d_create(start, 0, end, 1)) #define jas_seq_destroy(seq) \ (jas_seq2d_destroy(seq)) #define jas_seq_set(seq, i, v) \ ((seq)->rows_[0][(i) - (seq)->xstart_] = (v)) #define jas_seq_getref(seq, i) \ (&(seq)->rows_[0][(i) - (seq)->xstart_]) #define jas_seq_get(seq, i) \ ((seq)->rows_[0][(i) - (seq)->xstart_]) #define jas_seq_start(seq) \ ((seq)->xstart_) #define jas_seq_end(seq) \ ((seq)->xend_) #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_icc.h --- /* * Copyright (c) 2002-2003 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ #ifndef JAS_ICC_H #define JAS_ICC_H #include <jasper/jas_config.h> #include <jasper/jas_types.h> #include <jasper/jas_stream.h> #ifdef __cplusplus extern "C" { #endif /* Profile file signature. */ #define JAS_ICC_MAGIC 0x61637370 #define JAS_ICC_HDRLEN 128 /* Profile/device class signatures. */ #define JAS_ICC_CLAS_IN 0x73636e72 /* input device */ #define JAS_ICC_CLAS_DPY 0x6d6e7472 /* display device */ #define JAS_ICC_CLAS_OUT 0x70727472 /* output device */ #define JAS_ICC_CLAS_LNK 0x6c696e6b /* device link */ #define JAS_ICC_CLAS_CNV 0x73706163 /* color space conversion */ #define JAS_ICC_CLAS_ABS 0x61627374 /* abstract */ #define JAS_ICC_CLAS_NAM 0x6e6d636c /* named color */ /* Color space signatures. */ #define JAS_ICC_COLORSPC_XYZ 0x58595a20 /* XYZ */ #define JAS_ICC_COLORSPC_LAB 0x4c616220 /* LAB */ #define JAS_ICC_COLORSPC_LUV 0x4c757620 /* LUV */ #define JAS_ICC_COLORSPC_YCBCR 0x59436272 /* YCbCr */ #define JAS_ICC_COLORSPC_YXY 0x59787920 /* Yxy */ #define JAS_ICC_COLORSPC_RGB 0x52474220 /* RGB */ #define JAS_ICC_COLORSPC_GRAY 0x47524159 /* Gray */ #define JAS_ICC_COLORSPC_HSV 0x48535620 /* HSV */ #define JAS_ICC_COLORSPC_HLS 0x484c5320 /* HLS */ #define JAS_ICC_COLORSPC_CMYK 0x434d594b /* CMYK */ #define JAS_ICC_COLORSPC_CMY 0x434d5920 /* CMY */ #define JAS_ICC_COLORSPC_2 0x32434c52 /* 2 channel color */ #define JAS_ICC_COLORSPC_3 0x33434c52 /* 3 channel color */ #define JAS_ICC_COLORSPC_4 0x34434c52 /* 4 channel color */ #define JAS_ICC_COLORSPC_5 0x35434c52 /* 5 channel color */ #define JAS_ICC_COLORSPC_6 0x36434c52 /* 6 channel color */ #define JAS_ICC_COLORSPC_7 0x37434c52 /* 7 channel color */ #define JAS_ICC_COLORSPC_8 0x38434c52 /* 8 channel color */ #define JAS_ICC_COLORSPC_9 0x39434c52 /* 9 channel color */ #define JAS_ICC_COLORSPC_10 0x41434c52 /* 10 channel color */ #define JAS_ICC_COLORSPC_11 0x42434c52 /* 11 channel color */ #define JAS_ICC_COLORSPC_12 0x43434c52 /* 12 channel color */ #define JAS_ICC_COLORSPC_13 0x44434c52 /* 13 channel color */ #define JAS_ICC_COLORSPC_14 0x45434c52 /* 14 channel color */ #define JAS_ICC_COLORSPC_15 0x46434c52 /* 15 channel color */ /* Profile connection color space (PCS) signatures. */ #define JAS_ICC_REFCOLORSPC_XYZ 0x58595a20 /* CIE XYZ */ #define JAS_ICC_REFCOLORSPC_LAB 0x4c616220 /* CIE Lab */ /* Primary platform signatures. */ #define JAS_ICC_PLATFORM_APPL 0x4150504c /* Apple Computer */ #define JAS_ICC_PLATFORM_MSFT 0x4d534654 /* Microsoft */ #define JAS_ICC_PLATFORM_SGI 0x53474920 /* Silicon Graphics */ #define JAS_ICC_PLATFORM_SUNW 0x53554e57 /* Sun Microsystems */ #define JAS_ICC_PLATFORM_TGNT 0x54474e54 /* Taligent */ /* Profile flags. */ #define JAS_ICC_FLAGS_EMBED 0x01 /* embedded */ #define JAS_ICC_FLAGS_NOSEP 0x02 /* no separate use */ /* Attributes. */ #define JAS_ICC_ATTR_TRANS 0x01 /* transparent */ #define JAS_ICC_ATTR_MATTE 0x02 /* matte */ /* Rendering intents. */ #define JAS_ICC_INTENT_PER 0 /* perceptual */ #define JAS_ICC_INTENT_REL 1 /* relative colorimetric */ #define JAS_ICC_INTENT_SAT 2 /* saturation */ #define JAS_ICC_INTENT_ABS 3 /* absolute colorimetric */ /* Tag signatures. */ #define JAS_ICC_TAG_ATOB0 0x41324230 /* */ #define JAS_ICC_TAG_ATOB1 0x41324231 /* */ #define JAS_ICC_TAG_ATOB2 0x41324232 /* */ #define JAS_ICC_TAG_BLUMATCOL 0x6258595a /* */ #define JAS_ICC_TAG_BLUTRC 0x62545243 /* */ #define JAS_ICC_TAG_BTOA0 0x42324130 /* */ #define JAS_ICC_TAG_BTOA1 0x42324131 /* */ #define JAS_ICC_TAG_BTOA2 0x42324132 /* */ #define JAS_ICC_TAG_CALTIME 0x63616c74 /* */ #define JAS_ICC_TAG_CHARTARGET 0x74617267 /* */ #define JAS_ICC_TAG_CPYRT 0x63707274 /* */ #define JAS_ICC_TAG_CRDINFO 0x63726469 /* */ #define JAS_ICC_TAG_DEVMAKERDESC 0x646d6e64 /* */ #define JAS_ICC_TAG_DEVMODELDESC 0x646d6464 /* */ #define JAS_ICC_TAG_DEVSET 0x64657673 /* */ #define JAS_ICC_TAG_GAMUT 0x67616d74 /* */ #define JAS_ICC_TAG_GRYTRC 0x6b545243 /* */ #define JAS_ICC_TAG_GRNMATCOL 0x6758595a /* */ #define JAS_ICC_TAG_GRNTRC 0x67545243 /* */ #define JAS_ICC_TAG_LUM 0x6c756d69 /* */ #define JAS_ICC_TAG_MEASURE 0x6d656173 /* */ #define JAS_ICC_TAG_MEDIABLKPT 0x626b7074 /* */ #define JAS_ICC_TAG_MEDIAWHIPT 0x77747074 /* */ #define JAS_ICC_TAG_NAMCOLR 0x6e636f6c /* */ #define JAS_ICC_TAG_NAMCOLR2 0x6e636c32 /* */ #define JAS_ICC_TAG_OUTRESP 0x72657370 /* */ #define JAS_ICC_TAG_PREVIEW0 0x70726530 /* */ #define JAS_ICC_TAG_PREVIEW1 0x70726531 /* */ #define JAS_ICC_TAG_PREVIEW2 0x70726532 /* */ #define JAS_ICC_TAG_PROFDESC 0x64657363 /* */ #define JAS_ICC_TAG_PROFSEQDESC 0x70736571 /* */ #define JAS_ICC_TAG_PSDCRD0 0x70736430 /* */ #define JAS_ICC_TAG_PSCRDD1 0x70736431 /* */ #define JAS_ICC_TAG_PSCRDD2 0x70736432 /* */ #define JAS_ICC_TAG_PSCRDD3 0x70736433 /* */ #define JAS_ICC_TAG_PS2CSA 0x70733273 /* */ #define JAS_ICC_TAG_PS2RENINTENT 0x70733269 /* */ #define JAS_ICC_TAG_REDMATCOL 0x7258595a /* */ #define JAS_ICC_TAG_REDTRC 0x72545243 /* */ #define JAS_ICC_TAG_SCRNGDES 0x73637264 /* */ #define JAS_ICC_TAG_SCRNG 0x7363726e /* */ #define JAS_ICC_TAG_TECH 0x74656368 /* */ #define JAS_ICC_TAG_UCRBG 0x62666420 /* */ #define JAS_ICC_TAG_VIEWCONDDESC 0x76756564 /* */ #define JAS_ICC_TAG_VIEWCOND 0x76696577 /* */ /* Type signatures. */ #define JAS_ICC_TYPE_CRDINFO 0x63726469 /* CRD information */ #define JAS_ICC_TYPE_CURV 0x63757276 /* curve */ #define JAS_ICC_TYPE_DATA 0x64617461 /* data */ #define JAS_ICC_TYPE_TIME 0x6474696d /* date/time */ #define JAS_ICC_TYPE_DEVSET 0x64657673 /* device settings */ #define JAS_ICC_TYPE_LUT16 0x6d667432 /* */ #define JAS_ICC_TYPE_LUT8 0x6d667431 /* */ #define JAS_ICC_TYPE_MEASURE 0x6d656173 /* */ #define JAS_ICC_TYPE_NAMCOLR 0x6e636f6c /* */ #define JAS_ICC_TYPE_NAMCOLR2 0x6e636c32 /* */ #define JAS_ICC_TYPE_PROFSEQDESC 0x70736571 /* profile sequence description */ #define JAS_ICC_TYPE_RESPCURVSET16 0x72637332 /* response curve set 16 */ #define JAS_ICC_TYPE_SF32 0x73663332 /* signed 32-bit fixed-point */ #define JAS_ICC_TYPE_SCRNG 0x7363726e /* screening */ #define JAS_ICC_TYPE_SIG 0x73696720 /* signature */ #define JAS_ICC_TYPE_TXTDESC 0x64657363 /* text description */ #define JAS_ICC_TYPE_TXT 0x74657874 /* text */ #define JAS_ICC_TYPE_UF32 0x75663332 /* unsigned 32-bit fixed-point */ #define JAS_ICC_TYPE_UCRBG 0x62666420 /* */ #define JAS_ICC_TYPE_UI16 0x75693136 /* */ #define JAS_ICC_TYPE_UI32 0x75693332 /* */ #define JAS_ICC_TYPE_UI8 0x75693038 /* */ #define JAS_ICC_TYPE_UI64 0x75693634 /* */ #define JAS_ICC_TYPE_VIEWCOND 0x76696577 /* */ #define JAS_ICC_TYPE_XYZ 0x58595a20 /* XYZ */ typedef uint_fast8_t jas_iccuint8_t; typedef uint_fast16_t jas_iccuint16_t; typedef uint_fast32_t jas_iccuint32_t; typedef int_fast32_t jas_iccsint32_t; typedef int_fast32_t jas_iccs15fixed16_t; typedef uint_fast32_t jas_iccu16fixed16_t; typedef uint_fast64_t jas_iccuint64_t; typedef uint_fast32_t jas_iccsig_t; typedef jas_iccsig_t jas_icctagsig_t; typedef jas_iccsig_t jas_icctagtype_t; typedef jas_iccsig_t jas_iccattrname_t; /* Date/time type. */ typedef struct { jas_iccuint16_t year; jas_iccuint16_t month; jas_iccuint16_t day; jas_iccuint16_t hour; jas_iccuint16_t min; jas_iccuint16_t sec; } jas_icctime_t; /* XYZ type. */ typedef struct { jas_iccs15fixed16_t x; jas_iccs15fixed16_t y; jas_iccs15fixed16_t z; } jas_iccxyz_t; /* Curve type. */ typedef struct { jas_iccuint32_t numents; jas_iccuint16_t *ents; } jas_icccurv_t; /* Text description type. */ typedef struct { jas_iccuint32_t asclen; char *ascdata; /* ASCII invariant description */ jas_iccuint32_t uclangcode; /* Unicode language code */ jas_iccuint32_t uclen; /* Unicode localizable description count */ uchar *ucdata; /* Unicode localizable description */ jas_iccuint16_t sccode; /* ScriptCode code */ jas_iccuint8_t maclen; /* Localizable Macintosh description count */ uchar macdata[69]; /* Localizable Macintosh description */ } jas_icctxtdesc_t; /* Text type. */ typedef struct { char *string; /* ASCII character string */ } jas_icctxt_t; typedef struct { jas_iccuint8_t numinchans; jas_iccuint8_t numoutchans; jas_iccsint32_t e[3][3]; jas_iccuint8_t clutlen; jas_iccuint8_t *clut; jas_iccuint16_t numintabents; jas_iccuint8_t **intabs; jas_iccuint8_t *intabsbuf; jas_iccuint16_t numouttabents; jas_iccuint8_t **outtabs; jas_iccuint8_t *outtabsbuf; } jas_icclut8_t; typedef struct { jas_iccuint8_t numinchans; jas_iccuint8_t numoutchans; jas_iccsint32_t e[3][3]; jas_iccuint8_t clutlen; jas_iccuint16_t *clut; jas_iccuint16_t numintabents; jas_iccuint16_t **intabs; jas_iccuint16_t *intabsbuf; jas_iccuint16_t numouttabents; jas_iccuint16_t **outtabs; jas_iccuint16_t *outtabsbuf; } jas_icclut16_t; struct jas_iccattrval_s; typedef struct { void (*destroy)(struct jas_iccattrval_s *); int (*copy)(struct jas_iccattrval_s *, struct jas_iccattrval_s *); int (*input)(struct jas_iccattrval_s *, jas_stream_t *, int); int (*output)(struct jas_iccattrval_s *, jas_stream_t *); int (*getsize)(struct jas_iccattrval_s *); void (*dump)(struct jas_iccattrval_s *, FILE *); } jas_iccattrvalops_t; /* Attribute value type (type and value information). */ typedef struct jas_iccattrval_s { int refcnt; /* reference count */ jas_iccsig_t type; /* type */ jas_iccattrvalops_t *ops; /* type-dependent operations */ union { jas_iccxyz_t xyz; jas_icccurv_t curv; jas_icctxtdesc_t txtdesc; jas_icctxt_t txt; jas_icclut8_t lut8; jas_icclut16_t lut16; } data; /* value */ } jas_iccattrval_t; /* Header type. */ typedef struct { jas_iccuint32_t size; /* profile size */ jas_iccsig_t cmmtype; /* CMM type signature */ jas_iccuint32_t version; /* profile version */ jas_iccsig_t clas; /* profile/device class signature */ jas_iccsig_t colorspc; /* color space of data */ jas_iccsig_t refcolorspc; /* profile connection space */ jas_icctime_t ctime; /* creation time */ jas_iccsig_t magic; /* profile file signature */ jas_iccsig_t platform; /* primary platform */ jas_iccuint32_t flags; /* profile flags */ jas_iccsig_t maker; /* device manufacturer signature */ jas_iccsig_t model; /* device model signature */ jas_iccuint64_t attr; /* device setup attributes */ jas_iccsig_t intent; /* rendering intent */ jas_iccxyz_t illum; /* illuminant */ jas_iccsig_t creator; /* profile creator signature */ } jas_icchdr_t; typedef struct { jas_iccsig_t name; jas_iccattrval_t *val; } jas_iccattr_t; typedef struct { int numattrs; int maxattrs; jas_iccattr_t *attrs; } jas_iccattrtab_t; typedef struct jas_icctagtabent_s { jas_iccuint32_t tag; jas_iccuint32_t off; jas_iccuint32_t len; void *data; struct jas_icctagtabent_s *first; } jas_icctagtabent_t; typedef struct { jas_iccuint32_t numents; jas_icctagtabent_t *ents; } jas_icctagtab_t; /* ICC profile type. */ typedef struct { jas_icchdr_t hdr; jas_icctagtab_t tagtab; jas_iccattrtab_t *attrtab; } jas_iccprof_t; typedef struct { jas_iccuint32_t type; jas_iccattrvalops_t ops; } jas_iccattrvalinfo_t; jas_iccprof_t *jas_iccprof_load(jas_stream_t *in); int jas_iccprof_save(jas_iccprof_t *prof, jas_stream_t *out); void jas_iccprof_destroy(jas_iccprof_t *prof); jas_iccattrval_t *jas_iccprof_getattr(jas_iccprof_t *prof, jas_iccattrname_t name); int jas_iccprof_setattr(jas_iccprof_t *prof, jas_iccattrname_t name, jas_iccattrval_t *val); void jas_iccprof_dump(jas_iccprof_t *prof, FILE *out); jas_iccprof_t *jas_iccprof_copy(jas_iccprof_t *prof); int jas_iccprof_gethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr); int jas_iccprof_sethdr(jas_iccprof_t *prof, jas_icchdr_t *hdr); void jas_iccattrval_destroy(jas_iccattrval_t *attrval); void jas_iccattrval_dump(jas_iccattrval_t *attrval, FILE *out); int jas_iccattrval_allowmodify(jas_iccattrval_t **attrval); jas_iccattrval_t *jas_iccattrval_clone(jas_iccattrval_t *attrval); jas_iccattrval_t *jas_iccattrval_create(jas_iccuint32_t type); void jas_iccattrtab_dump(jas_iccattrtab_t *attrtab, FILE *out); extern uchar jas_iccprofdata_srgb[]; extern int jas_iccprofdata_srgblen; extern uchar jas_iccprofdata_sgray[]; extern int jas_iccprofdata_sgraylen; jas_iccprof_t *jas_iccprof_createfrombuf(uchar *buf, int len); jas_iccprof_t *jas_iccprof_createfromclrspc(int clrspc); #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_fix.h --- /* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Fixed-Point Number Class * * $Id: jas_fix.h,v 1.1 2006/05/12 21:26:38 spacy51 Exp $ */ #ifndef JAS_FIX_H #define JAS_FIX_H /******************************************************************************\ * Includes. \******************************************************************************/ #include <stdio.h> #include <stdlib.h> #include <math.h> #include <jasper/jas_config.h> #include <jasper/jas_types.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Constants. \******************************************************************************/ /* The representation of the value zero. */ #define JAS_FIX_ZERO(fix_t, fracbits) \ JAS_CAST(fix_t, 0) /* The representation of the value one. */ #define JAS_FIX_ONE(fix_t, fracbits) \ (JAS_CAST(fix_t, 1) << (fracbits)) /* The representation of the value one half. */ #define JAS_FIX_HALF(fix_t, fracbits) \ (JAS_CAST(fix_t, 1) << ((fracbits) - 1)) /******************************************************************************\ * Conversion operations. \******************************************************************************/ /* Convert an int to a fixed-point number. */ #define JAS_INTTOFIX(fix_t, fracbits, x) \ JAS_CAST(fix_t, (x) << (fracbits)) /* Convert a fixed-point number to an int. */ #define JAS_FIXTOINT(fix_t, fracbits, x) \ JAS_CAST(int, (x) >> (fracbits)) /* Convert a fixed-point number to a double. */ #define JAS_FIXTODBL(fix_t, fracbits, x) \ (JAS_CAST(double, x) / (JAS_CAST(fix_t, 1) << (fracbits))) /* Convert a double to a fixed-point number. */ #define JAS_DBLTOFIX(fix_t, fracbits, x) \ JAS_CAST(fix_t, ((x) * JAS_CAST(double, JAS_CAST(fix_t, 1) << (fracbits)))) /******************************************************************************\ * Basic arithmetic operations. * All other arithmetic operations are synthesized from these basic operations. * There are three macros for each type of arithmetic operation. * One macro always performs overflow/underflow checking, one never performs * overflow/underflow checking, and one is generic with its behavior * depending on compile-time flags. * Only the generic macros should be invoked directly by application code. \******************************************************************************/ /* Calculate the sum of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ADD JAS_FIX_ADD_FAST #else #define JAS_FIX_ADD JAS_FIX_ADD_OFLOW #endif /* Calculate the sum of two fixed-point numbers without overflow checking. */ #define JAS_FIX_ADD_FAST(fix_t, fracbits, x, y) ((x) + (y)) /* Calculate the sum of two fixed-point numbers with overflow checking. */ #define JAS_FIX_ADD_OFLOW(fix_t, fracbits, x, y) \ ((x) >= 0) ? \ (((y) >= 0) ? ((x) + (y) >= 0 || JAS_FIX_OFLOW(), (x) + (y)) : \ ((x) + (y))) : \ (((y) >= 0) ? ((x) + (y)) : ((x) + (y) < 0 || JAS_FIX_OFLOW(), \ (x) + (y))) /* Calculate the product of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_MUL JAS_FIX_MUL_FAST #else #define JAS_FIX_MUL JAS_FIX_MUL_OFLOW #endif /* Calculate the product of two fixed-point numbers without overflow checking. */ #define JAS_FIX_MUL_FAST(fix_t, fracbits, bigfix_t, x, y) \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y)) >> \ (fracbits)) /* Calculate the product of two fixed-point numbers with overflow checking. */ #define JAS_FIX_MUL_OFLOW(fix_t, fracbits, bigfix_t, x, y) \ ((JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> (fracbits)) == \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \ (fracbits))) ? \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) * JAS_CAST(bigfix_t, y) >> \ (fracbits))) : JAS_FIX_OFLOW()) /* Calculate the product of a fixed-point number and an int. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_MULBYINT JAS_FIX_MULBYINT_FAST #else #define JAS_FIX_MULBYINT JAS_FIX_MULBYINT_OFLOW #endif /* Calculate the product of a fixed-point number and an int without overflow checking. */ #define JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) \ JAS_CAST(fix_t, ((x) * (y))) /* Calculate the product of a fixed-point number and an int with overflow checking. */ #define JAS_FIX_MULBYINT_OFLOW(fix_t, fracbits, x, y) \ JAS_FIX_MULBYINT_FAST(fix_t, fracbits, x, y) /* Calculate the quotient of two fixed-point numbers. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_DIV JAS_FIX_DIV_FAST #else #define JAS_FIX_DIV JAS_FIX_DIV_UFLOW #endif /* Calculate the quotient of two fixed-point numbers without underflow checking. */ #define JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) \ JAS_CAST(fix_t, (JAS_CAST(bigfix_t, x) << (fracbits)) / (y)) /* Calculate the quotient of two fixed-point numbers with underflow checking. */ #define JAS_FIX_DIV_UFLOW(fix_t, fracbits, bigfix_t, x, y) \ JAS_FIX_DIV_FAST(fix_t, fracbits, bigfix_t, x, y) /* Negate a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_NEG JAS_FIX_NEG_FAST #else #define JAS_FIX_NEG JAS_FIX_NEG_OFLOW #endif /* Negate a fixed-point number without overflow checking. */ #define JAS_FIX_NEG_FAST(fix_t, fracbits, x) \ (-(x)) /* Negate a fixed-point number with overflow checking. */ /* Yes, overflow is actually possible for two's complement representations, although highly unlikely to occur. */ #define JAS_FIX_NEG_OFLOW(fix_t, fracbits, x) \ (((x) < 0) ? (-(x) > 0 || JAS_FIX_OFLOW(), -(x)) : (-(x))) /* Perform an arithmetic shift left of a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ASL JAS_FIX_ASL_FAST #else #define JAS_FIX_ASL JAS_FIX_ASL_OFLOW #endif /* Perform an arithmetic shift left of a fixed-point number without overflow checking. */ #define JAS_FIX_ASL_FAST(fix_t, fracbits, x, n) \ ((x) << (n)) /* Perform an arithmetic shift left of a fixed-point number with overflow checking. */ #define JAS_FIX_ASL_OFLOW(fix_t, fracbits, x, n) \ ((((x) << (n)) >> (n)) == (x) || JAS_FIX_OFLOW(), (x) << (n)) /* Perform an arithmetic shift right of a fixed-point number. */ #if !defined(DEBUG_OVERFLOW) #define JAS_FIX_ASR JAS_FIX_ASR_FAST #else #define JAS_FIX_ASR JAS_FIX_ASR_UFLOW #endif /* Perform an arithmetic shift right of a fixed-point number without underflow checking. */ #define JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) \ ((x) >> (n)) /* Perform an arithmetic shift right of a fixed-point number with underflow checking. */ #define JAS_FIX_ASR_UFLOW(fix_t, fracbits, x, n) \ JAS_FIX_ASR_FAST(fix_t, fracbits, x, n) /******************************************************************************\ * Other basic arithmetic operations. \******************************************************************************/ /* Calculate the difference between two fixed-point numbers. */ #define JAS_FIX_SUB(fix_t, fracbits, x, y) \ JAS_FIX_ADD(fix_t, fracbits, x, JAS_FIX_NEG(fix_t, fracbits, y)) /* Add one fixed-point number to another. */ #define JAS_FIX_PLUSEQ(fix_t, fracbits, x, y) \ ((x) = JAS_FIX_ADD(fix_t, fracbits, x, y)) /* Subtract one fixed-point number from another. */ #define JAS_FIX_MINUSEQ(fix_t, fracbits, x, y) \ ((x) = JAS_FIX_SUB(fix_t, fracbits, x, y)) /* Multiply one fixed-point number by another. */ #define JAS_FIX_MULEQ(fix_t, fracbits, bigfix_t, x, y) \ ((x) = JAS_FIX_MUL(fix_t, fracbits, bigfix_t, x, y)) /******************************************************************************\ * Miscellaneous operations. \******************************************************************************/ /* Calculate the absolute value of a fixed-point number. */ #define JAS_FIX_ABS(fix_t, fracbits, x) \ (((x) >= 0) ? (x) : (JAS_FIX_NEG(fix_t, fracbits, x))) /* Is a fixed-point number an integer? */ #define JAS_FIX_ISINT(fix_t, fracbits, x) \ (JAS_FIX_FLOOR(fix_t, fracbits, x) == (x)) /* Get the sign of a fixed-point number. */ #define JAS_FIX_SGN(fix_t, fracbits, x) \ ((x) >= 0 ? 1 : (-1)) /******************************************************************************\ * Relational operations. \******************************************************************************/ /* Compare two fixed-point numbers. */ #define JAS_FIX_CMP(fix_t, fracbits, x, y) \ ((x) > (y) ? 1 : (((x) == (y)) ? 0 : (-1))) /* Less than. */ #define JAS_FIX_LT(fix_t, fracbits, x, y) \ ((x) < (y)) /* Less than or equal. */ #define JAS_FIX_LTE(fix_t, fracbits, x, y) \ ((x) <= (y)) /* Greater than. */ #define JAS_FIX_GT(fix_t, fracbits, x, y) \ ((x) > (y)) /* Greater than or equal. */ #define JAS_FIX_GTE(fix_t, fracbits, x, y) \ ((x) >= (y)) /******************************************************************************\ * Rounding functions. \******************************************************************************/ /* Round a fixed-point number to the nearest integer. */ #define JAS_FIX_ROUND(fix_t, fracbits, x) \ (((x) < 0) ? JAS_FIX_FLOOR(fix_t, fracbits, JAS_FIX_ADD(fix_t, fracbits, \ (x), JAS_FIX_HALF(fix_t, fracbits))) : \ JAS_FIX_NEG(fix_t, fracbits, JAS_FIX_FLOOR(fix_t, fracbits, \ JAS_FIX_ADD(fix_t, fracbits, (-(x)), JAS_FIX_HALF(fix_t, fracbits))))) /* Round a fixed-point number to the nearest integer in the direction of negative infinity (i.e., the floor function). */ #define JAS_FIX_FLOOR(fix_t, fracbits, x) \ ((x) & (~((JAS_CAST(fix_t, 1) << (fracbits)) - 1))) /* Round a fixed-point number to the nearest integer in the direction of zero. */ #define JAS_FIX_TRUNC(fix_t, fracbits, x) \ (((x) >= 0) ? JAS_FIX_FLOOR(fix_t, fracbits, x) : \ JAS_FIX_CEIL(fix_t, fracbits, x)) /******************************************************************************\ * The below macros are for internal library use only. Do not invoke them * directly in application code. \******************************************************************************/ /* Handle overflow. */ #define JAS_FIX_OFLOW() \ fprintf(stderr, "overflow error: file %s, line %d\n", __FILE__, __LINE__) /* Handle underflow. */ #define JAS_FIX_UFLOW() \ fprintf(stderr, "underflow error: file %s, line %d\n", __FILE__, __LINE__) #ifdef __cplusplus } #endif #endif --- NEW FILE: jas_malloc.h --- /* * Copyright (c) 1999-2000 Image Power, Inc. and the University of * British Columbia. * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * Copyright (c) 2001-2003 Michael David Adams * * All rights reserved. * * Permission is hereby granted, free of charge, to any person (the * "User") obtaining a copy of this software and associated documentation * files (the "Software"), to deal in the Software without restriction, * including without limitation the rights to use, copy, modify, merge, * publish, distribute, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, subject to the * following conditions: * * 1. The above copyright notices and this permission notice (which * includes the disclaimer below) shall be included in all copies or * substantial portions of the Software. * * 2. The name of a copyright holder shall not be used to endorse or * promote products derived from the Software without specific prior * written permission. * * THIS DISCLAIMER OF WARRANTY CONSTITUTES AN ESSENTIAL PART OF THIS * LICENSE. NO USE OF THE SOFTWARE IS AUTHORIZED HEREUNDER EXCEPT UNDER * THIS DISCLAIMER. THE SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS * "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A * PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO * EVENT SHALL THE COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. NO ASSURANCES ARE * PROVIDED BY THE COPYRIGHT HOLDERS THAT THE SOFTWARE DOES NOT INFRINGE * THE PATENT OR OTHER INTELLECTUAL PROPERTY RIGHTS OF ANY OTHER ENTITY. * EACH COPYRIGHT HOLDER DISCLAIMS ANY LIABILITY TO THE USER FOR CLAIMS * BROUGHT BY ANY OTHER ENTITY BASED ON INFRINGEMENT OF INTELLECTUAL * PROPERTY RIGHTS OR OTHERWISE. AS A CONDITION TO EXERCISING THE RIGHTS * GRANTED HEREUNDER, EACH USER HEREBY ASSUMES SOLE RESPONSIBILITY TO SECURE * ANY OTHER INTELLECTUAL PROPERTY RIGHTS NEEDED, IF ANY. THE SOFTWARE * IS NOT FAULT-TOLERANT AND IS NOT INTENDED FOR USE IN MISSION-CRITICAL * SYSTEMS, SUCH AS THOSE USED IN THE OPERATION OF NUCLEAR FACILITIES, * AIRCRAFT NAVIGATION OR COMMUNICATION SYSTEMS, AIR TRAFFIC CONTROL * SYSTEMS, DIRECT LIFE SUPPORT MACHINES, OR WEAPONS SYSTEMS, IN WHICH * THE FAILURE OF THE SOFTWARE OR SYSTEM COULD LEAD DIRECTLY TO DEATH, * PERSONAL INJURY, OR SEVERE PHYSICAL OR ENVIRONMENTAL DAMAGE ("HIGH * RISK ACTIVITIES"). THE COPYRIGHT HOLDERS SPECIFICALLY DISCLAIM ANY * EXPRESS OR IMPLIED WARRANTY OF FITNESS FOR HIGH RISK ACTIVITIES. * * __END_OF_JASPER_LICENSE__ */ /* * Memory Allocator * * $Id: jas_malloc.h,v 1.1 2006/05/12 21:26:38 spacy51 Exp $ */ #ifndef JAS_MALLOC_H #define JAS_MALLOC_H /******************************************************************************\ * Includes. \******************************************************************************/ #include <jasper/jas_config.h> #include <stdlib.h> #include <stdio.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Hack follows... \******************************************************************************/ #if defined(DEBUG_MEMALLOC) /* This is somewhat of a hack, but it's a useful hack. :-) */ /* Use my own custom memory allocator for debugging. */ #include "../../../../local/src/memalloc.h" #define jas_mal... [truncated message content] |