summaryrefslogtreecommitdiff
path: root/app/bin/common.h
diff options
context:
space:
mode:
Diffstat (limited to 'app/bin/common.h')
-rw-r--r--app/bin/common.h23
1 files changed, 11 insertions, 12 deletions
diff --git a/app/bin/common.h b/app/bin/common.h
index e238e33..255e8d7 100644
--- a/app/bin/common.h
+++ b/app/bin/common.h
@@ -1,5 +1,5 @@
-/*
- * $Header: /home/dmarkle/xtrkcad-fork-cvs/xtrkcad/app/bin/common.h,v 1.2 2008-02-23 07:27:15 m_fischer Exp $
+/** \file common.h
+ * Defnitions of basic types
*/
/* XTrkCad - Model Railroad CAD
@@ -23,6 +23,8 @@
#ifndef COMMON_H
#define COMMON_H
+#include <stdlib.h>
+
#ifndef TRUE
#define TRUE (1)
#define FALSE (0)
@@ -99,21 +101,18 @@ typedef struct {
abort(); \
} \
(DA).cnt = N; }
+#define DYNARR_FREE(T,DA) \
+ { if ((DA).ptr) { \
+ MyFree( (DA).ptr); \
+ (DA).ptr = NULL; \
+ } \
+ (DA).max = 0; \
+ (DA).cnt = 0; }
#ifdef WINDOWS
-#ifdef FAR
-#undef FAR
-#endif
-#ifndef WIN32
-#define FAR _far
-#else
-#define FAR
-#endif
#define M_PI 3.14159
#define strcasecmp _stricmp
#define strncasecmp _strnicmp
-#else
-#define FAR
#endif
#if _MSC_VER >1300