fprintf(state->file, "_STR \"%s\"\n\n/* {%s} */\n#define ", iid, iid);
fprintf(state->file, "_STR \"%s\"\n#define ", iid);
interface(TreeState *state){    IDL_tree iface = state->tree, iter;    char *className = IDL_IDENT(IDL_INTERFACE(iface).ident).str;    const char *iid;    fprintf(state->file, "/* starting interface %s */\n",            className);    iid = IDL_tree_property_get(iface, "uuid");    if (iid) {        char *iidName, *iidStruct;        /* XXX use nsID parsing routines to validate? */        if (strlen(iid) != 36)            /* XXX report error */            return FALSE;        fputs("#define ", state->file);        if (!output_classname_iid_define(state->file, className))            return FALSE;        fprintf(state->file, "_STR \"%s\"\n\n/* {%s} */\n#define ", iid, iid);        if (!output_classname_iid_define(state->file, className))            return FALSE;        /* This is such a gross hack... */        fprintf(state->file, " \\\n  {0x%.8s, 0x%.4s, 0x%.4s, \\\n    "                "{ 0x%.2s, 0x%.2s, 0x%.2s, 0x%.2s, "                "0x%.2s, 0x%.2s, 0x%.2s, 0x%.2s }}\n\n",                iid, iid + 9, iid + 14, iid + 19, iid + 21, iid + 24,                iid + 26, iid + 28, iid + 30, iid + 32, iid + 34);    }    fprintf(state->file, "class %s", className);    if ((iter = IDL_INTERFACE(iface).inheritance_spec)) {        fputs(" : ", state->file);        for (; iter; iter = IDL_LIST(iter).next) {            state->tree = IDL_LIST(iter).data;            fputs("public ", state->file);            if (!ident(state))                return FALSE;            if (IDL_LIST(iter).next)                fputs(", ", state->file);        }    }    fputs(" {\n public:", state->file);    state->tree = IDL_INTERFACE(iface).body;    if (!process_node(state))        return FALSE;    fprintf(state->file, "};\n");    return TRUE;}