@@ -11,19 +11,18 @@ grep -v '\./pg_config.h' |
1111grep -v '\./c.h' |
1212while read FILE
1313do
14- # Skip files with #if and #ifdef blocks because the blocks
15- # might contain code that is not compiled on this platform.
16- grep -q '^#if' "$FILE" && continue
17-
1814if [ `expr $FILE : '.*\.h$'` -ne 0 ]
1915thenIS_INCLUDE="Y"
2016elseIS_INCLUDE="N"
2117fi
2218
2319# loop through all includes
24- cat "$FILE" | grep "^#include" |
20+ cat "$FILE" |
21+ grep "^#include\>" |
2522grep -v '/\* *pgrminclude *ignore *\*/' |
2623sed 's/^#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
24+ grep -v 'parser/kwlist\.h' |
25+ grep -v '\.c$' |
2726while read INCLUDE
2827do
2928if [ "$1" = "-v" ]
4342grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
4443 egrep -q '^#else|^#endif' && continue
4544
46- # remove defines from include files
45+ # Remove all #if and #ifdef blocks because the blocks
46+ # might contain code that is not compiled on this platform.
47+ cat "$FILE" |
48+ grep -v "^#if" |
49+ grep -v "^#else" |
50+ grep -v "^#endif" |
4751if [ "$IS_INCLUDE" = "Y" ]
48- thencat "$FILE" | grep -v "^#if" | grep -v "^#else" |
49- grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a
50- elsecat "$FILE" >/tmp/$$a
51- fi
52+ then# remove struct references
53+ #sed 's/->[a-zA-Z0-9_\.]*//g'
54+ cat
55+ elsecat
56+ fi >/tmp/$$a
5257
5358# set up initial file contents
5459grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' \