aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1/src
diff options
context:
space:
mode:
authorBjörn Gustavsson <bjorn@erlang.org>2015-03-06 14:53:32 +0100
committerBjörn Gustavsson <bjorn@erlang.org>2015-03-06 15:11:09 +0100
commite073ffc39c29dcec5dec0a0af070952e03c1fa8f (patch)
tree9ed1da467ddb2bdaabcd8b741d96ddc80fc2cbcc /lib/asn1/src
parent2eeec1591b1006d318ab7e7862593acb6fa86dd7 (diff)
downloadotp-e073ffc39c29dcec5dec0a0af070952e03c1fa8f.tar.gz
otp-e073ffc39c29dcec5dec0a0af070952e03c1fa8f.tar.bz2
otp-e073ffc39c29dcec5dec0a0af070952e03c1fa8f.zip
asn1ct_gen: Correct generation of .hrl files for multiple ellipses
Diffstat (limited to 'lib/asn1/src')
-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),