From b2d1dc07f424ccf484daa27bbb259cc41859e1dd Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Mon, 18 Apr 2011 15:13:07 +0200 Subject: update tools/sed-* and tools/extract-api.sh --- tools/sed-types | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/sed-types (limited to 'tools/sed-types') diff --git a/tools/sed-types b/tools/sed-types new file mode 100644 index 0000000..7ac79a2 --- /dev/null +++ b/tools/sed-types @@ -0,0 +1,14 @@ +s/^\s*typedef\s+(struct\s+)?((\w+\**\s+)*)(\w+)\s*;.*$/typedef \1 \2 \4;/ +t finish +s/^\s*typedef\s+(struct.*[^;].*)/typedef \1/ +T +h +:loop +n +/^\s*\}/ ! b loop +s/^\s*\}\s*(\w+)\s*;.*$/\1;/ +H;x +s/\n/ /g +:finish +s/ {2,}/ /g +p -- cgit v1.2.3