Merge branch 'master' of klarke.webfactional.com:webapps/git/repos/libcm

This commit is contained in:
kevin 2013-03-17 14:43:48 -07:00
commit 865ac36953
2 changed files with 34 additions and 21 deletions

View File

@ -896,39 +896,40 @@ cmFsRC_t _cmFileSysDirGetEntries( cmFileSysDeRecd_t* drp, const cmChar_t* dirSt
goto errLabel; goto errLabel;
} }
// is a link
// is the entry a file if( _cmFileSysIsLink(drp->p,fn) )
if( _cmFileSysIsFile(drp->p,fn) )
{ {
if( cmIsFlag(drp->filterFlags,kFileFsFl)==false ) if( cmIsFlag(drp->filterFlags,kLinkFsFl) == false )
continue; continue;
flags |= kFileFsFl; flags |= kLinkFsFl;
if( cmIsFlag(drp->filterFlags,kRecurseLinksFsFl) )
if((rc = _cmFileSysDirGetEntries(drp,fn)) != kOkFsRC )
goto errLabel;
} }
else else
{ {
// is the entry a dir
if( _cmFileSysIsDir(drp->p,fn) ) // is the entry a file
if( _cmFileSysIsFile(drp->p,fn) )
{ {
if( cmIsFlag(drp->filterFlags,kDirFsFl) == false) if( cmIsFlag(drp->filterFlags,kFileFsFl)==false )
continue; continue;
flags |= kDirFsFl; flags |= kFileFsFl;
if( cmIsFlag(drp->filterFlags,kRecurseFsFl) )
if((rc = _cmFileSysDirGetEntries(drp,fn)) != kOkFsRC )
goto errLabel;
} }
else else
{ {
if( _cmFileSysIsLink(drp->p,fn) ) // is the entry a dir
if( _cmFileSysIsDir(drp->p,fn) )
{ {
if( cmIsFlag(drp->filterFlags,kLinkFsFl) == false ) if( cmIsFlag(drp->filterFlags,kDirFsFl) == false)
continue; continue;
flags |= kLinkFsFl; flags |= kDirFsFl;
if( cmIsFlag(drp->filterFlags,kRecurseLinksFsFl) ) if( cmIsFlag(drp->filterFlags,kRecurseFsFl) )
if((rc = _cmFileSysDirGetEntries(drp,fn)) != kOkFsRC ) if((rc = _cmFileSysDirGetEntries(drp,fn)) != kOkFsRC )
goto errLabel; goto errLabel;
} }

View File

@ -479,11 +479,23 @@ _cmPoArg_t* _cmPgmOptInsertArg( _cmPo_t* p, _cmPoOpt_t* r )
a->opt = r; a->opt = r;
a->valStr = NULL; a->valStr = NULL;
a->link = p->args; // link into master arg list // link onto the end of the master arg list
p->args = a; _cmPoArg_t* ap = p->args;
while( ap!=NULL && ap->link != NULL )
ap=ap->link;
if( ap == NULL )
p->args = a;
else
ap->link = a;
a->inst = r->inst; // link into opt recd list // link onto the end of the opt recd list
r->inst = a; ap = r->inst;
while( ap!=NULL && ap->inst!=NULL)
ap=ap->inst;
if( ap==NULL)
r->inst = a;
else
ap->inst = a;
// if no parm. type flag was given then the arg is implicitely a bool and the value is true. // if no parm. type flag was given then the arg is implicitely a bool and the value is true.
//if( (r->flags & kTypeMaskPoFl) == 0 ) //if( (r->flags & kTypeMaskPoFl) == 0 )