diff options
-rw-r--r-- | util.c | 6 | ||||
-rw-r--r-- | util.h | 2 |
2 files changed, 8 insertions, 0 deletions
@@ -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]; +} @@ -105,4 +105,6 @@ int reset_all_signal_handlers(void); char *strstrip(char *s); char *file_in_same_dir(const char *path, const char *filename); +char hexchar(int x); + #endif |