Make a branch to make krunner Good Enough For Aaron™.
[kdebase/uwolfer.git] / apps / konsole / developer-doc / old-documents / VT100 / db2.pl
blobf961e5d31d043e1f48fb2533232e96784a86d87e
1 #!/usr/bin/perl -w
3 $ops = "db.trans";
4 $src = "../../src/TEScreen.C";
5 $res1 = ">TEScreen.p1";
6 $res2 = ">TEScreen.p2";
8 open(OPS, $ops) || die "cannot open file '" . $ops . "'.";
10 my $tbl = {};
11 while (<OPS>)
13 chop; # strip record separator
14 my @Fld = split('\|', $_);
15 if ($Fld[2] && $Fld[2] eq 'scr')
17 $tbl->{$Fld[3]} = 1;
20 #foreach $p (sort keys %$tbl)
21 #{
22 # print $p, "\n";
25 open(SRC, $src) || die "cannot open file '" . $src . "'.";
26 open(RES1, $res1) || die "cannot open file '" . $res1 . "'.";
27 open(RES2, $res2) || die "cannot open file '" . $res2 . "'.";
28 my $control = 0;
29 while (<SRC>)
31 chop;
32 if ( /void TEScreen::(.*)\((.*)\)/ && exists $tbl->{$1} )
34 print RES1 "\n";
35 $control = 1;
37 if ($control)
39 print RES1 $_, "\n";
41 else
43 print RES2 $_, "\n";
45 if ( /^}$/ )
47 $control = 0;