rem: buffer = wstrappend(buffer, "M1+");
add: buffer = appendrealloc(buffer, "M1+");
context: GetShortcutString(char *text){    char *buffer = NULL;    char *k;    int modmask = 0;/*    KeySym ksym;*/    int control = 0;    char *tmp;        tmp = text = wstrdup(text);    /* get modifiers */    while ((k = strchr(text, '+'))!=NULL) {	int mod;		*k = 0;	mod = wXModifierFromKey(text);	if (mod<0) {	    return wstrdup("bug");	}			modmask |= mod;		if (strcasecmp(text, "Meta")==0) {	    buffer = wstrappend(buffer, "M+");	} else if (strcasecmp(text, "Alt")==0) {	    buffer = wstrappend(buffer, "A+");	} else if (strcasecmp(text, "Shift")==0) {	    buffer = wstrappend(buffer, "Sh+");	} else if (strcasecmp(text, "Mod1")==0) {	    buffer = wstrappend(buffer, "M1+"); 	} else if (strcasecmp(text, "Mod2")==0) {	    buffer = wstrappend(buffer, "M2+"); 	} else if (strcasecmp(text, "Mod3")==0) {	    buffer = wstrappend(buffer, "M3+");	} else if (strcasecmp(text, "Mod4")==0) {	    buffer = wstrappend(buffer, "M4+"); 	} else if (strcasecmp(text, "Mod5")==0) {	    buffer = wstrappend(buffer, "M5+"); 	} else if (strcasecmp(text, "Control")==0) {	    control = 1;	} else {	    buffer = wstrappend(buffer, text);	}	text = k+1;    }    if (control) {	buffer = wstrappend(buffer, "^");    }    buffer = wstrappend(buffer, text);        /* get key *//*    ksym = XStringToKeysym(text);    tmp = keysymToString(ksym, modmask);    puts(tmp);    buffer = wstrappend(buffer, tmp);*/    free(tmp);    return buffer;}