?????????? ????????? - ??????????????? - /home/agenciai/public_html/cd38d8/jasper.zip
???????
PK d*�[����� � jas_init.hnu �[��� /* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * 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__ */ /*! * @file jas_init.h * @brief JasPer Initialization/Cleanup Code */ #ifndef JAS_INIT_H #define JAS_INIT_H /* The configuration header file should be included first. */ #include <jasper/jas_config.h> #ifdef __cplusplus extern "C" { #endif /*! * @addtogroup init * @{ */ /******************************************************************************\ * Functions. \******************************************************************************/ /*! @brief Initialize the JasPer library. @details This function must be called before any other code in the JasPer library is invoked. This function registers the codecs that are enabled by default. @returns If successful, zero is returned; otherwise, a nonzero value is returned. */ JAS_DLLEXPORT int jas_init(void); /*! @brief Perform any clean up for the JasPer library. @details This function performs any clean up for the JasPer library. */ JAS_DLLEXPORT void jas_cleanup(void); /*! * @} */ #ifdef __cplusplus } #endif #endif PK d*�[��_t�- �- jas_math.hnu �[��� /* * 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) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * 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__ */ /*! * @file jas_math.h * @brief Math-Related Code */ #ifndef JAS_MATH_H #define JAS_MATH_H /******************************************************************************\ * Includes \******************************************************************************/ /* The configuration header file should be included first. */ #include <jasper/jas_config.h> #include <jasper/jas_types.h> #include <assert.h> #include <string.h> #include <stdint.h> #include <limits.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Macros \******************************************************************************/ #define JAS_KIBI JAS_CAST(size_t, 1024) #define JAS_MEBI (JAS_KIBI * JAS_KIBI) /* Compute the absolute value. */ #define JAS_ABS(x) \ (((x) >= 0) ? (x) : (-(x))) /* Compute the minimum of two values. */ #define JAS_MIN(x, y) \ (((x) < (y)) ? (x) : (y)) /* Compute the maximum of two values. */ #define JAS_MAX(x, y) \ (((x) > (y)) ? (x) : (y)) /* Compute the remainder from division (where division is defined such that the remainder is always nonnegative). */ #define JAS_MOD(x, y) \ (((x) < 0) ? (((-x) % (y)) ? ((y) - ((-(x)) % (y))) : (0)) : ((x) % (y))) /* Compute the integer with the specified number of least significant bits set to one. */ #define JAS_ONES(n) \ ((1 << (n)) - 1) /******************************************************************************\ * \******************************************************************************/ #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 6) /* suppress clang warning "shifting a negative signed value is undefined" in the assertions below */ #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wshift-negative-value" #endif JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int jas_int_asr(int x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((-1) >> 1) == -1); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic right shift. return x >> n; } JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int jas_int_asl(int x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((-1) << 1) == -2); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic left shift. return x << n; } JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int_least32_t jas_least32_asr(int_least32_t x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((JAS_CAST(int_least32_t, -1)) >> 1) == JAS_CAST(int_least32_t, -1)); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic right shift. return x >> n; } JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int_least32_t jas_least32_asl(int_least32_t x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((JAS_CAST(int_least32_t, -1)) << 1) == JAS_CAST(int_least32_t, -2)); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic left shift. return x << n; } JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int_fast32_t jas_fast32_asr(int_fast32_t x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((JAS_CAST(int_fast32_t, -1)) >> 1) == JAS_CAST(int_fast32_t, -1)); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic right shift. return x >> n; } JAS_ATTRIBUTE_CONST JAS_ATTRIBUTE_DISABLE_USAN inline static int_fast32_t jas_fast32_asl(int_fast32_t x, unsigned n) { // Ensure that the shift of a negative value appears to behave as a // signed arithmetic shift. assert(((JAS_CAST(int_fast32_t, -1)) << 1) == JAS_CAST(int_fast32_t, -2)); // The behavior is undefined when x is negative. */ // We tacitly assume the behavior is equivalent to a signed // arithmetic left shift. return x << n; } #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 6) #pragma GCC diagnostic pop #endif /******************************************************************************\ * Safe integer arithmetic (i.e., with overflow checking). \******************************************************************************/ /* Compute the product of two size_t integers with overflow checking. */ inline static bool jas_safe_size_mul(size_t x, size_t y, size_t *result) { #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 5) size_t result_buffer; if (!result) result = &result_buffer; return !__builtin_mul_overflow(x, y, result); #else /* Check if overflow would occur */ if (x && y > SIZE_MAX / x) { /* Overflow would occur. */ return false; } if (result) { *result = x * y; } return true; #endif } /* Compute the product of three size_t integers with overflow checking. */ inline static bool jas_safe_size_mul3(size_t a, size_t b, size_t c, size_t *result) { size_t tmp; if (!jas_safe_size_mul(a, b, &tmp) || !jas_safe_size_mul(tmp, c, &tmp)) { return false; } if (result) { *result = tmp; } return true; } /* Compute the sum of two size_t integers with overflow checking. */ inline static bool jas_safe_size_add(size_t x, size_t y, size_t *result) { #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 5) size_t result_buffer; if (!result) result = &result_buffer; return !__builtin_add_overflow(x, y, result); #else if (y > SIZE_MAX - x) { return false; } if (result) { *result = x + y; } return true; #endif } /* Compute the difference of two size_t integers with overflow checking. */ inline static bool jas_safe_size_sub(size_t x, size_t y, size_t *result) { #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 5) size_t result_buffer; if (!result) result = &result_buffer; return !__builtin_sub_overflow(x, y, result); #else if (y > x) { return false; } if (result) { *result = x - y; } return true; #endif } /* Compute the product of two int_fast32_t integers with overflow checking. */ inline static bool jas_safe_intfast32_mul(int_fast32_t x, int_fast32_t y, int_fast32_t *result) { #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 5) int_fast32_t result_buffer; if (!result) result = &result_buffer; return !__builtin_mul_overflow(x, y, result); #else if (x > 0) { /* x is positive */ if (y > 0) { /* x and y are positive */ if (x > INT_FAST32_MAX / y) { return false; } } else { /* x positive, y nonpositive */ if (y < INT_FAST32_MIN / x) { return false; } } } else { /* x is nonpositive */ if (y > 0) { /* x is nonpositive, y is positive */ if (x < INT_FAST32_MIN / y) { return false; } } else { /* x and y are nonpositive */ if (x != 0 && y < INT_FAST32_MAX / x) { return false; } } } if (result) { *result = x * y; } return true; #endif } /* Compute the product of three int_fast32_t integers with overflow checking. */ inline static bool jas_safe_intfast32_mul3(int_fast32_t a, int_fast32_t b, int_fast32_t c, int_fast32_t *result) { int_fast32_t tmp; if (!jas_safe_intfast32_mul(a, b, &tmp) || !jas_safe_intfast32_mul(tmp, c, &tmp)) { return false; } if (result) { *result = tmp; } return true; } /* Compute the sum of two int_fast32_t integers with overflow checking. */ inline static bool jas_safe_intfast32_add(int_fast32_t x, int_fast32_t y, int_fast32_t *result) { #if defined(__clang__) || (defined(__GNUC__) && __GNUC__ > 5) int_fast32_t result_buffer; if (!result) result = &result_buffer; return !__builtin_add_overflow(x, y, result); #else if ((y > 0 && x > INT_FAST32_MAX - y) || (y < 0 && x < INT_FAST32_MIN - y)) { return false; } if (result) { *result = x + y; } return true; #endif } #if 0 /* This function is potentially useful but not currently used. So, it is commented out. */ inline static bool jas_safe_uint_mul(unsigned x, unsigned y, unsigned *result) { /* Check if overflow would occur */ if (x && y > UINT_MAX / x) { /* Overflow would occur. */ return false; } if (result) { *result = x * y; } return true; } #endif #ifdef __cplusplus } #endif #endif PK d*�[�U�;� � jas_tvp.hnu �[��� /* * Copyright (c) 2001-2002 Michael David Adams. * All rights reserved. */ /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * 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__ */ /*! * @file jas_tvp.h * @brief Tag/Value Pair Parser */ #ifndef JAS_TVP_H #define JAS_TVP_H /******************************************************************************\ * Includes. \******************************************************************************/ /* The configuration header file should be included first. */ #include <jasper/jas_config.h> #ifdef __cplusplus extern "C" { #endif /******************************************************************************\ * Types. \******************************************************************************/ /* Tag information type. */ typedef struct { int id; /* The ID for the tag. */ const char *name; /* The name of the tag. */ } jas_taginfo_t; /* Tag-value parser type. */ typedef struct { char *buf; /* The parsing buffer. */ char *tag; /* The current tag name. */ const char *val; /* The current value. */ char *pos; /* The current position in the parsing buffer. */ } jas_tvparser_t; /******************************************************************************\ * Tag information functions. \******************************************************************************/ /* Lookup a tag by name. */ JAS_ATTRIBUTE_PURE JAS_DLLEXPORT const jas_taginfo_t *jas_taginfos_lookup(const jas_taginfo_t *taginfos, const char *name); /* This function returns a pointer to the specified taginfo object if it exists (i.e., the pointer is nonnull); otherwise, a pointer to a dummy object is returned. This is useful in some situations to avoid checking for a null pointer. */ JAS_ATTRIBUTE_PURE JAS_DLLEXPORT const jas_taginfo_t *jas_taginfo_nonull(const jas_taginfo_t *taginfo); /******************************************************************************\ * Tag-value parser functions. \******************************************************************************/ /* Create a tag-value parser for the specified string. */ JAS_DLLEXPORT jas_tvparser_t *jas_tvparser_create(const char *s); /* Destroy a tag-value parser. */ JAS_DLLEXPORT void jas_tvparser_destroy(jas_tvparser_t *tvparser); /* Get the next tag-value pair. */ JAS_DLLEXPORT int jas_tvparser_next(jas_tvparser_t *tvparser); /* Get the tag name for the current tag-value pair. */ JAS_ATTRIBUTE_PURE JAS_DLLEXPORT const char *jas_tvparser_gettag(const jas_tvparser_t *tvparser); /* Get the value for the current tag-value pair. */ JAS_ATTRIBUTE_PURE JAS_DLLEXPORT const char *jas_tvparser_getval(const jas_tvparser_t *tvparser); #ifdef __cplusplus } #endif #endif PK d*�[�>m�Q Q jas_config.hnu �[��� #ifndef JAS_CONFIG_H #define JAS_CONFIG_H #define JAS_DLL 1 #include <jasper/jas_compiler.h> #include <jasper/jas_dll.h> /* This preprocessor symbol identifies the version of JasPer. */ #define JAS_VERSION "2.0.28" #define JAS_VERSION_MAJOR 2 #define JAS_VERSION_MINOR 0 #define JAS_VERSION_PATCH 28 /* #undef JAS_ENABLE_32BIT */ #define JAS_HAVE_FCNTL_H 1 /* #undef JAS_HAVE_IO_H */ #define JAS_HAVE_UNISTD_H 1 #define JAS_HAVE_SYS_TIME_H 1 #define JAS_HAVE_SYS_TYPES_H 1 #define JAS_HAVE_MKOSTEMP 1 #define JAS_HAVE_GETTIMEOFDAY 1 #define JAS_HAVE_GETRUSAGE 1 #define JAS_HAVE_GL_GLUT_H 1 /* #undef JAS_HAVE_GLUT_H */ #define JAS_INCLUDE_PNM_CODEC 1 #define JAS_INCLUDE_BMP_CODEC 1 #define JAS_INCLUDE_RAS_CODEC 1 #define JAS_INCLUDE_JP2_CODEC 1 #define JAS_INCLUDE_JPC_CODEC 1 #define JAS_INCLUDE_JPG_CODEC 1 #define JAS_INCLUDE_PGX_CODEC 1 #define JAS_INCLUDE_MIF_CODEC 1 /* #undef JAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE */ #if defined(JAS_ENABLE_DANGEROUS_INTERNAL_TESTING_MODE) #define JAS_ENABLE_MIF_CODEC 1 #else #undef JAS_ENABLE_MIF_CODEC #endif /* #if defined(JAS_INCLUDE_JP2_CODEC) && !defined(JAS_INCLUDE_JPC_CODEC) #undef JAS_INCLUDE_JPC_CODEC #endif */ #ifdef _MSC_VER #undef JAS_HAVE_SNPRINTF #else #define JAS_HAVE_SNPRINTF 1 #endif #if !defined(JAS_DEC_DEFAULT_MAX_SAMPLES) #define JAS_DEC_DEFAULT_MAX_SAMPLES 0 #endif #endif PK d*�[�S�� � jas_dll.hnu �[��� /* __START_OF_JASPER_LICENSE__ * * JasPer License Version 2.0 * * Copyright (c) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * 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__ */ /*! * @file jas_dll.h * @brief Shared Library Macros */ #ifndef JAS_DLL_H #define JAS_DLL_H /* The configuration header file should be included first. */ #include <jasper/jas_config.h> #if defined(JAS_DLL) #if defined(_WIN32) #if defined(JAS_BUILDING_DLL) #define JAS_DLLEXPORT __declspec(dllexport) #else #define JAS_DLLEXPORT __declspec(dllimport) #endif #define JAS_DLLLOCAL #elif defined(JAS_HAVE_VISIBILITY) #if defined(JAS_BUILDING_DLL) #define JAS_DLLEXPORT __attribute__ ((visibility("default"))) #define JAS_DLLLOCAL __attribute__ ((visibility("hidden"))) #else #define JAS_DLLEXPORT #define JAS_DLLLOCAL #endif #else #define JAS_DLLEXPORT #define JAS_DLLLOCAL #endif #else #define JAS_DLLEXPORT #define JAS_DLLLOCAL #endif #endif PK d*�[�p�_� � jas_types.hnu �[��� /* * 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) 2001-2006 Michael David Adams * Copyright (c) 1999-2000 Image Power, Inc. * Copyright (c) 1999-2000 The University of British Columbia * * 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__ */ /*! * @file jas_types.h * @brief Primitive Types */ #ifndef JAS_TYPES_H #define JAS_TYPES_H /* The configuration header file should be included first. */ #include <jasper/jas_config.h> /* Note: The immediately following header files should eventually be removed. */ #include <stddef.h> /* IWYU pragma: export */ #include <stdint.h> /* IWYU pragma: export */ #if defined(JAS_HAVE_SYS_TYPES_H) #include <sys/types.h> /* IWYU pragma: export */ #endif #define jas_uchar unsigned char #define jas_uint unsigned int #define jas_ulong unsigned long #define jas_longlong long long #define jas_ulonglong unsigned long long #if defined(_MSC_VER) && (_MSC_VER < 1800) #define bool int #define false 0 #define true 1 #define PRIxFAST32 "x" #define PRIxFAST16 PRIxFAST32 #define PRIuFAST32 "u" #define PRIuFAST16 PRIuFAST32 #define PRIiFAST32 "i" #ifdef _WIN64 #define PRIdPTR "lld" #else #define PRIdPTR "d" #endif #ifndef _HUGE_ENUF #define _HUGE_ENUF 1e+300 #endif #define INFINITY ((float)(_HUGE_ENUF * _HUGE_ENUF)) #define strtoull _strtoui64 #else #include <stdbool.h> /* IWYU pragma: export */ #include <inttypes.h> /* IWYU pragma: export */ #endif /* The below macro is intended to be used for type casts. By using this macro, type casts can be easily located in the source code with tools like "grep". */ #define JAS_CAST(t, e) \ ((t) (e)) /* The number of bits in the integeral type uint_fast32_t. */ /* NOTE: This could underestimate the size on some exotic architectures. */ #define JAS_UINTFAST32_NUMBITS (8 * sizeof(uint_fast32_t)) #ifdef __cplusplus extern "C" { #endif #ifdef __cplusplus } #endif #endif PK d*�[�2�M>