+static void add_var (const char *name)
+{
+ outbuf = realloc (outbuf, (++outcount) * sizeof (var_t));
+ outbuf[outcount - 1].seen = 0;
+ outbuf[outcount - 1].name = strdup (name);
+ outbuf[outcount - 1].descr = NULL;
+}
+
+static int add (const char *s)
+{
+ size_t lnew = STRLEN (s), lold = STRLEN (outbuf[outcount - 1].descr);
+
+ if (lnew == 0)
+ return (0);
+ if (!outbuf[outcount - 1].seen) {
+ lold = 0;
+ outbuf[outcount - 1].seen = 1;
+ }
+
+ if (lold == 0)
+ outbuf[outcount - 1].descr = strdup (s);
+ else {
+ outbuf[outcount - 1].descr =
+ realloc (outbuf[outcount - 1].descr, lold + lnew + 1);
+ memcpy (&(outbuf[outcount - 1].descr[lold - 1]) + 1, s, lnew);
+ }
+ outbuf[outcount - 1].descr[lold + lnew] = '\0';
+ return (1);
+}
+
+static int add_c (int c)
+{
+ char buf[2] = "\0\0";
+
+ buf[0] = c;
+ return (add (buf));
+}