ref: 043ba26ad986a919a68c4e4147d5df547b95a692
parent: 2b61ac07407f664888705b5584b0ff04afb1dcda
author: kvik <kvik@a-b.xyz>
date: Mon Jan 27 15:21:42 EST 2020
c(1): recognize combined typedef-struct declarations
--- a/bin/c
+++ b/bin/c
@@ -17,7 +17,7 @@
files = `{walk -f $search | $ignore | grep '\.[chsyl]$'}
- echo 'X ,x@^struct([^}][^;]*\n*)+};\n@ g@^struct[ ]+'$regex'@ {
+ echo 'X ,x@^(typedef[ \n]+)?struct([^}][^;]*\n*)+}.*;\n@ g@^(typedef[ \n]+)?struct[ ]+'$regex'@ {
!echo '•' $%:$%l
p
}' | sam -d $files >[2]/dev/null