49eebbfade7874bd516ceb6f138e16111837bc33 galt Mon May 7 12:57:31 2012 -0700 Make sqlList.c dynamic arrays thread-safe. Fixes bug in bigBed reported by user #7850. diff --git src/inc/common.h src/inc/common.h index 827a168..c38c706 100644 --- src/inc/common.h +++ src/inc/common.h @@ -868,30 +868,34 @@ int countCharsN(char *s, char c, int size); /* Return number of characters c in string s of given size. */ int countLeadingChars(char *s, char c); /* Count number of characters c at start of string. */ int countLeadingDigits(const char *s); /* Return number of leading digits in s */ int countLeadingNondigits(const char *s); /* Count number of leading non-digit characters in s. */ int countSame(char *a, char *b); /* Count number of characters that from start in a,b that are same. */ +int countSeparatedItems(char *string, char separator); +/* Count number of items in string you would parse out with given + * separator, assuming final separator is optional. */ + int chopString(char *in, char *sep, char *outArray[], int outSize); /* int chopString(in, sep, outArray, outSize); */ /* This chops up the input string (cannabilizing it) * into an array of zero terminated strings in * outArray. It returns the number of strings. * If you pass in NULL for outArray, it will just * return the number of strings that it *would* * chop. */ extern char crLfChopper[]; extern char whiteSpaceChopper[]; /* Some handy predefined separators. */ int chopByWhite(char *in, char *outArray[], int outSize); /* Like chopString, but specialized for white space separators. */