9693c13824652b5ffa51b2dd9770dcddb1e03385 kent Thu Feb 5 22:07:15 2015 -0800 Added wildExpandList() function. diff --git src/inc/common.h src/inc/common.h index 45ce154..16e6c37 100644 --- src/inc/common.h +++ src/inc/common.h @@ -836,30 +836,36 @@ /* Look for character c sometime before s, but going no further than limit. * Return NULL if not found. */ boolean wildMatch(const char *wildCard, const char *string); /* does a case insensitive wild card match with a string. * * matches any string or no character. * ? matches any single character. * anything else etc must match the character exactly. */ boolean sqlMatchLike(char *wildCard, char *string); /* Match using % and _ wildcards. */ boolean anyWild(const char *string); /* Return TRUE if any wild card characters in string. */ +struct slName *wildExpandList(struct slName *allList, struct slName *wildList, + boolean abortMissing); +/* Wild list is a list of names, possibly including * and ? wildcard characters. This + * function returns names taken from allList that match patterns in wildList. Works much + * like wildcard expansion over a file system but expands over allList instead. */ + char *memMatch(char *needle, int nLen, char *haystack, int hLen); /* Returns first place where needle (of nLen chars) matches * haystack (of hLen chars) */ void toUpperN(char *s, int n); /* Convert a section of memory to upper case. */ void toLowerN(char *s, int n); /* Convert a section of memory to lower case. */ void toggleCase(char *s, int size); /* toggle upper and lower case chars in string. */ char *strUpper(char *s); #define touppers(s) (void)strUpper(s)