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