-static char *
-get_type (const Type *t, gboolean postfix_to_stars)
-{
- char *s;
- int i;
- int extra;
- GString *gs;
-
- s = remove_sep(t->name);
- gs = g_string_new(s);
- g_free(s);
-
- extra = 0;
- if (postfix_to_stars) {
- const char *p;
- /*XXX: this is ugly perhaps we can do this whole postfix thing
- in a nicer way, we just count the number of '[' s and from
- that we deduce the number of dimensions, so that we can print
- that many stars */
- for (p = t->postfix; p && *p; p++)
- if(*p == '[') extra++;
- }
- g_string_append_c(gs, ' ');
-
- if (t->pointer != NULL) {
- g_string_append (gs, t->pointer);
- for (i=0; i < extra; i++)
- g_string_append_c (gs, '*');
- g_string_append_c (gs, ' ');
- }
-
- s = gs->str;
- g_string_free (gs, FALSE);
- return s;
-}
-