3
# This isn't an ordinary regression test, but instead it runs splint
4
# on the source files in the src directory. If the user doesn't have
5
# splint, we do nothing and pretend success.
7
# splint is very fussy, and prints many spurious errors, which cannot
8
# all be fixed by editing the dbacl source code. In particular,
9
# nonstandard header files cause a problem, as do compiler
10
# idiosyncracies. So it is not a good idea to run the lint check as
11
# part of the regular regression tests, since it would make dbacl
12
# uncompilable on some systems.
14
# There are other issues such as the fact that dbacl uses realloc and
15
# splint can't deal with this properly. But overall, it's worth using
21
prerequisite_command() {
22
type $2 2>&1 > /dev/null
24
echo "$1: $2 not found, test will be skipped"
29
prerequisite_command $0 splint
31
# This part is messy. Some source files need special preprocessor symbols,
32
# so I've chosen to run a separate splint command on each source file.
33
# Ideally, this would be generated automatically by analysing the automake
34
# file, but I have no idea how to do it. Note that splint should only
35
# check the dbacl files, not the public domain files included from elsewhere.
37
splint -f $SRCDIR/splintrc $SRCDIR/dbacl.c \
38
&& splint -f $SRCDIR/splintrc $SRCDIR/bayesol.c \
39
&& splint -f $SRCDIR/splintrc $SRCDIR/catfun.c \
40
&& splint -f $SRCDIR/splintrc $SRCDIR/const.c \
41
&& splint -f $SRCDIR/splintrc $SRCDIR/dbacl.c \
42
&& splint -f $SRCDIR/splintrc $SRCDIR/fh.c \
43
&& splint -f $SRCDIR/splintrc $SRCDIR/fram.c \
44
&& splint -f $SRCDIR/splintrc $SRCDIR/hmine.c \
45
&& splint -f $SRCDIR/splintrc $SRCDIR/hparse.c \
46
&& splint -f $SRCDIR/splintrc $SRCDIR/hypex.c \
47
&& splint -f $SRCDIR/splintrc $SRCDIR/mailinspect.c \
48
&& splint -f $SRCDIR/splintrc -DMBW_WIDE $SRCDIR/mbw.c \
49
&& splint -f $SRCDIR/splintrc -DMBW_MB $SRCDIR/mbw.c \
50
&& splint -f $SRCDIR/splintrc $SRCDIR/probs.c \
51
&& splint -f $SRCDIR/splintrc $SRCDIR/rfc2822.c \
52
&& splint -f $SRCDIR/splintrc $SRCDIR/rfc822.c \
53
&& splint -f $SRCDIR/splintrc $SRCDIR/util.c