fcb6dc8dfa166136193177c895ca181200850e4d
max
  Mon Jan 19 06:02:31 2026 -0800
changing superTrack TrackUi quite a bit. Removing dropdowns and
replacing them with buttons. Also adding buttons for setting all tracks
or all visible tracks to a visibility. While at it, making a change
to the js-query-library function (inversed the order of arguments) which was requested months ago by
Brian, but I forgot to make the change after code review. Also
shortening the "source data version" label to just "version". refs #36917.

I changed the library function
hTvDropDownClassVisOnlyAndExtra() rather than copying the code. This was
because I was hesitant to copy/paste all this code into a second
function, which would have been the only alternative, as the function
cannot be reused as-is. So I modified the function to return the list of
visibilities. It's never clear whether it's better to modify
functions or copy/paste code.
here, not breaking the function into smaller parts, so copy/pasting it, would risk
requiring more future copy/pasted code. But the risk is to break existing
tracks.

diff --git src/lib/common.c src/lib/common.c
index 756bf50236b..7774a64c1fa 100644
--- src/lib/common.c
+++ src/lib/common.c
@@ -65,30 +65,38 @@
 }
 
 char *catThreeStrings(char *a, char *b, char *c)
 /* Allocate new string that is a concatenation of three strings. */
 {
 int aLen = strlen(a), bLen = strlen(b), cLen = strlen(c);
 int len = aLen + bLen + cLen; 
 char *newBuf = needLargeMem(len+1);
 memcpy(newBuf, a, aLen);
 memcpy(newBuf+aLen, b, bLen);
 memcpy(newBuf+aLen+bLen, c, cLen);
 newBuf[len] = 0;
 return newBuf;
 }
 
+/* count elements of a NULL-terminated array */
+int arrNullLen(char **arr)
+{
+    int n = 0;
+    while (arr[n]) n++;
+    return n;
+}
+
 /* Reverse the order of the bytes. */
 void reverseBytes(char *bytes, long length)
 {
 long halfLen = (length>>1);
 char *end = bytes+length;
 char c;
 while (--halfLen >= 0)
     {
     c = *bytes;
     *bytes++ = *--end;
     *end = c;
     }
 }
 
 void reverseInts(int *a, int length)