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

diff --git src/lib/annoRow.c src/lib/annoRow.c
index 3a2f4bd..e052263 100644
--- src/lib/annoRow.c
+++ src/lib/annoRow.c
@@ -3,36 +3,31 @@
 /* Copyright (C) 2013 The Regents of the University of California 
  * See README in this or parent directory for licensing information. */
 
 #include "annoRow.h"
 
 struct annoRow *annoRowFromStringArray(char *chrom, uint start, uint end, boolean rightJoinFail,
 				       char **wordsIn, int numCols, struct lm *lm)
 /* Allocate & return an annoRow (type arWords) with data cloned from wordsIn. */
 {
 struct annoRow *aRow;
 lmAllocVar(lm, aRow);
 aRow->chrom = lmCloneString(lm, chrom);
 aRow->start = start;
 aRow->end = end;
 aRow->rightJoinFail = rightJoinFail;
-char **words;
-lmAllocArray(lm, words, numCols);
-int i;
-for (i = 0;  i < numCols;  i++)
-    words[i] = lmCloneString(lm, wordsIn[i]);
-aRow->data = words;
+aRow->data = lmCloneRow(lm, wordsIn, numCols);
 return aRow;
 }
 
 struct annoRow *annoRowWigVecNew(char *chrom, uint start, uint end, boolean rightJoinFail,
                                  float *values, struct lm *lm)
 /* Allocate & return an annoRow (type arWigVec), with cloned per-base values;
  * length of values is (end-start). */
 {
 struct annoRow *row;
 lmAllocVar(lm, row);
 row->chrom = lmCloneString(lm, chrom);
 row->start = start;
 row->end = end;
 row->data = lmCloneMem(lm, values, (end - start) * sizeof(values[0]));
 row->rightJoinFail = rightJoinFail;