gd_intern.h (libgd-2.3.1) | : | gd_intern.h (libgd-2.3.2) | ||
---|---|---|---|---|
/* Internal header for random common utility functions. */ | ||||
#ifndef GD_INTERN_H | #ifndef GD_INTERN_H | |||
#define GD_INTERN_H | #define GD_INTERN_H | |||
#include <limits.h> | #include <limits.h> | |||
#ifndef MAXPATHLEN | #ifndef MAXPATHLEN | |||
# ifdef PATH_MAX | # ifdef PATH_MAX | |||
# define MAXPATHLEN PATH_MAX | # define MAXPATHLEN PATH_MAX | |||
# elif defined(MAX_PATH) | # elif defined(MAX_PATH) | |||
# define MAXPATHLEN MAX_PATH | # define MAXPATHLEN MAX_PATH | |||
skipping to change at line 32 | skipping to change at line 34 | |||
#else | #else | |||
# if defined(HAVE_INTTYPES_H) | # if defined(HAVE_INTTYPES_H) | |||
# include <inttypes.h> | # include <inttypes.h> | |||
# else | # else | |||
# include "msinttypes/inttypes.h" | # include "msinttypes/inttypes.h" | |||
# endif | # endif | |||
#endif | #endif | |||
#include "gd.h" | #include "gd.h" | |||
#ifndef MIN | ||||
#define MIN(a,b) ((a)<(b)?(a):(b)) | #define MIN(a,b) ((a)<(b)?(a):(b)) | |||
#endif | ||||
#define MIN3(a,b,c) ((a)<(b)?(MIN(a,c)):(MIN(b,c))) | #define MIN3(a,b,c) ((a)<(b)?(MIN(a,c)):(MIN(b,c))) | |||
#ifndef MAX | ||||
#define MAX(a,b) ((a)<(b)?(b):(a)) | #define MAX(a,b) ((a)<(b)?(b):(a)) | |||
#endif | ||||
#define MAX3(a,b,c) ((a)<(b)?(MAX(b,c)):(MAX(a,c))) | #define MAX3(a,b,c) ((a)<(b)?(MAX(b,c)):(MAX(a,c))) | |||
#define CLAMP(x, low, high) (((x) > (high)) ? (high) : (((x) < (low)) ? (low) : (x))) | ||||
typedef enum { | typedef enum { | |||
HORIZONTAL, | HORIZONTAL, | |||
VERTICAL, | VERTICAL, | |||
} gdAxis; | } gdAxis; | |||
/* Convert a double to an unsigned char, rounding to the nearest | /* Convert a double to an unsigned char, rounding to the nearest | |||
* integer and clamping the result between 0 and max. The absolute | * integer and clamping the result between 0 and max. The absolute | |||
* value of clr must be less than the maximum value of an unsigned | * value of clr must be less than the maximum value of an unsigned | |||
* short. */ | * short. */ | |||
End of changes. 6 change blocks. | ||||
4 lines changed or deleted | 3 lines changed or added |