Using the xtra.h header just for the arraysize macro is just added
complexity for downstream projects (who then need to ensure the xtra.h
header is distributed even if they don't otherwise need it).
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
-#include "xtra.h"
+
+#define ARRAYSIZE(x) (sizeof (x) / sizeof (x)[0])
static int compar_5arr(const void *key, const void *elem_)
{
if (!charset)
goto no_conv;
- m1 = bsearch(charset, t1, XTRA_ARRAYSIZE(t1), sizeof *t1, compar_5arr);
+ m1 = bsearch(charset, t1, ARRAYSIZE(t1), sizeof *t1, compar_5arr);
if (!m1)
goto no_conv;
charset += 5;