int in; if (sscanf(p, "%d", &in) == 1) {
unsigned int in; if (sscanf(p, "%u", &in) == 1) {
void initialize_scroll_keys(void) {	char *str, *p;	int i, nkeys = 0, saw_builtin = 0;	int ks_max = 2 * 0xFFFF;	if (scroll_key_list) {		free(scroll_key_list);		scroll_key_list = NULL;	}	if (! scroll_key_list_str || *scroll_key_list_str == '\0') {		return;	}	if (strstr(scroll_key_list_str, "builtin")) {		int k;		/* add in number of keysyms builtin gives */		for (k=1; k<ks_max; k++)  {			if (xrecord_scroll_keysym((rfbKeySym) k)) {				nkeys++;			}		}	}	nkeys++;	/* first key, i.e. no commas. */	p = str = strdup(scroll_key_list_str);	while(*p) {		if (*p == ',') {			nkeys++;	/* additional key. */		}		p++;	}		nkeys++;	/* exclude/include 0 element */	nkeys++;	/* trailing NoSymbol */	scroll_key_list = (KeySym *)malloc(nkeys*sizeof(KeySym)); 	for (i=0; i<nkeys; i++) {		scroll_key_list[i] = NoSymbol;	}	if (*str == '-') {		scroll_key_list[0] = 1;		p = strtok(str+1, ",");	} else {		p = strtok(str, ",");	}	i = 1;	while (p) {		if (!strcmp(p, "builtin")) {			int k;			if (saw_builtin) {				p = strtok(NULL, ",");				continue;			}			saw_builtin = 1;			for (k=1; k<ks_max; k++)  {				if (xrecord_scroll_keysym((rfbKeySym) k)) {					scroll_key_list[i++] = (rfbKeySym) k;				}			}		} else {			int in;			if (sscanf(p, "%d", &in) == 1) {				scroll_key_list[i++] = (rfbKeySym) in;			} else if (sscanf(p, "0x%x", &in) == 1) {				scroll_key_list[i++] = (rfbKeySym) in;			} else if (XStringToKeysym(p) != NoSymbol) { 				scroll_key_list[i++] = XStringToKeysym(p);			} else {				rfbLog("initialize_scroll_keys: skip unknown "				    "keysym: %s\n", p);			}		}		p = strtok(NULL, ",");	}	free(str);}