fputs(subscriptIdentifier(state, ident_str), FILENAME(state));
fputs(subscriptIdentifier(state, (char*) ident_str), FILENAME(state));
xpcom_to_java_type (TreeState *state) {    if (!state->tree) {        fputs("Object", FILENAME(state));        return TRUE;    }    switch(IDL_NODE_TYPE(state->tree)) {    case IDLN_TYPE_INTEGER: {        switch(IDL_TYPE_INTEGER(state->tree).f_type) {        case IDL_INTEGER_TYPE_SHORT:            fputs("short", FILENAME(state));            break;        case IDL_INTEGER_TYPE_LONG:            fputs("int", FILENAME(state));            break;        case IDL_INTEGER_TYPE_LONGLONG:            fputs("long", FILENAME(state));            break;	            default:            g_error("   Unknown integer type: %d\n",                    IDL_TYPE_INTEGER(state->tree).f_type);            return FALSE;        }        break;    }    case IDLN_TYPE_CHAR:    case IDLN_TYPE_WIDE_CHAR:        fputs("char", FILENAME(state));        break;    case IDLN_TYPE_WIDE_STRING:    case IDLN_TYPE_STRING:        fputs("String", FILENAME(state));        break;    case IDLN_TYPE_BOOLEAN:        fputs("boolean", FILENAME(state));        break;    case IDLN_TYPE_OCTET:        fputs("byte", FILENAME(state));        break;    case IDLN_TYPE_FLOAT:        switch(IDL_TYPE_FLOAT(state->tree).f_type) {        case IDL_FLOAT_TYPE_FLOAT:            fputs("float", FILENAME(state));            break;        case IDL_FLOAT_TYPE_DOUBLE:            fputs("double", FILENAME(state));            break;	            default:            g_error("    Unknown floating point typ: %d\n",                    IDL_NODE_TYPE(state->tree));            break;        }        break;    case IDLN_IDENT:        if (IDL_NODE_UP(state->tree) &&            IDL_NODE_TYPE(IDL_NODE_UP(state->tree)) == IDLN_NATIVE) {            const char *user_type = IDL_NATIVE(IDL_NODE_UP(state->tree)).user_type;            const char *ident_str = IDL_IDENT(IDL_NATIVE(IDL_NODE_UP(state->tree)).ident).str;            if (strcmp(user_type, "void") == 0) { /*it should not happend for scriptable methods*/                fputs("Object", FILENAME(state));            }            /* XXX: s.b test for "id" attribute */            /* XXX: special class for nsIDs */            else if (strcmp(user_type, "nsID") == 0) {                fputs("ID", FILENAME(state));            } else if (strcmp(user_type, "nsIID") == 0) {                fputs("IID", FILENAME(state));            } else if (strcmp(user_type, "nsCID") == 0) {                 fputs("CID", FILENAME(state));            }            else {                /* XXX: special class for opaque types */                /*it should not happend for scriptable methods*/                fputs("OpaqueValue", FILENAME(state));             }        } else {            const char *ident_str = IDL_IDENT(state->tree).str;            /* XXX: big kludge; s.b. way to match to typedefs */            if (strcmp(ident_str, "PRInt8") == 0 ||                strcmp(ident_str, "PRUint8") == 0) {                fputs("byte", FILENAME(state));            }            else if (strcmp(ident_str, "PRInt16") == 0 ||                     strcmp(ident_str, "PRUint16") == 0) {                fputs("short", FILENAME(state));            }            else if (strcmp(ident_str, "PRInt32") == 0 ||                     strcmp(ident_str, "PRUint32") == 0) {                fputs("int", FILENAME(state));            }            else if (strcmp(ident_str, "PRInt64") == 0 ||                     strcmp(ident_str, "PRUint64") == 0) {                fputs("long", FILENAME(state));            }            else if (strcmp(ident_str, "PRBool") == 0) {                fputs("boolean", FILENAME(state));            }            else if (strcmp(ident_str, "nsrefcnt") == 0) {                fputs("int", FILENAME(state));            }            else {                IDL_tree real_type =                     g_hash_table_lookup(TYPEDEFS(state), ident_str);                if (real_type) {                    IDL_tree orig_tree = state->tree;                    state->tree = real_type;                    xpcom_to_java_type(state);                    state->tree = orig_tree;                }                else {                    fputs(subscriptIdentifier(state, ident_str), FILENAME(state));                }            }        }        break;    case IDLN_TYPE_ENUM:    case IDLN_TYPE_OBJECT:    default:        g_error("    Unknown type: %d\n",                IDL_TYPE_FLOAT(state->tree).f_type);        break;    }    return TRUE;}