From bf681e9e90adf99357f754284703ea2c6dc3ff4e Mon Sep 17 00:00:00 2001 From: Jérémy Zurcher Date: Sat, 16 Apr 2011 10:19:20 +0200 Subject: update sed scripts, add sed-structs --- tools/sed-structs | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 tools/sed-structs (limited to 'tools/sed-structs') diff --git a/tools/sed-structs b/tools/sed-structs new file mode 100644 index 0000000..1b7afdf --- /dev/null +++ b/tools/sed-structs @@ -0,0 +1,14 @@ + +s/^\s*typedef\s+struct\s+(\w+)\s+(\w+)\s*;.*$/typedef struct \1 \2;/ +t finish +/^\s*typedef\s+struct.*[^;].*/ ! b +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