diff options
Diffstat (limited to 'tools/sed-callbacks')
-rw-r--r-- | tools/sed-callbacks | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/tools/sed-callbacks b/tools/sed-callbacks index af9c2b7..37444a8 100644 --- a/tools/sed-callbacks +++ b/tools/sed-callbacks @@ -1 +1,11 @@ -/^\s*typedef\s+([a-zA-Z0-9_\* ]+?)\s+\*?(\(\*)?(\w+)\)?\s*\(.*\);\s*$/p +s/^\s*typedef\s+(.*)(\(\*?\w+\))?\s*(\(.*\));/typedef \1 \2 \3;/ +t finish +s/^\s*typedef\s+(.*)(\(\*?\w+\))?\s*(\(.*,)/typedef \1 \2 \3/ +T;h +:loop;n +/,$/ { H; b loop } +/;$/ { H;x} +:finish +s/\n//g +s/ {2,}/ /g +p |