Include the module name in the extracted ASN.1 file.
diff --git a/examples/crfc2asn1.pl b/examples/crfc2asn1.pl
index c942f09..79a32f2 100755
--- a/examples/crfc2asn1.pl
+++ b/examples/crfc2asn1.pl
@@ -44,14 +44,15 @@
$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++) {
$_ = <>;