summaryrefslogtreecommitdiff
path: root/src/generic/evas/xcf/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/generic/evas/xcf/common.h')
-rw-r--r--src/generic/evas/xcf/common.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/src/generic/evas/xcf/common.h b/src/generic/evas/xcf/common.h
new file mode 100644
index 0000000..5abaab8
--- /dev/null
+++ b/src/generic/evas/xcf/common.h
@@ -0,0 +1,51 @@
1#ifndef __COMMON
2#define __COMMON 1
3
4#ifdef HAVE_CONFIG_H
5# include <config.h>
6#endif
7
8#include <stdio.h>
9#include <stdlib.h>
10#include <sys/types.h>
11#include <unistd.h>
12#include <math.h>
13#include <netinet/in.h>
14#include <time.h>
15#include <sys/mman.h>
16#include <sys/stat.h>
17#include <fcntl.h>
18#include <string.h>
19#include <zlib.h>
20
21#define DATABIG unsigned long long
22#define DATA64 unsigned long long
23#define DATA32 unsigned int
24#define DATA16 unsigned short
25#define DATA8 unsigned char
26
27#ifndef WORDS_BIGENDIAN
28
29#define A_VAL(p) ((DATA8 *)(p))[3]
30#define R_VAL(p) ((DATA8 *)(p))[2]
31#define G_VAL(p) ((DATA8 *)(p))[1]
32#define B_VAL(p) ((DATA8 *)(p))[0]
33
34#else
35
36#define A_VAL(p) ((DATA8 *)(p))[0]
37#define R_VAL(p) ((DATA8 *)(p))[1]
38#define G_VAL(p) ((DATA8 *)(p))[2]
39#define B_VAL(p) ((DATA8 *)(p))[3]
40
41#endif
42
43//#define XCF_DBG 1
44
45#ifdef XCF_DBG
46#define D(fmt, args...) fprintf(stderr, fmt, ## args)
47#else
48#define D(fmt, args...)
49#endif
50
51#endif