]> git.ipfire.org Git - thirdparty/strongswan.git/blob - doc/utils/killtoodeepcontents.pl
- import of strongswan-2.7.0
[thirdparty/strongswan.git] / doc / utils / killtoodeepcontents.pl
1 #!/usr/bin/perl
2
3 $toc=0;
4 $memo=0;
5
6 while(<>) {
7 if(0 && /^Status of this Memo/) {
8 $memo=1;
9 print;
10 next;
11 }
12
13 if(/^Table of Contents/) {
14 print ".bp\n";
15 $toc=1;
16 print;
17 next;
18 }
19
20 if(!$toc && !$memo) {
21 print;
22 next;
23 }
24
25 if($toc) {
26 if(/^[0-9]*\.[0-9]*\.[0-9]* / ||
27 # /^[0-9]*\.[0-9]* / ||
28 /^[0-9]*\.[0-9]*\.[0-9]*\.[0-9]* /) {
29 next;
30 }
31
32 if(/^14./) {
33 $toc=0;
34 }
35 if(/^\.bp/) {
36 next;
37 }
38 print;
39 }
40
41 if($memo) {
42 if(/^\.bp/) {
43 next;
44 }
45
46 if(/^Copyright Notice/) {
47 print ".fi\n";
48 print "This memo provides information for the Internet community. It does\n";
49 print "not specify an Internet standard of any kind. Distribution of this\n";
50 print "memo is unlimited.\n";
51 print "\n.ti 0\n";
52
53 print;
54
55 $memo=0;
56 next;
57 }
58 }
59 }