summaryrefslogtreecommitdiffstats
path: root/tools/sed-structs
diff options
context:
space:
mode:
authorJérémy Zurcher <jeremy@asynk.ch>2011-04-16 10:19:20 +0200
committerJérémy Zurcher <jeremy@asynk.ch>2011-04-16 10:19:20 +0200
commitbf681e9e90adf99357f754284703ea2c6dc3ff4e (patch)
tree4d81ff7a7cd76684f1cec6cb76927ae9fcf10042 /tools/sed-structs
parentb8fb8382d1d472199970241900a30384a71b8060 (diff)
downloadffi-efl-bf681e9e90adf99357f754284703ea2c6dc3ff4e.zip
ffi-efl-bf681e9e90adf99357f754284703ea2c6dc3ff4e.tar.gz
update sed scripts, add sed-structs
Diffstat (limited to 'tools/sed-structs')
-rw-r--r--tools/sed-structs14
1 files changed, 14 insertions, 0 deletions
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