len = strlen(mesg); if (mesg[len - 1] == '\n') mesg[--len] = '\0'; scriptlen = sizeof(ui_proc) + len + sizeof(proc_end);
string = ui_escape(mesg); if (string == NULL) return TCL_ERROR;  len = strlen(string); scriptlen = sizeof(ui_proc_start) + len + sizeof(ui_proc_end) - 1;
static int ui_info(Tcl_Interp *interp, char *mesg) {	const char ui_proc[] = "ui_info [list ";	const char proc_end[] = "]";	char *script, *p;	int scriptlen, len;	/* Nuke the trailing newline, if any */	len = strlen(mesg);	if (mesg[len - 1] == '\n')	  mesg[--len] = '\0';	scriptlen = sizeof(ui_proc) + len + sizeof(proc_end);	script = malloc(scriptlen);	if (script == NULL)		return TCL_ERROR;	else		p = script;	memcpy(script, ui_proc, sizeof(ui_proc));	memcpy(script + sizeof(ui_proc), mesg, len);	memcpy(script + sizeof(ui_proc) + len, proc_end, sizeof(proc_end));	return (Tcl_EvalEx(interp, script, scriptlen, 0));}