src/hg/lib/trackDb.c 1.11
1.11 2010/05/11 01:43:30 kent
Refactoring to split the trackDb.tableName field into separate track and table fields. Similarly track.mapName field goes to the same track and table fields.
Index: src/hg/lib/trackDb.c
===================================================================
RCS file: /projects/compbio/cvsroot/kent/src/hg/lib/trackDb.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -b -B -U 4 -r1.10 -r1.11
--- src/hg/lib/trackDb.c 12 Apr 2010 16:17:22 -0000 1.10
+++ src/hg/lib/trackDb.c 11 May 2010 01:43:30 -0000 1.11
@@ -19,9 +19,9 @@
int sizeOne;
AllocVar(ret);
ret->restrictCount = sqlSigned(row[14]);
-ret->tableName = cloneString(row[0]);
+ret->track = cloneString(row[0]);
ret->shortLabel = cloneString(row[1]);
ret->type = cloneString(row[2]);
ret->longLabel = cloneString(row[3]);
ret->visibility = sqlUnsigned(row[4]);
@@ -115,9 +115,9 @@
int i;
if (ret == NULL)
AllocVar(ret);
-ret->tableName = sqlStringComma(&s);
+ret->track = sqlStringComma(&s);
ret->shortLabel = sqlStringComma(&s);
ret->type = sqlStringComma(&s);
ret->longLabel = sqlStringComma(&s);
ret->visibility = sqlUnsignedComma(&s);
@@ -154,9 +154,9 @@
{
struct trackDb *el;
if ((el = *pEl) == NULL) return;
-freeMem(el->tableName);
+freeMem(el->track);
freeMem(el->shortLabel);
freeMem(el->type);
freeMem(el->longLabel);
/* All strings in restrictList are allocated at once, so only need to free first. */
@@ -190,9 +190,9 @@
/* Print out trackDb. Separate fields with sep. Follow last field with lastSep. */
{
int i;
if (sep == ',') fputc('"',f);
-fprintf(f, "%s", el->tableName);
+fprintf(f, "%s", el->track);
if (sep == ',') fputc('"',f);
fputc(sep,f);
if (sep == ',') fputc('"',f);
fprintf(f, "%s", el->shortLabel);