On Monday 31 January 2005 2:54 pm, E. Weddington wrote:
Perhaps we should announce Ned Konz' Perl script. Perl is part of
WinAVR anyway, so it would make it an easy move for almost anyone to
convert their old sources.
*cough* Actually no, perl is not in WinAVR. It's got gawk and sed.
OK, here's the same thing in sed:
# run with:
# /bin/sed -f rewriteCbiAndSbi.sed -i.bak file [...]
s/\([ ]*\)cbi[ ]*([ ]*\([^,)]\+\)[ ]*,[ ]*\([^,)]\+\)[ ]*)/\1\2 \&=
s/\([ ]*\)sbi[ ]*([ ]*\([^,)]\+\)[ ]*,[ ]*\([^,)]\+\)[ ]*)/\1\2 |=