]> git.stg.codes - stg.git/blobdiff - libs/smux/constr_SEQUENCE_OF.c
Some rscriptd refactoring.
[stg.git] / libs / smux / constr_SEQUENCE_OF.c
index aa101176d649ee2b26e3616e88197d9488991bb2..8a08ee8aa16a0dc5a419d3753c690b73511198de 100644 (file)
@@ -52,7 +52,7 @@ SEQUENCE_OF_encode_der(asn_TYPE_descriptor_t *td, void *ptr,
        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);
@@ -101,7 +101,7 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
        int xcan = (flags & XER_F_CANONICAL);
        int i;
 
-       if(!sptr) _ASN_ENCODE_FAILED;
+       if(!sptr) ASN__ENCODE_FAILED;
 
        er.encoded = 0;
 
@@ -111,8 +111,8 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
                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,
@@ -121,23 +121,23 @@ SEQUENCE_OF_encode_xer(asn_TYPE_descriptor_t *td, void *sptr,
                 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
@@ -149,7 +149,7 @@ SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
        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;
@@ -170,17 +170,17 @@ SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
                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;) {
@@ -190,19 +190,19 @@ SEQUENCE_OF_encode_uper(asn_TYPE_descriptor_t *td,
                        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);
 }