annotate tools/incpri.pl @ 491:a379da780856

cond signed/unsigned
author kono
date Wed, 21 Dec 2005 11:33:53 +0900
parents 7c3d8237b625
children e055df7c1082
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
466
7c3d8237b625 *** empty log message ***
kono
parents:
diff changeset
1 #!/usr/bin/perl
491
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
2
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
3 for(@ARGV) {
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
4 my $filename = $_;
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
5 rename($filename,$filename.".bak");
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
6 open(IN,"<$filename.bak");
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
7 open(OUT,">$filename");
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
8 $d = "0000";
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
9 while(<IN>) {
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
10 s/printf\(\"\#\d+\:/printf\(\"\#$d\:/;
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
11 s/printf\(\"([^#])/printf\(\"\#$d\:$1/;
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
12 $d++;
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
13 print OUT;
a379da780856 cond signed/unsigned
kono
parents: 466
diff changeset
14 }
466
7c3d8237b625 *** empty log message ***
kono
parents:
diff changeset
15 }