aboutsummaryrefslogtreecommitdiffstats
path: root/libasn1compiler
diff options
context:
space:
mode:
authorLev Walkin <vlm@lionet.info>2013-10-11 14:29:38 -0700
committerLev Walkin <vlm@lionet.info>2013-10-11 14:29:38 -0700
commit4062b01cd5bf6c5b616065a42e56abfa00e2a139 (patch)
tree845e7d65b25134d0acb7999ff9e9a59dbfe2a9a7 /libasn1compiler
parent214203349309e4e3f158eb773d498a4312ded43c (diff)
add -fline-refs
Diffstat (limited to 'libasn1compiler')
-rw-r--r--libasn1compiler/asn1c_C.c9
-rw-r--r--libasn1compiler/asn1compiler.h11
2 files changed, 13 insertions, 7 deletions
diff --git a/libasn1compiler/asn1c_C.c b/libasn1compiler/asn1c_C.c
index b9f994c7..95ff1f3c 100644
--- a/libasn1compiler/asn1c_C.c
+++ b/libasn1compiler/asn1c_C.c
@@ -1670,11 +1670,12 @@ emit_tag2member_map(arg_t *arg, tag2el_t *tag2el, int tag2el_count, const char *
OUT("%d, ", tag2el[i].el_no);
OUT("%d, ", tag2el[i].toff_first);
OUT("%d ", tag2el[i].toff_last);
- OUT("}%s /* %s at %d */\n",
+ OUT("}%s /* %s",
(i + 1 < tag2el_count) ? "," : "",
- tag2el[i].from_expr->Identifier,
- tag2el[i].from_expr->_lineno
- );
+ tag2el[i].from_expr->Identifier);
+ if(arg->flags & A1C_LINE_REFS)
+ OUT("at %d", tag2el[i].from_expr->_lineno);
+ OUT(" */\n");
}
OUT("};\n");
diff --git a/libasn1compiler/asn1compiler.h b/libasn1compiler/asn1compiler.h
index a19f147f..827bc924 100644
--- a/libasn1compiler/asn1compiler.h
+++ b/libasn1compiler/asn1compiler.h
@@ -60,19 +60,24 @@ enum asn1c_flags {
* -gen-PER
* Generate PER support code
*/
- A1C_GEN_PER = 0x1000,
+ A1C_GEN_PER = 0x1000,
/*
* -pdu={all|auto|Type}
* Generate PDU table
*/
- A1C_PDU_ALL = 0x2000,
+ A1C_PDU_ALL = 0x2000,
A1C_PDU_AUTO = 0x4000,
A1C_PDU_TYPE = 0x8000,
/*
* -fincludes-quoted
* Avoid generating #include <foo>, generate "foo" instead.
*/
- A1C_INCLUDES_QUOTED = 0x10000
+ A1C_INCLUDES_QUOTED = 0x10000,
+ /*
+ * -fline-refs
+ * Include ASN.1 module's line numbers in comments.
+ */
+ A1C_LINE_REFS = 0x20000
};
/*