1#!/bin/sh -e 2 3srcdir="${0%/*}" 4dstdir="$1"; shift 5 6for 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" 10done 11