From 9a59cee745755cb8c2e85f0f3067158a1f612747 Mon Sep 17 00:00:00 2001 From: Tim Schubert <mail@timschubert.net> Date: Mon, 29 Oct 2018 10:38:32 +0100 Subject: [PATCH] Add documentation for bstr --- netcalc.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/netcalc.c b/netcalc.c index e2b0103..94b23d2 100644 --- a/netcalc.c +++ b/netcalc.c @@ -155,6 +155,9 @@ void report_error(char *buf, unsigned long buflen, char *msg) { sprintf(buf, "%s\n", msg); } +/// Converts an integer into a string representation of its binary encoding +/// @param n an integer +/// @param out stores the resulting string void bstr(unsigned int n, char **out) { // voodoo int msb = 32 - __builtin_clz(n);