From fb624d04e56018defe297eff1d88888b192caeaa Mon Sep 17 00:00:00 2001 From: Lennart Poettering Date: Thu, 28 Jan 2010 06:45:04 +0100 Subject: add new hexchar() call --- util.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'util.c') 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]; +} -- cgit v1.2.3-54-g00ecf