diff options
Diffstat (limited to 'libasn1print')
-rw-r--r-- | libasn1print/asn1print.c | 22 |
1 files changed, 14 insertions, 8 deletions
diff --git a/libasn1print/asn1print.c b/libasn1print/asn1print.c index de7fcf90..86175f1d 100644 --- a/libasn1print/asn1print.c +++ b/libasn1print/asn1print.c @@ -508,6 +508,16 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri if(flags & APF_LINE_COMMENTS && !(flags & APF_NOINDENT)) INDENT("-- #line %d\n", tc->_lineno); + + /* Reconstruct compiler directive information */ + if((tc->marker.flags & EM_INDIRECT) + && (tc->marker.flags & EM_OMITABLE) != EM_OMITABLE) { + if((flags & APF_NOINDENT)) + printf(" --<ASN1C.RepresentAsPointer>-- "); + else + INDENT("--<ASN1C.RepresentAsPointer>--\n"); + } + if(tc->Identifier) INDENT("%s", tc->Identifier); @@ -623,15 +633,11 @@ asn1print_expr(asn1p_t *asn, asn1p_module_t *mod, asn1p_expr_t *tc, enum asn1pri == EM_OPTIONAL) { printf(" OPTIONAL"); } - if(TQ_NEXT(se, next)) + if(TQ_NEXT(se, next)) { printf(","); - /* Reconstruct modifier information */ - if((se->marker.flags & EM_OMITABLE) - != EM_OMITABLE - && se->marker.flags & EM_INDIRECT) - printf("\t/* <asn1c:pointer> */"); - if(TQ_NEXT(se, next) && !(flags & APF_NOINDENT)) - INDENT("\n"); + if(!(flags & APF_NOINDENT)) + INDENT("\n"); + } } if(put_braces && TQ_FIRST(&tc->members)) { |