No empty .Rs/.Re
[netbsd-mini2440.git] / share / man / tools / ckfrefs
blob6d8ebd132d208a7423cde324bae1e5cab11fc87a
1 #! /bin/sh
3 # $NetBSD$
5 set x $*
6 . ./.param
8 for dir in $DIRLST
9 do
10 > $TMPDIR/fref$dir
11 cd $MANDIR/man$dir
12 for file in $FILLST
14 so=`line < $file | sed "s/ .*//"`
15 if test "$so" = ".so"
16 then
17 continue
19 ed - $file >> $TMPDIR/fref$dir <<!
20 /FILES/
21 +,/\.SH/-p
24 done
26 cd $TMPDIR
27 date > badfref$dir
28 echo >> badfref$dir
29 grep "/" fref$dir > /dev/null
30 if test $? -eq 1
31 then
32 rm -f fref$dir
33 continue
35 echo "\\t ," >> fref$dir
36 ed - fref$dir <<!
37 1,\$s/ /\\
39 1,\$s/ /\\
41 1,\$s/,/\\
43 v/\//d
44 g/:$/s///
45 g/\\\\(\*/s///g
46 g/\\\\s+1/s///g
47 g/\\\\s-1/s///g
48 g/\\\\s0/s///g
49 g/\\\\f./s///g
50 g/\\\\\*S/s///g
51 g/\\\\\&/s///g
52 g/\$\$/s//*/
53 g/^?/d
54 g/^\./d
55 g/tmp/d
56 g/spool/d
57 g/mail/d
58 g/^[^\/]/d
59 g/(/d
60 g/)/d
61 g/\'/d
62 g/\`/d
63 g/\"/d
64 g/\&/d
65 g/\|/d
66 1,\$s/^/ls /
70 sort fref$dir | uniq > tmp.$$
71 sh tmp.$$ > fref$dir 2>&1
72 grep "not found" fref$dir | sed "s/ not found//" >> badfref$dir
73 rm -f tmp.$$ fref$dir
74 done