if [ "$XDG" = "" ]; then
	XDG=src/dg.exe
fi

echo "cksum: "`hostname`
rm subin/.cksum.* */.cksum.*_dl.c

sed -n '1,/DIGEST-OFF/p' rary/windows.c|$XDG -Fcksum > rary/.cksum.windows.c
sed -n '1,/DIGEST-OFF/p' rary/wince.c  |$XDG -Fcksum > rary/.cksum.wince.c
sed -n '1,/DIGEST-OFF/p' rary/winmo.c  |$XDG -Fcksum > rary/.cksum.winmo.c
sed -n '1,/DIGEST-OFF/p' rary/winnat.c |$XDG -Fcksum > rary/.cksum.winnat.c
sed -n '1,/DIGEST-OFF/p' rary/winsspi.c|$XDG -Fcksum > rary/.cksum.winsspi.c

sed -n '1,/DIGEST-OFF/p' src/caps.c    |$XDG -Fcksum >  src/.cksum.caps.c
sed -n '1,/DIGEST-OFF/p' src/stls.c    |$XDG -Fcksum >  src/.cksum.stls.c
sed -n '1,/DIGEST-OFF/p' src/sox.c     |$XDG -Fcksum >  src/.cksum.sox.c
sed -n '1,/DIGEST-OFF/p' src/vsap.c    |$XDG -Fcksum >  src/.cksum.vsap.c
sed -n '1,/DIGEST-OFF/p' src/htaccept.c|$XDG -Fcksum >  src/.cksum.htaccept.c

ls -d */.cksum.* | $XDG -Fsort > .files
FILES=`cat .files`
$XDG -Fcksum -n -l $FILES
echo "CKSUM: "`cat $FILES |$XDG -Fsort| $XDG -Fcksum`" "`hostname`" "`uname`
