diff options
Diffstat (limited to 'tools/sed-enums')
-rw-r--r-- | tools/sed-enums | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/sed-enums b/tools/sed-enums index 4599859..ffc193b 100644 --- a/tools/sed-enums +++ b/tools/sed-enums @@ -1,4 +1,4 @@ -s/^\s*typedef\s+(enum(\s+\w+)?).*$/typedef \1 { / +s/^\s*(typedef)?\s+(enum(\s+\w+)?).*$/typedef \2 { / T;h :attrs;n s/^\s*([A-Z0-9_]+)(\s*=\s*-?[0-9]+)?.*$/\1\2, / @@ -8,8 +8,8 @@ T next;H;b attrs s/^\s*}\s*(\w+).*$/ } \1;/ t finish :close -s/^\s*typedef\s+enum\s+\w+\s+(\w+)\s+;/ } \1/ -t finish;n;T close +s/^\s*typedef\s+enum\s+\w+\s+(\w+)\s*;/ } \1/ +t finish;n;b close :finish H;x s/\n//g |