mirror of https://github.com/lianthony/NT4.0
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
29 lines
303 B
29 lines
303 B
/typedef.*struct[^{]*$/N
|
|
|
|
:repeat1
|
|
/^[^{]*{[^{}]*$/{
|
|
N
|
|
b repeat1
|
|
}
|
|
s/\n/ /g
|
|
|
|
:repeat2
|
|
/([^)]*$/{
|
|
N
|
|
b repeat2
|
|
}
|
|
s/\n/ /g
|
|
|
|
/typedef/{
|
|
/struct/!d
|
|
}
|
|
|
|
s/typedef.*struct.*{/struct {/
|
|
|
|
s/([ ]*/(/g
|
|
s/{[ ]*/{/g
|
|
s/[ ]*)/)/g
|
|
s/[ ]*(/(/g
|
|
s/[ ]*}/}/g
|
|
s/struct {\(.*\)}[ ]*\([^ ,;]*\).*$/struct \2 {\1}/
|
|
|