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

@ -278,6 +278,12 @@ enum object_type {
OBJ_BAD,
};
extern signed char hexval_table[256];
static inline unsigned int hexval(unsigned int c)
{
return hexval_table[c];
}
/* Convert to/from hex/sha1 representation */
#define MINIMUM_ABBREV 4
#define DEFAULT_ABBREV 7