summaryrefslogtreecommitdiff
path: root/app/bin/common.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:56:15 +0100
committerJörg Frings-Fürst <debian@jff-webhosting.net>2018-03-19 19:56:15 +0100
commit1542c122b3672fe83e027411ad2445772e2d0ed3 (patch)
treee535bc621bd7ffa9d5ce89e0d495df5d1c4ab6fd /app/bin/common.h
parent773810e6583142d7d15263e6481c42aebed6d7f1 (diff)
parentd1a8285f818eb7e5c3d6a05709ea21a808490b8c (diff)
Update upstream source from tag 'upstream/5.1.0'
Update to upstream version '5.1.0' with Debian dir 93ca74b8b4602fce4c9c7740e0cfdde25f086673
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