28321bba8a62d1783cee58e4a4813c2757f018b1
angie
Tue Oct 29 10:17:15 2013 -0700
Integer columns of bigBed+ can have associated URLs (all-integer IDs),and we weren't reporting any formatting issues anyway, so send such
columns through printIdOrLinks.
diff --git src/hg/hgc/hgc.c src/hg/hgc/hgc.c
index bb48763..6c5b1fd 100644
--- src/hg/hgc/hgc.c
+++ src/hg/hgc/hgc.c
@@ -1563,40 +1563,32 @@
continue;
}
int ix = count;
if (sr != NULL)
{
ix = sqlFieldColumn(sr, col->name); // If sr provided, name must match sql columnn name!
if (ix == -1 || ix > fieldCount) // so extraField really just provides a label
continue;
}
// Print as table rows
if (count == 0)
printf("
%s: | ", col->comment); - if (col->isList || col->isArray || col->lowType->stringy) + if (col->isList || col->isArray || col->lowType->stringy || asTypesIsInt(col->lowType->type)) printIdOrLinks(col, fieldToUrl, tdb, fields[ix]); - else if (asTypesIsInt(col->lowType->type)) - { - long valInt = strtol(fields[ix],NULL,10); - if (errno == 0 && valInt != 0) - printf("%ld | %s | \n", fields[ix]); // decided not to print error - } else if (asTypesIsFloating(col->lowType->type)) { double valDouble = strtod(fields[ix],NULL); if (errno == 0 && valDouble != 0) printf("%g | \n", valDouble); else printf("%s | \n", fields[ix]); // decided not to print error } else printf("%s | \n", fields[ix]); } asObjectFree(&as); freeMem(fieldToUrl); if (count > 0) printf("