summaryrefslogtreecommitdiff
path: root/app/bin/dcmpnd.c
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/dcmpnd.c
parent359b557176b9bb2ff1aed2082641eed39c358d0d (diff)
New upstream version 5.2.0Beta2.1upstream/5.2.0Beta2.1
Diffstat (limited to 'app/bin/dcmpnd.c')
-rw-r--r--app/bin/dcmpnd.c33
1 files changed, 33 insertions, 0 deletions
diff --git a/app/bin/dcmpnd.c b/app/bin/dcmpnd.c
index 13f7c56..93e73ac 100644
--- a/app/bin/dcmpnd.c
+++ b/app/bin/dcmpnd.c
@@ -30,6 +30,7 @@
#include "i18n.h"
#include "messages.h"
#include "param.h"
+#include "include/paramfile.h"
#include "shrtpath.h"
#include "track.h"
#include "utility.h"
@@ -290,6 +291,11 @@ static BOOL_T RefreshCompound1(
xx->segCnt = to->segCnt;
xx->segs = (trkSeg_p)MyMalloc( xx->segCnt * sizeof *(trkSeg_p)0 );
memcpy( xx->segs, to->segs, xx->segCnt * sizeof *(trkSeg_p)0 );
+ MyFree( xx->paths);
+ xx->paths = (signed char*)MyMalloc( to->pathLen * sizeof *xx->paths );
+ memcpy( xx->paths, to->paths, to->pathLen * sizeof *xx->paths );
+ xx->pathLen = to->pathLen;
+ xx->pathCurr = xx->paths;
if ( flip )
FlipSegs( xx->segCnt, xx->segs, zero, 90.0 );
ClrTrkBits( trk, TB_SELECTED );
@@ -594,3 +600,30 @@ EXPORT void CompoundCustMgmLoad( void )
}
}
}
+
+/*****************************************************************************
+ *
+ * Utitlies
+ *
+ */
+
+wIndex_t FindListItemByContext(
+ wList_p listP,
+ void * context )
+{
+ if ( listP == NULL )
+ return -1;
+ if ( context == NULL )
+ return -1;
+ for ( wIndex_t inx = 0; inx < wListGetCount( listP ); ++inx ) {
+ void * itemContext = wListGetItemContext( listP, inx );
+ if ( itemContext != NULL ) {
+ if ( itemContext == context ) {
+ return inx;
+ }
+ }
+ }
+ return -1;
+}
+
+