summaryrefslogtreecommitdiff
path: root/db/test/scr003
diff options
context:
space:
mode:
authorjbj <devnull@localhost>2002-08-14 16:42:12 +0000
committerjbj <devnull@localhost>2002-08-14 16:42:12 +0000
commit4aac97a69fb764add274089dbc7a1c5bd02c59c8 (patch)
tree0b605d8c05d5a439ebb193efe87e19e24e60b7c1 /db/test/scr003
parentd481ba55c02407124c499c7800ea556786137bc5 (diff)
downloadrpm-4aac97a69fb764add274089dbc7a1c5bd02c59c8.tar.gz
rpm-4aac97a69fb764add274089dbc7a1c5bd02c59c8.tar.bz2
rpm-4aac97a69fb764add274089dbc7a1c5bd02c59c8.zip
db-4.1.17 orphans.
CVS patchset: 5631 CVS date: 2002/08/14 16:42:12
Diffstat (limited to 'db/test/scr003')
-rw-r--r--db/test/scr003/chk.define51
1 files changed, 26 insertions, 25 deletions
diff --git a/db/test/scr003/chk.define b/db/test/scr003/chk.define
index ea47734c8..b4c4e4b10 100644
--- a/db/test/scr003/chk.define
+++ b/db/test/scr003/chk.define
@@ -1,6 +1,6 @@
#!/bin/sh -
#
-# Id: chk.define,v 1.15 2001/10/12 17:55:32 bostic Exp
+# Id: chk.define,v 1.21 2002/03/27 04:32:58 bostic Exp
#
# Check to make sure that all #defines are actually used.
@@ -14,61 +14,62 @@ d=../..
exitv=0
t1=__1
t2=__2
+t3=__3
-egrep '^#define' $d/include/*.h $d/include/*.in |
+egrep '^#define' $d/dbinc/*.h $d/dbinc/*.in |
sed -e '/db_185.in/d' -e '/xa.h/d' |
awk '{print $2}' |
- sed -e '/^ALIGNP/d' \
- -e '/^B_DELETE/d' \
+ sed -e '/^B_DELETE/d' \
-e '/^B_MAX/d' \
- -e '/^CIRCLEQ/d' \
- -e '/^DB_AM_TXN/d' \
+ -e '/^CIRCLEQ_/d' \
-e '/^DB_BTREEOLDVER/d' \
-e '/^DB_HASHOLDVER/d' \
-e '/^DB_LOCKVERSION/d' \
-e '/^DB_MAX_PAGES/d' \
-e '/^DB_QAMOLDVER/d' \
- -e '/^DB_RO_ACCESS/d' \
-e '/^DB_TXNVERSION/d' \
+ -e '/^DB_UNUSED/d' \
-e '/^DEFINE_DB_CLASS/d' \
- -e '/^LIST/d' \
+ -e '/^HASH_UNUSED/d' \
+ -e '/^LIST_/d' \
-e '/^LOG_OP/d' \
-e '/^MINFILL/d' \
-e '/^MUTEX_FIELDS/d' \
-e '/^NCACHED2X/d' \
-e '/^NCACHED30/d' \
-e '/^PAIR_MASK/d' \
- -e '/^POWER_OF_TWO/d' \
-e '/^P_16_COPY/d' \
-e '/^P_32_COPY/d' \
-e '/^P_32_SWAP/d' \
- -e '/^SH_CIRCLEQ/d' \
- -e '/^SH_LIST/d' \
- -e '/^SH_TAILQ/d' \
- -e '/^TAILQ/d' \
+ -e '/^P_TO_UINT16/d' \
+ -e '/^QPAGE_CHKSUM/d' \
+ -e '/^QPAGE_NORMAL/d' \
+ -e '/^QPAGE_SEC/d' \
+ -e '/^SH_CIRCLEQ_/d' \
+ -e '/^SH_LIST_/d' \
+ -e '/^SH_TAILQ_/d' \
+ -e '/^SIZEOF_PAGE/d' \
+ -e '/^TAILQ_/d' \
-e '/^WRAPPED_CLASS/d' \
- -e '/^XA_$/d' \
-e '/^__BIT_TYPES_DEFINED__/d' \
-e '/^__DBC_INTERNAL/d' \
- -e '/_AUTO_H$/d' \
- -e '/_H_$/d' \
- -e '/_UNUSED/d' \
- -e '/^i_/d' \
- -e '/ext_h_/d' \
+ -e '/^i_/d' \
+ -e '/_H_/d' \
-e 's/(.*//' | sort > $t1
+find $d -name '*.c' -o -name '*.cpp' > $t2
for i in `cat $t1`; do
- if egrep -w $i $d/*/*.c $d/*/*.cpp > /dev/null; then
+ if egrep -w $i `cat $t2` > /dev/null; then
:;
else
- f=`egrep -l "#define.*$i" $d/include/*.h $d/include/*.in |
- sed 's;\.\.\/\.\.\/include/;;' | tr -s "[:space:]" " "`
+ f=`egrep -l "#define.*$i" $d/dbinc/*.h $d/dbinc/*.in |
+ sed 's;\.\.\/\.\.\/dbinc/;;' | tr -s "[:space:]" " "`
echo "FAIL: $i: $f"
fi
-done | sort +1 > $t2
+done | sort -k 2 > $t3
-test -s $t2 && {
- cat $t2
+test -s $t3 && {
+ cat $t3
echo "FAIL: found unused #defines"
exit 1
}