XPTMode mode = cursor->state->mode;
XPT_DoConstDescriptor(XPTCursor *cursor, XPTConstDescriptor *cd){    XPTMode mode = cursor->state->mode;    PRBool ok = PR_FALSE;    if (!XPT_DoCString(cursor, &cd->name) ||        !XPT_DoTypeDescriptor(cursor, &cd->type)) {        return PR_FALSE;    }    switch(XPT_TDP_TAG(cd->type.prefix)) {      case TD_INT8:        ok = XPT_Do8(cursor, &cd->value.i8);        break;      case TD_INT16:        ok = XPT_Do16(cursor, &cd->value.i16);        break;      case TD_INT32:        ok = XPT_Do32(cursor, &cd->value.i32);        break;      case TD_INT64:        ok = XPT_Do64(cursor, &cd->value.i64);        break;      case TD_UINT8:        ok = XPT_Do8(cursor, &cd->value.ui8);        break;      case TD_UINT16:        ok = XPT_Do16(cursor, &cd->value.ui16);        break;      case TD_UINT32:        ok = XPT_Do32(cursor, &cd->value.ui32);        break;      case TD_UINT64:        ok = XPT_Do64(cursor, &cd->value.ui64);        break;      case TD_CHAR:        ok = XPT_Do8(cursor, &cd->value.ch);        break;      case TD_WCHAR:        ok = XPT_Do16(cursor, &cd->value.wch);        break;      case TD_PBSTR:        if (cd->type.prefix.flags & XPT_TDP_POINTER) {            ok = XPT_DoString(cursor, &cd->value.string);            break;        }        /* fall-through */      default:        fprintf(stderr, "illegal type!\n");        break;    }    return ok;}