+#ifndef SIGN
+#define SIGN(a) ((a) < 0 ? -1 : ((a) > 0 ? 1 : 0))
+#endif
+
+#ifndef ODD
+#define ODD(a) (((a) & 1) == 1)
+#endif
+
+#ifndef EVEN
+#define EVEN(a) (((a) & 1) == 0)
+#endif
+
+#define ARRAY_SIZE(array) (sizeof(array) / sizeof(array[0]))
+
+#define PTR_TO_INT(p) ((int) (long) (p))
+#define PTR_TO_UINT(p) ((unsigned int) (unsigned long) (p))
+
+#define INT_TO_PTR(i) ((void *) (long) (i))
+#define UINT_TO_PTR(u) ((void *) (unsigned long) (u))
+
+#define STRUCT_OFFSET(s, m) (offsetof(s, m))
+
+
+struct ListNode
+{
+ char *key;
+ void *content;
+ struct ListNode *prev;
+ struct ListNode *next;
+};
+typedef struct ListNode ListNode;
+
+struct DelayCounter
+{
+ unsigned int value;
+ unsigned int count;
+};
+typedef struct DelayCounter DelayCounter;
+
+#endif // TYPES_H