void embPatlistSeqSearch (AjPFeattable ftable, const AjPSeq seq, AjPPatlistSeq plist, AjBool reverse) { AjPPatternSeq patseq = NULL; AjPPatComp compPat; ajDebug ("embPatlistSearchListSeq: Searching '%S' for %d patterns\n", ajSeqGetNameS(seq), ajPatlistSeqGetSize(plist)); while (ajPatlistSeqGetNext(plist,&patseq)) { compPat = ajPatternSeqGetCompiled(patseq); if (!compPat && !embPatternSeqCompile(patseq)) { ajPatlistSeqRemoveCurrent(plist); continue; } embPatternSeqSearch(ftable,seq,patseq,reverse); ajDebug("end loop\n"); } ajPatlistSeqRewind(plist); return; }
AjBool ajPatlistSeqGetNext (AjPPatlistSeq thys, AjPPatternSeq* pattern) { if (!thys->Iter) thys->Iter = ajListIterNew(thys->Patlist); if (!ajListIterDone(thys->Iter)) *pattern = ajListIterGet(thys->Iter); else { ajPatlistSeqRewind(thys); return ajFalse; } return ajTrue; }