aboutsummaryrefslogtreecommitdiffstats
path: root/lib/asn1
diff options
context:
space:
mode:
authorBjörn Gustavsson <[email protected]>2017-02-14 12:46:41 +0100
committerBjörn Gustavsson <[email protected]>2017-02-15 11:30:40 +0100
commitd734056a59ff12fe74e38482bde558c86597e08d (patch)
tree9593ab8c6aead7f3fe0258f3e7c1a8daf22fed18 /lib/asn1
parente5958ff4884aedf7aa4c0922fbf46c0c6cf7e3d2 (diff)
downloadotp-d734056a59ff12fe74e38482bde558c86597e08d.tar.gz
otp-d734056a59ff12fe74e38482bde558c86597e08d.tar.bz2
otp-d734056a59ff12fe74e38482bde558c86597e08d.zip
asn1ct_gen: Clean up generation of .hrl file header
Note that put(currmod, Mod) is not needed because it has already been done by the caller.
Diffstat (limited to 'lib/asn1')
-rw-r--r--lib/asn1/src/asn1ct_gen.erl19
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/asn1/src/asn1ct_gen.erl b/lib/asn1/src/asn1ct_gen.erl
index aa8bd58e53..147c6d01f9 100644
--- a/lib/asn1/src/asn1ct_gen.erl
+++ b/lib/asn1/src/asn1ct_gen.erl
@@ -1226,13 +1226,12 @@ gen_head(#gen{options=Options}=Gen, Mod, Hrl) ->
emit(["%% Generated by the Erlang ASN.1 ",Name,
"compiler. Version:",asn1ct:vsn(),nl,
"%% Purpose: encoder and decoder of the types in ",Mod,nl,nl,
- "-module('",Mod,"').",nl]),
- put(currmod,Mod),
- emit({"-compile(nowarn_unused_vars).",nl}),
- emit({"-dialyzer(no_improper_lists).",nl}),
+ "-module('",Mod,"').",nl,
+ "-compile(nowarn_unused_vars).",nl,
+ "-dialyzer(no_improper_lists).",nl]),
case Hrl of
0 -> ok;
- _ -> emit({"-include(\"",Mod,".hrl\").",nl})
+ _ -> emit(["-include(\"",Mod,".hrl\").",nl])
end,
emit(["-asn1_info([{vsn,'",asn1ct:vsn(),"'},",nl,
" {module,'",Mod,"'},",nl,
@@ -1240,11 +1239,11 @@ gen_head(#gen{options=Options}=Gen, Mod, Hrl) ->
gen_hrlhead(Mod) ->
- emit({"%% Generated by the Erlang ASN.1 compiler version:",asn1ct:vsn(),nl}),
- emit({"%% Purpose: Erlang record definitions for each named and unnamed",nl}),
- emit({"%% SEQUENCE and SET, and macro definitions for each value",nl}),
- emit({"%% definition,in module ",Mod,nl,nl}),
- emit({nl,nl}).
+ emit(["%% Generated by the Erlang ASN.1 compiler. Version: ",
+ asn1ct:vsn(),nl,
+ "%% Purpose: Erlang record definitions for each named and unnamed",nl,
+ "%% SEQUENCE and SET, and macro definitions for each value",nl,
+ "%% definition in module ",Mod,".",nl,nl]).
%% May only be a list or a two-tuple.
to_textual_order({Root,Ext}) ->