26ba96b7f67ea72bbc737211e5a7a475ece5754e
kent
  Sat Jan 28 15:51:13 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/lib/obscure.c src/lib/obscure.c
index 720512c..a0fa73d 100644
--- src/lib/obscure.c
+++ src/lib/obscure.c
@@ -358,30 +358,51 @@
 if (line == NULL || line[0] == 0)
     return NULL;
 c = *line;
 if (c == '"' || c == '\'')
     {
     if (!parseQuotedString(line, line, pLine))
         return NULL;
     return line;
     }
 else
     {
     return nextWord(pLine);
     }
 }
 
+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 */
+{
+struct slName *list = NULL;
+char *word = NULL;
+while (text != NULL)
+    {
+    if (respectQuotes)
+        word = nextQuotedWord(&text);
+    else
+        word = nextWord(&text);
+    if (word)
+        slNameStore(&list, word);
+    else
+        break;
+    }
+slReverse(&list);
+return list;
+}
+
 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.) */
 {
 char c;
 for (;;)
     {
     c = *in++;
     if (c == toEscape)
         *out++ = escape;
     *out++ = c;
     if (c == 0)
         break;
     }
 }