summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'util.c')
-rw-r--r--util.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/util.c b/util.c
index 654b93d79c..b166f328b2 100644
--- a/util.c
+++ b/util.c
@@ -547,3 +547,9 @@ char *file_in_same_dir(const char *path, const char *filename) {
return r;
}
+
+char hexchar(int x) {
+ static const char table[16] = "0123456789abcdef";
+
+ return table[x & 15];
+}