Ok. Now I almost certain that:
(strcmp(opname,"~*")== 0 && isalpha((unsigned char)n->val.val.str[pos])))
should work for you. Can you confirm this?--Tatsuo Ishii