computed_size += encoding_size;
if(!cb) {
erval.encoded = computed_size;
- _ASN_ENCODED_OK(erval);
+ ASN__ENCODED_OK(erval);
}
ASN_DEBUG("Encoding members of SEQUENCE OF %s", td->name);
int xcan = (flags & XER_F_CANONICAL);
int i;
- if(!sptr) _ASN_ENCODE_FAILED;
+ if(!sptr) ASN__ENCODE_FAILED;
er.encoded = 0;
if(!memb_ptr) continue;
if(mname) {
- if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel);
- _ASN_CALLBACK3("<", 1, mname, mlen, ">", 1);
+ if(!xcan) ASN__TEXT_INDENT(1, ilevel);
+ ASN__CALLBACK3("<", 1, mname, mlen, ">", 1);
}
tmper = elm->type->xer_encoder(elm->type, memb_ptr,
if(tmper.encoded == 0 && specs->as_XMLValueList) {
const char *name = elm->type->xml_tag;
size_t len = strlen(name);
- if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel + 1);
- _ASN_CALLBACK3("<", 1, name, len, "/>", 2);
+ if(!xcan) ASN__TEXT_INDENT(1, ilevel + 1);
+ ASN__CALLBACK3("<", 1, name, len, "/>", 2);
}
if(mname) {
- _ASN_CALLBACK3("</", 2, mname, mlen, ">", 1);
+ ASN__CALLBACK3("</", 2, mname, mlen, ">", 1);
er.encoded += 5;
}
er.encoded += (2 * mlen) + tmper.encoded;
}
- if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
+ if(!xcan) ASN__TEXT_INDENT(1, ilevel - 1);
- _ASN_ENCODED_OK(er);
+ ASN__ENCODED_OK(er);
cb_failed:
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
}
asn_enc_rval_t
asn_TYPE_member_t *elm = td->elements;
int seq;
- if(!sptr) _ASN_ENCODE_FAILED;
+ if(!sptr) ASN__ENCODE_FAILED;
list = _A_SEQUENCE_FROM_VOID(sptr);
er.encoded = 0;
if(ct->flags & APC_EXTENSIBLE) {
/* Declare whether size is in extension root */
if(per_put_few_bits(po, not_in_root, 1))
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
if(not_in_root) ct = 0;
} else if(not_in_root && ct->effective_bits >= 0)
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
}
if(ct && ct->effective_bits >= 0) {
/* X.691, #19.5: No length determinant */
if(per_put_few_bits(po, list->count - ct->lower_bound,
ct->effective_bits))
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
}
for(seq = -1; seq < list->count;) {
mayEncode = list->count;
} else {
mayEncode = uper_put_length(po, list->count - seq);
- if(mayEncode < 0) _ASN_ENCODE_FAILED;
+ if(mayEncode < 0) ASN__ENCODE_FAILED;
}
while(mayEncode--) {
void *memb_ptr = list->array[seq++];
- if(!memb_ptr) _ASN_ENCODE_FAILED;
+ if(!memb_ptr) ASN__ENCODE_FAILED;
er = elm->type->uper_encoder(elm->type,
elm->per_constraints, memb_ptr, po);
if(er.encoded == -1)
- _ASN_ENCODE_FAILED;
+ ASN__ENCODE_FAILED;
}
}
- _ASN_ENCODED_OK(er);
+ ASN__ENCODED_OK(er);
}