Make hexval() available to others.

builtin-mailinfo.c has its own hexval implementaiton but it can
share the table-lookup one recently implemented in sha1_file.c

Signed-off-by: Junio C Hamano <junkio@cox.net>
This commit is contained in:
Junio C Hamano
2006-09-20 16:04:46 -07:00
parent 62e27f273d
commit e49521b56d
3 changed files with 40 additions and 49 deletions

View File

@ -451,17 +451,6 @@ static int read_one_header_line(char *line, int sz, FILE *in)
return ofs;
}
static unsigned hexval(int c)
{
if (c >= '0' && c <= '9')
return c - '0';
if (c >= 'a' && c <= 'f')
return c - 'a' + 10;
if (c >= 'A' && c <= 'F')
return c - 'A' + 10;
return ~0;
}
static int decode_q_segment(char *in, char *ot, char *ep, int rfc2047)
{
int c;