Extract the function bitcount to a separate module
diff --git a/lens_default.c b/lens_default.c
index 26ba22e..e0c0566 100644
--- a/lens_default.c
+++ b/lens_default.c
@@ -29,6 +29,7 @@
#include <stdio.h>
#include <string.h>
+#include "bits.h"
#include "proc.h"
#include "lens_default.h"
#include "value.h"
@@ -608,15 +609,6 @@
return fprintf(stream, "%zd-%zd", low, high);
}
-static unsigned
-bitcount(unsigned u)
-{
- int c = 0;
- for (; u > 0; u &= u - 1)
- c++;
- return c;
-}
-
static int
bitvect_lens_format_cb(struct lens *lens, FILE *stream,
struct value *value, struct value_dict *arguments)