Branch: Tag:

2003-08-15

2003-08-15 14:28:57 by Henrik Grubbström (Grubba) <grubba@grubba.org>

Even more SysV sed fixes.

Rev: src/strip_opcodes:1.8

1:   #!/bin/sh      # Stupid IRIX cpp turns --- into -- - - sed -e 's/ -- - / --- /g;s/^# \([0-9]*\)\( "[^"]*"\|\).*$/#line \1\2/;t;: loop + sed -e 's/^# \([0-9]* "[^"]*"\).*$/#line \1/;s/^# \([0-9]*\).*$/#line \1/;t + : loop   /OPCODE[0-9]/!b keepnl - h;s/^\(\|[^-]\|-[^-]\|--[^-]\)*\(OPCODE[0-9]\(\|[^-]\|-[^-]\|--[^-]\)*\) ---.*$/\2¤/p;t more + s/ -- \{0,1\}- / ½ /g;t loop + h;s/^[^½]*\(OPCODE[0-9][^½]*\) ½.*$/\1¤/p;t more   N;b loop   : more - g;s/^\(\|[^-]\|-[^-]\|--[^-]\)*\(OPCODE[0-9]\(\|[^-]\|-[^-]\|--[^-]\)*\) ---\(.*\)$/\4/;b loop + g;s/^[^½]*OPCODE[0-9][^½]* ½\(.*\)$/\1/;b loop   : keepnl - s/[^\ - ]//g' | sed -e ': loop + s/.//g' | sed -e ': loop   /¤$/{N;s/¤\n//;b loop   };/^[ ]*$/{H;d;};/^#line/{h;d;};x;s/^\   //;p;s/.//g;x'