aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-03-12 10:42:08 +0100
committerBjörn Gustavsson <[email protected]>2015-03-12 10:42:08 +0100
commit900276a573ea67039670a71c379f64ac938a4516 (patch)
treee81f2ee411fd704240e933f81f7d9a3bfb9bf87f /lib/asn1/src/asn1ct_gen.erl
parent306d7bc2282c8ff9545ae3a9e958b2746677958f (diff)
parent0796cb716511ae2bf35ee0ee1e0da75f20ad567f (diff)
downloadotp-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/asn1ct_gen.erl')
-rw-r--r--lib/asn1/src/asn1ct_gen.erl16
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),