if (dec->user_id != NULL) { key_hint = (char *)xmalloc (17 + strlen (dec->user_id) + 32); if (strchr (s, '<') && strchr (s, '>')) stop_char = '<'; else if (strchr (s, '(') && strchr (s, ')')) stop_char = '('; while (s && *s != stop_char) key_hint[i++] = *s++; key_hint[i++] = ' '; sprintf (key_hint+i, "(0x%s)", dec->keyid+8);
key_hint = xmalloc (17 + strlen (s) + strlen (dec->keyid) + 32); if (strchr (s, '<') && strchr (s, '>')) stop_char = '<'; else if (strchr (s, '(') && strchr (s, ')')) stop_char = '('; else stop_char = 0; while (*s != stop_char) key_hint[i++] = *s++; key_hint[i++] = ' '; if (dec->keyid && strlen (dec->keyid) > 8) sprintf (key_hint+i, "(0x%s)", dec->keyid+8); else key_hint[i] = 0;
set_key_hint (struct decrypt_key_s * dec, HWND dlg, int ctrlid){    const char *s = dec->user_id;    char *key_hint;    char stop_char=0;    size_t i=0;    if (dec->user_id != NULL) {	key_hint = (char *)xmalloc (17 + strlen (dec->user_id) + 32);	if (strchr (s, '<') && strchr (s, '>'))	    stop_char = '<';	else if (strchr (s, '(') && strchr (s, ')'))	    stop_char = '(';	while (s && *s != stop_char)	    key_hint[i++] = *s++;	key_hint[i++] = ' ';	sprintf (key_hint+i, "(0x%s)", dec->keyid+8);    }    else	key_hint = xstrdup ("No key hint given.");    SendDlgItemMessage (dlg, ctrlid, CB_ADDSTRING, 0, 			(LPARAM)(const char *)key_hint);    SendDlgItemMessage (dlg, ctrlid, CB_SETCURSEL, 0, 0);    xfree (key_hint);}