5
# Check flag name-spaces.
11
# Check for DB_ENV flags.
12
(grep 'F_ISSET([^ ]*dbenv,' $d/*/*.[chys];
13
grep 'F_SET([^ ]*dbenv,' $d/*/*.[chys];
14
grep 'F_CLR([^ ]*dbenv,' $d/*/*.[chys]) |
15
sed -e '/DB_ENV_/d' -e '/F_SET([^ ]*dbenv, db_env_reset)/d' > $t1
21
grep 'DB_ENV_' $d/*/*.c |
22
sed -e '/F_.*dbenv,/d' \
23
-e '/DB_ENV_TEST_RECOVERY(.*DB_TEST_/d' \
24
-e '/\/libdb_java\//d' > $t1
31
(grep 'F_ISSET([^ ]*dbp,' $d/*/*.[chys];
32
grep 'F_SET([^ ]*dbp,' $d/*/*.[chys];
33
grep 'F_CLR([^ ]*dbp,' $d/*/*.[chys]) |
35
-e '/db.c:.*F_SET.*F_ISSET(subdbp,/d' > $t1
41
grep 'DB_AM_' $d/*/*.c |
43
-e '/"DB->open", dbp->flags, DB_AM_DUP,/d' \
44
-e '/"DB_NODUPDATA" behavior for databases with/d' \
45
-e '/If DB_AM_OPEN_CALLED is not set, then we/d' \
46
-e '/This was checked in set_flags when DB_AM_ENCRYPT/d' \
47
-e '/XA_ABORT, we can safely set DB_AM_RECOVER/d' \
48
-e '/ DB_AM_RECNUM\./d' \
49
-e '/ DB_AM_RECOVER set\./d' \
50
-e '/isdup = dbp->flags & DB_AM_DUP/d' \
51
-e '/otherwise we simply do/d' \
53
-e '/setting DB_AM_RECOVER, we guarantee that we don/d' \
54
-e '/:[ {]*DB_AM_/d' > $t1
60
# Check for DBC flags.
61
(grep 'F_ISSET([^ ]*dbc,' $d/*/*.[chys];
62
grep 'F_SET([^ ]*dbc,' $d/*/*.[chys];
63
grep 'F_CLR([^ ]*dbc,' $d/*/*.[chys]) |
64
sed -e '/DBC_/d' > $t1
70
grep 'DBC_' $d/*/*.c |
72
-e '/DBC_INTERNAL/d' \
74
-e '/Do the actual get. Set DBC_TRANSIENT/d' \
75
-e '/If DBC_WRITEDUP is set, the cursor is an in/d' \
76
-e '/The DBC_TRANSIENT flag indicates that we/d' \
77
-e '/This function replaces the DBC_CONTINUE and DBC_KEYSET/d' \
78
-e '/db_cam.c:.*F_CLR(opd, DBC_ACTIVE);/d' \
85
# Check for bad use of macros.
86
egrep 'case .*F_SET\(|case .*F_CLR\(' $d/*/*.c > $t1
87
egrep 'for .*F_SET\(|for .*F_CLR\(' $d/*/*.c >> $t1
88
egrep 'if .*F_SET\(|if .*F_CLR\(' $d/*/*.c >> $t1
89
egrep 'switch .*F_SET\(|switch .*F_CLR\(' $d/*/*.c >> $t1
90
egrep 'while .*F_SET\(|while .*F_CLR\(' $d/*/*.c >> $t1
92
echo 'if statement followed by non-test macro'