cpl_math_const.h | cpl_math_const.h | |||
---|---|---|---|---|
skipping to change at line 287 | skipping to change at line 287 | |||
@brief Return the minimum of two values | @brief Return the minimum of two values | |||
@param first The first expression in the comparison | @param first The first expression in the comparison | |||
@param second The second expression in the comparison | @param second The second expression in the comparison | |||
@return The minimum of the two values | @return The minimum of the two values | |||
@note If the first argument is the smallest then it is evaluated twice | @note If the first argument is the smallest then it is evaluated twice | |||
otherwise the second argument is evaluated twice | otherwise the second argument is evaluated twice | |||
*/ | */ | |||
/*------------------------------------------------------------------------- ---*/ | /*------------------------------------------------------------------------- ---*/ | |||
#define CPL_MIN(first, second) \ | #define CPL_MIN(first, second) \ | |||
((first) < (second) ? (first) : (second)) /* Two evaluations of minimum */ | (((first) < (second)) ? (first) : (second)) /* Two evaluations of minimum */ | |||
/*------------------------------------------------------------------------- ---*/ | /*------------------------------------------------------------------------- ---*/ | |||
/** | /** | |||
@hideinitializer | @hideinitializer | |||
@brief Return the maximum of two values | @brief Return the maximum of two values | |||
@param first The first expression in the comparison | @param first The first expression in the comparison | |||
@param second The second expression in the comparison | @param second The second expression in the comparison | |||
@return The maximum of the two values | @return The maximum of the two values | |||
@see CPL_MIN() | @see CPL_MIN() | |||
*/ | */ | |||
/*------------------------------------------------------------------------- ---*/ | /*------------------------------------------------------------------------- ---*/ | |||
#define CPL_MAX(first, second) \ | #define CPL_MAX(first, second) \ | |||
((first) > (second) ? (first) : (second)) /* Two evaluations of maximum */ | (((first) > (second)) ? (first) : (second)) /* Two evaluations of maximum */ | |||
/**@}*/ | /**@}*/ | |||
CPL_END_DECLS | CPL_END_DECLS | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cpl_test.h | cpl_test.h | |||
---|---|---|---|---|
skipping to change at line 939 | skipping to change at line 939 | |||
cpl_errorstate cpl_test_state = cpl_errorstate_get(); \ | cpl_errorstate cpl_test_state = cpl_errorstate_get(); \ | |||
cpl_test_memory_is_empty_macro(cpl_test_errno, cpl_test_time, \ | cpl_test_memory_is_empty_macro(cpl_test_errno, cpl_test_time, \ | |||
cpl_test_flops, cpl_test_state, \ | cpl_test_flops, cpl_test_state, \ | |||
cpl_func, __FILE__, __LINE__); \ | cpl_func, __FILE__, __LINE__); \ | |||
} while (0) | } while (0) | |||
/*------------------------------------------------------------------------- ---*/ | /*------------------------------------------------------------------------- ---*/ | |||
/** | /** | |||
@hideinitializer | @hideinitializer | |||
@ingroup cpl_test | @ingroup cpl_test | |||
@brief Evaluate an expression and return if it fails | @brief Evaluate an expression and terminate the process if it fails | |||
@param bool The (boolean) expression to evaluate, side-effects are al lowed | @param bool The (boolean) expression to evaluate, side-effects are al lowed | |||
@note A zero value of the expression is a failure, other values are no t | @note A zero value of the expression is a failure, other values are no t | |||
@return void | @return void | |||
@see cpl_test() | @see cpl_test() | |||
@note This macro should be used for unit tests that cannot continue aft er | @note This macro should be used for unit tests that cannot continue aft er | |||
a failure. | a failure. | |||
Example of usage: | Example of usage: | |||
@code | @code | |||
skipping to change at line 975 | skipping to change at line 975 | |||
#define cpl_test_assert(bool) do { \ | #define cpl_test_assert(bool) do { \ | |||
const int cpl_test_errno = errno; \ | const int cpl_test_errno = errno; \ | |||
const cpl_flops cpl_test_flops = cpl_test_get_flops(); \ | const cpl_flops cpl_test_flops = cpl_test_get_flops(); \ | |||
const double cpl_test_time = cpl_test_get_walltime(); \ | const double cpl_test_time = cpl_test_get_walltime(); \ | |||
cpl_errorstate cpl_test_state = cpl_errorstate_get(); \ | cpl_errorstate cpl_test_state = cpl_errorstate_get(); \ | |||
/* Evaluate bool just once */ \ | /* Evaluate bool just once */ \ | |||
const cpl_boolean cpl_test_ok = (bool) ? CPL_TRUE : CPL_FALSE; \ | const cpl_boolean cpl_test_ok = (bool) ? CPL_TRUE : CPL_FALSE; \ | |||
cpl_test_macro(cpl_test_errno, cpl_test_time, cpl_test_flops, \ | cpl_test_macro(cpl_test_errno, cpl_test_time, cpl_test_flops, \ | |||
cpl_test_state, cpl_test_ok, CPL_TRUE, #bool, \ | cpl_test_state, cpl_test_ok, CPL_TRUE, #bool, \ | |||
cpl_func, __FILE__, __LINE__); \ | cpl_func, __FILE__, __LINE__); \ | |||
if (cpl_test_ok == CPL_FALSE) return cpl_test_end(0); \ | if (cpl_test_ok == CPL_FALSE) exit(cpl_test_end(0)); \ | |||
} while (0) | } while (0) | |||
/* Deprecated. Do not use */ | /* Deprecated. Do not use */ | |||
#define cpl_assert cpl_test_assert | #define cpl_assert cpl_test_assert | |||
#ifndef cpl_error_margin | #ifndef cpl_error_margin | |||
/* Deprecated. Do not use */ | /* Deprecated. Do not use */ | |||
#define cpl_error_margin 2.0 | #define cpl_error_margin 2.0 | |||
#endif | #endif | |||
End of changes. 2 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cpl_version.h | cpl_version.h | |||
---|---|---|---|---|
skipping to change at line 30 | skipping to change at line 30 | |||
/* | /* | |||
* Do not edit this file! This file was automatically generated. | * Do not edit this file! This file was automatically generated. | |||
* All changes to this file might be lost! | * All changes to this file might be lost! | |||
*/ | */ | |||
#ifndef CPL_VERSION_H | #ifndef CPL_VERSION_H | |||
#define CPL_VERSION_H | #define CPL_VERSION_H | |||
#include <cpl_macros.h> | #include <cpl_macros.h> | |||
#define CPL_VERSION_STRING "6.5.1" | #define CPL_VERSION_STRING "6.6" | |||
#define CPL_VERSION_CODE 394497 | #define CPL_VERSION_CODE 394752 | |||
#define CPL_VERSION(major, minor, micro) \ | #define CPL_VERSION(major, minor, micro) \ | |||
(((major) * 65536) + ((minor) * 256) + (micro)) | (((major) * 65536) + ((minor) * 256) + (micro)) | |||
CPL_BEGIN_DECLS | CPL_BEGIN_DECLS | |||
unsigned int cpl_version_get_major(void) CPL_ATTR_CONST; | unsigned int cpl_version_get_major(void) CPL_ATTR_CONST; | |||
unsigned int cpl_version_get_minor(void) CPL_ATTR_CONST; | unsigned int cpl_version_get_minor(void) CPL_ATTR_CONST; | |||
unsigned int cpl_version_get_micro(void) CPL_ATTR_CONST; | unsigned int cpl_version_get_micro(void) CPL_ATTR_CONST; | |||
End of changes. 1 change blocks. | ||||
2 lines changed or deleted | 2 lines changed or added | |||
cxstring.h | cxstring.h | |||
---|---|---|---|---|
skipping to change at line 91 | skipping to change at line 91 | |||
/* | /* | |||
* Assignment operations | * Assignment operations | |||
*/ | */ | |||
void cx_string_set(cx_string *, const cxchar *); | void cx_string_set(cx_string *, const cxchar *); | |||
/* | /* | |||
* Modifying operations | * Modifying operations | |||
*/ | */ | |||
void cx_string_resize(cx_string *, cxsize, cxchar); | ||||
void cx_string_extend(cx_string *, cxsize, cxchar); | ||||
void cx_string_replace_character(cx_string *, cxsize, cxsize, cxchar, cxcha | ||||
r); | ||||
cx_string *cx_string_upper(cx_string *); | cx_string *cx_string_upper(cx_string *); | |||
cx_string *cx_string_lower(cx_string *); | cx_string *cx_string_lower(cx_string *); | |||
cx_string *cx_string_trim(cx_string *); | cx_string *cx_string_trim(cx_string *); | |||
cx_string *cx_string_rtrim(cx_string *); | cx_string *cx_string_rtrim(cx_string *); | |||
cx_string *cx_string_strip(cx_string *); | cx_string *cx_string_strip(cx_string *); | |||
/* | /* | |||
* Inserting and removing elements | * Inserting and removing elements | |||
*/ | */ | |||
cx_string *cx_string_prepend(cx_string *, const cxchar *); | cx_string *cx_string_prepend(cx_string *, const cxchar *); | |||
cx_string *cx_string_append(cx_string *, const cxchar *); | cx_string *cx_string_append(cx_string *, const cxchar *); | |||
cx_string *cx_string_insert(cx_string *, cxssize, const cxchar *); | cx_string *cx_string_insert(cx_string *, cxssize, const cxchar *); | |||
cx_string *cx_string_erase(cx_string *, cxssize, cxssize); | cx_string *cx_string_erase(cx_string *, cxssize, cxssize); | |||
cx_string *cx_string_truncate(cx_string *, cxsize); | cx_string *cx_string_truncate(cx_string *, cxsize); | |||
cx_string *cx_string_substr(const cx_string *, cxsize, cxsize); | ||||
/* | /* | |||
* Comparison functions | * Comparison functions | |||
*/ | */ | |||
cxbool cx_string_equal (const cx_string *, const cx_string *); | cxbool cx_string_equal (const cx_string *, const cx_string *); | |||
cxint cx_string_compare(const cx_string *, const cx_string *); | cxint cx_string_compare(const cx_string *, const cx_string *); | |||
cxint cx_string_casecmp(const cx_string *, const cx_string *); | cxint cx_string_casecmp(const cx_string *, const cx_string *); | |||
cxint cx_string_ncasecmp(const cx_string *, const cx_string *, cxsize); | cxint cx_string_ncasecmp(const cx_string *, const cx_string *, cxsize); | |||
/* | /* | |||
* Search functions | ||||
*/ | ||||
cxsize cx_string_find_first_not_of(const cx_string *, const cxchar *); | ||||
cxsize cx_string_find_last_not_of(const cx_string *, const cxchar *); | ||||
/* | ||||
* I/O functions | * I/O functions | |||
*/ | */ | |||
cxint cx_string_sprintf(cx_string *, | cxint cx_string_sprintf(cx_string *, | |||
const cxchar *, ...) CX_GNUC_PRINTF(2, 3); | const cxchar *, ...) CX_GNUC_PRINTF(2, 3); | |||
cxint cx_string_vsprintf(cx_string *, | cxint cx_string_vsprintf(cx_string *, | |||
const cxchar *, va_list) CX_GNUC_PRINTF(2, 0); | const cxchar *, va_list) CX_GNUC_PRINTF(2, 0); | |||
/* | /* | |||
* Debugging utilities | * Debugging utilities | |||
End of changes. 3 change blocks. | ||||
0 lines changed or deleted | 14 lines changed or added | |||