#! /bin/sh

t=__wt.$$
trap 'rm -f $t; exit 0' 0 1 2 3 13 15

l="`sed -e '/^[a-z]/! d' -e 's,^,../,' filelist`"
l="$l `ls ../src/include/*.[hi] ../src/include/*.in`"
l="$l `find ../test -name '*.c' -print | egrep -v '/packing/|/insert/'`"

# Look for '%l': that suggests we're trying to print a long value, and that's
# almost always wrong: we should use a portable PRI* macro to construct the
# format string instead.
(for f in $l ; do
    sed -n -E '/WT_VERBOSE|printf|scanf|__wt_errx?/,/\);/{=
p
}' $f |
    sed -e 'N' -e 's/\n/:/' -e "s,^,$f:,"
 done) | grep '%l' > $t
test -s $t && cat $t && exit 1

exit 0
