view tools/incpri.pl @ 513:4c2607e72ab5

inline continue... fix function call cstring
author kono
date Mon, 26 Dec 2005 00:45:46 +0900
parents a379da780856
children e055df7c1082
line wrap: on
line source

#!/usr/bin/perl

for(@ARGV) {
    my $filename = $_;
    rename($filename,$filename.".bak");
    open(IN,"<$filename.bak");
    open(OUT,">$filename");
    $d = "0000";
    while(<IN>) {
       s/printf\(\"\#\d+\:/printf\(\"\#$d\:/;
       s/printf\(\"([^#])/printf\(\"\#$d\:$1/;
       $d++;
       print OUT;
    }
}