1 #!/bin/sh -e 2 3 srcdir="${0%/*}" 4 dstdir="$1"; shift 5 6 for n in n32 n64 o32; do 7 in="$srcdir/syscallent-$n.h" 8 out="$dstdir/syscallent-$n-stub.h" 9 sed -r -n '/^#if/,/^#else/ {s/^([^{]*\{[^,]*,[^,]*,[[:space:]]*)[^,[:space:]]+,[[:space:]]*"([^"]+".*)/\1SEN(printargs), "'$n':\2/; s/^\[.*/&/p}' < "$in" > "$out" 10 done 11