Date: 03/20/01
- Next message: Egon Schmid ( <email protected>): "Re: [PHP-DOC] cvs: phpdoc /de/functions xslt.xml"
- Previous message: Wolfgang Drews: "[PHP-DOC] cvs: phpdoc /de/functions xslt.xml"
- In reply to: Jesus M. Castagnetto: "Re: [PHP-DOC] About resources.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
<email protected> = ();
$dir = "/usr/local/src/php-4.0.4";
traite_dir($dir);
open ERREURS, ">restypes.txt";
foreach $t ( <email protected>) {
$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 = <email protected>[0];
opendir(DIR, $dir);
my <email protected>;
<email protected> = readdir(DIR);
closedir(DIR);
my $d;
foreach $d ( <email protected>){
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 = <email protected>[0];
open FICHIER, "<$nom_fichier";
<email protected> = <FICHIER>;
close FICHIER;
$fichier = join("", <email protected>);
while($fichier =~ s/(zend_register_list_destructors_ex\(.*?\);)//is){
print $totale = $1;
$totale =~ s/\s+/ /isg;
push( <email protected>, "$nom_fichier\t$totale\n");
$total++;
}
}
- Next message: Egon Schmid ( <email protected>): "Re: [PHP-DOC] cvs: phpdoc /de/functions xslt.xml"
- Previous message: Wolfgang Drews: "[PHP-DOC] cvs: phpdoc /de/functions xslt.xml"
- In reply to: Jesus M. Castagnetto: "Re: [PHP-DOC] About resources.xml"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

