- }
- return r;
- case CCL_RPN_SET:
- r->which = Z_RPNStructure_simple;
- r->u.simple = odr_malloc(o, sizeof(Z_Operand));
- r->u.simple->which = Z_Operand_resultSetId;
- r->u.simple->u.resultSetId = odr_malloc(o, len =
- strlen(q->u.setname) + 1);
- memcpy(r->u.simple->u.resultSetId, q->u.setname, len);
- return r;
- case CCL_RPN_AND: case CCL_RPN_OR: case CCL_RPN_NOT:
- r->which = Z_RPNStructure_complex;
- r->u.complex = odr_malloc(o, sizeof(Z_Complex));
- if (!(r->u.complex->s1 = rpn2rpn(o, q->u.p[0])) ||
- !(r->u.complex->s2 = rpn2rpn(o, q->u.p[1])))
- return 0;
- r->u.complex->roperator = odr_malloc(o, sizeof(Z_Operator));
- r->u.complex->roperator->which = op[q->kind];
- r->u.complex->roperator->u.and = "";
- return r;
- default:
- gw_log(GW_LOG_FATAL, ZASS_TYPE, "Bad operator in RPN");
+ for (i = q->u.t.attr_list; i && num_attributes < 100; i = i->next)
+ {
+ Z_AttributeElement *a;
+
+ elements[num_attributes++] = a =
+ odr_malloc(o, sizeof(*a));
+ a->attributeType = odr_malloc(o, sizeof(int));
+ *a->attributeType = i->type;
+ a->attributeSet = 0;
+ a->which = Z_AttributeValue_numeric;
+ a->value.numeric = odr_malloc(o, sizeof(*a->value.numeric));
+ *a->value.numeric = i->value;
+ }
+#ifdef ASN_COMPILED
+ t->attributes->num_attributes = num_attributes;
+#else
+ t->num_attributes = num_attributes;
+#endif
+ return r;
+ case CCL_RPN_SET:
+ r->which = Z_RPNStructure_simple;
+ r->u.simple = odr_malloc(o, sizeof(Z_Operand));
+ r->u.simple->which = Z_Operand_resultSetId;
+ r->u.simple->u.resultSetId = odr_malloc(o, len =
+ strlen(q->u.setname) + 1);
+ memcpy(r->u.simple->u.resultSetId, q->u.setname, len);
+ return r;
+ case CCL_RPN_AND: case CCL_RPN_OR: case CCL_RPN_NOT:
+ r->which = Z_RPNStructure_complex;
+ r->u.complex = odr_malloc(o, sizeof(Z_Complex));
+ if (!(r->u.complex->s1 = rpn2rpn(o, q->u.p[0])) ||
+ !(r->u.complex->s2 = rpn2rpn(o, q->u.p[1])))