diff options
Diffstat (limited to 'tools/sed-callbacks')
-rw-r--r-- | tools/sed-callbacks | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tools/sed-callbacks b/tools/sed-callbacks index 42051ba..f94309c 100644 --- a/tools/sed-callbacks +++ b/tools/sed-callbacks @@ -1,3 +1,10 @@ +# eat all comments +/^\s*\/\*/ { + :comment + /\*\/\s*$/ { n; b nocomment } + n; b comment +} +:nocomment # drop if don't start with typedef /^\s*typedef/ ! b # one line typedef xxx (...); we are done |