/* Functions for manipulating Universal Resource Identifiers (URIs) as defined by  */
static int unescape_character(const char *scanner)
/* Functions for manipulating Universal Resource Identifiers (URIs) as defined by  */
static int unescape_character(const char *scanner)
{
  int first_digit;
  int second_digit;
  first_digit = g_ascii_xdigit_value (*scanner++);
  if (first_digit < 0)
    return -1;
  second_digit = g_ascii_xdigit_value (*scanner++);
  if (second_digit < 0)
    return -1;
  return (first_digit << 4) | second_digit;
}