aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorWim Lewis <wiml@omnigroup.com>2014-03-12 13:52:08 -0700
committerWim Lewis <wiml@omnigroup.com>2014-03-12 13:52:08 -0700
commitd9d36f8e41a8c514d712e3a6e6858e2c3b3a8884 (patch)
treef49dd04fae039e64288444c99ed19659748f59c9 /examples
parentb40ec41655a6f59705df247d71754aa42505485b (diff)
Include the module name in the extracted ASN.1 file.
Diffstat (limited to 'examples')
-rwxr-xr-xexamples/crfc2asn1.pl3
1 files changed, 2 insertions, 1 deletions
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++) {
$_ = <>;