File tree 1 file changed +15
-10
lines changed
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' |
11
11
grep -v '\./c.h' |
12
12
while read FILE
13
13
do
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
-
18
14
if [ `expr $FILE : '.*\.h$'` -ne 0 ]
19
15
then IS_INCLUDE="Y"
20
16
else IS_INCLUDE="N"
21
17
fi
22
18
23
19
# loop through all includes
24
- cat "$FILE" | grep "^#include" |
20
+ cat "$FILE" |
21
+ grep "^#include\>" |
25
22
grep -v '/\* *pgrminclude *ignore *\*/' |
26
23
sed 's/^#include[ ]*[<"]\([^>"]*\).*$/\1/g' |
24
+ grep -v 'parser/kwlist\.h' |
25
+ grep -v '\.c$' |
27
26
while read INCLUDE
28
27
do
29
28
if [ "$1" = "-v" ]
43
42
grep -A1 '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' "$FILE" |
44
43
egrep -q '^#else|^#endif' && continue
45
44
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" |
47
51
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
52
57
53
58
# set up initial file contents
54
59
grep -v '^#include[ ][ ]*[<"]'"$INCLUDE"'[>"]' \
You can’t perform that action at this time.
0 commit comments