[comp.sources.unix] v24i014: CVS upgrade for RCS5.5 support, Part01/02

rsalz@bbn.com (Rich Salz) (02/26/91)

Submitted-by: Brian Berliner <berliner@central.sun.com>
Posting-number: Volume 24, Issue 14
Archive-name: cvs1.2upgrade/part01

This set of patches brings CVS 1.0 (with Patch01 applied) to patchlevel 2.
I also call this release "CVS 1.2".

The "ChangeLog" file describes the changes made with this release.  The
major functional addition is basic support for the recently released RCS 5.5
release.

CVS 1.0 was originally released through comp.sources.unix in volume22.
You can either apply this patch to the original CVS 1.0 distribution
found on uunet.uu.net in the comp.sources.unix/volume22/cvs-berliner directory,
or just pickup the entire CVS 1.2 distribution from either:

	prep.ai.mit.edu in pub/gnu/cvs-1.2.tar.Z
			or
	uunet.uu.net in gnu/cvs-1.2.tar.Z

Save this patch as "Patch02" in your top-level "cvs" directory and apply with:

	patch -p < Patch02

Good luck!

	Brian Berliner
	berliner@sun.com

[ Note that Patch02 was split into two parts for posting; see the PACKNOTES
  file --r$ ]

#! /bin/sh
# This is a shell archive.  Remove anything before this line, then feed it
# into a shell via "sh file" or similar.  To overwrite existing files,
# type "sh file -c".
# The tool that generated this appeared in the comp.sources.unix newsgroup;
# send mail to comp-sources-unix@uunet.uu.net if you want that tool.
# Contents:  PACKNOTES MANIFEST Patch02.01
# Wrapped by rsalz@litchi.bbn.com on Mon Feb 25 16:05:38 1991
PATH=/bin:/usr/bin:/usr/ucb ; export PATH
echo If this archive is complete, you will see the following message:
echo '          "shar: End of archive 1 (of 2)."'
if test -f 'PACKNOTES' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'PACKNOTES'\"
else
  echo shar: Extracting \"'PACKNOTES'\" \(82 characters\)
  sed "s/^X//" >'PACKNOTES' <<'END_OF_FILE'
X# "Patch02" was split into 2 parts; to create it, do
X	cat Patch02.0[1-9] >Patch02
END_OF_FILE
  if test 82 -ne `wc -c <'PACKNOTES'`; then
    echo shar: \"'PACKNOTES'\" unpacked with wrong size!
  fi
  # end of 'PACKNOTES'
fi
if test -f 'MANIFEST' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'MANIFEST'\"
else
  echo shar: Extracting \"'MANIFEST'\" \(279 characters\)
  sed "s/^X//" >'MANIFEST' <<'END_OF_FILE'
X   File Name		Archive #	Description
X----------------------------------------------------------
XPACKNOTES                  1	Warnings about long lines, etc
XMANIFEST                   1	This shipping list
XPatch02.01                 1	(part 1)
XPatch02.02                 2	(part 2)
END_OF_FILE
  if test 279 -ne `wc -c <'MANIFEST'`; then
    echo shar: \"'MANIFEST'\" unpacked with wrong size!
  fi
  # end of 'MANIFEST'
fi
if test -f 'Patch02.01' -a "${1}" != "-c" ; then 
  echo shar: Will not clobber existing file \"'Patch02.01'\"
else
  echo shar: Extracting \"'Patch02.01'\" \(49821 characters\)
  sed "s/^X//" >'Patch02.01' <<'END_OF_FILE'
