Okay, so like I said, you either need two different functions, one to return the string value and one to return the int value, and call the right one based on whether you're looking up "ROTATION" or "FORMAT", or you only have a get_str_val function that returns the string version of the value, and if the key was "ROTATION", you convert the string to a number using strtol.
Code:
int rotation_value;
char *format_value;
if key is "ROTATION"
rotation_value = get_int_val(key);
else if key is "FORMAT"
format_value = get_str_val(key);
or
Code:
char *str_value;
int rotation_value;
char *format_value;
str_value = get_str_val(key);
if key is "ROTATION"
rotation_value = strtol(key, ...);
else if key is "FORMAT"
format_value = str_value;