changed "http" to "https" in URLs
[rocksndiamonds.git] / src / libgame / types.h
1 // ============================================================================
2 // Artsoft Retro-Game Library
3 // ----------------------------------------------------------------------------
4 // (c) 1995-2014 by Artsoft Entertainment
5 //                  Holger Schemel
6 //                  info@artsoft.org
7 //                  https://www.artsoft.org/
8 // ----------------------------------------------------------------------------
9 // types.h
10 // ============================================================================
11
12 #ifndef TYPES_H
13 #define TYPES_H
14
15 #include <stdio.h>
16 #include <stdlib.h>
17 #include <stdarg.h>
18 #include <string.h>
19 #include <sys/types.h>
20
21
22 #if !defined(PLATFORM_WIN32)
23 typedef int boolean;
24 typedef unsigned char byte;
25 #endif
26
27 #ifdef TRUE
28 #undef TRUE
29 #endif
30
31 #ifdef FALSE
32 #undef FALSE
33 #endif
34
35 #ifdef AUTO
36 #undef AUTO
37 #endif
38
39 #define TRUE            1
40 #define FALSE           0
41 #define AUTO            -1
42
43 #ifndef MIN
44 #define MIN(a,b)        ((a) < (b) ? (a) : (b))
45 #endif
46
47 #ifndef MAX
48 #define MAX(a,b)        ((a) > (b) ? (a) : (b))
49 #endif
50
51 #ifndef ABS
52 #define ABS(a)          ((a) < 0 ? -(a) : (a))
53 #endif
54
55 #ifndef SIGN
56 #define SIGN(a)         ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
57 #endif
58
59 #ifndef ODD
60 #define ODD(a)          (((a) & 1) == 1)
61 #endif
62
63 #ifndef EVEN
64 #define EVEN(a)         (((a) & 1) == 0)
65 #endif
66
67 #define ARRAY_SIZE(array)               (sizeof(array) / sizeof(array[0]))
68
69
70 struct ListNode
71 {
72   char *key;
73   void *content;
74   struct ListNode *prev;
75   struct ListNode *next;
76 };
77 typedef struct ListNode ListNode;
78
79 #endif // TYPES_H