Port "use_tunneled_reply" fix for MS-CHAP from branch_1_1
[freeradius.git] / doc / rfc / genref.pl
1 #!/usr/bin/env perl
2 foreach $file (@ARGV) {
3     open FILE, "<$file" || die "Error opening $file: $!\n";
4
5     $ref = $file;
6     $ref =~ s/\..*//g;
7
8     while (<FILE>) {
9         next if (!/^(\d+\.)+\s+([a-zA-Z]+-)+[a-zA-Z]/);
10
11         chop;
12         split;
13
14         next if ($_[1] =~ /,/);
15
16         next if (defined($file{$_[1]}));
17
18         print $ref, "\t", $_[1], "\n";
19
20         $file{$_[1]} = $ref;
21     }
22
23     close FILE;
24 }