summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakob Kaivo <jkk@ung.org>2019-02-01 18:09:21 -0500
committerJakob Kaivo <jkk@ung.org>2019-02-01 18:09:21 -0500
commita8ea1cb4b021e582b9f56963fc03de95a7123927 (patch)
tree66e1c70978d9d1a43322b5cef67d2a959eccd1f8
parent107353f5b3c74e57bb1ed06194770b0c2ea0f65c (diff)
remember newline after extern definitions
-rwxr-xr-xmkh.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/mkh.sh b/mkh.sh
index d173b753..6ba2840b 100755
--- a/mkh.sh
+++ b/mkh.sh
@@ -102,6 +102,8 @@ if [ -d $HEADER.TYPE ]; then
sed -ne '/#ifdef/,/#endif/p' $i
elif grep -q '^typedef.*;$' $i; then
grep '^typedef' $i
+ elif grep -q '^struct.*;$' $i; then
+ grep '^struct.*;$' $i
else
sed -ne '/^typedef/,/\}.*;$/p' $i
fi
@@ -174,7 +176,7 @@ if [ -d $HEADER.EXTERN ]; then
fi
for i in $(sort -u $v); do
- printf 'extern %s' "$(grep '^[a-zA-Z_].*;$' $i)"
+ printf 'extern %s\n' "$(grep '^[a-zA-Z_].*;$' $i)"
done
if [ -n "$version" ]; then