abffeaabe69569cce69dcbab139fd333eaf6641d
angie
  Fri Nov 20 10:01:16 2015 -0800
Libifying lmCloneRow, adding lmCloneRowExt for future use by annoStreamDb.

diff --git src/hg/lib/annoStreamDb.c src/hg/lib/annoStreamDb.c
index c278f8e..c76daef 100644
--- src/hg/lib/annoStreamDb.c
+++ src/hg/lib/annoStreamDb.c
@@ -211,41 +211,30 @@
 struct sqlResult *sr = sqlGetResult(self->conn, query->string);
 dyStringFree(&query);
 self->sr = sr;
 self->needQuery = FALSE;
 }
 
 static void rowBufInit(struct rowBuf *rowBuf, int size)
 /* Clean up rowBuf and give it a new lm and buffer[size]. */
 {
 resetRowBuf(rowBuf);
 rowBuf->lm = lmInit(0);
 rowBuf->size = size;
 lmAllocArray(rowBuf->lm, rowBuf->buf, size);
 }
 
-static char **lmCloneRow(struct lm *lm, char **row, int colCount)
-/* Use lm to allocate an array of strings and its contents copied from row. */
-{
-char **cloneRow = NULL;
-lmAllocArray(lm, cloneRow, colCount);
-int i;
-for (i = 0;  i < colCount;  i++)
-    cloneRow[i] = lmCloneString(lm, row[i]);
-return cloneRow;
-}
-
 static void updateNextChunkState(struct annoStreamDb *self, int queryMaxItems)
 /* If the just-fetched interval list was limited to ASD_CHUNK_SIZE, set doNextChunk
  * and trim the last row(s) so that when we query the next chunk, we don't get
  * repeat rows due to querying a start coord that was already returned. */
 {
 struct rowBuf *rowBuf = &self->rowBuf;
 if (queryMaxItems == ASD_CHUNK_SIZE && rowBuf->size == ASD_CHUNK_SIZE)
     {
     self->doNextChunk = TRUE;
     // Starting at the last row in rowBuf, work back to find a value with a different start.
     int ix = rowBuf->size - 1;
     char **words = rowBuf->buf[ix];
     int startIx = self->startIx + self->omitBin;
     uint lastStart = atoll(words[startIx]);
     for (ix = rowBuf->size - 2;  ix >= 0;  ix--)