aboutsummaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2006-09-20 16:04:46 -0700
committerJunio C Hamano <junkio@cox.net>2006-09-20 16:08:14 -0700
commite49521b56d8715f46b93ee6bc95f7de9c6858365 (patch)
tree3303de68046e01531ea03e0efa2006a754ce4f27 /cache.h
parent62e27f273d66afa996cb7aee6cdb25fbedc053f6 (diff)
downloadgit-e49521b56d8715f46b93ee6bc95f7de9c6858365.tar.gz
git-e49521b56d8715f46b93ee6bc95f7de9c6858365.tar.xz
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>
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/cache.h b/cache.h
index 57db7c9b2..d557e75eb 100644
--- a/cache.h
+++ b/cache.h
@@ -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