aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2004-09-24 20:56:25 +0000
committerLev Walkin <vlm@lionet.info>2004-09-24 20:56:25 +0000
commit938c6feae864c5488670cf4496aef72a4f6dd589 (patch)
tree0c18f68510981b805ec44c412c264ef47b158806
parent35d446bc00919da45174d1644046594e10639366 (diff)
pretty-printing
-rw-r--r--skeletons/BIT_STRING.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/skeletons/BIT_STRING.c b/skeletons/BIT_STRING.c
index c3788d83..274dec9b 100644
--- a/skeletons/BIT_STRING.c
+++ b/skeletons/BIT_STRING.c
@@ -107,11 +107,13 @@ BIT_STRING_encode_xer(asn1_TYPE_descriptor_t *td, void *sptr,
p += 8;
}
- er.encoded += p - scratch;
if(!xcan && (((buf - st->buf) - 1) % 8) == 0)
_i_ASN_TEXT_INDENT(1, ilevel);
+ er.encoded += p - scratch;
+ _ASN_CALLBACK(scratch, p - scratch);
+ p = scratch;
- if(buf < end + 1) {
+ if(buf == end) {
int v = *buf;
int mbit = st->buf[0]; /* bits to skip from the right */
int i;
@@ -121,8 +123,7 @@ BIT_STRING_encode_xer(asn1_TYPE_descriptor_t *td, void *sptr,
_ASN_CALLBACK(scratch, p - scratch);
}
- if(!xcan && ((st->size - 1) % 8) == 0)
- _i_ASN_TEXT_INDENT(1, ilevel - 1);
+ if(!xcan) _i_ASN_TEXT_INDENT(1, ilevel - 1);
return er;
}