blob: 0abe17701e5b513f6ae79af8023c9e708ea87346 [file] [log] [blame]
lh9ed821d2023-04-07 01:36:19 -07001# This sed script massages native_client/src/untrusted/irt/irt.h into
2# the nacl-irt.h used to build libc, by rewriting foo_t and struct bar
3# to nacl_abi_foo_t and nacl_abi_bar_t (and eliding forward declarations).
4# It doesn't perturb any struct CamelCaps cases, since such names will
5# be used only in NaCl-specific interfaces.
6/^struct \([a-z][a-z]*\);$/d
7/^#include "irt\.h"$/d
8/(/!b
9s/\([a-z0-9_][a-z0-9_]*\)_t\>/nacl_abi_\1_t/g
10s/struct \([a-z0-9_][a-z0-9_]*\)/nacl_abi_\1_t/g
11s/nacl_abi_\(u*int[3264ptr]*_t\)/\1/g
12s/nacl_abi_\(nacl_irt_\)/\1/g