summaryrefslogtreecommitdiff
path: root/app/bin/common.h
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-08 11:53:00 +0200
commitb623f5953691b2a0614e6f1f4def86bdbb9a4113 (patch)
tree18102bd36f7e22eb2ba2b9f880e4cb29346f4cb8 /app/bin/common.h
parent359b557176b9bb2ff1aed2082641eed39c358d0d (diff)
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'app/bin/common.h')
-rw-r--r--app/bin/common.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/app/bin/common.h b/app/bin/common.h
index 255e8d7..2db961f 100644
--- a/app/bin/common.h
+++ b/app/bin/common.h
@@ -24,6 +24,7 @@
#define COMMON_H
#include <stdlib.h>
+#include <stdint.h>
#ifndef TRUE
#define TRUE (1)
@@ -46,6 +47,11 @@ typedef struct {
POS_T x,y;
} coOrd;
+typedef struct {
+ coOrd pt;
+ int pt_type;
+} pts_t;
+
typedef int INT_T;
typedef int BOOL_T;
@@ -61,6 +67,11 @@ typedef int TRKINX_T;
typedef long DEBUGF_T;
typedef int REGION_T;
+enum paramFileState { PARAMFILE_UNLOADED = 0, PARAMFILE_NOTUSABLE, PARAMFILE_COMPATIBLE, PARAMFILE_FIT, PARAMFILE_MAXSTATE };
+
+#define SCALE_ANY (-2)
+#define SCALE_DEMO (-1)
+
typedef struct {
int cnt;
int max;
@@ -108,6 +119,17 @@ typedef struct {
} \
(DA).max = 0; \
(DA).cnt = 0; }
+#define DYNARR_REMOVE(T,DA,I) \
+ { \
+ { if ((DA).cnt-1 > I) { \
+ for (int i=I;i<(DA).cnt-1;i++) { \
+ (((T*)(DA).ptr)[i])= (((T*)(DA).ptr)[i+1]); \
+ } \
+ } \
+ } \
+ if ((DA.cnt)>=I) (DA).cnt--; \
+ }
+
#ifdef WINDOWS
#define M_PI 3.14159