ce138738e24cb6e84502440b79490c412f6786f8 max Tue Jan 27 03:13:16 2026 -0800 Reapply "changing superTrack TrackUi quite a bit. This reverts commit e6ee88658405177aee46ddb8902ae93aee5b1378. 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)