setParseWithComma (set **dest, char *src)
{
char *p;
+ int length;
/* skip the initial white spaces */
while (isspace(*src))
src++;
+ /* skip the trailing white spaces */
+ length = strlen(src);
+ while (length && isspace(src[length-1]))
+ src[--length] = '\0';
+
for (p = strtok(src, ","); p != NULL; p = strtok(NULL, ","))
addSet(dest, Safe_strdup(p));
}