diff options
author | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-16 10:19:20 +0200 |
---|---|---|
committer | Jérémy Zurcher <jeremy@asynk.ch> | 2011-04-16 10:19:20 +0200 |
commit | bf681e9e90adf99357f754284703ea2c6dc3ff4e (patch) | |
tree | 4d81ff7a7cd76684f1cec6cb76927ae9fcf10042 /tools/sed-enums | |
parent | b8fb8382d1d472199970241900a30384a71b8060 (diff) | |
download | ffi-efl-bf681e9e90adf99357f754284703ea2c6dc3ff4e.zip ffi-efl-bf681e9e90adf99357f754284703ea2c6dc3ff4e.tar.gz |
update sed scripts, add sed-structs
Diffstat (limited to 'tools/sed-enums')
-rw-r--r-- | tools/sed-enums | 21 |
1 files changed, 7 insertions, 14 deletions
diff --git a/tools/sed-enums b/tools/sed-enums index 13ce112..ea7c5f7 100644 --- a/tools/sed-enums +++ b/tools/sed-enums @@ -1,23 +1,16 @@ s/.*(enum\s+[a-zA-Z0-9_]+).*$/typedef \1 { / -T -h -:attrs -n +T;h +:attrs;n s/^\s*([A-Z0-9_]+).*$/\1, / T next;H;b attrs :next /^\s*\}/ ! b attrs s/^\s*}\s*([a-zA-Z0-9_]+).*$/ } \1;/ -t end -# TODO fix above !! -/^\s*\}\s*;.*$/ { - :loop2 - n - /typedef/ ! b loop2 - s/^\s*typedef\s+enum\s+[a-zA-Z0-9_]+\s+([a-zA-Z0-9_]+)/ } \1/ - t end -} -:end +t finish +:close +s/^\s*typedef\s+enum\s+[a-zA-Z0-9_]+\s+([a-zA-Z0-9_]+)\s+;/ } \1/ +t finish;n;T close +:finish H;x s/\n//g s/ {2,}/ /g |