blob: 61a044ddb117fa04cf5dffacb7861b972e0400f1 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
#!/bin/sh
# Check possible problems in the MPFR source.
grep '^# *include *<math\.h>' *.c
grep -E 'mpfr_(underflow|overflow|nanflag|inexflag|erangeflag)_p' *.{c,h} | \
grep -v '^exceptions.c:' | grep -v '^mpfr-impl.h:#define mpfr_.*_p()' | \
grep -v '^mpfr.h:__MPFR_DECLSPEC '
grep -E 'if +(test|\[).* == ' acinclude.m4 configure.in
grep -E '="`' acinclude.m4 configure.in
grep GMP_RND {,tests/}*.{c,h} | grep -v '#define GMP_RND'
fdlv1="`sed -n '/Version / {s/.*Version //; s/,.*//; p; q}' fdl.texi`"
fdlv2="`sed -n '/GNU Free Documentation License/ \
{s/.*Version //; s/ or.*//; p; q}' mpfr.texi`"
[ "x$fdlv1" = "x$fdlv2" ] || cat <<EOF
GFDL versions differ:
fdl.texi: $fdlv1
mpfr.texi: $fdlv2
EOF
# Note: if paragraphs are reformatted, this may need to be updated.
lgpl="`sed -n '/version [0-9.]\+ or any later version/ \
{s/.*version //; s/ or.*//; p; q}' mpfr.texi`"
for file in {,tests/}*.{c,h}
do
[ "$file" = "get_patches.c" ] && file="get_patches.sh"
if grep -q "GNU MPFR Library" "$file"; then
grep -q "either version $lgpl of the License" "$file" || \
echo "Possibly missing or incorrect copyright notice in $file"
fi
done
true
|