about summary refs log tree commit diff
path: root/bitutil.c
diff options
context:
space:
mode:
authorsternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-08-21 00:27:10 +0200
committersternenseemann <0rpkxez4ksa01gb3typccl0i@systemli.org>2020-08-21 00:27:10 +0200
commitd87520f6a1cdb31526a4370bb06bb7cf7a993a35 (patch)
tree652ba912d37497c848c44a9f4fee26f93a4d68c5 /bitutil.c
parentaac560829418855192783680d2fa3f80f8b84013 (diff)
refactor(stringutil): add function catn_alloc to ease url building in main.c
* bitutil.{c,h} → stringutil.{c,h} (more appropriate)
  * new function catn_alloc(size_t n, ...)
    which concats `n` given strings into an dynamically allocated buffer,
    mostly useful for building URLs which is done in blog_rss.
    may be a possibility to use in entry.c, but code there might be too
    specific.
Diffstat (limited to 'bitutil.c')
-rw-r--r--bitutil.c25
1 files changed, 0 insertions, 25 deletions
diff --git a/bitutil.c b/bitutil.c
deleted file mode 100644
index 8b2807f..0000000
--- a/bitutil.c
+++ /dev/null
@@ -1,25 +0,0 @@
-char nibble_hex(short h) {
-    switch(h) {
-        case 0:
-        case 1:
-        case 2:
-        case 3:
-        case 4:
-        case 5:
-        case 6:
-        case 7:
-        case 8:
-        case 9:
-            return (h + 48);
-        case 10:
-        case 11:
-        case 12:
-        case 13:
-        case 14:
-        case 15:
-            return (h + 55);
-        default:
-            return 0;
-    }
-}
-