1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

Put in the basic wiring (just hextobyte for now) for a libcompat.a that

can contain replacement files that can be linked to keyserver helpers
without bringing in the whole libutil.a.  libutil.a contains a complete 
copy of libcompat.a so we only need to link to one of them.
This commit is contained in:
David Shaw 2006-09-28 19:36:55 +00:00
parent 61765b20e6
commit b17fcc5d51
12 changed files with 64 additions and 59 deletions

View file

@ -549,28 +549,3 @@ curl_writer_finalize(struct curl_writer_ctx *ctx)
ctx->flags.done=1;
}
}
int
ks_hextobyte (const char *s)
{
int c;
if ( *s >= '0' && *s <= '9' )
c = 16 * (*s - '0');
else if ( *s >= 'A' && *s <= 'F' )
c = 16 * (10 + *s - 'A');
else if ( *s >= 'a' && *s <= 'f' )
c = 16 * (10 + *s - 'a');
else
return -1;
s++;
if ( *s >= '0' && *s <= '9' )
c += *s - '0';
else if ( *s >= 'A' && *s <= 'F' )
c += 10 + *s - 'A';
else if ( *s >= 'a' && *s <= 'f' )
c += 10 + *s - 'a';
else
return -1;
return c;
}