Why not just:
Code:
int number_input()
{
  result = inkey(s_t_input);
  if(result == 13)
  {
    return(str_to_int(s_t_input));
  }
}