Mercurial > hg > CbC > old > device
view tools/incpri.pl @ 935:7672a37e7545 default tip
Raspbery PI ARM support begin
author | kono |
---|---|
date | Sat, 24 Dec 2016 03:02:57 +0000 |
parents | 3e3cf02297e4 |
children |
line wrap: on
line source
#!/usr/bin/perl # /************************************************************************ # ** Copyright (C) 2006 Shinji Kono # ** 連絡先: 琉球大学情報工学科 河野 真治 # ** (E-Mail Address: kono@ie.u-ryukyu.ac.jp) # ** # ** このソースのいかなる複写,改変,修正も許諾します。ただし、 # ** その際には、誰が貢献したを示すこの部分を残すこと。 # ** 再配布や雑誌の付録などの問い合わせも必要ありません。 # ** 営利利用も上記に反しない範囲で許可します。 # ** バイナリの配布の際にはversion messageを保存することを条件とします。 # ** このプログラムについては特に何の保証もしない、悪しからず。 # ** # ** Everyone is permitted to do anything on this program # ** including copying, modifying, improving, # ** as long as you don't try to pretend that you wrote it. # ** i.e., the above copyright notice has to appear in all copies. # ** Binary distribution requires original version messages. # ** You don't have to ask before copying, redistribution or publishing. # ** THE AUTHOR DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE. # ***********************************************************************/ for(@ARGV) { my $filename = $_; rename($filename,$filename.".bak"); open(IN,"<$filename.bak"); open(OUT,">$filename"); $d = "0000"; while(<IN>) { s/fprintf\(([^,]+,)\"\#\d+\:/fprintf\($1\"\#$d\:/; s/fprintf\(([^,]+,)\"([^#])/fprintf\($1\"\#$d\:$2/; s/printf\(\"\#\d+\:/printf\(\"\#$d\:/; s/printf\(\"([^#])/printf\(\"\#$d\:$1/; $d++; print OUT; } }