b2a2dc48de94edbae86b7f1d2f73f909b85e0740 kent Sat Apr 13 17:49:38 2013 -0700 Adding shuffleArrayOfChars library function. diff --git src/inc/obscure.h src/inc/obscure.h index 42a4ab6..9fc90ae 100644 --- src/inc/obscure.h +++ src/inc/obscure.h @@ -123,30 +123,33 @@ * 1-this1=val1 2-this='quoted val2' var3="another val" * If firstStartsWithLetter is true, then the left side of the equals must start with * and equals. */ struct hash *hashWordsInFile(char *fileName, int hashSize); /* Create a hash of space delimited words in file. * hashSize is as in hashNew() - pass 0 for default. */ struct hash *hashNameIntFile(char *fileName); /* Given a two column file (name, integer value) return a * hash keyed by name with integer values */ struct hash *hashTwoColumnFile(char *fileName); /* Given a two column file (key, value) return a hash. */ +void shuffleArrayOfChars(char *array, int arraySize, int shuffleCount); +/* Shuffle array of characters of given size given number of times. */ + void shuffleArrayOfPointers(void *pointerArray, int arraySize, int shuffleCount); /* Shuffle array of pointers of given size given number of times. */ void shuffleList(void *pList, int shuffleCount); /* Randomize order of slList. Usage: * shuffleList(&list) * where list is a pointer to a structure that * begins with a next field. */ char *stripCommas(char *position); /* make a new string with commas stripped out */ void dotForUserInit(int dotMod); /* Set how often dotForUser() outputs a dot. */