+ /* match the next entry after i */
+ i = hmatch_r("", i, &match, &env_htab);
+ if (i == 0)
+ goto done;
+ buflen = strlen(match->key) + strlen(match->data) + 2;
+ var = realloc(var, buflen);
+ snprintf(var, buflen, "%s=%s", match->key, match->data);
+ *next = var;
+ return 0;
+
+done:
+ free(var);
+ var = NULL;
+ *next = NULL;
+ return i;
+}
+
+/*
+ * pseudo signature:
+ *
+ * int API_display_get_info(int type, struct display_info *di)
+ */
+static int API_display_get_info(va_list ap)
+{
+ int type;
+ struct display_info *di;
+
+ type = va_arg(ap, int);
+ di = va_arg(ap, struct display_info *);
+
+ return display_get_info(type, di);
+}
+
+/*
+ * pseudo signature:
+ *
+ * int API_display_draw_bitmap(ulong bitmap, int x, int y)
+ */
+static int API_display_draw_bitmap(va_list ap)
+{
+ ulong bitmap;
+ int x, y;
+
+ bitmap = va_arg(ap, ulong);
+ x = va_arg(ap, int);
+ y = va_arg(ap, int);
+
+ return display_draw_bitmap(bitmap, x, y);
+}
+
+/*
+ * pseudo signature:
+ *
+ * void API_display_clear(void)
+ */
+static int API_display_clear(va_list ap)
+{
+ display_clear();