diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-22 14:05:41 +0200 |
commit | b55285a77da0e0b829e4ce8d7e09debaabc68e15 (patch) | |
tree | f622559ef65bbdd3e1c5bdb06098a8f89eec0563 /app/bin/dcmpnd.c | |
parent | d3897ce090dbeb220ed2c782f095597e417cf3cc (diff) | |
parent | d1ae75703e1ed81d65ea16946dcdb77e7a13adc9 (diff) |
Merge branch 'feature/upstream' into develop
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; +} + + |