Allow spaces between "_" and "(".

Require exact extensions to avoid addiing backups.
Add some extensions (cpp, cxx) in case if some C++ project takes this
script - they are no longer covered by *.c
This commit is contained in:
Pavel Roskin 2002-07-15 17:03:13 +00:00
parent 0ab222eed4
commit 566339a1cc

View File

@ -62,9 +62,9 @@ if ($LANG=~/^-(.)*/){
elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){ elsif ($LANG eq "--maintain" || "$LANG" eq "-M"){
$a="find ../ -type f -print | egrep '.*\\.(c|y|cc|c++|h|gob)' "; $a="find ../ -type f -print | egrep '.*\\.(c|y|cc|c++|cxx|cpp|h|gob)\$' ";
open(BUF2, "POTFILES.in") || die "update.pl: there is no POTFILES.in!!!\n"; open(BUF2, "POTFILES.in") || die "update.pl: there is no POTFILES.in !!!\n";
print "Searching for missing _(\" \") entries...\n"; print "Searching for missing _(\" \") entries...\n";
open(BUF1, "$a|"); open(BUF1, "$a|");
@ -86,7 +86,7 @@ if ($LANG=~/^-(.)*/){
foreach my $file (@buf1){ foreach my $file (@buf1){
open FILE, "<$file"; open FILE, "<$file";
while (<FILE>) { while (<FILE>) {
if ($_=~/_\(\"/o){ if ($_=~/_\s*\(\"/o){
$file = unpack("x3 A*",$file) . "\n"; $file = unpack("x3 A*",$file) . "\n";
push @buff1, $file; push @buff1, $file;
last; last;