mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
g10/ does build again.
This commit is contained in:
parent
11544e7184
commit
fbe4ac37f6
52 changed files with 989 additions and 261 deletions
|
@ -998,34 +998,6 @@ percent_escape (const char *src)
|
|||
}
|
||||
|
||||
|
||||
/* Convert two hexadecimal digits from STR to the value they
|
||||
represent. Returns -1 if one of the characters is not a
|
||||
hexadecimal digit. */
|
||||
static int
|
||||
hextobyte (const char *str)
|
||||
{
|
||||
int val = 0;
|
||||
int i;
|
||||
|
||||
#define NROFHEXDIGITS 2
|
||||
for (i = 0; i < NROFHEXDIGITS; i++)
|
||||
{
|
||||
if (*str >= '0' && *str <= '9')
|
||||
val += *str - '0';
|
||||
else if (*str >= 'A' && *str <= 'F')
|
||||
val += 10 + *str - 'A';
|
||||
else if (*str >= 'a' && *str <= 'f')
|
||||
val += 10 + *str - 'a';
|
||||
else
|
||||
return -1;
|
||||
if (i < NROFHEXDIGITS - 1)
|
||||
val *= 16;
|
||||
str++;
|
||||
}
|
||||
return val;
|
||||
}
|
||||
|
||||
|
||||
|
||||
/* Percent-Deescape special characters. The string is valid until the
|
||||
next invocation of the function. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue