void ccdsInfoFreeList(struct ccdsInfo **pList) /* Free a list of dynamically allocated ccdsInfo's */ { struct ccdsInfo *el, *next; for (el = *pList; el != NULL; el = next) { next = el->next; ccdsInfoFree(&el); } *pList = NULL; }
static void ccdsFilterDupAccessions(struct ccdsInfo **ccdsInfoList) /* remove duplicate accessions (see processCcdsInfoRow for why we have them), * keeping only the latest version. Also sort the list in CCDS order. */ { struct ccdsInfo *newList = NULL, *ci; ccdsInfoCcdsMRnaSort(ccdsInfoList); while ((ci = slPopHead(ccdsInfoList)) != NULL) { if (keepCcdsInfo(ci, *ccdsInfoList)) slAddHead(&newList, ci); else ccdsInfoFree(&ci); } slReverse(&newList); *ccdsInfoList = newList; }