[trunk] Move INLINE definition within openjpeg.h header since application may use it
This commit is contained in:
parent
9d0bdf69e5
commit
138a65d6c1
|
@ -183,7 +183,7 @@ static int tga_readheader(FILE *fp, unsigned int *bits_per_pixel,
|
||||||
|
|
||||||
#if WORDS_BIGENDIAN == 1
|
#if WORDS_BIGENDIAN == 1
|
||||||
|
|
||||||
static inline int16_t swap16(int16_t x)
|
static INLINE int16_t swap16(int16_t x)
|
||||||
{
|
{
|
||||||
return((((u_int16_t)x & 0x00ffU) << 8) |
|
return((((u_int16_t)x & 0x00ffU) << 8) |
|
||||||
(((u_int16_t)x & 0xff00U) >> 8));
|
(((u_int16_t)x & 0xff00U) >> 8));
|
||||||
|
@ -1421,13 +1421,7 @@ opj_image_t* pgxtoimage(const char *filename, opj_cparameters_t *parameters) {
|
||||||
|
|
||||||
#define CLAMP(x,a,b) x < a ? a : (x > b ? b : x)
|
#define CLAMP(x,a,b) x < a ? a : (x > b ? b : x)
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
static INLINE int clamp( const int value, const int prec, const int sgnd )
|
||||||
#define STIN static __inline
|
|
||||||
#else
|
|
||||||
#define STIN static inline
|
|
||||||
#endif
|
|
||||||
|
|
||||||
STIN int clamp( const int value, const int prec, const int sgnd )
|
|
||||||
{
|
{
|
||||||
if( sgnd )
|
if( sgnd )
|
||||||
{
|
{
|
||||||
|
|
|
@ -43,6 +43,23 @@
|
||||||
==========================================================
|
==========================================================
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
/*
|
||||||
|
The inline keyword is supported by C99 but not by C90.
|
||||||
|
Most compilers implement their own version of this keyword ...
|
||||||
|
*/
|
||||||
|
#ifndef INLINE
|
||||||
|
#if defined(_MSC_VER)
|
||||||
|
#define INLINE __forceinline
|
||||||
|
#elif defined(__GNUC__)
|
||||||
|
#define INLINE __inline__
|
||||||
|
#elif defined(__MWERKS__)
|
||||||
|
#define INLINE inline
|
||||||
|
#else
|
||||||
|
/* add other compilers here ... */
|
||||||
|
#define INLINE
|
||||||
|
#endif /* defined(<Compiler>) */
|
||||||
|
#endif /* INLINE */
|
||||||
|
|
||||||
/* deprecated attribute */
|
/* deprecated attribute */
|
||||||
#ifdef __GNUC__
|
#ifdef __GNUC__
|
||||||
#define OPJ_DEPRECATED(func) func __attribute__ ((deprecated))
|
#define OPJ_DEPRECATED(func) func __attribute__ ((deprecated))
|
||||||
|
|
|
@ -102,22 +102,6 @@
|
||||||
#define __attribute__(x) /* __attribute__(x) */
|
#define __attribute__(x) /* __attribute__(x) */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
|
||||||
The inline keyword is supported by C99 but not by C90.
|
|
||||||
Most compilers implement their own version of this keyword ...
|
|
||||||
*/
|
|
||||||
#ifndef INLINE
|
|
||||||
#if defined(_MSC_VER)
|
|
||||||
#define INLINE __forceinline
|
|
||||||
#elif defined(__GNUC__)
|
|
||||||
#define INLINE __inline__
|
|
||||||
#elif defined(__MWERKS__)
|
|
||||||
#define INLINE inline
|
|
||||||
#else
|
|
||||||
/* add other compilers here ... */
|
|
||||||
#define INLINE
|
|
||||||
#endif /* defined(<Compiler>) */
|
|
||||||
#endif /* INLINE */
|
|
||||||
|
|
||||||
/* Are restricted pointers available? (C99) */
|
/* Are restricted pointers available? (C99) */
|
||||||
#if (__STDC_VERSION__ != 199901L)
|
#if (__STDC_VERSION__ != 199901L)
|
||||||
|
|
Loading…
Reference in New Issue