Xdiff -c /dev/null ChangeLog:1.1
X*** /dev/null	Wed Feb  6 11:32:17 1991
X--- ChangeLog	Wed Feb  6 11:32:17 1991
X***************
X*** 0 ****
X--- 1,89 ----
X+ Wed Feb  6 10:10:58 1991  Brian Berliner  (berliner at sun.com)
X+ 
X+ 	* Changes from CVS 1.0 Patchlevel 1 to CVS 1.0 Patchlevel 2; also
X+ 	known as "Changes from CVS 1.1 to CVS 1.2".
X+ 
X+ 	* Major new support with this release is the ability to use the
X+ 	recently-posted RCS 5.5 distribution with CVS 1.2.  See below for
X+ 	other assorted bug-fixes that have been thrown in.
X+ 
X+ 	* ChangeLog (new): Added Emacs-style change-log file to CVS 1.2
X+ 	release.  Chronological description of changes between release.
X+ 
X+ 	* README: Small fixes to installation instructions.  My email
X+ 	address is now "berliner@sun.com".
X+ 
X+ 	* src/Makefile: Removed "rcstime.h".  Removed "depend" rule.
X+ 
X+ 	* src/partime.c:  Updated to RCS 5.5 version with hooks for CVS.
X+ 	* src/maketime.c: Updated to RCS 5.5 version with hooks for CVS.
X+ 	* src/rcstime.h:  Removed from the CVS 1.2 distribution.
X+ 	Thanks to Paul Eggert <eggert@twinsun.com> for these changes.
X+ 
X+ 	* src/checkin.csh: Support for RCS 5.5 parsing.
X+ 	Thanks to Paul Eggert <eggert@twinsun.com> for this change.
X+ 
X+ 	* src/collect_sets.c (Collect_Sets): Be quieter if "-f" option is
X+ 	specified.  When checking out files on-top-of other files that CVS
X+ 	doesn't know about, run a diff in the hopes that they are really
X+ 	the same file before aborting.
X+ 
X+ 	* src/commit.c (branch_number): Fix for RCS 5.5 parsing.
X+ 	Thanks to Paul Eggert <eggert@twinsun.com> for this change.
X+ 
X+ 	* src/commit.c (do_editor): Bug fix - fprintf missing argument
X+ 	which sometimes caused core dumps.
X+ 
X+ 	* src/modules.c (process_module): Properly NULL-terminate
X+ 	update_dir[] in all cases.
X+ 
X+ 	* src/no_difference.c (No_Difference): The wrong RCS revision was
X+ 	being registered in certain (strange) cases.
X+ 
X+ 	* src/patch.c (get_rcsdate): New algorithm.  No need to call
X+ 	maketime() any longer.
X+ 	Thanks to Paul Eggert <eggert@twinsun.com> for this change.
X+ 
X+ 	* src/patchlevel.h: Increased patch level to "2".
X+ 
X+ 	* src/subr.c (isdir, islink): Changed to compare stat mode bits
X+ 	correctly.
X+ 
X+ 	* src/tag.c (tag_file): Added support for following symbolic links
X+ 	that are in the master source repository when tagging.  Made tag
X+ 	somewhat quieter in certain cases.
X+ 
X+ 	* src/update.c (update_process_lists): Unlink the user's file if it
X+ 	was put on the Wlist, meaning that the user's file is not modified
X+ 	and its RCS file has been removed by someone else.
X+ 
X+ 	* src/update.c (update): Support for "cvs update dir" to correctly
X+ 	just update the argument directory "dir".
X+ 
X+ 	* src/cvs.h: Fixes for RCS 5.5 parsing.
X+ 	* src/version_number.c (Version_Number): Fixes for parsing RCS 5.5
X+ 	and older RCS-format files.
X+ 	Thanks to Paul Eggert <eggert@twinsun.com> for these changes.
X+ 
X+ 	* src/version_number.c (Version_Number): Bug fixes for "-f" option.
X+ 	Bug fixes for parsing with certain branch numbers.  RCS
X+ 	revision/symbol parsing is much more solid now.
X+ 
X+ Wed Feb 14 10:01:33 1990  Brian Berliner  (berliner at sun.com)
X+ 
X+ 	* Changes from CVS 1.0 Patchlevel 0 to CVS 1.0 Patchlevel 1; also
X+ 	known as "Changes from CVS 1.0 to CVS 1.1".
X+ 
X+ 	* src/patch.c (get_rcsdate): Portability fix.  Replaced call to
X+ 	timelocal() with call to maketime().
X+ 
X+ Mon Nov 19 23:15:11 1990  Brian Berliner  (berliner at prisma.com)
X+ 
X+ 	* Sent CVS 1.0 release to comp.sources.unix moderator and FSF.
X+ 
X+ 	* Special thanks to Dick Grune <dick@cs.vu.nl> for his work on the
X+ 	1986 version of CVS and making it available to the world.  Dick's
X+ 	version is available on uunet.uu.net in the
X+ 	comp.sources.unix/volume6/cvs directory.
X+ 
X+ $Id: ChangeLog,v 1.1 91/02/06 18:29:01 berliner Exp $
Xdiff -c README:1.3 README:1.3.1.2
X*** README:1.3	Wed Feb  6 11:32:17 1991
X--- README	Wed Feb  6 11:32:17 1991
X***************
X*** 1,4 ****
X! $Id: README,v 1.3 89/11/19 23:15:11 berliner Exp $
X  
X  
X  			   CVS Kit, Version 1.0
X--- 1,4 ----
X! $Id: README,v 1.3.1.2 91/02/06 18:26:40 berliner Exp $
X  
X  
X  			   CVS Kit, Version 1.0
X***************
X*** 36,46 ****
X  volume 6 release sometime in 1986.  This original version was a collection
X  of shell scripts. 
X  
X! Brian Berliner from Prisma, Inc. converted the original CVS shell scripts
X! into reasonably fast C and added many, many features to support software
X! release control functions.  See the manual page in the "man" directory, and
X! a copy of the USENIX article presented at the Winter 1990 USENIX
X! Conference, Washington D.C., is included in the "doc" directory.
X  
X  This code has been tested extensively on Sun-4 and Sun-3 platforms, all
X  running SunOS 4.X.  Your mileage may vary for other systems, and I would
X--- 36,47 ----
X  volume 6 release sometime in 1986.  This original version was a collection
X  of shell scripts. 
X  
X! ! Brian Berliner from Prisma, Inc. (now at Sun Microsystems, Inc.) converted
X! ! the original CVS shell scripts into reasonably fast C and added many, many
X! ! features to support software release control functions.  See the manual
X! ! page in the "man" directory.  A copy of the USENIX article presented
X! ! at the Winter 1990 USENIX Conference, Washington D.C., is included in
X! ! the "doc" directory.
X  
X  This code has been tested extensively on Sun-4 and Sun-3 platforms, all
X  running SunOS 4.X.  Your mileage may vary for other systems, and I would
X***************
X*** 120,125 ****
X--- 121,127 ----
X      following commands:
X  
X  		mkdir $CVSROOT/cvs
X+ 		make clean
X  		checkin -m 'CVS 1.0 distribution' cvs CVS CVS1_0
X  
X  11) Having done step 10, one should be able to checkout a copy of the CVS
X***************
X*** 135,141 ****
X      can usually be retrieved with the "cvs checkout modules" command, and
X      definitely with the "cvs checkout CVSROOT.adm" command.
X  
X! 13) PLEASE report any problems to me, berliner@prisma.com (Brian Berliner)
X      and I will try to collect patches and enhancements into future CVS
X      distributions.  "patch" format files are best, using context diffs,
X      if you will.
X--- 137,143 ----
X      can usually be retrieved with the "cvs checkout modules" command, and
X      definitely with the "cvs checkout CVSROOT.adm" command.
X  
X! 13) PLEASE report any problems to me, berliner@sun.com (Brian Berliner)
X      and I will try to collect patches and enhancements into future CVS
X      distributions.  "patch" format files are best, using context diffs,
X      if you will.
X***************
X*** 143,146 ****
X  14) GOOD LUCK!
X  
X  					Brian Berliner
X! 					berliner@prisma.com
X--- 145,148 ----
X  14) GOOD LUCK!
X  
X  					Brian Berliner
X! 					berliner@sun.com
Xdiff -c src/Makefile:1.20 src/Makefile:1.20.1.1
X*** src/Makefile:1.20	Wed Feb  6 11:32:10 1991
X--- src/Makefile	Wed Feb  6 11:32:10 1991
X***************
X*** 1,5 ****
X  #
X! #	$Id: Makefile,v 1.20 89/11/20 00:06:32 berliner Exp $
X  #
X  # Makefile for CVS
X  #
X--- 1,5 ----
X  #
X! #	$Id: Makefile,v 1.20.1.1 91/01/18 12:04:00 berliner Exp $
X  #
X  # Makefile for CVS
X  #
X***************
X*** 23,29 ****
X  CSHEXT=		.csh
X  CSHELLS=	checkin${CSHEXT}
X  
X! HEADERS=	cvs.h patchlevel.h rcstime.h
X  DESTDIR=	/usr/local/bin
X  
X  ALLSRCS=	${COMMONSRCS} ${CVSSRCS} ${MODSRCS}
X--- 23,30 ----
X  CSHEXT=		.csh
X  CSHELLS=	checkin${CSHEXT}
X  
X! HEADERS=	cvs.h patchlevel.h
X! ALLOBJS=	${COMMONOBJS} ${CVSOBJS} ${MODOBJS}
X  DESTDIR=	/usr/local/bin
X  
X  ALLSRCS=	${COMMONSRCS} ${CVSSRCS} ${MODSRCS}
X***************
X*** 69,234 ****
X  	done
X  
X  depend:
X! 	/bin/rm -f makedep
X! 	for i in ${ALLSRCS}; do \
X! 	    ${CC} -M ${INCPATH} $$i | \
X! 	    awk ' { if ($$1 != prev) \
X! 		{ if (rec != "") print rec; rec = $$0; prev = $$1; } \
X! 		else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
X! 		else rec = rec " " $$2 } } \
X! 		END { print rec } ' >> makedep; done
X! 	echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
X! 	echo '$$r makedep' >>eddep
X! 	echo 'w' >>eddep
X! 	cp Makefile Makefile.bak
X! 	ed - Makefile < eddep
X! 	/bin/rm eddep makedep
X! 	echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
X! 	echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
X! 	echo '# see make depend above' >> Makefile
X! 
X! # DO NOT DELETE THIS LINE
X! 
X! subr.o: subr.c /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! subr.o: /usr/include/sys/stat.h /usr/include/sys/file.h
X! subr.o: /usr/include/sys/fcntlcom.h /usr/include/varargs.h ./cvs.h
X! subr.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! add.o: add.c /usr/include/sys/param.h /usr/include/machine/param.h
X! add.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! add.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
X! add.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! build_entry.o: build_entry.c /usr/include/sys/param.h
X! build_entry.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! build_entry.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! build_entry.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! build_entry.o: /usr/include/string.h /usr/include/stdio.h
X! checkin.o: checkin.c /usr/include/sys/param.h /usr/include/machine/param.h
X! checkin.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! checkin.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! checkin.o: /usr/include/ctype.h ./cvs.h /usr/include/strings.h
X! checkin.o: /usr/include/string.h /usr/include/stdio.h
X! checkout.o: checkout.c /usr/include/sys/param.h /usr/include/machine/param.h
X! checkout.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! checkout.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! checkout.o: /usr/include/ndbm.h ./cvs.h /usr/include/strings.h
X! checkout.o: /usr/include/string.h /usr/include/stdio.h
X! collect_sets.o: collect_sets.c /usr/include/sys/param.h
X! collect_sets.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! collect_sets.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! collect_sets.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! collect_sets.o: /usr/include/string.h /usr/include/stdio.h
X! commit.o: commit.c /usr/include/sys/param.h /usr/include/machine/param.h
X! commit.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! commit.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! commit.o: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/ctype.h
X! commit.o: ./cvs.h /usr/include/strings.h /usr/include/string.h
X! commit.o: /usr/include/stdio.h
X! create_admin.o: create_admin.c /usr/include/sys/param.h
X! create_admin.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! create_admin.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! create_admin.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! create_admin.o: /usr/include/string.h /usr/include/stdio.h
X! diff.o: diff.c /usr/include/sys/param.h /usr/include/machine/param.h
X! diff.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! diff.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
X! diff.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! entries_file.o: entries_file.c ./cvs.h /usr/include/strings.h
X! entries_file.o: /usr/include/string.h /usr/include/stdio.h
X! find_names.o: find_names.c /usr/include/sys/param.h
X! find_names.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! find_names.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! find_names.o: /usr/include/sys/sysmacros.h /usr/include/sys/types.h
X! find_names.o: /usr/include/dirent.h /usr/include/sys/dirent.h ./cvs.h
X! find_names.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! join.o: join.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! join.o: /usr/include/stdio.h
X! locate_rcs.o: locate_rcs.c /usr/include/sys/param.h
X! locate_rcs.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! locate_rcs.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! locate_rcs.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! locate_rcs.o: /usr/include/string.h /usr/include/stdio.h
X! log.o: log.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! log.o: /usr/include/stdio.h
X! main.o: main.c /usr/include/sys/param.h /usr/include/machine/param.h
X! main.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! main.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
X! main.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! main.o: ./patchlevel.h
X! maketime.o: maketime.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! maketime.o: /usr/include/stdio.h ./rcstime.h /usr/include/sys/types.h
X! maketime.o: /usr/include/sys/sysmacros.h /usr/include/sys/timeb.h
X! modules.o: modules.c /usr/include/sys/param.h /usr/include/machine/param.h
X! modules.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! modules.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! modules.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
X! modules.o: /usr/include/ndbm.h ./cvs.h /usr/include/strings.h
X! modules.o: /usr/include/string.h /usr/include/stdio.h
X! name_repository.o: name_repository.c /usr/include/sys/param.h
X! name_repository.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! name_repository.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! name_repository.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! name_repository.o: /usr/include/string.h /usr/include/stdio.h
X! no_difference.o: no_difference.c /usr/include/sys/param.h
X! no_difference.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! no_difference.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! no_difference.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! no_difference.o: /usr/include/string.h /usr/include/stdio.h
X! options.o: options.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! options.o: /usr/include/stdio.h
X! partime.o: partime.c /usr/include/stdio.h /usr/include/ctype.h ./rcstime.h
X! patch.o: patch.c /usr/include/sys/param.h /usr/include/machine/param.h
X! patch.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! patch.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! patch.o: /usr/include/time.h /usr/include/ndbm.h /usr/include/dirent.h
X! patch.o: /usr/include/sys/dirent.h /usr/include/ctype.h ./cvs.h
X! patch.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! register.o: register.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! register.o: /usr/include/stdio.h
X! remove.o: remove.c /usr/include/sys/param.h /usr/include/machine/param.h
X! remove.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! remove.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
X! remove.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! scratch_entry.o: scratch_entry.c /usr/include/sys/param.h
X! scratch_entry.o: /usr/include/machine/param.h /usr/include/sys/signal.h
X! scratch_entry.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
X! scratch_entry.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
X! scratch_entry.o: /usr/include/string.h /usr/include/stdio.h
X! set_lock.o: set_lock.c /usr/include/sys/param.h /usr/include/machine/param.h
X! set_lock.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! set_lock.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! set_lock.o: /usr/include/sys/types.h /usr/include/sys/stat.h
X! set_lock.o: /usr/include/signal.h /usr/include/dirent.h
X! set_lock.o: /usr/include/sys/dirent.h ./cvs.h /usr/include/strings.h
X! set_lock.o: /usr/include/string.h /usr/include/stdio.h
X! status.o: status.c ./cvs.h /usr/include/strings.h /usr/include/string.h
X! status.o: /usr/include/stdio.h
X! tag.o: tag.c /usr/include/sys/param.h /usr/include/machine/param.h
X! tag.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! tag.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! tag.o: /usr/include/ndbm.h /usr/include/dirent.h /usr/include/sys/dirent.h
X! tag.o: /usr/include/ctype.h ./cvs.h /usr/include/strings.h
X! tag.o: /usr/include/string.h /usr/include/stdio.h
X! update.o: update.c /usr/include/sys/param.h /usr/include/machine/param.h
X! update.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! update.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! update.o: /usr/include/sys/types.h /usr/include/sys/stat.h
X! update.o: /usr/include/dirent.h /usr/include/sys/dirent.h ./cvs.h
X! update.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! version_number.o: version_number.c /usr/include/ctype.h ./cvs.h
X! version_number.o: /usr/include/strings.h /usr/include/string.h
X! version_number.o: /usr/include/stdio.h
X! version_ts.o: version_ts.c /usr/include/sys/types.h
X! version_ts.o: /usr/include/sys/sysmacros.h /usr/include/sys/timeb.h
X! version_ts.o: /usr/include/sys/stat.h /usr/include/ctype.h /usr/include/grp.h
X! version_ts.o: /usr/include/pwd.h /usr/include/utmp.h ./cvs.h
X! version_ts.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
X! mkmodules.o: mkmodules.c /usr/include/sys/param.h /usr/include/machine/param.h
X! mkmodules.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
X! mkmodules.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
X! mkmodules.o: /usr/include/fcntl.h /usr/include/sys/fcntlcom.h
X! mkmodules.o: /usr/include/signal.h /usr/include/ndbm.h /usr/include/ctype.h
X! mkmodules.o: ./cvs.h /usr/include/strings.h /usr/include/string.h
X! mkmodules.o: /usr/include/stdio.h
X! # DEPENDENCIES MUST END AT END OF FILE
X! # IF YOU PUT STUFF HERE IT WILL GO AWAY
X! # see make depend above
X--- 70,78 ----
X  	done
X  
X  depend:
X! 	@exit 0				# done by hand now
X! 
X! #
X! # Dependencies -- done by hand since some systems don't have cc -M!
X! #
X! ${ALLOBJS}:	${HEADERS}
Xdiff -c src/checkin.csh:1.8 src/checkin.csh:1.8.1.1
X*** src/checkin.csh:1.8	Wed Feb  6 11:32:08 1991
X--- src/checkin.csh	Wed Feb  6 11:32:08 1991
X***************
X*** 1,6 ****
X  #!/bin/csh
X  #
X! # $Id: checkin.csh,v 1.8 89/11/20 13:37:33 berliner Exp $
X  #
X  #   Copyright (c) 1989, Brian Berliner
X  #
X--- 1,6 ----
X  #!/bin/csh
X  #
X! # $Id: checkin.csh,v 1.8.1.1 91/01/18 12:06:34 berliner Exp $
X  #
X  #   Copyright (c) 1989, Brian Berliner
X  #
X***************
X*** 182,199 ****
X  	    else 
X  		set file = ${update_dir}/Attic/${name},v
X  		echo "WARNING: Updating ${repository}/Attic/${name}"
X! 	        set head = `head -1 $file`
X! 	        set branch = `head -2 $file | ${grep} -w branch`
X! 	        if ( $#head != 2 || $#branch != 2 ) then
X  		    echo "ERROR: corrupted RCS file $file - aborting"
X  	        endif
X! 	        if ( "$head[2]" == "1.1;" && "$branch[2]" != "1.1.1;" ) then
X  		    ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
X  		    if ( ! $status ) then
X  		        set new = 1
X  		    endif
X  	        else
X! 	            if ( "$branch[2]" != "1.1.1;" ) then
X  		        echo -n "WARNING: Updating locally modified file "
X  			echo    "${repository}/Attic/${name}"
X  	            endif
X--- 182,203 ----
X  	    else 
X  		set file = ${update_dir}/Attic/${name},v
X  		echo "WARNING: Updating ${repository}/Attic/${name}"
X! 	        set headbranch = `sed -n '/^head/p; /^branch/p; 2q' $file`
X! 	        if ( $#headbranch != 2 && $#headbranch != 4 ) then
X  		    echo "ERROR: corrupted RCS file $file - aborting"
X  	        endif
X! 		set head = "$headbranch[2]"
X! 		set branch = ""
X! 		if ( $#headbranch == 4 ) then
X! 		    set branch = "$headbranch[4]"
X! 		endif
X! 	        if ( "$head" == "1.1;" && "$branch" != "1.1.1;" ) then
X  		    ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
X  		    if ( ! $status ) then
X  		        set new = 1
X  		    endif
X  	        else
X! 	            if ( "$branch" != "1.1.1;" ) then
X  		        echo -n "WARNING: Updating locally modified file "
X  			echo    "${repository}/Attic/${name}"
X  	            endif
X***************
X*** 200,217 ****
X  	        endif
X  	    endif
X  	else
X! 	    set head = `head -1 $file`
X! 	    set branch = `head -2 $file | ${grep} -w branch`
X! 	    if ( $#head != 2 || $#branch != 2 ) then
X  		echo "ERROR: corrupted RCS file $file - aborting"
X  	    endif
X! 	    if ( "$head[2]" == "1.1;" && "$branch[2]" != "1.1.1;" ) then
X  		${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
X  		if ( ! $status ) then
X  		    set new = 1
X  		endif
X  	    else
X! 	        if ( "$branch[2]" != "1.1.1;" ) then
X  		    echo -n "WARNING: Updating locally modified file "
X  		    echo    "${repository}/${name}"
X  	        endif
X--- 204,225 ----
X  	        endif
X  	    endif
X  	else
X! 	    set headbranch = `sed -n '/^head/p; /^branch/p; 2q' $file`
X! 	    if ( $#headbranch != 2 && $#headbranch != 4 ) then
X  		echo "ERROR: corrupted RCS file $file - aborting"
X  	    endif
X! 	    set head = "$headbranch[2]"
X! 	    set branch = ""
X! 	    if ( $#headbranch == 4 ) then
X! 		set branch = "$headbranch[4]"
X! 	    endif
X! 	    if ( "$head" == "1.1;" && "$branch" != "1.1.1;" ) then
X  		${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
X  		if ( ! $status ) then
X  		    set new = 1
X  		endif
X  	    else
X! 	        if ( "$branch" != "1.1.1;" ) then
X  		    echo -n "WARNING: Updating locally modified file "
X  		    echo    "${repository}/${name}"
X  	        endif
Xdiff -c src/collect_sets.c:1.15 src/collect_sets.c:1.15.1.1
X*** src/collect_sets.c:1.15	Wed Feb  6 11:32:09 1991
X--- src/collect_sets.c	Wed Feb  6 11:32:09 1991
X***************
X*** 1,5 ****
X  #ifndef lint
X! static char rcsid[] = "$Id: collect_sets.c,v 1.15 89/11/19 23:19:51 berliner Exp $";
X  #endif !lint
X  
X  /*
X--- 1,5 ----
X  #ifndef lint
X! static char rcsid[] = "$Id: collect_sets.c,v 1.15.1.1 91/01/29 07:16:13 berliner Exp $";
X  #endif !lint
X  
X  /*
X***************
X*** 75,83 ****
X  			ret++;
X  		    }
X  		} else {		/* there is a user file */
X! 		    warn(0, "use `cvs add' to create entry for %s",
X! 			 update_user);
X! 		    ret++;
X  		}
X  	    } else {
X  		/*
X--- 75,85 ----
X  			ret++;
X  		    }
X  		} else {		/* there is a user file */
X! 		    if (!force_tag_match) {
X! 			warn(0, "use `cvs add' to create entry for %s",
X! 			     update_user);
X! 			ret++;
X! 		    }
X  		}
X  	    } else {
X  		/*
X***************
X*** 92,103 ****
X  		} else {
X  		    /*
X  		     * There is a user file; print a warning and add it
X! 		     * to the conflict list, Clist
X  		     */
X! 		    warn(0, "move away %s; it is in the way", update_user);
X! 		    (void) strcat(Clist, " ");
X! 		    (void) strcat(Clist, User);
X! 		    ret++;
X  		}
X  	    }
X  	} else if (VN_User[0] == '0' && VN_User[1] == '\0') {
X--- 94,113 ----
X  		} else {
X  		    /*
X  		     * There is a user file; print a warning and add it
X! 		     * to the conflict list, Clist, only if it is indeed
X! 		     * different from what we plan to extract
X  		     */
X! 		    No_Difference(0);
X! 		    if (strcmp(TS_Rcs, TS_User) == 0) {
X! 			(void) strcat(Olist, " ");
X! 			(void) strcat(Olist, User);
X! 		    } else {
X! 			warn(0, "move away %s; it is in the way",
X! 			     update_user);
X! 			(void) strcat(Clist, " ");
X! 			(void) strcat(Clist, User);
X! 			ret++;
X! 		    }
X  		}
X  	    }
X  	} else if (VN_User[0] == '0' && VN_User[1] == '\0') {
X***************
X*** 210,220 ****
X  		     * longer in the repository, a conflict is raised
X  		     */
X  		    if (!force_tag_match) {
X! 			warn(0, "conflict: %s is modified but no longer in the repository",
X! 			     update_user);
X! 			(void) strcat(Clist, " ");
X! 			(void) strcat(Clist, User);
X! 			ret++;
X  		    }
X  		}
X  	    } else if (strcmp(VN_Rcs, VN_User) == 0) {
X--- 220,241 ----
X  		     * longer in the repository, a conflict is raised
X  		     */
X  		    if (!force_tag_match) {
X! 			Locate_RCS();
X! 			(void) No_Difference(0);
X! 			if (strcmp(TS_User, TS_Rcs) == 0) {
X! 			    warn(0,
X! 		"warning: %s is not (any longer) pertinent",
X! 				 update_user);
X! 			    (void) strcat(Wlist, " ");
X! 			    (void) strcat(Wlist, User);
X! 			} else {
X! 			    warn(0,
X! 		"conflict: %s is modified but no longer in the repository",
X! 				 update_user);
X! 			    (void) strcat(Clist, " ");
X! 			    (void) strcat(Clist, User);
X! 			    ret++;
X! 			}
X  		    }
X  		}
X  	    } else if (strcmp(VN_Rcs, VN_User) == 0) {
Xdiff -c src/commit.c:1.28 src/commit.c:1.28.1.2
X*** src/commit.c:1.28	Wed Feb  6 11:32:14 1991
X--- src/commit.c	Wed Feb  6 11:32:15 1991
X***************
X*** 1,5 ****
X  #ifndef lint
X! static char rcsid[] = "$Id: commit.c,v 1.28 89/11/19 23:40:32 berliner Exp $";
X  #endif !lint
X  
X  /*
X--- 1,5 ----
X  #ifndef lint
X! static char rcsid[] = "$Id: commit.c,v 1.28.1.2 91/01/29 07:16:59 berliner Exp $";
X  #endif !lint
X  
X  /*
X***************
X*** 470,475 ****
X--- 470,476 ----
X      }
X      (void) fclose(fp);
X      if (strncmp(line, RCSBRANCH, sizeof(RCSBRANCH) - 1) != 0 ||
X+ 	!isspace(line[sizeof(RCSBRANCH) - 1]) ||
X  	(cp = rindex(line, ';')) == NULL)
X  	return;
X      *cp = '\0';				/* strip the ';' */
X***************
X*** 556,568 ****
X      setup_tmpfile(fp, CVSEDITPREFIX);
X      (void) fprintf(fp, "%sEnter Log.  Lines beginning with '%s' are removed automatically\n",
X  		   CVSEDITPREFIX, CVSEDITPREFIX);
X!     (void) fprintf(fp, "%s----------------------------------------------------------------------\n");
X      (void) fclose(fp);
X      (void) sprintf(prog, "%s %s", Editor, fname);
X!     if (system(prog) != 0) {
X! 	(void) unlink(fname);
X  	warn(0, "warning: editor session failed");
X-     }
X      fp = open_file(fname, "r");
X      while (fgets(line, sizeof(line), fp) != NULL) {
X  	if (strncmp(line, CVSEDITPREFIX, sizeof(CVSEDITPREFIX)-1) == 0)
X--- 557,567 ----
X      setup_tmpfile(fp, CVSEDITPREFIX);
X      (void) fprintf(fp, "%sEnter Log.  Lines beginning with '%s' are removed automatically\n",
X  		   CVSEDITPREFIX, CVSEDITPREFIX);
X!     (void) fprintf(fp, "%s----------------------------------------------------------------------\n", CVSEDITPREFIX);
X      (void) fclose(fp);
X      (void) sprintf(prog, "%s %s", Editor, fname);
X!     if (system(prog) != 0)
X  	warn(0, "warning: editor session failed");
X      fp = open_file(fname, "r");
X      while (fgets(line, sizeof(line), fp) != NULL) {
X  	if (strncmp(line, CVSEDITPREFIX, sizeof(CVSEDITPREFIX)-1) == 0)
Xdiff -c src/cvs.h:1.24 src/cvs.h:1.24.1.1
X*** src/cvs.h:1.24	Wed Feb  6 11:32:11 1991
X--- src/cvs.h	Wed Feb  6 11:32:12 1991
X***************
X*** 1,4 ****
X! /*	$Id: cvs.h,v 1.24 89/11/19 23:19:57 berliner Exp $	*/
X  
X  #include <strings.h>
X  #include <string.h>
X--- 1,4 ----
X! /*	$Id: cvs.h,v 1.24.1.1 91/01/18 12:13:48 berliner Exp $	*/
X  
X  #include <strings.h>
X  #include <string.h>
X***************
X*** 75,84 ****
X  #define	RCS_MERGE_PAT	"^>>>>>>> "	/* runs "grep" with this pattern */
X  #define	RCSID_PAT	"'\\$Id.*\\$'"	/* when committing files */
X  #define	RCSEXT		",v"
X! #define	RCSHEAD		"head "
X! #define	RCSBRANCH	"branch "
X! #define	RCSSYMBOL	"symbols "
X! #define	RCSDATE		"date "
X  #define	RCSDESC		"desc"		/* ends the search for branches */
X  #define	DATEFORM	"%02d.%02d.%02d.%02d.%02d.%02d"
X  
X--- 75,84 ----
X  #define	RCS_MERGE_PAT	"^>>>>>>> "	/* runs "grep" with this pattern */
X  #define	RCSID_PAT	"'\\$Id.*\\$'"	/* when committing files */
X  #define	RCSEXT		",v"
X! #define	RCSHEAD		"head"
X! #define	RCSBRANCH	"branch"
X! #define	RCSSYMBOL	"symbols"
X! #define	RCSDATE		"date"
X  #define	RCSDESC		"desc"		/* ends the search for branches */
X  #define	DATEFORM	"%02d.%02d.%02d.%02d.%02d.%02d"
X  
Xdiff -c src/maketime.c:1.2 src/maketime.c:1.2.1.1
X*** src/maketime.c:1.2	Wed Feb  6 11:32:08 1991
X--- src/maketime.c	Wed Feb  6 11:32:08 1991
X***************
X*** 1,19 ****
X! #ifndef lint
X! static char rcsid[] = "$Id: maketime.c,v 1.2 89/05/11 12:03:02 berliner Exp $";
X! #endif !lint
X! 
X  /*
X   * MAKETIME		derive 32-bit time value from TM structure.
X   *
X   * Usage:
X!  *	long t,maketime();
X   *	struct tm *tp;	Pointer to TM structure from <time.h>
X!  *			NOTE: this must be extended version!!!
X!  *	t = maketime(tp);
X   *
X   * Returns:
X!  *	0 if failure; parameter out of range or nonsensical.
X!  *	else long time-value.
X   * Notes:
X   *	This code is quasi-public; it may be used freely in like software.
X   *	It is not to be sold, nor used in licensed software without
X--- 1,17 ----
X! #
X  /*
X   * MAKETIME		derive 32-bit time value from TM structure.
X   *
X   * Usage:
X!  *	int zone;	Minutes west of GMT, or
X!  *			48*60 for localtime
X!  *	time_t t;
X   *	struct tm *tp;	Pointer to TM structure from <time.h>
X!  *	t = maketime(tp,zone);
X   *
X   * Returns:
X!  *	-1 if failure; parameter out of range or nonsensical.
X!  *	else time-value.
X   * Notes:
X   *	This code is quasi-public; it may be used freely in like software.
X   *	It is not to be sold, nor used in licensed software without
X***************
X*** 22,55 ****
X   * 	Copyright 1981 by Ken Harrenstien, SRI International.
X   *	(ARPANET: KLH @ SRI)
X   */
X  
X  #include "cvs.h"
X! #include "rcstime.h"
X  
X! int daytb[] = {   /* # days in year thus far, indexed by month (0-12!!) */
X  	0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
X  };
X  
X! struct tm *localtime();
X! long	time();
X! 
X! long maketime(atm)
X! struct tm *atm;
X! {	register struct tm *tp;
X! 	register int i;
X! 	int year, yday, mon, day, hour, min, sec, zone, dst, leap;
X! 	long tres, curtim;
X! 
X! 	(void) time(&curtim);
X! 	tp = localtime(&curtim);        /* Get breakdowns of current time */
X! 	year = tp->tm_year;		/* Use to set up defaults */
X! 	mon = tp->tm_mon;
X! 	day = tp->tm_mday;
X  
X  
X  #ifdef DEBUG
X! printf("first YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
X! #endif DEBUG
X  	tp = atm;
X  
X  	/* First must find date, using specified year, month, day.
X--- 20,174 ----
X   * 	Copyright 1981 by Ken Harrenstien, SRI International.
X   *	(ARPANET: KLH @ SRI)
X   */
X+ /* $Log:	maketime.c,v $
X+  * Revision 1.2.1.1  91/01/18  12:15:21  berliner
X+  * For CVS 1.2, contributed by Paul Eggert
X+  * 
X+  * Revision 1.3  1991/01/18  00:14:48  eggert
X+  * Make minimal changes to interface to CVS 1.0.
X+  *
X+  * Revision 5.2  1990/11/01  05:03:30  eggert
X+  * Remove lint.
X+  *
X+  * Revision 5.1  1990/10/04  06:30:13  eggert
X+  * Calculate the GMT offset of 'xxx LT' as of xxx, not as of now.
X+  * Don't assume time_t is 32 bits.  Fix bugs near epoch and near end of time.
X+  *
X+  * Revision 5.0  1990/08/22  08:12:38  eggert
X+  * Switch to GMT and fix the bugs exposed thereby.
X+  * Permit dates past 1999/12/31.  Ansify and Posixate.
X+  *
X+  * Revision 1.8  88/11/08  13:54:53  narten
X+  * allow negative timezones (-24h <= x <= 24h)
X+  * 
X+  * Revision 1.7  88/08/28  14:47:52  eggert
X+  * Allow cc -R.  Remove unportable "#endif XXX"s.
X+  * 
X+  * Revision 1.6  87/12/18  17:05:58  narten
X+  * include rcsparam.h
X+  * 
X+  * Revision 1.5  87/12/18  11:35:51  narten
X+  * maketime.c: fixed USG code - you have tgo call "tzset" in order to have
X+  * "timezone" set. ("localtime" calls it, but it's probably better not to 
X+  * count on "localtime" having been called.)
X+  * 
X+  * Revision 1.4  87/10/18  10:26:57  narten
X+  * Updating version numbers. Changes relative to 1.0 are actually 
X+  * relative to 1.2
X+  * 
X+  * Revision 1.3  87/09/24  13:58:45  narten
X+  * Sources now pass through lint (if you ignore printf/sprintf/fprintf 
X+  * warnings)
X+  * 
X+  * Revision 1.2  87/03/27  14:21:48  jenkins
X+  * Port to suns
X+  * 
X+  * Revision 1.2  83/12/05  10:12:56  wft
X+  * added cond. compilation for USG Unix; long timezone;
X+  * 
X+  * Revision 1.1  82/05/06  11:38:00  wft
X+  * Initial revision
X+  * 
X+  */
X+ 
X  
X+ /* minimal changes needed to get this file to work for CVS rather than RCS */
X+ /* #include "rcsbase.h" */
X+ #include <sys/types.h>
X+ #include <time.h>
X  #include "cvs.h"
X! #define datesize 32
X! #define faterror(x,y) error(0,x,y)
X! #define libId(x,y) static char x[] = y;
X! #define P(x) ()
X! #define RCSversion 5
X! #define VERSION(x) x
X! #define VOID (void)
X! #if !__STDC__
X! #	define const
X! #endif
X! void str2date();
X! Make_Date(a,b) const char *a; char *b; { str2date(a,b); }
X! 
X! libId(maketId, "$Id: maketime.c,v 1.2.1.1 91/01/18 12:15:21 berliner Exp $")
X! 
X! static const struct tm *time2tm P((time_t));
X  
X! #define given(v) (0 <= (v)) /* Negative values are unspecified. */
X! 
X! static const int daytb[] = {
X! 	/* # days in year thus far, indexed by month (0-12!!) */
X  	0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
X  };
X  
X! 	static time_t
X! maketime(atm,zone)
X! 	const struct tm *atm;
X! 	int zone;
X! {
X!     register const struct tm *tp;
X!     register int i;
X!     int year, yday, mon, day, hour, min, sec, leap, localzone;
X!     int attempts;
X!     time_t t, tres;
X! 
X!     attempts = 2;
X!     localzone = zone==48*60;
X!     tres = -1;
X!     year = mon = day = 0;  /* Keep lint happy.  */
X! 
X!     do {
X! 
X! 	if (localzone || !given(atm->tm_year)) {
X! 		if (tres == -1)
X! 			if ((tres = time((time_t*)0))  ==  -1)
X! 				return -1;
X! 		tp = time2tm(tres);
X! 		/* Get breakdowns of default time, adjusting to zone. */
X! 		year = tp->tm_year;		/* Use to set up defaults */
X! 		yday = tp->tm_yday;
X! 		mon = tp->tm_mon;
X! 		day = tp->tm_mday;
X! 		hour = tp->tm_hour;
X! 		min = tp->tm_min;
X! 		if (localzone) {
X! 		    tp = localtime(&tres);
X! 		    zone =
X! 			min - tp->tm_min + 60*(
X! 				hour - tp->tm_hour + 24*(
X! 					/* If years differ, it's by one day. */
X! 						year - tp->tm_year
X! 					?	year - tp->tm_year
X! 					:	yday - tp->tm_yday));
X! 		}
X! 		/* Adjust the default day, month and year according to zone.  */
X! 		if ((min -= zone) < 0) {
X! 		    if (hour-(59-min)/60 < 0  &&  --day <= 0) {
X! 			if (--mon < 0) {
X! 				--year;
X! 				mon = 11;
X! 			}
X! 			day  =  daytb[mon+1] - daytb[mon] + (mon==1&&!(year&3));
X! 		    }
X! 		} else
X! 		    if (
X! 		      24 <= hour+min/60  &&
X! 		      daytb[mon+1] - daytb[mon] + (mon==1&&!(year&3))  <  ++day
X! 		    ) {
X! 			    if (11 < ++mon) {
X! 				    ++year;
X! 				    mon = 0;
X! 			    }
X! 			    day = 1;
X! 		    }
X! 	}
X! 	if (zone < -24*60  ||  24*60 < zone)
X! 		return -1;
X  
X  
X  #ifdef DEBUG
X! printf("first YMD: %d %d %d\n",year,mon,day);
X! #endif
X  	tp = atm;
X  
X  	/* First must find date, using specified year, month, day.
X***************
X*** 56,228 ****
X  	 * If one of these is unspecified, it defaults either to the
X  	 * current date (if no more global spec was given) or to the
X  	 * zero-value for that spec (i.e. a more global spec was seen).
X! 	 * Start with year... note 32 bits can only handle 135 years.
X  	 */
X! 	if(tp->tm_year != TMNULL)
X! 	  {	if((year = tp->tm_year) >= 1900)	/* Allow full yr # */
X! 	  		year -= 1900;			/* by making kosher */
X  		mon = 0;		/* Since year was given, default */
X  		day = 1;		/* for remaining specs is zero */
X  	  }
X! 	if(year < 70 || 70+134 < year )	/* Check range */
X! 		return(0);		/* ERR: year out of range */
X! 	leap = year&03 ? 0 : 1;		/* See if leap year */
X  	year -= 70;			/* UNIX time starts at 1970 */
X  
X  	/*
X  	 * Find day of year.
X- 	 * YDAY is used only if it exists and either the month or day-of-month
X- 	 * is missing.
X  	 */
X! 	if (tp->tm_yday != TMNULL
X! 	 && (tp->tm_mon == TMNULL || tp->tm_mday == TMNULL))
X! 		yday = tp->tm_yday;
X! 	else
X! 	  {	if(tp->tm_mon  != TMNULL)
X  		  {	mon = tp->tm_mon;	/* Month was specified */
X  			day = 1;		/* so set remaining default */
X  		  }
X! 		if(mon < 0 || 11 < mon) return(0);	/* ERR: bad month */
X! 		if(tp->tm_mday != TMNULL) day = tp->tm_mday;
X  		if(day < 1
X  		 || (((daytb[mon+1]-daytb[mon]) < day)
X  			&& (day!=29 || mon!=1 || !leap) ))
X! 				return(0);		/* ERR: bad day */
X  		yday = daytb[mon]	/* Add # of days in months so far */
X  		  + ((leap		/* Leap year, and past Feb?  If */
X  		      && mon>1)? 1:0)	/* so, add leap day for this year */
X  		  + day-1;		/* And finally add # days this mon */
X  
X!                 if (tp->tm_yday != TMNULL       /* Confirm that YDAY correct */
X!                  && tp->tm_yday != yday) return(0);     /* ERR: conflict */
X! 	  }
X! 	if(yday < 0 || (leap?366:365) <= yday)
X! 		return(0);		/* ERR: bad YDAY or maketime bug */
X! 
X! 	tres = year*365			/* Get # days of years so far */
X  		+ ((year+1)>>2)		/* plus # of leap days since 1970 */
X  		+ yday;			/* and finally add # days this year */
X  
X-         if((i = tp->tm_wday) != TMNULL) /* Check WDAY if present */
X-                 if(i < 0 || 6 < i       /* Ensure within range */
X-                   || i != (tres+4)%7)   /* Matches? Jan 1,1970 was Thu = 4 */
X-                         return(0);      /* ERR: bad WDAY */
X- 
X  #ifdef DEBUG
X  printf("YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
X! #endif DEBUG
X  	/*
X  	 * Now determine time.  If not given, default to zeros
X  	 * (since time is always the least global spec)
X  	 */
X  	tres *= 86400L;			/* Get # seconds (24*60*60) */
X  	hour = min = sec = 0;
X! 	if(tp->tm_hour != TMNULL) hour = tp->tm_hour;
X! 	if(tp->tm_min  != TMNULL) min  = tp->tm_min;
X! 	if(tp->tm_sec  != TMNULL) sec  = tp->tm_sec;
X! 	if( min < 0 || 60 <= min
X! 	 || sec < 0 || 60 <= sec) return(0);	/* ERR: MS out of range */
X! 	if(hour < 0 || 24 <= hour)
X  		if(hour != 24 || (min+sec) !=0)	/* Allow 24:00 */
X! 			return(0);		/* ERR: H out of range */
X! 
X! 	/* confirm AM/PM if there */
X! 	switch(tp->tm_ampm)
X! 	  {	case 0: case TMNULL:	/* Ignore these values */
X! 			break;
X! 		case 1:			/* AM */
X! 		case 2:			/* PM */
X! 			if(hour > 12) return(0);  /* ERR: hrs 13-23 bad */
X! 			if(hour ==12) hour = 0;	/* Modulo 12 */
X! 			if(tp->tm_ampm == 2)	/* If PM, then */
X! 				hour += 12;	/*   get 24-hour time */
X! 			break;
X! 		default: return(0);	/* ERR: illegal TM_AMPM value */
X! 	  }
X  
X! 	tres += sec + 60L*(min + 60L*hour);	/* Add in # secs of time */
X  
X  #ifdef DEBUG
X  printf("HMS: %d %d %d T=%ld\n",hour,min,sec,tres);
X! #endif DEBUG
X! 	/*
X! 	 * We now have the GMT date/time and must make final
X! 	 * adjustment for the specified time zone.  If none is specified,
X! 	 * the local time-zone is assumed.
X! 	 */
X! 	if((zone = tp->tm_zon) == TMNULL	/* If unspecified */
X! 	 || (zone == 1))			/* or local-zone requested */
X! 		zone = localzone();		/* then set to local zone */
X! 	if(zone < 0 || 24*60 <= zone)
X! 		return(0);			/* ERR: zone out of range */
X! 
X! 	/* See if must apply Daylight Saving Time shift.
X! 	 * Note that if DST is specified, validity is not checked.
X! 	 */
X! 	if((dst = tp->tm_isdst) == TMNULL)	/* Must we figure it out? */
X! 	  {	curtim = tres +localzone()*60L;	/* Yuck.  Get equiv local */
X! 		dst = localtime(&curtim)->tm_isdst;     /* time, and ask. */
X! 	  }
X! 	tres += zone*60L -(dst?3600:0);	/* Add in # seconds of zone adj */
X  
X! 	return(tres);
X! }
X  
X  
X! /* LOCALZONE		return local timezone in # mins west of GMT
X!  *
X!  */
X  
X! #ifdef V6
X! extern long timezone;
X! #else
X! #ifdef USG
X! extern long timezone;
X! #else /* V7 */
X! #include <sys/types.h>
X! #include <sys/timeb.h>
X! #endif USG
X! #endif V6
X  
X! int _lclzon = -1;
X! localzone()
X  {
X! #ifdef V6
X! 	return(_lclzon >= 0 ? _lclzon : (_lclzon = timezone/60L));
X! #else
X! #ifdef USG
X! 	tzset();
X! 	return(_lclzon >= 0 ? _lclzon : (_lclzon = timezone/60L));
X! #else /* V7 */
X! 	struct timeb tb;
X! 
X! 	if(_lclzon < 0)
X! 	  {	ftime(&tb);
X! 		_lclzon = tb.timezone;
X! 	  }
X! 	return(_lclzon);
X  
X! #endif USG
X! #endif V6
X  }
X  
X! Make_Date(rawdate, date)
X!     char *rawdate;
X!     char *date;
X  {
X!     extern int force_tag_match;
X!     struct tm parseddate, *ftm;
X!     long unixtime;
X! 
X!     /*
X!      * Dates must "match", else the file is ignored
X!      */
X!     force_tag_match = 1;
X!     if (partime(rawdate, &parseddate) == 0)
X! 	error(0, "Can't parse date/time: %s", rawdate);
X!     if ((unixtime = maketime(&parseddate)) == 0L)
X! 	error(0, "Inconsistent date/time: %s", rawdate);
X!     ftm = localtime(&unixtime);
X!     (void) sprintf(date, DATEFORM, ftm->tm_year, ftm->tm_mon+1,
X! 		 ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec);
X  }
X--- 175,337 ----
X  	 * If one of these is unspecified, it defaults either to the
X  	 * current date (if no more global spec was given) or to the
X  	 * zero-value for that spec (i.e. a more global spec was seen).
X! 	 * Reject times that do not fit in time_t,
X! 	 * without assuming that time_t is 32 bits or is signed.
X  	 */
X! 	if (given(tp->tm_year))
X! 	  {
X! 		year = tp->tm_year;
X  		mon = 0;		/* Since year was given, default */
X  		day = 1;		/* for remaining specs is zero */
X  	  }
X! 	if (year < 69)			/* 1969/12/31 OK in some timezones.  */
X! 		return -1;		/* ERR: year out of range */
X! 	leap   =   !(year&3)  &&  (year%100 || !((year+300)%400));
X  	year -= 70;			/* UNIX time starts at 1970 */
X  
X  	/*
X  	 * Find day of year.
X  	 */
X! 	{
X! 		if (given(tp->tm_mon))
X  		  {	mon = tp->tm_mon;	/* Month was specified */
X  			day = 1;		/* so set remaining default */
X  		  }
X! 		if (11 < (unsigned)mon)
X! 			return -1;		/* ERR: bad month */
X! 		if (given(tp->tm_mday)) day = tp->tm_mday;
X  		if(day < 1
X  		 || (((daytb[mon+1]-daytb[mon]) < day)
X  			&& (day!=29 || mon!=1 || !leap) ))
X! 				return -1;	/* ERR: bad day */
X  		yday = daytb[mon]	/* Add # of days in months so far */
X  		  + ((leap		/* Leap year, and past Feb?  If */
X  		      && mon>1)? 1:0)	/* so, add leap day for this year */
X  		  + day-1;		/* And finally add # days this mon */
X  
X! 	}
X! 	if (leap+365 <= (unsigned)yday)
X! 		return -1;		/* ERR: bad YDAY */
X! 
X! 	if (year < 0) {
X! 	    if (yday != 364)
X! 		return -1;		/* ERR: too early */
X! 	    t = -1;
X! 	} else {
X! 	    tres = year*365;		/* Get # days of years so far */
X! 	    if (tres/365 != year)
X! 		    return -1;		/* ERR: overflow */
X! 	    t = tres
X  		+ ((year+1)>>2)		/* plus # of leap days since 1970 */
X  		+ yday;			/* and finally add # days this year */
X+ 	    if (t+4 < tres)
X+ 		    return -1;		/* ERR: overflow */
X+ 	}
X+ 	tres = t;
X+ 
X+ 	if (given(i = tp->tm_wday)) /* Check WDAY if present */
X+ 		if (i != (tres+4)%7)	/* 1970/01/01 was Thu = 4 */
X+ 			return -1;	/* ERR: bad WDAY */
X  
X  #ifdef DEBUG
X  printf("YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
X! #endif
X  	/*
X  	 * Now determine time.  If not given, default to zeros
X  	 * (since time is always the least global spec)
X  	 */
X  	tres *= 86400L;			/* Get # seconds (24*60*60) */
X+ 	if (tres/86400L != t)
X+ 		return -1;		/* ERR: overflow */
X  	hour = min = sec = 0;
X! 	if (given(tp->tm_hour)) hour = tp->tm_hour;
X! 	if (given(tp->tm_min )) min  = tp->tm_min;
X! 	if (given(tp->tm_sec )) sec  = tp->tm_sec;
X! 	if (60 <= (unsigned)min  ||  60 < (unsigned)sec)
X! 		return -1;		/* ERR: MS out of range */
X! 	if (24 <= (unsigned)hour)
X  		if(hour != 24 || (min+sec) !=0)	/* Allow 24:00 */
X! 			return -1;	/* ERR: H out of range */
X  
X! 	t = tres;
X! 	tres += sec + 60L*(zone + min + 60*hour);
X  
X  #ifdef DEBUG
X  printf("HMS: %d %d %d T=%ld\n",hour,min,sec,tres);
X! #endif
X  
X! 	if (!localzone)			/* check for overflow */
X! 	    return (year<0 ? (tres<0||86400L<=tres) : tres<t)  ?  -1  :  tres;
X  
X+ 	/* Check results; LT may have had a different GMT offset back then.  */
X+ 	tp = localtime(&tres);
X+ 	if (given(atm->tm_sec)  &&  atm->tm_sec != tp->tm_sec)
X+ 		return -1; /* If seconds don't match, we're in trouble.  */
X+ 	if (!(
X+ 	    given(atm->tm_min)  &&  atm->tm_min != tp->tm_min  ||
X+ 	    given(atm->tm_hour)  &&  atm->tm_hour != tp->tm_hour  ||
X+ 	    given(atm->tm_mday)  &&  atm->tm_mday != tp->tm_mday  ||
X+ 	    given(atm->tm_mon)  &&  atm->tm_mon != tp->tm_mon  ||
X+ 	    given(atm->tm_year)  &&  atm->tm_year != tp->tm_year
X+ 	))
X+ 		return tres; /* Everything matches.  */
X  
X!     } while (--attempts);
X  
X!     return -1;
X! }
X  
X! /*
X! * Convert Unix time to struct tm format.
X! * Use Coordinated Universal Time (UTC) if available and if version 5 or newer;
X! * use local time otherwise.
X! */
X! 	static const struct tm *
X! time2tm(unixtime)
X! 	time_t unixtime;
X  {
X! 	const struct tm *tm;
X! 	return
X! 			VERSION(5)<=RCSversion && (tm = gmtime(&unixtime))
X! 		?	tm
X! 		:	localtime(&unixtime);
X! }
X  
X! /*
X! * Convert Unix time to RCS format.
X! * For compatibility with older versions of RCS,
X! * dates before AD 2000 are stored without the leading "19".
X! */
X! 	void
X! time2date(unixtime,date)
X! 	time_t unixtime;
X! 	char date[datesize];
X! {
X! 	register const struct tm *tm = time2tm(unixtime);
X! 	VOID sprintf(date, DATEFORM,
X! 		tm->tm_year  +  (tm->tm_year<100 ? 0 : 1900),
X! 		tm->tm_mon+1, tm->tm_mday,
X! 		tm->tm_hour, tm->tm_min, tm->tm_sec
X! 	);
X  }
X  
X! 
X! 
X! 	void
X! str2date(source, target)
X! 	const char *source;
X! 	char target[datesize];
X! /* Parse a free-format date in SOURCE, convert it
X!  * into RCS internal format, and store the result into TARGET.
X!  */
X  {
X! 	int zone;
X! 	time_t unixtime;
X! 	struct tm parseddate;
X! 
X! 	if (!partime(source, &parseddate, &zone))
X! 	    faterror("can't parse date/time: %s", source);
X! 	if ((unixtime = maketime(&parseddate, zone))  ==  -1)
X! 	    faterror("bad date/time: %s", source);
X! 	time2date(unixtime, target);
X  }
Xdiff -c src/modules.c:1.14 src/modules.c:1.14.1.1
X*** src/modules.c:1.14	Wed Feb  6 11:32:12 1991
X--- src/modules.c	Wed Feb  6 11:32:13 1991
X***************
X*** 1,5 ****
X  #ifndef lint
X! static char rcsid[] = "$Id: modules.c,v 1.14 89/11/19 23:20:12 berliner Exp $";
X  #endif !lint
X  
X  /*
X--- 1,5 ----
X  #ifndef lint
X! static char rcsid[] = "$Id: modules.c,v 1.14.1.1 91/01/29 07:17:32 berliner Exp $";
X  #endif !lint
X  
X  /*
X***************
X*** 268,273 ****
X--- 268,274 ----
X  	    err += patched((char *)0);
X  	else
X  	    error(0, "impossible module type %d", (int)m_type);
X+ 	update_dir[0] = '\0';
X  	return (err);
X      }
X      argc--;
Xdiff -c src/no_difference.c:1.7 src/no_difference.c:1.7.1.1
X*** src/no_difference.c:1.7	Wed Feb  6 11:32:09 1991
X--- src/no_difference.c	Wed Feb  6 11:32:09 1991
X***************
X*** 1,5 ****
X  #ifndef lint
X! static char rcsid[] = "$Id: no_difference.c,v 1.7 89/11/19 23:20:16 berliner Exp $";
X  #endif !lint
X  
X  /*
X--- 1,5 ----
X  #ifndef lint
X! static char rcsid[] = "$Id: no_difference.c,v 1.7.1.1 91/01/29 07:18:06 berliner Exp $";
X  #endif !lint
X  
X  /*
X***************
X*** 39,45 ****
X  		xchmod(User, 0);
X  	    Version_TS(Rcs, Tag, User);
X  	    (void) strcpy(TS_Rcs, TS_User);
X! 	    Register(User, VN_Rcs, TS_User);
X  	    if (doGlist) {
X  		(void) strcat(Olist, " ");
X  		(void) strcat(Olist, User);
X--- 39,45 ----
X  		xchmod(User, 0);
X  	    Version_TS(Rcs, Tag, User);
X  	    (void) strcpy(TS_Rcs, TS_User);
X! 	    Register(User, VN_User[0] ? VN_User : VN_Rcs, TS_User);
X  	    if (doGlist) {
X  		(void) strcat(Olist, " ");
X  		(void) strcat(Olist, User);
Xdiff -c src/partime.c:1.1 src/partime.c:1.1.1.1
X*** src/partime.c:1.1	Wed Feb  6 11:32:07 1991
X--- src/partime.c	Wed Feb  6 11:32:07 1991
X***************
X*** 1,17 ****
X- #ifndef lint
X- static char rcsid[] = "$Id: partime.c,v 1.1 89/05/09 11:51:02 berliner Exp $";
X- #endif
X- 
X  /*
X   * PARTIME		parse date/time string into a TM structure
X   *
X-  * Usage:
X-  *      #include "time.h"             -- expanded tm structure
X-  *	char *str; struct tm *tp;
X-  *	partime(str,tp);
X   * Returns:
X   *	0 if parsing failed
X!  *	else time values in specified TM structure (unspecified values
X   *		set to TMNULL)
X   * Notes:
X   *	This code is quasi-public; it may be used freely in like software.
X--- 1,9 ----
X  /*
X   * PARTIME		parse date/time string into a TM structure
X   *
X   * Returns:
X   *	0 if parsing failed
X!  *	else time values in specified TM structure and zone (unspecified values
X   *		set to TMNULL)
X   * Notes:
X   *	This code is quasi-public; it may be used freely in like software.
X***************
X*** 26,58 ****
X   *	If parsing changed so that no backup needed, could perhaps modify
X   *		to use a FILE input stream.  Need terminator, though.
X   *	Perhaps should return 0 on success, else a non-zero error val?
X-  *	Flush AMPM from TM structure and handle locally within PARTIME,
X-  *		like midnight/noon?
X   */
X  
X! #include <stdio.h>
X! #include <ctype.h>
X! #include "rcstime.h"
X  
X! #ifndef lint
X! static char timeid[] = TIMEID;
X  #endif
X  
X  struct tmwent {
X! 	char *went;
X! 	long wval;	/* must be big enough to hold pointer or integer */
X  	char wflgs;
X  	char wtype;
X  };
X  	/* wflgs */
X- #define TWSPEC 01	/* Word wants special processing */
X  #define TWTIME 02	/* Word is a time value (absence implies date) */
X  #define TWDST  04	/* Word is a DST-type timezone */
X! #define TW1200 010	/* Word is NOON or MIDNIGHT (sigh) */
X  
X! int pt12hack();
X! int ptnoise();
X! struct tmwent tmwords [] = {
X  	{"january",      0, 0, TM_MON},
X  	{"february",     1, 0, TM_MON},
X  	{"march",        2, 0, TM_MON},
X--- 18,106 ----
X   *	If parsing changed so that no backup needed, could perhaps modify
X   *		to use a FILE input stream.  Need terminator, though.
X   *	Perhaps should return 0 on success, else a non-zero error val?
X   */
X  
X! /* $Log:	partime.c,v $
X!  * Revision 1.1.1.1  91/01/18  12:18:12  berliner
X!  * For CVS 1.2, contributed by Paul Eggert
X!  * 
X!  * Revision 1.2  1991/01/18  00:14:49  eggert
X!  * Make minimal changes to interface to CVS 1.0.
X!  *
X!  * Revision 5.4  1990/10/04  06:30:15  eggert
X!  * Remove date vs time heuristics that fail between 2000 and 2400.
X!  * Check for overflow when lexing an integer.
X!  * Parse 'Jan 10 LT' as 'Jan 10, LT', not 'Jan, 10 LT'.
X!  *
X!  * Revision 5.3  1990/09/24  18:56:31  eggert
X!  * Update timezones.
X!  *
X!  * Revision 5.2  1990/09/04  08:02:16  eggert
X!  * Don't parse two-digit years, because it won't work after 1999/12/31.
X!  * Don't permit 'Aug Aug'.
X!  *
X!  * Revision 5.1  1990/08/29  07:13:49  eggert
X!  * Be able to parse our own date format.  Don't assume year<10000.
X!  *
X!  * Revision 5.0  1990/08/22  08:12:40  eggert
X!  * Switch to GMT and fix the bugs exposed thereby.  Update timezones.
X!  * Ansify and Posixate.  Fix peekahead and int-size bugs.
X!  *
X!  * Revision 1.4  89/05/01  14:48:46  narten
X!  * fixed #ifdef DEBUG construct
X!  * 
X!  * Revision 1.3  88/08/28  14:53:40  eggert
X!  * Remove unportable "#endif XXX"s.
X!  * 
X!  * Revision 1.2  87/03/27  14:21:53  jenkins
X!  * Port to suns
X!  * 
X!  * Revision 1.1  82/05/06  11:38:26  wft
END_OF_FILE
  if test 49821 -ne `wc -c <'Patch02.01'`; then
    echo shar: \"'Patch02.01'\" unpacked with wrong size!
  fi
  # end of 'Patch02.01'
fi
echo shar: End of archive 1 \(of 2\).
cp /dev/null ark1isdone
MISSING=""
for I in 1 2 ; do
    if test ! -f ark${I}isdone ; then
	MISSING="${MISSING} ${I}"
    fi
done
if test "${MISSING}" = "" ; then
    echo You have unpacked both archives.
    rm -f ark[1-9]isdone
else
    echo You still must unpack the following archives:
    echo "        " ${MISSING}
fi
exit 0
exit 0 # Just in case...
-- 
Please send comp.sources.unix-related mail to rsalz@uunet.uu.net.
Use a domain-based address or give alternate paths, or you may lose out.