home *** CD-ROM | disk | FTP | other *** search
/ Usenet 1994 October / usenetsourcesnewsgroupsinfomagicoctober1994disk2.iso / unix / volume24 / cvs1.2upgrade / part01 / Patch02.01 < prev   
Text File  |  1991-03-05  |  50KB  |  1,431 lines

  1. diff -c /dev/null ChangeLog:1.1
  2. *** /dev/null    Wed Feb  6 11:32:17 1991
  3. --- ChangeLog    Wed Feb  6 11:32:17 1991
  4. ***************
  5. *** 0 ****
  6. --- 1,89 ----
  7. + Wed Feb  6 10:10:58 1991  Brian Berliner  (berliner at sun.com)
  8. +     * Changes from CVS 1.0 Patchlevel 1 to CVS 1.0 Patchlevel 2; also
  9. +     known as "Changes from CVS 1.1 to CVS 1.2".
  10. +     * Major new support with this release is the ability to use the
  11. +     recently-posted RCS 5.5 distribution with CVS 1.2.  See below for
  12. +     other assorted bug-fixes that have been thrown in.
  13. +     * ChangeLog (new): Added Emacs-style change-log file to CVS 1.2
  14. +     release.  Chronological description of changes between release.
  15. +     * README: Small fixes to installation instructions.  My email
  16. +     address is now "berliner@sun.com".
  17. +     * src/Makefile: Removed "rcstime.h".  Removed "depend" rule.
  18. +     * src/partime.c:  Updated to RCS 5.5 version with hooks for CVS.
  19. +     * src/maketime.c: Updated to RCS 5.5 version with hooks for CVS.
  20. +     * src/rcstime.h:  Removed from the CVS 1.2 distribution.
  21. +     Thanks to Paul Eggert <eggert@twinsun.com> for these changes.
  22. +     * src/checkin.csh: Support for RCS 5.5 parsing.
  23. +     Thanks to Paul Eggert <eggert@twinsun.com> for this change.
  24. +     * src/collect_sets.c (Collect_Sets): Be quieter if "-f" option is
  25. +     specified.  When checking out files on-top-of other files that CVS
  26. +     doesn't know about, run a diff in the hopes that they are really
  27. +     the same file before aborting.
  28. +     * src/commit.c (branch_number): Fix for RCS 5.5 parsing.
  29. +     Thanks to Paul Eggert <eggert@twinsun.com> for this change.
  30. +     * src/commit.c (do_editor): Bug fix - fprintf missing argument
  31. +     which sometimes caused core dumps.
  32. +     * src/modules.c (process_module): Properly NULL-terminate
  33. +     update_dir[] in all cases.
  34. +     * src/no_difference.c (No_Difference): The wrong RCS revision was
  35. +     being registered in certain (strange) cases.
  36. +     * src/patch.c (get_rcsdate): New algorithm.  No need to call
  37. +     maketime() any longer.
  38. +     Thanks to Paul Eggert <eggert@twinsun.com> for this change.
  39. +     * src/patchlevel.h: Increased patch level to "2".
  40. +     * src/subr.c (isdir, islink): Changed to compare stat mode bits
  41. +     correctly.
  42. +     * src/tag.c (tag_file): Added support for following symbolic links
  43. +     that are in the master source repository when tagging.  Made tag
  44. +     somewhat quieter in certain cases.
  45. +     * src/update.c (update_process_lists): Unlink the user's file if it
  46. +     was put on the Wlist, meaning that the user's file is not modified
  47. +     and its RCS file has been removed by someone else.
  48. +     * src/update.c (update): Support for "cvs update dir" to correctly
  49. +     just update the argument directory "dir".
  50. +     * src/cvs.h: Fixes for RCS 5.5 parsing.
  51. +     * src/version_number.c (Version_Number): Fixes for parsing RCS 5.5
  52. +     and older RCS-format files.
  53. +     Thanks to Paul Eggert <eggert@twinsun.com> for these changes.
  54. +     * src/version_number.c (Version_Number): Bug fixes for "-f" option.
  55. +     Bug fixes for parsing with certain branch numbers.  RCS
  56. +     revision/symbol parsing is much more solid now.
  57. + Wed Feb 14 10:01:33 1990  Brian Berliner  (berliner at sun.com)
  58. +     * Changes from CVS 1.0 Patchlevel 0 to CVS 1.0 Patchlevel 1; also
  59. +     known as "Changes from CVS 1.0 to CVS 1.1".
  60. +     * src/patch.c (get_rcsdate): Portability fix.  Replaced call to
  61. +     timelocal() with call to maketime().
  62. + Mon Nov 19 23:15:11 1990  Brian Berliner  (berliner at prisma.com)
  63. +     * Sent CVS 1.0 release to comp.sources.unix moderator and FSF.
  64. +     * Special thanks to Dick Grune <dick@cs.vu.nl> for his work on the
  65. +     1986 version of CVS and making it available to the world.  Dick's
  66. +     version is available on uunet.uu.net in the
  67. +     comp.sources.unix/volume6/cvs directory.
  68. + $Id: ChangeLog,v 1.1 91/02/06 18:29:01 berliner Exp $
  69. diff -c README:1.3 README:1.3.1.2
  70. *** README:1.3    Wed Feb  6 11:32:17 1991
  71. --- README    Wed Feb  6 11:32:17 1991
  72. ***************
  73. *** 1,4 ****
  74. ! $Id: README,v 1.3 89/11/19 23:15:11 berliner Exp $
  75.   
  76.   
  77.                  CVS Kit, Version 1.0
  78. --- 1,4 ----
  79. ! $Id: README,v 1.3.1.2 91/02/06 18:26:40 berliner Exp $
  80.   
  81.   
  82.                  CVS Kit, Version 1.0
  83. ***************
  84. *** 36,46 ****
  85.   volume 6 release sometime in 1986.  This original version was a collection
  86.   of shell scripts. 
  87.   
  88. ! Brian Berliner from Prisma, Inc. converted the original CVS shell scripts
  89. ! into reasonably fast C and added many, many features to support software
  90. ! release control functions.  See the manual page in the "man" directory, and
  91. ! a copy of the USENIX article presented at the Winter 1990 USENIX
  92. ! Conference, Washington D.C., is included in the "doc" directory.
  93.   
  94.   This code has been tested extensively on Sun-4 and Sun-3 platforms, all
  95.   running SunOS 4.X.  Your mileage may vary for other systems, and I would
  96. --- 36,47 ----
  97.   volume 6 release sometime in 1986.  This original version was a collection
  98.   of shell scripts. 
  99.   
  100. ! ! Brian Berliner from Prisma, Inc. (now at Sun Microsystems, Inc.) converted
  101. ! ! the original CVS shell scripts into reasonably fast C and added many, many
  102. ! ! features to support software release control functions.  See the manual
  103. ! ! page in the "man" directory.  A copy of the USENIX article presented
  104. ! ! at the Winter 1990 USENIX Conference, Washington D.C., is included in
  105. ! ! the "doc" directory.
  106.   
  107.   This code has been tested extensively on Sun-4 and Sun-3 platforms, all
  108.   running SunOS 4.X.  Your mileage may vary for other systems, and I would
  109. ***************
  110. *** 120,125 ****
  111. --- 121,127 ----
  112.       following commands:
  113.   
  114.           mkdir $CVSROOT/cvs
  115. +         make clean
  116.           checkin -m 'CVS 1.0 distribution' cvs CVS CVS1_0
  117.   
  118.   11) Having done step 10, one should be able to checkout a copy of the CVS
  119. ***************
  120. *** 135,141 ****
  121.       can usually be retrieved with the "cvs checkout modules" command, and
  122.       definitely with the "cvs checkout CVSROOT.adm" command.
  123.   
  124. ! 13) PLEASE report any problems to me, berliner@prisma.com (Brian Berliner)
  125.       and I will try to collect patches and enhancements into future CVS
  126.       distributions.  "patch" format files are best, using context diffs,
  127.       if you will.
  128. --- 137,143 ----
  129.       can usually be retrieved with the "cvs checkout modules" command, and
  130.       definitely with the "cvs checkout CVSROOT.adm" command.
  131.   
  132. ! 13) PLEASE report any problems to me, berliner@sun.com (Brian Berliner)
  133.       and I will try to collect patches and enhancements into future CVS
  134.       distributions.  "patch" format files are best, using context diffs,
  135.       if you will.
  136. ***************
  137. *** 143,146 ****
  138.   14) GOOD LUCK!
  139.   
  140.                       Brian Berliner
  141. !                     berliner@prisma.com
  142. --- 145,148 ----
  143.   14) GOOD LUCK!
  144.   
  145.                       Brian Berliner
  146. !                     berliner@sun.com
  147. diff -c src/Makefile:1.20 src/Makefile:1.20.1.1
  148. *** src/Makefile:1.20    Wed Feb  6 11:32:10 1991
  149. --- src/Makefile    Wed Feb  6 11:32:10 1991
  150. ***************
  151. *** 1,5 ****
  152.   #
  153. ! #    $Id: Makefile,v 1.20 89/11/20 00:06:32 berliner Exp $
  154.   #
  155.   # Makefile for CVS
  156.   #
  157. --- 1,5 ----
  158.   #
  159. ! #    $Id: Makefile,v 1.20.1.1 91/01/18 12:04:00 berliner Exp $
  160.   #
  161.   # Makefile for CVS
  162.   #
  163. ***************
  164. *** 23,29 ****
  165.   CSHEXT=        .csh
  166.   CSHELLS=    checkin${CSHEXT}
  167.   
  168. ! HEADERS=    cvs.h patchlevel.h rcstime.h
  169.   DESTDIR=    /usr/local/bin
  170.   
  171.   ALLSRCS=    ${COMMONSRCS} ${CVSSRCS} ${MODSRCS}
  172. --- 23,30 ----
  173.   CSHEXT=        .csh
  174.   CSHELLS=    checkin${CSHEXT}
  175.   
  176. ! HEADERS=    cvs.h patchlevel.h
  177. ! ALLOBJS=    ${COMMONOBJS} ${CVSOBJS} ${MODOBJS}
  178.   DESTDIR=    /usr/local/bin
  179.   
  180.   ALLSRCS=    ${COMMONSRCS} ${CVSSRCS} ${MODSRCS}
  181. ***************
  182. *** 69,234 ****
  183.       done
  184.   
  185.   depend:
  186. !     /bin/rm -f makedep
  187. !     for i in ${ALLSRCS}; do \
  188. !         ${CC} -M ${INCPATH} $$i | \
  189. !         awk ' { if ($$1 != prev) \
  190. !         { if (rec != "") print rec; rec = $$0; prev = $$1; } \
  191. !         else { if (length(rec $$2) > 78) { print rec; rec = $$0; } \
  192. !         else rec = rec " " $$2 } } \
  193. !         END { print rec } ' >> makedep; done
  194. !     echo '/^# DO NOT DELETE THIS LINE/+2,$$d' >eddep
  195. !     echo '$$r makedep' >>eddep
  196. !     echo 'w' >>eddep
  197. !     cp Makefile Makefile.bak
  198. !     ed - Makefile < eddep
  199. !     /bin/rm eddep makedep
  200. !     echo '# DEPENDENCIES MUST END AT END OF FILE' >> Makefile
  201. !     echo '# IF YOU PUT STUFF HERE IT WILL GO AWAY' >> Makefile
  202. !     echo '# see make depend above' >> Makefile
  203. ! # DO NOT DELETE THIS LINE
  204. ! subr.o: subr.c /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  205. ! subr.o: /usr/include/sys/stat.h /usr/include/sys/file.h
  206. ! subr.o: /usr/include/sys/fcntlcom.h /usr/include/varargs.h ./cvs.h
  207. ! subr.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  208. ! add.o: add.c /usr/include/sys/param.h /usr/include/machine/param.h
  209. ! add.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  210. ! add.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
  211. ! add.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  212. ! build_entry.o: build_entry.c /usr/include/sys/param.h
  213. ! build_entry.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  214. ! build_entry.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  215. ! build_entry.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  216. ! build_entry.o: /usr/include/string.h /usr/include/stdio.h
  217. ! checkin.o: checkin.c /usr/include/sys/param.h /usr/include/machine/param.h
  218. ! checkin.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  219. ! checkin.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  220. ! checkin.o: /usr/include/ctype.h ./cvs.h /usr/include/strings.h
  221. ! checkin.o: /usr/include/string.h /usr/include/stdio.h
  222. ! checkout.o: checkout.c /usr/include/sys/param.h /usr/include/machine/param.h
  223. ! checkout.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  224. ! checkout.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  225. ! checkout.o: /usr/include/ndbm.h ./cvs.h /usr/include/strings.h
  226. ! checkout.o: /usr/include/string.h /usr/include/stdio.h
  227. ! collect_sets.o: collect_sets.c /usr/include/sys/param.h
  228. ! collect_sets.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  229. ! collect_sets.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  230. ! collect_sets.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  231. ! collect_sets.o: /usr/include/string.h /usr/include/stdio.h
  232. ! commit.o: commit.c /usr/include/sys/param.h /usr/include/machine/param.h
  233. ! commit.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  234. ! commit.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  235. ! commit.o: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/ctype.h
  236. ! commit.o: ./cvs.h /usr/include/strings.h /usr/include/string.h
  237. ! commit.o: /usr/include/stdio.h
  238. ! create_admin.o: create_admin.c /usr/include/sys/param.h
  239. ! create_admin.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  240. ! create_admin.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  241. ! create_admin.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  242. ! create_admin.o: /usr/include/string.h /usr/include/stdio.h
  243. ! diff.o: diff.c /usr/include/sys/param.h /usr/include/machine/param.h
  244. ! diff.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  245. ! diff.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
  246. ! diff.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  247. ! entries_file.o: entries_file.c ./cvs.h /usr/include/strings.h
  248. ! entries_file.o: /usr/include/string.h /usr/include/stdio.h
  249. ! find_names.o: find_names.c /usr/include/sys/param.h
  250. ! find_names.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  251. ! find_names.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  252. ! find_names.o: /usr/include/sys/sysmacros.h /usr/include/sys/types.h
  253. ! find_names.o: /usr/include/dirent.h /usr/include/sys/dirent.h ./cvs.h
  254. ! find_names.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  255. ! join.o: join.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  256. ! join.o: /usr/include/stdio.h
  257. ! locate_rcs.o: locate_rcs.c /usr/include/sys/param.h
  258. ! locate_rcs.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  259. ! locate_rcs.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  260. ! locate_rcs.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  261. ! locate_rcs.o: /usr/include/string.h /usr/include/stdio.h
  262. ! log.o: log.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  263. ! log.o: /usr/include/stdio.h
  264. ! main.o: main.c /usr/include/sys/param.h /usr/include/machine/param.h
  265. ! main.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  266. ! main.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
  267. ! main.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  268. ! main.o: ./patchlevel.h
  269. ! maketime.o: maketime.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  270. ! maketime.o: /usr/include/stdio.h ./rcstime.h /usr/include/sys/types.h
  271. ! maketime.o: /usr/include/sys/sysmacros.h /usr/include/sys/timeb.h
  272. ! modules.o: modules.c /usr/include/sys/param.h /usr/include/machine/param.h
  273. ! modules.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  274. ! modules.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  275. ! modules.o: /usr/include/sys/file.h /usr/include/sys/fcntlcom.h
  276. ! modules.o: /usr/include/ndbm.h ./cvs.h /usr/include/strings.h
  277. ! modules.o: /usr/include/string.h /usr/include/stdio.h
  278. ! name_repository.o: name_repository.c /usr/include/sys/param.h
  279. ! name_repository.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  280. ! name_repository.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  281. ! name_repository.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  282. ! name_repository.o: /usr/include/string.h /usr/include/stdio.h
  283. ! no_difference.o: no_difference.c /usr/include/sys/param.h
  284. ! no_difference.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  285. ! no_difference.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  286. ! no_difference.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  287. ! no_difference.o: /usr/include/string.h /usr/include/stdio.h
  288. ! options.o: options.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  289. ! options.o: /usr/include/stdio.h
  290. ! partime.o: partime.c /usr/include/stdio.h /usr/include/ctype.h ./rcstime.h
  291. ! patch.o: patch.c /usr/include/sys/param.h /usr/include/machine/param.h
  292. ! patch.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  293. ! patch.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  294. ! patch.o: /usr/include/time.h /usr/include/ndbm.h /usr/include/dirent.h
  295. ! patch.o: /usr/include/sys/dirent.h /usr/include/ctype.h ./cvs.h
  296. ! patch.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  297. ! register.o: register.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  298. ! register.o: /usr/include/stdio.h
  299. ! remove.o: remove.c /usr/include/sys/param.h /usr/include/machine/param.h
  300. ! remove.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  301. ! remove.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h ./cvs.h
  302. ! remove.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  303. ! scratch_entry.o: scratch_entry.c /usr/include/sys/param.h
  304. ! scratch_entry.o: /usr/include/machine/param.h /usr/include/sys/signal.h
  305. ! scratch_entry.o: /usr/include/vm/faultcode.h /usr/include/sys/types.h
  306. ! scratch_entry.o: /usr/include/sys/sysmacros.h ./cvs.h /usr/include/strings.h
  307. ! scratch_entry.o: /usr/include/string.h /usr/include/stdio.h
  308. ! set_lock.o: set_lock.c /usr/include/sys/param.h /usr/include/machine/param.h
  309. ! set_lock.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  310. ! set_lock.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  311. ! set_lock.o: /usr/include/sys/types.h /usr/include/sys/stat.h
  312. ! set_lock.o: /usr/include/signal.h /usr/include/dirent.h
  313. ! set_lock.o: /usr/include/sys/dirent.h ./cvs.h /usr/include/strings.h
  314. ! set_lock.o: /usr/include/string.h /usr/include/stdio.h
  315. ! status.o: status.c ./cvs.h /usr/include/strings.h /usr/include/string.h
  316. ! status.o: /usr/include/stdio.h
  317. ! tag.o: tag.c /usr/include/sys/param.h /usr/include/machine/param.h
  318. ! tag.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  319. ! tag.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  320. ! tag.o: /usr/include/ndbm.h /usr/include/dirent.h /usr/include/sys/dirent.h
  321. ! tag.o: /usr/include/ctype.h ./cvs.h /usr/include/strings.h
  322. ! tag.o: /usr/include/string.h /usr/include/stdio.h
  323. ! update.o: update.c /usr/include/sys/param.h /usr/include/machine/param.h
  324. ! update.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  325. ! update.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  326. ! update.o: /usr/include/sys/types.h /usr/include/sys/stat.h
  327. ! update.o: /usr/include/dirent.h /usr/include/sys/dirent.h ./cvs.h
  328. ! update.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  329. ! version_number.o: version_number.c /usr/include/ctype.h ./cvs.h
  330. ! version_number.o: /usr/include/strings.h /usr/include/string.h
  331. ! version_number.o: /usr/include/stdio.h
  332. ! version_ts.o: version_ts.c /usr/include/sys/types.h
  333. ! version_ts.o: /usr/include/sys/sysmacros.h /usr/include/sys/timeb.h
  334. ! version_ts.o: /usr/include/sys/stat.h /usr/include/ctype.h /usr/include/grp.h
  335. ! version_ts.o: /usr/include/pwd.h /usr/include/utmp.h ./cvs.h
  336. ! version_ts.o: /usr/include/strings.h /usr/include/string.h /usr/include/stdio.h
  337. ! mkmodules.o: mkmodules.c /usr/include/sys/param.h /usr/include/machine/param.h
  338. ! mkmodules.o: /usr/include/sys/signal.h /usr/include/vm/faultcode.h
  339. ! mkmodules.o: /usr/include/sys/types.h /usr/include/sys/sysmacros.h
  340. ! mkmodules.o: /usr/include/fcntl.h /usr/include/sys/fcntlcom.h
  341. ! mkmodules.o: /usr/include/signal.h /usr/include/ndbm.h /usr/include/ctype.h
  342. ! mkmodules.o: ./cvs.h /usr/include/strings.h /usr/include/string.h
  343. ! mkmodules.o: /usr/include/stdio.h
  344. ! # DEPENDENCIES MUST END AT END OF FILE
  345. ! # IF YOU PUT STUFF HERE IT WILL GO AWAY
  346. ! # see make depend above
  347. --- 70,78 ----
  348.       done
  349.   
  350.   depend:
  351. !     @exit 0                # done by hand now
  352. ! #
  353. ! # Dependencies -- done by hand since some systems don't have cc -M!
  354. ! #
  355. ! ${ALLOBJS}:    ${HEADERS}
  356. diff -c src/checkin.csh:1.8 src/checkin.csh:1.8.1.1
  357. *** src/checkin.csh:1.8    Wed Feb  6 11:32:08 1991
  358. --- src/checkin.csh    Wed Feb  6 11:32:08 1991
  359. ***************
  360. *** 1,6 ****
  361.   #!/bin/csh
  362.   #
  363. ! # $Id: checkin.csh,v 1.8 89/11/20 13:37:33 berliner Exp $
  364.   #
  365.   #   Copyright (c) 1989, Brian Berliner
  366.   #
  367. --- 1,6 ----
  368.   #!/bin/csh
  369.   #
  370. ! # $Id: checkin.csh,v 1.8.1.1 91/01/18 12:06:34 berliner Exp $
  371.   #
  372.   #   Copyright (c) 1989, Brian Berliner
  373.   #
  374. ***************
  375. *** 182,199 ****
  376.           else 
  377.           set file = ${update_dir}/Attic/${name},v
  378.           echo "WARNING: Updating ${repository}/Attic/${name}"
  379. !             set head = `head -1 $file`
  380. !             set branch = `head -2 $file | ${grep} -w branch`
  381. !             if ( $#head != 2 || $#branch != 2 ) then
  382.               echo "ERROR: corrupted RCS file $file - aborting"
  383.               endif
  384. !             if ( "$head[2]" == "1.1;" && "$branch[2]" != "1.1.1;" ) then
  385.               ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
  386.               if ( ! $status ) then
  387.                   set new = 1
  388.               endif
  389.               else
  390. !                 if ( "$branch[2]" != "1.1.1;" ) then
  391.                   echo -n "WARNING: Updating locally modified file "
  392.               echo    "${repository}/Attic/${name}"
  393.                   endif
  394. --- 182,203 ----
  395.           else 
  396.           set file = ${update_dir}/Attic/${name},v
  397.           echo "WARNING: Updating ${repository}/Attic/${name}"
  398. !             set headbranch = `sed -n '/^head/p; /^branch/p; 2q' $file`
  399. !             if ( $#headbranch != 2 && $#headbranch != 4 ) then
  400.               echo "ERROR: corrupted RCS file $file - aborting"
  401.               endif
  402. !         set head = "$headbranch[2]"
  403. !         set branch = ""
  404. !         if ( $#headbranch == 4 ) then
  405. !             set branch = "$headbranch[4]"
  406. !         endif
  407. !             if ( "$head" == "1.1;" && "$branch" != "1.1.1;" ) then
  408.               ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
  409.               if ( ! $status ) then
  410.                   set new = 1
  411.               endif
  412.               else
  413. !                 if ( "$branch" != "1.1.1;" ) then
  414.                   echo -n "WARNING: Updating locally modified file "
  415.               echo    "${repository}/Attic/${name}"
  416.                   endif
  417. ***************
  418. *** 200,217 ****
  419.               endif
  420.           endif
  421.       else
  422. !         set head = `head -1 $file`
  423. !         set branch = `head -2 $file | ${grep} -w branch`
  424. !         if ( $#head != 2 || $#branch != 2 ) then
  425.           echo "ERROR: corrupted RCS file $file - aborting"
  426.           endif
  427. !         if ( "$head[2]" == "1.1;" && "$branch[2]" != "1.1.1;" ) then
  428.           ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
  429.           if ( ! $status ) then
  430.               set new = 1
  431.           endif
  432.           else
  433. !             if ( "$branch[2]" != "1.1.1;" ) then
  434.               echo -n "WARNING: Updating locally modified file "
  435.               echo    "${repository}/${name}"
  436.               endif
  437. --- 204,225 ----
  438.               endif
  439.           endif
  440.       else
  441. !         set headbranch = `sed -n '/^head/p; /^branch/p; 2q' $file`
  442. !         if ( $#headbranch != 2 && $#headbranch != 4 ) then
  443.           echo "ERROR: corrupted RCS file $file - aborting"
  444.           endif
  445. !         set head = "$headbranch[2]"
  446. !         set branch = ""
  447. !         if ( $#headbranch == 4 ) then
  448. !         set branch = "$headbranch[4]"
  449. !         endif
  450. !         if ( "$head" == "1.1;" && "$branch" != "1.1.1;" ) then
  451.           ${rcsbin}/rcsdiff -q -r1.1 $file > /dev/null
  452.           if ( ! $status ) then
  453.               set new = 1
  454.           endif
  455.           else
  456. !             if ( "$branch" != "1.1.1;" ) then
  457.               echo -n "WARNING: Updating locally modified file "
  458.               echo    "${repository}/${name}"
  459.               endif
  460. diff -c src/collect_sets.c:1.15 src/collect_sets.c:1.15.1.1
  461. *** src/collect_sets.c:1.15    Wed Feb  6 11:32:09 1991
  462. --- src/collect_sets.c    Wed Feb  6 11:32:09 1991
  463. ***************
  464. *** 1,5 ****
  465.   #ifndef lint
  466. ! static char rcsid[] = "$Id: collect_sets.c,v 1.15 89/11/19 23:19:51 berliner Exp $";
  467.   #endif !lint
  468.   
  469.   /*
  470. --- 1,5 ----
  471.   #ifndef lint
  472. ! static char rcsid[] = "$Id: collect_sets.c,v 1.15.1.1 91/01/29 07:16:13 berliner Exp $";
  473.   #endif !lint
  474.   
  475.   /*
  476. ***************
  477. *** 75,83 ****
  478.               ret++;
  479.               }
  480.           } else {        /* there is a user file */
  481. !             warn(0, "use `cvs add' to create entry for %s",
  482. !              update_user);
  483. !             ret++;
  484.           }
  485.           } else {
  486.           /*
  487. --- 75,85 ----
  488.               ret++;
  489.               }
  490.           } else {        /* there is a user file */
  491. !             if (!force_tag_match) {
  492. !             warn(0, "use `cvs add' to create entry for %s",
  493. !                  update_user);
  494. !             ret++;
  495. !             }
  496.           }
  497.           } else {
  498.           /*
  499. ***************
  500. *** 92,103 ****
  501.           } else {
  502.               /*
  503.                * There is a user file; print a warning and add it
  504. !              * to the conflict list, Clist
  505.                */
  506. !             warn(0, "move away %s; it is in the way", update_user);
  507. !             (void) strcat(Clist, " ");
  508. !             (void) strcat(Clist, User);
  509. !             ret++;
  510.           }
  511.           }
  512.       } else if (VN_User[0] == '0' && VN_User[1] == '\0') {
  513. --- 94,113 ----
  514.           } else {
  515.               /*
  516.                * There is a user file; print a warning and add it
  517. !              * to the conflict list, Clist, only if it is indeed
  518. !              * different from what we plan to extract
  519.                */
  520. !             No_Difference(0);
  521. !             if (strcmp(TS_Rcs, TS_User) == 0) {
  522. !             (void) strcat(Olist, " ");
  523. !             (void) strcat(Olist, User);
  524. !             } else {
  525. !             warn(0, "move away %s; it is in the way",
  526. !                  update_user);
  527. !             (void) strcat(Clist, " ");
  528. !             (void) strcat(Clist, User);
  529. !             ret++;
  530. !             }
  531.           }
  532.           }
  533.       } else if (VN_User[0] == '0' && VN_User[1] == '\0') {
  534. ***************
  535. *** 210,220 ****
  536.                * longer in the repository, a conflict is raised
  537.                */
  538.               if (!force_tag_match) {
  539. !             warn(0, "conflict: %s is modified but no longer in the repository",
  540. !                  update_user);
  541. !             (void) strcat(Clist, " ");
  542. !             (void) strcat(Clist, User);
  543. !             ret++;
  544.               }
  545.           }
  546.           } else if (strcmp(VN_Rcs, VN_User) == 0) {
  547. --- 220,241 ----
  548.                * longer in the repository, a conflict is raised
  549.                */
  550.               if (!force_tag_match) {
  551. !             Locate_RCS();
  552. !             (void) No_Difference(0);
  553. !             if (strcmp(TS_User, TS_Rcs) == 0) {
  554. !                 warn(0,
  555. !         "warning: %s is not (any longer) pertinent",
  556. !                  update_user);
  557. !                 (void) strcat(Wlist, " ");
  558. !                 (void) strcat(Wlist, User);
  559. !             } else {
  560. !                 warn(0,
  561. !         "conflict: %s is modified but no longer in the repository",
  562. !                  update_user);
  563. !                 (void) strcat(Clist, " ");
  564. !                 (void) strcat(Clist, User);
  565. !                 ret++;
  566. !             }
  567.               }
  568.           }
  569.           } else if (strcmp(VN_Rcs, VN_User) == 0) {
  570. diff -c src/commit.c:1.28 src/commit.c:1.28.1.2
  571. *** src/commit.c:1.28    Wed Feb  6 11:32:14 1991
  572. --- src/commit.c    Wed Feb  6 11:32:15 1991
  573. ***************
  574. *** 1,5 ****
  575.   #ifndef lint
  576. ! static char rcsid[] = "$Id: commit.c,v 1.28 89/11/19 23:40:32 berliner Exp $";
  577.   #endif !lint
  578.   
  579.   /*
  580. --- 1,5 ----
  581.   #ifndef lint
  582. ! static char rcsid[] = "$Id: commit.c,v 1.28.1.2 91/01/29 07:16:59 berliner Exp $";
  583.   #endif !lint
  584.   
  585.   /*
  586. ***************
  587. *** 470,475 ****
  588. --- 470,476 ----
  589.       }
  590.       (void) fclose(fp);
  591.       if (strncmp(line, RCSBRANCH, sizeof(RCSBRANCH) - 1) != 0 ||
  592. +     !isspace(line[sizeof(RCSBRANCH) - 1]) ||
  593.       (cp = rindex(line, ';')) == NULL)
  594.       return;
  595.       *cp = '\0';                /* strip the ';' */
  596. ***************
  597. *** 556,568 ****
  598.       setup_tmpfile(fp, CVSEDITPREFIX);
  599.       (void) fprintf(fp, "%sEnter Log.  Lines beginning with '%s' are removed automatically\n",
  600.              CVSEDITPREFIX, CVSEDITPREFIX);
  601. !     (void) fprintf(fp, "%s----------------------------------------------------------------------\n");
  602.       (void) fclose(fp);
  603.       (void) sprintf(prog, "%s %s", Editor, fname);
  604. !     if (system(prog) != 0) {
  605. !     (void) unlink(fname);
  606.       warn(0, "warning: editor session failed");
  607. -     }
  608.       fp = open_file(fname, "r");
  609.       while (fgets(line, sizeof(line), fp) != NULL) {
  610.       if (strncmp(line, CVSEDITPREFIX, sizeof(CVSEDITPREFIX)-1) == 0)
  611. --- 557,567 ----
  612.       setup_tmpfile(fp, CVSEDITPREFIX);
  613.       (void) fprintf(fp, "%sEnter Log.  Lines beginning with '%s' are removed automatically\n",
  614.              CVSEDITPREFIX, CVSEDITPREFIX);
  615. !     (void) fprintf(fp, "%s----------------------------------------------------------------------\n", CVSEDITPREFIX);
  616.       (void) fclose(fp);
  617.       (void) sprintf(prog, "%s %s", Editor, fname);
  618. !     if (system(prog) != 0)
  619.       warn(0, "warning: editor session failed");
  620.       fp = open_file(fname, "r");
  621.       while (fgets(line, sizeof(line), fp) != NULL) {
  622.       if (strncmp(line, CVSEDITPREFIX, sizeof(CVSEDITPREFIX)-1) == 0)
  623. diff -c src/cvs.h:1.24 src/cvs.h:1.24.1.1
  624. *** src/cvs.h:1.24    Wed Feb  6 11:32:11 1991
  625. --- src/cvs.h    Wed Feb  6 11:32:12 1991
  626. ***************
  627. *** 1,4 ****
  628. ! /*    $Id: cvs.h,v 1.24 89/11/19 23:19:57 berliner Exp $    */
  629.   
  630.   #include <strings.h>
  631.   #include <string.h>
  632. --- 1,4 ----
  633. ! /*    $Id: cvs.h,v 1.24.1.1 91/01/18 12:13:48 berliner Exp $    */
  634.   
  635.   #include <strings.h>
  636.   #include <string.h>
  637. ***************
  638. *** 75,84 ****
  639.   #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  640.   #define    RCSID_PAT    "'\\$Id.*\\$'"    /* when committing files */
  641.   #define    RCSEXT        ",v"
  642. ! #define    RCSHEAD        "head "
  643. ! #define    RCSBRANCH    "branch "
  644. ! #define    RCSSYMBOL    "symbols "
  645. ! #define    RCSDATE        "date "
  646.   #define    RCSDESC        "desc"        /* ends the search for branches */
  647.   #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  648.   
  649. --- 75,84 ----
  650.   #define    RCS_MERGE_PAT    "^>>>>>>> "    /* runs "grep" with this pattern */
  651.   #define    RCSID_PAT    "'\\$Id.*\\$'"    /* when committing files */
  652.   #define    RCSEXT        ",v"
  653. ! #define    RCSHEAD        "head"
  654. ! #define    RCSBRANCH    "branch"
  655. ! #define    RCSSYMBOL    "symbols"
  656. ! #define    RCSDATE        "date"
  657.   #define    RCSDESC        "desc"        /* ends the search for branches */
  658.   #define    DATEFORM    "%02d.%02d.%02d.%02d.%02d.%02d"
  659.   
  660. diff -c src/maketime.c:1.2 src/maketime.c:1.2.1.1
  661. *** src/maketime.c:1.2    Wed Feb  6 11:32:08 1991
  662. --- src/maketime.c    Wed Feb  6 11:32:08 1991
  663. ***************
  664. *** 1,19 ****
  665. ! #ifndef lint
  666. ! static char rcsid[] = "$Id: maketime.c,v 1.2 89/05/11 12:03:02 berliner Exp $";
  667. ! #endif !lint
  668.   /*
  669.    * MAKETIME        derive 32-bit time value from TM structure.
  670.    *
  671.    * Usage:
  672. !  *    long t,maketime();
  673.    *    struct tm *tp;    Pointer to TM structure from <time.h>
  674. !  *            NOTE: this must be extended version!!!
  675. !  *    t = maketime(tp);
  676.    *
  677.    * Returns:
  678. !  *    0 if failure; parameter out of range or nonsensical.
  679. !  *    else long time-value.
  680.    * Notes:
  681.    *    This code is quasi-public; it may be used freely in like software.
  682.    *    It is not to be sold, nor used in licensed software without
  683. --- 1,17 ----
  684. ! #
  685.   /*
  686.    * MAKETIME        derive 32-bit time value from TM structure.
  687.    *
  688.    * Usage:
  689. !  *    int zone;    Minutes west of GMT, or
  690. !  *            48*60 for localtime
  691. !  *    time_t t;
  692.    *    struct tm *tp;    Pointer to TM structure from <time.h>
  693. !  *    t = maketime(tp,zone);
  694.    *
  695.    * Returns:
  696. !  *    -1 if failure; parameter out of range or nonsensical.
  697. !  *    else time-value.
  698.    * Notes:
  699.    *    This code is quasi-public; it may be used freely in like software.
  700.    *    It is not to be sold, nor used in licensed software without
  701. ***************
  702. *** 22,55 ****
  703.    *     Copyright 1981 by Ken Harrenstien, SRI International.
  704.    *    (ARPANET: KLH @ SRI)
  705.    */
  706.   
  707.   #include "cvs.h"
  708. ! #include "rcstime.h"
  709.   
  710. ! int daytb[] = {   /* # days in year thus far, indexed by month (0-12!!) */
  711.       0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
  712.   };
  713.   
  714. ! struct tm *localtime();
  715. ! long    time();
  716. ! long maketime(atm)
  717. ! struct tm *atm;
  718. ! {    register struct tm *tp;
  719. !     register int i;
  720. !     int year, yday, mon, day, hour, min, sec, zone, dst, leap;
  721. !     long tres, curtim;
  722. !     (void) time(&curtim);
  723. !     tp = localtime(&curtim);        /* Get breakdowns of current time */
  724. !     year = tp->tm_year;        /* Use to set up defaults */
  725. !     mon = tp->tm_mon;
  726. !     day = tp->tm_mday;
  727.   
  728.   
  729.   #ifdef DEBUG
  730. ! printf("first YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
  731. ! #endif DEBUG
  732.       tp = atm;
  733.   
  734.       /* First must find date, using specified year, month, day.
  735. --- 20,174 ----
  736.    *     Copyright 1981 by Ken Harrenstien, SRI International.
  737.    *    (ARPANET: KLH @ SRI)
  738.    */
  739. + /* $Log:    maketime.c,v $
  740. +  * Revision 1.2.1.1  91/01/18  12:15:21  berliner
  741. +  * For CVS 1.2, contributed by Paul Eggert
  742. +  * 
  743. +  * Revision 1.3  1991/01/18  00:14:48  eggert
  744. +  * Make minimal changes to interface to CVS 1.0.
  745. +  *
  746. +  * Revision 5.2  1990/11/01  05:03:30  eggert
  747. +  * Remove lint.
  748. +  *
  749. +  * Revision 5.1  1990/10/04  06:30:13  eggert
  750. +  * Calculate the GMT offset of 'xxx LT' as of xxx, not as of now.
  751. +  * Don't assume time_t is 32 bits.  Fix bugs near epoch and near end of time.
  752. +  *
  753. +  * Revision 5.0  1990/08/22  08:12:38  eggert
  754. +  * Switch to GMT and fix the bugs exposed thereby.
  755. +  * Permit dates past 1999/12/31.  Ansify and Posixate.
  756. +  *
  757. +  * Revision 1.8  88/11/08  13:54:53  narten
  758. +  * allow negative timezones (-24h <= x <= 24h)
  759. +  * 
  760. +  * Revision 1.7  88/08/28  14:47:52  eggert
  761. +  * Allow cc -R.  Remove unportable "#endif XXX"s.
  762. +  * 
  763. +  * Revision 1.6  87/12/18  17:05:58  narten
  764. +  * include rcsparam.h
  765. +  * 
  766. +  * Revision 1.5  87/12/18  11:35:51  narten
  767. +  * maketime.c: fixed USG code - you have tgo call "tzset" in order to have
  768. +  * "timezone" set. ("localtime" calls it, but it's probably better not to 
  769. +  * count on "localtime" having been called.)
  770. +  * 
  771. +  * Revision 1.4  87/10/18  10:26:57  narten
  772. +  * Updating version numbers. Changes relative to 1.0 are actually 
  773. +  * relative to 1.2
  774. +  * 
  775. +  * Revision 1.3  87/09/24  13:58:45  narten
  776. +  * Sources now pass through lint (if you ignore printf/sprintf/fprintf 
  777. +  * warnings)
  778. +  * 
  779. +  * Revision 1.2  87/03/27  14:21:48  jenkins
  780. +  * Port to suns
  781. +  * 
  782. +  * Revision 1.2  83/12/05  10:12:56  wft
  783. +  * added cond. compilation for USG Unix; long timezone;
  784. +  * 
  785. +  * Revision 1.1  82/05/06  11:38:00  wft
  786. +  * Initial revision
  787. +  * 
  788. +  */
  789.   
  790. + /* minimal changes needed to get this file to work for CVS rather than RCS */
  791. + /* #include "rcsbase.h" */
  792. + #include <sys/types.h>
  793. + #include <time.h>
  794.   #include "cvs.h"
  795. ! #define datesize 32
  796. ! #define faterror(x,y) error(0,x,y)
  797. ! #define libId(x,y) static char x[] = y;
  798. ! #define P(x) ()
  799. ! #define RCSversion 5
  800. ! #define VERSION(x) x
  801. ! #define VOID (void)
  802. ! #if !__STDC__
  803. ! #    define const
  804. ! #endif
  805. ! void str2date();
  806. ! Make_Date(a,b) const char *a; char *b; { str2date(a,b); }
  807. ! libId(maketId, "$Id: maketime.c,v 1.2.1.1 91/01/18 12:15:21 berliner Exp $")
  808. ! static const struct tm *time2tm P((time_t));
  809.   
  810. ! #define given(v) (0 <= (v)) /* Negative values are unspecified. */
  811. ! static const int daytb[] = {
  812. !     /* # days in year thus far, indexed by month (0-12!!) */
  813.       0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365
  814.   };
  815.   
  816. !     static time_t
  817. ! maketime(atm,zone)
  818. !     const struct tm *atm;
  819. !     int zone;
  820. ! {
  821. !     register const struct tm *tp;
  822. !     register int i;
  823. !     int year, yday, mon, day, hour, min, sec, leap, localzone;
  824. !     int attempts;
  825. !     time_t t, tres;
  826. !     attempts = 2;
  827. !     localzone = zone==48*60;
  828. !     tres = -1;
  829. !     year = mon = day = 0;  /* Keep lint happy.  */
  830. !     do {
  831. !     if (localzone || !given(atm->tm_year)) {
  832. !         if (tres == -1)
  833. !             if ((tres = time((time_t*)0))  ==  -1)
  834. !                 return -1;
  835. !         tp = time2tm(tres);
  836. !         /* Get breakdowns of default time, adjusting to zone. */
  837. !         year = tp->tm_year;        /* Use to set up defaults */
  838. !         yday = tp->tm_yday;
  839. !         mon = tp->tm_mon;
  840. !         day = tp->tm_mday;
  841. !         hour = tp->tm_hour;
  842. !         min = tp->tm_min;
  843. !         if (localzone) {
  844. !             tp = localtime(&tres);
  845. !             zone =
  846. !             min - tp->tm_min + 60*(
  847. !                 hour - tp->tm_hour + 24*(
  848. !                     /* If years differ, it's by one day. */
  849. !                         year - tp->tm_year
  850. !                     ?    year - tp->tm_year
  851. !                     :    yday - tp->tm_yday));
  852. !         }
  853. !         /* Adjust the default day, month and year according to zone.  */
  854. !         if ((min -= zone) < 0) {
  855. !             if (hour-(59-min)/60 < 0  &&  --day <= 0) {
  856. !             if (--mon < 0) {
  857. !                 --year;
  858. !                 mon = 11;
  859. !             }
  860. !             day  =  daytb[mon+1] - daytb[mon] + (mon==1&&!(year&3));
  861. !             }
  862. !         } else
  863. !             if (
  864. !               24 <= hour+min/60  &&
  865. !               daytb[mon+1] - daytb[mon] + (mon==1&&!(year&3))  <  ++day
  866. !             ) {
  867. !                 if (11 < ++mon) {
  868. !                     ++year;
  869. !                     mon = 0;
  870. !                 }
  871. !                 day = 1;
  872. !             }
  873. !     }
  874. !     if (zone < -24*60  ||  24*60 < zone)
  875. !         return -1;
  876.   
  877.   
  878.   #ifdef DEBUG
  879. ! printf("first YMD: %d %d %d\n",year,mon,day);
  880. ! #endif
  881.       tp = atm;
  882.   
  883.       /* First must find date, using specified year, month, day.
  884. ***************
  885. *** 56,228 ****
  886.        * If one of these is unspecified, it defaults either to the
  887.        * current date (if no more global spec was given) or to the
  888.        * zero-value for that spec (i.e. a more global spec was seen).
  889. !      * Start with year... note 32 bits can only handle 135 years.
  890.        */
  891. !     if(tp->tm_year != TMNULL)
  892. !       {    if((year = tp->tm_year) >= 1900)    /* Allow full yr # */
  893. !               year -= 1900;            /* by making kosher */
  894.           mon = 0;        /* Since year was given, default */
  895.           day = 1;        /* for remaining specs is zero */
  896.         }
  897. !     if(year < 70 || 70+134 < year )    /* Check range */
  898. !         return(0);        /* ERR: year out of range */
  899. !     leap = year&03 ? 0 : 1;        /* See if leap year */
  900.       year -= 70;            /* UNIX time starts at 1970 */
  901.   
  902.       /*
  903.        * Find day of year.
  904. -      * YDAY is used only if it exists and either the month or day-of-month
  905. -      * is missing.
  906.        */
  907. !     if (tp->tm_yday != TMNULL
  908. !      && (tp->tm_mon == TMNULL || tp->tm_mday == TMNULL))
  909. !         yday = tp->tm_yday;
  910. !     else
  911. !       {    if(tp->tm_mon  != TMNULL)
  912.             {    mon = tp->tm_mon;    /* Month was specified */
  913.               day = 1;        /* so set remaining default */
  914.             }
  915. !         if(mon < 0 || 11 < mon) return(0);    /* ERR: bad month */
  916. !         if(tp->tm_mday != TMNULL) day = tp->tm_mday;
  917.           if(day < 1
  918.            || (((daytb[mon+1]-daytb[mon]) < day)
  919.               && (day!=29 || mon!=1 || !leap) ))
  920. !                 return(0);        /* ERR: bad day */
  921.           yday = daytb[mon]    /* Add # of days in months so far */
  922.             + ((leap        /* Leap year, and past Feb?  If */
  923.                 && mon>1)? 1:0)    /* so, add leap day for this year */
  924.             + day-1;        /* And finally add # days this mon */
  925.   
  926. !                 if (tp->tm_yday != TMNULL       /* Confirm that YDAY correct */
  927. !                  && tp->tm_yday != yday) return(0);     /* ERR: conflict */
  928. !       }
  929. !     if(yday < 0 || (leap?366:365) <= yday)
  930. !         return(0);        /* ERR: bad YDAY or maketime bug */
  931. !     tres = year*365            /* Get # days of years so far */
  932.           + ((year+1)>>2)        /* plus # of leap days since 1970 */
  933.           + yday;            /* and finally add # days this year */
  934.   
  935. -         if((i = tp->tm_wday) != TMNULL) /* Check WDAY if present */
  936. -                 if(i < 0 || 6 < i       /* Ensure within range */
  937. -                   || i != (tres+4)%7)   /* Matches? Jan 1,1970 was Thu = 4 */
  938. -                         return(0);      /* ERR: bad WDAY */
  939.   #ifdef DEBUG
  940.   printf("YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
  941. ! #endif DEBUG
  942.       /*
  943.        * Now determine time.  If not given, default to zeros
  944.        * (since time is always the least global spec)
  945.        */
  946.       tres *= 86400L;            /* Get # seconds (24*60*60) */
  947.       hour = min = sec = 0;
  948. !     if(tp->tm_hour != TMNULL) hour = tp->tm_hour;
  949. !     if(tp->tm_min  != TMNULL) min  = tp->tm_min;
  950. !     if(tp->tm_sec  != TMNULL) sec  = tp->tm_sec;
  951. !     if( min < 0 || 60 <= min
  952. !      || sec < 0 || 60 <= sec) return(0);    /* ERR: MS out of range */
  953. !     if(hour < 0 || 24 <= hour)
  954.           if(hour != 24 || (min+sec) !=0)    /* Allow 24:00 */
  955. !             return(0);        /* ERR: H out of range */
  956. !     /* confirm AM/PM if there */
  957. !     switch(tp->tm_ampm)
  958. !       {    case 0: case TMNULL:    /* Ignore these values */
  959. !             break;
  960. !         case 1:            /* AM */
  961. !         case 2:            /* PM */
  962. !             if(hour > 12) return(0);  /* ERR: hrs 13-23 bad */
  963. !             if(hour ==12) hour = 0;    /* Modulo 12 */
  964. !             if(tp->tm_ampm == 2)    /* If PM, then */
  965. !                 hour += 12;    /*   get 24-hour time */
  966. !             break;
  967. !         default: return(0);    /* ERR: illegal TM_AMPM value */
  968. !       }
  969.   
  970. !     tres += sec + 60L*(min + 60L*hour);    /* Add in # secs of time */
  971.   
  972.   #ifdef DEBUG
  973.   printf("HMS: %d %d %d T=%ld\n",hour,min,sec,tres);
  974. ! #endif DEBUG
  975. !     /*
  976. !      * We now have the GMT date/time and must make final
  977. !      * adjustment for the specified time zone.  If none is specified,
  978. !      * the local time-zone is assumed.
  979. !      */
  980. !     if((zone = tp->tm_zon) == TMNULL    /* If unspecified */
  981. !      || (zone == 1))            /* or local-zone requested */
  982. !         zone = localzone();        /* then set to local zone */
  983. !     if(zone < 0 || 24*60 <= zone)
  984. !         return(0);            /* ERR: zone out of range */
  985. !     /* See if must apply Daylight Saving Time shift.
  986. !      * Note that if DST is specified, validity is not checked.
  987. !      */
  988. !     if((dst = tp->tm_isdst) == TMNULL)    /* Must we figure it out? */
  989. !       {    curtim = tres +localzone()*60L;    /* Yuck.  Get equiv local */
  990. !         dst = localtime(&curtim)->tm_isdst;     /* time, and ask. */
  991. !       }
  992. !     tres += zone*60L -(dst?3600:0);    /* Add in # seconds of zone adj */
  993.   
  994. !     return(tres);
  995. ! }
  996.   
  997.   
  998. ! /* LOCALZONE        return local timezone in # mins west of GMT
  999. !  *
  1000. !  */
  1001.   
  1002. ! #ifdef V6
  1003. ! extern long timezone;
  1004. ! #else
  1005. ! #ifdef USG
  1006. ! extern long timezone;
  1007. ! #else /* V7 */
  1008. ! #include <sys/types.h>
  1009. ! #include <sys/timeb.h>
  1010. ! #endif USG
  1011. ! #endif V6
  1012.   
  1013. ! int _lclzon = -1;
  1014. ! localzone()
  1015.   {
  1016. ! #ifdef V6
  1017. !     return(_lclzon >= 0 ? _lclzon : (_lclzon = timezone/60L));
  1018. ! #else
  1019. ! #ifdef USG
  1020. !     tzset();
  1021. !     return(_lclzon >= 0 ? _lclzon : (_lclzon = timezone/60L));
  1022. ! #else /* V7 */
  1023. !     struct timeb tb;
  1024. !     if(_lclzon < 0)
  1025. !       {    ftime(&tb);
  1026. !         _lclzon = tb.timezone;
  1027. !       }
  1028. !     return(_lclzon);
  1029.   
  1030. ! #endif USG
  1031. ! #endif V6
  1032.   }
  1033.   
  1034. ! Make_Date(rawdate, date)
  1035. !     char *rawdate;
  1036. !     char *date;
  1037.   {
  1038. !     extern int force_tag_match;
  1039. !     struct tm parseddate, *ftm;
  1040. !     long unixtime;
  1041. !     /*
  1042. !      * Dates must "match", else the file is ignored
  1043. !      */
  1044. !     force_tag_match = 1;
  1045. !     if (partime(rawdate, &parseddate) == 0)
  1046. !     error(0, "Can't parse date/time: %s", rawdate);
  1047. !     if ((unixtime = maketime(&parseddate)) == 0L)
  1048. !     error(0, "Inconsistent date/time: %s", rawdate);
  1049. !     ftm = localtime(&unixtime);
  1050. !     (void) sprintf(date, DATEFORM, ftm->tm_year, ftm->tm_mon+1,
  1051. !          ftm->tm_mday, ftm->tm_hour, ftm->tm_min, ftm->tm_sec);
  1052.   }
  1053. --- 175,337 ----
  1054.        * If one of these is unspecified, it defaults either to the
  1055.        * current date (if no more global spec was given) or to the
  1056.        * zero-value for that spec (i.e. a more global spec was seen).
  1057. !      * Reject times that do not fit in time_t,
  1058. !      * without assuming that time_t is 32 bits or is signed.
  1059.        */
  1060. !     if (given(tp->tm_year))
  1061. !       {
  1062. !         year = tp->tm_year;
  1063.           mon = 0;        /* Since year was given, default */
  1064.           day = 1;        /* for remaining specs is zero */
  1065.         }
  1066. !     if (year < 69)            /* 1969/12/31 OK in some timezones.  */
  1067. !         return -1;        /* ERR: year out of range */
  1068. !     leap   =   !(year&3)  &&  (year%100 || !((year+300)%400));
  1069.       year -= 70;            /* UNIX time starts at 1970 */
  1070.   
  1071.       /*
  1072.        * Find day of year.
  1073.        */
  1074. !     {
  1075. !         if (given(tp->tm_mon))
  1076.             {    mon = tp->tm_mon;    /* Month was specified */
  1077.               day = 1;        /* so set remaining default */
  1078.             }
  1079. !         if (11 < (unsigned)mon)
  1080. !             return -1;        /* ERR: bad month */
  1081. !         if (given(tp->tm_mday)) day = tp->tm_mday;
  1082.           if(day < 1
  1083.            || (((daytb[mon+1]-daytb[mon]) < day)
  1084.               && (day!=29 || mon!=1 || !leap) ))
  1085. !                 return -1;    /* ERR: bad day */
  1086.           yday = daytb[mon]    /* Add # of days in months so far */
  1087.             + ((leap        /* Leap year, and past Feb?  If */
  1088.                 && mon>1)? 1:0)    /* so, add leap day for this year */
  1089.             + day-1;        /* And finally add # days this mon */
  1090.   
  1091. !     }
  1092. !     if (leap+365 <= (unsigned)yday)
  1093. !         return -1;        /* ERR: bad YDAY */
  1094. !     if (year < 0) {
  1095. !         if (yday != 364)
  1096. !         return -1;        /* ERR: too early */
  1097. !         t = -1;
  1098. !     } else {
  1099. !         tres = year*365;        /* Get # days of years so far */
  1100. !         if (tres/365 != year)
  1101. !             return -1;        /* ERR: overflow */
  1102. !         t = tres
  1103.           + ((year+1)>>2)        /* plus # of leap days since 1970 */
  1104.           + yday;            /* and finally add # days this year */
  1105. +         if (t+4 < tres)
  1106. +             return -1;        /* ERR: overflow */
  1107. +     }
  1108. +     tres = t;
  1109. +     if (given(i = tp->tm_wday)) /* Check WDAY if present */
  1110. +         if (i != (tres+4)%7)    /* 1970/01/01 was Thu = 4 */
  1111. +             return -1;    /* ERR: bad WDAY */
  1112.   
  1113.   #ifdef DEBUG
  1114.   printf("YMD: %d %d %d, T=%ld\n",year,mon,day,tres);
  1115. ! #endif
  1116.       /*
  1117.        * Now determine time.  If not given, default to zeros
  1118.        * (since time is always the least global spec)
  1119.        */
  1120.       tres *= 86400L;            /* Get # seconds (24*60*60) */
  1121. +     if (tres/86400L != t)
  1122. +         return -1;        /* ERR: overflow */
  1123.       hour = min = sec = 0;
  1124. !     if (given(tp->tm_hour)) hour = tp->tm_hour;
  1125. !     if (given(tp->tm_min )) min  = tp->tm_min;
  1126. !     if (given(tp->tm_sec )) sec  = tp->tm_sec;
  1127. !     if (60 <= (unsigned)min  ||  60 < (unsigned)sec)
  1128. !         return -1;        /* ERR: MS out of range */
  1129. !     if (24 <= (unsigned)hour)
  1130.           if(hour != 24 || (min+sec) !=0)    /* Allow 24:00 */
  1131. !             return -1;    /* ERR: H out of range */
  1132.   
  1133. !     t = tres;
  1134. !     tres += sec + 60L*(zone + min + 60*hour);
  1135.   
  1136.   #ifdef DEBUG
  1137.   printf("HMS: %d %d %d T=%ld\n",hour,min,sec,tres);
  1138. ! #endif
  1139.   
  1140. !     if (!localzone)            /* check for overflow */
  1141. !         return (year<0 ? (tres<0||86400L<=tres) : tres<t)  ?  -1  :  tres;
  1142.   
  1143. +     /* Check results; LT may have had a different GMT offset back then.  */
  1144. +     tp = localtime(&tres);
  1145. +     if (given(atm->tm_sec)  &&  atm->tm_sec != tp->tm_sec)
  1146. +         return -1; /* If seconds don't match, we're in trouble.  */
  1147. +     if (!(
  1148. +         given(atm->tm_min)  &&  atm->tm_min != tp->tm_min  ||
  1149. +         given(atm->tm_hour)  &&  atm->tm_hour != tp->tm_hour  ||
  1150. +         given(atm->tm_mday)  &&  atm->tm_mday != tp->tm_mday  ||
  1151. +         given(atm->tm_mon)  &&  atm->tm_mon != tp->tm_mon  ||
  1152. +         given(atm->tm_year)  &&  atm->tm_year != tp->tm_year
  1153. +     ))
  1154. +         return tres; /* Everything matches.  */
  1155.   
  1156. !     } while (--attempts);
  1157.   
  1158. !     return -1;
  1159. ! }
  1160.   
  1161. ! /*
  1162. ! * Convert Unix time to struct tm format.
  1163. ! * Use Coordinated Universal Time (UTC) if available and if version 5 or newer;
  1164. ! * use local time otherwise.
  1165. ! */
  1166. !     static const struct tm *
  1167. ! time2tm(unixtime)
  1168. !     time_t unixtime;
  1169.   {
  1170. !     const struct tm *tm;
  1171. !     return
  1172. !             VERSION(5)<=RCSversion && (tm = gmtime(&unixtime))
  1173. !         ?    tm
  1174. !         :    localtime(&unixtime);
  1175. ! }
  1176.   
  1177. ! /*
  1178. ! * Convert Unix time to RCS format.
  1179. ! * For compatibility with older versions of RCS,
  1180. ! * dates before AD 2000 are stored without the leading "19".
  1181. ! */
  1182. !     void
  1183. ! time2date(unixtime,date)
  1184. !     time_t unixtime;
  1185. !     char date[datesize];
  1186. ! {
  1187. !     register const struct tm *tm = time2tm(unixtime);
  1188. !     VOID sprintf(date, DATEFORM,
  1189. !         tm->tm_year  +  (tm->tm_year<100 ? 0 : 1900),
  1190. !         tm->tm_mon+1, tm->tm_mday,
  1191. !         tm->tm_hour, tm->tm_min, tm->tm_sec
  1192. !     );
  1193.   }
  1194.   
  1195. !     void
  1196. ! str2date(source, target)
  1197. !     const char *source;
  1198. !     char target[datesize];
  1199. ! /* Parse a free-format date in SOURCE, convert it
  1200. !  * into RCS internal format, and store the result into TARGET.
  1201. !  */
  1202.   {
  1203. !     int zone;
  1204. !     time_t unixtime;
  1205. !     struct tm parseddate;
  1206. !     if (!partime(source, &parseddate, &zone))
  1207. !         faterror("can't parse date/time: %s", source);
  1208. !     if ((unixtime = maketime(&parseddate, zone))  ==  -1)
  1209. !         faterror("bad date/time: %s", source);
  1210. !     time2date(unixtime, target);
  1211.   }
  1212. diff -c src/modules.c:1.14 src/modules.c:1.14.1.1
  1213. *** src/modules.c:1.14    Wed Feb  6 11:32:12 1991
  1214. --- src/modules.c    Wed Feb  6 11:32:13 1991
  1215. ***************
  1216. *** 1,5 ****
  1217.   #ifndef lint
  1218. ! static char rcsid[] = "$Id: modules.c,v 1.14 89/11/19 23:20:12 berliner Exp $";
  1219.   #endif !lint
  1220.   
  1221.   /*
  1222. --- 1,5 ----
  1223.   #ifndef lint
  1224. ! static char rcsid[] = "$Id: modules.c,v 1.14.1.1 91/01/29 07:17:32 berliner Exp $";
  1225.   #endif !lint
  1226.   
  1227.   /*
  1228. ***************
  1229. *** 268,273 ****
  1230. --- 268,274 ----
  1231.           err += patched((char *)0);
  1232.       else
  1233.           error(0, "impossible module type %d", (int)m_type);
  1234. +     update_dir[0] = '\0';
  1235.       return (err);
  1236.       }
  1237.       argc--;
  1238. diff -c src/no_difference.c:1.7 src/no_difference.c:1.7.1.1
  1239. *** src/no_difference.c:1.7    Wed Feb  6 11:32:09 1991
  1240. --- src/no_difference.c    Wed Feb  6 11:32:09 1991
  1241. ***************
  1242. *** 1,5 ****
  1243.   #ifndef lint
  1244. ! static char rcsid[] = "$Id: no_difference.c,v 1.7 89/11/19 23:20:16 berliner Exp $";
  1245.   #endif !lint
  1246.   
  1247.   /*
  1248. --- 1,5 ----
  1249.   #ifndef lint
  1250. ! static char rcsid[] = "$Id: no_difference.c,v 1.7.1.1 91/01/29 07:18:06 berliner Exp $";
  1251.   #endif !lint
  1252.   
  1253.   /*
  1254. ***************
  1255. *** 39,45 ****
  1256.           xchmod(User, 0);
  1257.           Version_TS(Rcs, Tag, User);
  1258.           (void) strcpy(TS_Rcs, TS_User);
  1259. !         Register(User, VN_Rcs, TS_User);
  1260.           if (doGlist) {
  1261.           (void) strcat(Olist, " ");
  1262.           (void) strcat(Olist, User);
  1263. --- 39,45 ----
  1264.           xchmod(User, 0);
  1265.           Version_TS(Rcs, Tag, User);
  1266.           (void) strcpy(TS_Rcs, TS_User);
  1267. !         Register(User, VN_User[0] ? VN_User : VN_Rcs, TS_User);
  1268.           if (doGlist) {
  1269.           (void) strcat(Olist, " ");
  1270.           (void) strcat(Olist, User);
  1271. diff -c src/partime.c:1.1 src/partime.c:1.1.1.1
  1272. *** src/partime.c:1.1    Wed Feb  6 11:32:07 1991
  1273. --- src/partime.c    Wed Feb  6 11:32:07 1991
  1274. ***************
  1275. *** 1,17 ****
  1276. - #ifndef lint
  1277. - static char rcsid[] = "$Id: partime.c,v 1.1 89/05/09 11:51:02 berliner Exp $";
  1278. - #endif
  1279.   /*
  1280.    * PARTIME        parse date/time string into a TM structure
  1281.    *
  1282. -  * Usage:
  1283. -  *      #include "time.h"             -- expanded tm structure
  1284. -  *    char *str; struct tm *tp;
  1285. -  *    partime(str,tp);
  1286.    * Returns:
  1287.    *    0 if parsing failed
  1288. !  *    else time values in specified TM structure (unspecified values
  1289.    *        set to TMNULL)
  1290.    * Notes:
  1291.    *    This code is quasi-public; it may be used freely in like software.
  1292. --- 1,9 ----
  1293.   /*
  1294.    * PARTIME        parse date/time string into a TM structure
  1295.    *
  1296.    * Returns:
  1297.    *    0 if parsing failed
  1298. !  *    else time values in specified TM structure and zone (unspecified values
  1299.    *        set to TMNULL)
  1300.    * Notes:
  1301.    *    This code is quasi-public; it may be used freely in like software.
  1302. ***************
  1303. *** 26,58 ****
  1304.    *    If parsing changed so that no backup needed, could perhaps modify
  1305.    *        to use a FILE input stream.  Need terminator, though.
  1306.    *    Perhaps should return 0 on success, else a non-zero error val?
  1307. -  *    Flush AMPM from TM structure and handle locally within PARTIME,
  1308. -  *        like midnight/noon?
  1309.    */
  1310.   
  1311. ! #include <stdio.h>
  1312. ! #include <ctype.h>
  1313. ! #include "rcstime.h"
  1314.   
  1315. ! #ifndef lint
  1316. ! static char timeid[] = TIMEID;
  1317.   #endif
  1318.   
  1319.   struct tmwent {
  1320. !     char *went;
  1321. !     long wval;    /* must be big enough to hold pointer or integer */
  1322.       char wflgs;
  1323.       char wtype;
  1324.   };
  1325.       /* wflgs */
  1326. - #define TWSPEC 01    /* Word wants special processing */
  1327.   #define TWTIME 02    /* Word is a time value (absence implies date) */
  1328.   #define TWDST  04    /* Word is a DST-type timezone */
  1329. ! #define TW1200 010    /* Word is NOON or MIDNIGHT (sigh) */
  1330.   
  1331. ! int pt12hack();
  1332. ! int ptnoise();
  1333. ! struct tmwent tmwords [] = {
  1334.       {"january",      0, 0, TM_MON},
  1335.       {"february",     1, 0, TM_MON},
  1336.       {"march",        2, 0, TM_MON},
  1337. --- 18,106 ----
  1338.    *    If parsing changed so that no backup needed, could perhaps modify
  1339.    *        to use a FILE input stream.  Need terminator, though.
  1340.    *    Perhaps should return 0 on success, else a non-zero error val?
  1341.    */
  1342.   
  1343. ! /* $Log:    partime.c,v $
  1344. !  * Revision 1.1.1.1  91/01/18  12:18:12  berliner
  1345. !  * For CVS 1.2, contributed by Paul Eggert
  1346. !  * 
  1347. !  * Revision 1.2  1991/01/18  00:14:49  eggert
  1348. !  * Make minimal changes to interface to CVS 1.0.
  1349. !  *
  1350. !  * Revision 5.4  1990/10/04  06:30:15  eggert
  1351. !  * Remove date vs time heuristics that fail between 2000 and 2400.
  1352. !  * Check for overflow when lexing an integer.
  1353. !  * Parse 'Jan 10 LT' as 'Jan 10, LT', not 'Jan, 10 LT'.
  1354. !  *
  1355. !  * Revision 5.3  1990/09/24  18:56:31  eggert
  1356. !  * Update timezones.
  1357. !  *
  1358. !  * Revision 5.2  1990/09/04  08:02:16  eggert
  1359. !  * Don't parse two-digit years, because it won't work after 1999/12/31.
  1360. !  * Don't permit 'Aug Aug'.
  1361. !  *
  1362. !  * Revision 5.1  1990/08/29  07:13:49  eggert
  1363. !  * Be able to parse our own date format.  Don't assume year<10000.
  1364. !  *
  1365. !  * Revision 5.0  1990/08/22  08:12:40  eggert
  1366. !  * Switch to GMT and fix the bugs exposed thereby.  Update timezones.
  1367. !  * Ansify and Posixate.  Fix peekahead and int-size bugs.
  1368. !  *
  1369. !  * Revision 1.4  89/05/01  14:48:46  narten
  1370. !  * fixed #ifdef DEBUG construct
  1371. !  * 
  1372. !  * Revision 1.3  88/08/28  14:53:40  eggert
  1373. !  * Remove unportable "#endif XXX"s.
  1374. !  * 
  1375. !  * Revision 1.2  87/03/27  14:21:53  jenkins
  1376. !  * Port to suns
  1377. !  * 
  1378. !  * Revision 1.1  82/05/06  11:38:26  wft
  1379.