allowed_input_view_only = NULL;
void initialize_allowed_input(void) {	char *str;	if (allowed_input_normal) {		free(allowed_input_normal);	}	if (allowed_input_view_only) {		free(allowed_input_view_only);	}	if (! allowed_input_str) {		allowed_input_normal = strdup("KMB");		allowed_input_view_only = strdup("");	} else {		char *p, *str = strdup(allowed_input_str);		p = strchr(str, ',');		if (p) {			allowed_input_view_only = strdup(p+1);			*p = '\0';			allowed_input_normal = strdup(str);		} else {			allowed_input_normal = strdup(str);			allowed_input_view_only = strdup("");		}		free(str);	}	/* shorten them */	str = short_kmb(allowed_input_normal);	free(allowed_input_normal);	allowed_input_normal = str;	str = short_kmb(allowed_input_view_only);	free(allowed_input_view_only);	allowed_input_view_only = str;	if (screen) {		rfbClientIteratorPtr iter;		rfbClientPtr cl;		iter = rfbGetClientIterator(screen);		while( (cl = rfbClientIteratorNext(iter)) ) {			ClientData *cd = (ClientData *) cl->clientData;			if (cd->input[0] == '=') {				;	/* custom setting */			} else if (cd->login_viewonly) {				if (*allowed_input_view_only != '\0') {					cl->viewOnly = FALSE;					cd->input[0] = '\0';					strncpy(cd->input,					    allowed_input_view_only, CILEN);				} else {					cl->viewOnly = TRUE;				}			} else {				if (allowed_input_normal) {					cd->input[0] = '\0';					strncpy(cd->input,					    allowed_input_normal, CILEN);				}			}		}		rfbReleaseClientIterator(iter);	}}