hex to integer in C