blob: 1b7afdfb9faaee633ef61885e3fbf952cc9f2bda (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
s/^\s*typedef\s+struct\s+(\w+)\s+(\w+)\s*;.*$/typedef struct \1 \2;/
t finish
/^\s*typedef\s+struct.*[^;].*/ ! b
h
:loop
n
/^\s*\}/ ! b loop
s/^\s*\}\s*(\w+)\s*;.*$/\1;/
H;x
s/\n/ /g
:finish
s/ {2,}/ /g
p
|