b256544b9c25218b0f36b88ef26f1d4a4179e156 markd Sun Oct 14 21:47:44 2018 -0700 make common.h more C++ friendly diff --git src/lib/common.c src/lib/common.c index da64277..fea1e5b 100644 --- src/lib/common.c +++ src/lib/common.c @@ -1618,40 +1618,40 @@ char *strUpper(char *s) /* Convert entire string to upper case. */ { char c; char *ss=s; for (;;) { if ((c = *ss) == 0) break; *ss++ = toupper(c); } return s; } -void replaceChar(char *s, char old, char new) +void replaceChar(char *s, char oldc, char newc) /* Repace one char with another. Modifies original string. */ { if (!s) return; char c; while((c=*s)) { - if (c == old) - *s = new; + if (c == oldc) + *s = newc; ++s; } } char *replaceChars(char *string, char *old, char *new) /* Replaces the old with the new. The old and new string need not be of equal size Can take any length string. Return value needs to be freeMem'd. */ { int numTimes = 0; int oldLen = strlen(old); int newLen = strlen(new); int strLen = 0;