32a7f051b082da240f3bc95d5419687a2d1fff93
kent
  Thu Jun 1 21:51:52 2017 -0700
Adding hashReverseAllBucketLists, refactored out of hashExpand().

diff --git src/inc/hash.h src/inc/hash.h
index 83d4ac5..3867acb 100644
--- src/inc/hash.h
+++ src/inc/hash.h
@@ -221,30 +221,34 @@
 /* Return the next value in the hash table, or NULL if no more. Do not modify
  * hash table while this is being used. */
 
 char *hashNextName(struct hashCookie *cookie);
 /* Return the next name in the hash table, or NULL if no more. Do not modify
  * hash table while this is being used. */
 
 struct hash *newHashExt(int powerOfTwoSize, boolean useLocalMem);
 /* Returns new hash table. Uses local memory optionally. */
 #define hashNewExt(a) newHashExt(a)	/* Synonym */
 
 #define newHash(a) newHashExt(a, TRUE)
 /* Returns new hash table using local memory. */
 #define hashNew(a) newHash(a)	/* Synonym */
 
+void hashReverseAllBucketLists(struct hash *hash);
+/* Reverse all hash bucket list.  You might do this to
+ * get them back in the same order things were added to the hash */
+
 void hashResize(struct hash *hash, int powerOfTwoSize);
 /* Resize the hash to a new size */
 
 struct hash *hashFromSlNameList(void *list);
 /* Create a hash out of a list of slNames. */
 
 struct hash *hashSetFromSlNameList(void *list);
 /* Create a hashSet (hash without values) out of a list of slNames. */
 
 void freeHash(struct hash **pHash);
 /* Free up hash table. */
 #define hashFree(a) freeHash(a)	/* Synonym */
 
 void freeHashAndVals(struct hash **pHash);
 /* Free up hash table and all values associated with it.