diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 21:26:53 +0200 |
commit | df247efec654e512242e4f4f1b0212034f9e01fe (patch) | |
tree | 25c02e16957f3aa613af30c140fd8e8a3d52fda6 /app/bin/dcmpnd.c | |
parent | d0b6a8a4ec298024f14f704f9e40a6f9d324ccf3 (diff) | |
parent | a5ade52caa489cf0a713e0f02b764000d203140e (diff) |
Merge branch 'release/debian/1%5.2.0Beta2.1-1' into masterHEADdebian/1%5.2.0Beta2.1-1master
Diffstat (limited to 'app/bin/dcmpnd.c')
-rw-r--r-- | app/bin/dcmpnd.c | 33 |
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; +} + + |