aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src/asn1ct_gen.erl
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2015-03-12 09:59:02 +0100
committerBjörn Gustavsson <[email protected]>2015-03-12 09:59:02 +0100
commit0796cb716511ae2bf35ee0ee1e0da75f20ad567f (patch)
tree7b9639f88316cac2dfb8c870ae6b019deec453c4 /lib/asn1/src/asn1ct_gen.erl
parent47c44f3de3d5bf4251c35cf49474c3e29ad2933b (diff)
parente073ffc39c29dcec5dec0a0af070952e03c1fa8f (diff)
downloadotp-0796cb716511ae2bf35ee0ee1e0da75f20ad567f.tar.gz
otp-0796cb716511ae2bf35ee0ee1e0da75f20ad567f.tar.bz2
otp-0796cb716511ae2bf35ee0ee1e0da75f20ad567f.zip
Merge branch 'bjorn/asn1/double-ellipses/OTP-12546' into maint
* bjorn/asn1/double-ellipses/OTP-12546: 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 450d309688..2ef8466309 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -1228,15 +1228,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),