File indexing completed on 2025-04-20 05:09:41
0001 #!/usr/bin/perl 0002 # laurent Montel <montel@kde.org> 0003 # convert q3hvbox->kh/vbox 0004 0005 use File::Basename; 0006 use lib dirname( $0 ); 0007 use functionUtilkde; 0008 use strict; 0009 0010 open(my $F, "-|", qw(find . -type f)); 0011 my $file; 0012 0013 while ($file = <$F>) { 0014 chomp $file; 0015 next if functionUtilkde::excludeFile( $file); 0016 0017 my $modified; 0018 open(my $FILE, "<", $file) or warn "We can't open file $file:$!\n"; 0019 my @l = map { 0020 my $orig = $_; 0021 s!#include <q3vbox.h>!!; 0022 s!#include <q3hbox.h>!!; 0023 s!#include <Q3VBox>!!; 0024 s!#include <Qt3Support/Q3VBox>!!; 0025 s!#include <Q3HBox>!!; 0026 s!#include <Qt3Support/Q3HBox>!!; 0027 s!\bQ3VBox\b!KVBox!g; 0028 s!\bQ3HBox\b!KHBox!g; 0029 0030 $modified ||= $orig ne $_; 0031 $_; 0032 } <$FILE>; 0033 0034 if ($modified) { 0035 open (my $OUT, ">", $file); 0036 print $OUT @l; 0037 close ($OUT); 0038 functionUtilkde::addIncludeInFile( $file, "kvbox.h"); 0039 } 0040 0041 } 0042 functionUtilkde::diffFile( @ARGV );