summaryrefslogtreecommitdiff
path: root/mk.sh
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-01 18:07:59 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-01 18:07:59 -0500
commit107353f5b3c74e57bb1ed06194770b0c2ea0f65c (patch)
treeff55250e4df170408979cc2facb1d1b3c6fa253d /mk.sh
parent9f0c88f77e364dd004af7244ca51bbeda5beaab5 (diff)
properly handle forward declarations of structs
Diffstat (limited to 'mk.sh')
-rw-r--r--mk.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mk.sh b/mk.sh
index dc027818..5b0d71de 100644
--- a/mk.sh
+++ b/mk.sh
@@ -9,7 +9,9 @@ classify_source () {
echo MACRO
elif grep -q "#undef ${NAME}" $1; then
echo MACRO
- elif grep -q "^typedef.* ${NAME}.*;" $1; then
+ elif grep -q "^typedef .*${NAME}.*;" $1; then
+ echo TYPE
+ elif grep -q "^struct .*;$" $1; then
echo TYPE
elif grep -q "^typedef.*{$" $1; then
echo TYPE_LONG