512bdb5be1e4939ebe0b8161e8810fae28ee57f6 kent Sat Jan 28 15:51:41 2017 -0800 Removing the kind of inconvenient and flaky-about-escapes function nextWordRespectingQuotes in common.h and replacing it with calls to the easier less flaky (and older) function nextQuotedWord in obscure.h. This fixed a bug in tagStormCheck which didn't deal with escapes in quoted strings right. Also added BIGLONGLONG to common.h for use similar to BIGNUM. Thought I'd need it in tagStormInfo to fix a bug in schema, but it turned out to be floating point rounding instead. diff --git src/inc/obscure.h src/inc/obscure.h index 687399e..bf9823a 100644 --- src/inc/obscure.h +++ src/inc/obscure.h @@ -78,30 +78,34 @@ * character, merely pass it on through. */ boolean parseQuotedString( char *in, char *out, char **retNext); /* Read quoted string from in (which should begin with first quote). * Write unquoted string to out, which may be the same as in. * Return pointer to character past end of string in *retNext. * Return FALSE if can't find end. */ char *nextQuotedWord(char **pLine); /* Generalization of nextWord. Returns next quoted * string or if no quotes next word. Updates *pLine * to point past word that is returned. Does not return * quotes. */ +struct slName *slNameListOfUniqueWords(char *text,boolean respectQuotes); +/* Return list of unique words found by parsing string delimited by whitespace. + * If respectQuotes then ["Lucy and Ricky" 'Fred and Ethyl'] will yield 2 slNames no quotes */ + char *makeQuotedString(char *in, char quoteChar); /* Create a string surrounded by quoteChar, with internal * quoteChars escaped. freeMem result when done. */ char *makeEscapedString(char *in, char toEscape); /* Return string that is a copy of in, but with all * toEscape characters preceded by '\' * When done freeMem result. */ void escCopy(char *in, char *out, char toEscape, char escape); /* Copy in to out, escaping as needed. Out better be big enough. * (Worst case is strlen(in)*2 + 1.) */ struct slName *stringToSlNames(char *string); /* Convert string to a list of slNames separated by