2
# This script attempts to find bad ifdef's, i.e. ifdef's that use braces
3
# but not the do { ... } while (0) syntax
5
# This is useful for running before pgindent
9
awk ' BEGIN {was_define = "N"}
10
{ if (was_define == "Y" &&
12
printf "%s %d\n", FILENAME, NR
18
grep -on '^#define.*{' "$FILE" | grep -v 'do[ ]*{'