From d9d36f8e41a8c514d712e3a6e6858e2c3b3a8884 Mon Sep 17 00:00:00 2001 From: Wim Lewis Date: Wed, 12 Mar 2014 13:52:08 -0700 Subject: [PATCH] Include the module name in the extracted ASN.1 file. --- examples/crfc2asn1.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/examples/crfc2asn1.pl b/examples/crfc2asn1.pl index c942f098..79a32f27 100755 --- a/examples/crfc2asn1.pl +++ b/examples/crfc2asn1.pl @@ -44,14 +44,15 @@ while(<>) { $inasn = 1; } elsif(/^[ \t]*([A-Z][A-Za-z0-9-]*).*{[ \t]*iso/ || /^[ \t]*{[ \t]*iso/) { + my @a = ($_); $modName = $1; unless(length($modName)) { next unless $prevLine =~ /^[ \t]*([A-Z][A-Za-z0-9-]*)[ \t]*$/; $modName = $1; + unshift(@a, $prevLine); } $currentFname = $rfcid . $modName . ".asn1"; - my @a = ($_); my $i; for($i = 0; $i < 8; $i++) { $_ = <>;