Hi Jesus,
> I crufted together a simple script to pull possible
> resources, which may help you:
This is interesting : it didn't find out the same resources.
Here is the one I used :
(Note : displays are in French, but code should be simple enough).
Just add script in the php source root, and answers will go in
restypes.txt file. I rely on "zend_register_list_destructors_ex" call.
I'll gather all those resources together. I'm still working
on the initial release.
Thanks a lot :-)
#!/usr/bin/perl
@tous = ();
$dir = "/usr/local/src/php-4.0.4";
traite_dir($dir);
open ERREURS, ">restypes.txt";
foreach $t ( @tous) {
$t =~ s/^$dir//isg;
$t =~ s/\\n//isg;
print ERREURS "$t\t0\t0\t\n";
}
close ERREURS;
print "total : $total\n";
print "total erreur : $total_erreur\n";
sub traite_dir(){
my $dir = @_[0];
opendir(DIR, $dir);
my @files;
@files = readdir(DIR);
closedir(DIR);
my $d;
foreach $d (@files){
if (($d ne '.') && ($d ne '..')){
if (-d "$dir/$d"){
print "dossier : $dir/$d\n";
traite_dir("$dir/$d");
} else {
if ($d =~ /\.c$/is){
print "fichier : $dir/$d\n";
traite_fichier("$dir/$d");
}
}
}
}
}
sub traite_fichier(){
my $nom_fichier = @_[0];
open FICHIER, "<$nom_fichier";
@fichier = <FICHIER>;
close FICHIER;
$fichier = join("", @fichier);
while($fichier =~ s/(zend_register_list_destructors_ex\(.*?\);)//is){
print $totale = $1;
$totale =~ s/\s+/ /isg;
push(@tous, "$nom_fichier\t$totale\n");
$total++;
}
}