File tree Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Expand file tree Collapse file tree 1 file changed +15
-10
lines changed Original file line number Diff line number Diff line change @@ -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-
1814 if [ `expr $FILE : '.*\.h$'` -ne 0 ]
1915 then IS_INCLUDE="Y"
2016 else IS_INCLUDE="N"
2117 fi
2218
2319 # loop through all includes
24- cat "$FILE" | grep "^#include" |
20+ cat "$FILE" |
21+ grep "^#include\>" |
2522 grep -v '/\* *pgrminclude *ignore *\*/' |
2623 sed 's/^#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
24+ grep -v 'parser/kwlist\.h' |
25+ grep -v '\.c$' |
2726 while read INCLUDE
2827 do
2928 if [ "$1" = "-v" ]
4342 grep -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" |
4751 if [ "$IS_INCLUDE" = "Y" ]
48- then cat "$FILE" | grep -v "^#if" | grep -v "^#else" |
49- grep -v "^#endif" | sed 's/->[a-zA-Z0-9_\.]*//g' >/tmp/$$a
50- else cat "$FILE" >/tmp/$$a
51- fi
52+ then # remove struct references
53+ # sed 's/->[a-zA-Z0-9_\.]*//g'
54+ cat
55+ else cat
56+ fi >/tmp/$$a
5257
5358 # set up initial file contents
5459 grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' \
You can’t perform that action at this time.
0 commit comments