3 # Enhanced sccs diff utility for use with vc mode.
4 # This version is more compatible with rcsdiff(1).
6 # !Id: vcdiff,v 1.4 1993/12/03 09:29:18 eggert Exp !
8 # Modified by: vladimir@Eng.Sun.COM on 95-06-07
9 # * Made sure that file arguments are specifed as s.<filename>.
10 # * Switched the assignments to $f inside the 3rd and 4th case statements of
12 # * Removed the incorrect initialization of sid1 before the first for-loop.
16 usage="$0: Usage: vcdiff [--brief] [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfile..."
18 PATH=$PATH:/usr/ccs/bin:/usr/sccs # common SCCS hangouts
39 ?*) echo "$usage" >&2; exit 2 ;;
65 trap 'status=2; exit' 1 2 13 15
66 trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0
72 # For files under SCCS control, fixup the file name to be the s. filename
74 if [ $f = `echo $f | sed -e 's|SCCS/s.||'` ]; then
83 get -s -p -k $sid1 "$f" > $rev1 &&
86 workfile=`expr " /$f" : '.*/s.\(.*\)'`
90 get -s -p -k $sid2 "$f" > $rev2
94 $echo $DIFF $options $sid1 $sid2 $workfile >&2
95 $DIFF $options $rev1 $workfile
100 echo "$0: $f is not an SCCS file" >&2
103 if test $status -lt $s