Files
heimdal/lib
Nicolas Williams 07d4b1fc74 asn1: Add compiler --enum-prefix=PREFIX option
C enum labels have to be globally unique.  ASN.1 module ENUMERATED and
INTEGER types with named values are not globally unique.  This means
that ASN.1 integer type value names and enumerations can cause conflicts
when compiled to C.

This new option allows the user to specify a prefix to apply to such
names.  Then this:

    Foo ::= ENUMERATED { v1 (0) }

can generate:

    typedef enum Foo {
      prefix_v1 = 0,
    } Foo;

instead of

    typedef enum Foo {
      v1 = 0,
    } Foo;

which is very likely to conflict.

TBD: Add option to use the type name as the prefix?
2021-01-13 20:17:58 -06:00
..
2017-03-10 15:47:43 -05:00
2016-11-08 15:48:40 -05:00
2020-11-06 12:55:31 -05:00
2020-10-27 13:30:57 -05:00
2016-12-15 12:15:56 -06:00