view lib-src/vcdiff @ 4659:031aaf217dc3

(calendar-time-zone-daylight-rules): Scan through the next few years until at most one rule remains; if none remain, then just use the first candidate rule; it's wrong in general, but it's right for at least one year. This is a better heuristic in case the underlying time zone implementation has bugs (which is all too common). If possible, don't convert back and forth between gregorian and absolute; this speeds things up noticeably. This uses the new calendar-nth-named-absday function. (calendar-current-time-zone): Some locales start DST at a different time of day than they end; allow for this by yielding both times. The performance speedups in calendar.el are great enough that we now no longer need the "Checking time zone data..." message. If current-time-zone yields nil, don't bother with calendar-next-time-zone-transition. Use clearer names for local vars. (calendar-time-zone, calendar-daylight-time-offset, calendar-{standard,daylight}-time-zone-name, calendar-daylight-savings-{starts,ends}): Default to US Eastern rules for information that is not available. (calendar-daylight-savings-{starts,ends}-time): New vars, replacing calendar-daylight-savings-switchover-time, to support locales that start DST at a different time of day than they end. (calendar-absolute-from-time): Fix typo by interchanging floor and mod.
author Paul Eggert <eggert@twinsun.com>
date Sat, 28 Aug 1993 04:14:25 +0000
parents 8e72792f2d18
children 7124a811b67b
line wrap: on
line source

#!/bin/sh
#
# Enhanced sccs diff utility for use with vc mode.
# This version is more compatible with rcsdiff(1).
#
#	$Id: vcdiff,v 1.2 1993/06/30 18:54:08 eggert Exp eggert $
#

DIFF="diff"
usage="$0: Usage: vcdiff [-q] [-r<sid1>] [-r<sid2>] [diffopts] sccsfile..."

PATH=$PATH:/usr/ccs/bin:/usr/sccs # common SCCS hangouts

echo=
sid1=-r sid2=

for f
do
	case $f in
	-*)
		case $f in
		-q)
			echo=:;;
		-r?*)
			case $sid1 in
			-r)
				sid1=$f
				;;
			*)
				case $sid2 in
				?*) echo "$usage" >&2; exit 2 ;;
				esac
				sid2=$f
				;;
			esac
			;;
		*)
			options="$options $f"
			;;
		esac
		shift
		;;
	*)
		break
		;;
	esac
done

case $# in
0)
	echo "$usage" >&2
	exit 2
esac


rev1= rev2= status=0
trap 'status=2; exit' 1 2 13 15
trap 'rm -f $rev1 $rev2 || status=2; exit $status' 0

for f
do
	s=2

	case $f in
	s.* | */s.*)
		if
			rev1=/tmp/geta$$
			get -s -p -k $sid1 "$f" > $rev1 &&
			case $sid2 in
			'')
				workfile=`expr " /$f" : '.*/s.\(.*\)'`
				;;
			*)
				rev2=/tmp/getb$$
				get -s -p -k $sid2 "$f" > $rev2
				workfile=$rev2
			esac
		then
			$echo $DIFF $options $sid1 $sid2 $workfile >&2
			$DIFF $options $rev1 $workfile
			s=$?
		fi
		;;
	*)
		echo "$0: $f is not an SCCS file" >&2
	esac

	if test $status -lt $s
	then status=$s
	fi
done