strcpy(cp, buf); if(term->screen.logfile) free(term->screen.logfile); term->screen.logfile = cp; #else
} #endif
do_osc(Char *oscbuf, int len GCC_UNUSED){	register int mode;	register Char *cp;	int state = 0;	char *buf = 0;	/*	 * lines should be of the form <OSC> number ; string <ST>	 */	mode = 0;	for (cp = oscbuf; *cp != '\0'; cp++) {		switch (state) {		case 0:			if (isdigit(*cp)) {				mode = 10 * mode + (*cp - '0');				break;			}			/* FALLTHRU */		case 1:			if (*cp != ';')				return;			state = 2;			break;		case 2:			buf = (char *)cp;			state = 3;			/* FALLTHRU */		default:			if (!isprint(*cp & 0x7f))				return;		}	}	switch(mode) {	case 0:	/* new icon name and title*/		Changename(buf);		Changetitle(buf);		break;	case 1:	/* new icon name only */		Changename(buf);		break;	case 2:	/* new title only */		Changetitle(buf);		break;        case 10:       case 11:        case 12:        case 13:       case 14:        case 15:        case 16:               {                   if (term->misc.dynamicColors)                       ChangeColorsRequest(term,mode-10,buf);               }               break;#ifdef ALLOWLOGGING	 case 46:	/* new log file */#ifdef ALLOWLOGFILECHANGES		/*		 * Warning, enabling this feature allows people to overwrite		 * arbitrary files accessible to the person running xterm.		 */		if((cp = malloc((unsigned)strlen(buf) + 1)) == NULL)			break;		strcpy(cp, buf);		if(term->screen.logfile)			free(term->screen.logfile);		term->screen.logfile = cp;#else		Bell(XkbBI_Info,0);		Bell(XkbBI_Info,0);#endif		break;#endif /* ALLOWLOGGING */	case 50:		SetVTFont (fontMenu_fontescape, True, buf, NULL);		break;	/*	 * One could write code to send back the display and host names,	 * but that could potentially open a fairly nasty security hole.	 */	}}