File: panotypes.h

package info (click to toggle)
libpano13 2.9.12.dfsg-2
  • links: PTS, VCS
  • area: main
  • in suites: lenny
  • size: 8,616 kB
  • ctags: 3,403
  • sloc: ansic: 31,169; sh: 8,383; cpp: 1,714; makefile: 236; perl: 202
file content (61 lines) | stat: -rw-r--r-- 1,935 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
/*
 * The so called TIFF types conflict with definitions from inttypes.h 
 * included from sys/types.h on AIX (at least using VisualAge compiler). 
 * We try to work around this by detecting this case.  Defining 
 * _TIFF_DATA_TYPEDEFS_ short circuits the later definitions in tiff.h, and
 * we will in the holes not provided for by inttypes.h. 
 *
 * See http://bugzilla.remotesensing.org/show_bug.cgi?id=39
 */
#if defined(_H_INTTYPES) && defined(_ALL_SOURCE) && defined(USING_VISUALAGE)

#define _PANO_DATA_TYPEDEFS_
typedef unsigned char pt_uint8;
typedef unsigned short pt_uint16;
typedef unsigned int pt_uint32;

#endif

/*
 * Intrinsic data types required by the file format:
 *
 * 8-bit quantities	int8/uint8
 * 16-bit quantities	int16/uint16
 * 32-bit quantities	int32/uint32
 * strings		unsigned char*
 */
#ifndef _PANO_DATA_TYPEDEFS_
#define _PANO_DATA_TYPEDEFS_

#ifdef __STDC__
typedef	signed char pt_int8;	/* NB: non-ANSI compilers may not grok */
#else
typedef	char pt_int8;
#endif
typedef	unsigned char pt_uint8;
typedef	short pt_int16;
typedef	unsigned short pt_uint16;	/* sizeof (uint16) must == 2 */
#if defined(__s390x__) || defined(__ia64__) || defined(__alpha) || defined(__x86_64__) || (defined(_MIPS_SZLONG) && _MIPS_SZLONG == 64) || defined(__LP64__) || defined(_LP64)
typedef	int pt_int32;
typedef	unsigned int pt_uint32;	/* sizeof (uint32) must == 4 */
#define FMT_INT32 "%d"
#else
typedef	long pt_int32;
typedef	unsigned long pt_uint32;	/* sizeof (uint32) must == 4 */
#define FMT_INT32 "%ld"
#endif
#endif /* _PANO_DATA_TYPEDEFS_ */

/* The macro PT_UNUSED indicates that a function, function argument or
 * variable may potentially be unused.
 * Examples:
 *   1) static int PT_UNUSED unused_function (char arg);
 *   2) int foo (char unused_argument PT_UNUSED);
 *   3) int unused_variable PT_UNUSED;
 */

#ifdef __GNUC__
  #define PT_UNUSED __attribute__ ((__unused__))
#else
  #define PT_UNUSED
#endif