4dc2ce3ec067b4ccb7987cbda16289d165954971 angie Thu Mar 9 20:04:39 2023 -0800 Translate multiple changes to the same codon correctly, collecting all mutations on the path from root to node. diff --git src/inc/common.h src/inc/common.h index d97cb08..bbfdb28 100644 --- src/inc/common.h +++ src/inc/common.h @@ -444,30 +444,35 @@ // Merges and sorts a pair of singly linked lists leaving only unique // items via slUniqufy. duplicate itens are defined by the compare routine // returning 0. If free is provided, items dropped from list can disposed of. boolean slRemoveEl(void *vpList, void *vToRemove); /* Remove element from singly linked list. Usage: * slRemove(&list, el); * Returns TRUE if element in list. */ void slFreeList(void *listPt); /* Free all elements in list and set list pointer to null. * Usage: * slFreeList(&list); */ +void slFreeListWithFunc(void *listPt, void (*freeFunc)()); +/* Free a list by calling freeFunc on each element. + * listPt must be a pointer to a pointer to some slList-compatible struct (&list). + * freeFunc must take one arg: a pointer to a pointer to the item it is going to free. */ + /******* slInt - an int on a list - the first of many singly linked list structures *******/ struct slInt /* List of integers. */ { struct slInt *next; /* Next in list. */ int val; /* Integer value. */ }; struct slInt *slIntNew(int x); #define newSlInt slIntNew /* Return a new double. */ int slIntCmp(const void *va, const void *vb); /* Compare two slInts. */