Mercurial > hg > CbC > old > device
annotate tools/incpri.pl @ 491:a379da780856
cond signed/unsigned
author | kono |
---|---|
date | Wed, 21 Dec 2005 11:33:53 +0900 |
parents | 7c3d8237b625 |
children | e055df7c1082 |
rev | line source |
---|---|
466 | 1 #!/usr/bin/perl |
491 | 2 |
3 for(@ARGV) { | |
4 my $filename = $_; | |
5 rename($filename,$filename.".bak"); | |
6 open(IN,"<$filename.bak"); | |
7 open(OUT,">$filename"); | |
8 $d = "0000"; | |
9 while(<IN>) { | |
10 s/printf\(\"\#\d+\:/printf\(\"\#$d\:/; | |
11 s/printf\(\"([^#])/printf\(\"\#$d\:$1/; | |
12 $d++; | |
13 print OUT; | |
14 } | |
466 | 15 } |