From ef97cc6c11f61403fd0f39b0d7c350286c611f93 Mon Sep 17 00:00:00 2001 From: Thorsten Lockert Date: Sat, 22 Aug 1998 20:52:51 +0000 Subject: Latest version from Cyclic --- gnu/usr.bin/cvs/BUGS | 14 - gnu/usr.bin/cvs/ChangeLog | 62 ++ gnu/usr.bin/cvs/INSTALL | 14 +- gnu/usr.bin/cvs/NEWS | 10 +- gnu/usr.bin/cvs/README.VMS | 13 +- gnu/usr.bin/cvs/TESTS | 4 +- gnu/usr.bin/cvs/acconfig.h | 4 + gnu/usr.bin/cvs/config.h.in | 13 + gnu/usr.bin/cvs/cvs.spec | 14 +- gnu/usr.bin/cvs/cvsnt.mak | 1748 ++++++++++------------------------------ gnu/usr.bin/cvs/diff/ChangeLog | 53 ++ gnu/usr.bin/cvs/diff/context.c | 54 +- gnu/usr.bin/cvs/diff/diff.c | 97 ++- gnu/usr.bin/cvs/diff/diff.h | 13 +- gnu/usr.bin/cvs/diff/diff3.c | 344 +++++--- gnu/usr.bin/cvs/diff/diffrun.h | 69 ++ gnu/usr.bin/cvs/diff/ed.c | 40 +- gnu/usr.bin/cvs/diff/ifdef.c | 70 +- gnu/usr.bin/cvs/diff/normal.c | 8 +- gnu/usr.bin/cvs/diff/side.c | 44 +- gnu/usr.bin/cvs/src/ChangeLog | 354 ++++++++ gnu/usr.bin/cvs/src/add.c | 33 +- gnu/usr.bin/cvs/src/sanity.sh | 784 ++++++++++++++++-- 23 files changed, 2172 insertions(+), 1687 deletions(-) create mode 100644 gnu/usr.bin/cvs/diff/diffrun.h diff --git a/gnu/usr.bin/cvs/BUGS b/gnu/usr.bin/cvs/BUGS index 58be27c8c6a..713d4c05882 100644 --- a/gnu/usr.bin/cvs/BUGS +++ b/gnu/usr.bin/cvs/BUGS @@ -15,20 +15,6 @@ similar file for the unix-like operating systems (not yet, at least). This file also might contain some platform-specific bugs. -* One cannot specify some files as binary in a "cvs import" using -CVSROOT/cvswrappers (for why, note that client_process_import_file has -no way of knowing about CVSROOT/cvswrappers which is off on the -server). - - -* I don't think that "cvs add" honors any of the -k wrappers, at least -not in client/server mode. I would think it should. Getting -CVSROOT/cvswrappers to work would presumably best be done by keeping a -copy of it in the CVS directory on the client, as has also been -discussed for CVS/Template, &c. Getting a client-side .cvswrappers to -work is a separate issue. - - * Need more work on the procedure for fixing it if a binary file is accidentally added in text mode (sanity.sh test cases, better documentation, probably update and/or admin -kb should update diff --git a/gnu/usr.bin/cvs/ChangeLog b/gnu/usr.bin/cvs/ChangeLog index ed9d5510c62..cb4801be423 100644 --- a/gnu/usr.bin/cvs/ChangeLog +++ b/gnu/usr.bin/cvs/ChangeLog @@ -1,3 +1,65 @@ +1998-08-06 Jim Kingdon + + * INSTALL: Update for SCO OpenServer 5 (reported by Jeffery + Cann). + +1998-08-01 Jim Kingdon + + * INSTALL: Add Unixware 7 (reported by Phillip Porch). + +1998-07-29 Jim Kingdon + + * cvsnt.mak: For rcscmds.c, also include files from the diff + directory. Plus of course the usual voluminous "because Visual + C++ 4.0 feels like it" changes. + +Tue Jul 28 22:16:48 1998 Noel Cragg + + * Makefile.in (dist): unset the GZIP shell variable before calling + gzip to avoid invocation problems. + +Sun Jul 26 16:22:21 1998 Noel Cragg + + * NEWS: add info about TopLevelAdmin. + +1998-07-20 Jim Kingdon + + * INSTALL: Update entries for HPUX and AIX (based on a submission + from Andreas Ley). + +1998-06-25 Jim Kingdon + + * README.VMS: We generally don't need GNU patch any more. + +1998-06-03 Jim Kingdon + + * TESTS: Don't mention the version of Solaris; Mark Borges says + that it applies to Solaris 2.5 as well as 2.6. + +1998-06-02 Assar Westerlund + + * configure.in: Test for GSS_C_NT_HOSTBASED_SERVICE in gssapi.h. + * acconfig.h: Add undef for HAVE_GSS_C_NT_HOSTBASED_SERVICE. + * configure, config.h.in: Rebuild. + +1998-06-01 Assar Westerlund + and Ian Lance Taylor + + * configure.in: Check for GSSAPI headers individually. Use a + different set of GSSPI libraries if gssapi.h rather than + gssapi/gssapi.h is found. Adds Heimdal support. + * configure, config.h.in: Rebuild. + +1998-05-25 Jim Kingdon + + * cvs.spec (%description): Rewrite to be slightly more verbose + about the basic features. Don't try to mention what CVS lacks. + +1998-05-23 Jim Kingdon + + * BUGS: Remove items about binary file bugs which were fixed + approximately 6 months ago. + 1998-04-28 Jim Kingdon * TESTS: Add note about Solaris sort program (reported by Mark diff --git a/gnu/usr.bin/cvs/INSTALL b/gnu/usr.bin/cvs/INSTALL index 576f9a6f62c..252849077f9 100644 --- a/gnu/usr.bin/cvs/INSTALL +++ b/gnu/usr.bin/cvs/INSTALL @@ -118,14 +118,15 @@ HPPA: HPPA running HP-UX 9 (1.8) HPPA 1.1 running HP-UX A.09.03 (1.5.95) (footnote 8) HPPA 1.1 running HP-UX A.09.04 (1.7.1) - HPPA 9000/735 running HP-UX A.09.05 (1.8.87) + HPPA running HP-UX 9.05 (1.9) HPPA running HP-UX 10.01 (1.7) - HPPA running HP-UX 10.20 using gcc 2.7.2.2 (1.9.14) + HPPA running HP-UX 10.20 (1.9, 1.9.14) NextSTEP 3.3 (1.7) i386 family: Solaris 2.4 using gcc (about 1.4A2) UnixWare v1.1.1 using gcc (about 1.4A2) Unixware 2.1 (1.8.86) + Unixware 7 (1.9.29) ISC 4.0.1 (1.8.87) Linux (kernel 1.2.x) (1.8.86) Linux (kernel 2.0.x, RedHat 4.2) (1.9) @@ -133,7 +134,7 @@ i386 family: FreeBSD 2.1.5-stable (1.8.87) NextSTEP 3.3 (1.7) SCO Unix 3.2.4.2, gcc 2.7.2 (1.8.87) (footnote 4) - SCO OpenServer 5 (1.8.86) + SCO OpenServer 5 (1.9.29) Sequent Dynix/PTX 4.1.4 (1.9.20 or so + patches) Lynx 2.3.0 080695 (1.6.86) (footnote 9) Windows NT 3.51 (1.8.86 client; 1.8.3 local) @@ -164,7 +165,7 @@ MIPS: PowerPC or RS/6000: IBM RS/6000 running AIX 3.1 using gcc and cc (1.6.86) IBM RS/6000 running AIX 3.2.5 (1.8) - IBM RS/6000 running AIX 4.1 using gcc and cc (about 1.4A2) (footnote 1) + IBM RS/6000 running AIX 4.1 (1.9) Lynx 2.3.1 120495 (1.6.86) (footnote 9) Lynx 2.5 (1.9) (footnote 10) SPARC: @@ -179,11 +180,6 @@ VAX: VAX running VMS 6.2 (1.9+patches, client-only) (see README.VMS for information on necessary hacks). -(footnote 1) - AIX 4.1 systems fail to run "configure" due to bugs in their - "/bin/sh" implementation. You might want to try feeding the - configure script to "bash" ported to AIX 4.1. (about 1.4A2). - (footnote 2) Some Irix 4.0 systems may core dump in malloc while running CVS. We believe this is a bug in the Irix malloc. You can diff --git a/gnu/usr.bin/cvs/NEWS b/gnu/usr.bin/cvs/NEWS index 6d38c9f1c03..309c5105a61 100644 --- a/gnu/usr.bin/cvs/NEWS +++ b/gnu/usr.bin/cvs/NEWS @@ -1,5 +1,11 @@ Changes since 1.9: +* There is a new feature, enabled by TopLevelAdmin in CVSROOT/config, +which tells CVS to modify the behavior of the "checkout" command. The +command now creates a CVS directory at the top level of the new +working directory, in addition to CVS directories created within +checked-out directories. See the Cederqvist for details. + * There is an optional set of features, enabled by PreservePermissions in CVSROOT/config, which allow CVS to store unix-specific file information such as permissions, file ownership, and links. See the @@ -55,10 +61,6 @@ cvs.texinfo for details, including a discussion of security issues. Note that the requirement that read-only users be able to create locks and write the history file still applies. -* The "checkout" command now creates a CVS directory at the top level -of the new working directory, in addition to CVS directories created -within checked-out directories. - * There is a new administrative file verifymsg which is like editinfo but merely validates the message, rather than also getting it from the user. It therefore works with client/server CVS or if one uses the -m diff --git a/gnu/usr.bin/cvs/README.VMS b/gnu/usr.bin/cvs/README.VMS index 8e459184cb1..bde0f91c7ea 100644 --- a/gnu/usr.bin/cvs/README.VMS +++ b/gnu/usr.bin/cvs/README.VMS @@ -15,16 +15,9 @@ on another machine (a Unix box) which runs a complete port of CVS. Most (all?) work to date has been done on OpenVMS/AXP 6.2. Other VMS variants might work too. -You will also need GNU patch installed on your system. Here's a list -of ftp servers which have VMS GNU resources, taken from - - ftp://prep.ai.mit.edu/pub/gnu/vms.README - - mvb.saic.com - wuarchive.wustl.edu - ftp.wku.edu - ftp.spc.edu - ftp.stacken.kth.se +Provided that both your client and your server are recent (for +example, CVS 1.9.27 or later), you shouldn't need GNU patch or any +other executables other than CVS.EXE. Please send bug reports to bug-cvs@gnu.org. diff --git a/gnu/usr.bin/cvs/TESTS b/gnu/usr.bin/cvs/TESTS index 97463b56cd9..7281ac1a928 100644 --- a/gnu/usr.bin/cvs/TESTS +++ b/gnu/usr.bin/cvs/TESTS @@ -17,9 +17,9 @@ can set the TESTDIR environment variable to the desired location before running them. You will probably need GNU expr, which is part of the GNU sh-utils -package. You may also need sort from the GNU textutils; Solaris 2.6 +package. You may also need sort from the GNU textutils; Solaris in particular has been reported to have a sort program which does not -behave the way that the testsuite expects (with Solaris 2.6, lines +behave the way that the testsuite expects (with Solaris, lines starting with tabs sort before blank lines). These programs are just for running the tests; CVS itself doesn't require expr or sort. diff --git a/gnu/usr.bin/cvs/acconfig.h b/gnu/usr.bin/cvs/acconfig.h index 8ccbf8f9021..7748e28f19a 100644 --- a/gnu/usr.bin/cvs/acconfig.h +++ b/gnu/usr.bin/cvs/acconfig.h @@ -4,6 +4,10 @@ /* Define if you have GSSAPI with MIT Kerberos version 5 available. */ #undef HAVE_GSSAPI +/* Define if GSS_C_NT_HOSTBASED_SERVICE is defined in the gssapi.h + header file. Only relevant when using GSSAPI. */ +#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE + /* Define if you want CVS to be able to be a remote repository client. */ #undef CLIENT_SUPPORT diff --git a/gnu/usr.bin/cvs/config.h.in b/gnu/usr.bin/cvs/config.h.in index af42df6b3f3..1280d2e54bd 100644 --- a/gnu/usr.bin/cvs/config.h.in +++ b/gnu/usr.bin/cvs/config.h.in @@ -74,6 +74,10 @@ /* Define if you have GSSAPI with MIT Kerberos version 5 available. */ #undef HAVE_GSSAPI +/* Define if GSS_C_NT_HOSTBASED_SERVICE is defined in the gssapi.h + header file. Only relevant when using GSSAPI. */ +#undef HAVE_GSS_C_NT_HOSTBASED_SERVICE + /* Define if you want CVS to be able to be a remote repository client. */ #undef CLIENT_SUPPORT @@ -191,6 +195,15 @@ /* Define if you have the header file. */ #undef HAVE_FCNTL_H +/* Define if you have the header file. */ +#undef HAVE_GSSAPI_H + +/* Define if you have the header file. */ +#undef HAVE_GSSAPI_GSSAPI_H + +/* Define if you have the header file. */ +#undef HAVE_GSSAPI_GSSAPI_GENERIC_H + /* Define if you have the header file. */ #undef HAVE_IO_H diff --git a/gnu/usr.bin/cvs/cvs.spec b/gnu/usr.bin/cvs/cvs.spec index bb8656b0179..bae2f9cdd60 100644 --- a/gnu/usr.bin/cvs/cvs.spec +++ b/gnu/usr.bin/cvs/cvs.spec @@ -10,13 +10,13 @@ Prefix: /usr %description CVS is a version control system, which allows you to keep old versions of files (usually source code), keep a log of who, when, and why -changes occurred, etc., like RCS or SCCS. It handles multiple -developers, multiple directories, triggers to enable/log/control -various operations, and can work over a wide area network. The -following tasks are not included; they can be done in conjunction with -CVS but will tend to require some script-writing and software other -than CVS: bug-tracking, build management (that is, make and make-like -tools), and automated testing. +changes occurred, etc., like RCS or SCCS. Unlike the simpler systems, +CVS does not just operate on one file at a time or one directory at a +time, but operates on hierarchical collections of directories +consisting of version controlled files. CVS helps to manage releases +and to control the concurrent editing of source files among multiple +authors. CVS allows triggers to enable/log/control various +operations and works well over a wide area network. %prep %setup diff --git a/gnu/usr.bin/cvs/cvsnt.mak b/gnu/usr.bin/cvs/cvsnt.mak index 85b6f1ea044..08ea6b65510 100644 --- a/gnu/usr.bin/cvs/cvsnt.mak +++ b/gnu/usr.bin/cvs/cvsnt.mak @@ -51,110 +51,110 @@ ALL : "$(OUTDIR)\cvs.exe" CLEAN : -@erase ".\WinRel\cvs.exe" - -@erase ".\WinRel\inflate.obj" - -@erase ".\WinRel\trees.obj" - -@erase ".\WinRel\getline.obj" - -@erase ".\WinRel\edit.obj" -@erase ".\WinRel\zutil.obj" - -@erase ".\WinRel\ifdef.obj" - -@erase ".\WinRel\create_adm.obj" - -@erase ".\WinRel\zlib.obj" - -@erase ".\WinRel\main.obj" - -@erase ".\WinRel\cmpbuf.obj" - -@erase ".\WinRel\crc32.obj" - -@erase ".\WinRel\infcodes.obj" - -@erase ".\WinRel\myndbm.obj" + -@erase ".\WinRel\buffer.obj" + -@erase ".\WinRel\admin.obj" + -@erase ".\WinRel\subr.obj" + -@erase ".\WinRel\diff3.obj" + -@erase ".\WinRel\2\version.obj" -@erase ".\WinRel\savecwd.obj" - -@erase ".\WinRel\client.obj" - -@erase ".\WinRel\1\diff.obj" - -@erase ".\WinRel\scramble.obj" - -@erase ".\WinRel\filesubr.obj" + -@erase ".\WinRel\getopt.obj" + -@erase ".\WinRel\expand_path.obj" + -@erase ".\WinRel\login.obj" -@erase ".\WinRel\infutil.obj" - -@erase ".\WinRel\gzio.obj" - -@erase ".\WinRel\fnmatch.obj" - -@erase ".\WinRel\side.obj" - -@erase ".\WinRel\win32.obj" + -@erase ".\WinRel\classify.obj" -@erase ".\WinRel\inffast.obj" - -@erase ".\WinRel\startserver.obj" - -@erase ".\WinRel\ignore.obj" - -@erase ".\WinRel\expand_path.obj" - -@erase ".\WinRel\repos.obj" - -@erase ".\WinRel\rtag.obj" - -@erase ".\WinRel\valloc.obj" - -@erase ".\WinRel\cvsrc.obj" - -@erase ".\WinRel\lock.obj" - -@erase ".\WinRel\log.obj" - -@erase ".\WinRel\ed.obj" + -@erase ".\WinRel\create_adm.obj" + -@erase ".\WinRel\dir.obj" + -@erase ".\WinRel\mkmodules.obj" + -@erase ".\WinRel\normal.obj" + -@erase ".\WinRel\yesno.obj" + -@erase ".\WinRel\md5.obj" + -@erase ".\WinRel\fileattr.obj" + -@erase ".\WinRel\logmsg.obj" + -@erase ".\WinRel\sighandle.obj" + -@erase ".\WinRel\edit.obj" -@erase ".\WinRel\deflate.obj" -@erase ".\WinRel\analyze.obj" - -@erase ".\WinRel\commit.obj" - -@erase ".\WinRel\patch.obj" - -@erase ".\WinRel\classify.obj" - -@erase ".\WinRel\2\diff.obj" + -@erase ".\WinRel\regex.obj" + -@erase ".\WinRel\tag.obj" + -@erase ".\WinRel\zlib.obj" + -@erase ".\WinRel\pwd.obj" + -@erase ".\WinRel\main.obj" + -@erase ".\WinRel\xgetwd.obj" -@erase ".\WinRel\history.obj" - -@erase ".\WinRel\add.obj" - -@erase ".\WinRel\update.obj" - -@erase ".\WinRel\2\version.obj" + -@erase ".\WinRel\error.obj" -@erase ".\WinRel\uncompr.obj" - -@erase ".\WinRel\buffer.obj" - -@erase ".\WinRel\rcmd.obj" - -@erase ".\WinRel\find_names.obj" - -@erase ".\WinRel\watch.obj" - -@erase ".\WinRel\getopt.obj" - -@erase ".\WinRel\checkin.obj" - -@erase ".\WinRel\fileattr.obj" + -@erase ".\WinRel\io.obj" + -@erase ".\WinRel\server.obj" + -@erase ".\WinRel\gzio.obj" + -@erase ".\WinRel\log.obj" -@erase ".\WinRel\modules.obj" - -@erase ".\WinRel\rcs.obj" - -@erase ".\WinRel\admin.obj" - -@erase ".\WinRel\mkmodules.obj" - -@erase ".\WinRel\diff3.obj" - -@erase ".\WinRel\run.obj" - -@erase ".\WinRel\compress.obj" + -@erase ".\WinRel\1\version.obj" + -@erase ".\WinRel\vasprintf.obj" + -@erase ".\WinRel\filesubr.obj" + -@erase ".\WinRel\rtag.obj" + -@erase ".\WinRel\root.obj" + -@erase ".\WinRel\fncase.obj" + -@erase ".\WinRel\lock.obj" + -@erase ".\WinRel\infblock.obj" + -@erase ".\WinRel\inftrees.obj" + -@erase ".\WinRel\find_names.obj" + -@erase ".\WinRel\import.obj" -@erase ".\WinRel\waitpid.obj" - -@erase ".\WinRel\normal.obj" -@erase ".\WinRel\adler32.obj" - -@erase ".\WinRel\login.obj" - -@erase ".\WinRel\sighandle.obj" - -@erase ".\WinRel\util.obj" - -@erase ".\WinRel\logmsg.obj" - -@erase ".\WinRel\remove.obj" + -@erase ".\WinRel\inflate.obj" + -@erase ".\WinRel\checkout.obj" -@erase ".\WinRel\entries.obj" - -@erase ".\WinRel\dir.obj" + -@erase ".\WinRel\status.obj" + -@erase ".\WinRel\sockerror.obj" -@erase ".\WinRel\getopt1.obj" - -@erase ".\WinRel\md5.obj" - -@erase ".\WinRel\xgetwd.obj" - -@erase ".\WinRel\yesno.obj" + -@erase ".\WinRel\ifdef.obj" + -@erase ".\WinRel\startserver.obj" + -@erase ".\WinRel\rcs.obj" + -@erase ".\WinRel\rcmd.obj" + -@erase ".\WinRel\crc32.obj" -@erase ".\WinRel\no_diff.obj" - -@erase ".\WinRel\root.obj" - -@erase ".\WinRel\tag.obj" - -@erase ".\WinRel\server.obj" - -@erase ".\WinRel\pwd.obj" - -@erase ".\WinRel\parseinfo.obj" - -@erase ".\WinRel\infblock.obj" - -@erase ".\WinRel\inftrees.obj" - -@erase ".\WinRel\regex.obj" - -@erase ".\WinRel\io.obj" - -@erase ".\WinRel\1\version.obj" - -@erase ".\WinRel\vasprintf.obj" + -@erase ".\WinRel\argmatch.obj" + -@erase ".\WinRel\run.obj" + -@erase ".\WinRel\fnmatch.obj" + -@erase ".\WinRel\ndir.obj" -@erase ".\WinRel\vers_ts.obj" - -@erase ".\WinRel\checkout.obj" - -@erase ".\WinRel\stripslash.obj" - -@erase ".\WinRel\error.obj" - -@erase ".\WinRel\hash.obj" - -@erase ".\WinRel\subr.obj" - -@erase ".\WinRel\fncase.obj" - -@erase ".\WinRel\import.obj" + -@erase ".\WinRel\win32.obj" + -@erase ".\WinRel\cmpbuf.obj" + -@erase ".\WinRel\myndbm.obj" + -@erase ".\WinRel\client.obj" + -@erase ".\WinRel\repos.obj" + -@erase ".\WinRel\1\diff.obj" + -@erase ".\WinRel\util.obj" + -@erase ".\WinRel\remove.obj" + -@erase ".\WinRel\cvsrc.obj" -@erase ".\WinRel\release.obj" -@erase ".\WinRel\recurse.obj" - -@erase ".\WinRel\argmatch.obj" - -@erase ".\WinRel\sockerror.obj" + -@erase ".\WinRel\parseinfo.obj" + -@erase ".\WinRel\compress.obj" -@erase ".\WinRel\context.obj" -@erase ".\WinRel\rcscmds.obj" + -@erase ".\WinRel\infcodes.obj" + -@erase ".\WinRel\ignore.obj" -@erase ".\WinRel\wrapper.obj" - -@erase ".\WinRel\status.obj" - -@erase ".\WinRel\ndir.obj" + -@erase ".\WinRel\patch.obj" + -@erase ".\WinRel\stripslash.obj" + -@erase ".\WinRel\scramble.obj" + -@erase ".\WinRel\ed.obj" + -@erase ".\WinRel\valloc.obj" -@erase ".\WinRel\getdate.obj" -@erase ".\WinRel\mkdir.obj" + -@erase ".\WinRel\add.obj" + -@erase ".\WinRel\watch.obj" + -@erase ".\WinRel\checkin.obj" + -@erase ".\WinRel\side.obj" + -@erase ".\WinRel\commit.obj" + -@erase ".\WinRel\trees.obj" + -@erase ".\WinRel\getline.obj" + -@erase ".\WinRel\2\diff.obj" + -@erase ".\WinRel\update.obj" + -@erase ".\WinRel\hash.obj" "$(OUTDIR)" : if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" @@ -182,110 +182,110 @@ LINK32_FLAGS=wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ /subsystem:console /incremental:no /pdb:"$(OUTDIR)/cvs.pdb" /machine:I386\ /out:"$(OUTDIR)/cvs.exe" LINK32_OBJS= \ - "$(INTDIR)/inflate.obj" \ - "$(INTDIR)/trees.obj" \ - "$(INTDIR)/getline.obj" \ - "$(INTDIR)/edit.obj" \ "$(INTDIR)/zutil.obj" \ - "$(INTDIR)/ifdef.obj" \ - "$(INTDIR)/create_adm.obj" \ - "$(INTDIR)/zlib.obj" \ - "$(INTDIR)/main.obj" \ - "$(INTDIR)/cmpbuf.obj" \ - "$(INTDIR)/crc32.obj" \ - "$(INTDIR)/infcodes.obj" \ - "$(INTDIR)/myndbm.obj" \ + "$(INTDIR)/buffer.obj" \ + "$(INTDIR)/admin.obj" \ + "$(INTDIR)/subr.obj" \ + "$(INTDIR)/diff3.obj" \ + ".\WinRel\2\version.obj" \ "$(INTDIR)/savecwd.obj" \ - "$(INTDIR)/client.obj" \ - ".\WinRel\1\diff.obj" \ - "$(INTDIR)/scramble.obj" \ - "$(INTDIR)/filesubr.obj" \ + "$(INTDIR)/getopt.obj" \ + "$(INTDIR)/expand_path.obj" \ + "$(INTDIR)/login.obj" \ "$(INTDIR)/infutil.obj" \ - "$(INTDIR)/gzio.obj" \ - "$(INTDIR)/fnmatch.obj" \ - "$(INTDIR)/side.obj" \ - "$(INTDIR)/win32.obj" \ + "$(INTDIR)/classify.obj" \ "$(INTDIR)/inffast.obj" \ - "$(INTDIR)/startserver.obj" \ - "$(INTDIR)/ignore.obj" \ - "$(INTDIR)/expand_path.obj" \ - "$(INTDIR)/repos.obj" \ - "$(INTDIR)/rtag.obj" \ - "$(INTDIR)/valloc.obj" \ - "$(INTDIR)/cvsrc.obj" \ - "$(INTDIR)/lock.obj" \ - "$(INTDIR)/log.obj" \ - "$(INTDIR)/ed.obj" \ + "$(INTDIR)/create_adm.obj" \ + "$(INTDIR)/dir.obj" \ + "$(INTDIR)/mkmodules.obj" \ + "$(INTDIR)/normal.obj" \ + "$(INTDIR)/yesno.obj" \ + "$(INTDIR)/md5.obj" \ + "$(INTDIR)/fileattr.obj" \ + "$(INTDIR)/logmsg.obj" \ + "$(INTDIR)/sighandle.obj" \ + "$(INTDIR)/edit.obj" \ "$(INTDIR)/deflate.obj" \ "$(INTDIR)/analyze.obj" \ - "$(INTDIR)/commit.obj" \ - "$(INTDIR)/patch.obj" \ - "$(INTDIR)/classify.obj" \ - ".\WinRel\2\diff.obj" \ + "$(INTDIR)/regex.obj" \ + "$(INTDIR)/tag.obj" \ + "$(INTDIR)/zlib.obj" \ + "$(INTDIR)/pwd.obj" \ + "$(INTDIR)/main.obj" \ + "$(INTDIR)/xgetwd.obj" \ "$(INTDIR)/history.obj" \ - "$(INTDIR)/add.obj" \ - "$(INTDIR)/update.obj" \ - ".\WinRel\2\version.obj" \ + "$(INTDIR)/error.obj" \ "$(INTDIR)/uncompr.obj" \ - "$(INTDIR)/buffer.obj" \ - "$(INTDIR)/rcmd.obj" \ - "$(INTDIR)/find_names.obj" \ - "$(INTDIR)/watch.obj" \ - "$(INTDIR)/getopt.obj" \ - "$(INTDIR)/checkin.obj" \ - "$(INTDIR)/fileattr.obj" \ + "$(INTDIR)/io.obj" \ + "$(INTDIR)/server.obj" \ + "$(INTDIR)/gzio.obj" \ + "$(INTDIR)/log.obj" \ "$(INTDIR)/modules.obj" \ - "$(INTDIR)/rcs.obj" \ - "$(INTDIR)/admin.obj" \ - "$(INTDIR)/mkmodules.obj" \ - "$(INTDIR)/diff3.obj" \ - "$(INTDIR)/run.obj" \ - "$(INTDIR)/compress.obj" \ + ".\WinRel\1\version.obj" \ + "$(INTDIR)/vasprintf.obj" \ + "$(INTDIR)/filesubr.obj" \ + "$(INTDIR)/rtag.obj" \ + "$(INTDIR)/root.obj" \ + "$(INTDIR)/fncase.obj" \ + "$(INTDIR)/lock.obj" \ + "$(INTDIR)/infblock.obj" \ + "$(INTDIR)/inftrees.obj" \ + "$(INTDIR)/find_names.obj" \ + "$(INTDIR)/import.obj" \ "$(INTDIR)/waitpid.obj" \ - "$(INTDIR)/normal.obj" \ "$(INTDIR)/adler32.obj" \ - "$(INTDIR)/login.obj" \ - "$(INTDIR)/sighandle.obj" \ - "$(INTDIR)/util.obj" \ - "$(INTDIR)/logmsg.obj" \ - "$(INTDIR)/remove.obj" \ + "$(INTDIR)/inflate.obj" \ + "$(INTDIR)/checkout.obj" \ "$(INTDIR)/entries.obj" \ - "$(INTDIR)/dir.obj" \ + "$(INTDIR)/status.obj" \ + "$(INTDIR)/sockerror.obj" \ "$(INTDIR)/getopt1.obj" \ - "$(INTDIR)/md5.obj" \ - "$(INTDIR)/xgetwd.obj" \ - "$(INTDIR)/yesno.obj" \ + "$(INTDIR)/ifdef.obj" \ + "$(INTDIR)/startserver.obj" \ + "$(INTDIR)/rcs.obj" \ + "$(INTDIR)/rcmd.obj" \ + "$(INTDIR)/crc32.obj" \ "$(INTDIR)/no_diff.obj" \ - "$(INTDIR)/root.obj" \ - "$(INTDIR)/tag.obj" \ - "$(INTDIR)/server.obj" \ - "$(INTDIR)/pwd.obj" \ - "$(INTDIR)/parseinfo.obj" \ - "$(INTDIR)/infblock.obj" \ - "$(INTDIR)/inftrees.obj" \ - "$(INTDIR)/regex.obj" \ - "$(INTDIR)/io.obj" \ - ".\WinRel\1\version.obj" \ - "$(INTDIR)/vasprintf.obj" \ + "$(INTDIR)/argmatch.obj" \ + "$(INTDIR)/run.obj" \ + "$(INTDIR)/fnmatch.obj" \ + "$(INTDIR)/ndir.obj" \ "$(INTDIR)/vers_ts.obj" \ - "$(INTDIR)/checkout.obj" \ - "$(INTDIR)/stripslash.obj" \ - "$(INTDIR)/error.obj" \ - "$(INTDIR)/hash.obj" \ - "$(INTDIR)/subr.obj" \ - "$(INTDIR)/fncase.obj" \ - "$(INTDIR)/import.obj" \ + "$(INTDIR)/win32.obj" \ + "$(INTDIR)/cmpbuf.obj" \ + "$(INTDIR)/myndbm.obj" \ + "$(INTDIR)/client.obj" \ + "$(INTDIR)/repos.obj" \ + ".\WinRel\1\diff.obj" \ + "$(INTDIR)/util.obj" \ + "$(INTDIR)/remove.obj" \ + "$(INTDIR)/cvsrc.obj" \ "$(INTDIR)/release.obj" \ "$(INTDIR)/recurse.obj" \ - "$(INTDIR)/argmatch.obj" \ - "$(INTDIR)/sockerror.obj" \ + "$(INTDIR)/parseinfo.obj" \ + "$(INTDIR)/compress.obj" \ "$(INTDIR)/context.obj" \ "$(INTDIR)/rcscmds.obj" \ + "$(INTDIR)/infcodes.obj" \ + "$(INTDIR)/ignore.obj" \ "$(INTDIR)/wrapper.obj" \ - "$(INTDIR)/status.obj" \ - "$(INTDIR)/ndir.obj" \ + "$(INTDIR)/patch.obj" \ + "$(INTDIR)/stripslash.obj" \ + "$(INTDIR)/scramble.obj" \ + "$(INTDIR)/ed.obj" \ + "$(INTDIR)/valloc.obj" \ "$(INTDIR)/getdate.obj" \ - "$(INTDIR)/mkdir.obj" + "$(INTDIR)/mkdir.obj" \ + "$(INTDIR)/add.obj" \ + "$(INTDIR)/watch.obj" \ + "$(INTDIR)/checkin.obj" \ + "$(INTDIR)/side.obj" \ + "$(INTDIR)/commit.obj" \ + "$(INTDIR)/trees.obj" \ + "$(INTDIR)/getline.obj" \ + ".\WinRel\2\diff.obj" \ + "$(INTDIR)/update.obj" \ + "$(INTDIR)/hash.obj" "$(OUTDIR)\cvs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< @@ -315,110 +315,110 @@ CLEAN : -@erase ".\WinDebug\2\vc40.pdb" -@erase ".\WinDebug\2\vc40.idb" -@erase ".\WinDebug\cvs.exe" - -@erase ".\WinDebug\regex.obj" - -@erase ".\WinDebug\normal.obj" - -@erase ".\WinDebug\client.obj" - -@erase ".\WinDebug\util.obj" - -@erase ".\WinDebug\create_adm.obj" - -@erase ".\WinDebug\vers_ts.obj" - -@erase ".\WinDebug\logmsg.obj" - -@erase ".\WinDebug\mkmodules.obj" - -@erase ".\WinDebug\remove.obj" - -@erase ".\WinDebug\sighandle.obj" - -@erase ".\WinDebug\watch.obj" - -@erase ".\WinDebug\release.obj" - -@erase ".\WinDebug\server.obj" - -@erase ".\WinDebug\recurse.obj" - -@erase ".\WinDebug\checkout.obj" - -@erase ".\WinDebug\context.obj" - -@erase ".\WinDebug\rcscmds.obj" - -@erase ".\WinDebug\side.obj" - -@erase ".\WinDebug\wrapper.obj" - -@erase ".\WinDebug\getdate.obj" - -@erase ".\WinDebug\parseinfo.obj" - -@erase ".\WinDebug\login.obj" - -@erase ".\WinDebug\hash.obj" - -@erase ".\WinDebug\1\version.obj" - -@erase ".\WinDebug\subr.obj" - -@erase ".\WinDebug\fncase.obj" - -@erase ".\WinDebug\vasprintf.obj" - -@erase ".\WinDebug\fileattr.obj" -@erase ".\WinDebug\import.obj" - -@erase ".\WinDebug\getline.obj" - -@erase ".\WinDebug\ifdef.obj" - -@erase ".\WinDebug\crc32.obj" - -@erase ".\WinDebug\find_names.obj" - -@erase ".\WinDebug\status.obj" - -@erase ".\WinDebug\ndir.obj" -@erase ".\WinDebug\savecwd.obj" - -@erase ".\WinDebug\log.obj" - -@erase ".\WinDebug\sockerror.obj" -@erase ".\WinDebug\infutil.obj" - -@erase ".\WinDebug\win32.obj" - -@erase ".\WinDebug\inffast.obj" - -@erase ".\WinDebug\ed.obj" + -@erase ".\WinDebug\fnmatch.obj" -@erase ".\WinDebug\edit.obj" - -@erase ".\WinDebug\add.obj" - -@erase ".\WinDebug\repos.obj" - -@erase ".\WinDebug\error.obj" + -@erase ".\WinDebug\status.obj" + -@erase ".\WinDebug\io.obj" + -@erase ".\WinDebug\inffast.obj" + -@erase ".\WinDebug\rcs.obj" -@erase ".\WinDebug\zlib.obj" -@erase ".\WinDebug\main.obj" - -@erase ".\WinDebug\filesubr.obj" - -@erase ".\WinDebug\cmpbuf.obj" - -@erase ".\WinDebug\myndbm.obj" - -@erase ".\WinDebug\xgetwd.obj" + -@erase ".\WinDebug\run.obj" -@erase ".\WinDebug\infblock.obj" - -@erase ".\WinDebug\inftrees.obj" + -@erase ".\WinDebug\gzio.obj" -@erase ".\WinDebug\deflate.obj" - -@erase ".\WinDebug\1\diff.obj" + -@erase ".\WinDebug\startserver.obj" + -@erase ".\WinDebug\checkout.obj" -@erase ".\WinDebug\analyze.obj" - -@erase ".\WinDebug\gzio.obj" - -@erase ".\WinDebug\patch.obj" - -@erase ".\WinDebug\rcs.obj" + -@erase ".\WinDebug\dir.obj" + -@erase ".\WinDebug\ifdef.obj" + -@erase ".\WinDebug\expand_path.obj" + -@erase ".\WinDebug\cmpbuf.obj" + -@erase ".\WinDebug\stripslash.obj" + -@erase ".\WinDebug\myndbm.obj" + -@erase ".\WinDebug\crc32.obj" + -@erase ".\WinDebug\2\version.obj" + -@erase ".\WinDebug\client.obj" -@erase ".\WinDebug\history.obj" - -@erase ".\WinDebug\run.obj" - -@erase ".\WinDebug\mkdir.obj" - -@erase ".\WinDebug\uncompr.obj" - -@erase ".\WinDebug\ignore.obj" + -@erase ".\WinDebug\1\diff.obj" -@erase ".\WinDebug\rtag.obj" -@erase ".\WinDebug\root.obj" - -@erase ".\WinDebug\trees.obj" - -@erase ".\WinDebug\checkin.obj" - -@erase ".\WinDebug\valloc.obj" - -@erase ".\WinDebug\argmatch.obj" + -@erase ".\WinDebug\uncompr.obj" -@erase ".\WinDebug\lock.obj" + -@erase ".\WinDebug\argmatch.obj" + -@erase ".\WinDebug\checkin.obj" + -@erase ".\WinDebug\win32.obj" -@erase ".\WinDebug\modules.obj" - -@erase ".\WinDebug\classify.obj" - -@erase ".\WinDebug\dir.obj" - -@erase ".\WinDebug\startserver.obj" + -@erase ".\WinDebug\ignore.obj" + -@erase ".\WinDebug\mkmodules.obj" + -@erase ".\WinDebug\repos.obj" + -@erase ".\WinDebug\valloc.obj" + -@erase ".\WinDebug\rcmd.obj" + -@erase ".\WinDebug\cvsrc.obj" + -@erase ".\WinDebug\sighandle.obj" + -@erase ".\WinDebug\waitpid.obj" + -@erase ".\WinDebug\adler32.obj" + -@erase ".\WinDebug\commit.obj" + -@erase ".\WinDebug\patch.obj" + -@erase ".\WinDebug\2\diff.obj" + -@erase ".\WinDebug\entries.obj" + -@erase ".\WinDebug\create_adm.obj" + -@erase ".\WinDebug\update.obj" + -@erase ".\WinDebug\getopt1.obj" + -@erase ".\WinDebug\infcodes.obj" + -@erase ".\WinDebug\ndir.obj" + -@erase ".\WinDebug\buffer.obj" + -@erase ".\WinDebug\mkdir.obj" + -@erase ".\WinDebug\scramble.obj" + -@erase ".\WinDebug\filesubr.obj" + -@erase ".\WinDebug\watch.obj" + -@erase ".\WinDebug\getopt.obj" + -@erase ".\WinDebug\no_diff.obj" + -@erase ".\WinDebug\inftrees.obj" + -@erase ".\WinDebug\util.obj" + -@erase ".\WinDebug\parseinfo.obj" + -@erase ".\WinDebug\trees.obj" + -@erase ".\WinDebug\1\version.obj" + -@erase ".\WinDebug\vasprintf.obj" + -@erase ".\WinDebug\ed.obj" + -@erase ".\WinDebug\vers_ts.obj" -@erase ".\WinDebug\zutil.obj" - -@erase ".\WinDebug\stripslash.obj" - -@erase ".\WinDebug\md5.obj" -@erase ".\WinDebug\admin.obj" - -@erase ".\WinDebug\commit.obj" -@erase ".\WinDebug\diff3.obj" - -@erase ".\WinDebug\expand_path.obj" - -@erase ".\WinDebug\2\diff.obj" - -@erase ".\WinDebug\update.obj" - -@erase ".\WinDebug\waitpid.obj" - -@erase ".\WinDebug\adler32.obj" - -@erase ".\WinDebug\inflate.obj" + -@erase ".\WinDebug\md5.obj" + -@erase ".\WinDebug\normal.obj" + -@erase ".\WinDebug\login.obj" + -@erase ".\WinDebug\logmsg.obj" + -@erase ".\WinDebug\remove.obj" -@erase ".\WinDebug\tag.obj" - -@erase ".\WinDebug\buffer.obj" - -@erase ".\WinDebug\rcmd.obj" + -@erase ".\WinDebug\release.obj" -@erase ".\WinDebug\pwd.obj" - -@erase ".\WinDebug\getopt.obj" - -@erase ".\WinDebug\entries.obj" - -@erase ".\WinDebug\getopt1.obj" - -@erase ".\WinDebug\2\version.obj" + -@erase ".\WinDebug\side.obj" + -@erase ".\WinDebug\sockerror.obj" + -@erase ".\WinDebug\classify.obj" + -@erase ".\WinDebug\recurse.obj" + -@erase ".\WinDebug\context.obj" + -@erase ".\WinDebug\rcscmds.obj" + -@erase ".\WinDebug\xgetwd.obj" + -@erase ".\WinDebug\wrapper.obj" -@erase ".\WinDebug\yesno.obj" + -@erase ".\WinDebug\hash.obj" + -@erase ".\WinDebug\find_names.obj" + -@erase ".\WinDebug\server.obj" + -@erase ".\WinDebug\getdate.obj" + -@erase ".\WinDebug\subr.obj" + -@erase ".\WinDebug\fileattr.obj" + -@erase ".\WinDebug\log.obj" + -@erase ".\WinDebug\regex.obj" + -@erase ".\WinDebug\inflate.obj" + -@erase ".\WinDebug\getline.obj" -@erase ".\WinDebug\compress.obj" - -@erase ".\WinDebug\io.obj" - -@erase ".\WinDebug\infcodes.obj" - -@erase ".\WinDebug\no_diff.obj" - -@erase ".\WinDebug\scramble.obj" - -@erase ".\WinDebug\cvsrc.obj" - -@erase ".\WinDebug\fnmatch.obj" + -@erase ".\WinDebug\error.obj" + -@erase ".\WinDebug\add.obj" + -@erase ".\WinDebug\fncase.obj" -@erase ".\WinDebug\cvs.ilk" -@erase ".\WinDebug\cvs.pdb" @@ -448,110 +448,110 @@ LINK32_FLAGS=wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/cvs.pdb" /debug\ /machine:I386 /out:"$(OUTDIR)/cvs.exe" LINK32_OBJS= \ - "$(INTDIR)/regex.obj" \ - "$(INTDIR)/normal.obj" \ - "$(INTDIR)/client.obj" \ - "$(INTDIR)/util.obj" \ - "$(INTDIR)/create_adm.obj" \ - "$(INTDIR)/vers_ts.obj" \ - "$(INTDIR)/logmsg.obj" \ - "$(INTDIR)/mkmodules.obj" \ - "$(INTDIR)/remove.obj" \ - "$(INTDIR)/sighandle.obj" \ - "$(INTDIR)/watch.obj" \ - "$(INTDIR)/release.obj" \ - "$(INTDIR)/server.obj" \ - "$(INTDIR)/recurse.obj" \ - "$(INTDIR)/checkout.obj" \ - "$(INTDIR)/context.obj" \ - "$(INTDIR)/rcscmds.obj" \ - "$(INTDIR)/side.obj" \ - "$(INTDIR)/wrapper.obj" \ - "$(INTDIR)/getdate.obj" \ - "$(INTDIR)/parseinfo.obj" \ - "$(INTDIR)/login.obj" \ - "$(INTDIR)/hash.obj" \ - ".\WinDebug\1\version.obj" \ - "$(INTDIR)/subr.obj" \ - "$(INTDIR)/fncase.obj" \ - "$(INTDIR)/vasprintf.obj" \ - "$(INTDIR)/fileattr.obj" \ "$(INTDIR)/import.obj" \ - "$(INTDIR)/getline.obj" \ - "$(INTDIR)/ifdef.obj" \ - "$(INTDIR)/crc32.obj" \ - "$(INTDIR)/find_names.obj" \ - "$(INTDIR)/status.obj" \ - "$(INTDIR)/ndir.obj" \ "$(INTDIR)/savecwd.obj" \ - "$(INTDIR)/log.obj" \ - "$(INTDIR)/sockerror.obj" \ "$(INTDIR)/infutil.obj" \ - "$(INTDIR)/win32.obj" \ - "$(INTDIR)/inffast.obj" \ - "$(INTDIR)/ed.obj" \ + "$(INTDIR)/fnmatch.obj" \ "$(INTDIR)/edit.obj" \ - "$(INTDIR)/add.obj" \ - "$(INTDIR)/repos.obj" \ - "$(INTDIR)/error.obj" \ + "$(INTDIR)/status.obj" \ + "$(INTDIR)/io.obj" \ + "$(INTDIR)/inffast.obj" \ + "$(INTDIR)/rcs.obj" \ "$(INTDIR)/zlib.obj" \ "$(INTDIR)/main.obj" \ - "$(INTDIR)/filesubr.obj" \ - "$(INTDIR)/cmpbuf.obj" \ - "$(INTDIR)/myndbm.obj" \ - "$(INTDIR)/xgetwd.obj" \ + "$(INTDIR)/run.obj" \ "$(INTDIR)/infblock.obj" \ - "$(INTDIR)/inftrees.obj" \ + "$(INTDIR)/gzio.obj" \ "$(INTDIR)/deflate.obj" \ - ".\WinDebug\1\diff.obj" \ + "$(INTDIR)/startserver.obj" \ + "$(INTDIR)/checkout.obj" \ "$(INTDIR)/analyze.obj" \ - "$(INTDIR)/gzio.obj" \ - "$(INTDIR)/patch.obj" \ - "$(INTDIR)/rcs.obj" \ + "$(INTDIR)/dir.obj" \ + "$(INTDIR)/ifdef.obj" \ + "$(INTDIR)/expand_path.obj" \ + "$(INTDIR)/cmpbuf.obj" \ + "$(INTDIR)/stripslash.obj" \ + "$(INTDIR)/myndbm.obj" \ + "$(INTDIR)/crc32.obj" \ + ".\WinDebug\2\version.obj" \ + "$(INTDIR)/client.obj" \ "$(INTDIR)/history.obj" \ - "$(INTDIR)/run.obj" \ - "$(INTDIR)/mkdir.obj" \ - "$(INTDIR)/uncompr.obj" \ - "$(INTDIR)/ignore.obj" \ + ".\WinDebug\1\diff.obj" \ "$(INTDIR)/rtag.obj" \ "$(INTDIR)/root.obj" \ - "$(INTDIR)/trees.obj" \ - "$(INTDIR)/checkin.obj" \ - "$(INTDIR)/valloc.obj" \ - "$(INTDIR)/argmatch.obj" \ + "$(INTDIR)/uncompr.obj" \ "$(INTDIR)/lock.obj" \ + "$(INTDIR)/argmatch.obj" \ + "$(INTDIR)/checkin.obj" \ + "$(INTDIR)/win32.obj" \ "$(INTDIR)/modules.obj" \ - "$(INTDIR)/classify.obj" \ - "$(INTDIR)/dir.obj" \ - "$(INTDIR)/startserver.obj" \ - "$(INTDIR)/zutil.obj" \ - "$(INTDIR)/stripslash.obj" \ - "$(INTDIR)/md5.obj" \ - "$(INTDIR)/admin.obj" \ + "$(INTDIR)/ignore.obj" \ + "$(INTDIR)/mkmodules.obj" \ + "$(INTDIR)/repos.obj" \ + "$(INTDIR)/valloc.obj" \ + "$(INTDIR)/rcmd.obj" \ + "$(INTDIR)/cvsrc.obj" \ + "$(INTDIR)/sighandle.obj" \ + "$(INTDIR)/waitpid.obj" \ + "$(INTDIR)/adler32.obj" \ "$(INTDIR)/commit.obj" \ - "$(INTDIR)/diff3.obj" \ - "$(INTDIR)/expand_path.obj" \ + "$(INTDIR)/patch.obj" \ ".\WinDebug\2\diff.obj" \ + "$(INTDIR)/entries.obj" \ + "$(INTDIR)/create_adm.obj" \ "$(INTDIR)/update.obj" \ - "$(INTDIR)/waitpid.obj" \ - "$(INTDIR)/adler32.obj" \ - "$(INTDIR)/inflate.obj" \ - "$(INTDIR)/tag.obj" \ + "$(INTDIR)/getopt1.obj" \ + "$(INTDIR)/infcodes.obj" \ + "$(INTDIR)/ndir.obj" \ "$(INTDIR)/buffer.obj" \ - "$(INTDIR)/rcmd.obj" \ - "$(INTDIR)/pwd.obj" \ + "$(INTDIR)/mkdir.obj" \ + "$(INTDIR)/scramble.obj" \ + "$(INTDIR)/filesubr.obj" \ + "$(INTDIR)/watch.obj" \ "$(INTDIR)/getopt.obj" \ - "$(INTDIR)/entries.obj" \ - "$(INTDIR)/getopt1.obj" \ - ".\WinDebug\2\version.obj" \ + "$(INTDIR)/no_diff.obj" \ + "$(INTDIR)/inftrees.obj" \ + "$(INTDIR)/util.obj" \ + "$(INTDIR)/parseinfo.obj" \ + "$(INTDIR)/trees.obj" \ + ".\WinDebug\1\version.obj" \ + "$(INTDIR)/vasprintf.obj" \ + "$(INTDIR)/ed.obj" \ + "$(INTDIR)/vers_ts.obj" \ + "$(INTDIR)/zutil.obj" \ + "$(INTDIR)/admin.obj" \ + "$(INTDIR)/diff3.obj" \ + "$(INTDIR)/md5.obj" \ + "$(INTDIR)/normal.obj" \ + "$(INTDIR)/login.obj" \ + "$(INTDIR)/logmsg.obj" \ + "$(INTDIR)/remove.obj" \ + "$(INTDIR)/tag.obj" \ + "$(INTDIR)/release.obj" \ + "$(INTDIR)/pwd.obj" \ + "$(INTDIR)/side.obj" \ + "$(INTDIR)/sockerror.obj" \ + "$(INTDIR)/classify.obj" \ + "$(INTDIR)/recurse.obj" \ + "$(INTDIR)/context.obj" \ + "$(INTDIR)/rcscmds.obj" \ + "$(INTDIR)/xgetwd.obj" \ + "$(INTDIR)/wrapper.obj" \ "$(INTDIR)/yesno.obj" \ + "$(INTDIR)/hash.obj" \ + "$(INTDIR)/find_names.obj" \ + "$(INTDIR)/server.obj" \ + "$(INTDIR)/getdate.obj" \ + "$(INTDIR)/subr.obj" \ + "$(INTDIR)/fileattr.obj" \ + "$(INTDIR)/log.obj" \ + "$(INTDIR)/regex.obj" \ + "$(INTDIR)/inflate.obj" \ + "$(INTDIR)/getline.obj" \ "$(INTDIR)/compress.obj" \ - "$(INTDIR)/io.obj" \ - "$(INTDIR)/infcodes.obj" \ - "$(INTDIR)/no_diff.obj" \ - "$(INTDIR)/scramble.obj" \ - "$(INTDIR)/cvsrc.obj" \ - "$(INTDIR)/fnmatch.obj" + "$(INTDIR)/error.obj" \ + "$(INTDIR)/add.obj" \ + "$(INTDIR)/fncase.obj" "$(OUTDIR)\cvs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< @@ -594,22 +594,6 @@ LINK32_OBJS= \ # Begin Source File SOURCE=.\src\mkmodules.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_MKMOD=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\mkmodules.obj" : $(SOURCE) $(DEP_CPP_MKMOD) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_MKMOD=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -634,37 +618,20 @@ DEP_CPP_MKMOD=\ {$(INCLUDE)}"\sys\Utime.h"\ ".\windows-NT\ndir.h"\ -NODEP_CPP_MKMOD=\ - ".\src\popen.h"\ - ".\lib\tcpip.h"\ - - -"$(INTDIR)\mkmodules.obj" : $(SOURCE) $(DEP_CPP_MKMOD) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\src\subr.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_SUBR_=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ +NODEP_CPP_MKMOD=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ -"$(INTDIR)\subr.obj" : $(SOURCE) $(DEP_CPP_SUBR_) "$(INTDIR)" +"$(INTDIR)\mkmodules.obj" : $(SOURCE) $(DEP_CPP_MKMOD) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" +# End Source File +################################################################################ +# Begin Source File +SOURCE=.\src\subr.c DEP_CPP_SUBR_=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -697,27 +664,11 @@ NODEP_CPP_SUBR_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\admin.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ADMIN=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\admin.obj" : $(SOURCE) $(DEP_CPP_ADMIN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_ADMIN=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -749,33 +700,11 @@ NODEP_CPP_ADMIN=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\server.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_SERVE=\ - ".\src\cvs.h"\ - ".\src\watch.h"\ - ".\src\edit.h"\ - ".\src\fileattr.h"\ - ".\lib\getline.h"\ - ".\src\buffer.h"\ - {$(INCLUDE)}"\sys\Types.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\server.obj" : $(SOURCE) $(DEP_CPP_SERVE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_SERVE=\ ".\src\cvs.h"\ ".\src\watch.h"\ @@ -812,35 +741,11 @@ NODEP_CPP_SERVE=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\diff.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -# PROP Intermediate_Dir "WinRel\1" -DEP_CPP_DIFF_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - -INTDIR_SRC=.\WinRel\1 -"$(INTDIR_SRC)" : - if not exist "$(INTDIR_SRC)/$(NULL)" mkdir "$(INTDIR_SRC)" - - -".\WinRel\1\diff.obj" : $(SOURCE) $(DEP_CPP_DIFF_) "$(INTDIR_SRC)" - $(CPP) /nologo /ML /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ - /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /Fp"WinRel/cvsnt.pch"\ - /YX /Fo"$(INTDIR_SRC)/" /c $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - -# PROP Intermediate_Dir "WinDebug\1" DEP_CPP_DIFF_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -867,10 +772,23 @@ NODEP_CPP_DIFF_=\ ".\src\popen.h"\ ".\lib\tcpip.h"\ -INTDIR_SRC=.\WinDebug\1 +INTDIR_SRC=.\WinRel\1 "$(INTDIR_SRC)" : if not exist "$(INTDIR_SRC)/$(NULL)" mkdir "$(INTDIR_SRC)" +!IF "$(CFG)" == "cvsnt - Win32 Release" + +# PROP Intermediate_Dir "WinRel\1" + +".\WinRel\1\diff.obj" : $(SOURCE) $(DEP_CPP_DIFF_) "$(INTDIR_SRC)" + $(CPP) /nologo /ML /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ + /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /Fp"WinRel/cvsnt.pch"\ + /YX /Fo"$(INTDIR_SRC)/" /c $(SOURCE) + + +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" + +# PROP Intermediate_Dir "WinDebug\1" ".\WinDebug\1\diff.obj" : $(SOURCE) $(DEP_CPP_DIFF_) "$(INTDIR_SRC)" $(CPP) /nologo /MLd /W3 /Gm /GX /Zi /Ob1 /I "windows-NT" /I "lib" /I "src"\ @@ -886,24 +804,6 @@ INTDIR_SRC=.\WinDebug\1 # Begin Source File SOURCE=.\src\client.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CLIEN=\ - ".\windows-NT\config.h"\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\src\edit.h"\ - ".\src\buffer.h"\ - ".\lib\md5.h"\ - - -"$(INTDIR)\client.obj" : $(SOURCE) $(DEP_CPP_CLIEN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CLIEN=\ ".\windows-NT\config.h"\ ".\src\cvs.h"\ @@ -939,27 +839,11 @@ NODEP_CPP_CLIEN=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\checkout.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CHECK=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\checkout.obj" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CHECK=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -991,27 +875,11 @@ NODEP_CPP_CHECK=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\no_diff.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_NO_DI=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\no_diff.obj" : $(SOURCE) $(DEP_CPP_NO_DI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_NO_DI=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1043,28 +911,11 @@ NODEP_CPP_NO_DI=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\entries.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ENTRI=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\entries.obj" : $(SOURCE) $(DEP_CPP_ENTRI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_ENTRI=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1097,28 +948,11 @@ NODEP_CPP_ENTRI=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\tag.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_TAG_C=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\tag.obj" : $(SOURCE) $(DEP_CPP_TAG_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_TAG_C=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -1151,27 +985,11 @@ NODEP_CPP_TAG_C=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rtag.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RTAG_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\rtag.obj" : $(SOURCE) $(DEP_CPP_RTAG_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RTAG_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1203,27 +1021,11 @@ NODEP_CPP_RTAG_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\status.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_STATU=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\status.obj" : $(SOURCE) $(DEP_CPP_STATU) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_STATU=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1255,28 +1057,11 @@ NODEP_CPP_STATU=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\root.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ROOT_=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\root.obj" : $(SOURCE) $(DEP_CPP_ROOT_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_ROOT_=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1309,28 +1094,11 @@ NODEP_CPP_ROOT_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\myndbm.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_MYNDB=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\myndbm.obj" : $(SOURCE) $(DEP_CPP_MYNDB) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_MYNDB=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1359,31 +1127,15 @@ NODEP_CPP_MYNDB=\ ".\lib\tcpip.h"\ -"$(INTDIR)\myndbm.obj" : $(SOURCE) $(DEP_CPP_MYNDB) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\src\hash.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_HASH_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\hash.obj" : $(SOURCE) $(DEP_CPP_HASH_) "$(INTDIR)" +"$(INTDIR)\myndbm.obj" : $(SOURCE) $(DEP_CPP_MYNDB) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" +# End Source File +################################################################################ +# Begin Source File +SOURCE=.\src\hash.c DEP_CPP_HASH_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1415,28 +1167,11 @@ NODEP_CPP_HASH_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\repos.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_REPOS=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\repos.obj" : $(SOURCE) $(DEP_CPP_REPOS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_REPOS=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1469,28 +1204,11 @@ NODEP_CPP_REPOS=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\parseinfo.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_PARSE=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\parseinfo.obj" : $(SOURCE) $(DEP_CPP_PARSE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_PARSE=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1523,27 +1241,11 @@ NODEP_CPP_PARSE=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\vers_ts.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_VERS_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\vers_ts.obj" : $(SOURCE) $(DEP_CPP_VERS_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_VERS_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1575,29 +1277,11 @@ NODEP_CPP_VERS_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\checkin.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CHECKI=\ - ".\src\cvs.h"\ - ".\src\fileattr.h"\ - ".\src\edit.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\checkin.obj" : $(SOURCE) $(DEP_CPP_CHECKI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CHECKI=\ ".\src\cvs.h"\ ".\src\fileattr.h"\ @@ -1631,35 +1315,17 @@ NODEP_CPP_CHECKI=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\commit.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_COMMI=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\src\edit.h"\ - ".\src\fileattr.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\commit.obj" : $(SOURCE) $(DEP_CPP_COMMI) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_COMMI=\ ".\src\cvs.h"\ ".\lib\getline.h"\ ".\src\edit.h"\ ".\src\fileattr.h"\ + ".\src\hardlink.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ ".\lib\fnmatch.h"\ @@ -1689,35 +1355,11 @@ NODEP_CPP_COMMI=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\version.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -# PROP Intermediate_Dir "WinRel\1" -DEP_CPP_VERSI=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - -INTDIR_SRC=.\WinRel\1 -"$(INTDIR_SRC)" : - if not exist "$(INTDIR_SRC)/$(NULL)" mkdir "$(INTDIR_SRC)" - - -".\WinRel\1\version.obj" : $(SOURCE) $(DEP_CPP_VERSI) "$(INTDIR_SRC)" - $(CPP) /nologo /ML /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ - /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /Fp"WinRel/cvsnt.pch"\ - /YX /Fo"$(INTDIR_SRC)/" /c $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - -# PROP Intermediate_Dir "WinDebug\1" DEP_CPP_VERSI=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1744,10 +1386,23 @@ NODEP_CPP_VERSI=\ ".\src\popen.h"\ ".\lib\tcpip.h"\ -INTDIR_SRC=.\WinDebug\1 +INTDIR_SRC=.\WinRel\1 "$(INTDIR_SRC)" : if not exist "$(INTDIR_SRC)/$(NULL)" mkdir "$(INTDIR_SRC)" +!IF "$(CFG)" == "cvsnt - Win32 Release" + +# PROP Intermediate_Dir "WinRel\1" + +".\WinRel\1\version.obj" : $(SOURCE) $(DEP_CPP_VERSI) "$(INTDIR_SRC)" + $(CPP) /nologo /ML /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ + /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /Fp"WinRel/cvsnt.pch"\ + /YX /Fo"$(INTDIR_SRC)/" /c $(SOURCE) + + +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" + +# PROP Intermediate_Dir "WinDebug\1" ".\WinDebug\1\version.obj" : $(SOURCE) $(DEP_CPP_VERSI) "$(INTDIR_SRC)" $(CPP) /nologo /MLd /W3 /Gm /GX /Zi /Ob1 /I "windows-NT" /I "lib" /I "src"\ @@ -1763,21 +1418,6 @@ INTDIR_SRC=.\WinDebug\1 # Begin Source File SOURCE=.\src\cvsrc.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CVSRC=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\cvsrc.obj" : $(SOURCE) $(DEP_CPP_CVSRC) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CVSRC=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1810,27 +1450,11 @@ NODEP_CPP_CVSRC=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\remove.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_REMOV=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\remove.obj" : $(SOURCE) $(DEP_CPP_REMOV) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_REMOV=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -1862,33 +1486,11 @@ NODEP_CPP_REMOV=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\update.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_UPDAT=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\lib\md5.h"\ - ".\src\watch.h"\ - ".\src\fileattr.h"\ - ".\src\edit.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\update.obj" : $(SOURCE) $(DEP_CPP_UPDAT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_UPDAT=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -1897,6 +1499,8 @@ DEP_CPP_UPDAT=\ ".\src\fileattr.h"\ ".\src\edit.h"\ ".\lib\getline.h"\ + ".\src\buffer.h"\ + ".\src\hardlink.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ ".\lib\fnmatch.h"\ @@ -1926,28 +1530,11 @@ NODEP_CPP_UPDAT=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\logmsg.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_LOGMS=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\logmsg.obj" : $(SOURCE) $(DEP_CPP_LOGMS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_LOGMS=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -1980,27 +1567,11 @@ NODEP_CPP_LOGMS=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\classify.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CLASS=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\classify.obj" : $(SOURCE) $(DEP_CPP_CLASS) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CLASS=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2032,28 +1603,11 @@ NODEP_CPP_CLASS=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\history.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_HISTO=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\history.obj" : $(SOURCE) $(DEP_CPP_HISTO) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_HISTO=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -2086,29 +1640,11 @@ NODEP_CPP_HISTO=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File -################################################################################ -# Begin Source File - -SOURCE=.\src\add.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ADD_C=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\src\fileattr.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\add.obj" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" +################################################################################ +# Begin Source File +SOURCE=.\src\add.c DEP_CPP_ADD_C=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -2142,27 +1678,11 @@ NODEP_CPP_ADD_C=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\lock.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_LOCK_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\lock.obj" : $(SOURCE) $(DEP_CPP_LOCK_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_LOCK_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2194,30 +1714,11 @@ NODEP_CPP_LOCK_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\recurse.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RECUR=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\src\fileattr.h"\ - ".\src\edit.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\recurse.obj" : $(SOURCE) $(DEP_CPP_RECUR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RECUR=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -2252,28 +1753,11 @@ NODEP_CPP_RECUR=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\modules.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_MODUL=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\modules.obj" : $(SOURCE) $(DEP_CPP_MODUL) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_MODUL=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -2306,27 +1790,11 @@ NODEP_CPP_MODUL=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\find_names.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_FIND_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\find_names.obj" : $(SOURCE) $(DEP_CPP_FIND_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_FIND_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2358,31 +1826,15 @@ NODEP_CPP_FIND_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rcs.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RCS_C=\ - ".\src\cvs.h"\ - ".\src\edit.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\rcs.obj" : $(SOURCE) $(DEP_CPP_RCS_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RCS_C=\ ".\src\cvs.h"\ ".\src\edit.h"\ + ".\src\hardlink.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ ".\lib\fnmatch.h"\ @@ -2412,27 +1864,11 @@ NODEP_CPP_RCS_C=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\create_adm.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_CREAT=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\create_adm.obj" : $(SOURCE) $(DEP_CPP_CREAT) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_CREAT=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2464,27 +1900,11 @@ NODEP_CPP_CREAT=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\main.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_MAIN_=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_MAIN_=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2516,28 +1936,11 @@ NODEP_CPP_MAIN_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\patch.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_PATCH=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\patch.obj" : $(SOURCE) $(DEP_CPP_PATCH) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_PATCH=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -2570,28 +1973,11 @@ NODEP_CPP_PATCH=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\release.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RELEA=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\release.obj" : $(SOURCE) $(DEP_CPP_RELEA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RELEA=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -2624,27 +2010,11 @@ NODEP_CPP_RELEA=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rcscmds.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RCSCM=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\rcscmds.obj" : $(SOURCE) $(DEP_CPP_RCSCM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RCSCM=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2668,36 +2038,37 @@ DEP_CPP_RCSCM=\ ".\windows-NT\ndir.h"\ NODEP_CPP_RCSCM=\ + ".\src\diffrun.h"\ ".\src\popen.h"\ ".\lib\tcpip.h"\ -"$(INTDIR)\rcscmds.obj" : $(SOURCE) $(DEP_CPP_RCSCM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +!IF "$(CFG)" == "cvsnt - Win32 Release" -!ENDIF +"$(INTDIR)\rcscmds.obj" : $(SOURCE) $(DEP_CPP_RCSCM) "$(INTDIR)" + $(CPP) /nologo /ML /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ + /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H"\ + /Fp"$(INTDIR)/cvsnt.pch" /YX /Fo"$(INTDIR)/" /c $(SOURCE) -# End Source File -################################################################################ -# Begin Source File -SOURCE=.\src\import.c +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" -!IF "$(CFG)" == "cvsnt - Win32 Release" +# ADD CPP /I "diff" -DEP_CPP_IMPOR=\ - ".\src\cvs.h"\ - ".\lib\savecwd.h"\ - ".\windows-NT\config.h"\ - +"$(INTDIR)\rcscmds.obj" : $(SOURCE) $(DEP_CPP_RCSCM) "$(INTDIR)" + $(CPP) /nologo /MLd /W3 /Gm /GX /Zi /Ob1 /I "windows-NT" /I "lib" /I "src"\ + /I "zlib" /I "diff" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H"\ + /Fp"$(INTDIR)/cvsnt.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c $(SOURCE) -"$(INTDIR)\import.obj" : $(SOURCE) $(DEP_CPP_IMPOR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) +!ENDIF -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" +# End Source File +################################################################################ +# Begin Source File +SOURCE=.\src\import.c DEP_CPP_IMPOR=\ ".\src\cvs.h"\ ".\lib\savecwd.h"\ @@ -2730,28 +2101,11 @@ NODEP_CPP_IMPOR=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\ignore.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_IGNOR=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\ignore.obj" : $(SOURCE) $(DEP_CPP_IGNOR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_IGNOR=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -2784,27 +2138,11 @@ NODEP_CPP_IGNOR=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\log.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_LOG_C=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\log.obj" : $(SOURCE) $(DEP_CPP_LOG_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_LOG_C=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2825,39 +2163,22 @@ DEP_CPP_LOG_C=\ {$(INCLUDE)}"\sys\Stat.h"\ {$(INCLUDE)}"\sys\Timeb.h"\ {$(INCLUDE)}"\sys\Utime.h"\ - ".\windows-NT\ndir.h"\ - -NODEP_CPP_LOG_C=\ - ".\src\popen.h"\ - ".\lib\tcpip.h"\ - - -"$(INTDIR)\log.obj" : $(SOURCE) $(DEP_CPP_LOG_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ENDIF - -# End Source File -################################################################################ -# Begin Source File - -SOURCE=.\src\wrapper.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_WRAPP=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_LOG_C=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ -"$(INTDIR)\wrapper.obj" : $(SOURCE) $(DEP_CPP_WRAPP) "$(INTDIR)" +"$(INTDIR)\log.obj" : $(SOURCE) $(DEP_CPP_LOG_C) "$(INTDIR)" $(CPP) $(CPP_PROJ) $(SOURCE) -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" +# End Source File +################################################################################ +# Begin Source File +SOURCE=.\src\wrapper.c DEP_CPP_WRAPP=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -2890,27 +2211,11 @@ NODEP_CPP_WRAPP=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\error.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ERROR=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\error.obj" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_ERROR=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -2942,28 +2247,11 @@ NODEP_CPP_ERROR=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\expand_path.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_EXPAN=\ - ".\src\cvs.h"\ - {$(INCLUDE)}"\sys\Types.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\expand_path.obj" : $(SOURCE) $(DEP_CPP_EXPAN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_EXPAN=\ ".\src\cvs.h"\ {$(INCLUDE)}"\sys\Types.h"\ @@ -2995,31 +2283,11 @@ NODEP_CPP_EXPAN=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\edit.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_EDIT_=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\src\watch.h"\ - ".\src\edit.h"\ - ".\src\fileattr.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\edit.obj" : $(SOURCE) $(DEP_CPP_EDIT_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_EDIT_=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -3055,29 +2323,11 @@ NODEP_CPP_EDIT_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\fileattr.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_FILEA=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\src\fileattr.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\fileattr.obj" : $(SOURCE) $(DEP_CPP_FILEA) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_FILEA=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -3111,30 +2361,11 @@ NODEP_CPP_FILEA=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\watch.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_WATCH=\ - ".\src\cvs.h"\ - ".\src\edit.h"\ - ".\src\fileattr.h"\ - ".\src\watch.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\watch.obj" : $(SOURCE) $(DEP_CPP_WATCH) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_WATCH=\ ".\src\cvs.h"\ ".\src\edit.h"\ @@ -3169,28 +2400,11 @@ NODEP_CPP_WATCH=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\login.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_LOGIN=\ - ".\src\cvs.h"\ - ".\lib\getline.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\login.obj" : $(SOURCE) $(DEP_CPP_LOGIN) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_LOGIN=\ ".\src\cvs.h"\ ".\lib\getline.h"\ @@ -3223,27 +2437,11 @@ NODEP_CPP_LOGIN=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\scramble.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_SCRAM=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\scramble.obj" : $(SOURCE) $(DEP_CPP_SCRAM) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_SCRAM=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -3275,28 +2473,11 @@ NODEP_CPP_SCRAM=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\buffer.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_BUFFE=\ - ".\src\cvs.h"\ - ".\src\buffer.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\buffer.obj" : $(SOURCE) $(DEP_CPP_BUFFE) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_BUFFE=\ ".\src\cvs.h"\ ".\src\buffer.h"\ @@ -3329,30 +2510,11 @@ NODEP_CPP_BUFFE=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=.\src\zlib.c - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_ZLIB_=\ - ".\src\cvs.h"\ - ".\src\buffer.h"\ - ".\zlib\zlib.h"\ - ".\windows-NT\config.h"\ - ".\zlib\zconf.h"\ - - -"$(INTDIR)\zlib.obj" : $(SOURCE) $(DEP_CPP_ZLIB_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_ZLIB_=\ ".\src\cvs.h"\ ".\src\buffer.h"\ @@ -3387,8 +2549,6 @@ NODEP_CPP_ZLIB_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File @@ -3550,6 +2710,8 @@ DEP_CPP_REGEX=\ NODEP_CPP_REGEX=\ ".\lib\lisp.h"\ ".\lib\syntax.h"\ + ".\lib\charset.h"\ + ".\lib\category.h"\ "$(INTDIR)\regex.obj" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" @@ -3631,20 +2793,6 @@ DEP_CPP_VASPR=\ # Begin Source File SOURCE=".\windows-NT\mkdir.c" - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_MKDIR=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\mkdir.obj" : $(SOURCE) $(DEP_CPP_MKDIR) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_MKDIR=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -3676,27 +2824,11 @@ NODEP_CPP_MKDIR=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\run.c" - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RUN_C=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\run.obj" : $(SOURCE) $(DEP_CPP_RUN_C) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RUN_C=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -3728,8 +2860,6 @@ NODEP_CPP_RUN_C=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File @@ -3748,20 +2878,6 @@ DEP_CPP_PWD_C=\ # Begin Source File SOURCE=".\windows-NT\filesubr.c" - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_FILES=\ - ".\src\cvs.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\filesubr.obj" : $(SOURCE) $(DEP_CPP_FILES) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_FILES=\ ".\src\cvs.h"\ ".\windows-NT\config.h"\ @@ -3793,8 +2909,6 @@ NODEP_CPP_FILES=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File @@ -3851,22 +2965,6 @@ SOURCE=".\windows-NT\stripslash.c" # Begin Source File SOURCE=".\windows-NT\rcmd.c" - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_RCMD_=\ - ".\src\cvs.h"\ - ".\windows-NT\rcmd.h"\ - {$(INCLUDE)}"\sys\Types.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\rcmd.obj" : $(SOURCE) $(DEP_CPP_RCMD_) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_RCMD_=\ ".\src\cvs.h"\ ".\windows-NT\rcmd.h"\ @@ -3899,28 +2997,11 @@ NODEP_CPP_RCMD_=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\startserver.c" - -!IF "$(CFG)" == "cvsnt - Win32 Release" - -DEP_CPP_START=\ - ".\src\cvs.h"\ - ".\windows-NT\rcmd.h"\ - ".\windows-NT\config.h"\ - - -"$(INTDIR)\startserver.obj" : $(SOURCE) $(DEP_CPP_START) "$(INTDIR)" - $(CPP) $(CPP_PROJ) $(SOURCE) - - -!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" - DEP_CPP_START=\ ".\src\cvs.h"\ ".\windows-NT\rcmd.h"\ @@ -3953,8 +3034,6 @@ NODEP_CPP_START=\ $(CPP) $(CPP_PROJ) $(SOURCE) -!ENDIF - # End Source File ################################################################################ # Begin Source File @@ -4214,6 +3293,7 @@ DEP_CPP_UTIL_=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4251,6 +3331,7 @@ DEP_CPP_CONTE=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4272,6 +3353,7 @@ DEP_CPP_DIFF_=\ ".\lib\fnmatch.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4312,6 +3394,7 @@ SOURCE=.\diff\diff3.c DEP_CPP_DIFF3=\ ".\diff\system.h"\ ".\lib\getopt.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4331,6 +3414,7 @@ DEP_CPP_DIR_C=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4350,6 +3434,7 @@ DEP_CPP_ED_Cba=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4369,6 +3454,7 @@ DEP_CPP_IFDEF=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4388,6 +3474,7 @@ DEP_CPP_IO_Cbe=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4407,6 +3494,7 @@ DEP_CPP_NORMA=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4426,6 +3514,7 @@ DEP_CPP_SIDE_=\ ".\diff\diff.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ @@ -4446,6 +3535,7 @@ DEP_CPP_ANALY=\ ".\diff\cmpbuf.h"\ ".\diff\system.h"\ ".\lib\regex.h"\ + ".\diff\diffrun.h"\ ".\windows-NT\config.h"\ {$(INCLUDE)}"\sys\Types.h"\ {$(INCLUDE)}"\sys\Stat.h"\ diff --git a/gnu/usr.bin/cvs/diff/ChangeLog b/gnu/usr.bin/cvs/diff/ChangeLog index 34aa7077b8c..3ebde5df9d0 100644 --- a/gnu/usr.bin/cvs/diff/ChangeLog +++ b/gnu/usr.bin/cvs/diff/ChangeLog @@ -1,3 +1,56 @@ +1998-08-06 David Masterson of kla-tencor.com + + * util.c (flush_output): Don't prototype. + +Thu Jul 2 16:34:38 1998 Ian Lance Taylor + + Simplify the callback interface: + * diffrun.h: Don't include or . + (struct diff_callbacks): Remove printf_output field. + * util.c: Include or . + (printf_output): Use vasprintf and write_output callback rather + than printf_output callback. + * diff3.c (read_diff): Don't set my_callbacks.printf_output. + +Thu Jun 18 12:43:53 1998 Ian Lance Taylor + + * diffrun.h: New file. + * diff.h: Include diffrun.h. + (callbacks): New EXTERN variable. + (write_output, printf_output, flush_output): Declare. + * diff.c (diff_run): Add parameter callbacks_arg. Use callback + functions rather than writing to stdout. Don't open a file if + there is a write_output callback. Call perror_with_name rather + than perror. + (usage): Use callbacks if defined rather than writing to stdout. + (compare_files): Call flush_output rather than fflush (outfile). + * diff3.c: Include diffrun.h. Change several functions to use + output functions from util.c rather than direct printing. Use + diff_error and friends rather than printing to stderr. Set global + variable outfile. + (outfile, callbacks): Declare. + (write_output, printf_output, flush_output): Declare. + (diff3_run): Add parameter callbacks_arg. Use callback functions + rather than writing to stdout. + (usage): Use callbacks if defined rather than writing to stdout. + (read_diff): Preserve callbacks and outfile around call to + diff_run. + * util.c (perror_with_name): Use error callback if defined. + (pfatal_with_name, diff_error): Likewise. + (message5): Use printf_output and write_output. + (print_message_queue, print_1_line, output_1_line): Likewise. + (begin_output): Reject paginate_flag if there are output + callbacks. + (write_output, printf_output, flush_output): New functions. + * context.c: Change all output to outfile to use printf_output and + write_output. + * ed.c: Likewise. + * ifdef.c: Likewise. + * normal.c: Likewise. + * side.c: Likewise. + * Makefile.in (SOURCES): Add diffrun.h. + ($(OBJECTS)): Depend upon diffrun.h. + Fri Jan 16 14:58:19 1998 Larry Jones * diff.c, diff3.c: Plug memory leaks. diff --git a/gnu/usr.bin/cvs/diff/context.c b/gnu/usr.bin/cvs/diff/context.c index 14f950c5269..e843734f45c 100644 --- a/gnu/usr.bin/cvs/diff/context.c +++ b/gnu/usr.bin/cvs/diff/context.c @@ -1,5 +1,5 @@ /* Context-format output routines for GNU DIFF. - Copyright (C) 1988,1989,1991,1992,1993,1994 Free Software Foundation, Inc. + Copyright (C) 1988,1989,1991,1992,1993,1994,1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -43,14 +43,14 @@ print_context_label (mark, inf, label) char const *label; { if (label) - fprintf (outfile, "%s %s\n", mark, label); + printf_output ("%s %s\n", mark, label); else { char const *ct = ctime (&inf->stat.st_mtime); if (!ct) ct = "?\n"; /* See Posix.2 section 4.17.6.1.4 for this format. */ - fprintf (outfile, "%s %s\t%s", mark, inf->name, ct); + printf_output ("%s %s\t%s", mark, inf->name, ct); } } @@ -116,9 +116,9 @@ print_context_number_range (file, a, b) In this case, we should print the line number before the range, which is B. */ if (trans_b > trans_a) - fprintf (outfile, "%d,%d", trans_a, trans_b); + printf_output ("%d,%d", trans_a, trans_b); else - fprintf (outfile, "%d", trans_b); + printf_output ("%d", trans_b); } /* Print a portion of an edit script in context format. @@ -137,7 +137,6 @@ pr_context_hunk (hunk) char const *prefix; char const *function; size_t function_length; - FILE *out; /* Determine range of line numbers involved in each file. */ @@ -160,21 +159,20 @@ pr_context_hunk (hunk) find_function (&files[0], first0, &function, &function_length); begin_output (); - out = outfile; /* If we looked for and found a function this is part of, include its name in the header of the diff section. */ - fprintf (out, "***************"); + printf_output ("***************"); if (function) { - fprintf (out, " "); - fwrite (function, 1, min (function_length - 1, 40), out); + printf_output (" "); + write_output (function, min (function_length - 1, 40)); } - fprintf (out, "\n*** "); + printf_output ("\n*** "); print_context_number_range (&files[0], first0, last0); - fprintf (out, " ****\n"); + printf_output (" ****\n"); if (show_from) { @@ -201,9 +199,9 @@ pr_context_hunk (hunk) } } - fprintf (out, "--- "); + printf_output ("--- "); print_context_number_range (&files[1], first1, last1); - fprintf (out, " ----\n"); + printf_output (" ----\n"); if (show_to) { @@ -250,9 +248,9 @@ print_unidiff_number_range (file, a, b) In this case, we should print the line number before the range, which is B. */ if (trans_b <= trans_a) - fprintf (outfile, trans_b == trans_a ? "%d" : "%d,0", trans_b); + printf_output (trans_b == trans_a ? "%d" : "%d,0", trans_b); else - fprintf (outfile, "%d,%d", trans_a, trans_b - trans_a + 1); + printf_output ("%d,%d", trans_a, trans_b - trans_a + 1); } /* Print a portion of an edit script in unidiff format. @@ -270,7 +268,6 @@ pr_unidiff_hunk (hunk) struct change *next; char const *function; size_t function_length; - FILE *out; /* Determine range of line numbers involved in each file. */ @@ -293,23 +290,22 @@ pr_unidiff_hunk (hunk) find_function (&files[0], first0, &function, &function_length); begin_output (); - out = outfile; - fprintf (out, "@@ -"); + printf_output ("@@ -"); print_unidiff_number_range (&files[0], first0, last0); - fprintf (out, " +"); + printf_output (" +"); print_unidiff_number_range (&files[1], first1, last1); - fprintf (out, " @@"); + printf_output (" @@"); /* If we looked for and found a function this is part of, include its name in the header of the diff section. */ if (function) { - putc (' ', out); - fwrite (function, 1, min (function_length - 1, 40), out); + write_output (" ", 1); + write_output (function, min (function_length - 1, 40)); } - putc ('\n', out); + write_output ("\n", 1); next = hunk; i = first0; @@ -322,7 +318,7 @@ pr_unidiff_hunk (hunk) if (!next || i < next->line0) { - putc (tab_align_flag ? '\t' : ' ', out); + write_output (tab_align_flag ? "\t" : " ", 1); print_1_line (0, &files[0].linbuf[i++]); j++; } @@ -333,9 +329,9 @@ pr_unidiff_hunk (hunk) k = next->deleted; while (k--) { - putc ('-', out); + write_output ("-", 1); if (tab_align_flag) - putc ('\t', out); + write_output ("\t", 1); print_1_line (0, &files[0].linbuf[i++]); } @@ -344,9 +340,9 @@ pr_unidiff_hunk (hunk) k = next->inserted; while (k--) { - putc ('+', out); + write_output ("+", 1); if (tab_align_flag) - putc ('\t', out); + write_output ("\t", 1); print_1_line (0, &files[1].linbuf[j++]); } diff --git a/gnu/usr.bin/cvs/diff/diff.c b/gnu/usr.bin/cvs/diff/diff.c index c0e37d7d421..3467b537aec 100644 --- a/gnu/usr.bin/cvs/diff/diff.c +++ b/gnu/usr.bin/cvs/diff/diff.c @@ -1,5 +1,5 @@ /* GNU DIFF entry routine. - Copyright (C) 1988, 1989, 1992, 1993, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1988, 1989, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -231,10 +231,11 @@ static struct option const longopts[] = }; int -diff_run (argc, argv, out) +diff_run (argc, argv, out, callbacks_arg) int argc; char *argv[]; char *out; + const struct diff_callbacks *callbacks_arg; { int val; int c; @@ -242,6 +243,9 @@ diff_run (argc, argv, out) int width = DEFAULT_WIDTH; int show_c_function = 0; int optind_old; + int opened_file = 0; + + callbacks = callbacks_arg; /* Do our initializations. */ initialize_main (&argc, &argv); @@ -476,7 +480,14 @@ diff_run (argc, argv, out) break; case 'v': - printf ("diff - GNU diffutils version %s\n", diff_version_string); + if (callbacks && callbacks->write_stdout) + { + (*callbacks->write_stdout) ("diff - GNU diffutils version "); + (*callbacks->write_stdout) (diff_version_string); + (*callbacks->write_stdout) ("\n"); + } + else + printf ("diff - GNU diffutils version %s\n", diff_version_string); return 0; case 'w': @@ -555,7 +566,8 @@ diff_run (argc, argv, out) case 141: usage (); - check_output (stdout); + if (! callbacks || ! callbacks->write_stdout) + check_output (stdout); return 0; case 142: @@ -645,23 +657,35 @@ diff_run (argc, argv, out) switch_string = option_list (argv + 1, optind - 1); - if (out == NULL) - outfile = stdout; + if (callbacks && callbacks->write_output) + { + if (out != NULL) + { + diff_error ("write callback with output file", 0, 0); + return 2; + } + } else { -#if HAVE_SETMODE - /* A diff which is full of ^Z and such isn't going to work - very well in text mode. */ - if (binary_I_O) - outfile = fopen (out, "wb"); + if (out == NULL) + outfile = stdout; else + { +#if HAVE_SETMODE + /* A diff which is full of ^Z and such isn't going to work + very well in text mode. */ + if (binary_I_O) + outfile = fopen (out, "wb"); + else #endif - outfile = fopen (out, "w"); - if (outfile == NULL) - { - perror_with_name ("could not open output file"); - return 2; - } + outfile = fopen (out, "w"); + if (outfile == NULL) + { + perror_with_name ("could not open output file"); + return 2; + } + opened_file = 1; + } } /* Set the jump buffer, so that diff may abort execution without @@ -669,7 +693,7 @@ diff_run (argc, argv, out) if ((val = setjmp (diff_abort_buf)) != 0) { optind = optind_old; - if (outfile != stdout) + if (opened_file) fclose (outfile); return val; } @@ -682,10 +706,14 @@ diff_run (argc, argv, out) free (switch_string); optind = optind_old; - check_output (outfile); - if (outfile != stdout) + + if (! callbacks || ! callbacks->write_output) + check_output (outfile); + + if (opened_file) if (fclose (outfile) != 0) - perror ("close error on output file"); + perror_with_name ("close error on output file"); + return val; } @@ -799,10 +827,27 @@ usage () { char const * const *p; - printf ("Usage: %s [OPTION]... FILE1 FILE2\n\n", diff_program_name); - for (p = option_help; *p; p++) - printf (" %s\n", *p); - printf ("\nIf FILE1 or FILE2 is `-', read standard input.\n"); + if (callbacks && callbacks->write_stdout) + { + (*callbacks->write_stdout) ("Usage: "); + (*callbacks->write_stdout) (diff_program_name); + (*callbacks->write_stdout) (" [OPTION]... FILE1 FILE2\n\n"); + for (p = option_help; *p; p++) + { + (*callbacks->write_stdout) (" "); + (*callbacks->write_stdout) (*p); + (*callbacks->write_stdout) ("\n"); + } + (*callbacks->write_stdout) + ("\nIf FILE1 or FILE2 is `-', read standard input.\n"); + } + else + { + printf ("Usage: %s [OPTION]... FILE1 FILE2\n\n", diff_program_name); + for (p = option_help; *p; p++) + printf (" %s\n", *p); + printf ("\nIf FILE1 or FILE2 is `-', read standard input.\n"); + } } static int @@ -1147,7 +1192,7 @@ compare_files (dir0, name0, dir1, name1, depth) inf[0].name, inf[1].name); } else - fflush (outfile); + flush_output (); if (free0) free (free0); diff --git a/gnu/usr.bin/cvs/diff/diff.h b/gnu/usr.bin/cvs/diff/diff.h index fba26a7bf07..6107e6221fb 100644 --- a/gnu/usr.bin/cvs/diff/diff.h +++ b/gnu/usr.bin/cvs/diff/diff.h @@ -1,5 +1,5 @@ /* Shared definitions for GNU DIFF - Copyright (C) 1988, 89, 91, 92, 93, 97 Free Software Foundation, Inc. + Copyright (C) 1988, 89, 91, 92, 93, 97, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -21,6 +21,7 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #include #include #include "regex.h" +#include "diffrun.h" #define TAB_WIDTH 8 @@ -32,6 +33,9 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ #define EXTERN #endif +/* The callbacks to use for output. */ +EXTERN const struct diff_callbacks *callbacks; + enum output_style { /* Default output style. */ OUTPUT_NORMAL, @@ -329,6 +333,13 @@ void debug_script PARAMS((struct change *)); void diff_error PARAMS((char const *, char const *, char const *)); void fatal PARAMS((char const *)); void finish_output PARAMS((void)); +void write_output PARAMS((char const *, size_t)); +void printf_output PARAMS((char const *, ...)) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) + __attribute__ ((__format__ (__printf__, 1, 2))) +#endif + ; +void flush_output PARAMS((void)); void message PARAMS((char const *, char const *, char const *)); void message5 PARAMS((char const *, char const *, char const *, char const *, char const *)); void output_1_line PARAMS((char const *, char const *, char const *, char const *)); diff --git a/gnu/usr.bin/cvs/diff/diff3.c b/gnu/usr.bin/cvs/diff/diff3.c index 533214c436b..64867f48f23 100644 --- a/gnu/usr.bin/cvs/diff/diff3.c +++ b/gnu/usr.bin/cvs/diff/diff3.c @@ -1,5 +1,5 @@ /* Three way file comparison program (diff3) for Project GNU. - Copyright (C) 1988, 1989, 1992, 1993, 1994, 1997 Free Software Foundation, Inc. + Copyright (C) 1988, 1989, 1992, 1993, 1994, 1997, 1998 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -22,6 +22,7 @@ #include #include #include "getopt.h" +#include "diffrun.h" /* diff3.c has a real initialize_main function. */ #ifdef initialize_main @@ -30,6 +31,18 @@ extern char const diff_version_string[]; +extern FILE *outfile; + +extern const struct diff_callbacks *callbacks; + +void write_output PARAMS((char const *, size_t)); +void printf_output PARAMS((char const *, ...)) +#if __GNUC__ > 2 || (__GNUC__ == 2 && __GNUC_MINOR__ > 6) + __attribute__ ((__format__ (__printf__, 1, 2))) +#endif + ; +void flush_output PARAMS((void)); + /* * Internal data structures and macros for the diff3 program; includes * data structures for both diff3 diffs and normal diffs. @@ -186,9 +199,9 @@ static char *scan_diff_line PARAMS((char *, char **, size_t *, char *, int)); static enum diff_type process_diff_control PARAMS((char **, struct diff_block *)); static int compare_line_list PARAMS((char * const[], size_t const[], char * const[], size_t const[], int)); static int copy_stringlist PARAMS((char * const[], size_t const[], char *[], size_t[], int)); -static int dotlines PARAMS((FILE *, struct diff3_block *, int)); -static int output_diff3_edscript PARAMS((FILE *, struct diff3_block *, int const[3], int const[3], char const *, char const *, char const *)); -static int output_diff3_merge PARAMS((FILE *, FILE *, struct diff3_block *, int const[3], int const[3], char const *, char const *, char const *)); +static int dotlines PARAMS((struct diff3_block *, int)); +static int output_diff3_edscript PARAMS((struct diff3_block *, int const[3], int const[3], char const *, char const *, char const *)); +static int output_diff3_merge PARAMS((FILE *, struct diff3_block *, int const[3], int const[3], char const *, char const *, char const *)); static size_t myread PARAMS((int, char *, size_t)); static struct diff3_block *create_diff3_block PARAMS((int, int, int, int, int, int)); static struct diff3_block *make_3way_diff PARAMS((struct diff_block *, struct diff_block *)); @@ -197,17 +210,16 @@ static struct diff3_block *using_to_diff3_block PARAMS((struct diff_block *[2], static struct diff_block *process_diff PARAMS((char const *, char const *, struct diff_block **, char **)); static void check_output PARAMS((FILE *)); static void diff3_fatal PARAMS((char const *)); -static void output_diff3 PARAMS((FILE *, struct diff3_block *, int const[3], int const[3])); +static void output_diff3 PARAMS((struct diff3_block *, int const[3], int const[3])); static void diff3_perror_with_exit PARAMS((char const *)); static int try_help PARAMS((char const *)); -static void undotlines PARAMS((FILE *, int, int, int)); +static void undotlines PARAMS((int, int, int)); static void usage PARAMS((void)); static void initialize_main PARAMS((int *, char ***)); static void free_diff_blocks PARAMS((struct diff_block *)); static void free_diff3_blocks PARAMS((struct diff3_block *)); /* Functions provided in libdiff.a or other external sources. */ -int diff_run PARAMS((int, char **, char *)); VOID *xmalloc PARAMS((size_t)); VOID *xrealloc PARAMS((VOID *, size_t)); void perror_with_name PARAMS((char const *)); @@ -238,10 +250,11 @@ static struct option const longopts[] = * combines the two diffs, and outputs them. */ int -diff3_run (argc, argv, outfile) +diff3_run (argc, argv, out, callbacks_arg) int argc; char **argv; - char *outfile; + char *out; + const struct diff_callbacks *callbacks_arg; { int c, i; int mapping[3]; @@ -258,7 +271,9 @@ diff3_run (argc, argv, outfile) char **file; struct stat statb; int optind_old; - FILE *outstream; + int opened_file = 0; + + callbacks = callbacks_arg; initialize_main (&argc, &argv); @@ -303,11 +318,19 @@ diff3_run (argc, argv, outfile) tab_align_flag = 1; break; case 'v': - printf ("diff3 - GNU diffutils version %s\n", diff_version_string); + if (callbacks && callbacks->write_stdout) + { + (*callbacks->write_stdout) ("diff3 - GNU diffutils version "); + (*callbacks->write_stdout) (diff_version_string); + (*callbacks->write_stdout) ("\n"); + } + else + printf ("diff3 - GNU diffutils version %s\n", diff_version_string); return 0; case 129: usage (); - check_output (stdout); + if (! callbacks || ! callbacks->write_stdout) + check_output (stdout); return 0; case 'L': /* Handle up to three -L options. */ @@ -383,22 +406,33 @@ diff3_run (argc, argv, outfile) } else if (S_ISDIR(statb.st_mode)) { - fprintf (stderr, "%s: %s: Is a directory\n", - diff_program_name, file[i]); + diff_error ("%s: Is a directory", file[i], 0); return 2; } } - if (outfile == NULL) - outstream = stdout; - else + if (callbacks && callbacks->write_output) { - outstream = fopen (outfile, "w"); - if (outstream == NULL) - { - perror_with_name ("could not open output file"); + if (out != NULL) + { + diff_error ("write callback with output file", 0, 0); return 2; - } + } + } + else + { + if (out == NULL) + outfile = stdout; + else + { + outfile = fopen (out, "w"); + if (outfile == NULL) + { + perror_with_name ("could not open output file"); + return 2; + } + opened_file = 1; + } } /* Set the jump buffer, so that diff may abort execution without @@ -421,21 +455,21 @@ diff3_run (argc, argv, outfile) diff3 = make_3way_diff (thread0, thread1); if (edscript) conflicts_found - = output_diff3_edscript (outstream, diff3, mapping, rev_mapping, + = output_diff3_edscript (diff3, mapping, rev_mapping, tag_strings[0], tag_strings[1], tag_strings[2]); else if (merge) { if (! freopen (file[rev_mapping[FILE0]], "r", stdin)) diff3_perror_with_exit (file[rev_mapping[FILE0]]); conflicts_found - = output_diff3_merge (stdin, outstream, diff3, mapping, rev_mapping, + = output_diff3_merge (stdin, diff3, mapping, rev_mapping, tag_strings[0], tag_strings[1], tag_strings[2]); if (ferror (stdin)) diff3_fatal ("read error"); } else { - output_diff3 (outstream, diff3, mapping, rev_mapping); + output_diff3 (diff3, mapping, rev_mapping); conflicts_found = 0; } @@ -445,10 +479,13 @@ diff3_run (argc, argv, outfile) free_diff_blocks(thread1); free_diff3_blocks(diff3); - check_output (outstream); - if (outstream != stdout) - if (fclose (outstream) != 0) - perror ("close error on output file"); + if (! callbacks || ! callbacks->write_output) + check_output (outfile); + + if (opened_file) + if (fclose (outfile) != 0) + perror_with_name ("close error on output file"); + return conflicts_found; } @@ -457,9 +494,8 @@ try_help (reason) char const *reason; { if (reason) - fprintf (stderr, "%s: %s\n", diff_program_name, reason); - fprintf (stderr, "%s: Try `%s --help' for more information.\n", - diff_program_name, diff_program_name); + diff_error ("%s", reason, 0); + diff_error ("Try `%s --help' for more information.", diff_program_name, 0); return 2; } @@ -477,25 +513,52 @@ check_output (stream) static void usage () { - printf ("Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n\n", diff_program_name); + if (callbacks && callbacks->write_stdout) + { + (*callbacks->write_stdout) ("Usage: "); + (*callbacks->write_stdout) (diff_program_name); + (*callbacks->write_stdout) (" [OPTION]... MYFILE OLDFILE YOURFILE\n\n"); - printf ("%s", "\ + (*callbacks->write_stdout) ("\ -e --ed Output unmerged changes from OLDFILE to YOURFILE into MYFILE.\n\ -E --show-overlap Output unmerged changes, bracketing conflicts.\n\ -A --show-all Output all changes, bracketing conflicts.\n\ -x --overlap-only Output overlapping changes.\n\ -X Output overlapping changes, bracketing them.\n\ -3 --easy-only Output unmerged nonoverlapping changes.\n\n"); - printf ("%s", "\ + (*callbacks->write_stdout) ("\ -m --merge Output merged file instead of ed script (default -A).\n\ -L LABEL --label=LABEL Use LABEL instead of file name.\n\ -i Append `w' and `q' commands to ed scripts.\n\ -a --text Treat all files as text.\n\ -T --initial-tab Make tabs line up by prepending a tab.\n\n"); - printf ("%s", "\ + (*callbacks->write_stdout) ("\ -v --version Output version info.\n\ --help Output this help.\n\n"); - printf ("If a FILE is `-', read standard input.\n"); + (*callbacks->write_stdout) ("If a FILE is `-', read standard input.\n"); + } + else + { + printf ("Usage: %s [OPTION]... MYFILE OLDFILE YOURFILE\n\n", diff_program_name); + + printf ("%s", "\ + -e --ed Output unmerged changes from OLDFILE to YOURFILE into MYFILE.\n\ + -E --show-overlap Output unmerged changes, bracketing conflicts.\n\ + -A --show-all Output all changes, bracketing conflicts.\n\ + -x --overlap-only Output overlapping changes.\n\ + -X Output overlapping changes, bracketing them.\n\ + -3 --easy-only Output unmerged nonoverlapping changes.\n\n"); + printf ("%s", "\ + -m --merge Output merged file instead of ed script (default -A).\n\ + -L LABEL --label=LABEL Use LABEL instead of file name.\n\ + -i Append `w' and `q' commands to ed scripts.\n\ + -a --text Treat all files as text.\n\ + -T --initial-tab Make tabs line up by prepending a tab.\n\n"); + printf ("%s", "\ + -v --version Output version info.\n\ + --help Output this help.\n\n"); + printf ("If a FILE is `-', read standard input.\n"); + } } /* @@ -1011,12 +1074,13 @@ process_diff (filea, fileb, last_block, diff_contents) dt = process_diff_control (&scan_diff, bptr); if (dt == ERROR || *scan_diff != '\n') { - fprintf (stderr, "%s: diff error: ", diff_program_name); - do - { - putc (*scan_diff, stderr); - } - while (*scan_diff++ != '\n'); + char *serr; + + for (serr = scan_diff; *serr != '\n'; serr++) + ; + *serr = '\0'; + diff_error ("diff error: %s", scan_diff, 0); + *serr = '\n'; DIFF3_ABORT (2); } scan_diff++; @@ -1185,6 +1249,10 @@ read_diff (filea, fileb, output_placement) size_t bytes, current_chunk_size, total; int fd, wstatus; struct stat pipestat; + FILE *outfile_hold; + const struct diff_callbacks *callbacks_hold; + struct diff_callbacks my_callbacks; + struct diff_callbacks *my_callbacks_arg; /* 302 / 1000 is log10(2.0) rounded up. Subtract 1 for the sign bit; add 1 for integer division truncation; add 1 more for a minus sign. */ @@ -1207,7 +1275,30 @@ read_diff (filea, fileb, output_placement) *ap = 0; diffout = tmpnam(NULL); - wstatus = diff_run (ap - argv, (char **) argv, diffout); + + outfile_hold = outfile; + callbacks_hold = callbacks; + + /* We want to call diff_run preserving any stdout and stderr + callbacks, but discarding any callbacks to handle file output, + since we want the file output to go to our temporary file. + FIXME: We should use callbacks to just read it into a memory + buffer; that's we do with the temporary file just below anyhow. */ + if (callbacks == NULL) + my_callbacks_arg = NULL; + else + { + my_callbacks = *callbacks; + my_callbacks.write_output = NULL; + my_callbacks.flush_output = NULL; + my_callbacks_arg = &my_callbacks; + } + + wstatus = diff_run (ap - argv, (char **) argv, diffout, my_callbacks_arg); + + outfile = outfile_hold; + callbacks = callbacks_hold; + if (wstatus == 2) diff3_fatal ("subsidiary diff failed"); @@ -1282,17 +1373,25 @@ scan_diff_line (scan_ptr, set_start, set_length, limit, leadingchar) *set_length = line_ptr - *set_start; if (line_ptr < limit && *line_ptr == '\\') { - if (edscript) - fprintf (stderr, "%s:", diff_program_name); + if (! edscript) + { + --*set_length; + line_ptr++; + while (*line_ptr++ != '\n') + ; + } else - --*set_length; - line_ptr++; - do { - if (edscript) - putc (*line_ptr, stderr); + char *serr; + + line_ptr++; + serr = line_ptr; + while (*line_ptr++ != '\n') + ; + line_ptr[-1] = '\0'; + diff_error ("%s", serr, 0); + line_ptr[-1] = '\n'; } - while (*line_ptr++ != '\n'); } return line_ptr; @@ -1310,8 +1409,7 @@ scan_diff_line (scan_ptr, set_start, set_length, limit, leadingchar) * REV_MAPPING is the inverse of MAPPING. */ static void -output_diff3 (outputfile, diff, mapping, rev_mapping) - FILE *outputfile; +output_diff3 (diff, mapping, rev_mapping) struct diff3_block *diff; int const mapping[3], rev_mapping[3]; { @@ -1348,7 +1446,7 @@ output_diff3 (outputfile, diff, mapping, rev_mapping) default: diff3_fatal ("internal error: invalid diff type passed to output"); } - fprintf (outputfile, "====%s\n", x); + printf_output ("====%s\n", x); /* Go 0, 2, 1 if the first and third outputs are equivalent. */ for (i = 0; i < 3; @@ -1359,17 +1457,17 @@ output_diff3 (outputfile, diff, mapping, rev_mapping) lowt = D_LOWLINE (ptr, realfile), hight = D_HIGHLINE (ptr, realfile); - fprintf (outputfile, "%d:", i + 1); + printf_output ("%d:", i + 1); switch (lowt - hight) { case 1: - fprintf (outputfile, "%da\n", lowt - 1); + printf_output ("%da\n", lowt - 1); break; case 0: - fprintf (outputfile, "%dc\n", lowt); + printf_output ("%dc\n", lowt); break; default: - fprintf (outputfile, "%d,%dc\n", lowt, hight); + printf_output ("%d,%dc\n", lowt, hight); break; } @@ -1380,14 +1478,14 @@ output_diff3 (outputfile, diff, mapping, rev_mapping) line = 0; do { - fprintf (outputfile, line_prefix); + printf_output (line_prefix); cp = D_RELNUM (ptr, realfile, line); length = D_RELLEN (ptr, realfile, line); - fwrite (cp, sizeof (char), length, outputfile); + write_output (cp, length); } while (++line < hight - lowt + 1); if (cp[length - 1] != '\n') - fprintf (outputfile, "\n\\ No newline at end of file\n"); + printf_output ("\n\\ No newline at end of file\n"); } } } @@ -1395,12 +1493,11 @@ output_diff3 (outputfile, diff, mapping, rev_mapping) /* - * Output to OUTPUTFILE the lines of B taken from FILENUM. + * Output the lines of B taken from FILENUM. * Double any initial '.'s; yield nonzero if any initial '.'s were doubled. */ static int -dotlines (outputfile, b, filenum) - FILE *outputfile; +dotlines (b, filenum) struct diff3_block *b; int filenum; { @@ -1415,10 +1512,9 @@ dotlines (outputfile, b, filenum) if (line[0] == '.') { leading_dot = 1; - fprintf (outputfile, "."); + write_output (".", 1); } - fwrite (line, sizeof (char), - D_RELLEN (b, filenum, i), outputfile); + write_output (line, D_RELLEN (b, filenum, i)); } return leading_dot; @@ -1430,16 +1526,15 @@ dotlines (outputfile, b, filenum) * starting with line START and continuing for NUM lines. */ static void -undotlines (outputfile, leading_dot, start, num) - FILE *outputfile; +undotlines (leading_dot, start, num) int leading_dot, start, num; { - fprintf (outputfile, ".\n"); + write_output (".\n", 2); if (leading_dot) if (num == 1) - fprintf (outputfile, "%ds/^\\.//\n", start); + printf_output ("%ds/^\\.//\n", start); else - fprintf (outputfile, "%d,%ds/^\\.//\n", start, start + num - 1); + printf_output ("%d,%ds/^\\.//\n", start, start + num - 1); } /* @@ -1465,9 +1560,7 @@ undotlines (outputfile, leading_dot, start, num) */ static int -output_diff3_edscript (outputfile, diff, mapping, rev_mapping, - file0, file1, file2) - FILE *outputfile; +output_diff3_edscript (diff, mapping, rev_mapping, file0, file1, file2) struct diff3_block *diff; int const mapping[3], rev_mapping[3]; char const *file0, *file1, *file2; @@ -1502,22 +1595,22 @@ output_diff3_edscript (outputfile, diff, mapping, rev_mapping, /* Mark end of conflict. */ - fprintf (outputfile, "%da\n", D_HIGHLINE (b, mapping[FILE0])); + printf_output ("%da\n", D_HIGHLINE (b, mapping[FILE0])); leading_dot = 0; if (type == DIFF_ALL) { if (show_2nd) { /* Append lines from FILE1. */ - fprintf (outputfile, "||||||| %s\n", file1); - leading_dot = dotlines (outputfile, b, mapping[FILE1]); + printf_output ("||||||| %s\n", file1); + leading_dot = dotlines (b, mapping[FILE1]); } /* Append lines from FILE2. */ - fprintf (outputfile, "=======\n"); - leading_dot |= dotlines (outputfile, b, mapping[FILE2]); + printf_output ("=======\n"); + leading_dot |= dotlines (b, mapping[FILE2]); } - fprintf (outputfile, ">>>>>>> %s\n", file2); - undotlines (outputfile, leading_dot, + printf_output (">>>>>>> %s\n", file2); + undotlines (leading_dot, D_HIGHLINE (b, mapping[FILE0]) + 2, (D_NUMLINES (b, mapping[FILE1]) + D_NUMLINES (b, mapping[FILE2]) + 1)); @@ -1525,17 +1618,17 @@ output_diff3_edscript (outputfile, diff, mapping, rev_mapping, /* Mark start of conflict. */ - fprintf (outputfile, "%da\n<<<<<<< %s\n", - D_LOWLINE (b, mapping[FILE0]) - 1, - type == DIFF_ALL ? file0 : file1); + printf_output ("%da\n<<<<<<< %s\n", + D_LOWLINE (b, mapping[FILE0]) - 1, + type == DIFF_ALL ? file0 : file1); leading_dot = 0; if (type == DIFF_2ND) { /* Prepend lines from FILE1. */ - leading_dot = dotlines (outputfile, b, mapping[FILE1]); - fprintf (outputfile, "=======\n"); + leading_dot = dotlines (b, mapping[FILE1]); + printf_output ("=======\n"); } - undotlines (outputfile, leading_dot, + undotlines (leading_dot, D_LOWLINE (b, mapping[FILE0]) + 1, D_NUMLINES (b, mapping[FILE1])); } @@ -1543,12 +1636,11 @@ output_diff3_edscript (outputfile, diff, mapping, rev_mapping, /* Write out a delete */ { if (D_NUMLINES (b, mapping[FILE0]) == 1) - fprintf (outputfile, "%dd\n", - D_LOWLINE (b, mapping[FILE0])); + printf_output ("%dd\n", D_LOWLINE (b, mapping[FILE0])); else - fprintf (outputfile, "%d,%dd\n", - D_LOWLINE (b, mapping[FILE0]), - D_HIGHLINE (b, mapping[FILE0])); + printf_output ("%d,%dd\n", + D_LOWLINE (b, mapping[FILE0]), + D_HIGHLINE (b, mapping[FILE0])); } else /* Write out an add or change */ @@ -1556,33 +1648,32 @@ output_diff3_edscript (outputfile, diff, mapping, rev_mapping, switch (D_NUMLINES (b, mapping[FILE0])) { case 0: - fprintf (outputfile, "%da\n", - D_HIGHLINE (b, mapping[FILE0])); + printf_output ("%da\n", D_HIGHLINE (b, mapping[FILE0])); break; case 1: - fprintf (outputfile, "%dc\n", - D_HIGHLINE (b, mapping[FILE0])); + printf_output ("%dc\n", D_HIGHLINE (b, mapping[FILE0])); break; default: - fprintf (outputfile, "%d,%dc\n", - D_LOWLINE (b, mapping[FILE0]), - D_HIGHLINE (b, mapping[FILE0])); + printf_output ("%d,%dc\n", + D_LOWLINE (b, mapping[FILE0]), + D_HIGHLINE (b, mapping[FILE0])); break; } - undotlines (outputfile, dotlines (outputfile, b, mapping[FILE2]), + undotlines (dotlines (b, mapping[FILE2]), D_LOWLINE (b, mapping[FILE0]), D_NUMLINES (b, mapping[FILE2])); } } - if (finalwrite) fprintf (outputfile, "w\nq\n"); + if (finalwrite) printf_output ("w\nq\n"); return conflicts_found; } /* - * Read from INFILE and output to OUTPUTFILE a set of diff3_ blocks DIFF - * as a merged file. This acts like 'ed file0 <[output_diff3_edscript]', - * except that it works even for binary data or incomplete lines. + * Read from INFILE and output to the standard output file a set of + * diff3_ blocks DIFF as a merged file. This acts like 'ed file0 + * <[output_diff3_edscript]', except that it works even for binary + * data or incomplete lines. * * As before, MAPPING maps from arg list file number to diff file number, * REV_MAPPING is its inverse, @@ -1592,14 +1683,15 @@ output_diff3_edscript (outputfile, diff, mapping, rev_mapping, */ static int -output_diff3_merge (infile, outputfile, diff, mapping, rev_mapping, +output_diff3_merge (infile, diff, mapping, rev_mapping, file0, file1, file2) - FILE *infile, *outputfile; + FILE *infile; struct diff3_block *diff; int const mapping[3], rev_mapping[3]; char const *file0, *file1, *file2; { int c, i; + char cc; int conflicts_found = 0, conflict; struct diff3_block *b; int linesread = 0; @@ -1638,7 +1730,8 @@ output_diff3_merge (infile, outputfile, diff, mapping, rev_mapping, diff3_perror_with_exit ("input file"); else if (feof (infile)) diff3_fatal ("input file shrank"); - putc (c, outputfile); + cc = c; + write_output (&cc, 1); } while (c != '\n'); @@ -1649,37 +1742,37 @@ output_diff3_merge (infile, outputfile, diff, mapping, rev_mapping, if (type == DIFF_ALL) { /* Put in lines from FILE0 with bracket. */ - fprintf (outputfile, "<<<<<<< %s\n", file0); + printf_output ("<<<<<<< %s\n", file0); for (i = 0; i < D_NUMLINES (b, mapping[FILE0]); i++) - fwrite (D_RELNUM (b, mapping[FILE0], i), sizeof (char), - D_RELLEN (b, mapping[FILE0], i), outputfile); + write_output (D_RELNUM (b, mapping[FILE0], i), + D_RELLEN (b, mapping[FILE0], i)); } if (show_2nd) { /* Put in lines from FILE1 with bracket. */ - fprintf (outputfile, format_2nd, file1); + printf_output (format_2nd, file1); for (i = 0; i < D_NUMLINES (b, mapping[FILE1]); i++) - fwrite (D_RELNUM (b, mapping[FILE1], i), sizeof (char), - D_RELLEN (b, mapping[FILE1], i), outputfile); + write_output (D_RELNUM (b, mapping[FILE1], i), + D_RELLEN (b, mapping[FILE1], i)); } - fprintf (outputfile, "=======\n"); + printf_output ("=======\n"); } /* Put in lines from FILE2. */ for (i = 0; i < D_NUMLINES (b, mapping[FILE2]); i++) - fwrite (D_RELNUM (b, mapping[FILE2], i), sizeof (char), - D_RELLEN (b, mapping[FILE2], i), outputfile); + write_output (D_RELNUM (b, mapping[FILE2], i), + D_RELLEN (b, mapping[FILE2], i)); if (conflict) - fprintf (outputfile, ">>>>>>> %s\n", file2); + printf_output (">>>>>>> %s\n", file2); /* Skip I lines in file 0. */ i = D_NUMLINES (b, FILE0); @@ -1698,7 +1791,10 @@ output_diff3_merge (infile, outputfile, diff, mapping, rev_mapping, } /* Copy rest of common file. */ while ((c = getc (infile)) != EOF || !(ferror (infile) | feof (infile))) - putc (c, outputfile); + { + cc = c; + write_output (&cc, 1); + } return conflicts_found; } @@ -1737,7 +1833,7 @@ static void diff3_fatal (string) char const *string; { - fprintf (stderr, "%s: %s\n", diff_program_name, string); + diff_error ("%s", string, 0); DIFF3_ABORT (2); } @@ -1745,10 +1841,7 @@ static void diff3_perror_with_exit (string) char const *string; { - int e = errno; - fprintf (stderr, "%s: ", diff_program_name); - errno = e; - perror (string); + perror_with_name (string); DIFF3_ABORT (2); } @@ -1768,6 +1861,7 @@ initialize_main (argcp, argvp) finalwrite = 0; merge = 0; diff_program_name = (*argvp)[0]; + outfile = NULL; } static void diff --git a/gnu/usr.bin/cvs/diff/diffrun.h b/gnu/usr.bin/cvs/diff/diffrun.h new file mode 100644 index 00000000000..28c1f45e5fd --- /dev/null +++ b/gnu/usr.bin/cvs/diff/diffrun.h @@ -0,0 +1,69 @@ +/* Interface header file for GNU DIFF library. + Copyright (C) 1998 Free Software Foundation, Inc. + +This file is part of GNU DIFF. + +GNU DIFF is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +GNU DIFF is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU DIFF; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifndef DIFFRUN_H +#define DIFFRUN_H + +/* This header file defines the interfaces used by the diff library. + It should be included by programs which use the diff library. */ + +#include + +#if defined __STDC__ && __STDC__ +#define DIFFPARAMS(args) args +#else +#define DIFFPARAMS(args) () +#endif + +/* The diff_callbacks structure is used to handle callbacks from the + diff library. All output goes through these callbacks. When a + pointer to this structure is passed in, it may be NULL. Also, any + of the individual callbacks may be NULL. This means that the + default action should be taken. */ + +struct diff_callbacks +{ + /* Write output. This function just writes a string of a given + length to the output file. The default is to fwrite to OUTFILE. + If this callback is defined, flush_output must also be defined. */ + void (*write_output) DIFFPARAMS((char const *, size_t)); + /* Flush output. The default is to fflush OUTFILE. If this + callback is defined, write_output must also be defined. */ + void (*flush_output) DIFFPARAMS((void)); + /* Write to stdout. This is called for version and help messages. */ + void (*write_stdout) DIFFPARAMS((char const *)); + /* Print an error message. The first argument is a printf format, + and the next two are parameters. The default is to print a + message on stderr. */ + void (*error) DIFFPARAMS((char const *, char const *, char const *)); +}; + +/* Run a diff. */ + +extern int diff_run DIFFPARAMS((int, char **, char *, + const struct diff_callbacks *)); + +/* Run a diff3. */ + +extern int diff3_run DIFFPARAMS((int, char **, char *, + const struct diff_callbacks *)); + +#undef DIFFPARAMS + +#endif /* DIFFRUN_H */ diff --git a/gnu/usr.bin/cvs/diff/ed.c b/gnu/usr.bin/cvs/diff/ed.c index 717ef358d0e..6b00d133e4d 100644 --- a/gnu/usr.bin/cvs/diff/ed.c +++ b/gnu/usr.bin/cvs/diff/ed.c @@ -1,5 +1,5 @@ /* Output routines for ed-script format. - Copyright (C) 1988, 89, 91, 92, 93 Free Software Foundation, Inc. + Copyright (C) 1988, 89, 91, 92, 93, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -57,7 +57,7 @@ print_ed_hunk (hunk) /* Print out the line number header for this hunk */ print_number_range (',', &files[0], f0, l0); - fprintf (outfile, "%c\n", change_letter (inserts, deletes)); + printf_output ("%c\n", change_letter (inserts, deletes)); /* Print new/changed lines from second file, if needed */ if (inserts) @@ -68,8 +68,8 @@ print_ed_hunk (hunk) { /* Resume the insert, if we stopped. */ if (! inserting) - fprintf (outfile, "%da\n", - i - f1 + translate_line_number (&files[0], f0) - 1); + printf_output ("%da\n", + i - f1 + translate_line_number (&files[0], f0) - 1); inserting = 1; /* If the file's line is just a dot, it would confuse `ed'. @@ -80,11 +80,11 @@ print_ed_hunk (hunk) if (files[1].linbuf[i][0] == '.' && files[1].linbuf[i][1] == '\n') { - fprintf (outfile, "..\n"); - fprintf (outfile, ".\n"); + printf_output ("..\n"); + printf_output (".\n"); /* Now change that double dot to the desired single dot. */ - fprintf (outfile, "%ds/^\\.\\././\n", - i - f1 + translate_line_number (&files[0], f0)); + printf_output ("%ds/^\\.\\././\n", + i - f1 + translate_line_number (&files[0], f0)); inserting = 0; } else @@ -94,7 +94,7 @@ print_ed_hunk (hunk) /* End insert mode, if we are still in it. */ if (inserting) - fprintf (outfile, ".\n"); + printf_output (".\n"); } } @@ -124,9 +124,9 @@ pr_forward_ed_hunk (hunk) begin_output (); - fprintf (outfile, "%c", change_letter (inserts, deletes)); + printf_output ("%c", change_letter (inserts, deletes)); print_number_range (' ', files, f0, l0); - fprintf (outfile, "\n"); + printf_output ("\n"); /* If deletion only, print just the number range. */ @@ -139,7 +139,7 @@ pr_forward_ed_hunk (hunk) for (i = f1; i <= l1; i++) print_1_line ("", &files[1].linbuf[i]); - fprintf (outfile, ".\n"); + printf_output (".\n"); } /* Print in a format somewhat like ed commands @@ -175,23 +175,23 @@ print_rcs_hunk (hunk) if (deletes) { - fprintf (outfile, "d"); + printf_output ("d"); /* For deletion, print just the starting line number from file 0 and the number of lines deleted. */ - fprintf (outfile, "%d %d\n", - tf0, - (tl0 >= tf0 ? tl0 - tf0 + 1 : 1)); + printf_output ("%d %d\n", + tf0, + (tl0 >= tf0 ? tl0 - tf0 + 1 : 1)); } if (inserts) { - fprintf (outfile, "a"); + printf_output ("a"); /* Take last-line-number from file 0 and # lines from file 1. */ translate_range (&files[1], f1, l1, &tf1, &tl1); - fprintf (outfile, "%d %d\n", - tl0, - (tl1 >= tf1 ? tl1 - tf1 + 1 : 1)); + printf_output ("%d %d\n", + tl0, + (tl1 >= tf1 ? tl1 - tf1 + 1 : 1)); /* Print the inserted lines. */ for (i = f1; i <= l1; i++) diff --git a/gnu/usr.bin/cvs/diff/ifdef.c b/gnu/usr.bin/cvs/diff/ifdef.c index 2834cbdfa23..94fcfb56778 100644 --- a/gnu/usr.bin/cvs/diff/ifdef.c +++ b/gnu/usr.bin/cvs/diff/ifdef.c @@ -1,5 +1,5 @@ /* #ifdef-format output routines for GNU DIFF. - Copyright (C) 1989, 1991, 1992, 1993, 1994 Free Software Foundation, Inc. + Copyright (C) 1989, 1991, 1992, 1993, 1994, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -27,13 +27,13 @@ struct group int from, upto; /* start and limit lines for this group of lines */ }; -static char *format_group PARAMS((FILE *, char *, int, struct group const *)); +static char *format_group PARAMS((int, char *, int, struct group const *)); static char *scan_char_literal PARAMS((char *, int *)); static char *scan_printf_spec PARAMS((char *)); static int groups_letter_value PARAMS((struct group const *, int)); static void format_ifdef PARAMS((char *, int, int, int, int)); static void print_ifdef_hunk PARAMS((struct change *)); -static void print_ifdef_lines PARAMS((FILE *, char *, struct group const *)); +static void print_ifdef_lines PARAMS((int, char *, struct group const *)); static int next_line; @@ -103,18 +103,18 @@ format_ifdef (format, beg0, end0, beg1, end1) groups[1].file = &files[1]; groups[1].from = beg1; groups[1].upto = end1; - format_group (outfile, format, '\0', groups); + format_group (1, format, '\0', groups); } -/* Print to file OUT a set of lines according to FORMAT. +/* If DOIT is non-zero, output a set of lines according to FORMAT. The format ends at the first free instance of ENDCHAR. Yield the address of the terminating character. GROUPS specifies which lines to print. If OUT is zero, do not actually print anything; just scan the format. */ static char * -format_group (out, format, endchar, groups) - register FILE *out; +format_group (doit, format, endchar, groups) + int doit; char *format; int endchar; struct group const *groups; @@ -137,7 +137,7 @@ format_group (out, format, endchar, groups) /* Print if-then-else format e.g. `%(n=1?thenpart:elsepart)'. */ { int i, value[2]; - FILE *thenout, *elseout; + int thendoit, elsedoit; for (i = 0; i < 2; i++) { @@ -159,13 +159,13 @@ format_group (out, format, endchar, groups) goto bad_format; } if (value[0] == value[1]) - thenout = out, elseout = 0; + thendoit = doit, elsedoit = 0; else - thenout = 0, elseout = out; - f = format_group (thenout, f, ':', groups); + thendoit = 0, elsedoit = doit; + f = format_group (thendoit, f, ':', groups); if (*f) { - f = format_group (elseout, f + 1, ')', groups); + f = format_group (elsedoit, f + 1, ')', groups); if (*f) f++; } @@ -174,17 +174,17 @@ format_group (out, format, endchar, groups) case '<': /* Print lines deleted from first file. */ - print_ifdef_lines (out, line_format[OLD], &groups[0]); + print_ifdef_lines (doit, line_format[OLD], &groups[0]); continue; case '=': /* Print common lines. */ - print_ifdef_lines (out, line_format[UNCHANGED], &groups[0]); + print_ifdef_lines (doit, line_format[UNCHANGED], &groups[0]); continue; case '>': /* Print lines inserted from second file. */ - print_ifdef_lines (out, line_format[NEW], &groups[1]); + print_ifdef_lines (doit, line_format[NEW], &groups[1]); continue; default: @@ -211,11 +211,11 @@ format_group (out, format, endchar, groups) goto bad_format; break; } - if (out) + if (doit) { /* Temporarily replace e.g. "%3dnx" with "%3d\0x". */ *speclim = 0; - fprintf (out, spec - 1, value); + printf_output (spec - 1, value); /* Undo the temporary replacement. */ *speclim = c; } @@ -228,8 +228,12 @@ format_group (out, format, endchar, groups) break; } } - if (out) - putc (c, out); + if (doit) + { + /* Don't take the address of a register variable. */ + char cc = c; + write_output (&cc, 1); + } } return f; } @@ -257,11 +261,11 @@ groups_letter_value (g, letter) } } -/* Print to file OUT, using FORMAT to print the line group GROUP. - But do nothing if OUT is zero. */ +/* Output using FORMAT to print the line group GROUP. + But do nothing if DOIT is zero. */ static void -print_ifdef_lines (out, format, group) - register FILE *out; +print_ifdef_lines (doit, format, group) + int doit; char *format; struct group const *group; { @@ -269,7 +273,7 @@ print_ifdef_lines (out, format, group) char const * const *linbuf = file->linbuf; int from = group->from, upto = group->upto; - if (!out) + if (!doit) return; /* If possible, use a single fwrite; it's faster. */ @@ -277,15 +281,15 @@ print_ifdef_lines (out, format, group) { if (format[1] == 'l' && format[2] == '\n' && !format[3]) { - fwrite (linbuf[from], sizeof (char), - linbuf[upto] + (linbuf[upto][-1] != '\n') - linbuf[from], - out); + write_output (linbuf[from], + (linbuf[upto] + (linbuf[upto][-1] != '\n') + - linbuf[from])); return; } if (format[1] == 'L' && !format[2]) { - fwrite (linbuf[from], sizeof (char), - linbuf[upto] - linbuf[from], out); + write_output (linbuf[from], + linbuf[upto] - linbuf[from]); return; } } @@ -294,6 +298,7 @@ print_ifdef_lines (out, format, group) { register char c; register char *f = format; + char cc; while ((c = *f++) != 0) { @@ -342,7 +347,7 @@ print_ifdef_lines (out, format, group) } /* Temporarily replace e.g. "%3dnx" with "%3d\0x". */ *speclim = 0; - fprintf (out, spec - 1, value); + printf_output (spec - 1, value); /* Undo the temporary replacement. */ *speclim = c; } @@ -354,7 +359,10 @@ print_ifdef_lines (out, format, group) break; } } - putc (c, out); + + /* Don't take the address of a register variable. */ + cc = c; + write_output (&cc, 1); } } } diff --git a/gnu/usr.bin/cvs/diff/normal.c b/gnu/usr.bin/cvs/diff/normal.c index 4d9e23cb72a..75dae889930 100644 --- a/gnu/usr.bin/cvs/diff/normal.c +++ b/gnu/usr.bin/cvs/diff/normal.c @@ -1,5 +1,5 @@ /* Normal-format output routines for GNU DIFF. - Copyright (C) 1988, 1989, 1993 Free Software Foundation, Inc. + Copyright (C) 1988, 1989, 1993, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -52,9 +52,9 @@ print_normal_hunk (hunk) /* Print out the line number header for this hunk */ print_number_range (',', &files[0], first0, last0); - fprintf (outfile, "%c", change_letter (inserts, deletes)); + printf_output ("%c", change_letter (inserts, deletes)); print_number_range (',', &files[1], first1, last1); - fprintf (outfile, "\n"); + printf_output ("\n"); /* Print the lines that the first file has. */ if (deletes) @@ -62,7 +62,7 @@ print_normal_hunk (hunk) print_1_line ("<", &files[0].linbuf[i]); if (inserts && deletes) - fprintf (outfile, "---\n"); + printf_output ("---\n"); /* Print the lines that the second file has. */ if (inserts) diff --git a/gnu/usr.bin/cvs/diff/side.c b/gnu/usr.bin/cvs/diff/side.c index a150b5e705f..d776e77eab3 100644 --- a/gnu/usr.bin/cvs/diff/side.c +++ b/gnu/usr.bin/cvs/diff/side.c @@ -1,5 +1,5 @@ /* sdiff-format output routines for GNU DIFF. - Copyright (C) 1991, 1992, 1993 Free Software Foundation, Inc. + Copyright (C) 1991, 1992, 1993, 1998 Free Software Foundation, Inc. This file is part of GNU DIFF. @@ -50,17 +50,16 @@ static unsigned tab_from_to (from, to) unsigned from, to; { - FILE *out = outfile; unsigned tab; if (! tab_expand_flag) for (tab = from + TAB_WIDTH - from % TAB_WIDTH; tab <= to; tab += TAB_WIDTH) { - putc ('\t', out); + write_output ("\t", 1); from = tab; } while (from++ < to) - putc (' ', out); + write_output (" ", 1); return to; } @@ -74,7 +73,6 @@ print_half_line (line, indent, out_bound) char const * const *line; unsigned indent, out_bound; { - FILE *out = outfile; register unsigned in_position = 0, out_position = 0; register char const *text_pointer = line[0], @@ -83,6 +81,9 @@ print_half_line (line, indent, out_bound) while (text_pointer < text_limit) { register unsigned char c = *text_pointer++; + /* We use CC to avoid taking the address of the register + variable C. */ + char cc; switch (c) { @@ -97,13 +98,14 @@ print_half_line (line, indent, out_bound) if (out_bound < tabstop) tabstop = out_bound; for (; out_position < tabstop; out_position++) - putc (' ', out); + write_output (" ", 1); } else if (tabstop < out_bound) { out_position = tabstop; - putc (c, out); + cc = c; + write_output (&cc, 1); } } in_position += spaces; @@ -112,7 +114,8 @@ print_half_line (line, indent, out_bound) case '\r': { - putc (c, out); + cc = c; + write_output (&cc, 1); tab_from_to (0, indent); in_position = out_position = 0; } @@ -123,11 +126,12 @@ print_half_line (line, indent, out_bound) if (out_position <= in_position) /* Add spaces to make up for suppressed tab past out_bound. */ for (; out_position < in_position; out_position++) - putc (' ', out); + write_output (" ", 1); else { out_position = in_position; - putc (c, out); + cc = c; + write_output (&cc, 1); } break; @@ -135,7 +139,10 @@ print_half_line (line, indent, out_bound) case '\v': control_char: if (in_position < out_bound) - putc (c, out); + { + cc = c; + write_output (&cc, 1); + } break; default: @@ -146,7 +153,8 @@ print_half_line (line, indent, out_bound) if (in_position++ < out_bound) { out_position = in_position; - putc (c, out); + cc = c; + write_output (&cc, 1); } break; @@ -170,7 +178,6 @@ print_1sdiff_line (left, sep, right) int sep; char const * const *right; { - FILE *out = outfile; unsigned hw = sdiff_half_width, c2o = sdiff_column2_offset; unsigned col = 0; int put_newline = 0; @@ -184,10 +191,13 @@ print_1sdiff_line (left, sep, right) if (sep != ' ') { + char cc; + col = tab_from_to (col, (hw + c2o - 1) / 2) + 1; if (sep == '|' && put_newline != (right[1][-1] == '\n')) sep = put_newline ? '/' : '\\'; - putc (sep, out); + cc = sep; + write_output (&cc, 1); } if (right) @@ -202,7 +212,7 @@ print_1sdiff_line (left, sep, right) } if (put_newline) - putc ('\n', out); + write_output ("\n", 1); } /* Print lines common to both files in side-by-side format. */ @@ -215,7 +225,7 @@ print_sdiff_common_lines (limit0, limit1) if (! sdiff_skip_common_lines && (i0 != limit0 || i1 != limit1)) { if (sdiff_help_sdiff) - fprintf (outfile, "i%d,%d\n", limit0 - i0, limit1 - i1); + printf_output ("i%d,%d\n", limit0 - i0, limit1 - i1); if (! sdiff_left_only) { @@ -252,7 +262,7 @@ print_sdiff_hunk (hunk) print_sdiff_common_lines (first0, first1); if (sdiff_help_sdiff) - fprintf (outfile, "c%d,%d\n", last0 - first0 + 1, last1 - first1 + 1); + printf_output ("c%d,%d\n", last0 - first0 + 1, last1 - first1 + 1); /* Print ``xxx | xxx '' lines */ if (inserts && deletes) diff --git a/gnu/usr.bin/cvs/src/ChangeLog b/gnu/usr.bin/cvs/src/ChangeLog index 4f13ee6143b..8077ce8c027 100644 --- a/gnu/usr.bin/cvs/src/ChangeLog +++ b/gnu/usr.bin/cvs/src/ChangeLog @@ -1,5 +1,359 @@ +Thu Aug 13 11:15:24 1998 Noel Cragg + + * version.c: Change version number to 1.10 and name to `Halibut'. + + * sanity.sh (rcslib): new tests to check behavior of symlinks in + the repository. + +Wed Aug 12 15:39:38 1998 Noel Cragg + + * main.c (lookup_command_attribute): the `annotate' command + shouldn't require access to the repository. Add comment about + commands that do not use the working directory. + +Mon Aug 10 10:26:38 1998 Noel Cragg + + * version.c: Change version number to 1.9.30. + +Thu Aug 6 17:44:50 1998 Noel Cragg + + * server.c (serve_rdiff): change the name of the command (for + error reporting, etc.) from "patch" to "rdiff." + (serve_remove): rename from "cvsremove" to "remove." + + * main.c (lookup_command_attribute): the `rdiff' command shouldn't + require write access to the repository. + +1998-08-06 David Masterson of kla-tencor.com + and Jim Kingdon + + * commit.c (commit_filesdoneproc): Don't call strlen ("CVSROOT") + from within the assert statement. Apparently HP's cc compiler on + HPUX 10.20 has trouble with that. + +1998-08-06 Jim Kingdon + + * rcs.c (RCS_checkin): When adding branch, if there is a lock on + the branchpoint owned by someone else, leave it alone. This + restores CVS 1.9 (RCS 5.7) behavior, fixing a core dump. + * sanity.sh (reserved): New tests reserved-16 through reserved-19 + test for this fix. + +1998-08-05 Jim Kingdon + + * sanity.sh (unedit-without-baserev): Use ${QUESTION} not "?". + This makes it work with GNU expr 1.12 as well as 1.16. + +Sun Aug 2 20:27:44 1998 Noel Cragg + + * mkmodules.c: add comment about TopLevelAdmin for the initial + contents of CVSROOT/config. + +1998-07-29 Jim Kingdon + + * rcs.c (RCS_checkin): Only try to call xreadlink if HAVE_READLINK + is defined. + +Tue Jul 28 19:33:08 1998 Noel Cragg + + * version.c: Change version number to 1.9.29. + + * rcs.c (RCS_checkin): add code to follow symbolic links in the + repository. + +Sun Jul 26 05:14:41 1998 Noel Cragg + + * This set of changes reverts the code to pre-1.9.2 behavior and + does not create CVS directories at top-level (except for the + obvious "cvs co ."). Added a new configuration option to switch + between 1.9 and 1.9.2 behavior. + + * recurse.c (do_argument_proc): new function. + (start_recursion): in the case that we've done a command from + top-level but have no CVS directory there, the behavior should be + the same as "cvs dir1 dir2 dir3...". Make sure that the + appropriate "Argument" commands are sent to the server by calling + walklist with do_argument_proc. + + * client.c (call_in_directory): only create the top-level CVS + directory when we're checking out "." explicitly. The server will + force creation of this directory in all other cases. + + * checkout.c (checkout_proc): only generate the top-level + directory when the TopLevelAdmin=yes. Also send a message to the + client to do the same. + + * parseinfo.c (parse_config): handle TopLevelAdmin option. Set + top_level_admin. + + * main.c: add new variable top_level_admin. + * cvs.h: add extern definition for above. + + * sanity.sh: since we're reverting to pre 1.9.2 behavior for + top-level CVS directories, I needed to make changes to a bunch of + tests that made assumptions about said directories. + (preamble): make sure to add read and execute access to everything + in TMPDIR before removing, since some tests make things read-only. + (basicb-1a, basicb-1b, basicb-9a, basicb-9b): use dotest_fail + because these tests check for the non-existant top-level CVS + directory. + (basicc-3, emptydir-6, emptydir-7, crerepos-6): use "rm -rf" so it + won't complain when trying to remove the non-existant top-level + CVS directory. + (106.5): remove imported-f2-orig.tmp. + (modules2-10, emptydir-4, abspath-1ba, abspath-1bb): cd into the + directory where files exist before using the "add" command so cvs + can find CVSROOT in CVS/Root. + (cvsadm-2): look at a different CVS/Repository file, since the + top-level one doesn't exist. + (taginfo-3): create the directory in the repository directly + rather than relying on the fact that the top-level CVS directory + was created in a previous test. + (serverpatch-6): update first-dir explicity, rather than relying + on the non-existant top-level CVS/Entries file. + (crerepos-18): look at CVS/Repository in a subdirectory rather + than in the non-existant top-level CVS directory. + (toplevel): add code to set TopLevelAdmin=yes. + (toplevel2): new tests -- same as toplevel, but TopLevelAdmin=no. + +1998-07-21 Jim Meyering + + * rcs.c (RCS_checkout): Hoist frees of rev and value. + Warn and return 1 in several cases rather than exiting via + `error (1, ...'. The latter could abort a multi-file commit + in mid-stream, leaving stale locks in the repository. + +1998-07-16 Jim Kingdon + + * build_src.com (rcscmds.c): Also look for include files in + [-.diff], just like Ian's 1998-06-18 change to Makefile.in + +1998-07-14 Jim Kingdon + + * tag.c (pretag_proc), rtag.c (pretag_proc): Don't pass RUN_REALLY + to run_exec. This means that taginfo does not get executed if the + global -n option is specified. Which makes it like loginfo, -i, + -e, -o, -t, -u in modules, editinfo, and verifymsg and unlike + commitinfo. The old behavior was pretty bad in the sense that it + doesn't provide any way to log only the tags which actually + happen. + * sanity.sh (taginfo): New tests taginfo-11 to taginfo-13, for this. + +1998-07-12 Jim Kingdon + + * sanity.sh (ann-id): Write the test so that it tests for the + current (buggy) behavior. + + * sanity.sh (taginfo): Also clean up cvsroot/first-dir. + +1998-07-12 Jim Meyering + + * sanity.sh (ann-id): New (currently failing) test for bug in how + rcs keywords are expanded in the output of `cvs annotate'. + +1998-07-12 Jim Kingdon + + * sanity.sh (taginfo): Write the TESTDIR into the script rather + than having the script look at the environment. This means that + it will work if TESTDIR is set by sanity.sh as well as if + sanity.sh finds TESTDIR in the environment. + +1998-07-11 Jim Kingdon + + * tag.c (check_fileproc): Calculate the revision to be tagged the + same way that tag_fileproc does. + * sanity.sh (taginfo): New tests, test for this (before this fix, + brtag had said 1.1 not 1.1.2.1). + +1998-07-10 Jim Kingdon + + * sanity.sh (unedit-without-baserev): Also clean up "2" directory. + +1998-07-08 Jim Kingdon + + * edit.c (unedit_fileproc): If the Baserev file is missing, don't + get the working file from CVS/Base. The previous code could get + you version 1.1 of the working file and put 1.2 in CVS/Entries. + * sanity.sh (unedit-without-baserev): New tests test for this. + +1998-07-02 Jim Kingdon + + * sanity.sh (unedit-without-baserev): Move the test itself to be + in the same order as in the "tests" variable. + +1998-07-02 Ian Lance Taylor + + * rcscmds.c: Don't include or . Don't + declare vasprintf. + (call_diff_printf_output): Remove. + (call_diff_stdout_callbacks): Don't initialize printf_output + field--it has been removed from the interface. + (call_diff_file_callbacks): Likewise. + +1998-07-01 Jim Meyering + + * edit.c (unedit_fileproc): Handle the case in which base_get + returns a NULL baserev. That happens when a file being `unedit'ed + exists in the CVS/Base directory, but isn't listed in the CVS/Baserev + file. The one case I've seen had no Baserev file at all. The symptom + (if you're lucky) is a segmentation fault upon unedit. If you use + SunOS4.1.4 for which printf prints NULL pointers as `(null)', your + unedit command will complete normally, but it will have corrupted + your CVS/Entries file and a subsequent update may result in an + assertion failure, a core dump, and a stale lock in the repository. + * sanity.sh (unedit-without-baserev): New test for this. + +1998-07-01 Andy Mortimer of aeat.co.uk + and Jim Kingdon + + * server.c (server_updated): Use a prototype if we are using them + for declarations. + +1998-06-29 Jim Kingdon + + * sanity.sh (commit-readonly): Protect keyword against expansion + in sanity.sh itself. Keep the keyword in the file which we check + in (or else this fails to test for the RCS_checkout change). + +1998-06-27 Jim Meyering + + * rcs.c (RCS_checkout): If opening the local workfile fails due to + lack of write access, try to chmod the file and retry the open. + Before, a commit could fail part way through merely because the + open to rewrite with newly expanded rcs keywords would fail. It's + easy to make this happen if you use `cvs -r' or CVSREAD and you + apply a patch to one of your read-only source files -- patch + preserves the read-only setting for the file and your next commit + will fail after committing that file, but before rewriting + (checking out) your working copy. + * sanity.sh (commit-readonly): New test for this. + +1998-06-25 Jim Kingdon + + * update.c (patch_file): Update comments regarding context diffs + to reflect diff library. + +1998-06-23 Jim Kingdon + + * sanity.sh (modules4): Add tests for reversing the order of the + "!first-dir/sdir" and "first-dir". + +1998-06-23 Jim Kingdon + and Dave Wolfe@Motorola. + + * sanity.sh (modes2): Touch the file before chmod'ing it. + +1998-06-21 Ian Lance Taylor + + * update.c (merge_files): Revert changes of 1998-06-19. Instead, + register a merged file with a dummy time stamp. Only set + last_register_time if we need to. + (join_file): Likewise. Always register a merged file, not just + when the merge fails. + +1998-06-21 Jim Kingdon + + * call_diff_write_output, call_diff_printf_output, + call_diff_flush_output, call_diff_write_stdout, call_diff_error, + call_diff_stdout_callbacks, call_diff_file_callbacks): Re-indent. + +1998-06-19 Ian Lance Taylor + + * update.c (merge_file): Make sure the time stamp of the file is + different from the time stamp we register in the Entries file. + (join_file): Likewise. + +1998-06-18 Ian Lance Taylor + + * rcscmds.c: Include . Include either or + . Declare vasprintf. + (call_diff_write_output): New static function. + (call_diff_printf_output): New static function. + (call_diff_flush_output): New static function. + (call_diff_write_stdout): New static function. + (call_diff_error): New static function. + (call_diff_stdout_callbacks): New static variable. + (call_diff_file_callbacks): New static variable. + (call_diff): Don't sleep. Use a callback structure when calling + the diff library. + (call_diff3): Likewise. + + * rcscmds.c: Include diffrun.h. + (call_diff, call_diff3): Pass NULL callback parameter. + (diff_run, diff3_run): Don't declare. + * Makefile.in (rcscmds.o): New target, to use -I for diff + directory. + (zlib.o): Depend upon zlib.h. + +1998-06-09 Mike Sutton@SAIC + + Make it compile with Sun's bundled K&R C compiler: + * rcs.c (count_delta_actions): Change to static to match + declaration. + * client.c (handle_wrapper_rcs_option): Rename error label to + handle_error to avoid clash with function name. + +1998-06-09 Jim Kingdon + + * rcs.c (RCS_delete_revs): If we are trying to delete all + revisions, give an error rather than assertion failed. + * sanity.sh (basicb): New tests basicb-o* test for this. + +1998-06-04 Jim Kingdon + + * add.c (add): Only send "Directory" requests if we need to. + +1998-06-02 Assar Westerlund + + * client.c: Check for HAVE_GSS_C_NT_HOSTBASED_SERVICE rather than + assuming that GSS_C_NT_HOSTBASED_SERVICE is a macro. + * server.c: Likewise. + +1998-06-02 Jim Kingdon + + * fileattr.c (fileattr_read): Check for NULL return from strchr. + * sanity.sh (devcom3): New test devcom3-10 checks for this. + +1998-06-01 Assar Westerlund + and Ian Lance Taylor + + * client.c: If HAVE_GSSAPI_H, include . Only include + if HAVE_GSSAPI_GSSAPI_H. Only include + if HAVE_GSSAPI_GSSAPI_GENERIC_H. + (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined. + (connect_to_gserver): Use GSS_C_NT_HOSTBASED_SERVICE instead of + gss_nt_service_name. + * server.c: Same header file changes. + (GSS_C_NT_HOSTBASED_SERVICE): Define if not defined. + (gserver_authenticate_connection): Use GSS_C_NT_HOSTBASED_SERVICE + instead of gss_nt_service_name. + +1998-06-01 Jim Meyering + + * sanity.sh (tag8k): Add a test for the 1998-05-02 rcs.c bug fix. + +1998-05-26 Jim Kingdon + + * rcs.c (annotate): Call tag_check_valid like the other functions + which have a -r option. + * sanity.sh (ann): New test ann-14 tests for this. + +1998-05-24 Jim Kingdon + + * sanity.sh (importc): New tests importc-5 through importc-8 test + for a (fairly obscure) regression from CVS 1.9. + 1998-05-23 Jim Kingdon + * sanity.sh (modules2): Add comment listing cvs release tests. + (info): New test info-cleanup-0 tests "cvs -n release". + + * rcs.c (rcsbuf_getid): Remove semicolon at end of #undef. I'm + kind of surprised that compilers accepted this at all, but + removing it squelches a warning for some compilers. + + * version.c: Change version number to 1.9.28.1. + * Version 1.9.28. 1998-05-22 Jim Kingdon diff --git a/gnu/usr.bin/cvs/src/add.c b/gnu/usr.bin/cvs/src/add.c index d44435a3d59..a4eed40d90c 100644 --- a/gnu/usr.bin/cvs/src/add.c +++ b/gnu/usr.bin/cvs/src/add.c @@ -56,6 +56,9 @@ add (argc, argv) List *entries; Vers_TS *vers; struct saved_cwd cwd; + /* Nonzero if we found a slash, and are thus adding files in a + subdirectory. */ + int found_slash = 0; if (argc == 1 || argc == -1) usage (add_usage); @@ -108,6 +111,20 @@ add (argc, argv) error (0, 0, "cannot add special file `%s'; skipping", argv[i]); skip_file = 1; } + else + { + char *p; + p = argv[i]; + while (*p != '\0') + { + if (ISDIRSEP (*p)) + { + found_slash = 1; + break; + } + ++p; + } + } if (skip_file) { @@ -143,9 +160,16 @@ add (argc, argv) if (options) send_arg(options); option_with_arg ("-m", message); - repository = Name_Repository (NULL, NULL); - send_a_repository ("", repository, ""); - free (repository); + /* If !found_slash, refrain from sending "Directory", for + CVS 1.9 compatibility. If we only tried to deal with servers + which are at least CVS 1.9.26 or so, we wouldn't have to + special-case this. */ + if (found_slash) + { + repository = Name_Repository (NULL, NULL); + send_a_repository ("", repository, ""); + free (repository); + } for (i = 0; i < argc; ++i) /* FIXME: Does this erroneously call Create_Admin in error @@ -194,7 +218,8 @@ add (argc, argv) Create_Admin (p, argv[i], rcsdir, tag, date, nonbranch, 0); - send_a_repository ("", repository, update_dir); + if (found_slash) + send_a_repository ("", repository, update_dir); if (restore_cwd (&cwd, NULL)) error_exit (); diff --git a/gnu/usr.bin/cvs/src/sanity.sh b/gnu/usr.bin/cvs/src/sanity.sh index f378d73725f..f97e0369a05 100644 --- a/gnu/usr.bin/cvs/src/sanity.sh +++ b/gnu/usr.bin/cvs/src/sanity.sh @@ -512,8 +512,12 @@ dotest_sort () dotest_internal "$@" } -# clean any old remnants -rm -rf ${TESTDIR} +# clean any old remnants (we need the chmod because some tests make +# directories read-only) +if test -d ${TESTDIR}; then + chmod -R a+wx ${TESTDIR} + rm -rf ${TESTDIR} +fi mkdir ${TESTDIR} cd ${TESTDIR} # This will show up in cvs history output where it prints the working @@ -549,7 +553,7 @@ RCSINIT=; export RCSINIT if test x"$*" = x; then # Basic/miscellaneous functionality - tests="basica basicb basicc basic1 deep basic2" + tests="basica basicb basicc basic1 deep basic2 commit-readonly" # Branching, tagging, removing, adding, multiple directories tests="${tests} rdiff death death2 branches branches2" tests="${tests} rcslib multibranch import importb importc" @@ -557,21 +561,22 @@ if test x"$*" = x; then tests="${tests} new newb conflicts conflicts2 conflicts3" # Checking out various places (modules, checkout -d, &c) tests="${tests} modules modules2 modules3 modules4" - tests="${tests} cvsadm emptydir abspath toplevel" + tests="${tests} cvsadm emptydir abspath toplevel toplevel2" # Log messages, error messages. tests="${tests} mflag editor errmsg1 errmsg2" # Watches, binary files, history browsing, &c. tests="${tests} devcom devcom2 devcom3 watch4" + tests="${tests} unedit-without-baserev" tests="${tests} ignore binfiles binfiles2 mcopy binwrap binwrap2" - tests="${tests} binwrap3 mwrap info config" - tests="${tests} serverpatch log log2 ann crerepos rcs rcs2" + tests="${tests} binwrap3 mwrap info taginfo config" + tests="${tests} serverpatch log log2 ann ann-id crerepos rcs rcs2" tests="${tests} history" tests="${tests} big modes modes2 stamps" # PreservePermissions stuff: permissions, symlinks et al. tests="${tests} perms symlinks hardlinks" # More tag and branch tests, keywords. tests="${tests} sticky keyword keywordlog" - tests="${tests} head tagdate multibranch2" + tests="${tests} head tagdate multibranch2 tag8k" # "cvs admin", reserved checkouts. tests="${tests} admin reserved" # Nuts and bolts of diffing/merging (diff library, &c) @@ -893,15 +898,19 @@ done" cd .. rm -r 2 -: mkdir ${CVSROOT_DIRNAME}/first-dir dotest basicb-1 "${testcvs} -q co first-dir" '' - dotest basicb-1a "test -d CVS" '' + + # The top-level CVS directory is not created by default. + # I'm leaving basicb-1a and basicb-1b untouched, mostly, in + # case we decide that the default should be reversed... + + dotest_fail basicb-1a "test -d CVS" '' # In 1b and 1c, the first string matches if we're using absolute # paths, while the second matches if RELATIVE_REPOS is defined # (we're using relative paths). - dotest basicb-1b "cat CVS/Repository" \ +: dotest basicb-1b "cat CVS/Repository" \ "${TESTDIR}/cvsroot/\." \ "\." dotest basicb-1c "cat first-dir/CVS/Repository" \ @@ -1006,13 +1015,16 @@ U first-dir1/sdir2/sfile2' "${testcvs} -q co -d newdir -r release-1 first-dir/Emptydir first-dir/sdir2" \ 'U newdir/first-dir/Emptydir/sfile1 U newdir/first-dir/sdir2/sfile2' - dotest basicb-9a "test -d CVS" '' + + # basicb-9a and basicb-9b: see note about basicb-1a + + dotest_fail basicb-9a "test -d CVS" '' # In 9b through 9f, the first string matches if we're using # absolute paths, while the second matches if RELATIVE_REPOS # is defined (we're using relative paths). - dotest basicb-9b "cat CVS/Repository" \ +: dotest basicb-9b "cat CVS/Repository" \ "${TESTDIR}/cvsroot/\." \ "\." dotest basicb-9c "cat newdir/CVS/Repository" \ @@ -1068,7 +1080,23 @@ Checking in aa; ${TESTDIR}/cvsroot/second-dir/aa,v <-- aa initial revision: 1\.1 done" - cd ../.. + cd .. + + # Try to remove all revisions in a file. + dotest_fail basicb-o1 "${testcvs} admin -o1.1 topfile" \ +"RCS file: ${TESTDIR}/cvsroot/topfile,v +deleting revision 1\.1 +${PROG} \[[a-z]* aborted\]: attempt to delete all revisions" + dotest basicb-o2 "${testcvs} -q update -d first-dir" \ +"U first-dir/Emptydir/sfile1 +U first-dir/sdir2/sfile2" + dotest_fail basicb-o3 \ +"${testcvs} admin -o1.1:1.2 first-dir/sdir2/sfile2" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/sdir2/sfile2,v +deleting revision 1\.2 +deleting revision 1\.1 +${PROG} \[[a-z]* aborted\]: attempt to delete all revisions" + cd .. rm -r 1 mkdir 1; cd 1 @@ -1108,10 +1136,11 @@ ${PROG} \[[a-z]* aborted\]: there is no version here; run .${PROG} checkout. fir Directory ${TESTDIR}/cvsroot/second-dir added to the repository" # Old versions of CVS often didn't create this top-level CVS # directory in the first place. I think that maybe the only - # way to get avoid it currently is to let CVS create it, and - # then blow it away. But that is perfectly legal; people who - # are used to the old behavior especially may be interested. - rm -r CVS + # way to get it to work currently is to let CVS create it, + # and then blow it away (don't complain if it does not + # exist). But that is perfectly legal; people who are used + # to the old behavior especially may be interested. + rm -rf CVS dotest basicc-4 "echo *" "first-dir second-dir" dotest basicc-5 "${testcvs} update" \ "${PROG} [a-z]*: Updating first-dir @@ -2018,6 +2047,47 @@ O [0-9/]* [0-9:]* ${PLUS}0000 ${username} \[1\.1\] first-dir =first-di rm -rf ${CVSROOT_DIRNAME}/second-dir ;; + commit-readonly) + mkdir 1; cd 1 + module=x + + : > junk + dotest commit-readonly-1 "$testcvs -Q import -m . $module X Y" '' + dotest commit-readonly-2 "$testcvs -Q co $module" '' + cd $module + + file=m + + # Include an rcs keyword to be expanded. + echo '$Id''$' > $file + + dotest commit-readonly-3 "$testcvs add $file" \ +"${PROG} [a-z]*: scheduling file .$file. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest commit-readonly-4 "$testcvs -Q ci -m . $file" \ +"RCS file: ${TESTDIR}/cvsroot/$module/$file,v +done +Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +initial revision: 1\.1 +done" + + echo line2 >> $file + # Make the file read-only. + chmod a-w $file + + dotest commit-readonly-5 "$testcvs -Q ci -m . $file" \ +"Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +new revision: 1\.2; previous revision: 1\.1 +done" + + cd ../.. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + + rdiff) # Test rdiff # XXX for now this is just the most essential test... @@ -3524,6 +3594,17 @@ two 3 [>]>>>>>> 1\.2" + # Test behavior of symlinks in the repository. + dotest rcslib-symlink-1 "ln -s file1,v ${CVSROOT_DIRNAME}/first-dir/file2,v" + dotest rcslib-symlink-2 "${testcvs} update file2" "U file2" + echo "This is a change" >> file2 + dotest rcslib-symlink-3 "${testcvs} ci -m because file2" \ +"Checking in file2; +${TESTDIR}/cvsroot/first-dir/file1,v <-- file2 +new revision: 1\.1\.2\.2; previous revision: 1\.1\.2\.1 +done" + dotest rcslib-symlink-4 "test -L ${CVSROOT_DIRNAME}/first-dir/file2,v" + cd .. if test "$keep" = yes; then @@ -3755,6 +3836,7 @@ modify-on-br1 fail 106.5 fi cd .. + rm imported-f2-orig.tmp # co if ${CVS} co first-dir ; then @@ -3983,6 +4065,33 @@ ${PROG} [a-z]*: Updating adir/sub1/ssdir" "${PROG} [a-z]*: Updating adir/sub1 ${PROG} [a-z]*: Updating adir/sub1/ssdir ${PROG} [a-z]*: Updating bdir/subdir" + + echo modify >>cdir/cfile + dotest importc-5 \ +"${testcvs} -q rtag -b -r release wip_test first-dir" "" + dotest importc-6 "${testcvs} -q update -r wip_test" "M cdir/cfile" + + if test "$remote" = no; then + # This checkin should just succeed. That it doesn't is a + # bug (CVS 1.9.16 through the present seem to have it; CVS + # 1.9 did not). + dotest_fail importc-7 "${testcvs} -q ci -m modify -r wip_test" \ +"${PROG} [a-z]*: in directory adir/sub1/ssdir: +${PROG} \[[a-z]* aborted\]: there is no version here; do .cvs checkout. first" + # The workaround is to leave off the "-r wip_test". + dotest importc-8 "${testcvs} -q ci -m modify" \ +"Checking in cdir/cfile; +${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile +new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1 +done" + else + # Remote doesn't have the bug in the first place. + dotest importc-7 "${testcvs} -q ci -m modify -r wip_test" \ +"Checking in cdir/cfile; +${TESTDIR}/cvsroot/first-dir/cdir/cfile,v <-- cfile +new revision: 1\.1\.1\.1\.2\.1; previous revision: 1\.1\.1\.1 +done" + fi cd .. cd .. @@ -5797,6 +5906,10 @@ ${PROG} [a-z]*: Rebuilding administrative file database" dotest modules2-5 "test -d ampermodule/second-dir" '' # Test ability of cvs release to handle multiple arguments + # Other CVS release tests: + # info-cleanup-0 for "cvs -n release". + # ignore-193 for the text of the question that cvs release asks. + # Also for interactions with cvsignore. cd ampermodule if ${testcvs} release -d first-dir second-dir <>${LOGFILE} yes @@ -5821,9 +5934,11 @@ EOF "${PROG} [a-z]*: Updating first-dir ${PROG} [a-z]*: Updating second-dir" touch ampermodule/first-dir/amper1 - dotest modules2-10 "${testcvs} add ampermodule/first-dir/amper1" \ -"${PROG} [a-z]*: scheduling file .ampermodule/first-dir/amper1. for addition + cd ampermodule + dotest modules2-10 "${testcvs} add first-dir/amper1" \ +"${PROG} [a-z]*: scheduling file .first-dir/amper1. for addition ${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + cd .. # As with the "Updating xxx" message, the "U first-dir/amper1" # message (instead of "U ampermodule/first-dir/amper1") is @@ -6149,6 +6264,7 @@ done" cat >modules <config + dotest cvsadm-setup-2 "${testcvs} -q ci -m yes-top-level" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd ../.. + rm -r 1 + + # Second, check out the modules file and edit it. mkdir 1; cd 1 dotest cvsadm-1 "${testcvs} co CVSROOT/modules" \ "U CVSROOT/modules" @@ -6296,26 +6443,27 @@ ${PROG} [a-z]*: Rebuilding administrative file database" rm -rf CVS CVSROOT; # Create the various modules - mkdir ${CVSROOT_DIRNAME}/mod1 - mkdir ${CVSROOT_DIRNAME}/mod1-2 - mkdir ${CVSROOT_DIRNAME}/mod2 - mkdir ${CVSROOT_DIRNAME}/mod2/sub2 - mkdir ${CVSROOT_DIRNAME}/mod2-2 - mkdir ${CVSROOT_DIRNAME}/mod2-2/sub2-2 - dotest cvsadm-2 "${testcvs} co mod1 mod1-2 mod2 mod2-2" \ -"${PROG} [a-z]*: Updating mod1 -${PROG} [a-z]*: Updating mod1-2 -${PROG} [a-z]*: Updating mod2 -${PROG} [a-z]*: Updating mod2/sub2 -${PROG} [a-z]*: Updating mod2-2 -${PROG} [a-z]*: Updating mod2-2/sub2-2" + dotest cvsadm-2 "${testcvs} -q co -l ." '' + mkdir mod1 + mkdir mod1-2 + mkdir mod2 + mkdir mod2/sub2 + mkdir mod2-2 + mkdir mod2-2/sub2-2 + dotest cvsadm-2a "${testcvs} add mod1 mod1-2 mod2 mod2/sub2 mod2-2 mod2-2/sub2-2" \ +"Directory ${TESTDIR}/cvsroot/mod1 added to the repository +Directory ${TESTDIR}/cvsroot/mod1-2 added to the repository +Directory ${TESTDIR}/cvsroot/mod2 added to the repository +Directory ${TESTDIR}/cvsroot/mod2/sub2 added to the repository +Directory ${TESTDIR}/cvsroot/mod2-2 added to the repository +Directory ${TESTDIR}/cvsroot/mod2-2/sub2-2 added to the repository" # Populate the directories for the halibut echo "file1" > mod1/file1 echo "file1-2" > mod1-2/file1-2 echo "file2" > mod2/sub2/file2 echo "file2-2" > mod2-2/sub2-2/file2-2 - dotest cvsadm-2a "${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2" \ + dotest cvsadm-2aa "${testcvs} add mod1/file1 mod1-2/file1-2 mod2/sub2/file2 mod2-2/sub2-2/file2-2" \ "${PROG} [a-z]*: scheduling file .mod1/file1. for addition ${PROG} [a-z]*: scheduling file .mod1-2/file1-2. for addition ${PROG} [a-z]*: scheduling file .mod2/sub2/file2. for addition @@ -7593,6 +7741,19 @@ U dir/dir2/dir2d2/sub2d2/file2" ## That's enough of that, thank you very much. ################################################## + dotest cvsadm-cleanup-1 "${testcvs} -q co CVSROOT/config" \ +"U CVSROOT/config" + cd CVSROOT + echo "# empty file" >config + dotest cvsadm-cleanup-2 "${testcvs} -q ci -m cvsadm-cleanup" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd .. + rm -rf CVSROOT CVS + # remove our junk cd .. rm -rf 1 @@ -7618,8 +7779,7 @@ U dir/dir2/dir2d2/sub2d2/file2" echo "2d1mod -d dir2d1/sub2d1 mod1" >> CVSROOT/modules dotest emptydir-2 "${testcvs} ci -m add-modules" \ -"${PROG} [a-z]*: Examining . -${PROG} [a-z]*: Examining CVSROOT +"${PROG} [a-z]*: Examining CVSROOT Checking in CVSROOT/modules; ${CVSROOT_DIRNAME}/CVSROOT/modules,v <-- modules new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* @@ -7632,9 +7792,11 @@ ${PROG} [a-z]*: Rebuilding administrative file database" dotest emptydir-3 "${testcvs} co mod1" \ "${PROG} [a-z]*: Updating mod1" echo "file1" > mod1/file1 - dotest emptydir-4 "${testcvs} add mod1/file1" \ -"${PROG} [a-z]*: scheduling file .mod1/file1. for addition + cd mod1 + dotest emptydir-4 "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition ${PROG} [a-z]*: use '${PROG} commit' to add this file permanently" + cd .. dotest emptydir-5 "${testcvs} -q ci -m yup mod1" \ "RCS file: ${CVSROOT_DIRNAME}/mod1/file1,v done @@ -7642,7 +7804,7 @@ Checking in mod1/file1; ${CVSROOT_DIRNAME}/mod1/file1,v <-- file1 initial revision: 1\.1 done" - rm -r mod1 CVS + rm -rf mod1 CVS # End Populate. dotest emptydir-6 "${testcvs} co 2d1mod" \ @@ -7667,7 +7829,7 @@ initial revision: 1\.1 done ${PROG} [a-z]*: Rebuilding administrative file database" cd .. - rm -r CVS dir2d1 + rm -rf CVS dir2d1 # OK, while we have an Emptydir around, test a few obscure # things about it. @@ -7707,10 +7869,16 @@ ${PROG} [a-z]*: Updating mod2" # Populate the module echo "file1" > mod1/file1 echo "file2" > mod2/file2 - dotest abspath-1b "${testcvs} add mod1/file1 mod2/file2" \ -"${PROG} [a-z]*: scheduling file .mod1/file1. for addition -${PROG} [a-z]*: scheduling file .mod2/file2. for addition -${PROG} [a-z]*: use '${PROG} commit' to add these files permanently" + cd mod1 + dotest abspath-1ba "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition +${PROG} [a-z]*: use '${PROG} commit' to add this file permanently" + cd .. + cd mod2 + dotest abspath-1bb "${testcvs} add file2" \ +"${PROG} [a-z]*: scheduling file .file2. for addition +${PROG} [a-z]*: use '${PROG} commit' to add this file permanently" + cd .. dotest abspath-1c "${testcvs} ci -m yup mod1 mod2" \ "${PROG} [a-z]*: Examining mod1 @@ -7793,7 +7961,7 @@ ${PROG} [a-z]*: ignoring module mod1" "${PROG} [a-z]*: Updating 2 U 2/file1" cd .. - rm -r 1/CVS + rm -rf 1/CVS else dotest abspath-3a "${testcvs} co -d ${TESTDIR}/1/2 mod1" \ "${PROG} [a-z]*: Updating ${TESTDIR}/1/2 @@ -7934,6 +8102,21 @@ ${PROG} \[server aborted\]: than the 0 which Max-dotdot specified" # Emptydir? That would seem a bit odd). rm -rf ${CVSROOT_DIRNAME}/CVSROOT/Emptydir + # First set the TopLevelAdmin setting. + mkdir 1; cd 1 + dotest toplevel-1a "${testcvs} -q co CVSROOT/config" \ +"U CVSROOT/config" + cd CVSROOT + echo "TopLevelAdmin=yes" >config + dotest toplevel-1b "${testcvs} -q ci -m yes-top-level" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd ../.. + rm -r 1 + mkdir 1; cd 1 dotest toplevel-1 "${testcvs} -q co -l ." '' mkdir top-dir second-dir @@ -8004,6 +8187,7 @@ ${PROG} [a-z]*: Updating top-dir" dotest toplevel-10 "${testcvs} co top-dir" \ "${PROG} [a-z]*: Updating top-dir U top-dir/file1" + # This tests more or less the same thing, in a particularly # "real life" example. dotest toplevel-11 "${testcvs} -q update -d second-dir" \ @@ -8017,12 +8201,124 @@ U top-dir/file1" # Now set the permissions so we can't recreate it. chmod -w ../1 # Now see whether CVS has trouble because it can't create CVS. + # First string is for local, second is for remote. dotest toplevel-12 "${testcvs} co top-dir" \ "${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied +${PROG} [a-z]*: Updating top-dir" \ +"${PROG} [a-z]*: warning: cannot make directory CVS in \.: Permission denied +${PROG} [a-z]*: in directory \.: +${PROG} [a-z]*: cannot open CVS/Entries for reading: No such file or directory ${PROG} [a-z]*: Updating top-dir" + chmod +w ../1 + dotest toplevel-cleanup-1 "${testcvs} -q co CVSROOT/config" \ +"U CVSROOT/config" + cd CVSROOT + echo "# empty file" >config + dotest toplevel-cleanup-2 "${testcvs} -q ci -m toplevel-cleanup" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + + cd ../.. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir + ;; + + toplevel2) + # Similar to toplevel, but test the case where TopLevelAdmin=no. + + # First set the TopLevelAdmin setting. + mkdir 1; cd 1 + dotest toplevel2-1a "${testcvs} -q co CVSROOT/config" \ +"U CVSROOT/config" + cd CVSROOT + echo "TopLevelAdmin=no" >config + dotest toplevel2-1b "${testcvs} -q ci -m no-top-level" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd ../.. + rm -r 1 + + # Now set up some directories and subdirectories + mkdir 1; cd 1 + dotest toplevel2-1 "${testcvs} -q co -l ." '' + mkdir top-dir second-dir + dotest toplevel2-2 "${testcvs} add top-dir second-dir" \ +"Directory ${TESTDIR}/cvsroot/top-dir added to the repository +Directory ${TESTDIR}/cvsroot/second-dir added to the repository" + cd top-dir + + touch file1 + dotest toplevel2-3 "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest toplevel2-4 "${testcvs} -q ci -m add" \ +"RCS file: ${TESTDIR}/cvsroot/top-dir/file1,v +done +Checking in file1; +${TESTDIR}/cvsroot/top-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + cd .. + + cd second-dir + touch file2 + dotest toplevel2-3s "${testcvs} add file2" \ +"${PROG} [a-z]*: scheduling file .file2. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest toplevel2-4s "${testcvs} -q ci -m add" \ +"RCS file: ${TESTDIR}/cvsroot/second-dir/file2,v +done +Checking in file2; +${TESTDIR}/cvsroot/second-dir/file2,v <-- file2 +initial revision: 1\.1 +done" + + cd ../.. + rm -r 1; mkdir 1; cd 1 + dotest toplevel2-5 "${testcvs} co top-dir" \ +"${PROG} [a-z]*: Updating top-dir +U top-dir/file1" + + dotest toplevel2-6 "${testcvs} update top-dir" \ +"${PROG} [a-z]*: Updating top-dir" + dotest toplevel2-7 "${testcvs} update" \ +"${PROG} [a-z]*: Updating top-dir" + + dotest toplevel2-8 "${testcvs} update -d top-dir" \ +"${PROG} [a-z]*: Updating top-dir" + # Contrast this with toplevel-9, which has TopLevelAdmin=yes. + dotest toplevel2-9 "${testcvs} update -d" \ +"${PROG} [a-z]*: Updating top-dir" + cd .. + rm -r 1; mkdir 1; cd 1 + dotest toplevel2-10 "${testcvs} co top-dir" \ +"${PROG} [a-z]*: Updating top-dir +U top-dir/file1" + # This tests more or less the same thing, in a particularly + # "real life" example. With TopLevelAdmin=yes, this command + # would give us second-dir and CVSROOT directories too. + dotest toplevel2-11 "${testcvs} -q update -d" "" + + dotest toplevel2-cleanup-1 "${testcvs} -q co CVSROOT/config" \ +"U CVSROOT/config" + cd CVSROOT + echo "# empty file" >config + dotest toplevel2-cleanup-2 "${testcvs} -q ci -m toplevel2-cleanup" \ +"Checking in config; +${TESTDIR}/cvsroot/CVSROOT/config,v <-- config +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd ../.. rm -r 1 rm -rf ${CVSROOT_DIRNAME}/top-dir ${CVSROOT_DIRNAME}/second-dir ;; @@ -8817,9 +9113,20 @@ Enew line here G@#..!@#=&" cd ../.. + # OK, now change the tab to a space, and see that CVS gives + # a reasonable error (this is database corruption but CVS should + # not lose its mind). + sed -e 's/Fw2 /Fw2 /' <${CVSROOT_DIRNAME}/first-dir/CVS/fileattr \ + >${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new + mv ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr.new \ + ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr + mkdir 2; cd 2 + dotest_fail devcom3-10 "${testcvs} -Q co ." \ +"${PROG} \[[a-z]* aborted\]: file attribute database corruption: tab missing in ${CVSROOT_DIRNAME}/first-dir/CVS/fileattr" + cd .. # Use -f because of the readonly files. - rm -rf 1 + rm -rf 1 2 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; @@ -8914,6 +9221,106 @@ C file1" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + unedit-without-baserev) + mkdir 1; cd 1 + module=x + + file=m + echo foo > $file + dotest unedit-without-baserev-1 \ + "$testcvs -Q import -m . $module X Y" '' + dotest unedit-without-baserev-2 "$testcvs -Q co $module" '' + cd $module + + dotest unedit-without-baserev-3 "$testcvs -Q edit $file" '' + + echo add a line >> $file + rm -f CVS/Baserev + + # This will fail on most systems. + if echo "yes" | ${testcvs} -Q unedit $file \ + >${TESTDIR}/test.tmp 2>&1 ; then + dotest unedit-without-baserev-4 "cat ${TESTDIR}/test.tmp" \ +"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev +${PROG} unedit: run update to complete the unedit" + else + fail unedit-without-baserev-4 + fi + + # SunOS4.1.4 systems make it this far, but with a corrupted + # CVS/Entries file. Demonstrate the corruption! + dotest unedit-without-baserev-5 "cat CVS/Entries" \ + "/$file/1\.1\.1\.1/.*" + + if test "$remote" = yes; then + dotest unedit-without-baserev-6 "${testcvs} -q update" "U m" + else + dotest unedit-without-baserev-6 "${testcvs} -q update" \ +"${PROG} update: warning: m was lost +U m" + fi + + # OK, those were the easy cases. Now tackle the hard one + # (the reason that CVS/Baserev was invented rather than just + # getting the revision from CVS/Entries). This is very + # similar to watch4-10 through watch4-18 but with Baserev + # missing. + cd ../.. + mkdir 2; cd 2 + dotest unedit-without-baserev-7 "${testcvs} -Q co x" '' + cd x + + dotest unedit-without-baserev-10 "${testcvs} edit m" '' + echo 'edited in 2' >m + cd ../.. + + cd 1/x + dotest unedit-without-baserev-11 "${testcvs} edit m" '' + echo 'edited in 1' >m + dotest unedit-without-baserev-12 "${testcvs} -q ci -m edit-in-1" \ +"Checking in m; +${TESTDIR}/cvsroot/x/m,v <-- m +new revision: 1\.2; previous revision: 1\.1 +done" + cd ../.. + cd 2/x + dotest unedit-without-baserev-13 "${testcvs} -q update" \ +"RCS file: ${TESTDIR}/cvsroot/x/m,v +retrieving revision 1\.1\.1\.1 +retrieving revision 1\.2 +Merging differences between 1\.1\.1\.1 and 1\.2 into m +rcsmerge: warning: conflicts during merge +${PROG} [a-z]*: conflicts found in m +C m" + rm CVS/Baserev + if (echo yes | ${testcvs} unedit m) >${TESTDIR}/test.tmp 2>&1; then + dotest unedit-without-baserev-14 "cat ${TESTDIR}/test.tmp" \ +"m has been modified; revert changes${QUESTION} ${PROG} unedit: m not mentioned in CVS/Baserev +${PROG} unedit: run update to complete the unedit" + else + fail unedit-without-baserev-14 + fi + if test "$remote" = yes; then + dotest unedit-without-baserev-15 "${testcvs} -q update" "U m" + else + dotest unedit-without-baserev-15 "${testcvs} -q update" \ +"${PROG} update: warning: m was lost +U m" + fi + # The following tests are kind of degenerate compared with + # watch4-16 through watch4-18 but might as well make sure that + # nothing seriously wrong has happened to the working directory. + dotest unedit-without-baserev-16 "cat m" 'edited in 1' + # Make sure CVS really thinks we are at 1.2. + dotest unedit-without-baserev-17 "${testcvs} -q update" "" + dotest unedit-without-baserev-18 "cat m" "edited in 1" + + cd ../.. + rm -rf 1 + rm -r 2 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + ignore) # On Windows, we can't check out CVSROOT, because the case # insensitivity means that this conflicts with cvsroot. @@ -10074,6 +10481,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" # cvsignore: ignore # verifymsg: info # cvswrappers: mwrap + # taginfo: taginfo # config: config # On Windows, we can't check out CVSROOT, because the case @@ -10207,6 +10615,9 @@ done ${PROG} [a-z]*: Rebuilding administrative file database" cd .. + dotest_fail info-cleanup-0 "${testcvs} -n release -d CVSROOT" \ +"${PROG} \[release aborted\]: cannot run command ${DOTSTAR}" + if echo "yes" | ${testcvs} release -d CVSROOT >>${LOGFILE} ; then pass info-cleanup else @@ -10222,6 +10633,112 @@ ${PROG} [a-z]*: Rebuilding administrative file database" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + taginfo) + # Tests of the CVSROOT/taginfo file. See the comment at the + # "info" tests for a full list of administrative file tests. + + # Tests to add: + # -F to move + # -d + # rtag + + mkdir 1; cd 1 + dotest taginfo-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}" + cd CVSROOT + cat >${TESTDIR}/1/loggit <>${TESTDIR}/1/taglog + exit 0 +fi +EOF + chmod +x ${TESTDIR}/1/loggit + echo "ALL ${TESTDIR}/1/loggit" >taginfo + dotest taginfo-2 "${testcvs} -q ci -m check-in-taginfo" \ +"Checking in taginfo; +${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo +new revision: 1\.2; previous revision: 1\.1 +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd .. + + # taginfo-3 used to rely on the top-level CVS directory + # being created to add "first-dir" to the repository. Since + # that won't happen anymore, we create the directory in the + # repository. + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest taginfo-3 "${testcvs} -q co first-dir" '' + + cd first-dir + echo first >file1 + dotest taginfo-4 "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest taginfo-5 "${testcvs} -q ci -m add-it" \ +"RCS file: ${TESTDIR}/cvsroot/first-dir/file1,v +done +Checking in file1; +${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done" + dotest taginfo-6 "${testcvs} -q tag tag1" "T file1" + dotest taginfo-7 "${testcvs} -q tag -b br" "T file1" + dotest taginfo-8 "${testcvs} -q update -r br" "" + echo add text on branch >>file1 + dotest taginfo-9 "${testcvs} -q ci -m modify-on-br" \ +"Checking in file1; +${TESTDIR}/cvsroot/first-dir/file1,v <-- file1 +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done" + dotest taginfo-10 "${testcvs} -q tag -F -c brtag" "T file1" + + dotest_fail taginfo-11 "${testcvs} -q tag rejectme" \ +"${PROG} [a-z]*: Pre-tag check failed +${PROG} \[[a-z]* aborted\]: correct the above errors first!" + + # When we are using taginfo to allow/disallow, it would be + # convenient to be able to use "cvs -n tag" to test whether + # the allow/disallow functionality is working as expected. + dotest taginfo-12 "${testcvs} -nq tag rejectme" "T file1" + + # But when taginfo is used for logging, it is a pain for -n + # to call taginfo, since taginfo doesn't know whether -n was + # specified or not. + dotest taginfo-13 "${testcvs} -nq tag would-be-tag" "T file1" + + # The "br" example should be passing 1.1.2 or 1.1.0.2. + # But it turns out that is very hard to implement, since + # check_fileproc doesn't know what branch number it will + # get. Probably the whole thing should be re-architected + # so that taginfo only allows/denies tagging, and a new + # hook, which is done from tag_fileproc, does logging. + # That would solve this, some more subtle races, and also + # the fact that it is nice for users to run "-n tag foo" to + # see whether a tag would be allowed. Failing that, + # I suppose passing "1.1.branch" or "branch" for "br" + # would be an improvement. + dotest taginfo-examine "cat ${TESTDIR}/1/taglog" \ +"tag1 add ${TESTDIR}/cvsroot/first-dir file1 1.1 +br add ${TESTDIR}/cvsroot/first-dir file1 1.1 +brtag mov ${TESTDIR}/cvsroot/first-dir file1 1.1.2.1" + + cd .. + cd CVSROOT + echo '# Keep life simple' > taginfo + dotest taginfo-cleanup-1 "${testcvs} -q ci -m check-in-taginfo" \ +"Checking in taginfo; +${TESTDIR}/cvsroot/CVSROOT/taginfo,v <-- taginfo +new revision: 1\.3; previous revision: 1\.2 +done +${PROG} [a-z]*: Rebuilding administrative file database" + cd .. + cd .. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + config) # Tests of the CVSROOT/config file. See the comment at the # "info" tests for a full list of administrative file tests. @@ -10234,10 +10751,12 @@ ${PROG} [a-z]*: Rebuilding administrative file database" dotest config-1 "${testcvs} -q co CVSROOT" "U CVSROOT/${DOTSTAR}" cd CVSROOT echo 'bogus line' >config + # We can't rely on specific revisions, since other tests + # might need to modify CVSROOT/config dotest config-3 "${testcvs} -q ci -m change-to-bogus-line" \ "Checking in config; ${TESTDIR}/cvsroot/CVSROOT/config,v <-- config -new revision: 1\.2; previous revision: 1\.1 +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done ${PROG} [a-z]*: Rebuilding administrative file database" echo 'BogusOption=yes' >config @@ -10245,7 +10764,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" "${PROG} [a-z]*: syntax error in ${TESTDIR}/cvsroot/CVSROOT/config: line 'bogus line' is missing '=' Checking in config; ${TESTDIR}/cvsroot/CVSROOT/config,v <-- config -new revision: 1\.3; previous revision: 1\.2 +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done ${PROG} [a-z]*: Rebuilding administrative file database" echo '# No config is a good config' > config @@ -10253,7 +10772,7 @@ ${PROG} [a-z]*: Rebuilding administrative file database" "${PROG} [a-z]*: ${TESTDIR}/cvsroot/CVSROOT/config: unrecognized keyword 'BogusOption' Checking in config; ${TESTDIR}/cvsroot/CVSROOT/config,v <-- config -new revision: 1\.4; previous revision: 1\.3 +new revision: 1\.[0-9]*; previous revision: 1\.[0-9]* done ${PROG} [a-z]*: Rebuilding administrative file database" dotest config-6 "${testcvs} -q update" '' @@ -10303,7 +10822,7 @@ done" # Remove the tag. This will leave the tag string in the # expansion of the Name keyword. - dotest serverpatch-6 "${testcvs} -q update -A" '' + dotest serverpatch-6 "${testcvs} -q update -A first-dir" '' # Modify and check in the first copy. cd ../1/first-dir @@ -10842,12 +11361,61 @@ done" 1\.2 (${username} *[0-9a-zA-Z-]*): line 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): and some 1\.2\.2\.1 (${username} *[0-9a-zA-Z-]*): branched content" + dotest_fail ann-14 "${testcvs} ann -r bill-clintons-chastity file1" \ +"${PROG} \[[a-z]* aborted\]: no such tag bill-clintons-chastity" cd ../.. rm -r 1 rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + ann-id) + # Demonstrate that cvs-1.9.28.1 improperly expands rcs keywords in + # the output of `cvs annotate' -- it uses values from the previous + # delta. In this case, `1.1' instead of `1.2', even though it puts + # the proper version number on the prefix to each line of output. + mkdir 1; cd 1 + dotest ann-id-1 "${testcvs} -q co -l ." '' + module=x + mkdir $module + dotest ann-id-2 "${testcvs} add $module" \ +"Directory ${TESTDIR}/cvsroot/$module added to the repository" + cd $module + + file=m + echo '$Id''$' > $file + + dotest ann-id-3 "$testcvs add $file" \ +"${PROG} [a-z]*: scheduling file .$file. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest ann-id-4 "$testcvs -Q ci -m . $file" \ +"RCS file: ${TESTDIR}/cvsroot/$module/$file,v +done +Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +initial revision: 1\.1 +done" + + echo line2 >> $file + dotest ann-id-5 "$testcvs -Q ci -m . $file" \ +"Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +new revision: 1\.2; previous revision: 1\.1 +done" + + # The version number after $file,v should be `1.2'. + # 1.9.28.1 puts `1.1' there. + dotest ann-id-6 "$testcvs -Q ann $file" \ +"Annotations for $file +\*\*\*\*\*\*\*\*\*\*\*\*\*\*\* +1.2 ($username *[0-9a-zA-Z-]*): "'\$'"Id: $file,v 1.1 [0-9/]* [0-9:]* $username Exp "'\$'" +1.2 ($username *[0-9a-zA-Z-]*): line2" + + cd ../.. + rm -rf 1 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + crerepos) # Various tests relating to creating repositories, operating # on repositories created with old versions of CVS, etc. @@ -10889,7 +11457,7 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then else fail crerepos-5 fi - rm -r CVS + rm -rf CVS cd .. # The directory tmp should be empty dotest crerepos-6 "rmdir tmp" '' @@ -10993,7 +11561,7 @@ U first-dir/file1" "${PROG} [a-z]*: Updating crerepos-dir U crerepos-dir/cfile" - if test x`cat CVS/Repository` = x.; then + if test x`cat crerepos-dir/CVS/Repository` = xcrerepos-dir; then # RELATIVE_REPOS # Fatal error so that we don't go traipsing through the # directories which happen to have the same names from the @@ -11259,6 +11827,8 @@ start revision@ a1 1 branch revision@ EOF + # ' Match the single quote in above here doc -- for font-lock mode. + # First test the default branch. dotest rcs-5 "${testcvs} -q update file2" "U file2" dotest rcs-6 "cat file2" "branch revision" @@ -11534,6 +12104,8 @@ Tonight we're going to party like it's a certain year@ a1 1 Need to start somewhere@ EOF + # ' Match the 3rd single quote in the here doc -- for font-lock mode. + dotest rcs2-1 "${testcvs} -q co first-dir" 'U first-dir/file1' cd first-dir @@ -11844,10 +12416,11 @@ done" # OK, here is the test. The idea is to see what # No_Difference does if it can't open the file. - chmod a= aa # If we don't change the st_mtime, CVS doesn't even try to read - # the file. + # the file. Note that some versions of "touch" require that we + # do this while the file is still writable. touch aa + chmod a= aa dotest_fail modes2-6 "${testcvs} -q update -r 1.1 aa" \ "${PROG} \[update aborted\]: cannot open file aa for comparing: Permission denied" \ "${PROG} \[update aborted\]: reading aa: Permission denied" @@ -12989,6 +13562,91 @@ done" rm -rf ${CVSROOT_DIRNAME}/first-dir ;; + tag8k) + # In cvs-1.9.27, there is a bug that can cause an abort. + # It happens when you commit a change to a ,v file that has + # just the right amount of tag/branch info to align one of the + # semicolons in the branch info to be on a 8k-byte boundary. + # The result: rcsbuf_getkey got an abort. This failure doesn't + # corrupt the ,v file -- that would be really serious. But it + # does leave stale write locks that have to be removed manually. + + mkdir 1 + cd 1 + + module=x + + : > junk + dotest tag8k-1 "$testcvs -Q import -m . $module X Y" '' + dotest tag8k-2 "$testcvs -Q co $module" '' + cd $module + + file=m + : > $file + dotest tag8k-3 "$testcvs add $file" \ +"${PROG} [a-z]*: scheduling file .$file. for addition +${PROG} [a-z]*: use .${PROG} commit. to add this file permanently" + dotest tag8k-4 "$testcvs -Q ci -m . $file" \ +"RCS file: ${TESTDIR}/cvsroot/$module/$file,v +done +Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +initial revision: 1\.1 +done" + + # It seems there have to be at least two versions. + echo a > $file + dotest tag8k-5 "$testcvs -Q ci -m . $file" \ +"Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +new revision: 1\.2; previous revision: 1\.1 +done" + + # Add just under 8K worth of tags. + t=TAG--------------------------------------------------------------------- + t=$t$t + t=$t$t$t$t$t + # Now $t is 720 bytes long. + + # Apply some tags with that long prefix. + dotest tag8k-6 "$testcvs -Q tag $t-0 $file" '' + dotest tag8k-7 "$testcvs -Q tag $t-1 $file" '' + dotest tag8k-8 "$testcvs -Q tag $t-2 $file" '' + dotest tag8k-9 "$testcvs -Q tag $t-3 $file" '' + dotest tag8k-10 "$testcvs -Q tag $t-4 $file" '' + dotest tag8k-11 "$testcvs -Q tag $t-5 $file" '' + dotest tag8k-12 "$testcvs -Q tag $t-6 $file" '' + dotest tag8k-13 "$testcvs -Q tag $t-7 $file" '' + dotest tag8k-14 "$testcvs -Q tag $t-8 $file" '' + dotest tag8k-15 "$testcvs -Q tag $t-9 $file" '' + dotest tag8k-16 "$testcvs -Q tag $t-a $file" '' + + # Determine the length of the author value. + name=`sed -n 's/.*; author \([^;]*\);.*/\1/p' ${TESTDIR}/cvsroot/$module/$file,v|head -1` + name_len=`expr length $name` + + # CAREFUL: this will lose if $name is longer than 16. + # Then, form a string of length 16 - $name_len. + add_len=`expr 16 - $name_len` + suffix=`expr substr 1234567890123456 1 $add_len` + + # Add a final tag with length chosen so that it will push the + # offset of the `;' in the 2nd occurrence of `;\tauthor' in the + # ,v file to exactly 8192. + dotest tag8k-17 "$testcvs -Q tag "x8bytes-$suffix" $file" '' + + # This commit would fail with 1.9.27. + echo a >> $file + dotest tag8k-18 "$testcvs -Q ci -m . $file" \ +"Checking in $file; +${TESTDIR}/cvsroot/$module/$file,v <-- $file +new revision: 1\.3; previous revision: 1\.2 +done" + cd ../.. + rm -r 1 + rm -rf ${CVSROOT_DIRNAME}/$module + ;; + admin) # More "cvs admin" tests. @@ -13000,6 +13658,7 @@ done" # For -o, see: # admin-22-o1 through admin-23 (various cases not involving ::) # binfiles2-o* (:rev, rev on trunk; rev:, deleting entire branch) + # basicb-o* (attempt to delete all revisions) # basica-o1 through basica-o3 (basic :: usage) # head-o1 (::branch, where this deletes a revision or is noop) # branches-o1 (::branch, similar, with different branch topology) @@ -13940,12 +14599,27 @@ done" "Checking in a-lock; ${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock new revision: 1\.2; previous revision: 1\.1 +done" + + # Now test for a bug involving branches and locks + sed -e 's/locks; strict;/locks fred:1.2; strict;/' ${TESTDIR}/cvsroot/first-dir/a-lock,v > a-lock,v + chmod 644 ${TESTDIR}/cvsroot/first-dir/a-lock,v + dotest reserved-16 \ +"mv a-lock,v ${TESTDIR}/cvsroot/first-dir/a-lock,v" "" + chmod 444 ${TESTDIR}/cvsroot/first-dir/a-lock,v + dotest reserved-17 "${testcvs} -q tag -b br a-lock" "T a-lock" + dotest reserved-18 "${testcvs} -q update -r br a-lock" "" + echo edit it >>a-lock + dotest reserved-19 "${testcvs} -q ci -m modify a-lock" \ +"Checking in a-lock; +${TESTDIR}/cvsroot/first-dir/a-lock,v <-- a-lock +new revision: 1\.2\.2\.1; previous revision: 1\.2 done" # undo commitinfo changes cd ../CVSROOT echo '# vanilla commitinfo' >commitinfo - dotest reserved-16 "${testcvs} -q ci -m back commitinfo" \ + dotest reserved-cleanup-1 "${testcvs} -q ci -m back commitinfo" \ "Checking in commitinfo; ${TESTDIR}/cvsroot/CVSROOT/commitinfo,v <-- commitinfo new revision: 1\.3; previous revision: 1\.2 -- cgit v1.2.3