htoi - hex to int