if (!verify_interface_declaration(interface)) return FALSE;
interface_declaration(TreeState *state) {    IDL_tree interface = state->tree;    IDL_tree iterator = NULL;    char *interface_name = IDL_IDENT(IDL_INTERFACE(interface).ident).str;    const char *iid = NULL;    /*     * Write out JavaDoc comment     */    fprintf(state->file, "\n/**\n * Interface %s\n", interface_name);#ifndef LIBIDL_MAJOR_VERSION    iid = IDL_tree_property_get(interface, "uuid");#else    iid = IDL_tree_property_get(IDL_INTERFACE(interface).ident, "uuid");#endif    if (iid != NULL) {        fprintf(state->file, " *\n * IID: 0x%s\n */\n\n", iid);    } else {        fputs(" */\n\n", state->file);    }    /*     * Write "public interface <foo>"     */    fprintf(state->file, "public interface %s ", interface_name);    /*     * Check for inheritence, and iterator over the inherited names,     * if any.     */    if ((iterator = IDL_INTERFACE(interface).inheritance_spec)) {        fputs("extends ", state->file);        do {            fprintf(state->file, "%s",                     IDL_IDENT(IDL_LIST(iterator).data).str);	                if (IDL_LIST(iterator).next) {                fputs(", ", state->file);            }        } while ((iterator = IDL_LIST(iterator).next));    }    fputs("\n{\n", state->file);        if (iid) {        /*         * Write interface constants for IID         */        fputs("    public static final String ", state->file);        /* XXX s.b just "IID" ? */        if (!write_classname_iid_define(state->file, interface_name)) {            return FALSE;        }        fprintf(state->file, "_STRING =\n        \"%s\";\n\n", iid);        fputs("    public static final nsID ", state->file);        /* XXX s.b just "IID" ? */        if (!write_classname_iid_define(state->file, interface_name)) {            return FALSE;        }        fprintf(state->file, " =\n        new nsID(\"%s\");\n\n", iid);    }    /*     * Advance the state of the tree, go on to process more     */        state->tree = IDL_INTERFACE(interface).body;    if (state->tree && !xpidl_process_node(state)) {        return FALSE;    }    fputs("\n}\n", state->file);    return TRUE;}