summaryrefslogtreecommitdiffstats
path: root/tools/sed-callbacks
blob: 4a2e27f50b722d9fd31b464b0c1fdc771217cc33 (plain)
1
2
3
4
5
6
7
8
9
10
11
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