summaryrefslogtreecommitdiff
path: root/app/bin/dcmpnd.c
diff options
context:
space:
mode:
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;
+}
+
+