7cdced87bd7680c51b327560aff3bb3cf414733a max Sat Oct 23 08:59:02 2021 -0700 Fixing the broken build for max, some little bits not checked in. diff --git src/lib/common.c src/lib/common.c index 68c27bc..4547e7c 100644 --- src/lib/common.c +++ src/lib/common.c @@ -52,30 +52,43 @@ return cloneMem(s, size+1); } char *catTwoStrings(char *a, char *b) /* Allocate new string that is a concatenation of two strings. */ { int aLen = strlen(a), bLen = strlen(b); int len = aLen + bLen; char *newBuf = needLargeMem(len+1); memcpy(newBuf, a, aLen); memcpy(newBuf+aLen, b, bLen); newBuf[len] = 0; return newBuf; } +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; +} + /* 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)