]> granicus.if.org Git - strace/commit
process.c: introduce XLAT_UOFF macro
authorDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Dec 2014 19:25:02 +0000 (19:25 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Thu, 11 Dec 2014 19:25:02 +0000 (19:25 +0000)
commitc6ce4fdafc1b551efd3bb51d0915c42ee1571fd9
tree5bd4454727f0d760f07025215e5d0c82eecf7377
parent03c06ea59272931ced6e9e7e242ff54c663a2d47
process.c: introduce XLAT_UOFF macro

Introduce XLAT_UOFF macro and use it to automatically transform
struct_user_offsets array into a more readable and compact form.

for n in $(sed -n 's/^[[:space:]]*{[[:space:]]*uoff(\([a-z_0-9]\+\)),.*/\1/p' process.c |sort -u); do
sed -i 's/^\([[:space:]]*\){[[:space:]]*uoff('"$n"'),[[:space:]]*"offsetof(struct user,[[:space:]]*'"$n"')"[[:space:]]*},$/\1XLAT_UOFF('"$n"'),/' process.c
done

* process.c (XLAT_UOFF): New macro.
(struct_user_offsets): Use it.
process.c