diff options
author | Björn Gustavsson <[email protected]> | 2015-03-12 10:42:08 +0100 |
---|---|---|
committer | Björn Gustavsson <[email protected]> | 2015-03-12 10:42:08 +0100 |
commit | 900276a573ea67039670a71c379f64ac938a4516 (patch) | |
tree | e81f2ee411fd704240e933f81f7d9a3bfb9bf87f /lib/asn1/src | |
parent | 306d7bc2282c8ff9545ae3a9e958b2746677958f (diff) | |
parent | 0796cb716511ae2bf35ee0ee1e0da75f20ad567f (diff) | |
download | otp-900276a573ea67039670a71c379f64ac938a4516.tar.gz otp-900276a573ea67039670a71c379f64ac938a4516.tar.bz2 otp-900276a573ea67039670a71c379f64ac938a4516.zip |
Merge branch 'maint'
* maint:
asn1ct_gen: Correct generation of .hrl files for multiple ellipses
Fix BER code generation
Diffstat (limited to 'lib/asn1/src')
-rw-r--r-- | lib/asn1/src/asn1ct_gen.erl | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl index d3c1f34821..0e41aa1a7a 100644 --- a/lib/asn1/src/asn1ct_gen.erl +++ b/lib/asn1/src/asn1ct_gen.erl @@ -1233,15 +1233,23 @@ gen_record(TorPtype,Name,Type,Num) when is_record(Type,type) -> emit({"}).",nl,nl}), Tr ++ ExtensionList2; {Rootl1,Extl,Rootl2} -> + case Rootl1 =/= [] andalso Extl++Rootl2 =/= [] of + true -> emit([com]); + false -> ok + end, case Rootl1 of - [] -> true; - _ -> emit([",",nl]) + [_|_] -> emit([nl]); + [] -> ok end, emit(["%% with extensions",nl]), gen_record2(Name,'SEQUENCE',Extl,"",ext), + case Extl =/= [] andalso Rootl2 =/= [] of + true -> emit([com]); + false -> ok + end, case Extl of - [_H|_] when Rootl2 /= [] -> emit([",",nl]); - _ -> ok + [_|_] -> emit([nl]); + [] -> ok end, emit(["%% end of extensions",nl]), gen_record2(Name,'SEQUENCE',Rootl2,"",noext), |