rem: dot = strchr(name, '.'); if (dot==name) { *wclass = wstrdup(&name[1]); *winstance = NULL; } else if (!dot) { *winstance = wstrdup(name); *wclass = NULL; } else { *dot = 0; *winstance = wstrdup(name); *dot = '.';  *wclass = wstrdup(&dot[1]); }
add: UnescapeWM_CLASS(name, winstance, wclass);
context: ParseWindowName(proplist_t value, char **winstance, char **wclass, char *where){    char *name;    char *dot;    *winstance = *wclass = NULL;    if (!PLIsString(value)) {	wwarning(_("bad window name value in %s state info"), where);	return;    }    name = PLGetString(value);    if (!name || strlen(name)==0) {	wwarning(_("bad window name value in %s state info"), where);	return;    }    dot = strchr(name, '.');    if (dot==name) {	*wclass = wstrdup(&name[1]);	*winstance = NULL;    } else if (!dot) {	*winstance = wstrdup(name);	*wclass = NULL;    } else {	*dot = 0;	*winstance = wstrdup(name);	*dot = '.'; /* restore old string */	*wclass = wstrdup(&dot[1]);    }}