From d1a8285f818eb7e5c3d6a05709ea21a808490b8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Frings-F=C3=BCrst?= Date: Mon, 19 Mar 2018 19:55:58 +0100 Subject: New upstream version 5.1.0 --- app/bin/common.h | 23 +++++++++++------------ 1 file changed, 11 insertions(+), 12 deletions(-) (limited to 'app/bin/common.h') 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 + #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 -- cgit v1.2.3