From: tholo Date: Tue, 18 Mar 1997 01:54:58 +0000 (+0000) Subject: New release from Cyclic Software X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=780d15dfff9934c79e6717020f46114c9b7d7d04;p=openbsd New release from Cyclic Software --- diff --git a/gnu/usr.bin/cvs/.cvsignore b/gnu/usr.bin/cvs/.cvsignore index 98c718d489f..0412a30180a 100644 --- a/gnu/usr.bin/cvs/.cvsignore +++ b/gnu/usr.bin/cvs/.cvsignore @@ -8,6 +8,8 @@ config.status cvs-*.spec cvs-*.tar.gz cvsinit +cvsnt.mdp +cvsnt.ncb cvsnt.vcp cvsnt4.mak cvsnt4.mdp diff --git a/gnu/usr.bin/cvs/BUGS b/gnu/usr.bin/cvs/BUGS index 7d1f77fc11a..3c4a0d612ef 100644 --- a/gnu/usr.bin/cvs/BUGS +++ b/gnu/usr.bin/cvs/BUGS @@ -63,6 +63,25 @@ file's description. however. +* The following bug was reported against CVS 1.9: + + Create a module named test with a file named test in it. + + cactus:sfavor> cvs get test + cvs checkout: Updating test + U test/test + cactus:sfavor> cd test + cactus:sfavor> cvs get test + cvs checkout: cannot chdir to test: Not a directory + cvs checkout: ignoring module test + Exit 1 + cactus:sfavor> cvs update + cvs update: Updating . + rcs.c:2139: failed assertion `rev == NULL || isdigit (*rev)' + Abort (core dumped) + Exit 134 + + * pcl-cvs doesn't like it when you try to check in a file which isn't up-to-date. The messages produced by the server perhaps don't match what pcl-cvs is looking for. diff --git a/gnu/usr.bin/cvs/ChangeLog b/gnu/usr.bin/cvs/ChangeLog index d8e23da53e7..3c4bfc72579 100644 --- a/gnu/usr.bin/cvs/ChangeLog +++ b/gnu/usr.bin/cvs/ChangeLog @@ -1,3 +1,144 @@ +13 Mar 1997 Jim Kingdon + + * cvsnt.mak: Recent changes have added a number of getline.h + dependencies. + +Thu Mar 13 08:43:04 1997 Jim Kingdon + + * configure.in (AC_C_CROSS): Add comment about obsolescence + thereof. + * config.h.in, configure: Regenerated with autoconf 2.10. + +Thu Mar 13 05:50:29 1997 Philippe De Muyter + + Here are the fixes I needed to make to cvs-1.9 to get it to + compile and successfully pass 'make check' on m68k-motorola-sysv. + * lib/getwd.c (getwd): Added declaration for getcwd(). + * lib/wait.h (WIFSTOPPED et al.): Macro defined if not defined. + * lib/waitpid.c (waitpid): Use wait, not wait3, if !HAVE_WAIT3. + * src/admin.c (admin): Added declaration for getgrnam(). + * src/server.c (fcntl.h): Do not include file twice. Already included + from system.h from cvs.h. + * src/sanity.sh (imported-f*): Renamed from imported-file*, that were + too long for sysv. + * configure.in (wait3): Added to AC_CHECK_FUNCS list. + +Wed Mar 12 14:32:50 1997 Jim Kingdon + + * BUGS: Add "failed assertion `rev == NULL || isdigit (*rev)'" bug. + + * TODO: Remove item 135; this is solved by %v and %V in loginfo. + + * configure.in (AC_CHECK_FUNCS): Don't check for setvbuf; + HAVE_SETVBUF is no longer used. + * config.h, configure: Regenerated with autoconf 2.10. + + * TODO: Add item 184, concerning MD5-based password hash. + Remove item 14, concerning "pathname stripper". I think that was + a reference to the late unlamented strip_path. + +Sat Mar 8 21:22:54 1997 Jim Kingdon + + * INSTALL: NT 4.0 is client and local (like other NT 3.51 & Win95). + +Fri Mar 7 16:51:13 1997 Jim Kingdon + + * INSTALL: Just talked to a NT 4.0 user; add it to the list. + +Sun Mar 2 22:01:23 1997 Jim Kingdon + + * NEWS: Add item about "cvs admin" vs. "cvs admin .". + + * TODO: Remove item #169. It doesn't really explain what an + "archive library" is or in general what the feature they discuss is + supposed to do--I mean, CVS _can_ be used to store .o's, if + that is what they are talking about. + + * TODO: Add item #183, about greater documentation/visiblity for + Entries.Static and CVS/Tag. + + * INSTALL (footnote 5): Add note about how /usr/tmp vs. /var/tmp + shouldn't be an issue anymore + +Thu Feb 20 13:53:19 1997 Jim Kingdon + + * INSTALL: Update Cray entry per mail from John Bowman + + + * configure.in: Add comments about autoconf version. + +Mon Feb 17 09:55:35 1997 Jim Kingdon + + * configure: Regenerated. + +Sat Feb 15 15:37:39 1997 Jim Kingdon + + * configure.in (AC_OUTPUT): Add windows-NT/SCC/Makefile. + +Sun Dec 15 13:12:30 1996 Michael Douglass + and Jim Kingdon + + * NEWS: Mention "cvs logout". + +1997-02-12 Jim Kingdon + + * cvsnt.mak: Visual C++ seems to want to make some cosmetic + changes (reordering *.obj files), perhaps prodded by "Save + All". I hope that putting in these changes will make it + happy... + +1997-02-11 Jim Kingdon + + * cvsnt.mak: Replace with version from Visual C++ 4.0. If someone + wants the 2.x one back, I suppose we can put them side by side, + but I won't be able to update the 2.x one any more as I won't be + having access to 2.x. + +Tue Feb 11 16:43:43 1997 Jim Kingdon + + * .cvsignore: Add cvsnt.mdp and cvsnt.ncb. They seem to be files + created by Visual C++ 4.x which were not created by Visual C++ 2.x. + +Tue Feb 4 11:42:30 1997 Jim Kingdon + + * INSTALL: OS/2 port is client only. + + * Rename devel-cvs (which had only been in the repository, not the + distribution) to DEVEL-CVS. Add "Charter for the devel-cvs + mailing list:" heading, "CVS Development Policies" title, and + one-sentence introduction (editorial changes, not run by + devel-cvs). Revise paragraph concerning membership in the list to + reflect policy change to make read-only membership different from + the ability to send to the list (the new wording was approved by + devel-cvs, as was the rename and including it in the + distribution). + * Makefile.in (DISTFILES): Add DEVEL-CVS. + * HACKING: Add "Mailing lists" section. + +Tue Jan 28 10:41:05 1997 Jim Kingdon + + * configure.in: Remove AC_CHECK_SIZEOF; no longer needed with + lib/md5.c changes. + * acconfig.h: Add HAVE_CONNECT. This is needed so that autoheader + 2.10 works; I think this has been broken since 2 Dec 1996. + * config.h.in: Regenerated with autoheader 2.10. + * configure: Regenerated with autoconf 2.10. + + * HACKING: Revise criterion for whether something goes in NEWS + again (now "user-visible change worth mentioning"--the language + from the GNU coding standards). + +Mon Jan 27 23:05:24 1997 Jim Kingdon + + * HACKING: Criterion for whether something goes in NEWS is not + whether it is user-visible; it is whether it is a bugfix or a + feature. + +Tue Jan 21 10:21:53 1997 Jim Kingdon + + * INSTALL: Warn people against pre-5.x RCS; describe how to find + out what version of RCS you have. + Wed Jan 8 14:50:47 1997 Jim Kingdon * Makefile.in, NEWS, README, TODO, configure.in: Remove CVSid; we diff --git a/gnu/usr.bin/cvs/DEVEL-CVS b/gnu/usr.bin/cvs/DEVEL-CVS new file mode 100644 index 00000000000..defbba51032 --- /dev/null +++ b/gnu/usr.bin/cvs/DEVEL-CVS @@ -0,0 +1,54 @@ + CVS Development Policies + +This file, DEVEL-CVS, contains the policies by which the CVS +development group operates. Also see the HACKING file. + +---------------------------------------------------------------------- +Charter for the devel-cvs mailing list: + +The CVS Developers' List exists to help people +with access to the CVS source repository co-ordinate changes, make +releases, and administer the repository. + +Everyone who has been given checkin access to the repository for the +CVS sources should read devel-cvs. Only those with checkin access may +send messages to the list. + +The devel-cvs list may be used to discuss: +- administrivia regarding the CVS source repository and release + process, and +- changes and features intended for inclusion in the official CVS + release (either source code or documentation), which someone plans + to implement, or has implemented. + +The devel-cvs list should not be used to discuss: +- changes or features to packages other than the CVS release + (e.g., related packages like tkCVS, RAD/CVS, or other groups' + distributions of CVS, like RCVS, etc.), +- changes which nobody has offered to implement, or +- the philosophy of CVS (as opposed to a specific change to CVS). +These topics should either go on info-cvs, or have a new mailing list +created for them. + +The topic restrictions in this charter do not reflect the development +group's future plans for CVS; rather, they reflect a topic +classification which the group finds helpful. + +---------------------------------------------------------------------- +Policies regarding the CVS source repository: + +By checking items into the repository, developers agree to permit +distribution of such items under the terms of the GNU Public License. + +---------------------------------------------------------------------- +Procedure for dealing with people who want to be developers: + +People who want checkin access (checkout-only access is available primarily +via snapshots, for technical reasons) are first requested to send +patches and have them reviewed by a developer. If they submit some +good ones (preferably over a period of time, to demonstrate sustained +interest), then one of the developers can ask the devel-cvs mailing +list whether it is OK to make this person a developer (after first +sending the prospective developer a copy of this file and then having +the prospective developer say they want to be a developer). If there +are no objections, an account will be created. diff --git a/gnu/usr.bin/cvs/HACKING b/gnu/usr.bin/cvs/HACKING index 6ccd4f9f4b4..89f7399e0e0 100644 --- a/gnu/usr.bin/cvs/HACKING +++ b/gnu/usr.bin/cvs/HACKING @@ -133,7 +133,8 @@ the code are appropriate for this, but not always)--patches should not be checked in unless there is some reason for them, and the description may be helpful if there is a better way to solve the problem. In addition to the ChangeLog entry, there should be a change -to the NEWS file and cvs.texinfo in the case of a user-visible change. +to the NEWS file and cvs.texinfo, if the change is a user-visible +change worth mentioning. It is nice to have a test case (see TESTS), especially for fixes which involve subtle behaviors or twisted sections of the code. @@ -162,3 +163,30 @@ even hinted at, really) until the feature freeze which is approximately 2 weeks before the final release (at this time test releases start appearing and are announced on info-cvs). This is intentional, to avoid a last minute rush to get new features in. + +* Mailing lists + +Anyone can add themselves to the following mailing lists: + + devel-cvs. Unless you are accepted as a CVS developer as + described in the DEVEL-CVS file, you will only be able to + read this list, not send to it. The charter of the list is + also in DEVEL-CVS. + commit-cvs. The only messages sent to this list are sent + automatically, via the CVS `loginfo' mechanism, when someone + checks something in to the master CVS repository. + test-results. The only messages sent to this list are sent + automatically, daily, by a script which runs "make check" + and "make remotecheck" on the master CVS sources. +To subscribe to devel-cvs, commit-cvs, or test-results, send +a message to "majordomo@cyclic.com" whose body consists of +"subscribe ", where is devel-cvs, commit-cvs or +test-results. + +One other list related to CVS development is bug-cvs. This is the +list which users are requested to send bug reports to. Anyone can +subscribe; to do so send mail to bug-cvs-request@prep.ai.mit.edu. + +Other CVS discussions take place on the info-cvs mailing list +(send mail to info-cvs-request@prep.ai.mit.edu to subscribe) or on +the newsgroup comp.software.config-mgmt. diff --git a/gnu/usr.bin/cvs/INSTALL b/gnu/usr.bin/cvs/INSTALL index 00ff5604927..253e7b17081 100644 --- a/gnu/usr.bin/cvs/INSTALL +++ b/gnu/usr.bin/cvs/INSTALL @@ -17,7 +17,8 @@ Alpha: DEC Alpha running OSF/1 version 3.2 (1.9) DEC Alpha running VMS 6.2 (1.8.85 client-only) Cray: - J90 running unicos 9 (CVS version unknown; Oct 1996) (footnote 10) + J90 (CVS 970215 snapshot) + T3E (CVS 970215 snapshot) HPPA: HP 9000/710 running HP-UX 8.07A using gcc (about 1.4A2) HPPA running HP-UX 9 (1.8) @@ -39,9 +40,10 @@ i386 family: SCO OpenServer 5 (1.8.86) Lynx 2.3.0 080695 (1.6.86) (footnote 9) Windows NT 3.51 (1.8.86 client; 1.8.3 local) + Windows NT 4.0 (1.9 client and local) Windows 95 (1.8.86 client and local) QNX 4 (1.7 + obvious patches) - OS/2 Version 3 using IBM C/C++ Tools 2.01 (1.8.86 + patches) + OS/2 Version 3 using IBM C/C++ Tools 2.01 (1.8.86 + patches, client) m68k: Sun 3 running SunOS 4.1.1_U1 w/ bundled K&R /usr/5bin/cc (1.8.86+) NextSTEP 3.3p1 (1.8.87) @@ -92,6 +94,9 @@ VAX: You also may have to make sure TIME_WITH_SYS_TIME is undef'ed. (footnote 5) Change /usr/tmp to /var/tmp in src/server.c (2 places) (1.4.93). + (This should no longer be needed; CVS doesn't have /usr/tmp in + src/server.c any more. Has anyone tried a more recent version + on BSDI? If so, please report it so we can update this file). (footnote 6) Build in ucb universe with COFF compiler tools. Put /usr/local/bin first in PATH while doing a configure, make @@ -116,11 +121,6 @@ VAX: So after running configure I had to undef HAVE_DIRENT_H and define HAVE_SYS_DIR_H. -(footnote 10) - remove CLIENT_SUPPORT and SERVER_SUPPORT from config.h - remove md5.o from lib/Makefile - remove "#include "regex.h" from cvs.h - ------------------------------------------------------------------------------- Installation under Unix (if you got a binary distribution from @@ -157,7 +157,11 @@ distribution, then skip to step 5): or a path specified with the -b option). If you don't have RCS, you will need to get it from GNU as well. It is best to get the version 5.7 (or later) version of RCS, available from - prep.ai.mit.edu in the file pub/gnu/rcs-5.7.tar.gz. + prep.ai.mit.edu in the file pub/gnu/rcs-5.7.tar.gz. If you do not + have RCS version 5.x (for example, if you are using the old RCS + shipped with some versions of HPUX), CVS will probably fail to work + entirely. To find out what version of RCS you have, invoke "co -V". + If it fails to print a version number, it is an old version. If you want version control of files with binary data, make sure that the RCS configure script finds GNU diff 1.15 or later and diff --git a/gnu/usr.bin/cvs/NEWS b/gnu/usr.bin/cvs/NEWS index 3d8868ce27f..9d7ee3a790a 100644 --- a/gnu/usr.bin/cvs/NEWS +++ b/gnu/usr.bin/cvs/NEWS @@ -1,5 +1,13 @@ Changes since 1.9: +* "cvs admin [options]" will now recurse. In previous versions of +CVS, it was an error and one needed to specify "cvs admin [options] ." +to recurse. This change brings admin in line with the other CVS +commands. + +* New "logout" command to remove the password for a remote cvs +repository from the cvspass file. + * Read-only repository access is implemented for the password-authenticated server (other access methods are just governed by Unix file permissions, since they require login access to the diff --git a/gnu/usr.bin/cvs/TODO b/gnu/usr.bin/cvs/TODO index de6b13f2021..8a1fd93cc53 100644 --- a/gnu/usr.bin/cvs/TODO +++ b/gnu/usr.bin/cvs/TODO @@ -1,9 +1,3 @@ -14. Pathname stripper, for checkout, as well as for writing the - Repository file. - [[ I have a simple one, but need to make sure to call it at all the - appropriate points ]] - (I'm not sure what this means -kingdon, Jun 1995). - 22. Catch signals for cleanup when "add"ing files. 24. Insist on a log message. @@ -179,10 +173,6 @@ see if an error had occurred. (we should be checking for errors, quite aside from NFS issues -kingdon, June 1996). -135. The email CVS sends with each checkin, should include the version - number of each file it is checking in. - [[ Sort of solved by contrib/log.pl, which does a good job of this ]] - 137. Some sites might want CVS to fsync() the RCS ,v file to protect against nasty hardware errors. There is a slight performance hit with doing so, though, so it should be configurable in the .cvsrc file. @@ -329,13 +319,6 @@ - What all the tags mean in an "import" command - Tags are important; revision numbers are not -169. We are using CVS as the configuration control for a software reuse library. - What we do is do system calls passing the needed arguments. In the next - release, it would be nice to see an option to put cvs .o files into a - archive library with an API. This enhancement would go nicely with the - notion of being able to integrate tools into a large software engineering - environment. - 170. Is there an "info" file that can be invoked when a file is checked out, or updated ? What I want to do is to advise users, particularly novices, of the state of their working source whenever they check something out, as @@ -404,3 +387,13 @@ cut it, because it is inclusive on the bar end. I'm not sure that is ever a useful or logical behavior ("cvs diff -r foo -r bar" is not similarly inclusive), but is compatibility an issue? +183. "cvs status" should report on Entries.Static flag and CVS/Tag (how? +maybe a "cvs status -d" to give directory status?). There should also +be more documentation of how these get set and how/when to re-set them. + +184. Would be nice to implement the FreeBSD MD5-based password hash +algorithm in pserver. For more info see "6.1. DES, MD5, and Crypt" in +the FreeBSD Handbook, and src/lib/libcrypt/crypt.c in the FreeBSD +sources. Certainly in the context of non-unix servers this algorithm +makes more sense than the traditional unix crypt() algorithm, which +suffers from export control problems. diff --git a/gnu/usr.bin/cvs/acconfig.h b/gnu/usr.bin/cvs/acconfig.h index 5e74b1baddc..8bbda6ff3b2 100644 --- a/gnu/usr.bin/cvs/acconfig.h +++ b/gnu/usr.bin/cvs/acconfig.h @@ -13,3 +13,6 @@ /* Define if you want encryption support. */ #undef ENCRYPTION + +/* Define if you have the connect function. */ +#undef HAVE_CONNECT diff --git a/gnu/usr.bin/cvs/config.h.in b/gnu/usr.bin/cvs/config.h.in index 51b305af261..3b0fe39f418 100644 --- a/gnu/usr.bin/cvs/config.h.in +++ b/gnu/usr.bin/cvs/config.h.in @@ -72,12 +72,6 @@ /* Define if you want encryption support. */ #undef ENCRYPTION -/* The number of bytes in a int. */ -#undef SIZEOF_INT - -/* The number of bytes in a long. */ -#undef SIZEOF_LONG - /* Define if you have the connect function. */ #undef HAVE_CONNECT @@ -120,9 +114,6 @@ /* Define if you have the readlink function. */ #undef HAVE_READLINK -/* Define if you have the setvbuf function. */ -#undef HAVE_SETVBUF - /* Define if you have the sigaction function. */ #undef HAVE_SIGACTION @@ -150,6 +141,9 @@ /* Define if you have the vprintf function. */ #undef HAVE_VPRINTF +/* Define if you have the wait3 function. */ +#undef HAVE_WAIT3 + /* Define if you have the header file. */ #undef HAVE_DIRECT_H diff --git a/gnu/usr.bin/cvs/contrib/.cvsignore b/gnu/usr.bin/cvs/contrib/.cvsignore index f2c988ff62a..deb5efc5de7 100644 --- a/gnu/usr.bin/cvs/contrib/.cvsignore +++ b/gnu/usr.bin/cvs/contrib/.cvsignore @@ -2,6 +2,7 @@ Makefile clmerge cln_hist commit_prep +cvs2vendor cvs_acls cvscheck log diff --git a/gnu/usr.bin/cvs/contrib/ChangeLog b/gnu/usr.bin/cvs/contrib/ChangeLog index 70dcf921cab..95507335ca7 100644 --- a/gnu/usr.bin/cvs/contrib/ChangeLog +++ b/gnu/usr.bin/cvs/contrib/ChangeLog @@ -1,3 +1,45 @@ +Thu Feb 20 22:43:45 1997 David J MacKenzie + + * rcs-to-cvs.sh: Put temporary files in /var/tmp or /usr/tmp + whichever one exists. Just call "vi" not "/usr/ucb/vi". + +Mon Feb 17 08:51:37 1997 Greg A. Woods + + * .cvsignore: added 'cvs2vendor' target from Feb. 12 changes. + + * log_accum.pl (build_header): added "Repository:" to the report + header to show the first argument supplied to the script by CVS. + [[this value seems spuriously to be wrong when client is used]] + ($hostdomain): correct order of initialization from the Feb. 12 + changes. + ($modulename): add more commentary about using '-M' to to get a + meaningful string here. + Tweak a few other comments from the Feb. 12 changes. + +Wed Feb 12 10:27:48 1997 Jim Kingdon + + * cln_hist.pl, commit_prep.pl, cvs2vendor.sh, cvs_acls.pl, + cvscheck.man, cvscheck.sh, cvshelp.man, descend.man, descend.sh, + log_accum.pl, mfpipe.pl, rcs-to-cvs.sh, rcs2log.sh, rcs2sccs.sh, + sccs2rcs.csh: Remove $Id; we decided to get rid of these some + time ago. + +Wed Feb 12 00:24:33 1997 Greg A. Woods + + * cvs2vendor.sh: new script. + * README: noted new cvs2vendor script. + * Makefile.in (DISTFILES): added cvs2vendor.sh. + (CONTRIB_PROGS): added cvs2vendor. + + * log_accum.pl (show_wd): new variable, initialized to 0. + - set $show_wd if '-w' option found while parsing @ARGV. + - don't add 'In directory' line to report header unless $show_wd + is set. + (domainname): prepend a leading '.' if none there so that + concatenation with $hostname works (those with a FQDN hostname + *and* a domainname still lose). + (mail_notification): don't set a "From:" header -- the mailer will. + Wed Jan 8 14:48:58 1997 Jim Kingdon * Makefile.in, README, log.pl: Remove CVSid; we decided to get rid diff --git a/gnu/usr.bin/cvs/contrib/README b/gnu/usr.bin/cvs/contrib/README index 81caec5f571..900b0c75f74 100644 --- a/gnu/usr.bin/cvs/contrib/README +++ b/gnu/usr.bin/cvs/contrib/README @@ -105,3 +105,7 @@ An attempt at a table of Contents for this directory: by hostname, then runs a subprocess whose input/output is redirected through the port. Contributed by Benjamin J. Lee + cvs2vendor A shell script to move changes from a repository + that was started without a vendor branch to one + that has a vendor branch. + Contributed by Greg A. Woods diff --git a/gnu/usr.bin/cvs/contrib/cln_hist.pl b/gnu/usr.bin/cvs/contrib/cln_hist.pl index 3313246287f..19a0b815b78 100644 --- a/gnu/usr.bin/cvs/contrib/cln_hist.pl +++ b/gnu/usr.bin/cvs/contrib/cln_hist.pl @@ -1,7 +1,6 @@ #! xPERL_PATHx # -*-Perl-*- # -# $Id: cln_hist.pl,v 1.1.1.1 1995/12/19 09:21:39 deraadt Exp $ # Contributed by David G. Grubbs # # Clean up the history file. 10 Record types: MAR OFT WUCG diff --git a/gnu/usr.bin/cvs/contrib/commit_prep.pl b/gnu/usr.bin/cvs/contrib/commit_prep.pl index 1434c2ade86..bf0ce92f22f 100644 --- a/gnu/usr.bin/cvs/contrib/commit_prep.pl +++ b/gnu/usr.bin/cvs/contrib/commit_prep.pl @@ -1,7 +1,6 @@ #! xPERL_PATHx # -*-Perl-*- # -#ident "@(#)cvs/contrib:$Name: $:$Id: commit_prep.pl,v 1.1.1.1 1995/12/19 09:21:39 deraadt Exp $" # # Perl filter to handle pre-commit checking of files. This program # records the last directory where commits will be taking place for diff --git a/gnu/usr.bin/cvs/contrib/cvs2vendor.sh b/gnu/usr.bin/cvs/contrib/cvs2vendor.sh new file mode 100644 index 00000000000..234f4d95e5d --- /dev/null +++ b/gnu/usr.bin/cvs/contrib/cvs2vendor.sh @@ -0,0 +1,142 @@ +#! /bin/sh +# +# cvs2vendor - move revsisions from files in A to files in B +# +# The primary reason for this script is to move deltas from a +# non-vendor branched repository onto a fresh vendor branched one, +# skipping the initial checkin in assumption that it is the same in +# both repositories. This way you can take a project that was moved +# into CVS without the benefit of the vendor branch and for all +# intents and purposes add the vendor branch underneath the existing +# deltas. +# +# This script is also a decent example of repository maintenance using +# raw RCS commands (if I do say so myself! ;-). +# +# Tags are preserved. +# +# The timestamp of the initial vendor branch revision will be adjusted +# to be the same as the 1.1 revision of each source file. +# +# Extra branches in the source directory will cause breakage. +# +# Intermediate files are created in the current working directory +# where this script is started. +# +# Written by Greg A. Woods , based on rcs2sccs +# (retains some of the rlog parsing from it). +# +# The copyright is in the Public Domain. +# + +if [ $# -ne 2 ]; then + echo USAGE: $0 srcdir dstdir + exit 2 +fi +tsrcdir=$1 +tdstdir=$2 + +revfile=/tmp/cvs2vendor_$$_rev +rm -f $revfile + +commentfile=/tmp/cvs2vendor_$$_comment +rm -f $commentfile + +srcdirs=`cd $tsrcdir && find . -type d -print | sed 's~^\.[/]*~~'` + +# the "" is a trick to get $tsrcdir itself without resorting to '.' +for ldir in "" $srcdirs; do + + srcdir=$tsrcdir/$ldir + dstdir=$tdstdir/$ldir + + # Loop over every RCS file in srcdir + # + for vfile in $srcdir/*,v; do + # get rid of the ",v" at the end of the name + file=`echo $vfile | sed -e 's/,v$//'` + bfile=`basename $file` + + if [ ! -d $dstdir ]; then + echo "making locally added directory $dstdir" + mkdir -p $dstdir + fi + if [ ! -f $dstdir/$bfile,v ]; then + echo "copying locally added file $dstdir/$bfile ..." + cp $vfile $dstdir + continue; + fi + + # work on each rev of that file in ascending order + rlog $file | grep "^revision [0-9][0-9]*\." | awk '{print $2}' | sed -e 's/\./ /g' | sort -n -u +0 +1 +2 +3 +4 +5 +6 +7 +8 | sed -e 's/ /./g' > $revfile + + for rev in `cat $revfile`; do + + case "$rev" in + 1.1) + newdate=`rlog -r$rev $file | grep "^date: " | awk '{printf("%s.%s\n",$2,$3); exit}' | sed -e 's~/~.~g' -e 's/:/./g' -e 's/;//' -e 's/^19//'` + olddate=`rlog -r1.1.1.1 $dstdir/$bfile | grep "^date: " | awk '{printf("%s.%s\n",$2,$3); exit}' | sed -e 's~/~.~g' -e 's/:/./g' -e 's/;//' -e 's/^19//'` + sed "s/$olddate/$newdate/" < $dstdir/$bfile,v > $dstdir/$bfile.x + mv -f $dstdir/$bfile.x $dstdir/$bfile,v + chmod -w $dstdir/$bfile,v + symname=`rlog -h $file | sed -e '1,/^symbolic names:/d' -e 's/[ ]*//g' | awk -F: '$2 == "'"$rev"'" {printf("-n%s:1.1.1.1\n",$1)}'` + if [ -n "$symname" ]; then + echo "tagging $file with $symname ..." + rcs $symname $dstdir/$bfile,v + if [ $? != 0 ]; then + echo ERROR - rcs $symname $dstdir/$bfile,v + exit 1 + fi + fi + continue # skip first rev.... + ;; + esac + + # get a lock on the destination local branch tip revision + co -r1 -l $dstdir/$bfile + if [ $? != 0 ]; then + echo ERROR - co -r1 -l $dstdir/$bfile + exit 1 + fi + rm -f $dstdir/$bfile + + # get file into current dir and get stats + date=`rlog -r$rev $file | grep "^date: " | awk '{printf("%s %s\n",$2,$3); exit}' | sed -e 's/;//'` + author=`rlog -r$rev $file | grep "^date: " | awk '{print $5; exit}' | sed -e 's/;//'` + + symname=`rlog -h $file | sed -e '1,/^symbolic names:/d' -e 's/[ ]*//g' | awk -F: '$2 == "'"$rev"'" {printf("-n%s\n",$1)}'` + + rlog -r$rev $file | sed -e '/^branches: /d' -e '1,/^date: /d' -e '/^===========/d' | awk '{if ((total += length($0) + 1) < 510) print $0}' > $commentfile + + echo "==> file $file, rev=$rev, date=$date, author=$author $symname" + + co -p -r$rev $file > $bfile + if [ $? != 0 ]; then + echo ERROR - co -p -r$rev $file + exit 1 + fi + + # check file into vendor repository... + ci -f -m"`cat $commentfile`" -d"$date" $symname -w"$author" $bfile $dstdir/$bfile,v + if [ $? != 0 ]; then + echo ERROR - ci -f -m"`cat $commentfile`" -d"$date" $symname -w"$author" $bfile $dstdir/$bfile,v + exit 1 + fi + rm -f $bfile + + # set the default branch to the trunk... + # XXX really only need to do this once.... + rcs -b1 $dstdir/$bfile + if [ $? != 0 ]; then + echo ERROR - rcs -b1 $dstdir/$bfile + exit 1 + fi + done + done +done + +echo cleaning up... +rm -f $commentfile +echo " Conversion Completed Successfully" + +exit 0 diff --git a/gnu/usr.bin/cvs/contrib/cvs_acls.pl b/gnu/usr.bin/cvs/contrib/cvs_acls.pl index a5aeaa522cd..c1d64e94877 100644 --- a/gnu/usr.bin/cvs/contrib/cvs_acls.pl +++ b/gnu/usr.bin/cvs/contrib/cvs_acls.pl @@ -1,8 +1,6 @@ #! xPERL_PATHx # -*-Perl-*- # -# $Id: cvs_acls.pl,v 1.1.1.1 1995/12/19 09:21:39 deraadt Exp $ -# # Access control lists for CVS. dgg@ksr.com (David G. Grubbs) # # CVS "commitinfo" for matching repository names, running the program it finds diff --git a/gnu/usr.bin/cvs/contrib/cvscheck.man b/gnu/usr.bin/cvs/contrib/cvscheck.man index a9537cb87de..2b90b49a14c 100644 --- a/gnu/usr.bin/cvs/contrib/cvscheck.man +++ b/gnu/usr.bin/cvs/contrib/cvscheck.man @@ -1,4 +1,3 @@ -.\" $Id: cvscheck.man,v 1.1.1.1 1995/12/19 09:21:39 deraadt Exp $ .\" Contributed by Lowell Skoog .TH CVSCHECK LOCAL "4 March 1991" FLUKE .SH NAME diff --git a/gnu/usr.bin/cvs/contrib/cvscheck.sh b/gnu/usr.bin/cvs/contrib/cvscheck.sh index bc33d7972e2..f711b430e0f 100644 --- a/gnu/usr.bin/cvs/contrib/cvscheck.sh +++ b/gnu/usr.bin/cvs/contrib/cvscheck.sh @@ -1,5 +1,4 @@ #! /bin/sh -# $Id: cvscheck.sh,v 1.1.1.1 1995/12/19 09:21:39 deraadt Exp $ # # cvscheck - identify files added, changed, or removed # in CVS working directory diff --git a/gnu/usr.bin/cvs/contrib/cvshelp.man b/gnu/usr.bin/cvs/contrib/cvshelp.man index cf6ccb78210..b166af69528 100644 --- a/gnu/usr.bin/cvs/contrib/cvshelp.man +++ b/gnu/usr.bin/cvs/contrib/cvshelp.man @@ -1,4 +1,3 @@ -.\" $Id: cvshelp.man,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ .\" Contributed by Lowell Skoog .\" Full space in nroff; half space in troff .de SP diff --git a/gnu/usr.bin/cvs/contrib/descend.man b/gnu/usr.bin/cvs/contrib/descend.man index ef5b2bbdc61..0434ca8b43c 100644 --- a/gnu/usr.bin/cvs/contrib/descend.man +++ b/gnu/usr.bin/cvs/contrib/descend.man @@ -1,4 +1,3 @@ -.\" $Id: descend.man,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ .TH DESCEND 1 "31 March 1992" .SH NAME descend \- walk directory tree and execute a command at each node diff --git a/gnu/usr.bin/cvs/contrib/descend.sh b/gnu/usr.bin/cvs/contrib/descend.sh index f3a1790be7d..039a7a3d3ee 100644 --- a/gnu/usr.bin/cvs/contrib/descend.sh +++ b/gnu/usr.bin/cvs/contrib/descend.sh @@ -1,5 +1,4 @@ #! /bin/sh -# $Id: descend.sh,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ # # descend - walk down a directory tree and execute a command at each node diff --git a/gnu/usr.bin/cvs/contrib/log_accum.pl b/gnu/usr.bin/cvs/contrib/log_accum.pl index edd6df25d6b..d299fa62b53 100644 --- a/gnu/usr.bin/cvs/contrib/log_accum.pl +++ b/gnu/usr.bin/cvs/contrib/log_accum.pl @@ -1,8 +1,6 @@ #! xPERL_PATHx # -*-Perl-*- # -#ident "@(#)ccvs/contrib:$Name: $:$Id: log_accum.pl,v 1.1.1.3 1996/05/06 22:20:41 tholo Exp $" -# # Perl filter to handle the log messages from the checkin of files in # a directory. This script will group the lists of files by log # message, and mail a single consolidated log message at the end of @@ -22,6 +20,7 @@ # -M modulename - set module name to "modulename" # -f logfile - write commit messages to logfile too # -s - *don't* run "cvs status -v" for each file +# -w - show working directory with log message # # Configurable options @@ -173,9 +172,10 @@ sub read_logfile { sub build_header { local($header); local($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst) = localtime(time); - $header = sprintf("CVSROOT:\t%s\nModule name:\t%s\nChanges by:\t%s@%s\t%02d/%02d/%02d %02d:%02d:%02d", + $header = sprintf("CVSROOT:\t%s\nModule name:\t%s\nRepository:\t%s\nChanges by:\t%s@%s\t%02d/%02d/%02d %02d:%02d:%02d", $cvsroot, $modulename, + $dir, $login, $hostdomain, $year%100, $mon+1, $mday, $hour, $min, $sec); @@ -228,7 +228,6 @@ sub mail_notification { print MAIL "Date: " . $rfc822date . "\n"; print MAIL "Subject: CVS Update: " . $modulename . "\n"; print MAIL "To: " . $mailto . "\n"; - print MAIL "From: " . $login . "@" . $hostdomain . "\n"; print MAIL "Reply-To: " . $replyto . "\n"; print MAIL "\n"; print MAIL join("\n", @text), "\n"; @@ -255,9 +254,13 @@ $state = $STATE_NONE; $login = getlogin || (getpwuid($<))[0] || "nobody"; chop($hostname = `hostname`); chop($domainname = `domainname`); +if ($domainname !~ '^\..*') { + $domainname = '.' . $domainname; +} $hostdomain = $hostname . $domainname; $cvsroot = $ENV{'CVSROOT'}; -$do_status = 1; +$do_status = 1; # moderately useful +$show_wd = 0; # useless in client/server $modulename = ""; # parse command line arguments (file list is seen as one arg) @@ -284,6 +287,8 @@ while (@ARGV) { $modulename = shift @ARGV; } elsif ($arg eq '-s') { $do_status = 0; + } elsif ($arg eq '-w') { + $show_wd = 1; } elsif ($arg eq '-f') { ($commitlog) && die("Too many '-f' args\n"); $commitlog = shift @ARGV; @@ -303,10 +308,14 @@ if ($replyto eq '') { # @path = split('/', $files[0]); -# XXX there are some ugly assumptions in here about module names and +# XXX There are some ugly assumptions in here about module names and # XXX directories relative to the $CVSROOT location -- really should # XXX read $CVSROOT/CVSROOT/modules, but that's not so easy to do, since # XXX we have to parse it backwards. +# XXX +# XXX Fortunately it's relatively easy for the user to specify the +# XXX module name as appropriate with a '-M' via the directory +# XXX matching in loginfo. # if ($modulename eq "") { $modulename = $path[0]; # I.e. the module name == top-level dir @@ -384,8 +393,10 @@ while () { chop; # Drop the newline if (/^In directory/) { - push(@log_lines, $_); - push(@log_lines, ""); + if ($show_wd) { # useless in client/server mode + push(@log_lines, $_); + push(@log_lines, ""); + } next; } diff --git a/gnu/usr.bin/cvs/contrib/mfpipe.pl b/gnu/usr.bin/cvs/contrib/mfpipe.pl index fb0b20b41ae..c74d7156490 100644 --- a/gnu/usr.bin/cvs/contrib/mfpipe.pl +++ b/gnu/usr.bin/cvs/contrib/mfpipe.pl @@ -12,9 +12,6 @@ # Especially if they regularly beat on the same directory. Anyway if you # think anyone would be interested here it is. # -# $Id: mfpipe.pl,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ -# -# # File: mfpipe # # Author: John Clyne diff --git a/gnu/usr.bin/cvs/contrib/rcs-to-cvs.sh b/gnu/usr.bin/cvs/contrib/rcs-to-cvs.sh index 737beebfc6f..66a62a9da5e 100644 --- a/gnu/usr.bin/cvs/contrib/rcs-to-cvs.sh +++ b/gnu/usr.bin/cvs/contrib/rcs-to-cvs.sh @@ -1,6 +1,5 @@ #! /bin/sh # -# $Id: rcs-to-cvs.sh,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ # Based on the CVS 1.0 checkin csh script. # Contributed by Per Cederqvist . # Rewritten in sh by David MacKenzie . @@ -33,7 +32,7 @@ usage="Usage: rcs-to-cvs [-v] [-m message] [-f message_file] repository" vbose=0 message="" -message_file=/usr/tmp/checkin.$$ +if [ -d /var/tmp ]; then message_file=/var/tmp/checkin.$$; else message_file=/usr/tmp/checkin.$$; fi got_one=0 if [ $# -lt 1 ]; then @@ -79,7 +78,7 @@ fi if [ $got_one -eq 0 ]; then echo "Please Edit this file to contain the RCS log information" >$message_file echo "to be associated with this directory (please remove these lines)">>$message_file - ${EDITOR-/usr/ucb/vi} $message_file + ${EDITOR-vi} $message_file got_one=1 fi diff --git a/gnu/usr.bin/cvs/contrib/rcs2log.sh b/gnu/usr.bin/cvs/contrib/rcs2log.sh index 24da5ea9597..55485669566 100644 --- a/gnu/usr.bin/cvs/contrib/rcs2log.sh +++ b/gnu/usr.bin/cvs/contrib/rcs2log.sh @@ -12,8 +12,6 @@ # Author: Paul Eggert -# $Id: rcs2log.sh,v 1.1.1.3 1997/02/21 06:38:19 tholo Exp $ - # Copyright 1992, 1993, 1994, 1995 Free Software Foundation, Inc. # This program is free software; you can redistribute it and/or modify diff --git a/gnu/usr.bin/cvs/contrib/rcs2sccs.sh b/gnu/usr.bin/cvs/contrib/rcs2sccs.sh index e87a941dc6e..b089dfef065 100644 --- a/gnu/usr.bin/cvs/contrib/rcs2sccs.sh +++ b/gnu/usr.bin/cvs/contrib/rcs2sccs.sh @@ -1,8 +1,6 @@ #! /bin/sh # # -# OrigId: rcs2sccs,v 1.12 90/10/04 20:52:23 kenc Exp Locker: kenc -# $Id: rcs2sccs.sh,v 1.1.1.1 1996/04/27 19:42:52 tholo Exp $ ############################################################ # Error checking diff --git a/gnu/usr.bin/cvs/contrib/sccs2rcs.csh b/gnu/usr.bin/cvs/contrib/sccs2rcs.csh index 5871f1223cc..a1dea01b19e 100644 --- a/gnu/usr.bin/cvs/contrib/sccs2rcs.csh +++ b/gnu/usr.bin/cvs/contrib/sccs2rcs.csh @@ -42,8 +42,6 @@ # ...!harvard!cg-atla!viewlog!kenstir # # Various hacks made by Brian Berliner before inclusion in CVS contrib area. -# -# $Id: sccs2rcs.csh,v 1.1.1.1 1995/12/19 09:21:40 deraadt Exp $ #we'll assume the user set up the path correctly diff --git a/gnu/usr.bin/cvs/cvsnt.mak b/gnu/usr.bin/cvs/cvsnt.mak index e3a52e707eb..cfa7575b401 100644 --- a/gnu/usr.bin/cvs/cvsnt.mak +++ b/gnu/usr.bin/cvs/cvsnt.mak @@ -1,35 +1,40 @@ -# Microsoft Visual C++ Generated NMAKE File, Format Version 2.00 +# Microsoft Developer Studio Generated NMAKE File, Format Version 40001 # ** DO NOT EDIT ** # TARGTYPE "Win32 (x86) Console Application" 0x0103 !IF "$(CFG)" == "" -CFG=Win32 Debug -!MESSAGE No configuration specified. Defaulting to Win32 Debug. +CFG=cvsnt - Win32 Debug +!MESSAGE No configuration specified. Defaulting to cvsnt - Win32 Debug. !ENDIF -!IF "$(CFG)" != "Win32 Release" && "$(CFG)" != "Win32 Debug" +!IF "$(CFG)" != "cvsnt - Win32 Release" && "$(CFG)" != "cvsnt - Win32 Debug" !MESSAGE Invalid configuration "$(CFG)" specified. !MESSAGE You can specify a configuration when running NMAKE on this makefile !MESSAGE by defining the macro CFG on the command line. For example: !MESSAGE -!MESSAGE NMAKE /f "cvsnt.mak" CFG="Win32 Debug" +!MESSAGE NMAKE /f "cvsnt.mak" CFG="cvsnt - Win32 Debug" !MESSAGE !MESSAGE Possible choices for configuration are: !MESSAGE -!MESSAGE "Win32 Release" (based on "Win32 (x86) Console Application") -!MESSAGE "Win32 Debug" (based on "Win32 (x86) Console Application") +!MESSAGE "cvsnt - Win32 Release" (based on "Win32 (x86) Console Application") +!MESSAGE "cvsnt - Win32 Debug" (based on "Win32 (x86) Console Application") !MESSAGE !ERROR An invalid configuration is specified. !ENDIF +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF ################################################################################ # Begin Project -# PROP Target_Last_Scanned "Win32 Debug" +# PROP Target_Last_Scanned "cvsnt - Win32 Debug" CPP=cl.exe RSC=rc.exe -!IF "$(CFG)" == "Win32 Release" +!IF "$(CFG)" == "cvsnt - Win32 Release" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 0 @@ -42,225 +47,224 @@ RSC=rc.exe OUTDIR=.\WinRel INTDIR=.\WinRel -ALL : $(OUTDIR)/cvs.exe $(OUTDIR)/cvsnt.bsc - -$(OUTDIR) : - if not exist $(OUTDIR)/nul mkdir $(OUTDIR) - -# ADD BASE CPP /nologo /W3 /GX /YX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /c -# ADD CPP /nologo /W3 /GX /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR /c -# SUBTRACT CPP /WX -CPP_PROJ=/nologo /W3 /GX /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib"\ - /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR$(INTDIR)/\ - /Fp$(OUTDIR)/"cvsnt.pch" /Fo$(INTDIR)/ /c +ALL : "$(OUTDIR)\cvs.exe" + +CLEAN : + -@erase ".\WinRel\cvs.exe" + -@erase ".\WinRel\commit.obj" + -@erase ".\WinRel\scramble.obj" + -@erase ".\WinRel\filesubr.obj" + -@erase ".\WinRel\rcs.obj" + -@erase ".\WinRel\uncompr.obj" + -@erase ".\WinRel\inftrees.obj" + -@erase ".\WinRel\update.obj" + -@erase ".\WinRel\release.obj" + -@erase ".\WinRel\login.obj" + -@erase ".\WinRel\run.obj" + -@erase ".\WinRel\buffer.obj" + -@erase ".\WinRel\hash.obj" + -@erase ".\WinRel\modules.obj" + -@erase ".\WinRel\getopt.obj" + -@erase ".\WinRel\subr.obj" + -@erase ".\WinRel\mkmodules.obj" + -@erase ".\WinRel\getdate.obj" + -@erase ".\WinRel\waitpid.obj" + -@erase ".\WinRel\sighandle.obj" + -@erase ".\WinRel\inflate.obj" + -@erase ".\WinRel\classify.obj" + -@erase ".\WinRel\tag.obj" + -@erase ".\WinRel\entries.obj" + -@erase ".\WinRel\win32.obj" + -@erase ".\WinRel\pwd.obj" + -@erase ".\WinRel\getopt1.obj" + -@erase ".\WinRel\logmsg.obj" + -@erase ".\WinRel\error.obj" + -@erase ".\WinRel\fileattr.obj" + -@erase ".\WinRel\stripslash.obj" + -@erase ".\WinRel\xgetwd.obj" + -@erase ".\WinRel\infutil.obj" + -@erase ".\WinRel\fnmatch.obj" + -@erase ".\WinRel\parseinfo.obj" + -@erase ".\WinRel\zlib.obj" + -@erase ".\WinRel\main.obj" + -@erase ".\WinRel\vasprintf.obj" + -@erase ".\WinRel\server.obj" + -@erase ".\WinRel\vers_ts.obj" + -@erase ".\WinRel\patch.obj" + -@erase ".\WinRel\compress.obj" + -@erase ".\WinRel\getwd.obj" + -@erase ".\WinRel\gzio.obj" + -@erase ".\WinRel\diff.obj" + -@erase ".\WinRel\mkdir.obj" + -@erase ".\WinRel\trees.obj" + -@erase ".\WinRel\recurse.obj" + -@erase ".\WinRel\import.obj" + -@erase ".\WinRel\rtag.obj" + -@erase ".\WinRel\rcscmds.obj" + -@erase ".\WinRel\root.obj" + -@erase ".\WinRel\wrapper.obj" + -@erase ".\WinRel\lock.obj" + -@erase ".\WinRel\zutil.obj" + -@erase ".\WinRel\history.obj" + -@erase ".\WinRel\admin.obj" + -@erase ".\WinRel\version.obj" + -@erase ".\WinRel\crc32.obj" + -@erase ".\WinRel\create_adm.obj" + -@erase ".\WinRel\infblock.obj" + -@erase ".\WinRel\status.obj" + -@erase ".\WinRel\md5.obj" + -@erase ".\WinRel\checkin.obj" + -@erase ".\WinRel\checkout.obj" + -@erase ".\WinRel\getline.obj" + -@erase ".\WinRel\rcmd.obj" + -@erase ".\WinRel\yesno.obj" + -@erase ".\WinRel\adler32.obj" + -@erase ".\WinRel\savecwd.obj" + -@erase ".\WinRel\repos.obj" + -@erase ".\WinRel\argmatch.obj" + -@erase ".\WinRel\ndir.obj" + -@erase ".\WinRel\myndbm.obj" + -@erase ".\WinRel\cvsrc.obj" + -@erase ".\WinRel\startserver.obj" + -@erase ".\WinRel\client.obj" + -@erase ".\WinRel\regex.obj" + -@erase ".\WinRel\log.obj" + -@erase ".\WinRel\inffast.obj" + -@erase ".\WinRel\expand_path.obj" + -@erase ".\WinRel\remove.obj" + -@erase ".\WinRel\no_diff.obj" + -@erase ".\WinRel\edit.obj" + -@erase ".\WinRel\ignore.obj" + -@erase ".\WinRel\add.obj" + -@erase ".\WinRel\watch.obj" + -@erase ".\WinRel\deflate.obj" + -@erase ".\WinRel\find_names.obj" + -@erase ".\WinRel\valloc.obj" + -@erase ".\WinRel\infcodes.obj" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /FR /YX /c +# ADD CPP /nologo /W3 /GX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "NDEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /YX /c +# SUBTRACT CPP /WX /Fr +CPP_PROJ=/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 CPP_OBJS=.\WinRel/ +CPP_SBRS= # ADD BASE RSC /l 0x409 /d "NDEBUG" # ADD RSC /l 0x409 /d "NDEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o$(OUTDIR)/"cvsnt.bsc" -BSC32_SBRS= \ - $(INTDIR)/mkmodules.sbr \ - $(INTDIR)/subr.sbr \ - $(INTDIR)/admin.sbr \ - $(INTDIR)/server.sbr \ - $(INTDIR)/diff.sbr \ - $(INTDIR)/client.sbr \ - $(INTDIR)/checkout.sbr \ - $(INTDIR)/no_diff.sbr \ - $(INTDIR)/entries.sbr \ - $(INTDIR)/tag.sbr \ - $(INTDIR)/rtag.sbr \ - $(INTDIR)/status.sbr \ - $(INTDIR)/root.sbr \ - $(INTDIR)/myndbm.sbr \ - $(INTDIR)/hash.sbr \ - $(INTDIR)/repos.sbr \ - $(INTDIR)/parseinfo.sbr \ - $(INTDIR)/vers_ts.sbr \ - $(INTDIR)/checkin.sbr \ - $(INTDIR)/commit.sbr \ - $(INTDIR)/version.sbr \ - $(INTDIR)/cvsrc.sbr \ - $(INTDIR)/remove.sbr \ - $(INTDIR)/update.sbr \ - $(INTDIR)/logmsg.sbr \ - $(INTDIR)/classify.sbr \ - $(INTDIR)/history.sbr \ - $(INTDIR)/add.sbr \ - $(INTDIR)/lock.sbr \ - $(INTDIR)/recurse.sbr \ - $(INTDIR)/modules.sbr \ - $(INTDIR)/find_names.sbr \ - $(INTDIR)/rcs.sbr \ - $(INTDIR)/create_adm.sbr \ - $(INTDIR)/main.sbr \ - $(INTDIR)/patch.sbr \ - $(INTDIR)/release.sbr \ - $(INTDIR)/rcscmds.sbr \ - $(INTDIR)/import.sbr \ - $(INTDIR)/ignore.sbr \ - $(INTDIR)/log.sbr \ - $(INTDIR)/wrapper.sbr \ - $(INTDIR)/error.sbr \ - $(INTDIR)/expand_path.sbr \ - $(INTDIR)/edit.sbr \ - $(INTDIR)/fileattr.sbr \ - $(INTDIR)/watch.sbr \ - $(INTDIR)/login.sbr \ - $(INTDIR)/scramble.sbr \ - $(INTDIR)/buffer.sbr \ - $(INTDIR)/zlib.sbr \ - $(INTDIR)/getwd.sbr \ - $(INTDIR)/sighandle.sbr \ - $(INTDIR)/getopt.sbr \ - $(INTDIR)/argmatch.sbr \ - $(INTDIR)/md5.sbr \ - $(INTDIR)/yesno.sbr \ - $(INTDIR)/getopt1.sbr \ - $(INTDIR)/valloc.sbr \ - $(INTDIR)/xgetwd.sbr \ - $(INTDIR)/regex.sbr \ - $(INTDIR)/fnmatch.sbr \ - $(INTDIR)/getdate.sbr \ - $(INTDIR)/getline.sbr \ - $(INTDIR)/savecwd.sbr \ - $(INTDIR)/vasprintf.sbr \ - $(INTDIR)/mkdir.sbr \ - $(INTDIR)/run.sbr \ - $(INTDIR)/pwd.sbr \ - $(INTDIR)/filesubr.sbr \ - $(INTDIR)/win32.sbr \ - $(INTDIR)/waitpid.sbr \ - $(INTDIR)/ndir.sbr \ - $(INTDIR)/stripslash.sbr \ - $(INTDIR)/rcmd.sbr \ - $(INTDIR)/startserver.sbr \ - $(INTDIR)/zutil.sbr \ - $(INTDIR)/infutil.sbr \ - $(INTDIR)/infblock.sbr \ - $(INTDIR)/compress.sbr \ - $(INTDIR)/uncompr.sbr \ - $(INTDIR)/inflate.sbr \ - $(INTDIR)/inftrees.sbr \ - $(INTDIR)/gzio.sbr \ - $(INTDIR)/infcodes.sbr \ - $(INTDIR)/deflate.sbr \ - $(INTDIR)/adler32.sbr \ - $(INTDIR)/crc32.sbr \ - $(INTDIR)/inffast.sbr \ - $(INTDIR)/trees.sbr - -$(OUTDIR)/cvsnt.bsc : $(OUTDIR) $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - +BSC32_FLAGS=/nologo /o"$(OUTDIR)/cvsnt.bsc" +BSC32_SBRS= LINK32=link.exe -# ADD BASE LINK32 advapi32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386 -# ADD LINK32 advapi32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console /MACHINE:I386 /OUT:"WinRel/cvs.exe" -LINK32_FLAGS=advapi32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console\ - /INCREMENTAL:no /PDB:$(OUTDIR)/"cvsnt.pdb" /MACHINE:I386 /OUT:"WinRel/cvs.exe" -DEF_FILE= +# ADD BASE LINK32 advapi32.lib /nologo /subsystem:console /machine:I386 +# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /machine:I386 /out:"WinRel/cvs.exe" +LINK32_FLAGS=wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ + /subsystem:console /incremental:no /pdb:"$(OUTDIR)/cvs.pdb" /machine:I386\ + /out:"$(OUTDIR)/cvs.exe" LINK32_OBJS= \ - $(INTDIR)/mkmodules.obj \ - $(INTDIR)/subr.obj \ - $(INTDIR)/admin.obj \ - $(INTDIR)/server.obj \ - $(INTDIR)/diff.obj \ - $(INTDIR)/client.obj \ - $(INTDIR)/checkout.obj \ - $(INTDIR)/no_diff.obj \ - $(INTDIR)/entries.obj \ - $(INTDIR)/tag.obj \ - $(INTDIR)/rtag.obj \ - $(INTDIR)/status.obj \ - $(INTDIR)/root.obj \ - $(INTDIR)/myndbm.obj \ - $(INTDIR)/hash.obj \ - $(INTDIR)/repos.obj \ - $(INTDIR)/parseinfo.obj \ - $(INTDIR)/vers_ts.obj \ - $(INTDIR)/checkin.obj \ - $(INTDIR)/commit.obj \ - $(INTDIR)/version.obj \ - $(INTDIR)/cvsrc.obj \ - $(INTDIR)/remove.obj \ - $(INTDIR)/update.obj \ - $(INTDIR)/logmsg.obj \ - $(INTDIR)/classify.obj \ - $(INTDIR)/history.obj \ - $(INTDIR)/add.obj \ - $(INTDIR)/lock.obj \ - $(INTDIR)/recurse.obj \ - $(INTDIR)/modules.obj \ - $(INTDIR)/find_names.obj \ - $(INTDIR)/rcs.obj \ - $(INTDIR)/create_adm.obj \ - $(INTDIR)/main.obj \ - $(INTDIR)/patch.obj \ - $(INTDIR)/release.obj \ - $(INTDIR)/rcscmds.obj \ - $(INTDIR)/import.obj \ - $(INTDIR)/ignore.obj \ - $(INTDIR)/log.obj \ - $(INTDIR)/wrapper.obj \ - $(INTDIR)/error.obj \ - $(INTDIR)/expand_path.obj \ - $(INTDIR)/edit.obj \ - $(INTDIR)/fileattr.obj \ - $(INTDIR)/watch.obj \ - $(INTDIR)/login.obj \ - $(INTDIR)/scramble.obj \ - $(INTDIR)/buffer.obj \ - $(INTDIR)/zlib.obj \ - $(INTDIR)/getwd.obj \ - $(INTDIR)/sighandle.obj \ - $(INTDIR)/getopt.obj \ - $(INTDIR)/argmatch.obj \ - $(INTDIR)/md5.obj \ - $(INTDIR)/yesno.obj \ - $(INTDIR)/getopt1.obj \ - $(INTDIR)/valloc.obj \ - $(INTDIR)/xgetwd.obj \ - $(INTDIR)/regex.obj \ - $(INTDIR)/fnmatch.obj \ - $(INTDIR)/getdate.obj \ - $(INTDIR)/getline.obj \ - $(INTDIR)/savecwd.obj \ - $(INTDIR)/vasprintf.obj \ - $(INTDIR)/mkdir.obj \ - $(INTDIR)/run.obj \ - $(INTDIR)/pwd.obj \ - $(INTDIR)/filesubr.obj \ - $(INTDIR)/win32.obj \ - $(INTDIR)/waitpid.obj \ - $(INTDIR)/ndir.obj \ - $(INTDIR)/stripslash.obj \ - $(INTDIR)/rcmd.obj \ - $(INTDIR)/startserver.obj \ - $(INTDIR)/zutil.obj \ - $(INTDIR)/infutil.obj \ - $(INTDIR)/infblock.obj \ - $(INTDIR)/compress.obj \ - $(INTDIR)/uncompr.obj \ - $(INTDIR)/inflate.obj \ - $(INTDIR)/inftrees.obj \ - $(INTDIR)/gzio.obj \ - $(INTDIR)/infcodes.obj \ - $(INTDIR)/deflate.obj \ - $(INTDIR)/adler32.obj \ - $(INTDIR)/crc32.obj \ - $(INTDIR)/inffast.obj \ - $(INTDIR)/trees.obj - -$(OUTDIR)/cvs.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) + "$(INTDIR)/commit.obj" \ + "$(INTDIR)/scramble.obj" \ + "$(INTDIR)/filesubr.obj" \ + "$(INTDIR)/rcs.obj" \ + "$(INTDIR)/uncompr.obj" \ + "$(INTDIR)/inftrees.obj" \ + "$(INTDIR)/update.obj" \ + "$(INTDIR)/release.obj" \ + "$(INTDIR)/login.obj" \ + "$(INTDIR)/run.obj" \ + "$(INTDIR)/buffer.obj" \ + "$(INTDIR)/hash.obj" \ + "$(INTDIR)/modules.obj" \ + "$(INTDIR)/getopt.obj" \ + "$(INTDIR)/subr.obj" \ + "$(INTDIR)/mkmodules.obj" \ + "$(INTDIR)/getdate.obj" \ + "$(INTDIR)/waitpid.obj" \ + "$(INTDIR)/sighandle.obj" \ + "$(INTDIR)/inflate.obj" \ + "$(INTDIR)/classify.obj" \ + "$(INTDIR)/tag.obj" \ + "$(INTDIR)/entries.obj" \ + "$(INTDIR)/win32.obj" \ + "$(INTDIR)/pwd.obj" \ + "$(INTDIR)/getopt1.obj" \ + "$(INTDIR)/logmsg.obj" \ + "$(INTDIR)/error.obj" \ + "$(INTDIR)/fileattr.obj" \ + "$(INTDIR)/stripslash.obj" \ + "$(INTDIR)/xgetwd.obj" \ + "$(INTDIR)/infutil.obj" \ + "$(INTDIR)/fnmatch.obj" \ + "$(INTDIR)/parseinfo.obj" \ + "$(INTDIR)/zlib.obj" \ + "$(INTDIR)/main.obj" \ + "$(INTDIR)/vasprintf.obj" \ + "$(INTDIR)/server.obj" \ + "$(INTDIR)/vers_ts.obj" \ + "$(INTDIR)/patch.obj" \ + "$(INTDIR)/compress.obj" \ + "$(INTDIR)/getwd.obj" \ + "$(INTDIR)/gzio.obj" \ + "$(INTDIR)/diff.obj" \ + "$(INTDIR)/mkdir.obj" \ + "$(INTDIR)/trees.obj" \ + "$(INTDIR)/recurse.obj" \ + "$(INTDIR)/import.obj" \ + "$(INTDIR)/rtag.obj" \ + "$(INTDIR)/rcscmds.obj" \ + "$(INTDIR)/root.obj" \ + "$(INTDIR)/wrapper.obj" \ + "$(INTDIR)/lock.obj" \ + "$(INTDIR)/zutil.obj" \ + "$(INTDIR)/history.obj" \ + "$(INTDIR)/admin.obj" \ + "$(INTDIR)/version.obj" \ + "$(INTDIR)/crc32.obj" \ + "$(INTDIR)/create_adm.obj" \ + "$(INTDIR)/infblock.obj" \ + "$(INTDIR)/status.obj" \ + "$(INTDIR)/md5.obj" \ + "$(INTDIR)/checkin.obj" \ + "$(INTDIR)/checkout.obj" \ + "$(INTDIR)/getline.obj" \ + "$(INTDIR)/rcmd.obj" \ + "$(INTDIR)/yesno.obj" \ + "$(INTDIR)/adler32.obj" \ + "$(INTDIR)/savecwd.obj" \ + "$(INTDIR)/repos.obj" \ + "$(INTDIR)/argmatch.obj" \ + "$(INTDIR)/ndir.obj" \ + "$(INTDIR)/myndbm.obj" \ + "$(INTDIR)/cvsrc.obj" \ + "$(INTDIR)/startserver.obj" \ + "$(INTDIR)/client.obj" \ + "$(INTDIR)/regex.obj" \ + "$(INTDIR)/log.obj" \ + "$(INTDIR)/inffast.obj" \ + "$(INTDIR)/expand_path.obj" \ + "$(INTDIR)/remove.obj" \ + "$(INTDIR)/no_diff.obj" \ + "$(INTDIR)/edit.obj" \ + "$(INTDIR)/ignore.obj" \ + "$(INTDIR)/add.obj" \ + "$(INTDIR)/watch.obj" \ + "$(INTDIR)/deflate.obj" \ + "$(INTDIR)/find_names.obj" \ + "$(INTDIR)/valloc.obj" \ + "$(INTDIR)/infcodes.obj" + +"$(OUTDIR)\cvs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << -!ELSEIF "$(CFG)" == "Win32 Debug" +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" # PROP BASE Use_MFC 0 # PROP BASE Use_Debug_Libraries 1 @@ -273,220 +277,223 @@ $(OUTDIR)/cvs.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) OUTDIR=.\WinDebug INTDIR=.\WinDebug -ALL : $(OUTDIR)/cvs.exe $(OUTDIR)/cvsnt.bsc - -$(OUTDIR) : - if not exist $(OUTDIR)/nul mkdir $(OUTDIR) - -# ADD BASE CPP /nologo /W3 /GX /Zi /YX /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /c -# ADD CPP /nologo /W3 /GX /Zi /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR /c -CPP_PROJ=/nologo /W3 /GX /Zi /YX /Ob1 /I "windows-NT" /I "lib" /I "src" /I\ - "zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /FR$(INTDIR)/\ - /Fp$(OUTDIR)/"cvsnt.pch" /Fo$(INTDIR)/ /Fd$(OUTDIR)/"cvsnt.pdb" /c +ALL : "$(OUTDIR)\cvs.exe" + +CLEAN : + -@erase ".\WinDebug\vc40.pdb" + -@erase ".\WinDebug\vc40.idb" + -@erase ".\WinDebug\cvs.exe" + -@erase ".\WinDebug\add.obj" + -@erase ".\WinDebug\savecwd.obj" + -@erase ".\WinDebug\infcodes.obj" + -@erase ".\WinDebug\valloc.obj" + -@erase ".\WinDebug\server.obj" + -@erase ".\WinDebug\scramble.obj" + -@erase ".\WinDebug\filesubr.obj" + -@erase ".\WinDebug\win32.obj" + -@erase ".\WinDebug\inffast.obj" + -@erase ".\WinDebug\inftrees.obj" + -@erase ".\WinDebug\no_diff.obj" + -@erase ".\WinDebug\repos.obj" + -@erase ".\WinDebug\edit.obj" + -@erase ".\WinDebug\cvsrc.obj" + -@erase ".\WinDebug\startserver.obj" + -@erase ".\WinDebug\getopt.obj" + -@erase ".\WinDebug\zlib.obj" + -@erase ".\WinDebug\deflate.obj" + -@erase ".\WinDebug\main.obj" + -@erase ".\WinDebug\expand_path.obj" + -@erase ".\WinDebug\getwd.obj" + -@erase ".\WinDebug\md5.obj" + -@erase ".\WinDebug\gzio.obj" + -@erase ".\WinDebug\classify.obj" + -@erase ".\WinDebug\uncompr.obj" + -@erase ".\WinDebug\diff.obj" + -@erase ".\WinDebug\watch.obj" + -@erase ".\WinDebug\release.obj" + -@erase ".\WinDebug\tag.obj" + -@erase ".\WinDebug\logmsg.obj" + -@erase ".\WinDebug\pwd.obj" + -@erase ".\WinDebug\modules.obj" + -@erase ".\WinDebug\rtag.obj" + -@erase ".\WinDebug\root.obj" + -@erase ".\WinDebug\admin.obj" + -@erase ".\WinDebug\lock.obj" + -@erase ".\WinDebug\getdate.obj" + -@erase ".\WinDebug\myndbm.obj" + -@erase ".\WinDebug\xgetwd.obj" + -@erase ".\WinDebug\waitpid.obj" + -@erase ".\WinDebug\login.obj" + -@erase ".\WinDebug\adler32.obj" + -@erase ".\WinDebug\inflate.obj" + -@erase ".\WinDebug\compress.obj" + -@erase ".\WinDebug\log.obj" + -@erase ".\WinDebug\entries.obj" + -@erase ".\WinDebug\stripslash.obj" + -@erase ".\WinDebug\rcmd.obj" + -@erase ".\WinDebug\getopt1.obj" + -@erase ".\WinDebug\ignore.obj" + -@erase ".\WinDebug\yesno.obj" + -@erase ".\WinDebug\infutil.obj" + -@erase ".\WinDebug\fnmatch.obj" + -@erase ".\WinDebug\import.obj" + -@erase ".\WinDebug\ndir.obj" + -@erase ".\WinDebug\regex.obj" + -@erase ".\WinDebug\commit.obj" + -@erase ".\WinDebug\mkmodules.obj" + -@erase ".\WinDebug\vers_ts.obj" + -@erase ".\WinDebug\infblock.obj" + -@erase ".\WinDebug\find_names.obj" + -@erase ".\WinDebug\rcs.obj" + -@erase ".\WinDebug\sighandle.obj" + -@erase ".\WinDebug\status.obj" + -@erase ".\WinDebug\update.obj" + -@erase ".\WinDebug\error.obj" + -@erase ".\WinDebug\checkout.obj" + -@erase ".\WinDebug\buffer.obj" + -@erase ".\WinDebug\run.obj" + -@erase ".\WinDebug\create_adm.obj" + -@erase ".\WinDebug\recurse.obj" + -@erase ".\WinDebug\patch.obj" + -@erase ".\WinDebug\rcscmds.obj" + -@erase ".\WinDebug\wrapper.obj" + -@erase ".\WinDebug\argmatch.obj" + -@erase ".\WinDebug\fileattr.obj" + -@erase ".\WinDebug\history.obj" + -@erase ".\WinDebug\version.obj" + -@erase ".\WinDebug\parseinfo.obj" + -@erase ".\WinDebug\mkdir.obj" + -@erase ".\WinDebug\vasprintf.obj" + -@erase ".\WinDebug\client.obj" + -@erase ".\WinDebug\checkin.obj" + -@erase ".\WinDebug\trees.obj" + -@erase ".\WinDebug\remove.obj" + -@erase ".\WinDebug\getline.obj" + -@erase ".\WinDebug\hash.obj" + -@erase ".\WinDebug\subr.obj" + -@erase ".\WinDebug\zutil.obj" + -@erase ".\WinDebug\crc32.obj" + -@erase ".\WinDebug\cvs.ilk" + -@erase ".\WinDebug\cvs.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /W3 /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /FR /YX /c +# ADD CPP /nologo /W3 /Gm /GX /Zi /Ob1 /I "windows-NT" /I "lib" /I "src" /I "zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H" /YX /c +# SUBTRACT CPP /Fr +CPP_PROJ=/nologo /MLd /W3 /Gm /GX /Zi /Ob1 /I "windows-NT" /I "lib" /I "src" /I\ + "zlib" /D "_DEBUG" /D "WIN32" /D "_CONSOLE" /D "HAVE_CONFIG_H"\ + /Fp"$(INTDIR)/cvsnt.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c CPP_OBJS=.\WinDebug/ +CPP_SBRS= # ADD BASE RSC /l 0x409 /d "_DEBUG" # ADD RSC /l 0x409 /d "_DEBUG" BSC32=bscmake.exe # ADD BASE BSC32 /nologo # ADD BSC32 /nologo -BSC32_FLAGS=/nologo /o$(OUTDIR)/"cvsnt.bsc" -BSC32_SBRS= \ - $(INTDIR)/mkmodules.sbr \ - $(INTDIR)/subr.sbr \ - $(INTDIR)/admin.sbr \ - $(INTDIR)/server.sbr \ - $(INTDIR)/diff.sbr \ - $(INTDIR)/client.sbr \ - $(INTDIR)/checkout.sbr \ - $(INTDIR)/no_diff.sbr \ - $(INTDIR)/entries.sbr \ - $(INTDIR)/tag.sbr \ - $(INTDIR)/rtag.sbr \ - $(INTDIR)/status.sbr \ - $(INTDIR)/root.sbr \ - $(INTDIR)/myndbm.sbr \ - $(INTDIR)/hash.sbr \ - $(INTDIR)/repos.sbr \ - $(INTDIR)/parseinfo.sbr \ - $(INTDIR)/vers_ts.sbr \ - $(INTDIR)/checkin.sbr \ - $(INTDIR)/commit.sbr \ - $(INTDIR)/version.sbr \ - $(INTDIR)/cvsrc.sbr \ - $(INTDIR)/remove.sbr \ - $(INTDIR)/update.sbr \ - $(INTDIR)/logmsg.sbr \ - $(INTDIR)/classify.sbr \ - $(INTDIR)/history.sbr \ - $(INTDIR)/add.sbr \ - $(INTDIR)/lock.sbr \ - $(INTDIR)/recurse.sbr \ - $(INTDIR)/modules.sbr \ - $(INTDIR)/find_names.sbr \ - $(INTDIR)/rcs.sbr \ - $(INTDIR)/create_adm.sbr \ - $(INTDIR)/main.sbr \ - $(INTDIR)/patch.sbr \ - $(INTDIR)/release.sbr \ - $(INTDIR)/rcscmds.sbr \ - $(INTDIR)/import.sbr \ - $(INTDIR)/ignore.sbr \ - $(INTDIR)/log.sbr \ - $(INTDIR)/wrapper.sbr \ - $(INTDIR)/error.sbr \ - $(INTDIR)/expand_path.sbr \ - $(INTDIR)/edit.sbr \ - $(INTDIR)/fileattr.sbr \ - $(INTDIR)/watch.sbr \ - $(INTDIR)/login.sbr \ - $(INTDIR)/scramble.sbr \ - $(INTDIR)/buffer.sbr \ - $(INTDIR)/zlib.sbr \ - $(INTDIR)/getwd.sbr \ - $(INTDIR)/sighandle.sbr \ - $(INTDIR)/getopt.sbr \ - $(INTDIR)/argmatch.sbr \ - $(INTDIR)/md5.sbr \ - $(INTDIR)/yesno.sbr \ - $(INTDIR)/getopt1.sbr \ - $(INTDIR)/valloc.sbr \ - $(INTDIR)/xgetwd.sbr \ - $(INTDIR)/regex.sbr \ - $(INTDIR)/fnmatch.sbr \ - $(INTDIR)/getdate.sbr \ - $(INTDIR)/getline.sbr \ - $(INTDIR)/savecwd.sbr \ - $(INTDIR)/vasprintf.sbr \ - $(INTDIR)/mkdir.sbr \ - $(INTDIR)/run.sbr \ - $(INTDIR)/pwd.sbr \ - $(INTDIR)/filesubr.sbr \ - $(INTDIR)/win32.sbr \ - $(INTDIR)/waitpid.sbr \ - $(INTDIR)/ndir.sbr \ - $(INTDIR)/stripslash.sbr \ - $(INTDIR)/rcmd.sbr \ - $(INTDIR)/startserver.sbr \ - $(INTDIR)/zutil.sbr \ - $(INTDIR)/infutil.sbr \ - $(INTDIR)/infblock.sbr \ - $(INTDIR)/compress.sbr \ - $(INTDIR)/uncompr.sbr \ - $(INTDIR)/inflate.sbr \ - $(INTDIR)/inftrees.sbr \ - $(INTDIR)/gzio.sbr \ - $(INTDIR)/infcodes.sbr \ - $(INTDIR)/deflate.sbr \ - $(INTDIR)/adler32.sbr \ - $(INTDIR)/crc32.sbr \ - $(INTDIR)/inffast.sbr \ - $(INTDIR)/trees.sbr - -$(OUTDIR)/cvsnt.bsc : $(OUTDIR) $(BSC32_SBRS) - $(BSC32) @<< - $(BSC32_FLAGS) $(BSC32_SBRS) -<< - +BSC32_FLAGS=/nologo /o"$(OUTDIR)/cvsnt.bsc" +BSC32_SBRS= LINK32=link.exe -# ADD BASE LINK32 advapi32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386 -# ADD LINK32 advapi32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console /DEBUG /MACHINE:I386 /OUT:"WinDebug/cvs.exe" -LINK32_FLAGS=advapi32.lib wsock32.lib /NOLOGO /SUBSYSTEM:console\ - /INCREMENTAL:yes /PDB:$(OUTDIR)/"cvsnt.pdb" /DEBUG /MACHINE:I386\ - /OUT:"WinDebug/cvs.exe" -DEF_FILE= +# ADD BASE LINK32 advapi32.lib /nologo /subsystem:console /debug /machine:I386 +# ADD LINK32 wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:console /debug /machine:I386 /out:"WinDebug/cvs.exe" +LINK32_FLAGS=wsock32.lib kernel32.lib user32.lib gdi32.lib winspool.lib\ + comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ + /subsystem:console /incremental:yes /pdb:"$(OUTDIR)/cvs.pdb" /debug\ + /machine:I386 /out:"$(OUTDIR)/cvs.exe" LINK32_OBJS= \ - $(INTDIR)/mkmodules.obj \ - $(INTDIR)/subr.obj \ - $(INTDIR)/admin.obj \ - $(INTDIR)/server.obj \ - $(INTDIR)/diff.obj \ - $(INTDIR)/client.obj \ - $(INTDIR)/checkout.obj \ - $(INTDIR)/no_diff.obj \ - $(INTDIR)/entries.obj \ - $(INTDIR)/tag.obj \ - $(INTDIR)/rtag.obj \ - $(INTDIR)/status.obj \ - $(INTDIR)/root.obj \ - $(INTDIR)/myndbm.obj \ - $(INTDIR)/hash.obj \ - $(INTDIR)/repos.obj \ - $(INTDIR)/parseinfo.obj \ - $(INTDIR)/vers_ts.obj \ - $(INTDIR)/checkin.obj \ - $(INTDIR)/commit.obj \ - $(INTDIR)/version.obj \ - $(INTDIR)/cvsrc.obj \ - $(INTDIR)/remove.obj \ - $(INTDIR)/update.obj \ - $(INTDIR)/logmsg.obj \ - $(INTDIR)/classify.obj \ - $(INTDIR)/history.obj \ - $(INTDIR)/add.obj \ - $(INTDIR)/lock.obj \ - $(INTDIR)/recurse.obj \ - $(INTDIR)/modules.obj \ - $(INTDIR)/find_names.obj \ - $(INTDIR)/rcs.obj \ - $(INTDIR)/create_adm.obj \ - $(INTDIR)/main.obj \ - $(INTDIR)/patch.obj \ - $(INTDIR)/release.obj \ - $(INTDIR)/rcscmds.obj \ - $(INTDIR)/import.obj \ - $(INTDIR)/ignore.obj \ - $(INTDIR)/log.obj \ - $(INTDIR)/wrapper.obj \ - $(INTDIR)/error.obj \ - $(INTDIR)/expand_path.obj \ - $(INTDIR)/edit.obj \ - $(INTDIR)/fileattr.obj \ - $(INTDIR)/watch.obj \ - $(INTDIR)/login.obj \ - $(INTDIR)/scramble.obj \ - $(INTDIR)/buffer.obj \ - $(INTDIR)/zlib.obj \ - $(INTDIR)/getwd.obj \ - $(INTDIR)/sighandle.obj \ - $(INTDIR)/getopt.obj \ - $(INTDIR)/argmatch.obj \ - $(INTDIR)/md5.obj \ - $(INTDIR)/yesno.obj \ - $(INTDIR)/getopt1.obj \ - $(INTDIR)/valloc.obj \ - $(INTDIR)/xgetwd.obj \ - $(INTDIR)/regex.obj \ - $(INTDIR)/fnmatch.obj \ - $(INTDIR)/getdate.obj \ - $(INTDIR)/getline.obj \ - $(INTDIR)/savecwd.obj \ - $(INTDIR)/vasprintf.obj \ - $(INTDIR)/mkdir.obj \ - $(INTDIR)/run.obj \ - $(INTDIR)/pwd.obj \ - $(INTDIR)/filesubr.obj \ - $(INTDIR)/win32.obj \ - $(INTDIR)/waitpid.obj \ - $(INTDIR)/ndir.obj \ - $(INTDIR)/stripslash.obj \ - $(INTDIR)/rcmd.obj \ - $(INTDIR)/startserver.obj \ - $(INTDIR)/zutil.obj \ - $(INTDIR)/infutil.obj \ - $(INTDIR)/infblock.obj \ - $(INTDIR)/compress.obj \ - $(INTDIR)/uncompr.obj \ - $(INTDIR)/inflate.obj \ - $(INTDIR)/inftrees.obj \ - $(INTDIR)/gzio.obj \ - $(INTDIR)/infcodes.obj \ - $(INTDIR)/deflate.obj \ - $(INTDIR)/adler32.obj \ - $(INTDIR)/crc32.obj \ - $(INTDIR)/inffast.obj \ - $(INTDIR)/trees.obj - -$(OUTDIR)/cvs.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) + "$(INTDIR)/add.obj" \ + "$(INTDIR)/savecwd.obj" \ + "$(INTDIR)/infcodes.obj" \ + "$(INTDIR)/valloc.obj" \ + "$(INTDIR)/server.obj" \ + "$(INTDIR)/scramble.obj" \ + "$(INTDIR)/filesubr.obj" \ + "$(INTDIR)/win32.obj" \ + "$(INTDIR)/inffast.obj" \ + "$(INTDIR)/inftrees.obj" \ + "$(INTDIR)/no_diff.obj" \ + "$(INTDIR)/repos.obj" \ + "$(INTDIR)/edit.obj" \ + "$(INTDIR)/cvsrc.obj" \ + "$(INTDIR)/startserver.obj" \ + "$(INTDIR)/getopt.obj" \ + "$(INTDIR)/zlib.obj" \ + "$(INTDIR)/deflate.obj" \ + "$(INTDIR)/main.obj" \ + "$(INTDIR)/expand_path.obj" \ + "$(INTDIR)/getwd.obj" \ + "$(INTDIR)/md5.obj" \ + "$(INTDIR)/gzio.obj" \ + "$(INTDIR)/classify.obj" \ + "$(INTDIR)/uncompr.obj" \ + "$(INTDIR)/diff.obj" \ + "$(INTDIR)/watch.obj" \ + "$(INTDIR)/release.obj" \ + "$(INTDIR)/tag.obj" \ + "$(INTDIR)/logmsg.obj" \ + "$(INTDIR)/pwd.obj" \ + "$(INTDIR)/modules.obj" \ + "$(INTDIR)/rtag.obj" \ + "$(INTDIR)/root.obj" \ + "$(INTDIR)/admin.obj" \ + "$(INTDIR)/lock.obj" \ + "$(INTDIR)/getdate.obj" \ + "$(INTDIR)/myndbm.obj" \ + "$(INTDIR)/xgetwd.obj" \ + "$(INTDIR)/waitpid.obj" \ + "$(INTDIR)/login.obj" \ + "$(INTDIR)/adler32.obj" \ + "$(INTDIR)/inflate.obj" \ + "$(INTDIR)/compress.obj" \ + "$(INTDIR)/log.obj" \ + "$(INTDIR)/entries.obj" \ + "$(INTDIR)/stripslash.obj" \ + "$(INTDIR)/rcmd.obj" \ + "$(INTDIR)/getopt1.obj" \ + "$(INTDIR)/ignore.obj" \ + "$(INTDIR)/yesno.obj" \ + "$(INTDIR)/infutil.obj" \ + "$(INTDIR)/fnmatch.obj" \ + "$(INTDIR)/import.obj" \ + "$(INTDIR)/ndir.obj" \ + "$(INTDIR)/regex.obj" \ + "$(INTDIR)/commit.obj" \ + "$(INTDIR)/mkmodules.obj" \ + "$(INTDIR)/vers_ts.obj" \ + "$(INTDIR)/infblock.obj" \ + "$(INTDIR)/find_names.obj" \ + "$(INTDIR)/rcs.obj" \ + "$(INTDIR)/sighandle.obj" \ + "$(INTDIR)/status.obj" \ + "$(INTDIR)/update.obj" \ + "$(INTDIR)/error.obj" \ + "$(INTDIR)/checkout.obj" \ + "$(INTDIR)/buffer.obj" \ + "$(INTDIR)/run.obj" \ + "$(INTDIR)/create_adm.obj" \ + "$(INTDIR)/recurse.obj" \ + "$(INTDIR)/patch.obj" \ + "$(INTDIR)/rcscmds.obj" \ + "$(INTDIR)/wrapper.obj" \ + "$(INTDIR)/argmatch.obj" \ + "$(INTDIR)/fileattr.obj" \ + "$(INTDIR)/history.obj" \ + "$(INTDIR)/version.obj" \ + "$(INTDIR)/parseinfo.obj" \ + "$(INTDIR)/mkdir.obj" \ + "$(INTDIR)/vasprintf.obj" \ + "$(INTDIR)/client.obj" \ + "$(INTDIR)/checkin.obj" \ + "$(INTDIR)/trees.obj" \ + "$(INTDIR)/remove.obj" \ + "$(INTDIR)/getline.obj" \ + "$(INTDIR)/hash.obj" \ + "$(INTDIR)/subr.obj" \ + "$(INTDIR)/zutil.obj" \ + "$(INTDIR)/crc32.obj" + +"$(OUTDIR)\cvs.exe" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) $(LINK32) @<< $(LINK32_FLAGS) $(LINK32_OBJS) << @@ -502,1742 +509,2338 @@ $(OUTDIR)/cvs.exe : $(OUTDIR) $(DEF_FILE) $(LINK32_OBJS) .cxx{$(CPP_OBJS)}.obj: $(CPP) $(CPP_PROJ) $< +.c{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + ################################################################################ -# Begin Group "src" +# Begin Target + +# Name "cvsnt - Win32 Release" +# Name "cvsnt - Win32 Debug" + +!IF "$(CFG)" == "cvsnt - Win32 Release" + +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" + +!ENDIF ################################################################################ # Begin Source File SOURCE=.\src\mkmodules.c -DEP_MKMOD=\ - .\src\cvs.h\ - .\lib\savecwd.h\ +DEP_CPP_MKMOD=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(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) -$(INTDIR)/mkmodules.obj : $(SOURCE) $(DEP_MKMOD) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\subr.c -DEP_SUBR_=\ - .\src\cvs.h\ +DEP_CPP_SUBR_=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_SUBR_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\subr.obj" : $(SOURCE) $(DEP_CPP_SUBR_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/subr.obj : $(SOURCE) $(DEP_SUBR_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\admin.c -DEP_ADMIN=\ - .\src\cvs.h\ +DEP_CPP_ADMIN=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_ADMIN=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\admin.obj" : $(SOURCE) $(DEP_CPP_ADMIN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/admin.obj : $(SOURCE) $(DEP_ADMIN) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\server.c -DEP_SERVE=\ - .\src\cvs.h\ - .\src\watch.h\ - .\src\edit.h\ - .\src\fileattr.h\ +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"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_SERVE=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\server.obj" : $(SOURCE) $(DEP_CPP_SERVE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/server.obj : $(SOURCE) $(DEP_SERVE) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\diff.c -DEP_DIFF_=\ - .\src\cvs.h\ +DEP_CPP_DIFF_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_DIFF_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\diff.obj" : $(SOURCE) $(DEP_CPP_DIFF_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/diff.obj : $(SOURCE) $(DEP_DIFF_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\client.c -DEP_CLIEN=\ +DEP_CPP_CLIEN=\ ".\windows-NT\config.h"\ - .\src\cvs.h\ - .\lib\getline.h\ - .\src\edit.h\ - .\lib\md5.h\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ + ".\src\edit.h"\ + ".\src\buffer.h"\ + ".\lib\md5.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CLIEN=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\client.obj" : $(SOURCE) $(DEP_CPP_CLIEN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/client.obj : $(SOURCE) $(DEP_CLIEN) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\checkout.c -DEP_CHECK=\ - .\src\cvs.h\ +DEP_CPP_CHECK=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CHECK=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\checkout.obj" : $(SOURCE) $(DEP_CPP_CHECK) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/checkout.obj : $(SOURCE) $(DEP_CHECK) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\no_diff.c -DEP_NO_DI=\ - .\src\cvs.h\ +DEP_CPP_NO_DI=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_NO_DI=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\no_diff.obj" : $(SOURCE) $(DEP_CPP_NO_DI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/no_diff.obj : $(SOURCE) $(DEP_NO_DI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\entries.c -DEP_ENTRI=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_ENTRI=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_ENTRI=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\entries.obj" : $(SOURCE) $(DEP_CPP_ENTRI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/entries.obj : $(SOURCE) $(DEP_ENTRI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\tag.c -DEP_TAG_C=\ - .\src\cvs.h\ - .\lib\savecwd.h\ +DEP_CPP_TAG_C=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_TAG_C=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\tag.obj" : $(SOURCE) $(DEP_CPP_TAG_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/tag.obj : $(SOURCE) $(DEP_TAG_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rtag.c -DEP_RTAG_=\ - .\src\cvs.h\ +DEP_CPP_RTAG_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RTAG_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\rtag.obj" : $(SOURCE) $(DEP_CPP_RTAG_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/rtag.obj : $(SOURCE) $(DEP_RTAG_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\status.c -DEP_STATU=\ - .\src\cvs.h\ +DEP_CPP_STATU=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_STATU=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\status.obj" : $(SOURCE) $(DEP_CPP_STATU) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/status.obj : $(SOURCE) $(DEP_STATU) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\root.c -DEP_ROOT_=\ - .\src\cvs.h\ +DEP_CPP_ROOT_=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_ROOT_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\root.obj" : $(SOURCE) $(DEP_CPP_ROOT_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/root.obj : $(SOURCE) $(DEP_ROOT_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\myndbm.c -DEP_MYNDB=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_MYNDB=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_MYNDB=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\myndbm.obj" : $(SOURCE) $(DEP_CPP_MYNDB) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/myndbm.obj : $(SOURCE) $(DEP_MYNDB) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\hash.c -DEP_HASH_=\ - .\src\cvs.h\ +DEP_CPP_HASH_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_HASH_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\hash.obj" : $(SOURCE) $(DEP_CPP_HASH_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/hash.obj : $(SOURCE) $(DEP_HASH_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\repos.c -DEP_REPOS=\ - .\src\cvs.h\ +DEP_CPP_REPOS=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_REPOS=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\repos.obj" : $(SOURCE) $(DEP_CPP_REPOS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/repos.obj : $(SOURCE) $(DEP_REPOS) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\parseinfo.c -DEP_PARSE=\ - .\src\cvs.h\ +DEP_CPP_PARSE=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_PARSE=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\parseinfo.obj" : $(SOURCE) $(DEP_CPP_PARSE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/parseinfo.obj : $(SOURCE) $(DEP_PARSE) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\vers_ts.c -DEP_VERS_=\ - .\src\cvs.h\ +DEP_CPP_VERS_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_VERS_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\vers_ts.obj" : $(SOURCE) $(DEP_CPP_VERS_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/vers_ts.obj : $(SOURCE) $(DEP_VERS_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\checkin.c -DEP_CHECKI=\ - .\src\cvs.h\ - .\src\fileattr.h\ - .\src\edit.h\ +DEP_CPP_CHECKI=\ + ".\src\cvs.h"\ + ".\src\fileattr.h"\ + ".\src\edit.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CHECKI=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\checkin.obj" : $(SOURCE) $(DEP_CPP_CHECKI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/checkin.obj : $(SOURCE) $(DEP_CHECKI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\commit.c -DEP_COMMI=\ - .\src\cvs.h\ - .\lib\getline.h\ - .\src\edit.h\ - .\src\fileattr.h\ +DEP_CPP_COMMI=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ + ".\src\edit.h"\ + ".\src\fileattr.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_COMMI=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\commit.obj" : $(SOURCE) $(DEP_CPP_COMMI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/commit.obj : $(SOURCE) $(DEP_COMMI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\version.c -DEP_VERSI=\ - .\src\cvs.h\ +DEP_CPP_VERSI=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_VERSI=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\version.obj" : $(SOURCE) $(DEP_CPP_VERSI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/version.obj : $(SOURCE) $(DEP_VERSI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\cvsrc.c -DEP_CVSRC=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_CVSRC=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CVSRC=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\cvsrc.obj" : $(SOURCE) $(DEP_CPP_CVSRC) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/cvsrc.obj : $(SOURCE) $(DEP_CVSRC) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\remove.c -DEP_REMOV=\ - .\src\cvs.h\ +DEP_CPP_REMOV=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_REMOV=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\remove.obj" : $(SOURCE) $(DEP_CPP_REMOV) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/remove.obj : $(SOURCE) $(DEP_REMOV) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\update.c -DEP_UPDAT=\ - .\src\cvs.h\ - .\lib\md5.h\ - .\src\watch.h\ - .\src\fileattr.h\ - .\src\edit.h\ +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"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_UPDAT=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\update.obj" : $(SOURCE) $(DEP_CPP_UPDAT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/update.obj : $(SOURCE) $(DEP_UPDAT) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\logmsg.c -DEP_LOGMS=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_LOGMS=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_LOGMS=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\logmsg.obj" : $(SOURCE) $(DEP_CPP_LOGMS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/logmsg.obj : $(SOURCE) $(DEP_LOGMS) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\classify.c -DEP_CLASS=\ - .\src\cvs.h\ +DEP_CPP_CLASS=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CLASS=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\classify.obj" : $(SOURCE) $(DEP_CPP_CLASS) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/classify.obj : $(SOURCE) $(DEP_CLASS) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\history.c -DEP_HISTO=\ - .\src\cvs.h\ +DEP_CPP_HISTO=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_HISTO=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\history.obj" : $(SOURCE) $(DEP_CPP_HISTO) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/history.obj : $(SOURCE) $(DEP_HISTO) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\add.c -DEP_ADD_C=\ - .\src\cvs.h\ - .\lib\savecwd.h\ +DEP_CPP_ADD_C=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_ADD_C=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\add.obj" : $(SOURCE) $(DEP_CPP_ADD_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/add.obj : $(SOURCE) $(DEP_ADD_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\lock.c -DEP_LOCK_=\ - .\src\cvs.h\ +DEP_CPP_LOCK_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_LOCK_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\lock.obj" : $(SOURCE) $(DEP_CPP_LOCK_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/lock.obj : $(SOURCE) $(DEP_LOCK_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\recurse.c -DEP_RECUR=\ - .\src\cvs.h\ - .\lib\savecwd.h\ - .\src\fileattr.h\ - .\src\edit.h\ +DEP_CPP_RECUR=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ + ".\src\fileattr.h"\ + ".\src\edit.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RECUR=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\recurse.obj" : $(SOURCE) $(DEP_CPP_RECUR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/recurse.obj : $(SOURCE) $(DEP_RECUR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\modules.c -DEP_MODUL=\ - .\src\cvs.h\ - .\lib\savecwd.h\ +DEP_CPP_MODUL=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_MODUL=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\modules.obj" : $(SOURCE) $(DEP_CPP_MODUL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/modules.obj : $(SOURCE) $(DEP_MODUL) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\find_names.c -DEP_FIND_=\ - .\src\cvs.h\ +DEP_CPP_FIND_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_FIND_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\find_names.obj" : $(SOURCE) $(DEP_CPP_FIND_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/find_names.obj : $(SOURCE) $(DEP_FIND_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rcs.c -DEP_RCS_C=\ - .\src\cvs.h\ +DEP_CPP_RCS_C=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RCS_C=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\rcs.obj" : $(SOURCE) $(DEP_CPP_RCS_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/rcs.obj : $(SOURCE) $(DEP_RCS_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\create_adm.c -DEP_CREAT=\ - .\src\cvs.h\ +DEP_CPP_CREAT=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_CREAT=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\create_adm.obj" : $(SOURCE) $(DEP_CPP_CREAT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/create_adm.obj : $(SOURCE) $(DEP_CREAT) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\main.c -DEP_MAIN_=\ - .\src\cvs.h\ +DEP_CPP_MAIN_=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_MAIN_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\main.obj" : $(SOURCE) $(DEP_CPP_MAIN_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/main.obj : $(SOURCE) $(DEP_MAIN_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\patch.c -DEP_PATCH=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_PATCH=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_PATCH=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\patch.obj" : $(SOURCE) $(DEP_CPP_PATCH) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/patch.obj : $(SOURCE) $(DEP_PATCH) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\release.c -DEP_RELEA=\ - .\src\cvs.h\ +DEP_CPP_RELEA=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RELEA=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\release.obj" : $(SOURCE) $(DEP_CPP_RELEA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/release.obj : $(SOURCE) $(DEP_RELEA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\rcscmds.c -DEP_RCSCM=\ - .\src\cvs.h\ +DEP_CPP_RCSCM=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RCSCM=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\rcscmds.obj" : $(SOURCE) $(DEP_CPP_RCSCM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/rcscmds.obj : $(SOURCE) $(DEP_RCSCM) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\import.c -DEP_IMPOR=\ - .\src\cvs.h\ - .\lib\savecwd.h\ +DEP_CPP_IMPOR=\ + ".\src\cvs.h"\ + ".\lib\savecwd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_IMPOR=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\import.obj" : $(SOURCE) $(DEP_CPP_IMPOR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/import.obj : $(SOURCE) $(DEP_IMPOR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\ignore.c -DEP_IGNOR=\ - .\src\cvs.h\ +DEP_CPP_IGNOR=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_IGNOR=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\ignore.obj" : $(SOURCE) $(DEP_CPP_IGNOR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/ignore.obj : $(SOURCE) $(DEP_IGNOR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\log.c -DEP_LOG_C=\ - .\src\cvs.h\ +DEP_CPP_LOG_C=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(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) -$(INTDIR)/log.obj : $(SOURCE) $(DEP_LOG_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\wrapper.c -DEP_WRAPP=\ - .\src\cvs.h\ +DEP_CPP_WRAPP=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_WRAPP=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\wrapper.obj" : $(SOURCE) $(DEP_CPP_WRAPP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/wrapper.obj : $(SOURCE) $(DEP_WRAPP) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\error.c -DEP_ERROR=\ - .\src\cvs.h\ +DEP_CPP_ERROR=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_ERROR=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\error.obj" : $(SOURCE) $(DEP_CPP_ERROR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/error.obj : $(SOURCE) $(DEP_ERROR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\expand_path.c -DEP_EXPAN=\ - .\src\cvs.h\ +DEP_CPP_EXPAN=\ + ".\src\cvs.h"\ + {$(INCLUDE)}"\sys\Types.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_EXPAN=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\expand_path.obj" : $(SOURCE) $(DEP_CPP_EXPAN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/expand_path.obj : $(SOURCE) $(DEP_EXPAN) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\edit.c -DEP_EDIT_=\ - .\src\cvs.h\ - .\lib\getline.h\ - .\src\watch.h\ - .\src\edit.h\ - .\src\fileattr.h\ +DEP_CPP_EDIT_=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ + ".\src\watch.h"\ + ".\src\edit.h"\ + ".\src\fileattr.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_EDIT_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\edit.obj" : $(SOURCE) $(DEP_CPP_EDIT_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/edit.obj : $(SOURCE) $(DEP_EDIT_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\fileattr.c -DEP_FILEA=\ - .\src\cvs.h\ - .\lib\getline.h\ - .\src\fileattr.h\ +DEP_CPP_FILEA=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ + ".\src\fileattr.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_FILEA=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\fileattr.obj" : $(SOURCE) $(DEP_CPP_FILEA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/fileattr.obj : $(SOURCE) $(DEP_FILEA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\watch.c -DEP_WATCH=\ - .\src\cvs.h\ - .\src\edit.h\ - .\src\fileattr.h\ - .\src\watch.h\ +DEP_CPP_WATCH=\ + ".\src\cvs.h"\ + ".\src\edit.h"\ + ".\src\fileattr.h"\ + ".\src\watch.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_WATCH=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\watch.obj" : $(SOURCE) $(DEP_CPP_WATCH) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/watch.obj : $(SOURCE) $(DEP_WATCH) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\login.c -DEP_LOGIN=\ - .\src\cvs.h\ - .\lib\getline.h\ +DEP_CPP_LOGIN=\ + ".\src\cvs.h"\ + ".\lib\getline.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_LOGIN=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\login.obj" : $(SOURCE) $(DEP_CPP_LOGIN) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/login.obj : $(SOURCE) $(DEP_LOGIN) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\scramble.c -DEP_SCRAM=\ - .\src\cvs.h\ +DEP_CPP_SCRAM=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_SCRAM=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\scramble.obj" : $(SOURCE) $(DEP_CPP_SCRAM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/scramble.obj : $(SOURCE) $(DEP_SCRAM) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\buffer.c -DEP_BUFFE=\ - .\src\cvs.h\ - .\src\buffer.h\ +DEP_CPP_BUFFE=\ + ".\src\cvs.h"\ + ".\src\buffer.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - .\src\server.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_BUFFE=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\buffer.obj" : $(SOURCE) $(DEP_CPP_BUFFE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/buffer.obj : $(SOURCE) $(DEP_BUFFE) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\zlib.c -DEP_ZLIB_=\ - .\src\cvs.h\ - .\src\buffer.h\ +DEP_CPP_ZLIB_=\ + ".\src\cvs.h"\ + ".\src\buffer.h"\ + ".\zlib\zlib.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - .\src\server.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + ".\zlib\zconf.h"\ + +NODEP_CPP_ZLIB_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\zlib.obj" : $(SOURCE) $(DEP_CPP_ZLIB_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/zlib.obj : $(SOURCE) $(DEP_ZLIB_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\src\ChangeLog -# End Source File -# End Group -################################################################################ -# Begin Group "lib" +!IF "$(CFG)" == "cvsnt - Win32 Release" + +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" + +!ENDIF + +# End Source File ################################################################################ # Begin Source File SOURCE=.\lib\getwd.c -DEP_GETWD=\ +DEP_CPP_GETWD=\ ".\windows-NT\config.h"\ - .\lib\system.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_GETWD=\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\getwd.obj" : $(SOURCE) $(DEP_CPP_GETWD) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/getwd.obj : $(SOURCE) $(DEP_GETWD) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\sighandle.c -DEP_SIGHA=\ +DEP_CPP_SIGHA=\ ".\windows-NT\config.h"\ - .\lib\system.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_SIGHA=\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\sighandle.obj" : $(SOURCE) $(DEP_CPP_SIGHA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/sighandle.obj : $(SOURCE) $(DEP_SIGHA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\getopt.c -DEP_GETOP=\ +DEP_CPP_GETOP=\ ".\windows-NT\config.h"\ - .\lib\getopt.h + ".\lib\getopt.h"\ + + +"$(INTDIR)\getopt.obj" : $(SOURCE) $(DEP_CPP_GETOP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/getopt.obj : $(SOURCE) $(DEP_GETOP) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\argmatch.c -DEP_ARGMA=\ - ".\windows-NT\config.h" +DEP_CPP_ARGMA=\ + ".\windows-NT\config.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + + +"$(INTDIR)\argmatch.obj" : $(SOURCE) $(DEP_CPP_ARGMA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/argmatch.obj : $(SOURCE) $(DEP_ARGMA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\md5.c -DEP_MD5_C=\ +DEP_CPP_MD5_C=\ ".\windows-NT\config.h"\ - .\lib\md5.h + ".\lib\md5.h"\ + + +"$(INTDIR)\md5.obj" : $(SOURCE) $(DEP_CPP_MD5_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/md5.obj : $(SOURCE) $(DEP_MD5_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\yesno.c -DEP_YESNO=\ - ".\windows-NT\config.h" +DEP_CPP_YESNO=\ + ".\windows-NT\config.h"\ + + +"$(INTDIR)\yesno.obj" : $(SOURCE) $(DEP_CPP_YESNO) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/yesno.obj : $(SOURCE) $(DEP_YESNO) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\getopt1.c -DEP_GETOPT=\ +DEP_CPP_GETOPT=\ ".\windows-NT\config.h"\ - .\lib\getopt.h + ".\lib\getopt.h"\ + + +"$(INTDIR)\getopt1.obj" : $(SOURCE) $(DEP_CPP_GETOPT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/getopt1.obj : $(SOURCE) $(DEP_GETOPT) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\valloc.c -DEP_VALLO=\ +DEP_CPP_VALLO=\ ".\windows-NT\config.h"\ - .\lib\system.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_VALLO=\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\valloc.obj" : $(SOURCE) $(DEP_CPP_VALLO) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/valloc.obj : $(SOURCE) $(DEP_VALLO) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\xgetwd.c -DEP_XGETW=\ +DEP_CPP_XGETW=\ ".\windows-NT\config.h"\ - .\lib\system.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_XGETW=\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\xgetwd.obj" : $(SOURCE) $(DEP_CPP_XGETW) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/xgetwd.obj : $(SOURCE) $(DEP_XGETW) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\regex.c -DEP_REGEX=\ +DEP_CPP_REGEX=\ + {$(INCLUDE)}"\sys\Types.h"\ ".\windows-NT\config.h"\ - .\lib\regex.h + ".\src\buffer.h"\ + ".\lib\regex.h"\ + +NODEP_CPP_REGEX=\ + ".\lib\lisp.h"\ + ".\lib\syntax.h"\ + + +"$(INTDIR)\regex.obj" : $(SOURCE) $(DEP_CPP_REGEX) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/regex.obj : $(SOURCE) $(DEP_REGEX) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\fnmatch.c -DEP_FNMAT=\ +DEP_CPP_FNMAT=\ ".\windows-NT\config.h"\ - .\lib\fnmatch.h + ".\lib\fnmatch.h"\ + + +"$(INTDIR)\fnmatch.obj" : $(SOURCE) $(DEP_CPP_FNMAT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/fnmatch.obj : $(SOURCE) $(DEP_FNMAT) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\getdate.c -DEP_GETDA=\ - ".\windows-NT\config.h" +DEP_CPP_GETDA=\ + ".\windows-NT\config.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + + +"$(INTDIR)\getdate.obj" : $(SOURCE) $(DEP_CPP_GETDA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/getdate.obj : $(SOURCE) $(DEP_GETDA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\getline.c -DEP_GETLI=\ - ".\windows-NT\config.h" +DEP_CPP_GETLI=\ + ".\windows-NT\config.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + + +"$(INTDIR)\getline.obj" : $(SOURCE) $(DEP_CPP_GETLI) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/getline.obj : $(SOURCE) $(DEP_GETLI) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\savecwd.c -DEP_SAVEC=\ +DEP_CPP_SAVEC=\ ".\windows-NT\config.h"\ - .\lib\savecwd.h\ - .\src\error.h + ".\lib\savecwd.h"\ + + +"$(INTDIR)\savecwd.obj" : $(SOURCE) $(DEP_CPP_SAVEC) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/savecwd.obj : $(SOURCE) $(DEP_SAVEC) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\lib\vasprintf.c -DEP_VASPR=\ - ".\windows-NT\config.h" +DEP_CPP_VASPR=\ + ".\windows-NT\config.h"\ + -$(INTDIR)/vasprintf.obj : $(SOURCE) $(DEP_VASPR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\vasprintf.obj" : $(SOURCE) $(DEP_CPP_VASPR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -# End Source File -# End Group -################################################################################ -# Begin Group "windows-NT" +# End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\mkdir.c" -DEP_MKDIR=\ - .\src\cvs.h\ +DEP_CPP_MKDIR=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_MKDIR=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\mkdir.obj" : $(SOURCE) $(DEP_CPP_MKDIR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/mkdir.obj : $(SOURCE) $(DEP_MKDIR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\run.c" -DEP_RUN_C=\ - .\src\cvs.h\ +DEP_CPP_RUN_C=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RUN_C=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\run.obj" : $(SOURCE) $(DEP_CPP_RUN_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/run.obj : $(SOURCE) $(DEP_RUN_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\pwd.c" -DEP_PWD_C=\ - ".\windows-NT\pwd.h" +DEP_CPP_PWD_C=\ + ".\windows-NT\pwd.h"\ + + +"$(INTDIR)\pwd.obj" : $(SOURCE) $(DEP_CPP_PWD_C) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/pwd.obj : $(SOURCE) $(DEP_PWD_C) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\filesubr.c" -DEP_FILES=\ - .\src\cvs.h\ +DEP_CPP_FILES=\ + ".\src\cvs.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_FILES=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\filesubr.obj" : $(SOURCE) $(DEP_CPP_FILES) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/filesubr.obj : $(SOURCE) $(DEP_FILES) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\win32.c" -DEP_WIN32=\ - ".\windows-NT\config.h" +DEP_CPP_WIN32=\ + ".\windows-NT\config.h"\ + + +"$(INTDIR)\win32.obj" : $(SOURCE) $(DEP_CPP_WIN32) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/win32.obj : $(SOURCE) $(DEP_WIN32) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\waitpid.c" -DEP_WAITP=\ - ".\windows-NT\config.h" +DEP_CPP_WAITP=\ + ".\windows-NT\config.h"\ + + +"$(INTDIR)\waitpid.obj" : $(SOURCE) $(DEP_CPP_WAITP) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/waitpid.obj : $(SOURCE) $(DEP_WAITP) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\ndir.c" -DEP_NDIR_=\ - ".\windows-NT\ndir.h" +DEP_CPP_NDIR_=\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + ".\windows-NT\ndir.h"\ + + +"$(INTDIR)\ndir.obj" : $(SOURCE) $(DEP_CPP_NDIR_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/ndir.obj : $(SOURCE) $(DEP_NDIR_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ @@ -2245,258 +2848,325 @@ $(INTDIR)/ndir.obj : $(SOURCE) $(DEP_NDIR_) $(INTDIR) SOURCE=".\windows-NT\stripslash.c" -$(INTDIR)/stripslash.obj : $(SOURCE) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) +"$(INTDIR)\stripslash.obj" : $(SOURCE) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) + # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\rcmd.c" -DEP_RCMD_=\ - ".\windows-NT\rcmd.h" +DEP_CPP_RCMD_=\ + ".\src\cvs.h"\ + ".\windows-NT\rcmd.h"\ + ".\windows-NT\config.h"\ + ".\windows-NT\options.h"\ + ".\lib\fnmatch.h"\ + ".\windows-NT\pwd.h"\ + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_RCMD_=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\rcmd.obj" : $(SOURCE) $(DEP_CPP_RCMD_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/rcmd.obj : $(SOURCE) $(DEP_RCMD_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\startserver.c" -DEP_START=\ - .\src\cvs.h\ +DEP_CPP_START=\ + ".\src\cvs.h"\ ".\windows-NT\rcmd.h"\ ".\windows-NT\config.h"\ ".\windows-NT\options.h"\ - .\lib\fnmatch.h\ + ".\lib\fnmatch.h"\ ".\windows-NT\pwd.h"\ - .\lib\system.h\ - .\src\hash.h\ - .\src\server.h\ - .\src\client.h\ - .\src\myndbm.h\ - .\lib\regex.h\ - .\lib\getopt.h\ - .\lib\wait.h\ - .\src\rcs.h\ - .\src\error.h\ - .\src\update.h\ - ".\windows-NT\ndir.h" + ".\lib\system.h"\ + ".\src\hash.h"\ + ".\src\client.h"\ + ".\src\myndbm.h"\ + ".\lib\regex.h"\ + ".\lib\getopt.h"\ + ".\lib\wait.h"\ + ".\src\rcs.h"\ + ".\src\update.h"\ + ".\src\server.h"\ + {$(INCLUDE)}"\sys\Types.h"\ + {$(INCLUDE)}"\sys\Stat.h"\ + {$(INCLUDE)}"\sys\Timeb.h"\ + {$(INCLUDE)}"\sys\Utime.h"\ + ".\windows-NT\ndir.h"\ + +NODEP_CPP_START=\ + ".\src\popen.h"\ + ".\lib\tcpip.h"\ + + +"$(INTDIR)\startserver.obj" : $(SOURCE) $(DEP_CPP_START) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/startserver.obj : $(SOURCE) $(DEP_START) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=".\windows-NT\ChangeLog" -# End Source File -# End Group -################################################################################ -# Begin Group "zlib" +!IF "$(CFG)" == "cvsnt - Win32 Release" + +!ELSEIF "$(CFG)" == "cvsnt - Win32 Debug" + +!ENDIF + +# End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\zutil.c -DEP_ZUTIL=\ - .\zlib\zutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_ZUTIL=\ + ".\zlib\zutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\zutil.obj" : $(SOURCE) $(DEP_CPP_ZUTIL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/zutil.obj : $(SOURCE) $(DEP_ZUTIL) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\infutil.c -DEP_INFUT=\ - .\zlib\zutil.h\ - .\zlib\infblock.h\ - .\zlib\inftrees.h\ - .\zlib\infcodes.h\ - .\zlib\infutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFUT=\ + ".\zlib\zutil.h"\ + ".\zlib\infblock.h"\ + ".\zlib\inftrees.h"\ + ".\zlib\infcodes.h"\ + ".\zlib\infutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\infutil.obj" : $(SOURCE) $(DEP_CPP_INFUT) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/infutil.obj : $(SOURCE) $(DEP_INFUT) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\infblock.c -DEP_INFBL=\ - .\zlib\zutil.h\ - .\zlib\infblock.h\ - .\zlib\inftrees.h\ - .\zlib\infcodes.h\ - .\zlib\infutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFBL=\ + ".\zlib\zutil.h"\ + ".\zlib\infblock.h"\ + ".\zlib\inftrees.h"\ + ".\zlib\infcodes.h"\ + ".\zlib\infutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\infblock.obj" : $(SOURCE) $(DEP_CPP_INFBL) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/infblock.obj : $(SOURCE) $(DEP_INFBL) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\compress.c -DEP_COMPR=\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_COMPR=\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\compress.obj" : $(SOURCE) $(DEP_CPP_COMPR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/compress.obj : $(SOURCE) $(DEP_COMPR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\uncompr.c -DEP_UNCOM=\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_UNCOM=\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\uncompr.obj" : $(SOURCE) $(DEP_CPP_UNCOM) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/uncompr.obj : $(SOURCE) $(DEP_UNCOM) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\inflate.c -DEP_INFLA=\ - .\zlib\zutil.h\ - .\zlib\infblock.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFLA=\ + ".\zlib\zutil.h"\ + ".\zlib\infblock.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\inflate.obj" : $(SOURCE) $(DEP_CPP_INFLA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/inflate.obj : $(SOURCE) $(DEP_INFLA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\inftrees.c -DEP_INFTR=\ - .\zlib\zutil.h\ - .\zlib\inftrees.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFTR=\ + ".\zlib\zutil.h"\ + ".\zlib\inftrees.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\inftrees.obj" : $(SOURCE) $(DEP_CPP_INFTR) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/inftrees.obj : $(SOURCE) $(DEP_INFTR) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\gzio.c -DEP_GZIO_=\ - .\zlib\zutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_GZIO_=\ + ".\zlib\zutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\gzio.obj" : $(SOURCE) $(DEP_CPP_GZIO_) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/gzio.obj : $(SOURCE) $(DEP_GZIO_) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\infcodes.c -DEP_INFCO=\ - .\zlib\zutil.h\ - .\zlib\inftrees.h\ - .\zlib\infblock.h\ - .\zlib\infcodes.h\ - .\zlib\infutil.h\ - .\zlib\inffast.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFCO=\ + ".\zlib\zutil.h"\ + ".\zlib\inftrees.h"\ + ".\zlib\infblock.h"\ + ".\zlib\infcodes.h"\ + ".\zlib\infutil.h"\ + ".\zlib\inffast.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\infcodes.obj" : $(SOURCE) $(DEP_CPP_INFCO) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/infcodes.obj : $(SOURCE) $(DEP_INFCO) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\deflate.c -DEP_DEFLA=\ - .\zlib\deflate.h\ - .\zlib\zutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_DEFLA=\ + ".\zlib\deflate.h"\ + ".\zlib\zutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\deflate.obj" : $(SOURCE) $(DEP_CPP_DEFLA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/deflate.obj : $(SOURCE) $(DEP_DEFLA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\adler32.c -DEP_ADLER=\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_ADLER=\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\adler32.obj" : $(SOURCE) $(DEP_CPP_ADLER) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/adler32.obj : $(SOURCE) $(DEP_ADLER) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\crc32.c -DEP_CRC32=\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_CRC32=\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\crc32.obj" : $(SOURCE) $(DEP_CPP_CRC32) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/crc32.obj : $(SOURCE) $(DEP_CRC32) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\inffast.c -DEP_INFFA=\ - .\zlib\zutil.h\ - .\zlib\inftrees.h\ - .\zlib\infblock.h\ - .\zlib\infcodes.h\ - .\zlib\infutil.h\ - .\zlib\inffast.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_INFFA=\ + ".\zlib\zutil.h"\ + ".\zlib\inftrees.h"\ + ".\zlib\infblock.h"\ + ".\zlib\infcodes.h"\ + ".\zlib\infutil.h"\ + ".\zlib\inffast.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\inffast.obj" : $(SOURCE) $(DEP_CPP_INFFA) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/inffast.obj : $(SOURCE) $(DEP_INFFA) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File ################################################################################ # Begin Source File SOURCE=.\zlib\trees.c -DEP_TREES=\ - .\zlib\deflate.h\ - .\zlib\zutil.h\ - .\zlib\zlib.h\ - .\zlib\zconf.h +DEP_CPP_TREES=\ + ".\zlib\deflate.h"\ + ".\zlib\zutil.h"\ + ".\zlib\zlib.h"\ + ".\zlib\zconf.h"\ + + +"$(INTDIR)\trees.obj" : $(SOURCE) $(DEP_CPP_TREES) "$(INTDIR)" + $(CPP) $(CPP_PROJ) $(SOURCE) -$(INTDIR)/trees.obj : $(SOURCE) $(DEP_TREES) $(INTDIR) - $(CPP) $(CPP_PROJ) $(SOURCE) # End Source File -# End Group +# End Target # End Project ################################################################################ diff --git a/gnu/usr.bin/cvs/doc/ChangeLog b/gnu/usr.bin/cvs/doc/ChangeLog index 4cfcb234b48..e956d4f791d 100644 --- a/gnu/usr.bin/cvs/doc/ChangeLog +++ b/gnu/usr.bin/cvs/doc/ChangeLog @@ -1,3 +1,133 @@ +Sun Mar 16 12:37:12 1997 Jim Kingdon + + * cvs.texinfo (File permissions): CVSUMASK now works for RCS + files; but it is (still) awkward for client/server CVS. + +Sat Mar 15 17:41:12 1997 Jim Kingdon + + * cvs.texinfo (Magic branch numbers): Add comment about where this + should go. + +Thu Mar 13 09:11:36 1997 Jim Kingdon + + * cvs.texinfo (Credits): Fix grammatical mistake ("manual about" + -> "manual is about"). Reported by Philippe De Muyter. + +Sun Mar 9 09:06:40 1997 Jim Kingdon + + * cvs.texinfo (File permissions): Add comment about val-tags and + CVSUMASK. + +Sun Mar 2 12:33:26 1997 Jim Kingdon + + * cvs.texinfo (From scratch): Add comment about creating + directories with add rather than import. + + * cvs.texinfo (Creating a repository): Add comment about how this + somewhat duplicates Server requirements. + + * cvs.texinfo (Connecting via rsh): Add comment about rsh + vs. remsh. Also wording fix ("incorrect" -> "inapplicable"). + + * cvs.texinfo (Outside): Add comment about renames and annotate. + + * cvs.texinfo (Server requirements): New node. + +Thu Feb 27 15:20:49 1997 Jim Kingdon + + * cvs.texinfo (Multiple developers): Reword section on "cvs admin + -l". As nearly as I can tell based on when it came up on info-cvs + and other contexts, people who are into reserved checkouts + generally find that cvs admin -l is OK. Add a bunch more notes + (inside @ignore) about reserved checkout implementation ideas. + +Sun Feb 23 16:12:03 1997 Jim Kingdon + + * cvs.texinfo (Common options): Add various additional comments + about date formats. + + * RCSFILES: Remove diff for Id and explain it in words instead. + The previous values for Id had been clobbered by keyword expansion + on the RCSFILES file itself. + +Sat Feb 22 14:16:28 1997 Jim Kingdon + + * Makefile.in (DISTFILES): Fix typo (missing backslash). + +Fri Feb 21 23:08:38 1997 Jim Kingdon + + * RCSFILES: New file. + * Makefile.in (DISTFILES): Add RCSFILES. + +20 Feb 1997 Lenny Foner + + * cvs.texinfo (Checklist): Fix typo ("keword" -> "keyword"). + +Thu Feb 20 21:57:05 1997 Jim Kingdon + + * cvs.texinfo (Keeping a checked out copy): Add "web" to index. + +Wed Feb 12 18:44:16 1997 Jim Kingdon + + * cvs.texinfo (Password authentication client, Invoking CVS): + Document "cvs logout" command. + +Tue Feb 11 20:42:45 1997 Ian Lance Taylor + + * cvs.texinfo (commit options): Document that the -f option to + commit disables recursion. + +Sun Feb 9 13:58:59 1997 Jim Kingdon + + * cvs.texinfo (diff options): Document all the options we pass + through to diff. Remove paragraph about -D sometimes meaning + --ifdef since that is no longer true. + + * cvs.texinfo (Multiple developers): Add lengthy comment about + reserved checkout design issues. + + * cvs.texinfo (Wrappers): Add paragraph about timestamps. + + * cvs.texinfo (commit options): Don't try to document what CVS 1.3 + does with -f and how recent versions differ: 1.3 is pretty old + anyway, we generally only try to document the current version, and + the way it was described here was pretty confusing. + (Environment variables): Likewise for CVSEDITOR. + + * cvs.texinfo (import output): Add index entries for symbolic + links. Add brief mention of whether behavior should be + different. Add comments on other symbolic link issues. + +Wed Feb 5 13:02:37 1997 Jim Kingdon + + * cvs.texinfo (Concurrency): Add comment about commit/commit + atomicity. + +Mon Feb 3 10:55:41 1997 joel boutros + + * cvs.texinfo (Connecting via rsh): Fix typo (programs -> problems). + +Fri Jan 31 12:18:47 1997 Ian Lance Taylor + + * cvsclient.texi (Connection and Authentication): Correct typo + (``sent'' for ``send''), and rewrite sentence for clarity. + +Fri Jan 24 10:31:57 1997 Jim Kingdon + + * cvs.texinfo (File status): Change "Unresolved Conflict" to "File + had conflicts on merge" per change to CVS. + +Sun Jan 19 16:21:17 1997 Jim Kingdon + + * cvs.texinfo (admin): Add comments about "group" and "compiled in + value". At least one info-cvs poster was confused by this. + +Thu Jan 16 17:54:51 1997 Jim Kingdon + + * cvs.texinfo (Wrappers): It is just -t/-f which doesn't work + client/server. -k *does* (well, except for the problem with + import noted in BUGS). -m I don't know and I doubt anyone cares. + Mon Jan 13 15:41:02 1997 Karl Fogel * cvs.texinfo (Read-only access): rephrase to imply that there may diff --git a/gnu/usr.bin/cvs/doc/Makefile.in b/gnu/usr.bin/cvs/doc/Makefile.in index c7cf098b8e9..b281fe69e11 100644 --- a/gnu/usr.bin/cvs/doc/Makefile.in +++ b/gnu/usr.bin/cvs/doc/Makefile.in @@ -28,6 +28,7 @@ INSTALL_DATA = @INSTALL_DATA@ DISTFILES = \ .cvsignore ChangeLog ChangeLog.fsf Makefile.in \ + RCSFILES \ cvs-paper.ms cvs-paper.ps \ cvs.texinfo \ cvsclient.texi diff --git a/gnu/usr.bin/cvs/doc/RCSFILES b/gnu/usr.bin/cvs/doc/RCSFILES new file mode 100644 index 00000000000..0ac61aa1d42 --- /dev/null +++ b/gnu/usr.bin/cvs/doc/RCSFILES @@ -0,0 +1,123 @@ +It would be nice for the RCS file format (which is implemented by a +great many tools, both free and non-free, both by calling GNU RCS and +by reimplementing access to RCS files) were documented in some +standard separate from any one tool. But as far as I know no such +standard exists. Hence this file. + +The place to start is the rcsfile.5 manpage in the GNU RCS 5.7 +distribution. Then look at the diff at the end of this file (which +contains a few fixes and clarifications to that manpage). + +If you are interested in MKS RCS, src/ci.c in GNU RCS 5.7 has a +comment about their date format. However, as far as we know there +isn't really any document describing MKS's changes to the RCS file +format. + +The rcsfile.5 manpage does not document what goes in the "text" field +for each revision. The answer is that the head revision contains the +contents of that revision and every other revision contain a bunch of +edits to produce that revision ("a" and "d" lines). The GNU diff +manual (the version I looked at was for GNU diff 2.4) documents this +format somewhat (as the "RCS output format"), but the presentation is +a bit confusing as it is all tangled up with the documentation of +several other output formats. If you just want some source code to +look at, the part of CVS which applies these is RCS_deltas in +src/rcs.c. + +The first time I read rcsfile.5 I didn't really notice the part about +the order of the revisions. This order _is_ important and CVS relies +on it. It is documented but it would be clearer if the example in +rcsfile.5 also showed the order of the revisions (and the "next" and +"branch" fields and anything else where it would be useful to have an +example of how a revision tree is represented in an RCS file). + +There is one case where CVS uses CVS-specific, non-compatible changes +to the RCS file format, and this is magic branches. See cvs.texinfo +for more information on them. CVS also sets the RCS state to "dead" +to indicate that a file does not exist in a given revision (this is +stored just as any other RCS state is). + +Diff follows: + +(Note that in the following diff the old value for the Id keyword was: + Id: rcsfile.5in,v 5.6 1995/06/05 08:28:35 eggert Exp +and the new one was: + Id: rcsfile.5in,v 5.7 1996/12/09 17:31:44 eggert Exp +but since this file itself might be subject to keyword expansion I +haven't included a diff for that fact). + +=================================================================== +RCS file: RCS/rcsfile.5in,v +retrieving revision 5.6 +retrieving revision 5.7 +diff -u -r5.6 -r5.7 +--- rcsfile.5in 1995/06/05 08:28:35 5.6 ++++ rcsfile.5in 1996/12/09 17:31:44 5.7 +@@ -85,7 +85,8 @@ + .LP + \f2sym\fP ::= {\f2digit\fP}* \f2idchar\fP {\f2idchar\fP | \f2digit\fP}* + .LP +-\f2idchar\fP ::= any visible graphic character except \f2special\fP ++\f2idchar\fP ::= any visible graphic character, ++ except \f2digit\fP or \f2special\fP + .LP + \f2special\fP ::= \f3$\fP | \f3,\fP | \f3.\fP | \f3:\fP | \f3;\fP | \f3@\fP + .LP +@@ -119,12 +120,23 @@ + the minute (00\-59), + and + .I ss +-the second (00\-60). ++the second (00\-59). ++If + .I Y +-contains just the last two digits of the year +-for years from 1900 through 1999, +-and all the digits of years thereafter. +-Dates use the Gregorian calendar; times use UTC. ++contains exactly two digits, ++they are the last two digits of a year from 1900 through 1999; ++otherwise, ++.I Y ++contains all the digits of the year. ++Dates use the Gregorian calendar. ++Times use UTC, except that for portability's sake leap seconds are not allowed; ++implementations that support leap seconds should output ++.B 59 ++for ++.I ss ++during an inserted leap second, and should accept ++.B 59 ++for a deleted leap second. + .PP + The + .I newphrase +@@ -144,16 +156,23 @@ + field in order of decreasing numbers. + The + .B head +-field in the +-.I admin +-node points to the head of that sequence (i.e., contains ++field points to the head of that sequence (i.e., contains + the highest pair). + The + .B branch +-node in the admin node indicates the default ++field indicates the default + branch (or revision) for most \*r operations. + If empty, the default + branch is the highest branch on the trunk. ++The ++.B symbols ++field associates symbolic names with revisions. ++For example, if the file contains ++.B "symbols rr:1.1;" ++then ++.B rr ++is a name for revision ++.BR 1.1 . + .PP + All + .I delta + diff --git a/gnu/usr.bin/cvs/doc/cvs.texinfo b/gnu/usr.bin/cvs/doc/cvs.texinfo index 9ae1b2541b2..a047b8b3f3c 100644 --- a/gnu/usr.bin/cvs/doc/cvs.texinfo +++ b/gnu/usr.bin/cvs/doc/cvs.texinfo @@ -263,7 +263,7 @@ flag (release 1.15 and later are OK). You must also configure both @sc{rcs} and @sc{cvs} to handle binary files when you install them. -Keword substitution can be a source of trouble with +Keyword substitution can be a source of trouble with binary files. @xref{Keyword substitution}, for solutions. @@ -296,7 +296,7 @@ Some text has been extracted from the man pages for The @sc{cvs} @sc{faq} by David G. Grubbs has provided useful material. The @sc{faq} is no longer maintained, -however, and this manual about the closest thing there +however, and this manual is about the closest thing there is to a successor (with respect to documenting how to use @sc{cvs}, at least). @@ -1214,6 +1214,10 @@ Note that users must also have write access to check out files, because @sc{cvs} needs to create lock files (@pxref{Concurrency}). +@c CVS seems to use CVSUMASK in picking permissions for +@c val-tags, but maybe we should say more about this. +@c Like val-tags gets created by someone who doesn't +@c have CVSUMASK set right? Also note that users must have write access to the @file{CVSROOT/val-tags} file. @sc{Cvs} uses it to keep track of what tags are valid tag names (it is sometimes @@ -1236,21 +1240,22 @@ typical for newly created files, except that sometimes @sc{cvs} creates them read-only (see the sections on watches, @ref{Setting a watch}; -r, @ref{Global options}; or CVSREAD, @ref{Environment variables}). + +Note that using the client/server @sc{cvs} +(@pxref{Remote repositories}), there is no good way to +set @code{CVSUMASK}; the setting on the client machine +has no effect. If you are connecting with @code{rsh}, you +can set @code{CVSUMASK} in @file{.bashrc} or @file{.cshrc}, as +described in the documentation for your operating +system. This behavior might change in future versions +of @sc{cvs}; do not rely on the setting of +@code{CVSUMASK} on the client having no effect. @c FIXME: need to explain what a umask is or cite @c someplace which does. @c FIXME: Need one place which discusses this @c read-only files thing. Why would one use -r or @c CVSREAD? Why would one use watches? How do they interact? -@c FIXCVS: Currently CVSUMASK does not control the mode -@c of the history files (e.g. if CVSUMASK is 002 and the -@c user's umask is 077, then the history files get created with -@c mode 0400 or 0500, which means other users cannot check -@c them out. This is a bug; the user's umask should -@c only control the mode used in working directories). -@c The wording above tries to waffle because -@c we don't want to mislead people, yet it is not clear -@c we should document this (broken) behavior instead of fixing it. -@c We need to state +@c FIXME: We need to state @c whether using CVSUMASK removes the need for manually @c fixing permissions (in fact, if we are going to mention @c manually fixing permission, we better document a lot @@ -1400,6 +1405,11 @@ on what each developer uses). Don't worry about CPU and memory requirements for the clients---any machine with enough capacity to run the operating system in question should have little trouble. +@c Stuff about memory duplicates Server requirements +@c to some extent. I'm not sure this is a bad thing, +@c though (one is aimed at people who are looking into +@c this carefully, the other is aimed at people who +@c want a rule of thumb). The repository should be accessable (directly or via a networked file system) from all @@ -1475,11 +1485,63 @@ described in @ref{Connecting via rsh}. @c that you need an @code{rsh} binary on the client to use @c :server:. @menu +* Server requirements:: Memory and other resources for servers * Connecting via rsh:: Using the @code{rsh} program to connect * Password authenticated:: Direct connections using passwords * Kerberos authenticated:: Direct connections with kerberos @end menu +@node Server requirements +@subsection Server requirements + +The quick answer to what sort of machine is suitable as +a server is that requirements are modest---a server +with 32M of memory or even less can handle a fairly +large source tree with a fair amount of activity. +@c Say something about CPU speed too? I'm even less sure +@c what to say on that subject... + +The real answer, of course, is more complicated. The +@sc{cvs} server consists of two processes for each +client that it is serving. Memory consumption on the +child process should remain fairly small. Memory +consumption on the parent process, particularly if the +network connection to the client is slow, can be +expected to grow to slightly more than the size of the +sources in a single directory, or two megabytes, +whichever is larger. +@c "two megabytes" of course is SERVER_HI_WATER. But +@c we don't mention that here because we are +@c documenting the default configuration of CVS. If it +@c is a "standard" thing to change that value, it +@c should be some kind of run-time configuration. +@c +@c See cvsclient.texi for more on the design decision +@c to not have locks in place while waiting for the +@c client, which is what results in memory consumption +@c as high as this. + +Multiplying the size of each @sc{cvs} server by the +number of servers which you expect to have active at +one time should give an idea of memory requirements for +the server. For the most part, the memory consumed by +the parent process probably can be swap space rather +than physical memory. +@c Has anyone verified that notion about swap space? +@c I say it based pretty much on guessing that the +@c ->text of the struct buffer_data only gets accessed +@c in a first in, first out fashion, but I haven't +@c looked very closely. + +Resource consumption for the client or the +non-client/server @sc{cvs} is even more modest---any +machine with enough capacity to run the operating system +in question should have little trouble. +@c Probably we could be saying more about this. +@c I would guess for non-client/server CVS in an NFS +@c environment the biggest issues is the network and +@c the NFS server. + @node Connecting via rsh @subsection Connecting with rsh @@ -1540,17 +1602,20 @@ it; for example the Windows NT @code{rsh} is not suitable since it by default translates between CRLF and LF. The OS/2 CVS port has a hack to pass @samp{-b} to @code{rsh} to get around this, but since this could -potentially cause programs for programs other than the +potentially cause problems for programs other than the standard @code{rsh}, it may change in the future. If you set @code{CVS_RSH} to @code{SSH} or some other rsh replacement, the instructions in the rest of this section concerning @file{.rhosts} and so on are likely -to be incorrect; consult the documentation for your rsh +to be inapplicable; consult the documentation for your rsh replacement. @c FIXME: there should be a way to specify the @c program in CVSROOT, not CVS_RSH, so that one can use @c different ones for different roots. e.g. ":ext;rsh=remsh:" @c instead of ":ext:". +@c See also the comment in src/client.c for rationale +@c concerning "rsh" being the default and never +@c "remsh". Continuing our example, supposing you want to access the module @file{foo} in the repository @@ -1721,6 +1786,11 @@ Right now, the only way to put a password in the @sc{cvs} @file{passwd} file is to paste it there from somewhere else. Someday, there may be a @code{cvs passwd} command. +@c We might also suggest using the @code{htpasswd} command +@c from freely available web servers as well, but that +@c would open up a can of worms in that the users next +@c questions are likely to be "where do I get it?" and +@c "how do I use it?" @node Password authentication client @subsubsection Using the client with password authentication @@ -1775,6 +1845,13 @@ trivially encoded to protect them from "innocent" compromise (i.e., inadvertently being seen by a system administrator who happens to look at that file). +@c FIXME: seems to me this needs somewhat more +@c explanation. +@cindex Logout (subcommand) +The password for the currently choosen remote repository +can be removed from the CVS_PASSFILE by using the +@code{cvs logout} command. + The @code{CVS_PASSFILE} environment variable overrides this default. If you use this variable, make sure you set it @emph{before} @code{cvs login} is run. If you @@ -2112,6 +2189,16 @@ vary). @node From scratch @subsection Creating a directory tree from scratch +@c Also/instead should be documenting +@c $ cvs co -l . +@c $ mkdir tc +@c $ cvs add tc +@c $ cd tc +@c $ mkdir man +@c $ cvs add man +@c etc. +@c Using import to create the directories only is +@c probably a somewhat confusing concept. For a new project, the easiest thing to do is probably to create an empty directory structure, like this: @@ -2204,14 +2291,19 @@ edit the same file simultaneously. One solution, known as @dfn{file locking} or @dfn{reserved checkouts}, is to allow only one person to edit each file at a time. This is the only solution with some version control -systems, including @sc{rcs} and @sc{sccs}. @sc{Cvs} -doesn't have a very nice implementation of reserved -checkouts (yet) but there are ways to get it working -(for example, see the @code{cvs admin -l} command in -@ref{admin options}). It also may be possible to use -the watches features described below, together with -suitable procedures (not enforced by software), to -avoid having two people edit at the same time. +systems, including @sc{rcs} and @sc{sccs}. Currently +the usual way to get reserved checkouts with @sc{cvs} +is the @code{cvs admin -l} command (@pxref{admin +options}). This is not as nicely integrated into +@sc{cvs} as the watch features, described below, but it +seems that most people with a need for reserved +checkouts find it adequate. +@c Or "find it better than worrying about implementing +@c nicely integrated reserved checkouts" or ...? +It also may be possible to use the watches +features described below, together with suitable +procedures (not enforced by software), to avoid having +two people edit at the same time. @c Our unreserved checkout model might not @c be quite the same as others. For example, I @@ -2231,6 +2323,8 @@ then use @sc{cvs} commands to bring their working copy up to date with the repository revision. This process is almost automatic. +@c FIXME? should probably use the word "watch" here, to +@c tie this into the text below and above. @sc{Cvs} also supports mechanisms which facilitate various kinds of communcation, without actually enforcing rules like reserved checkouts do. @@ -2239,6 +2333,77 @@ The rest of this chapter describes how these various models work, and some of the issues involved in choosing between them. +@ignore +Here is a draft reserved checkout design or discussion +of the issues. This seems like as good a place as any +for this. + +Might want a cvs lock/cvs unlock--in which the names +differ from edit/unedit because the network must be up +for these to work. unedit gives an error if there is a +reserved checkout in place (so that people don't +accidentally leave locks around); unlock gives an error +if one is not in place (this is more arguable; perhaps +it should act like unedit in that case). + +On the other hand, might want it so that emacs, +scripts, etc., can get ready to edit a file without +having to know which model is in use. In that case we +would have a "cvs watch lock" (or .cvsrc?) (that is, +three settings, "on", "off", and "lock"). Having cvs +watch lock set would cause a get to record in the CVS +directory which model is in use, and cause "cvs edit" +to change behaviors. We'd want a way to query which +setting is in effect (this would be handy even if it is +only "on" or "off" as presently). If lock is in +effect, then commit would require a lock before +allowing a checkin; chmod wouldn't suffice (might be +debatable--see chmod comment below, in watches--but it +is the way people expect RCS to work and I can't think +of any significant downside. On the other hand, maybe +it isn't worth bothering, because people who are used +to RCS wouldn't think to use chmod anyway). + +Implementation: use file attributes or use RCS +locking. The former avoids more dependence on RCS +behaviors we will need to reimplement as we librarify +RCS, and makes it easier to import/export RCS files (in +that context, want to ignore the locker field). But +note that RCS locks are per-branch, which is the +correct behavior (this is also an issue for the "watch +on" features; they should be per-branch too). + +Here are a few more random notes about implementation +details, assuming "cvs watch lock" and + +CVS/Watched file? Or try to fit this into CVS/Entries somehow? +Cases: (1) file is checked out (unreserved or with watch on) by old +version of CVS, now we do something with new one, (2) file is checked +out by new version, now we do something with old one. + +Remote protocol would have a "Watched" analogous to "Mode". Of course +it would apply to all Updated-like requests. How do we keep this +setting up to date? I guess that there wants to be a Watched request, +and the server would send a new one if it isn't up to date? (Ugh--hard +to implement and slows down "cvs -q update"--is there an easier way?) + +"cvs edit"--checks CVS/Watched, and if watch lock, then sends +"edit-lock" request. Which comes back with a Checked-in with +appropriate Watched (off, on, lock, locked, or some such?), or error +message if already locked. + +"cvs commit"--only will commit if off/on/locked. lock is not OK. + +Doc: +note that "cvs edit" must be connected to network if watch lock is in +effect. + +Talk about what to do if someone has locked a file and you want to +edit that file. (breaking locks, or lack thereof). + + +@end ignore + @menu * File status:: A file can be in several states * Updating a file:: Bringing a file up-to-date @@ -2316,10 +2481,14 @@ sending an entire file accomplishes the same thing. Someone else has committed a newer revision to the repository, and you have also made modifications to the file. -@item Unresolved Conflict -@cindex Unresolved Conflict +@item File had conflicts on merge +@cindex File had conflicts on merge +@c is it worth saying that this message was "Unresolved +@c Conflict" in CVS 1.9 and earlier? I'm inclined to +@c think that is unnecessarily confusing to new users. This is like Locally Modified, except that a previous -@code{update} command gave a conflict. You need to +@code{update} command gave a conflict. If you have not +already done so, you need to resolve the conflict as described in @ref{Conflicts example}. @item Unknown @@ -2643,6 +2812,17 @@ the locks prevent other people from reading or writing. @cindex Atomic transactions, lack of @cindex Transactions, atomic, lack of +@c the following talks about what one might call commit/update +@c atomicity. +@c Probably also should say something about +@c commit/commit atomicity, that is, "An update will +@c not get partial versions of more than one commit". +@c CVS currently has this property and I guess we can +@c make it a documented feature. +@c For example one person commits +@c a/one.c and b/four.c and another commits a/two.c and +@c b/three.c. Then an update cannot get the new a/one.c +@c and a/two.c and the old b/four.c and b/three.c. One might hope for the following property @example @@ -4171,6 +4351,19 @@ The examples below assume that the file @var{old} is renamed to @node Outside @section The Normal way to Rename +@c More rename issues. Not sure whether these are +@c worth documenting; I'm putting them here because +@c it seems to be as good a place as any to try to +@c set down the issues. +@c * "cvs annotate" will annotate either the new +@c file or the old file; it cannot annotate _each +@c line_ based on whether it was last changed in the +@c new or old file. Unlike "cvs log", where the +@c consequences of having to select either the new +@c or old name seem fairly benign, this may be a +@c real advantage to having CVS know about renames +@c other than as a deletion and an addition. + The normal way to move a file is to copy @var{old} to @var{new}, and then issue the normal @sc{cvs} commands to remove @var{old} from the repository, and add @@ -5452,6 +5645,44 @@ slightly different way; @pxref{history options}). @c getdate.y (just for our info; we don't want to @c attempt to document all the formats accepted by @c getdate.y). +@c +@c One more note: In output, CVS should consistently +@c use one date format, and that format should be one that +@c it accepts in input as well. The former isn't +@c really true (see survey below), and I'm not +@c sure that either of those formats is accepted in +@c input. +@c +@c cvs log +@c current 1996/01/02 13:45:31 +@c Internet 02 Jan 1996 13:45:31 UT +@c ISO 1996-01-02 13:45:31 +@c cvs ann +@c current 02-Jan-96 +@c Internet-like 02 Jan 96 +@c ISO 96-01-02 +@c cvs status +@c current Tue Jun 11 02:54:53 1996 +@c Internet [Tue,] 11 Jun 1996 02:54:53 +@c ISO 1996-06-11 02:54:53 +@c note: date possibly should be omitted entirely for +@c other reasons. +@c any others? +@c There is a good chance the proper solution has to +@c involve at least some level of letting the user +@c decide which format (with the default being the +@c formats CVS has always used; changing these might be +@c _very_ disruptive since scripts may very well be +@c parsing them). +@c +@c Another random bit of prior art concerning dates is +@c the strptime function which takes templates such as +@c "%m/%d/%y", and apparent a variant of getdate() +@c which also honors them. See +@c X/Open CAE Specification, System Interfaces and +@c Headers Issue 4, Version 2 (September 1994), in the +@c entry for getdate() on page 231 + @cindex timezone, in input @cindex zone, time, in input A wide variety of date formats are supported by @@ -5690,6 +5921,9 @@ all its options and arguments to the @code{rcs} command; it does no filtering or other processing. This command @emph{does} work recursively, however, so extreme care should be used. +@c "group" should probably read "unix group" (but what +@c does NT local do?). "compiled in value" is +@c unclear--compiled in to what? If there is a group whose name matches a compiled in value which defaults to @code{cvsadmin}, only members of that group can use @code{cvs admin}. To disallow @@ -6270,14 +6504,11 @@ cannot commit to a specific revision on a branch. @table @code @item -F @var{file} -This option is present in @sc{cvs} releases 1.3-s3 and -later. Read the log message from @var{file}, instead +Read the log message from @var{file}, instead of invoking an editor. @item -f -@c -- rename-f-F-- -This option is present in @sc{cvs} 1.3-s3 and later releases -of @sc{cvs}. Note that this is not the standard behavior of +Note that this is not the standard behavior of the @samp{-f} option as defined in @xref{Common options}. Force @sc{cvs} to commit a new revision even if you haven't @@ -6290,14 +6521,12 @@ $ cvs commit -f @var{file} $ cvs commit -r 1.8 @var{file} @end example -@item -f @var{file} -@c -- rename-f-F-- -This option is present in @sc{cvs} releases 1.3, 1.3-s1 and -1.3-s2. Note that this is not the standard behavior of -the @samp{-f} option as defined in @xref{Common options}. - -Read the log message from @var{file}, instead -of invoking an editor. +@c This is odd, but it's how CVS has worked for some +@c time. +The @samp{-f} option disables recursion (i.e., it +implies @samp{-l}). To force @sc{cvs} to commit a new +revision for all files in all subdirectories, you must +use @samp{-f -R}. @item -m @var{message} Use @var{message} as the log message, instead of @@ -6460,14 +6689,6 @@ them): Use the most recent revision no later than @var{date}. See @samp{-r} for how this affects the comparison. -@sc{cvs} can be configured to pass the @samp{-D} option -through to @code{rcsdiff} (which in turn passes it on -to @code{diff}. @sc{Gnu} diff uses @samp{-D} as a way to -put @code{cpp}-style @samp{#define} statements around the output -differences. There is no way short of testing to -figure out how @sc{cvs} was configured. In the default -configuration @sc{cvs} will use the @samp{-D @var{date}} option. - @item -k @var{kflag} Process @sc{rcs} keywords according to @var{kflag}. See co(1). @@ -6491,18 +6712,72 @@ outcome in any way). One or both @samp{-r} options can be replaced by a @samp{-D @var{date}} option, described above. + +@item --ifdef=@var{arg} +Output in ifdef format. Consult the documentation of +your underlying diff program concerning the @samp{-D} +option to diff, for more information on this format. @end table -Any other options that are found are passed through to +@c FIXME? Probably should document -c here, and +@c perhaps arrange for CVS to support it via a diff library or +@c some such. Or perhaps figure that "all" diff +@c programs support -c? Ideas is to preserve the +@c ability to pass the buck to diff on all the hairy +@c stuff, while still providing at least one, and +@c perhaps several popular standard formats. But this +@c is all in the idea stage, and probably needs more +@c thought and refinement. -u might be similar, in +@c terms of being something that it might make sense to +@c document here. +@c FIXME: also should be a way to pass through +@c arbitrary options, so that the user can do +@c "--pass=-Z --pass=foo" or something even if CVS +@c doesn't know about the -Z option to diff. +@c Note on -N: The current CVS implementation does require that the +@c underlying diff supports -N so we can document it as +@c a pass-through even if the implementation details +@c are more complicated. +@c +@c FIXME? Reference to discussion of which diff CVS +@c uses (one in path, or....). +The following options are passed through to @code{rcsdiff}, which in turn passes them to @code{diff}. The exact meaning of the options depends -on which @code{diff} you are using. The long options -introduced in @sc{gnu} diff 2.0 are not yet supported in -@sc{cvs}. See the documentation for your @code{diff} to see -which options are supported. +on which @code{diff} you are using. See the +documentation for your @code{diff} for details. + +@code{-a} @code{-b} @code{-B} @code{-c} @w{@code{-C} +@var{nlines}} @code{-d} @code{-e} @code{-f} @code{-h} +@code{-H} @code{-i} @code{-n} @code{-N} @code{-p} +@code{-s} @code{-t} @code{-u} @code{-U} @var{nlines} +@w{@code{-F} @var{regexp}} @w{@code{-I} @var{regexp}} +@w{@code{-L} @var{label}} @code{-T} @w{@code{-V} +@var{arg}} @w{@code{-W} @var{columns}} @code{-w} +@code{-y} @code{-0} @code{-1} @code{-2} @code{-3} +@code{-4} @code{-5} @code{-6} @code{-7} @code{-8} +@code{-9} @code{--binary} @code{--brief} +@code{--changed-group-format=@var{arg}} +@code{--context[=@var{lines}]} @code{--ed} +@code{--expand-tabs} @code{--forward-ed} +@code{--horizon-lines=@var{arg}} +@code{--ignore-all-space} @code{--ignore-blank-lines} +@code{--ignore-case} +@code{--ignore-matching-lines=@var{regexp}} +@code{--ignore-space-change} @code{--initial-tab} +@code{--label=@var{label}} @code{--left-column} +@code{--minimal} @code{--new-file} +@code{--new-line-format=@var{arg}} +@code{--old-line-format=@var{arg}} @code{--paginate} +@code{--rcs} @code{--report-identical-files} +@code{--code-c-function} @code{--side-by-side} +@code{--show-function-line=@var{regexp}} +@code{--speed-large-files} +@code{--suppress-common-lines} @code{--text} +@code{--unchanged-group-format=@var{arg}} +@code{--unified[=@var{lines}]} +@code{--width=@var{columns}} -@c -- Document some common useful diff options, such as -@c -u and -c. @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @node diff examples @appendixsubsec diff examples @@ -6954,12 +7229,22 @@ you will have to merge the changes. @item I @var{file} The file is being ignored (@pxref{cvsignore}). +@cindex symbolic link, importing +@cindex link, symbolic, importing +@c FIXME: also (somewhere else) probably +@c should be documenting what happens if you "cvs add" +@c a symbolic link. Also maybe what happens if +@c you manually create symbolic links within the +@c repository (? - not sure why we'd want to suggest +@c doing that). @item L @var{file} -The file is a symbolic link; at the moment (and for the forseeable -future), symbolic links are ignored. +The file is a symbolic link; @code{cvs import} ignores symbolic links. +People periodically suggest that this behavior should +be changed, but if there is a consensus on what it +should be changed to, it doesn't seem to be apparent. (Various options in the @file{modules} file can be used to recreate symbolic links on checkout, update, etc.; -@pxref{modules}.) +@pxref{modules}.) @end table @c . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . @@ -8333,6 +8618,10 @@ Only list revisions checked in by specified logins. See @ref{log options}. Prompt for password for authenticating server. See @ref{Password authentication client}. +@item logout +Remove stored password for authenticating server. See +@ref{Password authentication client}. + @item rdiff [@var{options}] @var{modules}@dots{} Show differences between releases. See @ref{rdiff}. @@ -8785,8 +9074,7 @@ this module. @c problems, then explain how the feature solves it). Wrappers allow you to set a hook which transforms files on -their way in and out of @sc{cvs}. Most or all of the -wrappers features do not work with client/server @sc{cvs}. +their way in and out of @sc{cvs}. The file @file{cvswrappers} defines the script that will be run on a file when its name matches a regular @@ -8795,7 +9083,8 @@ file or directory. One script is executed on the file/directory before being checked into the repository (this is denoted with the @code{-t} flag) and the other when the file is checked out of the repository (this is denoted with the -@code{-f} flag) +@code{-f} flag). The @samp{-t}/@samp{-f} feature does +not work with client/server @sc{cvs}. The @file{cvswrappers} also has a @samp{-m} option to specify the merge methodology that should be used when @@ -8866,6 +9155,21 @@ which is the name of the file to filter from. The end result of this filter will be a file in the users directory that they can work on as they normally would. +Note that the @samp{-t}/@samp{-f} features do not +conveniently handle one portion of CVS's operation: +determining when files are modified. CVS will still +want a file (or directory) to exist, and it will use +its modification time to determine whether a file is +modified. If CVS erroneously thinks a file is +unmodified (for example, a directory is unchanged but +one of the files within it is changed), you can force +it to check in the file anyway by specifying the +@samp{-f} option to @code{cvs commit} (@pxref{commit +options}). +@c This is, of course, a serious design flaw in -t/-f. +@c Probably the whole functionality needs to be +@c redesigned (starting from requirements) to fix this. + For another example, the following command imports a directory, treating files whose name ends in @samp{.exe} as binary: @@ -9405,6 +9709,7 @@ like this: @c words for this functionality. @cindex keeping a checked out copy @cindex checked out copy, keeping +@cindex web pages, maintaining with CVS It is often useful to maintain a directory tree which contains files which correspond to the latest version @@ -9725,9 +10030,7 @@ directory. Specifies the program to use for recording log messages during commit. If not set, the default is @samp{/usr/ucb/vi}. @code{$CVSEDITOR} overrides -@code{$EDITOR}. @code{$CVSEDITOR} does not exist in -@sc{cvs} 1.3, but the next release will probably -include it. +@code{$EDITOR}. @cindex PATH @item $PATH @@ -9878,6 +10181,10 @@ argument lists of most @sc{rcs} commands. @node Magic branch numbers @appendixsec Magic branch numbers +@c Where does this go? I think probably in with +@c the details of where things are stored in the +@c repository (plus an xref from "log" and "admin"). + Externally, branch numbers consist of an odd number of dot-separated decimal integers. @xref{Revision numbers}. That is not the whole truth, however. For diff --git a/gnu/usr.bin/cvs/doc/cvsclient.texi b/gnu/usr.bin/cvs/doc/cvsclient.texi index 7420014b4db..6e3fbee9544 100644 --- a/gnu/usr.bin/cvs/doc/cvsclient.texi +++ b/gnu/usr.bin/cvs/doc/cvsclient.texi @@ -177,8 +177,8 @@ implementation, by having inetd call "cvs pserver") which defaults to connects, sends the string @samp{BEGIN AUTH REQUEST}, a linefeed, the cvs root, a linefeed, the username, a linefeed, the password trivially encoded (see scramble.c in the cvs sources), a linefeed, the string -@samp{END AUTH REQUEST}, and a linefeed. The client must sent the -identical string for cvs root here, as it sends later, in the +@samp{END AUTH REQUEST}, and a linefeed. The client must send the +identical string for cvs root both here and later in the @code{Root} request of the cvs protocol itself. Servers are encouraged to enforce this restriction. The server responds with diff --git a/gnu/usr.bin/cvs/lib/ChangeLog b/gnu/usr.bin/cvs/lib/ChangeLog index 601cfacb310..02750d388de 100644 --- a/gnu/usr.bin/cvs/lib/ChangeLog +++ b/gnu/usr.bin/cvs/lib/ChangeLog @@ -1,3 +1,47 @@ +Thu Mar 6 17:14:49 1997 Jim Kingdon + + * regex.c: Partial merge with version from emacs 19.34. I brought + over most trivial changes (whitespace and so on). Most of the + changes to portability cruft I did not bring over, on the theory + of sticking to the devil that we know. I did bring over the + change to undef MAX and MIN (this is a better solution to a + problem we had been handling a different way). There were a + variety of changes I probably could/should have brought over, but + elected not to try to understand them and whether they would cause + trouble (printchar -> putchar, changes to output format in + print_partial_compiled_pattern, internationalization, + FREE_STACK_RETURN and friends which would appear to be fixing + memory leaks in error cases, RE_TRANSLATE_TYPE, and others). I + did merge the changes (union fail_stack_elt, PUSH_FAILURE_POINTER, + etc.) to use a union for the failure stack rather than playing + games with pointers and integers (that was my reason for + bothering; the code had been broken on the Alpha). + +Mon Feb 10 18:52:18 1997 Ullrich von Bassewitz + + * md5.c: Make the parameter to getu32 const since the function will + only read the values and this will avoid compiler warnings in other + places. + +Mon Feb 10 18:29:04 1997 Ullrich von Bassewitz + + * vasprintf.c: Added a #define for systems where a va_list is + defined as an array, not as a pointer. + +Mon Feb 10 09:31:38 1997 Ken Raeburn + + * md5.c (MD5STEP): Truncate to 32 bits before shifting right. + +Thu Jan 30 11:35:26 1997 Jim Kingdon + + * regex.h: Don't prototype re_comp and re_exec. + +Tue Jan 28 17:45:46 1997 Jim Kingdon + + * md5.c, md5.h: Changes so these work without having an integer + type which is exactly 32 bits. Modeled after changes by Tatu Ylonen + as part of SSH but rewritten. + Wed Jan 8 14:50:47 1997 Jim Kingdon * Makefile.in, getopt.h, sighandle.c, system.h: Remove CVSid; we diff --git a/gnu/usr.bin/cvs/lib/getwd.c b/gnu/usr.bin/cvs/lib/getwd.c index 94df6e08e7c..5707dcbf4a5 100644 --- a/gnu/usr.bin/cvs/lib/getwd.c +++ b/gnu/usr.bin/cvs/lib/getwd.c @@ -27,5 +27,7 @@ char * getwd (pathname) char *pathname; { + char *getcwd(); + return (getcwd(pathname, PATH_MAX)); } diff --git a/gnu/usr.bin/cvs/lib/md5.c b/gnu/usr.bin/cvs/lib/md5.c index 4ad99cdc060..1003a403cb1 100644 --- a/gnu/usr.bin/cvs/lib/md5.c +++ b/gnu/usr.bin/cvs/lib/md5.c @@ -15,7 +15,17 @@ * will fill a supplied 16-byte array with the digest. */ +/* This code was modified in 1997 by Jim Kingdon of Cyclic Software to + not require an integer type which is exactly 32 bits. This work + draws on the changes for the same purpose by Tatu Ylonen + as part of SSH, but since I didn't actually use + that code, there is no copyright issue. I hereby disclaim + copyright in any changes I have made; this code remains in the + public domain. */ + +#ifdef HAVE_CONFIG_H #include "config.h" +#endif #if HAVE_STRING_H || STDC_HEADERS #include /* for memcpy() */ @@ -32,25 +42,30 @@ #include "md5.h" -void byteReverse PROTO ((unsigned char *buf, unsigned longs)); +/* Little-endian byte-swapping routines. Note that these do not + depend on the size of datatypes such as uint32, nor do they require + us to detect the endianness of the machine we are running on. It + is possible they should be macros for speed, but I would be + surprised if they were a performance bottleneck for MD5. */ -#ifndef ASM_MD5 -/* - * Note: this code is harmless on little-endian machines. - */ -void byteReverse (buf, longs) - unsigned char *buf; - unsigned longs; +static uint32 +getu32 (addr) + const unsigned char *addr; { - uint32 t; - do { - t = (uint32)((unsigned)buf[3]<<8 | buf[2]) << 16 | - ((unsigned)buf[1]<<8 | buf[0]); - *(uint32 *)buf = t; - buf += 4; - } while (--longs); + return (((((unsigned long)addr[3] << 8) | addr[2]) << 8) + | addr[1]) << 8 | addr[0]; +} + +static void +putu32 (data, addr) + uint32 data; + unsigned char *addr; +{ + addr[0] = (unsigned char)data; + addr[1] = (unsigned char)(data >> 8); + addr[2] = (unsigned char)(data >> 16); + addr[3] = (unsigned char)(data >> 24); } -#endif /* * Start MD5 accumulation. Set bit count to 0 and buffer to mysterious @@ -84,7 +99,7 @@ MD5Update(ctx, buf, len) /* Update bitcount */ t = ctx->bits[0]; - if ((ctx->bits[0] = t + ((uint32)len << 3)) < t) + if ((ctx->bits[0] = (t + ((uint32)len << 3)) & 0xffffffff) < t) ctx->bits[1]++; /* Carry from low to high */ ctx->bits[1] += len >> 29; @@ -93,7 +108,7 @@ MD5Update(ctx, buf, len) /* Handle any leading odd-sized chunks */ if ( t ) { - unsigned char *p = (unsigned char *)ctx->in + t; + unsigned char *p = ctx->in + t; t = 64-t; if (len < t) { @@ -101,8 +116,7 @@ MD5Update(ctx, buf, len) return; } memcpy(p, buf, t); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32 *)ctx->in); + MD5Transform(ctx->buf, ctx->in); buf += t; len -= t; } @@ -111,8 +125,7 @@ MD5Update(ctx, buf, len) while (len >= 64) { memcpy(ctx->in, buf, 64); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32 *)ctx->in); + MD5Transform(ctx->buf, ctx->in); buf += 64; len -= 64; } @@ -149,8 +162,7 @@ MD5Final(digest, ctx) if (count < 8) { /* Two lots of padding: Pad the first block to 64 bytes */ memset(p, 0, count); - byteReverse(ctx->in, 16); - MD5Transform(ctx->buf, (uint32 *)ctx->in); + MD5Transform(ctx->buf, ctx->in); /* Now fill the next block with 56 bytes */ memset(ctx->in, 0, 56); @@ -158,15 +170,16 @@ MD5Final(digest, ctx) /* Pad block to 56 bytes */ memset(p, 0, count-8); } - byteReverse(ctx->in, 14); /* Append length in bits and transform */ - ((uint32 *)ctx->in)[ 14 ] = ctx->bits[0]; - ((uint32 *)ctx->in)[ 15 ] = ctx->bits[1]; - - MD5Transform(ctx->buf, (uint32 *)ctx->in); - byteReverse((unsigned char *)ctx->buf, 4); - memcpy(digest, ctx->buf, 16); + putu32(ctx->bits[0], ctx->in + 56); + putu32(ctx->bits[1], ctx->in + 60); + + MD5Transform(ctx->buf, ctx->in); + putu32(ctx->buf[0], digest); + putu32(ctx->buf[1], digest + 4); + putu32(ctx->buf[2], digest + 8); + putu32(ctx->buf[3], digest + 12); memset(ctx, 0, sizeof(ctx)); /* In case it's sensitive */ } @@ -182,7 +195,7 @@ MD5Final(digest, ctx) /* This is the central step in the MD5 algorithm. */ #define MD5STEP(f, w, x, y, z, data, s) \ - ( w += f(x, y, z) + data, w = w<>(32-s), w += x ) + ( w += f(x, y, z) + data, w &= 0xffffffff, w = w<>(32-s), w += x ) /* * The core of the MD5 algorithm, this alters an existing MD5 hash to @@ -190,11 +203,16 @@ MD5Final(digest, ctx) * the data and converts bytes into longwords for this routine. */ void -MD5Transform(buf, in) +MD5Transform(buf, inraw) uint32 buf[4]; - uint32 const in[16]; + const unsigned char inraw[64]; { register uint32 a, b, c, d; + uint32 in[16]; + int i; + + for (i = 0; i < 16; ++i) + in[i] = getu32 (inraw + 4 * i); a = buf[0]; b = buf[1]; @@ -275,3 +293,37 @@ MD5Transform(buf, in) buf[3] += d; } #endif + +#ifdef TEST +/* Simple test program. Can use it to manually run the tests from + RFC1321 for example. */ +#include + +int +main (int argc, char **argv) +{ + struct MD5Context context; + unsigned char checksum[16]; + int i; + int j; + + if (argc < 2) + { + fprintf (stderr, "usage: %s string-to-hash\n", argv[0]); + exit (1); + } + for (j = 1; j < argc; ++j) + { + printf ("MD5 (\"%s\") = ", argv[j]); + MD5Init (&context); + MD5Update (&context, argv[j], strlen (argv[j])); + MD5Final (checksum, &context); + for (i = 0; i < 16; i++) + { + printf ("%02x", (unsigned int) checksum[i]); + } + printf ("\n"); + } + return 0; +} +#endif /* TEST */ diff --git a/gnu/usr.bin/cvs/lib/md5.h b/gnu/usr.bin/cvs/lib/md5.h index bfe79ccd7f2..65bac1fad3f 100644 --- a/gnu/usr.bin/cvs/lib/md5.h +++ b/gnu/usr.bin/cvs/lib/md5.h @@ -1,16 +1,14 @@ +/* See md5.c for explanation and copyright information. */ + #ifndef MD5_H #define MD5_H -#if SIZEOF_LONG == 4 +/* Unlike previous versions of this code, uint32 need not be exactly + 32 bits, merely 32 bits or more. Choosing a data type which is 32 + bits instead of 64 is not important; speed is considerably more + important. ANSI guarantees that "unsigned long" will be big enough, + and always using it seems to have few disadvantages. */ typedef unsigned long uint32; -#else -#if SIZEOF_INT == 4 -typedef unsigned int uint32; -#else -Congratulations! You get to rewrite this code so that it does not require -a 32-bit integer type! (Or maybe you just need to reconfigure.) -#endif -#endif struct MD5Context { uint32 buf[4]; @@ -21,7 +19,7 @@ struct MD5Context { void MD5Init PROTO((struct MD5Context *context)); void MD5Update PROTO((struct MD5Context *context, unsigned char const *buf, unsigned len)); void MD5Final PROTO((unsigned char digest[16], struct MD5Context *context)); -void MD5Transform PROTO((uint32 buf[4], uint32 const in[16])); +void MD5Transform PROTO((uint32 buf[4], const unsigned char in[64])); /* * This is needed to make RSAREF happy on some MS-DOS compilers. diff --git a/gnu/usr.bin/cvs/lib/regex.c b/gnu/usr.bin/cvs/lib/regex.c index f785f623802..ddeca2a2af1 100644 --- a/gnu/usr.bin/cvs/lib/regex.c +++ b/gnu/usr.bin/cvs/lib/regex.c @@ -3,7 +3,7 @@ (Implements POSIX draft P10003.2/D11.2, except for internationalization features.) - Copyright (C) 1993 Free Software Foundation, Inc. + Copyright (C) 1993, 1994, 1995, 1996 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 @@ -75,7 +75,7 @@ char *realloc (); /* This must be nonzero for the wordchar and notwordchar pattern commands in re_match_2. */ -#ifndef Sword +#ifndef Sword #define Sword 1 #endif @@ -173,8 +173,8 @@ init_syntax_once () use `alloca' instead of `malloc'. This is because using malloc in re_search* or re_match* could cause memory leaks when C-g is used in Emacs; also, malloc is slower and causes storage fragmentation. On - the other hand, malloc is more portable, and easier to debug. - + the other hand, malloc is more portable, and easier to debug. + Because we sometimes use alloca, some routines have to be macros, not functions -- `alloca'-allocated space disappears at the end of the function it is called in. */ @@ -230,13 +230,10 @@ char *alloca (); #define STREQ(s1, s2) ((strcmp (s1, s2) == 0)) -/* The Mac CodeWarrier9 compiler defines MAX and MIN. */ -#ifndef MAX +#undef MAX +#undef MIN #define MAX(a, b) ((a) > (b) ? (a) : (b)) -#endif -#ifndef MIN #define MIN(a, b) ((a) < (b) ? (a) : (b)) -#endif typedef char boolean; #define false 0 @@ -307,9 +304,9 @@ typedef enum /* Analogously, for end of buffer/string. */ endbuf, - + /* Followed by two byte relative address to which to jump. */ - jump, + jump, /* Same as jump, but marks the end of an alternative. */ jump_past_alt, @@ -317,11 +314,11 @@ typedef enum /* Followed by two-byte relative address of place to resume at in case of failure. */ on_failure_jump, - + /* Like on_failure_jump, but pushes a placeholder instead of the current string position when executed. */ on_failure_keep_string_jump, - + /* Throw away latest failure point and then jump to following two-byte relative address. */ pop_failure_jump, @@ -417,7 +414,7 @@ extract_number (dest, source) int *dest; unsigned char *source; { - int temp = SIGN_EXTEND_CHAR (*(source + 1)); + int temp = SIGN_EXTEND_CHAR (*(source + 1)); *dest = *source & 0377; *dest += temp << 8; } @@ -443,7 +440,7 @@ static void extract_number_and_incr (destination, source) int *destination; unsigned char **source; -{ +{ extract_number (destination, *source); *source += 2; } @@ -492,8 +489,8 @@ print_fastmap (fastmap) char *fastmap; { unsigned was_a_range = 0; - unsigned i = 0; - + unsigned i = 0; + while (i < (1 << BYTEWIDTH)) { if (fastmap[i++]) @@ -512,7 +509,7 @@ print_fastmap (fastmap) } } } - putchar ('\n'); + putchar ('\n'); } @@ -533,7 +530,7 @@ print_partial_compiled_pattern (start, end) printf ("(null)\n"); return; } - + /* Loop over pattern commands. */ while (p < pend) { @@ -644,24 +641,24 @@ print_partial_compiled_pattern (start, end) printf ("/jump/0/%d", mcnt); break; - case succeed_n: + case succeed_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/succeed_n/0/%d/0/%d", mcnt, mcnt2); break; - - case jump_n: + + case jump_n: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/jump_n/0/%d/0/%d", mcnt, mcnt2); break; - - case set_number_at: + + case set_number_at: extract_number_and_incr (&mcnt, &p); extract_number_and_incr (&mcnt2, &p); printf ("/set_number_at/0/%d/0/%d", mcnt, mcnt2); break; - + case wordbound: printf ("/wordbound"); break; @@ -673,10 +670,10 @@ print_partial_compiled_pattern (start, end) case wordbeg: printf ("/wordbeg"); break; - + case wordend: printf ("/wordend"); - + #ifdef emacs case before_dot: printf ("/before_dot"); @@ -695,7 +692,7 @@ print_partial_compiled_pattern (start, end) mcnt = *p++; printf ("/%d", mcnt); break; - + case notsyntaxspec: printf ("/notsyntaxspec"); mcnt = *p++; @@ -706,7 +703,7 @@ print_partial_compiled_pattern (start, end) case wordchar: printf ("/wordchar"); break; - + case notwordchar: printf ("/notwordchar"); break; @@ -763,7 +760,7 @@ print_double_string (where, string1, size1, string2, size2) int size2; { unsigned this_char; - + if (where == NULL) printf ("(null)"); else @@ -773,7 +770,7 @@ print_double_string (where, string1, size1, string2, size2) for (this_char = where - string1; this_char < size1; this_char++) printchar (string1[this_char]); - where = string2; + where = string2; } for (this_char = where - string2; this_char < size2; this_char++) @@ -814,7 +811,7 @@ re_set_syntax (syntax) reg_syntax_t syntax; { reg_syntax_t ret = re_syntax_options; - + re_syntax_options = syntax; return ret; } @@ -990,7 +987,7 @@ typedef struct pattern_offset_t begalt_offset; pattern_offset_t fixup_alt_jump; pattern_offset_t inner_group_offset; - pattern_offset_t laststart_offset; + pattern_offset_t laststart_offset; regnum_t regnum; } compile_stack_elt_t; @@ -1033,7 +1030,7 @@ typedef struct PATFETCH (c); \ } \ } \ - } + } #define CHAR_CLASS_MAX_LENGTH 6 /* Namely, `xdigit'. */ @@ -1059,7 +1056,7 @@ typedef struct `fastmap_accurate' is zero; `re_nsub' is the number of subexpressions in PATTERN; `not_bol' and `not_eol' are zero; - + The `fastmap' and `newline_anchor' fields are neither examined nor set. */ @@ -1074,20 +1071,20 @@ regex_compile (pattern, size, syntax, bufp) `char *' (i.e., signed), we declare these variables as unsigned, so they can be reliably used as array indices. */ register unsigned char c, c1; - - /* A random tempory spot in PATTERN. */ + + /* A random temporary spot in PATTERN. */ const char *p1; /* Points to the end of the buffer, where we should append. */ register unsigned char *b; - + /* Keeps track of unclosed groups. */ compile_stack_type compile_stack; /* Points to the current (ending) position in the pattern. */ const char *p = pattern; const char *pend = pattern + size; - + /* How to translate the characters in the pattern. */ char *translate = bufp->translate; @@ -1108,7 +1105,7 @@ regex_compile (pattern, size, syntax, bufp) /* Place in the uncompiled pattern (i.e., the {) to which to go back if the interval is invalid. */ const char *beg_interval; - + /* Address of the place where a forward jump should go to the end of the containing expression. Each alternative of an `or' -- except the last -- ends with a forward jump of this sort. */ @@ -1124,7 +1121,7 @@ regex_compile (pattern, size, syntax, bufp) if (debug) { unsigned debug_count; - + for (debug_count = 0; debug_count < size; debug_count++) printchar (pattern[debug_count]); putchar ('\n'); @@ -1148,9 +1145,9 @@ regex_compile (pattern, size, syntax, bufp) printer (for debugging) will think there's no pattern. We reset it at the end. */ bufp->used = 0; - + /* Always count groups, whether or not bufp->no_sub is set. */ - bufp->re_nsub = 0; + bufp->re_nsub = 0; #if !defined (emacs) && !defined (SYNTAX_TABLE) /* Initialize the syntax table. */ @@ -1201,7 +1198,7 @@ regex_compile (pattern, size, syntax, bufp) case '$': { if ( /* If at end of pattern, it's an operator. */ - p == pend + p == pend /* If context independent, it's an operator. */ || syntax & RE_CONTEXT_INDEP_ANCHORS /* Otherwise, depends on what's next. */ @@ -1232,7 +1229,7 @@ regex_compile (pattern, size, syntax, bufp) { /* Are we optimizing this jump? */ boolean keep_string_p = false; - + /* 1 means zero (many) matches is allowed. */ char zero_times_ok = 0, many_times_ok = 0; @@ -1280,7 +1277,7 @@ regex_compile (pattern, size, syntax, bufp) /* Star, etc. applied to an empty pattern is equivalent to an empty pattern. */ - if (!laststart) + if (!laststart) break; /* Now we know whether or not zero matches is allowed @@ -1289,7 +1286,7 @@ regex_compile (pattern, size, syntax, bufp) { /* More than one repetition is allowed, so put in at the end a backward relative jump from `b' to before the next jump we're going to put in below (which jumps from - laststart to after this jump). + laststart to after this jump). But if we are at the `*' in the exact sequence `.*\n', insert an unconditional jump backwards to the ., @@ -1416,8 +1413,8 @@ regex_compile (pattern, size, syntax, bufp) was a character: if this is a hyphen not at the beginning or the end of a list, then it's the range operator. */ - if (c == '-' - && !(p - 2 >= pattern && p[-2] == '[') + if (c == '-' + && !(p - 2 >= pattern && p[-2] == '[') && !(p - 3 >= pattern && p[-3] == '[' && p[-2] == '^') && *p != ']') { @@ -1432,7 +1429,7 @@ regex_compile (pattern, size, syntax, bufp) /* Move past the `-'. */ PATFETCH (c1); - + ret = compile_range (&p, pend, translate, syntax, b); if (ret != REG_NOERROR) return ret; } @@ -1461,7 +1458,7 @@ regex_compile (pattern, size, syntax, bufp) str[c1] = '\0'; /* If isn't a word bracketed by `[:' and:`]': - undo the ending character, the letters, and leave + undo the ending character, the letters, and leave the leading `:' and `[' (but set bits for them). */ if (c == ':' && *p == ']') { @@ -1478,12 +1475,12 @@ regex_compile (pattern, size, syntax, bufp) boolean is_space = STREQ (str, "space"); boolean is_upper = STREQ (str, "upper"); boolean is_xdigit = STREQ (str, "xdigit"); - + if (!IS_CHAR_CLASS (str)) return REG_ECTYPE; /* Throw away the ] at the end of the character class. */ - PATFETCH (c); + PATFETCH (c); if (p == pend) return REG_EBRACK; @@ -1508,7 +1505,7 @@ regex_compile (pattern, size, syntax, bufp) else { c1++; - while (c1--) + while (c1--) PATUNFETCH; SET_LIST_BIT ('['); SET_LIST_BIT (':'); @@ -1524,8 +1521,8 @@ regex_compile (pattern, size, syntax, bufp) /* Discard any (non)matching list bytes that are all 0 at the end of the map. Decrease the map-length byte too. */ - while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) - b[-1]--; + while ((int) b[-1] > 0 && b[b[-1] - 1] == 0) + b[-1]--; b += b[-1]; } break; @@ -1585,7 +1582,7 @@ regex_compile (pattern, size, syntax, bufp) regnum++; if (COMPILE_STACK_FULL) - { + { RETALLOC (compile_stack.stack, compile_stack.size << 1, compile_stack_elt_t); if (compile_stack.stack == NULL) return REG_ESPACE; @@ -1598,7 +1595,7 @@ regex_compile (pattern, size, syntax, bufp) whole pattern moves because of realloc, they will still be valid. */ COMPILE_STACK_TOP.begalt_offset = begalt - bufp->buffer; - COMPILE_STACK_TOP.fixup_alt_jump + COMPILE_STACK_TOP.fixup_alt_jump = fixup_alt_jump ? fixup_alt_jump - bufp->buffer + 1 : 0; COMPILE_STACK_TOP.laststart_offset = b - bufp->buffer; COMPILE_STACK_TOP.regnum = regnum; @@ -1612,7 +1609,7 @@ regex_compile (pattern, size, syntax, bufp) COMPILE_STACK_TOP.inner_group_offset = b - bufp->buffer + 2; BUF_PUSH_3 (start_memory, regnum, 0); } - + compile_stack.avail++; fixup_alt_jump = 0; @@ -1641,7 +1638,7 @@ regex_compile (pattern, size, syntax, bufp) `pop_failure_jump' to pop. See comments at `push_dummy_failure' in `re_match_2'. */ BUF_PUSH (push_dummy_failure); - + /* We allocated space for this jump when we assigned to `fixup_alt_jump', in the `handle_alt' case below. */ STORE_JUMP (jump_past_alt, fixup_alt_jump, b - 1); @@ -1663,11 +1660,11 @@ regex_compile (pattern, size, syntax, bufp) as in `(ab)c(de)' -- the second group is #2. */ regnum_t this_group_regnum; - compile_stack.avail--; + compile_stack.avail--; begalt = bufp->buffer + COMPILE_STACK_TOP.begalt_offset; fixup_alt_jump = COMPILE_STACK_TOP.fixup_alt_jump - ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 + ? bufp->buffer + COMPILE_STACK_TOP.fixup_alt_jump - 1 : 0; laststart = bufp->buffer + COMPILE_STACK_TOP.laststart_offset; this_group_regnum = COMPILE_STACK_TOP.regnum; @@ -1682,7 +1679,7 @@ regex_compile (pattern, size, syntax, bufp) { unsigned char *inner_group_loc = bufp->buffer + COMPILE_STACK_TOP.inner_group_offset; - + *inner_group_loc = regnum - this_group_regnum; BUF_PUSH_3 (stop_memory, this_group_regnum, regnum - this_group_regnum); @@ -1711,10 +1708,10 @@ regex_compile (pattern, size, syntax, bufp) jump (put in below, which in turn will jump to the next (if any) alternative's such jump, etc.). The last such jump jumps to the correct final destination. A picture: - _____ _____ - | | | | - | v | v - a | b | c + _____ _____ + | | | | + | v | v + a | b | c If we are at `b', then fixup_alt_jump right now points to a three-byte space after `a'. We'll put in the jump, set @@ -1736,10 +1733,10 @@ regex_compile (pattern, size, syntax, bufp) break; - case '{': + case '{': /* If \{ is a literal. */ if (!(syntax & RE_INTERVALS) - /* If we're at `\{' and it's not the open-interval + /* If we're at `\{' and it's not the open-interval operator. */ || ((syntax & RE_INTERVALS) && (syntax & RE_NO_BK_BRACES)) || (p - 2 == pattern && p == pend)) @@ -1778,11 +1775,11 @@ regex_compile (pattern, size, syntax, bufp) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else return REG_BADBR; } - if (!(syntax & RE_NO_BK_BRACES)) + if (!(syntax & RE_NO_BK_BRACES)) { if (c != '\\') return REG_EBRACE; @@ -1793,7 +1790,7 @@ regex_compile (pattern, size, syntax, bufp) { if (syntax & RE_NO_BK_BRACES) goto unfetch_interval; - else + else return REG_BADBR; } @@ -1824,12 +1821,12 @@ regex_compile (pattern, size, syntax, bufp) we're all done, the pattern will look like: set_number_at set_number_at - succeed_n + succeed_n jump_n (The upper bound and `jump_n' are omitted if `upper_bound' is 1, though.) */ - else + else { /* If the upper bound is > 1, we need to insert more at the end of the loop. */ unsigned nbytes = 10 + (upper_bound > 1) * 10; @@ -1846,7 +1843,7 @@ regex_compile (pattern, size, syntax, bufp) lower_bound); b += 5; - /* Code to initialize the lower bound. Insert + /* Code to initialize the lower bound. Insert before the `succeed_n'. The `5' is the last two bytes of this `set_number_at', plus 3 bytes of the following `succeed_n'. */ @@ -1857,7 +1854,7 @@ regex_compile (pattern, size, syntax, bufp) { /* More than one repetition is allowed, so append a backward jump to the `succeed_n' that starts this interval. - + When we've reached this during matching, we'll have matched the interval once, so jump back only `upper_bound - 1' times. */ @@ -1875,7 +1872,7 @@ regex_compile (pattern, size, syntax, bufp) so everything is getting moved up by 5. Conclusion: (b - 2) - (laststart + 3) + 5, i.e., b - laststart. - + We insert this at the beginning of the loop so that if we fail during matching, we'll reinitialize the bounds. */ @@ -1896,7 +1893,7 @@ regex_compile (pattern, size, syntax, bufp) beg_interval = NULL; /* normal_char and normal_backslash need `c'. */ - PATFETCH (c); + PATFETCH (c); if (!(syntax & RE_NO_BK_BRACES)) { @@ -1912,7 +1909,7 @@ regex_compile (pattern, size, syntax, bufp) BUF_PUSH (at_dot); break; - case 's': + case 's': laststart = b; PATFETCH (c); BUF_PUSH_2 (syntaxspec, syntax_spec_code[c]); @@ -2003,11 +2000,11 @@ regex_compile (pattern, size, syntax, bufp) /* Expects the character in `c'. */ normal_char: /* If no exactn currently being built. */ - if (!pending_exact + if (!pending_exact /* If last exactn not at current position. */ || pending_exact + *pending_exact + 1 != b - + /* We have only one byte following the exactn for the count. */ || *pending_exact == (1 << BYTEWIDTH) - 1 @@ -2022,26 +2019,26 @@ regex_compile (pattern, size, syntax, bufp) : (p[0] == '\\' && p[1] == '{')))) { /* Start building a new exactn. */ - + laststart = b; BUF_PUSH_2 (exactn, 0); pending_exact = b - 1; } - + BUF_PUSH (c); (*pending_exact)++; break; } /* switch (c) */ } /* while p != pend */ - + /* Through the pattern now. */ - + if (fixup_alt_jump) STORE_JUMP (jump_past_alt, fixup_alt_jump, b); - if (!COMPILE_STACK_EMPTY) + if (!COMPILE_STACK_EMPTY) return REG_EPAREN; free (compile_stack.stack); @@ -2097,14 +2094,14 @@ insert_op1 (op, loc, arg, end) re_opcode_t op; unsigned char *loc; int arg; - unsigned char *end; + unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 3; while (pfrom != loc) *--pto = *--pfrom; - + store_op1 (op, loc, arg); } @@ -2116,14 +2113,14 @@ insert_op2 (op, loc, arg1, arg2, end) re_opcode_t op; unsigned char *loc; int arg1, arg2; - unsigned char *end; + unsigned char *end; { register unsigned char *pfrom = end; register unsigned char *pto = end + 5; while (pfrom != loc) *--pto = *--pfrom; - + store_op2 (op, loc, arg1, arg2); } @@ -2139,7 +2136,7 @@ at_begline_loc_p (pattern, p, syntax) { const char *prev = p - 2; boolean prev_prev_backslash = prev > pattern && prev[-1] == '\\'; - + return /* After a subexpression? */ (*prev == '(' && (syntax & RE_NO_BK_PARENS || prev_prev_backslash)) @@ -2264,7 +2261,13 @@ compile_range (p_ptr, pend, translate, syntax, b) change it ourselves. */ int re_max_failures = 2000; -typedef const unsigned char *fail_stack_elt_t; +union fail_stack_elt +{ + unsigned char *pointer; + int integer; +}; + +typedef union fail_stack_elt fail_stack_elt_t; typedef struct { @@ -2319,26 +2322,41 @@ typedef struct Return 1 if was able to do so and 0 if ran out of memory allocating space to do so. */ -#define PUSH_PATTERN_OP(pattern_op, fail_stack) \ +#define PUSH_PATTERN_OP(POINTER, FAIL_STACK) \ ((FAIL_STACK_FULL () \ - && !DOUBLE_FAIL_STACK (fail_stack)) \ - ? 0 \ - : ((fail_stack).stack[(fail_stack).avail++] = pattern_op, \ - 1)) + && !DOUBLE_FAIL_STACK (FAIL_STACK)) \ + ? 0 \ + : ((FAIL_STACK).stack[(FAIL_STACK).avail++].pointer = POINTER, \ + 1)) + +/* Push a pointer value onto the failure stack. + Assumes the variable `fail_stack'. Probably should only + be called from within `PUSH_FAILURE_POINT'. */ +#define PUSH_FAILURE_POINTER(item) \ + fail_stack.stack[fail_stack.avail++].pointer = (unsigned char *) (item) + +/* This pushes an integer-valued item onto the failure stack. + Assumes the variable `fail_stack'. Probably should only + be called from within `PUSH_FAILURE_POINT'. */ +#define PUSH_FAILURE_INT(item) \ + fail_stack.stack[fail_stack.avail++].integer = (item) -/* This pushes an item onto the failure stack. Must be a four-byte - value. Assumes the variable `fail_stack'. Probably should only +/* Push a fail_stack_elt_t value onto the failure stack. + Assumes the variable `fail_stack'. Probably should only be called from within `PUSH_FAILURE_POINT'. */ -#define PUSH_FAILURE_ITEM(item) \ - fail_stack.stack[fail_stack.avail++] = (fail_stack_elt_t) item +#define PUSH_FAILURE_ELT(item) \ + fail_stack.stack[fail_stack.avail++] = (item) -/* The complement operation. Assumes `fail_stack' is nonempty. */ -#define POP_FAILURE_ITEM() fail_stack.stack[--fail_stack.avail] +/* These three POP... operations complement the three PUSH... operations. + All assume that `fail_stack' is nonempty. */ +#define POP_FAILURE_POINTER() fail_stack.stack[--fail_stack.avail].pointer +#define POP_FAILURE_INT() fail_stack.stack[--fail_stack.avail].integer +#define POP_FAILURE_ELT() fail_stack.stack[--fail_stack.avail] /* Used to omit pushing failure point id's when we're not debugging. */ #ifdef DEBUG -#define DEBUG_PUSH PUSH_FAILURE_ITEM -#define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_ITEM () +#define DEBUG_PUSH PUSH_FAILURE_INT +#define DEBUG_POP(item_addr) *(item_addr) = POP_FAILURE_INT () #else #define DEBUG_PUSH(item) #define DEBUG_POP(item_addr) @@ -2346,12 +2364,12 @@ typedef struct /* Push the information about the state we will need - if we ever fail back to it. - + if we ever fail back to it. + Requires variables fail_stack, regstart, regend, reg_info, and num_regs be declared. DOUBLE_FAIL_STACK requires `destination' be declared. - + Does `return FAILURE_CODE' if runs out of memory. */ #define PUSH_FAILURE_POINT(pattern_place, string_place, failure_code) \ @@ -2373,7 +2391,7 @@ typedef struct /* Ensure we have enough space allocated for what we will push. */ \ while (REMAINING_AVAIL_SLOTS < NUM_FAILURE_ITEMS) \ { \ - if (!DOUBLE_FAIL_STACK (fail_stack)) \ + if (!DOUBLE_FAIL_STACK (fail_stack)) \ return failure_code; \ \ DEBUG_PRINT2 ("\n Doubled stack; size now: %d\n", \ @@ -2384,45 +2402,46 @@ typedef struct /* Push the info, starting with the registers. */ \ DEBUG_PRINT1 ("\n"); \ \ - for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ - this_reg++) \ - { \ - DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ - DEBUG_STATEMENT (num_regs_pushed++); \ + if (1) \ + for (this_reg = lowest_active_reg; this_reg <= highest_active_reg; \ + this_reg++) \ + { \ + DEBUG_PRINT2 (" Pushing reg: %d\n", this_reg); \ + DEBUG_STATEMENT (num_regs_pushed++); \ \ - DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ - PUSH_FAILURE_ITEM (regstart[this_reg]); \ - \ - DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ - PUSH_FAILURE_ITEM (regend[this_reg]); \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + PUSH_FAILURE_POINTER (regstart[this_reg]); \ \ - DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ - DEBUG_PRINT2 (" match_null=%d", \ - REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ - DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ - DEBUG_PRINT2 (" matched_something=%d", \ - MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT2 (" ever_matched=%d", \ - EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ - DEBUG_PRINT1 ("\n"); \ - PUSH_FAILURE_ITEM (reg_info[this_reg].word); \ - } \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + PUSH_FAILURE_POINTER (regend[this_reg]); \ + \ + DEBUG_PRINT2 (" info: 0x%x\n ", reg_info[this_reg]); \ + DEBUG_PRINT2 (" match_null=%d", \ + REG_MATCH_NULL_STRING_P (reg_info[this_reg])); \ + DEBUG_PRINT2 (" active=%d", IS_ACTIVE (reg_info[this_reg])); \ + DEBUG_PRINT2 (" matched_something=%d", \ + MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT2 (" ever_matched=%d", \ + EVER_MATCHED_SOMETHING (reg_info[this_reg])); \ + DEBUG_PRINT1 ("\n"); \ + PUSH_FAILURE_ELT (reg_info[this_reg].word); \ + } \ \ DEBUG_PRINT2 (" Pushing low active reg: %d\n", lowest_active_reg);\ - PUSH_FAILURE_ITEM (lowest_active_reg); \ + PUSH_FAILURE_INT (lowest_active_reg); \ \ DEBUG_PRINT2 (" Pushing high active reg: %d\n", highest_active_reg);\ - PUSH_FAILURE_ITEM (highest_active_reg); \ + PUSH_FAILURE_INT (highest_active_reg); \ \ DEBUG_PRINT2 (" Pushing pattern 0x%x: ", pattern_place); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pattern_place, pend); \ - PUSH_FAILURE_ITEM (pattern_place); \ + PUSH_FAILURE_POINTER (pattern_place); \ \ DEBUG_PRINT2 (" Pushing string 0x%x: `", string_place); \ DEBUG_PRINT_DOUBLE_STRING (string_place, string1, size1, string2, \ size2); \ DEBUG_PRINT1 ("'\n"); \ - PUSH_FAILURE_ITEM (string_place); \ + PUSH_FAILURE_POINTER (string_place); \ \ DEBUG_PRINT2 (" Pushing failure id: %u\n", failure_id); \ DEBUG_PUSH (failure_id); \ @@ -2459,7 +2478,7 @@ typedef struct LOW_REG, HIGH_REG -- the highest and lowest active registers. REGSTART, REGEND -- arrays of string positions. REG_INFO -- array of information about each subexpression. - + Also assumes the variables `fail_stack' and (if debugging), `bufp', `pend', `string1', `size1', `string2', and `size2'. */ @@ -2484,7 +2503,7 @@ typedef struct /* If the saved string location is NULL, it came from an \ on_failure_keep_string_jump opcode, and we want to throw away the \ saved NULL, thus retaining our current position in the string. */ \ - string_temp = POP_FAILURE_ITEM (); \ + string_temp = POP_FAILURE_POINTER (); \ if (string_temp != NULL) \ str = (const char *) string_temp; \ \ @@ -2492,29 +2511,40 @@ typedef struct DEBUG_PRINT_DOUBLE_STRING (str, string1, size1, string2, size2); \ DEBUG_PRINT1 ("'\n"); \ \ - pat = (unsigned char *) POP_FAILURE_ITEM (); \ + pat = (unsigned char *) POP_FAILURE_POINTER (); \ DEBUG_PRINT2 (" Popping pattern 0x%x: ", pat); \ DEBUG_PRINT_COMPILED_PATTERN (bufp, pat, pend); \ \ /* Restore register info. */ \ - high_reg = (unsigned) POP_FAILURE_ITEM (); \ + high_reg = (unsigned) POP_FAILURE_INT (); \ DEBUG_PRINT2 (" Popping high active reg: %d\n", high_reg); \ \ - low_reg = (unsigned) POP_FAILURE_ITEM (); \ + low_reg = (unsigned) POP_FAILURE_INT (); \ DEBUG_PRINT2 (" Popping low active reg: %d\n", low_reg); \ \ - for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ - { \ - DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ + if (1) \ + for (this_reg = high_reg; this_reg >= low_reg; this_reg--) \ + { \ + DEBUG_PRINT2 (" Popping reg: %d\n", this_reg); \ \ - reg_info[this_reg].word = POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ + reg_info[this_reg].word = POP_FAILURE_ELT (); \ + DEBUG_PRINT2 (" info: 0x%x\n", reg_info[this_reg]); \ \ - regend[this_reg] = (const char *) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ + regend[this_reg] = (const char *) POP_FAILURE_POINTER (); \ + DEBUG_PRINT2 (" end: 0x%x\n", regend[this_reg]); \ \ - regstart[this_reg] = (const char *) POP_FAILURE_ITEM (); \ - DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + regstart[this_reg] = (const char *) POP_FAILURE_POINTER (); \ + DEBUG_PRINT2 (" start: 0x%x\n", regstart[this_reg]); \ + } \ + else \ + { \ + for (this_reg = highest_active_reg; this_reg > high_reg; this_reg--) \ + { \ + reg_info[this_reg].word.integer = 0; \ + regend[this_reg] = 0; \ + regstart[this_reg] = 0; \ + } \ + highest_active_reg = high_reg; \ } \ \ DEBUG_STATEMENT (nfailure_points_popped++); \ @@ -2527,7 +2557,7 @@ typedef struct The caller must supply the address of a (1 << BYTEWIDTH)-byte data area as BUFP->fastmap. - + We set the `fastmap', `fastmap_accurate', and `can_be_null' fields in the pattern buffer. @@ -2544,11 +2574,11 @@ re_compile_fastmap (bufp) #endif /* We don't push any register information onto the failure stack. */ unsigned num_regs = 0; - + register char *fastmap = bufp->fastmap; unsigned char *pattern = bufp->buffer; unsigned long size = bufp->used; - const unsigned char *p = pattern; + unsigned char *p = pattern; register unsigned char *pend = pattern + size; /* Assume that each path through the pattern can be null until @@ -2561,12 +2591,12 @@ re_compile_fastmap (bufp) boolean succeed_n_p = false; assert (fastmap != NULL && p != NULL); - + INIT_FAIL_STACK (); bzero (fastmap, 1 << BYTEWIDTH); /* Assume nothing's valid. */ bufp->fastmap_accurate = 1; /* It will be when we're done. */ bufp->can_be_null = 0; - + while (p != pend || !FAIL_STACK_EMPTY ()) { if (p == pend) @@ -2576,7 +2606,7 @@ re_compile_fastmap (bufp) /* Reset for next path. */ path_can_be_null = true; - p = fail_stack.stack[--fail_stack.avail]; + p = fail_stack.stack[--fail_stack.avail].pointer; } /* We should never be about to go beyond the end of the pattern. */ @@ -2705,10 +2735,10 @@ re_compile_fastmap (bufp) case jump_past_alt: case dummy_failure_jump: EXTRACT_NUMBER_AND_INCR (j, p); - p += j; + p += j; if (j > 0) continue; - + /* Jump backward implies we just went through the body of a loop and matched nothing. Opcode jumped to should be `on_failure_jump' or `succeed_n'. Just treat it like an @@ -2720,11 +2750,11 @@ re_compile_fastmap (bufp) p++; EXTRACT_NUMBER_AND_INCR (j, p); - p += j; - + p += j; + /* If what's on the stack is where we are now, pop it. */ - if (!FAIL_STACK_EMPTY () - && fail_stack.stack[fail_stack.avail - 1] == p) + if (!FAIL_STACK_EMPTY () + && fail_stack.stack[fail_stack.avail - 1].pointer == p) fail_stack.avail--; continue; @@ -2761,7 +2791,7 @@ re_compile_fastmap (bufp) case succeed_n: /* Get to the number of times to succeed. */ - p += 2; + p += 2; /* Increment p past the n for when k != 0. */ EXTRACT_NUMBER_AND_INCR (k, p); @@ -2852,7 +2882,7 @@ re_search (bufp, string, size, startpos, range, regs) int size, startpos, range; struct re_registers *regs; { - return re_search_2 (bufp, NULL, 0, string, size, startpos, range, + return re_search_2 (bufp, NULL, 0, string, size, startpos, range, regs, size); } @@ -2860,17 +2890,17 @@ re_search (bufp, string, size, startpos, range, regs) /* Using the compiled pattern in BUFP->buffer, first tries to match the virtual concatenation of STRING1 and STRING2, starting first at index STARTPOS, then at STARTPOS + 1, and so on. - + STRING1 and STRING2 have length SIZE1 and SIZE2, respectively. - + RANGE is how far to scan while trying to match. RANGE = 0 means try only at STARTPOS; in general, the last start tried is STARTPOS + RANGE. - + In REGS, return the indices of the virtual concatenation of STRING1 and STRING2 that matched the entire BUFP->buffer and its contained subexpressions. - + Do not consider matching one past the index STOP in the virtual concatenation of STRING1 and STRING2. @@ -2897,7 +2927,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) /* Check for out-of-range STARTPOS. */ if (startpos < 0 || startpos > total_size) return -1; - + /* Fix up RANGE if it might eventually take us outside the virtual concatenation of STRING1 and STRING2. */ if (endpos < -1) @@ -2915,14 +2945,25 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) range = 1; } +#ifdef emacs + /* In a forward search for something that starts with \=. + don't keep searching past point. */ + if (bufp->used > 0 && (re_opcode_t) bufp->buffer[0] == at_dot && range > 0) + { + range = PT - startpos; + if (range <= 0) + return -1; + } +#endif /* emacs */ + /* Update the fastmap now if not correct already. */ if (fastmap && !bufp->fastmap_accurate) if (re_compile_fastmap (bufp) == -2) return -2; - + /* Loop through the string, looking for a place to start matching. */ for (;;) - { + { /* If a fastmap is supplied, skip quickly over characters that cannot be the start of a match. If the pattern can match the null string, however, we don't need to skip characters; we want @@ -2939,7 +2980,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) lim = range - (size1 - startpos); d = (startpos >= size1 ? string2 - size1 : string1) + startpos; - + /* Written out as an if-else to avoid testing `translate' inside the loop. */ if (translate) @@ -2956,7 +2997,7 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) else /* Searching backwards. */ { register char c = (size1 == 0 || startpos >= size1 - ? string2[startpos - size1] + ? string2[startpos - size1] : string1[startpos]); if (!fastmap[(unsigned char) TRANSLATE (c)]) @@ -2973,21 +3014,21 @@ re_search_2 (bufp, string1, size1, string2, size2, startpos, range, regs, stop) startpos, regs, stop); if (val >= 0) return startpos; - + if (val == -2) return -2; advance: - if (!range) + if (!range) break; - else if (range > 0) + else if (range > 0) { - range--; + range--; startpos++; } else { - range++; + range++; startpos--; } } @@ -3002,16 +3043,16 @@ static boolean alt_match_null_string_p (), group_match_null_string_p (); /* Structure for per-register (a.k.a. per-group) information. - This must not be longer than one word, because we push this value - onto the failure stack. Other register information, such as the + Other register information, such as the starting and ending positions (which are addresses), and the list of inner groups (which is a bits list) are maintained in separate - variables. - + variables. + We are making a (strictly speaking) nonportable assumption here: that the compiler will pack our bit fields into something that fits into the type of `word', i.e., is something that fits into one item on the failure stack. */ + typedef union { fail_stack_elt_t word; @@ -3081,7 +3122,7 @@ typedef union /* Test if at very beginning or at very end of the virtual concatenation of `string1' and `string2'. If only one string, it's `string2'. */ #define AT_STRINGS_BEG(d) ((d) == (size1 ? string1 : string2) || !size2) -#define AT_STRINGS_END(d) ((d) == end2) +#define AT_STRINGS_END(d) ((d) == end2) /* Test if D points to a character which is word-constituent. We have @@ -3153,7 +3194,7 @@ re_match (bufp, string, size, pos, regs) the (virtual) concatenation of STRING1 and STRING2 (of length SIZE1 and SIZE2, respectively). We start matching at POS, and stop matching at STOP. - + If REGS is non-null and the `no_sub' field of BUFP is nonzero, we store offsets for the substring each group matched in REGS. See the documentation for exactly how many groups we fill. @@ -3184,7 +3225,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Where we are in the data, and the end of the current string. */ const char *d, *dend; - + /* Where we are in the pattern, and the end of the pattern. */ unsigned char *p = bufp->buffer; register unsigned char *pend = p + bufp->used; @@ -3211,7 +3252,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) return, for use in backreferences. The number here includes an element for register zero. */ unsigned num_regs = bufp->re_nsub + 1; - + /* The currently active registers. */ unsigned lowest_active_reg = NO_LOWEST_ACTIVE_REG; unsigned highest_active_reg = NO_HIGHEST_ACTIVE_REG; @@ -3238,10 +3279,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) matched any of the pattern so far this time through the reg_num-th subexpression. These two fields get reset each time through any loop their register is in. */ - register_info_type *reg_info; + register_info_type *reg_info; /* The following record the register info as found in the above - variables when we find a match better than any we've seen before. + variables when we find a match better than any we've seen before. This happens as we backtrack through the failure points, which in turn happens only if we have not yet matched the entire string. */ unsigned best_regs_set = false; @@ -3263,13 +3304,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) #ifdef DEBUG /* Counts the total number of registers pushed. */ - unsigned num_regs_pushed = 0; + unsigned num_regs_pushed = 0; #endif DEBUG_PRINT1 ("\n\nEntering re_match_2.\n"); - + INIT_FAIL_STACK (); - + /* Do not bother to initialize all the register variables if there are no groups in the pattern, as it takes a fair amount of time. If there are groups, we include space for register 0 (the whole @@ -3287,8 +3328,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) reg_dummy = REGEX_TALLOC (num_regs, const char *); reg_info_dummy = REGEX_TALLOC (num_regs, register_info_type); - if (!(regstart && regend && old_regstart && old_regend && reg_info - && best_regstart && best_regend && reg_dummy && reg_info_dummy)) + if (!(regstart && regend && old_regstart && old_regend && reg_info + && best_regstart && best_regend && reg_dummy && reg_info_dummy)) { FREE_VARIABLES (); return -2; @@ -3311,21 +3352,21 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) FREE_VARIABLES (); return -1; } - + /* Initialize subexpression text positions to -1 to mark ones that no start_memory/stop_memory has been seen for. Also initialize the register information struct. */ for (mcnt = 1; mcnt < num_regs; mcnt++) { - regstart[mcnt] = regend[mcnt] + regstart[mcnt] = regend[mcnt] = old_regstart[mcnt] = old_regend[mcnt] = REG_UNSET_VALUE; - + REG_MATCH_NULL_STRING_P (reg_info[mcnt]) = MATCH_NULL_UNSET_VALUE; IS_ACTIVE (reg_info[mcnt]) = 0; MATCHED_SOMETHING (reg_info[mcnt]) = 0; EVER_MATCHED_SOMETHING (reg_info[mcnt]) = 0; } - + /* We move `string1' into `string2' if the latter's empty -- but not if `string1' is null. */ if (size2 == 0 && string1 != NULL) @@ -3350,7 +3391,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) end_match_2 = string2 + stop - size1; } - /* `p' scans through the pattern as `d' scans through the data. + /* `p' scans through the pattern as `d' scans through the data. `dend' is the end of the input string that `d' points within. `d' is advanced into the following input string whenever necessary, but this happens before fetching; therefore, at the beginning of the @@ -3372,7 +3413,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT1 ("The string to match is: `"); DEBUG_PRINT_DOUBLE_STRING (d, string1, size1, string2, size2); DEBUG_PRINT1 ("'\n"); - + /* This loops over pattern commands. It exits by returning from the function if the match is complete, or it drops through if the match fails at this starting point in the input data. */ @@ -3383,13 +3424,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (p == pend) { /* End of pattern means we might have succeeded. */ DEBUG_PRINT1 ("end of pattern ... "); - + /* If we haven't matched the entire string, and we want the longest match, try backtracking. */ if (d != end_match_2) { DEBUG_PRINT1 ("backtracking.\n"); - + if (!FAIL_STACK_EMPTY ()) { /* More failure points to try. */ boolean same_str_p = (FIRST_STRING_P (match_end) @@ -3402,16 +3443,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { best_regs_set = true; match_end = d; - + DEBUG_PRINT1 ("\nSAVING match as best so far.\n"); - + for (mcnt = 1; mcnt < num_regs; mcnt++) { best_regstart[mcnt] = regstart[mcnt]; best_regend[mcnt] = regend[mcnt]; } } - goto fail; + goto fail; } /* If no failure points, don't restore garbage. */ @@ -3424,7 +3465,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) strings `x-' and `y-z-', if the two strings are not consecutive in memory. */ DEBUG_PRINT1 ("Restoring best registers.\n"); - + d = match_end; dend = ((d >= string1 && d <= end1) ? end_match_1 : end_match_2); @@ -3468,7 +3509,11 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) } } else - assert (bufp->regs_allocated == REGS_FIXED); + { + /* These braces fend off a "empty body in an else-statement" + warning under GCC when assert expands to nothing. */ + assert (bufp->regs_allocated == REGS_FIXED); + } /* Convert the pointer data in `regstart' and `regend' to indices. Register zero has to be set differently, @@ -3479,7 +3524,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) regs->end[0] = (MATCHING_IN_FIRST_STRING ? d - string1 : d - string2 + size1); } - + /* Go through the first `min (num_regs, regs->num_regs)' registers, since that is all we initialized. */ for (mcnt = 1; mcnt < MIN (num_regs, regs->num_regs); mcnt++) @@ -3492,7 +3537,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) regs->end[mcnt] = POINTER_TO_OFFSET (regend[mcnt]); } } - + /* If the regs structure we return has more elements than were in the pattern, set the extra elements to -1. If we (re)allocated the registers, this is the case, @@ -3508,8 +3553,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) nfailure_points_pushed - nfailure_points_popped); DEBUG_PRINT2 ("%u registers pushed.\n", num_regs_pushed); - mcnt = d - pos - (MATCHING_IN_FIRST_STRING - ? string1 + mcnt = d - pos - (MATCHING_IN_FIRST_STRING + ? string1 : string2 - size1); DEBUG_PRINT2 ("Returning %d from re_match_2.\n", mcnt); @@ -3599,7 +3644,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) p += 1 + *p; if (!not) goto fail; - + SET_REGS_MATCHED (); d++; break; @@ -3616,9 +3661,9 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Find out if this group can match the empty string. */ p1 = p; /* To send to group_match_null_string_p. */ - + if (REG_MATCH_NULL_STRING_P (reg_info[*p]) == MATCH_NULL_UNSET_VALUE) - REG_MATCH_NULL_STRING_P (reg_info[*p]) + REG_MATCH_NULL_STRING_P (reg_info[*p]) = group_match_null_string_p (&p1, pend, reg_info); /* Save the position in the string where we were the last time @@ -3629,7 +3674,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) old_regstart[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regstart[*p]) ? d : regstart[*p] : regstart[*p]; - DEBUG_PRINT2 (" old_regstart: %d\n", + DEBUG_PRINT2 (" old_regstart: %d\n", POINTER_TO_OFFSET (old_regstart[*p])); regstart[*p] = d; @@ -3637,10 +3682,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) IS_ACTIVE (reg_info[*p]) = 1; MATCHED_SOMETHING (reg_info[*p]) = 0; - + /* This is the new highest active register. */ highest_active_reg = *p; - + /* If nothing was active before, this is the new lowest active register. */ if (lowest_active_reg == NO_LOWEST_ACTIVE_REG) @@ -3656,7 +3701,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) number, and the number of inner groups. */ case stop_memory: DEBUG_PRINT3 ("EXECUTING stop_memory %d (%d):\n", *p, p[1]); - + /* We need to save the string position the last time we were at this close-group operator in case the group is operated upon by a repetition operator, e.g., with `((a*)*(b*)*)*' @@ -3665,7 +3710,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) old_regend[*p] = REG_MATCH_NULL_STRING_P (reg_info[*p]) ? REG_UNSET (regend[*p]) ? d : regend[*p] : regend[*p]; - DEBUG_PRINT2 (" old_regend: %d\n", + DEBUG_PRINT2 (" old_regend: %d\n", POINTER_TO_OFFSET (old_regend[*p])); regend[*p] = d; @@ -3673,7 +3718,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* This register isn't active anymore. */ IS_ACTIVE (reg_info[*p]) = 0; - + /* If this was the only register active, nothing is active anymore. */ if (lowest_active_reg == highest_active_reg) @@ -3689,7 +3734,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) unsigned char r = *p - 1; while (r > 0 && !IS_ACTIVE (reg_info[r])) r--; - + /* If we end up at register zero, that means that we saved the registers as the result of an `on_failure_jump', not a `start_memory', and we jumped to past the innermost @@ -3705,7 +3750,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) else highest_active_reg = r; } - + /* If just failed to match something this time around with a group that's operated on by a repetition operator, try to force exit from the ``loop'', and restore the register @@ -3716,7 +3761,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) && (p + 2) < pend) { boolean is_a_jump_n = false; - + p1 = p + 2; mcnt = 0; switch ((re_opcode_t) *p1++) @@ -3731,12 +3776,12 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (is_a_jump_n) p1 += 2; break; - + default: /* do nothing */ ; } p1 += mcnt; - + /* If the next operation is a jump backwards in the pattern to an on_failure_jump right before the start_memory corresponding to this stop_memory, exit from the loop @@ -3750,17 +3795,17 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) failed match, e.g., with `(a*)*b' against `ab' for regstart[1], and, e.g., with `((a*)*(b*)*)*' against `aba' for regend[3]. - + Also restore the registers for inner groups for, e.g., `((a*)(b*))*' against `aba' (register 3 would otherwise get trashed). */ - + if (EVER_MATCHED_SOMETHING (reg_info[*p])) { - unsigned r; - + unsigned r; + EVER_MATCHED_SOMETHING (reg_info[*p]) = 0; - + /* Restore this and inner groups' (if any) registers. */ for (r = *p; r < *p + *(p + 1); r++) { @@ -3769,7 +3814,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* xx why this test? */ if ((int) old_regend[r] >= (int) regstart[r]) regend[r] = old_regend[r]; - } + } } p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -3778,7 +3823,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) goto fail; } } - + /* Move past the register number and the inner group count. */ p += 2; break; @@ -3795,16 +3840,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Can't back reference a group which we've never matched. */ if (REG_UNSET (regstart[regno]) || REG_UNSET (regend[regno])) goto fail; - + /* Where in input to try to start matching. */ d2 = regstart[regno]; - + /* Where to stop matching; if both the place to start and the place to stop matching are in the same string, then set to the place to stop, otherwise, for now have to use the end of the first string. */ - dend2 = ((FIRST_STRING_P (regstart[regno]) + dend2 = ((FIRST_STRING_P (regstart[regno]) == FIRST_STRING_P (regend[regno])) ? regend[regno] : end_match_1); for (;;) @@ -3828,16 +3873,16 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* How many characters left in this segment to match. */ mcnt = dend - d; - + /* Want how many consecutive characters we can match in one shot, so, if necessary, adjust the count. */ if (mcnt > dend2 - d2) mcnt = dend2 - d2; - + /* Compare that many; failure if mismatch, else move past them. */ - if (translate - ? bcmp_translate (d, d2, mcnt, translate) + if (translate + ? bcmp_translate (d, d2, mcnt, translate) : bcmp (d, d2, mcnt)) goto fail; d += mcnt, d2 += mcnt; @@ -3851,7 +3896,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) `newline_anchor' is set, after newlines. */ case begline: DEBUG_PRINT1 ("EXECUTING begline.\n"); - + if (AT_STRINGS_BEG (d)) { if (!bufp->not_bol) break; @@ -3872,7 +3917,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { if (!bufp->not_eol) break; } - + /* We have to ``prefetch'' the next character. */ else if ((d == end1 ? *string2 : *d) == '\n' && bufp->newline_anchor) @@ -3906,7 +3951,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) then the . fails against the \n. But the next thing we want to do is match the \n against the \n; if we restored the string value, we would be back at the foo. - + Because this is used only in specific cases, we don't need to check all the things that `on_failure_jump' does, to make sure the right things get saved on the stack. Hence we don't @@ -3916,7 +3961,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) case; that seems worse than this. */ case on_failure_keep_string_jump: DEBUG_PRINT1 ("EXECUTING on_failure_keep_string_jump"); - + EXTRACT_NUMBER_AND_INCR (mcnt, p); DEBUG_PRINT3 (" %d (to 0x%x):\n", mcnt, p + mcnt); @@ -3925,7 +3970,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Uses of on_failure_jump: - + Each alternative starts with an on_failure_jump that points to the beginning of the next alternative. Each alternative except the last ends with a jump that in effect jumps past @@ -3991,7 +4036,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) would have to backtrack because of (as in, e.g., `a*a') then we can change to pop_failure_jump, because we'll never have to backtrack. - + This is not true in the case of alternatives: in `(a|ab)*' we do need to backtrack to the `ab' alternative (e.g., if the string was `ab'). But instead of trying to @@ -4031,12 +4076,12 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT3 (" %c != %c => pop_failure_jump.\n", c, p1[5]); } - + else if ((re_opcode_t) p1[3] == charset || (re_opcode_t) p1[3] == charset_not) { int not = (re_opcode_t) p1[3] == charset_not; - + if (c < (unsigned char) (p1[4] * BYTEWIDTH) && p1[5 + c / BYTEWIDTH] & (1 << (c % BYTEWIDTH))) not = !not; @@ -4085,7 +4130,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) } /* Note fall through. */ - + /* Unconditionally jump (without popping any failure points). */ case jump: unconditional_jump: @@ -4095,7 +4140,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) DEBUG_PRINT2 ("(to 0x%x).\n", p); break; - + /* We need this opcode so we can detect where alternatives end in `group_match_null_string_p' et al. */ case jump_past_alt: @@ -4130,7 +4175,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* Have to succeed matching what follows at least n times. After that, handle like `on_failure_jump'. */ - case succeed_n: + case succeed_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING succeed_n %d.\n", mcnt); @@ -4151,8 +4196,8 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) goto on_failure; } break; - - case jump_n: + + case jump_n: EXTRACT_NUMBER (mcnt, p + 2); DEBUG_PRINT2 ("EXECUTING jump_n %d.\n", mcnt); @@ -4161,13 +4206,13 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) { mcnt--; STORE_NUMBER (p + 2, mcnt); - goto unconditional_jump; + goto unconditional_jump; } /* If don't have to jump any more, skip over the rest of command. */ - else - p += 4; + else + p += 4; break; - + case set_number_at: { DEBUG_PRINT1 ("EXECUTING set_number_at.\n"); @@ -4206,31 +4251,23 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) goto fail; #ifdef emacs -#ifdef emacs19 case before_dot: DEBUG_PRINT1 ("EXECUTING before_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) >= point) goto fail; break; - + case at_dot: DEBUG_PRINT1 ("EXECUTING at_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) != point) goto fail; break; - + case after_dot: DEBUG_PRINT1 ("EXECUTING after_dot.\n"); if (PTR_CHAR_POS ((unsigned char *) d) <= point) goto fail; break; -#else /* not emacs19 */ - case at_dot: - DEBUG_PRINT1 ("EXECUTING at_dot.\n"); - if (PTR_CHAR_POS ((unsigned char *) d) + 1 != point) - goto fail; - break; -#endif /* not emacs19 */ case syntaxspec: DEBUG_PRINT2 ("EXECUTING syntaxspec %d.\n", mcnt); @@ -4244,6 +4281,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) PREFETCH (); if (SYNTAX (*d++) != (enum syntaxcode) mcnt) goto fail; + /* Can't use *d++ here; SYNTAX may be an unsafe macro. */ + d++; + if (SYNTAX (d[-1]) != (enum syntaxcode) mcnt) + goto fail; SET_REGS_MATCHED (); break; @@ -4257,8 +4298,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) mcnt = (int) Sword; matchnotsyntax: PREFETCH (); - if (SYNTAX (*d++) == (enum syntaxcode) mcnt) - goto fail; + /* Can't use *d++ here; SYNTAX may be an unsafe macro. */ + d++; + if (SYNTAX (d[-1]) == (enum syntaxcode) mcnt) + goto fail; SET_REGS_MATCHED (); break; @@ -4271,7 +4314,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) SET_REGS_MATCHED (); d++; break; - + case notwordchar: DEBUG_PRINT1 ("EXECUTING non-Emacs notwordchar.\n"); PREFETCH (); @@ -4281,7 +4324,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) d++; break; #endif /* not emacs */ - + default: abort (); } @@ -4306,7 +4349,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) if (p < pend) { boolean is_a_jump_n = false; - + /* If failed to a backwards jump that's part of a repetition loop, need to pop this failure point and use the next one. */ switch ((re_opcode_t) *p) @@ -4318,7 +4361,7 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) case jump: p1 = p + 1; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - p1 += mcnt; + p1 += mcnt; if ((is_a_jump_n && (re_opcode_t) *p1 == succeed_n) || (!is_a_jump_n @@ -4349,10 +4392,10 @@ re_match_2 (bufp, string1, size1, string2, size2, pos, regs, stop) /* We are passed P pointing to a register number after a start_memory. - + Return true if the pattern up to the corresponding stop_memory can match the empty string, and false otherwise. - + If we find the matching stop_memory, sets P to point to one past its number. Otherwise, sets P to an undefined byte less than or equal to END. @@ -4366,20 +4409,20 @@ group_match_null_string_p (p, end, reg_info) int mcnt; /* Point to after the args to the start_memory. */ unsigned char *p1 = *p + 2; - + while (p1 < end) { /* Skip over opcodes that can match nothing, and return true or false, as appropriate, when we get to one that can't, or to the matching stop_memory. */ - + switch ((re_opcode_t) *p1) { /* Could be either a loop or a series of alternatives. */ case on_failure_jump: p1++; EXTRACT_NUMBER_AND_INCR (mcnt, p1); - + /* If the next operation is not a jump backwards in the pattern. */ @@ -4393,7 +4436,7 @@ group_match_null_string_p (p, end, reg_info) /on_failure_jump/0/6/exactn/1/a/jump_past_alt/0/6 /on_failure_jump/0/6/exactn/1/b/jump_past_alt/0/3 - /exactn/1/c + /exactn/1/c So, we have to first go through the first (n-1) alternatives and then deal with the last one separately. */ @@ -4409,19 +4452,19 @@ group_match_null_string_p (p, end, reg_info) is, including the ending `jump_past_alt' and its number. */ - if (!alt_match_null_string_p (p1, p1 + mcnt - 3, + if (!alt_match_null_string_p (p1, p1 + mcnt - 3, reg_info)) return false; /* Move to right after this alternative, including the jump_past_alt. */ - p1 += mcnt; + p1 += mcnt; /* Break if it's the beginning of an n-th alternative that doesn't begin with an on_failure_jump. */ if ((re_opcode_t) *p1 != on_failure_jump) break; - + /* Still have to check that it's not an n-th alternative that starts with an on_failure_jump. */ p1++; @@ -4446,14 +4489,14 @@ group_match_null_string_p (p, end, reg_info) } /* if mcnt > 0 */ break; - + case stop_memory: assert (p1[1] == **p); *p = p1 + 2; return true; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -4466,7 +4509,7 @@ group_match_null_string_p (p, end, reg_info) /* Similar to group_match_null_string_p, but doesn't deal with alternatives: It expects P to be the first byte of a single alternative and END one byte past the last. The alternative can contain groups. */ - + static boolean alt_match_null_string_p (p, end, reg_info) unsigned char *p, *end; @@ -4474,12 +4517,12 @@ alt_match_null_string_p (p, end, reg_info) { int mcnt; unsigned char *p1 = p; - + while (p1 < end) { - /* Skip over opcodes that can match nothing, and break when we get + /* Skip over opcodes that can match nothing, and break when we get to one that can't. */ - + switch ((re_opcode_t) *p1) { /* It's a loop. */ @@ -4488,8 +4531,8 @@ alt_match_null_string_p (p, end, reg_info) EXTRACT_NUMBER_AND_INCR (mcnt, p1); p1 += mcnt; break; - - default: + + default: if (!common_op_match_null_string_p (&p1, end, reg_info)) return false; } @@ -4500,8 +4543,8 @@ alt_match_null_string_p (p, end, reg_info) /* Deals with the ops common to group_match_null_string_p and - alt_match_null_string_p. - + alt_match_null_string_p. + Sets P to one after the op and its arguments, if any. */ static boolean @@ -4536,7 +4579,7 @@ common_op_match_null_string_p (p, end, reg_info) reg_no = *p1; assert (reg_no > 0 && reg_no <= MAX_REGNUM); ret = group_match_null_string_p (&p1, end, reg_info); - + /* Have to set this here in case we're checking a group which contains a group and a back reference to it. */ @@ -4546,7 +4589,7 @@ common_op_match_null_string_p (p, end, reg_info) if (!ret) return false; break; - + /* If this is an optimized succeed_n for zero times, make the jump. */ case jump: EXTRACT_NUMBER_AND_INCR (mcnt, p1); @@ -4558,7 +4601,7 @@ common_op_match_null_string_p (p, end, reg_info) case succeed_n: /* Get to the number of times to succeed. */ - p1 += 2; + p1 += 2; EXTRACT_NUMBER_AND_INCR (mcnt, p1); if (mcnt == 0) @@ -4571,7 +4614,7 @@ common_op_match_null_string_p (p, end, reg_info) return false; break; - case duplicate: + case duplicate: if (!REG_MATCH_NULL_STRING_P (reg_info[*p1])) return false; break; @@ -4591,7 +4634,7 @@ common_op_match_null_string_p (p, end, reg_info) /* Return zero if TRANSLATE[S1] and TRANSLATE[S2] are identical for LEN bytes; nonzero otherwise. */ - + static int bcmp_translate (s1, s2, len, translate) unsigned char *s1, *s2; @@ -4612,10 +4655,10 @@ bcmp_translate (s1, s2, len, translate) /* re_compile_pattern is the GNU regular expression compiler: it compiles PATTERN (of length SIZE) and puts the result in BUFP. Returns 0 if the pattern was valid, otherwise an error string. - + Assumes the `allocated' (and perhaps `buffer') and `translate' fields are set in BUFP on entry. - + We call regex_compile to do the actual compilation. */ const char * @@ -4625,19 +4668,19 @@ re_compile_pattern (pattern, length, bufp) struct re_pattern_buffer *bufp; { reg_errcode_t ret; - + /* GNU code is written to assume at least RE_NREGS registers will be set (and at least one extra will be -1). */ bufp->regs_allocated = REGS_UNALLOCATED; - + /* And GNU code determines whether or not to get register information by passing null for the REGS argument to re_match, etc., not by setting no_sub. */ bufp->no_sub = 0; - + /* Match anchors at newline. */ bufp->newline_anchor = 1; - + ret = regex_compile (pattern, length, re_syntax_options, bufp); return re_error_msg[(int) ret]; @@ -4656,7 +4699,7 @@ re_comp (s) const char *s; { reg_errcode_t ret; - + if (!s) { if (!re_comp_buf.buffer) @@ -4740,7 +4783,7 @@ re_exec (s) int regcomp (preg, pattern, cflags) regex_t *preg; - const char *pattern; + const char *pattern; int cflags; { reg_errcode_t ret; @@ -4751,17 +4794,17 @@ regcomp (preg, pattern, cflags) /* regex_compile will allocate the space for the compiled pattern. */ preg->buffer = 0; preg->allocated = 0; - + /* Don't bother to use a fastmap when searching. This simplifies the REG_NEWLINE case: if we used a fastmap, we'd have to put all the characters after newlines into the fastmap. This way, we just try every character. */ preg->fastmap = 0; - + if (cflags & REG_ICASE) { unsigned i; - + preg->translate = (char *) malloc (CHAR_SET_SIZE); if (preg->translate == NULL) return (int) REG_ESPACE; @@ -4786,38 +4829,38 @@ regcomp (preg, pattern, cflags) preg->no_sub = !!(cflags & REG_NOSUB); - /* POSIX says a null character in the pattern terminates it, so we + /* POSIX says a null character in the pattern terminates it, so we can use strlen here in compiling the pattern. */ ret = regex_compile (pattern, strlen (pattern), syntax, preg); - + /* POSIX doesn't distinguish between an unmatched open-group and an unmatched close-group: both are REG_EPAREN. */ if (ret == REG_ERPAREN) ret = REG_EPAREN; - + return (int) ret; } /* regexec searches for a given pattern, specified by PREG, in the string STRING. - + If NMATCH is zero or REG_NOSUB was set in the cflags argument to `regcomp', we ignore PMATCH. Otherwise, we assume PMATCH has at least NMATCH elements, and we set them to the offsets of the corresponding matched substrings. - + EFLAGS specifies `execution flags' which affect matching: if REG_NOTBOL is set, then ^ does not match at the beginning of the string; if REG_NOTEOL is set, then $ does not match at the end. - + We return 0 if we find a match and REG_NOMATCH if not. */ int regexec (preg, string, nmatch, pmatch, eflags) const regex_t *preg; - const char *string; - size_t nmatch; - regmatch_t pmatch[]; + const char *string; + size_t nmatch; + regmatch_t pmatch[]; int eflags; { int ret; @@ -4827,15 +4870,15 @@ regexec (preg, string, nmatch, pmatch, eflags) boolean want_reg_info = !preg->no_sub && nmatch > 0; private_preg = *preg; - + private_preg.not_bol = !!(eflags & REG_NOTBOL); private_preg.not_eol = !!(eflags & REG_NOTEOL); - + /* The user has told us exactly how many registers to return information about, via `nmatch'. We have to pass that on to the matching routines. */ private_preg.regs_allocated = REGS_FIXED; - + if (want_reg_info) { regs.num_regs = nmatch; @@ -4849,7 +4892,7 @@ regexec (preg, string, nmatch, pmatch, eflags) ret = re_search (&private_preg, string, len, /* start: */ 0, /* range: */ len, want_reg_info ? ®s : (struct re_registers *) 0); - + /* Copy the register information to the POSIX structure. */ if (want_reg_info) { @@ -4889,7 +4932,7 @@ regerror (errcode, preg, errbuf, errbuf_size) if (errcode < 0 || errcode >= (sizeof (re_error_msg) / sizeof (re_error_msg[0]))) - /* Only error codes returned by the rest of the code should be passed + /* Only error codes returned by the rest of the code should be passed to this routine. If we are given anything else, or if other regex code generates an invalid error code, then the program has a bug. Dump core so we can fix it. */ @@ -4903,7 +4946,7 @@ regerror (errcode, preg, errbuf, errbuf_size) msg = "Success"; msg_size = strlen (msg) + 1; /* Includes the null. */ - + if (errbuf_size != 0) { if (msg_size > errbuf_size) @@ -4928,7 +4971,7 @@ regfree (preg) if (preg->buffer != NULL) free (preg->buffer); preg->buffer = NULL; - + preg->allocated = 0; preg->used = 0; @@ -4943,11 +4986,3 @@ regfree (preg) } #endif /* not emacs */ - -/* -Local variables: -make-backup-files: t -version-control: t -trim-versions-without-asking: nil -End: -*/ diff --git a/gnu/usr.bin/cvs/lib/regex.h b/gnu/usr.bin/cvs/lib/regex.h index 20cb5f21dd3..6ab52c38a5d 100644 --- a/gnu/usr.bin/cvs/lib/regex.h +++ b/gnu/usr.bin/cvs/lib/regex.h @@ -461,9 +461,11 @@ extern void re_set_registers _RE_ARGS ((struct re_pattern_buffer *buffer, struct re_registers *regs, unsigned num_regs, regoff_t *starts, regoff_t *ends)); -/* 4.2 bsd compatibility. */ -extern char *re_comp _RE_ARGS ((const char *)); -extern int re_exec _RE_ARGS ((const char *)); +/* 4.2 bsd compatibility. System headers may declare the argument as + either "char *" (e.g. Cray unistd.h) or "const char *" (e.g. linux + regex.h), so don't prototype them here. */ +extern char *re_comp (); +extern int re_exec (); /* POSIX compatibility. */ extern int regcomp _RE_ARGS ((regex_t *preg, const char *pattern, int cflags)); diff --git a/gnu/usr.bin/cvs/lib/vasprintf.c b/gnu/usr.bin/cvs/lib/vasprintf.c index 35f44b77b40..3dcfaaa1fd5 100644 --- a/gnu/usr.bin/cvs/lib/vasprintf.c +++ b/gnu/usr.bin/cvs/lib/vasprintf.c @@ -124,7 +124,13 @@ vasprintf (result, format, args) const char *format; va_list args; { +#ifdef VA_LIST_IS_ARRAY + /* If va_list is an array, we do not need the additional indirection */ + return int_vasprintf (result, format, args); +#else + /* va_list is some sort of pointer */ return int_vasprintf (result, format, &args); +#endif } #ifdef TEST diff --git a/gnu/usr.bin/cvs/lib/wait.h b/gnu/usr.bin/cvs/lib/wait.h index 2dbc6d9a248..60ed47a2724 100644 --- a/gnu/usr.bin/cvs/lib/wait.h +++ b/gnu/usr.bin/cvs/lib/wait.h @@ -17,12 +17,23 @@ #include /* for rusage */ #endif #include -#else +#endif +#ifndef WIFSTOPPED #define WIFSTOPPED(w) (((w) & 0xff) == 0x7f) +#endif +#ifndef WIFSIGNALED #define WIFSIGNALED(w) (((w) & 0xff) != 0x7f && ((w) & 0xff) != 0) +#endif +#ifndef WIFEXITED #define WIFEXITED(w) (((w) & 0xff) == 0) +#endif +#ifndef WSTOPSIG #define WSTOPSIG(w) (((w) >> 8) & 0xff) +#endif +#ifndef WTERMSIG #define WTERMSIG(w) ((w) & 0x7f) +#endif +#ifndef WEXITSTATUS #define WEXITSTATUS(w) (((w) >> 8) & 0xff) #endif diff --git a/gnu/usr.bin/cvs/lib/waitpid.c b/gnu/usr.bin/cvs/lib/waitpid.c index e8ddeb8a85a..02d6acb29f4 100644 --- a/gnu/usr.bin/cvs/lib/waitpid.c +++ b/gnu/usr.bin/cvs/lib/waitpid.c @@ -63,7 +63,11 @@ pid_t waitpid (pid, status, options) while (1) { +#ifdef HAVE_WAIT3 pid_t p = wait3 (status, options, (struct rusage *) 0); +#else + pid_t p = wait (status); +#endif if (p == 0 || p == -1 || p == pid) return p; diff --git a/gnu/usr.bin/cvs/macintosh/ChangeLog b/gnu/usr.bin/cvs/macintosh/ChangeLog index 0bffb5687a1..e9031e6ae68 100644 --- a/gnu/usr.bin/cvs/macintosh/ChangeLog +++ b/gnu/usr.bin/cvs/macintosh/ChangeLog @@ -1,3 +1,29 @@ +Wed Mar 12 16:10:01 1997 Jim Kingdon + + * config.h (HAVE_SETVBUF): Removed; no longer used. + +Mon Mar 10 15:28:07 1997 Jim Kingdon + + * Makefile.in (dist-dir): Don't distribute Makefile. I don't know + why we were distributing it in the first place (aping the OS/2 + port? If so the two _are_ different; that OS/2 port uses Makefile + for builds). + +Sun Mar 2 21:56:28 1997 Jim Kingdon + + * README.MacCVS: Be a little more explicit about what + MacCVS68k.sit.hqx and MacCVSPPC.sit.hqx are; at least one user got + confused and throught they were CVS executables. + +Wed Jan 29 18:26:09 1997 Jim Kingdon + + * options.h (GREP): Removed; no longer used. + +Tue Jan 28 18:29:03 1997 Jim Kingdon + + * config.h: Remove SIZEOF_INT and SIZEOF_LONG; no longer needed + with lib/md5.c changes. + Thu Jan 2 13:42:14 1997 Jim Kingdon * filesubr.c, pwd.c: Remove "675" paragraph; diff --git a/gnu/usr.bin/cvs/macintosh/Makefile.in b/gnu/usr.bin/cvs/macintosh/Makefile.in index 7d1607336d5..fc1c5c80557 100644 --- a/gnu/usr.bin/cvs/macintosh/Makefile.in +++ b/gnu/usr.bin/cvs/macintosh/Makefile.in @@ -69,7 +69,6 @@ dist-dir: for i in ${DISTFILES}; do \ ln $(srcdir)/$${i} ${DISTDIR}; \ done - ln Makefile ${DISTDIR} clean: @echo make clean does nothing in macintosh subdir diff --git a/gnu/usr.bin/cvs/macintosh/README.MacCVS b/gnu/usr.bin/cvs/macintosh/README.MacCVS index a652673aaac..0a49e0b283d 100644 --- a/gnu/usr.bin/cvs/macintosh/README.MacCVS +++ b/gnu/usr.bin/cvs/macintosh/README.MacCVS @@ -77,7 +77,10 @@ and make the changes you want. 3. Building MacCVS -I have included the MacCVS CW project files as a binhex stuffit archive ('maccvs.projects.sit.hqx'). +The files MacCVS68k.sit.hqx and MacCVSPPC.sit.hqx are CodeWarrior +project files for building the 68k and powerpc versions of CVS, +respectively. As the filename implies, they are binhex'd stuffit +archives. I have a "Projects" folder, where I keep the cvs folder and the CWGUSI folder. If you have a different arrangement, you will need to modify the access paths in diff --git a/gnu/usr.bin/cvs/macintosh/config.h b/gnu/usr.bin/cvs/macintosh/config.h index a25623978f4..b2a51bf1bef 100644 --- a/gnu/usr.bin/cvs/macintosh/config.h +++ b/gnu/usr.bin/cvs/macintosh/config.h @@ -62,12 +62,6 @@ /* Define if you want CVS to be able to be a remote repository client. */ #define CLIENT_SUPPORT 1 -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - /* Define if you have the connect function. */ #define HAVE_CONNECT @@ -77,9 +71,6 @@ /* Define if you have the ftruncate function. */ #undef HAVE_FTRUNCATE -/* Define if you have the setvbuf function. */ -//#define HAVE_SETVBUF 1 - /* Define if you have the vprintf function. */ #define HAVE_VPRINTF 1 diff --git a/gnu/usr.bin/cvs/macintosh/options.h b/gnu/usr.bin/cvs/macintosh/options.h index a56678a99cd..e1a24c2b103 100644 --- a/gnu/usr.bin/cvs/macintosh/options.h +++ b/gnu/usr.bin/cvs/macintosh/options.h @@ -54,17 +54,6 @@ #define DIFF "@gdiff_path@" #endif -/* - * The "grep" program to execute when checking to see if a merged file had - * any conflicts. This "grep" must support the "-s" option and a standard - * regular expression as an argument. Specify a full pathname if your site - * wants to use a particular grep. - */ - -#ifndef GREP -#define GREP "@ggrep_path@" -#endif - /* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site diff --git a/gnu/usr.bin/cvs/man/ChangeLog b/gnu/usr.bin/cvs/man/ChangeLog index 93580e506e8..6023631036a 100644 --- a/gnu/usr.bin/cvs/man/ChangeLog +++ b/gnu/usr.bin/cvs/man/ChangeLog @@ -1,3 +1,7 @@ +Wed Feb 12 14:20:43 1997 Jim Kingdon + + * Makefile.in (install): Depend on installdirs. + Thu Jan 2 13:30:56 1997 Jim Kingdon * Makefile.in, cvsbug.8: Remove "675" paragraph; diff --git a/gnu/usr.bin/cvs/man/Makefile.in b/gnu/usr.bin/cvs/man/Makefile.in index 79198fff027..ffc36139e0b 100644 --- a/gnu/usr.bin/cvs/man/Makefile.in +++ b/gnu/usr.bin/cvs/man/Makefile.in @@ -35,10 +35,9 @@ man8dir = $(mandir)/man8 all: .PHONY: all -# This used to depend on installdirs, but someone took it out (I think -# maybe it is/was some kind of Cygnus convention to not depend on installdirs; -# I'm not sure). I don't know what the pro(s) and con(s) are. -install: all +# This needs to depend on installdirs so that (for example) the +# install will not fail if $(prefix)/man/man5 does not yet exist. +install: all installdirs for f in $(MAN1FILES); do \ $(INSTALL_DATA) $(srcdir)/$$f $(man1dir)/$$f; \ done diff --git a/gnu/usr.bin/cvs/os2/ChangeLog b/gnu/usr.bin/cvs/os2/ChangeLog index 38627ef0fe1..da351ca2160 100644 --- a/gnu/usr.bin/cvs/os2/ChangeLog +++ b/gnu/usr.bin/cvs/os2/ChangeLog @@ -1,3 +1,37 @@ +Wed Mar 12 16:10:01 1997 Jim Kingdon + + * config.h (HAVE_SETVBUF): Removed; no longer used. + +Mon Feb 10 20:01:20 1997 Ullrich von Bassewitz + + * filesubr.c: Add an OS/2 specific chdir function that will not + only change the path but will also make the drive current that + is given in the argument string. + config.h: #define the macro CVS_CHDIR to os2_chdir so cvs will + use the os2_chdir function instead of chdir. + +Mon Feb 10 18:29:04 1997 Ullrich von Bassewitz + + * config.h: Define VA_LIST_IS_ARRAY so that vasprintf will work + correctly with the watcom compiler. + +Sun Feb 9 20:17:41 1997 Jim Kingdon + + * README: Most of the compiler warnings are gone. + +1997-02-09 Jim Kingdon + + * popen.h: Arguments to popen are const char * not char *. + +Wed Jan 29 18:27:11 1997 Jim Kingdon + + * options.h, config.h (GREP): Remove; no longer used. + +Tue Jan 28 18:29:03 1997 Jim Kingdon + + * config.h: Remove SIZEOF_INT and SIZEOF_LONG; no longer needed + with lib/md5.c changes. + Wed Jan 15 23:56:12 1997 Jim Kingdon * watcom.mak (OS2_OBJECTS): Remove strippath. diff --git a/gnu/usr.bin/cvs/os2/README b/gnu/usr.bin/cvs/os2/README index 45c769d27e4..64da1ce21db 100644 --- a/gnu/usr.bin/cvs/os2/README +++ b/gnu/usr.bin/cvs/os2/README @@ -16,7 +16,9 @@ differently. This is (IMHO) a bizarre behavior, but you need to convert the linefeeds to CRLF pairs (editing the file with an editor such as emacs will generally do this). - You will get warnings during the compilation; ignore them. + There are two compiler warnings in os2/popen.c which we haven't +figured out the cause of. Other than that there probably aren't a whole +lot of warnings (but there might be a few). Report bugs to . diff --git a/gnu/usr.bin/cvs/os2/config.h b/gnu/usr.bin/cvs/os2/config.h index 08c0388ec58..a14074b248f 100644 --- a/gnu/usr.bin/cvs/os2/config.h +++ b/gnu/usr.bin/cvs/os2/config.h @@ -36,6 +36,14 @@ #define _cwait cwait #endif +/* Some more WATCOM stuff: The watcom compiler defines va_list as an array, + * not as a pointer, which will make the vasprintf code break without the + * following define: + */ +#ifdef __WATCOMC__ +#define VA_LIST_IS_ARRAY +#endif + /* Define if on AIX 3. System headers sometimes define this. We just want to avoid a redefinition error message. */ @@ -132,16 +140,6 @@ /* We don't need this for CLIENT side. */ #undef DIFF -/* the path to the gnu grep program on your system */ -/* We don't need this for CLIENT side. */ -#undef GREP - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - /* Define if you have the connect function. */ /* Not used? */ /* It appears to be used in client.c now... don't know yet it OS/2 has it. */ @@ -174,9 +172,6 @@ /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 -/* Define if you have the setvbuf function. */ -#define HAVE_SETVBUF 1 - /* Define if you have the sigaction function. */ #undef HAVE_SIGACTION @@ -289,6 +284,10 @@ #define CVS_MKDIR os2_mkdir extern int os2_mkdir (const char *PATH, int MODE); +/* OS/2 needs a special chdir functions that handles drives */ +#define CVS_CHDIR os2_chdir +extern int os2_chdir (const char *Dir); + /* This function doesn't exist under OS/2; we provide a stub. */ extern int readlink (char *path, char *buf, int buf_size); diff --git a/gnu/usr.bin/cvs/os2/filesubr.c b/gnu/usr.bin/cvs/os2/filesubr.c index f2aa88ee4b6..a8653cb7037 100644 --- a/gnu/usr.bin/cvs/os2/filesubr.c +++ b/gnu/usr.bin/cvs/os2/filesubr.c @@ -915,3 +915,52 @@ expand_wild (argc, argv, pargc, pargv) *pargc = new_argc; *pargv = new_argv; } + +int +os2_chdir (const char *Dir) +/* Change drive and directory to the path given in Dir */ +{ + /* If the path includes a drive, change the current drive to the one given */ + if (strlen (Dir) >= 2 && Dir [1] == ':') + { + /* A drive is given in Dir. Extract the drive from the string, then + * remove the drive from Dir by incrementing it. + */ + int Drive = Dir [0]; + Dir += 2; + + /* Check if the given drive is valid, convert to a drive number + * (A: == 1, B: == 2, etc.). The compare below assumes ascii, but + * that is not a problem with OS/2. + */ + if (Drive >= 'a' && Drive <= 'z') + { + Drive -= 'a' - 1; + } + else if (Drive >= 'A' && Drive <= 'Z') + { + Drive -= 'A' - 1; + } + else + { + /* An invalid drive letter. Set errno and return an error */ + errno = EACCES; + return -1; + } + + /* We have a valid drive given, so change the drive now */ + if (DosSetDefaultDisk (Drive) != 0) + { + /* We had an error. Assume that the drive does not exist */ + errno = ENODEV; + return -1; + } + + } + + /* Now we have a path without a drive left. Make it the current dir */ + return chdir (Dir); +} + + + diff --git a/gnu/usr.bin/cvs/os2/options.h b/gnu/usr.bin/cvs/os2/options.h index d41909ae894..fe4aa9a1480 100644 --- a/gnu/usr.bin/cvs/os2/options.h +++ b/gnu/usr.bin/cvs/os2/options.h @@ -54,17 +54,6 @@ #define DIFF "diff" #endif -/* - * The "grep" program to execute when checking to see if a merged file had - * any conflicts. This "grep" must support the "-s" option and a standard - * regular expression as an argument. Specify a full pathname if your site - * wants to use a particular grep. - */ - -#ifndef GREP -#define GREP "grep" -#endif - /* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site diff --git a/gnu/usr.bin/cvs/os2/popen.h b/gnu/usr.bin/cvs/os2/popen.h index 8daf29eaef0..fec94e0ad57 100644 --- a/gnu/usr.bin/cvs/os2/popen.h +++ b/gnu/usr.bin/cvs/os2/popen.h @@ -1,6 +1,6 @@ /* We roll our own popen()/pclose() in OS/2. Thanks, Glenn Gribble! */ -FILE *popen (char *cmd, char *mode); +FILE *popen (const char *cmd, const char *mode); int popenRW (char **cmd, int *pipes); int pclose (FILE *stream); diff --git a/gnu/usr.bin/cvs/src/ChangeLog b/gnu/usr.bin/cvs/src/ChangeLog index c9d0f394f64..a78216d0505 100644 --- a/gnu/usr.bin/cvs/src/ChangeLog +++ b/gnu/usr.bin/cvs/src/ChangeLog @@ -1,5 +1,448 @@ +Sun Mar 16 10:18:28 1997 Jim Kingdon + + * version.c: Version 1.9.4. + + * rcscmds.c (RCS_checkin): Preserve the mode of the rcsfile. + RCS_CI usually, but not always, does this for us. + * commit.c (fix_rcs_modes): Replace algorithm with a more + CVSUMASK-friendly one. + * sanity.sh (modes): Update tests modes-5, modes-7, modes-10, and + modes-15 so they test that CVSUMASK is honored. + +Sun Mar 16 10:18:28 1997 Jim Kingdon + + * sanity.sh (modes): New tests modes-7a and modes-7b test behavior + if one manually changes the modes in the repository. + + * server.c (server): Revise code which checks for errors creating + temporary directory. This won't solve the intermittent + can't create temporary directory + Unknown error -1 + but it will mean (a) the right message based on errno gets + printed, instead of "unknown error -1", and (b) the message says + that it happened in chmod instead of mkdir_p. + +Sat Mar 15 16:47:12 1997 Jim Kingdon + + * sanity.sh (modes): New tests. Note that (for now) these are + just testing how CVS already behaves; I want to record that before + I move on to changing CVS's behavior with modes of RCS files. + +13 Mar 1997 Jim Kingdon + + * subr.c (line2argv): Change argv_allocated from size_t to int. + +Wed Mar 12 22:16:44 1997 Jim Kingdon + + * add.c (add_directory): If repository has an extraneous "." + directory at the end, strip it off. This fixes a bug which was + introduced when strip_path was nuked (this fix is much more + limited in scope than strip_path was; I _think_ that is a good + thing). + (add): Likewise, for client. + (combine_dir): New function, helps with above. + * sanity.sh (modules3): Reenable tests for this behavior. + (basica-0b, basicb-0e): Adjust test to reflect "foo/bar" instead + of "foo/./bar" in message. As with the rest of this, I believe + this is just restoring the behavior prior to the strip_path nuking + (I tried it with CVS 1.9). + +Sun Mar 9 10:06:29 1997 Jim Kingdon + + * root.c (parse_cvsroot), server.c (serve_root, serve_init): + If CVSroot_directory is not an absolute pathname, give a fatal error. + * sanity.sh (crerepos): New tests crerepos-6* test for above fixes. + +Sat Mar 8 22:06:17 1997 Jim Kingdon + + This cleans up the last known code which can overflow its buffers + (except the Mac client). I've skimmed through much of CVS looking + for other such places; but I didn't read everything. If I missed + any please report it to bug-cvs. + * logmsg.c (logfile_write, title_proc): Realloc str_list as + needed; don't assume MAXLISTLEN is enough. + * cvs.h (MAXLISTLEN, MAXFILEPERDIR): Removed; no longer used. + * add.c, myndbm.c, parseinfo.c, update.c: Nuke MAXLINELEN limit. + * parseinfo.c, update.c, mkmodules.c: Check for errors reading file. + * cvs.h (MAXLINELEN): Removed; no longer used. + * logmsg (MAXHOSTNAMELEN): Removed; not used. + * main.c (cmd_synonyms): Allocate based on fullname, nick1, and + nick2, just in case someone makes those big enough so that 100 + bytes is not enough. + (Make_Date): Use MAXDATELEN rather than our own fixed size. + * mkmodules.c (mkmodules): Nuke arbitrary limit on line length. + * rcs.c (ALLOCINCR): Remove; not used. + (RCS_check_kflag): Add comment concerning karg size. + * run.c: Allocate run_prog to the needed size, rather than + allocating a fixed size buffer. + +Fri Mar 7 22:39:08 1997 Jim Kingdon + + * logmsg.c (logfile_write): Allocate prog to needed length rather + than assuming MAXPROGLEN is enough. + * cvs.h (MAXPROGLEN): Removed; no longer used. + * subr.c (MIN_INCR): Update comment to reflect MAXPROGLEN's demise. + + * subr.c (free_names): Fix comment: this function is not used to + free memory allocated by Find_Names (at least it hasn't for a long + time). + * subr.c, cvs.h (line2argv): Change calling convention so that we + allocate argv array rather than the caller. The previous one had + no way of checking whether we overflowed the passed-in buffer. + * subr.c (free_names): Free the argv array too. + * modules.c (do_module, cat_module): Update callers. + +Thu Mar 6 12:44:42 1997 Jim Kingdon + + * import.c: Allocate vhead and vbranch dynamically; removes + arbitrary limit. + * history.c: Likewise (since_rev, since_tag, backto, rec_types). + * ignore.c: Likewise (line). Also check for errors from getline + and add 'copyright' notice to top of file. + * wrapper.c (wrap_add_file): Likewise (line). Also check for + errors from various calls and add 'copyright' notice to top of file. + +Tue Mar 4 17:39:15 1997 Jim Kingdon + + * client.c (update_entries): Add comment about "move away " + message. + +Mon Mar 3 21:51:40 1997 Jim Kingdon + + * sanity.sh (basicb): Clean up topfile,v at end of test. Fixes + failure in modules-155b. + +Sun Mar 2 18:11:09 1997 Dan Wilder + and Jim Kingdon + + * admin.c (admin): Arrange to perform recursion if "cvs admin" + is passed only options. + +Sun Mar 2 18:11:09 1997 Jim Kingdon + + * sanity.sh (basicb): New tests basicb-0* test for files at top + level. + + * error.c (error): Add newline to "out of memory" message. I think + that its omission probably could cause the message to be lost in + the bowels of server.c and never passed to the user. + + * client.c (start_rsh_server): Add comment about "remsh" vs. "rsh". + + * cvs.h: Move copyright notice to top of file. + +Sun Mar 2 13:44:36 1997 Ian Lance Taylor + + * sanity.sh: Use -n when testing whether rsh works. + + * server.c (serve_root): Free path. + +Sun Mar 2 13:12:46 1997 Jim Kingdon + + The following are things that I noticed in the process of trying + to track down: + can't create temporary directory + Unknown error -1 + FAIL: test 28 + from nightly testing. I'm not sure that either item explains that + message however. + * server.c (server): Allocate pending_error_text; + print_pending_error will try to free it so + pending_error_text = "foo" + won't work. + (mkdir_p): Don't assume that isdir will leave errno unmolested. + +Thu Feb 27 15:29:58 1997 Ian Lance Taylor + + * remove.c (cvsremove): When forcing removal in client mode, use + start_recursion rather than calling CVS_UNLINK on each argument. + (remove_force_fileproc): New static function. + * sanity.sh (deep): Add tests deep-rm7 through deep-rm10 for above + patch. + + * sanity.sh (death): Enable death-76a0 and death-76a1 tests for + remote, since they now work. + +Wed Feb 26 16:13:26 1997 Ian Lance Taylor + + * client.c (add_prune_candidate): Skip adding this directory if + it is the same as the first directory already on the list. + +Mon Feb 24 21:36:43 1997 Noel Cragg + + * main.c (lookup_command_attribute): Add the "init" command to the + list of commands that don't use the current working directory. + +Sun Feb 23 09:54:49 1997 Jim Kingdon + + * sanity.sh (devcom3): Clean up at end of test. + + * sanity.sh (basicb): Add commented out test basicb-8a0, for + whether CVS can print an error on bad numeric revision to diff. + Commented out until we get around to fixing CVS. + * diff.c (diff_file_nodiff): Add comment about this case. + + * fileattr.c (fileattr_read): If a filename is duplicated, + continue to ignore subsequent lines but free the node so that we + don't leak memory. + * sanity.sh (devcom3): New tests devcom3-8 and devcom3-9 test for + behavior on duplicated filenames. + + * fileattr.h: Add comment about unrecognized ENT-TYPE and order of + lines in fileattr file. + * fileattr.c (struct unrecog, unrecog_head): New variables, to + record unrecognized lines. + (fileattr_startdir): Assert that unrecog_head == NULL. + (fileattr_read): Record unrecognized lines in unrecog_head linked + list rather than ignoring them. + (fileattr_write): Also write out unrecognized lines, if any. + * sanity.sh (devcom3): New tests, test for above fix. + + * fileattr.h (fileattr_modify): Fix example in comment. + +Sat Feb 22 08:30:27 1997 Jim Kingdon + + * sanity.sh: Add variable username. + (basica rdiff multibranch log log2): Use it instead of our own + (inconsistent) ways of matching an author name. + + * filesubr.c, root.c, rtag.c, server.c, subr.c, update.c, + wrapper.c: Nuke PATH_MAX. + * cvs.h, wrapper.c (wrap_fromcvs_process_file): Now returns void + (return value had been unused). + * cvs.h: Adjust comment to reflect the fact that PATH_MAX is + gone, at least from src/*.c (except safe_location, as noted). + +22 Feb 1997 patch by Tom Hageman (4 Jun 1996) + updated and commented by Jim Kingdon + + * update.c (checkout_file): Call unlink_file_dir on backup, not + unlink_file. + +Fri Feb 21 16:40:03 1997 Jim Kingdon + + * Makefile.in (DISTFILES): Remove NOTES. + + * NOTES: Removed. bcopy->memcpy is done. "static buffers" I + assume refers to what is covered by reentrancy text in HACKING. + Obstack idea moved to comment in hash.c (at nodecache). Checking + system calls for error returns largely done, and isn't a very + helpful suggestion unless you know where the bogus calls are + anyway. Sizing limits--we're in the progress of removing them + (assuming it meant things like PATH_MAX and earlier, already + nuked, limits). Removed various items about changes which were + done a long time ago (I realize that the ChangeLog's probably + aren't reliable that far back, but I'm not convinced anyone cares + anymore). CONFIRM_DIRECTORY_ADDS: I assume this is a + reference to the #if 0'd code in add_directory which asks for + confirmation--a better way of making it harder to accidentally add + directories would be to have to add and commit directories like + for files. I don't know what FORCE_MESSAGE_ON_ADD meant. + + * rcs.c (RCS_getrevtime): Fix documentation (in particular, the + size of the array that DATE must point to, but many other things + too). + * patch.c, recurse.c, release.c, remove.c, repos.c: Nuke PATH_MAX. + (patch_fileproc): Use MAXDATELEN not hardcoded 50. + +Sun Feb 16 12:00:44 1997 Jim Kingdon + + * client.c (client_process_import_file): New variable fullname; + pass it to send_modified. This finishes the job of untangling the + old short_pathname variable into update_dir vs. fullname. + + * client.c (client_process_import_file): Nuke first_time. If + toplevel_repos were ever NULL here, the code would dump core in + strncmp a few lines down. And client_import_setup ensures + toplevel_repos is not NULL. + +Sun Feb 16 08:16:48 1997 Ian Lance Taylor + + * client.c (client_process_import_file): Rename short_pathname to + update_dir (to reflect its function) and make sure that it doesn't + point to uninitialized memory if repository and toplevel_repos + contain the same string. + +Sun Feb 16 08:16:48 1997 Jim Kingdon + + * client.c (start_rsh_server): Nuke comment about weirdnesses with + pre-1.5 versions of CVS and .bashrc/.cshrc. The remote protocol + is interoperable only back to 1.5, and people who need to know are + unlikely to see this comment anyway. + +Sun Dec 15 13:12:30 1996 Michael Douglass + and Jim Kingdon + + * main.c (cmds): Added an entry for new logout command. + (cmd_usage): Added an entry for new logout command. + (lookup_command_attribute): Added 'logout' to list of commands + that set need_to_crate_root to 1. + * login.c, cvs.h (logout): New command for removing entries from + the .cvspass file. + (logout_usage): Usage information on the logout command. + +Wed Feb 12 11:19:42 1997 Jim Kingdon + + * client.c (struct send_data): Fix indentation. + +Wed Feb 12 08:48:04 1997 Greg A. Woods + + * mkmodules.c (loginfo_contents): add missing comma in + initializer statement (caused syntax error on SunOS-4). + +Tue Feb 11 21:14:28 1997 Ian Lance Taylor + + * commit.c (find_fileproc): If force_ci is set, set the status to + T_MODIFIED even if the file hasn't changed. + (commit): Pass force_ci to send_files as new force argument. + * client.c (struct send_data): Define. + (send_fileproc): The callerdat parameter now points to a send_data + struct. If force is set, always call send_modified. + (send_dirent_proc): The callerdat parameter now points to a + send_data struct. + (send_files): Add force parameter. Change all callers. Set up a + send_data struct and pass it to start_recursion as callerdat. + * client.h (send_files): Update declaration. + * sanity.sh (basica): Add a simple test for the above patch. + +Sun Feb 9 12:58:59 1997 Jim Kingdon + + * tag.c (cvstag), rtag.c (rtag): Pass -f to server if specified in + the client. I haven't tried to come up with a test case because + the fix seems obvious. + + * import.c (add_rcs_file): Change size of altdate1 and altdate2 to + MAXDATELEN. + * cvs.h (MAXDATELEN): Fix comments; describe what this is for. + + * diff.c (diff_usage): Document --ifdef and try to briefly say + what "rcsdiff-options" means. + + * update.c (update): If update had a nonzero status and we haven't + yet tried to fetch unpatchable files, go ahead and try it again. + The previous behavior was to quit, which meant that updates would + keep failing until you hacked around the problem. Patch and bug + report by Ian; comment, ChangeLog entry, and willingness to take + the flak if checking it is premature by Jim. + + * server.c (alloc_pending): New function. + * server.c: Call it. Fixes places where we had neglected to + check for NULL return from malloc. + + * sanity.sh (binwrap): Add test binwrap-0, tests for import.c fix + below. + +Sun, 9 Feb 1997 (submitted 19 Jul 1996) John Polstra + + * import.c (import): Give error if the same tag is specified more + than once. The previous behavior was to write an RCS file which + had the same tag listed twice, once pointing to each revision, + which is not legal. + +Sun Feb 9 12:37:09 1997 Jim Kingdon + + * checkin.c (Checkin): Use cvs_output to print message (should + make out of order bugs no worse, as it merely substitues a + protocol_pipe vs. stderr_pipe race instead of a stdout_pipe + vs. stderr_pipe race). Add comment about stdout vs. stderr. + +Fri Feb 7 08:29:52 1997 Josef Nelissen + + * server.c (check_command_legal_p): Don't use ANSI-style definition. + +Thu Feb 6 10:55:37 1997 Jim Kingdon + + * patch.c (patch): Give a fatal error for -V option (see comment + for rationale). + + * diff.c (diff): Also send "options" to server. Pretty much the + patch submitted independently by josef.nelissen@munich.ixos.de and + Ronald Khoo . + +Wed Feb 5 18:57:14 1997 Jim Kingdon + + * modules.c (do_module): Fix typo in 30 Jan 97 PATH_MAX nuking + (free -> free_cwd). Testsuite test 151 gets credit for catching + this one. + +Mon Feb 3 16:14:54 1997 Ian Lance Taylor + + * main.c (lookup_command_attribute): Don't use an ANSI prototype + when defining the function. + +Fri Jan 31 12:49:02 1997 Ian Lance Taylor + + * modules.c (do_module): Actually goto found if is_found is set + (fixes thinko in PATH_MAX nuking of 30 Jan 97). + +Fri Jan 31 12:49:02 1997 Jim Kingdon + + * sanity.sh: Add modules3 and big to list of tests to run + by default; they were omitted by accident. + +Thu Jan 30 11:46:33 1997 Jim Kingdon + + * logmsg.c, main.c, mkmodules.c, modules.c, parseinfo.c, patch.c: + Nuke more PATH_MAX. + + * server.c (server_updated): After we send Created or + Update-existing for a file, mark it as unchanged, in case we + process it again. + * sanity.sh (modules3): New tests, test for above fix. + + * logmsg.c (do_verify): Error return from fopen is NULL, not -1. + Pass errno to error(). + + * login.c [_CRAY]: Don't declare getpass. + +Mon Jan 27 17:25:27 1997 Jim Kingdon + + * import.c (process_import_file): Fix freeing of rcs (Don't free + it before we are done using it, and don't free it twice). + + * modules.c (cat_module): Allocate line right before we use + it. The previous code was wrong because the length of the + s_h->rest changes between the time we allocate line and the time we + sprintf s_h->rest into it. + +Sun Jan 26 21:58:16 1997 Jim Kingdon + + * expand_path.c (expand_path): Revise to call expand_string as + needed. Nuke PATH_MAX. + * find_names.c (find_dirs): Likewise. + * import.c, lock.c: Nuke more PATH_MAX. + + * server.c (mkdir_p): Set retval to 0 at start of function. + Previously it had been uninitialized for some cases. Thanks are + due to nightly testing for catching this one. + +Sat Jan 25 21:34:19 1997 Jim Kingdon + + * subr.c, cvs.h (expand_string): New function. + * rcs.c (getrcskey, getrcsrev): Call it. This greatly reduces the + number of calls to realloc if there is a very large file in the + RCS file. Credit goes to Mike Heath for + pointing out the problem and the basic solution (MIN_INCR, + MAX_INCR); I adapted it into the separate function expand_string. + * sanity.sh (big): New test helps insure this hasn't broken + anything obvious. + +Wed Jan 22 10:06:13 1997 Jim Kingdon + + * status.c (status_fileproc): Change message which is printed for + T_MODIFIED and ts_conflict set, so that it doesn't say "unresolved + confict". This message occurs whether the conflict is resolved or + not. + * sanity.sh (conflicts): Add tests conflicts-status-* to test + output of "cvs status" in the context of conflicts. Tests for + above fix. + + * rtag.c (rtag): Send -n if run_module_prog is NOT true. + Thu Jan 16 00:06:00 1997 Jim Kingdon + * version.c: Change version number to 1.9.3. + * version.c: Version 1.9.2. Wed Jan 15 09:14:38 1997 Jim Kingdon diff --git a/gnu/usr.bin/cvs/src/Makefile.in b/gnu/usr.bin/cvs/src/Makefile.in index 9b9621df09f..e2dbe8d8db3 100644 --- a/gnu/usr.bin/cvs/src/Makefile.in +++ b/gnu/usr.bin/cvs/src/Makefile.in @@ -61,7 +61,6 @@ TAGFILES = $(HEADERS) options.h.in $(SOURCES) DISTFILES = .cvsignore Makefile.in \ ChangeLog ChangeLog-96 ChangeLog-9395 ChangeLog-9194 \ - NOTES \ sanity.sh cvsbug.sh $(TAGFILES) build_src.com PROGS = cvs cvsbug diff --git a/gnu/usr.bin/cvs/src/add.c b/gnu/usr.bin/cvs/src/add.c index fadc48bf3a0..28faecc7839 100644 --- a/gnu/usr.bin/cvs/src/add.c +++ b/gnu/usr.bin/cvs/src/add.c @@ -39,6 +39,47 @@ static const char *const add_usage[] = NULL }; +static char *combine_dir PROTO ((char *, char *)); + +/* Given a directory DIR and a subdirectory within it, SUBDIR, combine + the two into a new directory name. Returns a newly malloc'd string. + For now this is a fairly simple affair, but perhaps it will want + to have grander ambitions in the context of VMS or others (or perhaps + not, perhaps that should all be hidden inside CVS_FOPEN and libc and so + on, and CVS should just see foo/bar/baz style pathnames). */ +static char * +combine_dir (dir, subdir) + char *dir; + char *subdir; +{ + char *retval; + size_t dir_len; + + dir_len = strlen (dir); + retval = xmalloc (dir_len + strlen (subdir) + 10); + if (dir_len >= 2 + && dir[dir_len - 1] == '.' + && ISDIRSEP (dir[dir_len - 2])) + { + /* The dir name has an extraneous "." at the end. + I'm not completely sure that this is the best place + to strip it off--it is possible that Name_Repository + should do so, or it shouldn't be in the CVS/Repository + file in the first place. Fixing it here seems like + a safe, small change, but I'm not sure it catches + all the cases. */ + strncpy (retval, dir, dir_len - 2); + retval[dir_len - 2] = '\0'; + } + else + { + strcpy (retval, dir); + } + strcat (retval, "/"); + strcat (retval, subdir); + return retval; +} + int add (argc, argv) int argc; @@ -106,14 +147,13 @@ add (argc, argv) { char *tag; char *date; - char *rcsdir = xmalloc (strlen (repository) - + strlen (argv[i]) + 10); + char *rcsdir; /* before we do anything else, see if we have any per-directory tags */ ParseTag (&tag, &date); - sprintf (rcsdir, "%s/%s", repository, argv[i]); + rcsdir = combine_dir (repository, argv[i]); strip_trailing_slashes (argv[i]); @@ -139,7 +179,7 @@ add (argc, argv) } } send_file_names (argc, argv, SEND_EXPAND_WILD); - send_files (argc, argv, 0, 0, 1); + send_files (argc, argv, 0, 0, 1, 0); send_to_server ("add\012", 0); return get_responses_and_close (); } @@ -440,8 +480,7 @@ add_directory (repository, entries, dir) goto out; } - rcsdir = xmalloc (strlen (repository) + strlen (dir) + 10); - (void) sprintf (rcsdir, "%s/%s", repository, dir); + rcsdir = combine_dir (repository, dir); if (isfile (rcsdir) && !isdir (rcsdir)) { error (0, 0, "%s is not a directory; %s not added", rcsdir, dir); @@ -471,20 +510,13 @@ add_directory (repository, entries, dir) List *ulist; struct logfile_info *li; -#if 0 - char line[MAXLINELEN]; - - (void) printf ("Add directory %s to the repository (y/n) [n] ? ", - rcsdir); - (void) fflush (stdout); - clearerr (stdin); - if (fgets (line, sizeof (line), stdin) == NULL || - (line[0] != 'y' && line[0] != 'Y')) - { - error (0, 0, "directory %s not added", rcsdir); - goto out; - } -#endif + /* There used to be some code here which would prompt for + whether to add the directory. The details of that code had + bitrotted, but more to the point it can't work + client/server, doesn't ask in the right way for GUIs, etc. + A better way of making it harder to accidentally add + directories would be to have to add and commit directories + like for files. The code was #if 0'd at least since CVS 1.5. */ if (!noexec) { @@ -562,7 +594,7 @@ build_entry (repository, user, options, message, entries, tag) char *tag; { char *fname; - char line[MAXLINELEN]; + char *line; FILE *fp; if (noexec) @@ -587,7 +619,9 @@ build_entry (repository, user, options, message, entries, tag) * without needing to clean anything up (well, we could clean up the * ,t file, but who cares). */ + line = xmalloc (strlen (user) + 20); (void) sprintf (line, "Initial %s", user); Register (entries, user, "0", line, options, tag, (char *) 0, (char *) 0); + free (line); return (0); } diff --git a/gnu/usr.bin/cvs/src/admin.c b/gnu/usr.bin/cvs/src/admin.c index c3dd0add1f3..763eb981d29 100644 --- a/gnu/usr.bin/cvs/src/admin.c +++ b/gnu/usr.bin/cvs/src/admin.c @@ -38,6 +38,7 @@ admin (argc, argv) int err; #ifdef CVS_ADMIN_GROUP struct group *grp; + struct group *getgrnam(); #endif if (argc <= 1) usage (admin_usage); @@ -77,8 +78,6 @@ admin (argc, argv) av = argv + 1; argv += ac; ac--; - if (ac == 0 || argc == 0) - usage (admin_usage); #ifdef CLIENT_SUPPORT if (client_active) @@ -97,7 +96,7 @@ admin (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, 0, 0, 0); + send_files (argc, argv, 0, 0, 0, 0); send_to_server ("admin\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/checkin.c b/gnu/usr.bin/cvs/src/checkin.c index 4f54a8bc333..c5b5d073f16 100644 --- a/gnu/usr.bin/cvs/src/checkin.c +++ b/gnu/usr.bin/cvs/src/checkin.c @@ -34,7 +34,14 @@ Checkin (type, finfo, rcs, rev, tag, options, message) int set_time; char *tocvsPath = NULL; - (void) printf ("Checking in %s;\n", finfo->fullname); + /* Hmm. This message goes to stdout and the "foo,v <-- foo" + message from "ci" goes to stderr. This doesn't make a whole + lot of sense, but making everything go to stdout can only be + gracefully achieved once RCS_checkin is librarified. */ + cvs_output ("Checking in ", 0); + cvs_output (finfo->fullname, 0); + cvs_output (";\n", 0); + fname = xmalloc (strlen (finfo->file) + 80); (void) sprintf (fname, "%s/%s%s", CVSADM, CVSPREFIX, finfo->file); diff --git a/gnu/usr.bin/cvs/src/client.c b/gnu/usr.bin/cvs/src/client.c index 2a2cfb90bb6..61b3d620258 100644 --- a/gnu/usr.bin/cvs/src/client.c +++ b/gnu/usr.bin/cvs/src/client.c @@ -1421,6 +1421,24 @@ update_entries (data_arg, ent_list, short_pathname, filename) char buf[8192]; + /* This error might be confusing; it isn't really clear to + the user what to do about it. Keep in mind that it has + several causes: (1) something/someone creates the file + during the time that CVS is running, (2) the repository + has two files whose names clash for the client because + of case-insensitivity or similar causes, (3) a special + case of this is that a file gets renamed for example + from a.c to A.C. A "cvs update" on a case-insensitive + client will get this error. Repeating the update takes + care of the problem, but is it clear to the user what + is going on and what to do about it?, (4) the client + has a file which the server doesn't know about (e.g. "? + foo" file), and that name clashes with a file the + server does know about, (5) classify.c will print the same + message for other reasons. + + I hope the above paragraph makes it clear that making this + clearer is not a one-line fix. */ error (0, 0, "move away %s; it is in the way", short_pathname); discard_file_and_return: @@ -2160,7 +2178,9 @@ add_prune_candidate (dir) { struct save_dir *p; - if (dir[0] == '.' && dir[1] == '\0') + if ((dir[0] == '.' && dir[1] == '\0') + || (prune_candidates != NULL + && strcmp (dir, prune_candidates->dir) == 0)) return; p = (struct save_dir *) xmalloc (sizeof (struct save_dir)); p->dir = xstrdup (dir); @@ -2554,7 +2574,7 @@ client_send_expansions (local, where, build_dirs) { argv[0] = where ? where : modules_vector[i]; if (isfile (argv[0])) - send_files (1, argv, local, 0, build_dirs); + send_files (1, argv, local, 0, build_dirs, 0); } send_a_repository ("", CVSroot_directory, ""); } @@ -3668,15 +3688,30 @@ start_rsh_server (tofdp, fromfdp) char *rsh_argv[10]; if (!cvs_rsh) + /* People sometimes suggest or assume that this should default + to "remsh" on systems like HPUX in which that is the + system-supplied name for the rsh program. However, that + causes various problems (keep in mind that systems such as + HPUX might have non-system-supplied versions of "rsh", like + a Kerberized one, which one might want to use). If we + based the name on what is found in the PATH of the person + who runs configure, that would make it harder to + consistently produce the same result in the face of + different people producing binary distributions. If we + based it on "remsh" always being the default for HPUX + (e.g. based on uname), that might be slightly better but + would require us to keep track of what the defaults are for + each system type, and probably would cope poorly if the + existence of remsh or rsh varies from OS version to OS + version. Therefore, it seems best to have the default + remain "rsh", and tell HPUX users to specify remsh, for + example in CVS_RSH or other such mechanisms to be devised, + if that is what they want (the manual already tells them + that). */ cvs_rsh = "rsh"; if (!cvs_server) cvs_server = "cvs"; - /* If you are running a very old (Nov 3, 1994, before 1.5) - * version of the server, you need to make sure that your .bashrc - * on the server machine does not set CVSROOT to something - * containing a colon (or better yet, upgrade the server). */ - /* The command line starts out with rsh. */ rsh_argv[i++] = cvs_rsh; @@ -4048,6 +4083,16 @@ send_modified (file, short_pathname, vers) free (mode_string); } +/* The address of an instance of this structure is passed to + send_fileproc, send_filesdoneproc, and send_direntproc, as the + callerdat parameter. */ + +struct send_data +{ + int build_dirs; + int force; +}; + static int send_fileproc PROTO ((void *callerdat, struct file_info *finfo)); /* Deal with one file. */ @@ -4056,6 +4101,7 @@ send_fileproc (callerdat, finfo) void *callerdat; struct file_info *finfo; { + struct send_data *args = (struct send_data *) callerdat; Vers_TS *vers; struct file_info xfinfo; /* File name to actually use. Might differ in case from @@ -4117,6 +4163,7 @@ send_fileproc (callerdat, finfo) just happen. */ } else if (vers->ts_rcs == NULL + || args->force || strcmp (vers->ts_user, vers->ts_rcs) != 0) { send_modified (filename, finfo->fullname, vers); @@ -4203,7 +4250,7 @@ send_dirent_proc (callerdat, dir, repository, update_dir, entries) char *update_dir; List *entries; { - int build_dirs = *(int *) callerdat; + struct send_data *args = (struct send_data *) callerdat; int dir_exists; char *cvsadm_name; char *cvsadm_repos_name; @@ -4256,7 +4303,7 @@ send_dirent_proc (callerdat, dir, repository, update_dir, entries) new directories (build_dirs is true). Otherwise, CVS may see a D line in an Entries file, and recreate a directory which the user removed by hand. */ - if (dir_exists || build_dirs) + if (dir_exists || args->build_dirs) send_a_repository (dir, repository, update_dir); } free (cvsadm_repos_name); @@ -4442,18 +4489,21 @@ send_file_names (argc, argv, flags) * Send Repository, Modified and Entry. argc and argv contain only * the files to operate on (or empty for everything), not options. * local is nonzero if we should not recurse (-l option). build_dirs - * is nonzero if nonexistent directories should be sent. Also sends - * Argument lines for argc and argv, so should be called after options - * are sent. + * is nonzero if nonexistent directories should be sent. force is + * nonzero if we should send unmodified files to the server as though + * they were modified. Also sends Argument lines for argc and argv, + * so should be called after options are sent. */ void -send_files (argc, argv, local, aflag, build_dirs) +send_files (argc, argv, local, aflag, build_dirs, force) int argc; char **argv; int local; int aflag; int build_dirs; + int force; { + struct send_data args; int err; /* @@ -4461,9 +4511,11 @@ send_files (argc, argv, local, aflag, build_dirs) * But we don't actually use it, so I don't think it matters what we pass * for aflag here. */ + args.build_dirs = build_dirs; + args.force = force; err = start_recursion (send_fileproc, send_filesdoneproc, - send_dirent_proc, (DIRLEAVEPROC)NULL, (void *) &build_dirs, + send_dirent_proc, (DIRLEAVEPROC)NULL, (void *) &args, argc, argv, local, W_LOCAL, aflag, 0, (char *)NULL, 0); if (err) error_exit (); @@ -4499,28 +4551,34 @@ client_process_import_file (message, vfile, vtag, targc, targv, repository) char *targv[]; char *repository; { - char *short_pathname; - int first_time; - - /* FIXME: I think this is always false now that we call - client_import_setup at the start. */ - - first_time = toplevel_repos == NULL; + char *update_dir; + char *fullname; - if (first_time) - send_a_repository ("", repository, ""); + assert (toplevel_repos != NULL); if (strncmp (repository, toplevel_repos, strlen (toplevel_repos)) != 0) error (1, 0, "internal error: pathname `%s' doesn't specify file in `%s'", repository, toplevel_repos); - short_pathname = repository + strlen (toplevel_repos) + 1; - if (!first_time) + if (strcmp (repository, toplevel_repos) == 0) + { + update_dir = ""; + fullname = xstrdup (vfile); + } + else { - send_a_repository ("", repository, short_pathname); + update_dir = repository + strlen (toplevel_repos) + 1; + + fullname = xmalloc (strlen (vfile) + strlen (update_dir) + 10); + strcpy (fullname, update_dir); + strcat (fullname, "/"); + strcat (fullname, vfile); } - send_modified (vfile, short_pathname, NULL); + + send_a_repository ("", repository, update_dir); + send_modified (vfile, fullname, NULL); + free (fullname); return 0; } diff --git a/gnu/usr.bin/cvs/src/client.h b/gnu/usr.bin/cvs/src/client.h index 10e1759f049..d313c965e6e 100644 --- a/gnu/usr.bin/cvs/src/client.h +++ b/gnu/usr.bin/cvs/src/client.h @@ -83,7 +83,7 @@ send_file_names PROTO((int argc, char **argv, unsigned int flags)); */ void send_files PROTO((int argc, char **argv, int local, int aflag, - int build_dirs)); + int build_dirs, int force)); /* Send an argument to the remote server. */ void diff --git a/gnu/usr.bin/cvs/src/diff.c b/gnu/usr.bin/cvs/src/diff.c index 7163c3e7481..24bc7b60d9c 100644 --- a/gnu/usr.bin/cvs/src/diff.c +++ b/gnu/usr.bin/cvs/src/diff.c @@ -69,6 +69,9 @@ static const char *const diff_usage[] = "\t-N\tinclude diffs for added and removed files.\n", "\t-r rev1\tDiff revision for rev1 against working file.\n", "\t-r rev2\tDiff rev1/date1 against rev2.\n", + "\t--ifdef=arg\tOutput diffs in ifdef format.\n", + "(consult the documentation for your diff program for rcsdiff-options.\n", + "The most popular is -c for context diffs but there are many more).\n", NULL }; @@ -294,6 +297,8 @@ diff (argc, argv) if (empty_files) send_arg("-N"); send_option_string (opts); + if (options[0] != '\0') + send_arg (options); if (diff_rev1) option_with_arg ("-r", diff_rev1); if (diff_date1) @@ -312,7 +317,7 @@ diff (argc, argv) /* Send the current files unless diffing two revs from the archive */ if (diff_rev2 == NULL && diff_date2 == NULL) #endif - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("diff\012", 0); err = get_responses_and_close (); @@ -776,6 +781,10 @@ diff_file_nodiff (finfo, vers, empty_file) true, treat this as an added file. Otherwise, warn about the missing tag. */ if (use_rev2 == NULL) + /* At least in the case where DIFF_REV1 and DIFF_REV2 + are both numeric, we should be returning some kind + of error (see basicb-8a0 in testsuite). The symbolic + case may be more complicated. */ return DIFF_SAME; else if (empty_files) return DIFF_ADDED; diff --git a/gnu/usr.bin/cvs/src/edit.c b/gnu/usr.bin/cvs/src/edit.c index ae7964d9645..7593da43d20 100644 --- a/gnu/usr.bin/cvs/src/edit.c +++ b/gnu/usr.bin/cvs/src/edit.c @@ -90,7 +90,7 @@ watch_onoff (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server (turning_on ? "watch-on\012" : "watch-off\012", 0); return get_responses_and_close (); } @@ -1002,7 +1002,7 @@ editors (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("editors\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/error.c b/gnu/usr.bin/cvs/src/error.c index a772cca0e8f..0ed7eb24d37 100644 --- a/gnu/usr.bin/cvs/src/error.c +++ b/gnu/usr.bin/cvs/src/error.c @@ -149,7 +149,7 @@ error (status, errnum, message, va_alist) free (mess); } } - cvs_outerr (entire ? entire : "out of memory", 0); + cvs_outerr (entire ? entire : "out of memory\n", 0); if (entire != NULL) free (entire); } diff --git a/gnu/usr.bin/cvs/src/expand_path.c b/gnu/usr.bin/cvs/src/expand_path.c index ab093512955..7d0bc39e5ab 100644 --- a/gnu/usr.bin/cvs/src/expand_path.c +++ b/gnu/usr.bin/cvs/src/expand_path.c @@ -95,40 +95,82 @@ expand_path (name, file, line) { char *s; char *d; - /* FIXME: arbitrary limit. */ - char mybuf[PATH_MAX]; - char buf[PATH_MAX]; + + char *mybuf = NULL; + size_t mybuf_size = 0; + char *buf = NULL; + size_t buf_size = 0; + + size_t doff; + char *result; + + /* Sorry this routine is so ugly; it is a head-on collision + between the `traditional' unix *d++ style and the need to + dynamically allocate. It would be much cleaner (and probably + faster, not that this is a bottleneck for CVS) with more use of + strcpy & friends, but I haven't taken the effort to rewrite it + thusly. */ + + /* First copy from NAME to MYBUF, expanding $ as we go. */ s = name; d = mybuf; + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; while ((*d++ = *s)) + { if (*s++ == '$') { char *p = d; char *e; int flag = (*s == '{'); + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; for (; (*d++ = *s); s++) + { if (flag ? *s =='}' : isalnum (*s) == 0 && *s != '_') break; - *--d = 0; + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; + } + *--d = '\0'; e = expand_variable (&p[flag], file, line); if (e) { + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; for (d = &p[-1]; (*d++ = *e++);) - ; + { + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; + } --d; if (flag && *s) s++; } else /* expand_variable has already printed an error message. */ - return NULL; + goto error_exit; } - *d = 0; + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; + } + doff = d - mybuf; + expand_string (&mybuf, &mybuf_size, doff + 1); + d = mybuf + doff; + *d = '\0'; + + /* Then copy from MYBUF to BUF, expanding ~. */ s = mybuf; d = buf; /* If you don't want ~username ~/ to be expanded simply remove @@ -158,8 +200,15 @@ expand_path (name, file, line) } t = ps->pw_dir; } + doff = d - buf; + expand_string (&buf, &buf_size, doff + 1); + d = buf + doff; while ((*d++ = *t++)) - ; + { + doff = d - buf; + expand_string (&buf, &buf_size, doff + 1); + d = buf + doff; + } --d; if (*p == 0) *p = '/'; /* always add / */ @@ -168,12 +217,35 @@ expand_path (name, file, line) else --s; /* Kill up to here */ + doff = d - buf; + expand_string (&buf, &buf_size, doff + 1); + d = buf + doff; while ((*d++ = *s++)) - ; - *d=0; - result = xmalloc (sizeof(char) * strlen(buf)+1); - strcpy (result, buf); + { + doff = d - buf; + expand_string (&buf, &buf_size, doff + 1); + d = buf + doff; + } + doff = d - buf; + expand_string (&buf, &buf_size, doff + 1); + d = buf + doff; + *d = '\0'; + + /* OK, buf contains the value we want to return. Clean up and return + it. */ + free (mybuf); + /* Save a little memory with xstrdup; buf will tend to allocate + more than it needs to. */ + result = xstrdup (buf); + free (buf); return result; + + error_exit: + if (mybuf != NULL) + free (mybuf); + if (buf != NULL) + free (buf); + return NULL; } static char * diff --git a/gnu/usr.bin/cvs/src/fileattr.c b/gnu/usr.bin/cvs/src/fileattr.c index c64596bfe87..eda7753492a 100644 --- a/gnu/usr.bin/cvs/src/fileattr.c +++ b/gnu/usr.bin/cvs/src/fileattr.c @@ -31,6 +31,14 @@ static int attr_read_attempted; /* Have the in-memory attributes been modified since we read them? */ static int attrs_modified; +/* More in-memory attributes: linked list of unrecognized + fileattr lines. We pass these on unchanged. */ +struct unrecog { + char *line; + struct unrecog *next; +}; +static struct unrecog *unrecog_head; + /* Note that if noone calls fileattr_get, this is very cheap. No stat(), no open(), no nothing. */ void @@ -41,6 +49,7 @@ fileattr_startdir (repos) fileattr_stored_repos = xstrdup (repos); assert (attrlist == NULL); attr_read_attempted = 0; + assert (unrecog_head == NULL); } static void @@ -108,7 +117,12 @@ fileattr_read () newnode->delproc = fileattr_delproc; newnode->key = xstrdup (line + 1); newnode->data = xstrdup (p); - addnode (attrlist, newnode); + if (addnode (attrlist, newnode) != 0) + /* If the same filename appears twice in the file, discard + any line other than the first for that filename. This + is the way that CVS has behaved since file attributes + were first introduced. */ + free (newnode); } else if (line[0] == 'D') { @@ -119,7 +133,17 @@ fileattr_read () ++p; fileattr_default_attrs = xstrdup (p); } - /* else just ignore the line, for future expansion. */ + else + { + /* Unrecognized type, we want to just preserve the line without + changing it, for future expansion. */ + struct unrecog *new; + + new = (struct unrecog *) xmalloc (sizeof (struct unrecog)); + new->line = xstrdup (line); + new->next = unrecog_head; + unrecog_head = new; + } } if (ferror (fp)) error (0, errno, "cannot read %s", fname); @@ -421,7 +445,9 @@ fileattr_write () strcat (fname, "/"); strcat (fname, CVSREP_FILEATTR); - if (list_isempty (attrlist) && fileattr_default_attrs == NULL) + if (list_isempty (attrlist) + && fileattr_default_attrs == NULL + && unrecog_head == NULL) { /* There are no attributes. */ if (unlink_file (fname) < 0) @@ -489,13 +515,32 @@ fileattr_write () } } (void) umask (omask); + + /* First write the "F" attributes. */ walklist (attrlist, writeattr_proc, fp); + + /* Then the "D" attribute. */ if (fileattr_default_attrs != NULL) { fputs ("D\t", fp); fputs (fileattr_default_attrs, fp); fputs ("\012", fp); } + + /* Then any other attributes. */ + while (unrecog_head != NULL) + { + struct unrecog *p; + + p = unrecog_head; + fputs (p->line, fp); + fputs ("\012", fp); + + unrecog_head = p->next; + free (p->line); + free (p); + } + if (fclose (fp) < 0) error (0, errno, "cannot close %s", fname); attrs_modified = 0; diff --git a/gnu/usr.bin/cvs/src/fileattr.h b/gnu/usr.bin/cvs/src/fileattr.h index 0ca7eae1515..c6362afa993 100644 --- a/gnu/usr.bin/cvs/src/fileattr.h +++ b/gnu/usr.bin/cvs/src/fileattr.h @@ -23,6 +23,13 @@ ENT-TYPE is 'D', and FILENAME empty, to specify default attributes to be used for newly added files. + Other ENT-TYPE are reserved for future expansion. CVS 1.9 and older + will delete them any time it writes file attributes. Current versions + of CVS will preserve them. + + Note that the order of the line is not significant; CVS is free to + rearrange them at its convenience. + There is currently no way of quoting tabs or linefeeds in the filename, '=' in ATTRNAME, ';' in ATTRVAL, etc. I'm not sure whether I think we need one. Note: the current implementation also @@ -91,7 +98,7 @@ extern char *fileattr_get0 PROTO ((const char *filename, => "abc=val;def=v2" fileattr_modify ("abc=v1;def=v2", "def", "val", '=', ';')) => "abc=v1;def=val" - fileattr_modify ("abc=v1;def=v2", "xxx", "val")) + fileattr_modify ("abc=v1;def=v2", "xxx", "val", '=', ';')) => "abc=v1;def=v2;xxx=val" fileattr_modify ("abc=v1;def=v2;ghi=v3", "def", "val", '=', ';')) => "abc=v1;def=val;ghi=v3" diff --git a/gnu/usr.bin/cvs/src/filesubr.c b/gnu/usr.bin/cvs/src/filesubr.c index 03d8cdce47f..b3142545f9b 100644 --- a/gnu/usr.bin/cvs/src/filesubr.c +++ b/gnu/usr.bin/cvs/src/filesubr.c @@ -463,7 +463,6 @@ deep_remove_dir (path) { DIR *dirp; struct dirent *dp; - char buf[PATH_MAX]; if (rmdir (path) != 0) { @@ -482,10 +481,13 @@ deep_remove_dir (path) while ((dp = readdir (dirp)) != NULL) { + char *buf; + if (strcmp (dp->d_name, ".") == 0 || strcmp (dp->d_name, "..") == 0) continue; + buf = xmalloc (strlen (path) + strlen (dp->d_name) + 5); sprintf (buf, "%s/%s", path, dp->d_name); /* See comment in unlink_file_dir explanation of why we use @@ -496,6 +498,7 @@ deep_remove_dir (path) if (deep_remove_dir(buf)) { closedir(dirp); + free (buf); return -1; } } @@ -504,9 +507,11 @@ deep_remove_dir (path) if (unlink (buf) != 0) { closedir(dirp); + free (buf); return -1; } } + free (buf); } closedir (dirp); return rmdir (path); diff --git a/gnu/usr.bin/cvs/src/find_names.c b/gnu/usr.bin/cvs/src/find_names.c index 8bfce8c75b7..a7a91bbfd3e 100644 --- a/gnu/usr.bin/cvs/src/find_names.c +++ b/gnu/usr.bin/cvs/src/find_names.c @@ -288,7 +288,8 @@ find_dirs (dir, list, checkadm, entries) List *entries; { Node *p; - char tmp[PATH_MAX]; + char *tmp = NULL; + size_t tmp_size = 0; struct dirent *dp; DIR *dirp; @@ -322,6 +323,9 @@ find_dirs (dir, list, checkadm, entries) if (fnmatch (RCSPAT, dp->d_name, 0) == 0) continue; + expand_string (&tmp, + &tmp_size, + strlen (dir) + strlen (dp->d_name) + 10); sprintf (tmp, "%s/%s", dir, dp->d_name); if (!isdir (tmp)) continue; @@ -341,9 +345,8 @@ find_dirs (dir, list, checkadm, entries) if (dp->d_type == DT_LNK) continue; #endif - /* FIXME: tmp is not set here, or doesn't seem to be. - This would appear to just be a mistake... Needs more - investigation to be sure... */ + /* Note that we only get here if we already set tmp + above. */ if (islink (tmp)) continue; #ifdef DT_DIR @@ -351,6 +354,10 @@ find_dirs (dir, list, checkadm, entries) #endif /* check for new style */ + expand_string (&tmp, + &tmp_size, + (strlen (dir) + strlen (dp->d_name) + + sizeof (CVSADM) + 10)); (void) sprintf (tmp, "%s/%s/%s", dir, dp->d_name, CVSADM); if (!isdir (tmp)) continue; @@ -364,5 +371,7 @@ find_dirs (dir, list, checkadm, entries) freenode (p); } (void) closedir (dirp); + if (tmp != NULL) + free (tmp); return (0); } diff --git a/gnu/usr.bin/cvs/src/hash.c b/gnu/usr.bin/cvs/src/hash.c index e9f49355f5b..60998d108f9 100644 --- a/gnu/usr.bin/cvs/src/hash.c +++ b/gnu/usr.bin/cvs/src/hash.c @@ -10,7 +10,10 @@ #include "cvs.h" #include -/* global caches */ +/* Global caches. The idea is that we maintain a linked list of "free"d + nodes or lists, and get new items from there. It has been suggested + to use an obstack instead, but off the top of my head, I'm not sure + that would gain enough to be worth worrying about. */ static List *listcache = NULL; static Node *nodecache = NULL; diff --git a/gnu/usr.bin/cvs/src/history.c b/gnu/usr.bin/cvs/src/history.c index ac55dad6377..1d19418bc8a 100644 --- a/gnu/usr.bin/cvs/src/history.c +++ b/gnu/usr.bin/cvs/src/history.c @@ -238,13 +238,24 @@ static char *tz_name = "+0000"; static char tz_name[] = "LT"; #endif +/* -r, -t, or -b options, malloc'd. These are "" if the option in + question is not specified or is overridden by another option. The + main reason for using "" rather than NULL is historical. Together + with since_date, these are a mutually exclusive set; one overrides the + others. */ +static char *since_rev; +static char *since_tag; +static char *backto; +/* -D option, or 0 if not specified. */ static time_t since_date; -static char since_rev[20]; /* Maxrev ~= 99.99.99.999 */ -static char since_tag[64]; + static struct hrec *last_since_tag; -static char backto[128]; static struct hrec *last_backto; -static char rec_types[20]; + +/* Record types to look for, malloc'd. Probably could be statically + allocated, but only if we wanted to check for duplicates more than + we do. */ +static char *rec_types; static int hrec_count; static int hrec_max; @@ -374,6 +385,10 @@ history (argc, argv) if (argc == -1) usage (history_usg); + since_rev = xstrdup (""); + since_tag = xstrdup (""); + backto = xstrdup (""); + rec_types = xstrdup (""); optind = 1; while ((c = getopt (argc, argv, "Tacelow?D:b:f:m:n:p:r:t:u:x:X:z:")) != -1) { @@ -393,7 +408,8 @@ history (argc, argv) case 'e': report_count++; extract++; - (void) strcpy (rec_types, ALL_REC_TYPES); + free (rec_types); + rec_types = xstrdup (ALL_REC_TYPES); break; case 'l': /* Find Last file record */ last_entry = 1; @@ -423,13 +439,8 @@ history (argc, argv) *since_rev = *since_tag = '\0'; since_date = 0; } - if (strlen (optarg) >= sizeof (backto)) - { - error (0, 0, "backto truncated to %d bytes", - (int) sizeof (backto) - 1); - optarg[sizeof (backto) - 1] = '\0'; - } - (void) strcpy (backto, optarg); + free (backto); + backto = xstrdup (optarg); break; case 'f': /* For specified file */ save_file ("", optarg, (char *) NULL); @@ -450,7 +461,8 @@ history (argc, argv) *since_tag = *backto = '\0'; since_date = 0; } - (void) strcpy (since_rev, optarg); + free (since_rev); + since_rev = xstrdup (optarg); break; case 't': /* Since specified Tag/Rev */ if (since_date || *since_rev || *backto) @@ -459,7 +471,8 @@ history (argc, argv) *since_rev = *backto = '\0'; since_date = 0; } - (void) strcpy (since_tag, optarg); /* tag */ + free (since_tag); + since_tag = xstrdup (optarg); break; case 'u': /* For specified username */ save_user (optarg); @@ -474,7 +487,8 @@ history (argc, argv) if (!strchr (ALL_REC_TYPES, *cp)) error (1, 0, "%c is not a valid report type", *cp); } - (void) strcpy (rec_types, optarg); + free (rec_types); + rec_types = xstrdup (optarg); break; case 'z': #ifndef HAVE_RCS5 @@ -590,7 +604,10 @@ history (argc, argv) if (tag_report) { if (!strchr (rec_types, 'T')) + { + rec_types = xrealloc (rec_types, strlen (rec_types) + 5); (void) strcat (rec_types, "T"); + } } else if (extract) { @@ -599,7 +616,8 @@ history (argc, argv) } else if (modified) { - (void) strcpy (rec_types, "MAR"); + free (rec_types); + rec_types = xstrdup ("MAR"); /* * If the user has not specified a date oriented flag ("Since"), sort * by Repository/file before date. Default is "just" date. @@ -618,7 +636,8 @@ history (argc, argv) } else if (module_report) { - (void) strcpy (rec_types, last_entry ? "OMAR" : ALL_REC_TYPES); + free (rec_types); + rec_types = xstrdup (last_entry ? "OMAR" : ALL_REC_TYPES); module_sort++; repos_sort++; file_sort++; @@ -627,7 +646,8 @@ history (argc, argv) else /* Must be "checkout" or default */ { - (void) strcpy (rec_types, "OF"); + free (rec_types); + rec_types = xstrdup ("OF"); /* See comments in "modified" above */ if (!last_entry && user_list) user_sort++; @@ -641,7 +661,10 @@ history (argc, argv) /* If we're looking back to a Tag value, must consider "Tag" records */ if (*since_tag && !strchr (rec_types, 'T')) + { + rec_types = xrealloc (rec_types, strlen (rec_types) + 5); (void) strcat (rec_types, "T"); + } argc -= c; argv += c; @@ -662,6 +685,10 @@ history (argc, argv) qsort ((PTR) hrec_head, hrec_count, sizeof (struct hrec), sort_order); report_hrecs (); free (fname); + free (since_rev); + free (since_tag); + free (backto); + free (rec_types); return (0); } diff --git a/gnu/usr.bin/cvs/src/import.c b/gnu/usr.bin/cvs/src/import.c index 99501362853..38cb55b3e65 100644 --- a/gnu/usr.bin/cvs/src/import.c +++ b/gnu/usr.bin/cvs/src/import.c @@ -39,10 +39,10 @@ static int update_rcs_file PROTO((char *message, char *vfile, char *vtag, int ta static void add_log PROTO((int ch, char *fname)); static int repos_len; -static char vhead[50]; -static char vbranch[50]; +static char *vhead; +static char *vbranch; static FILE *logfp; -static char repository[PATH_MAX]; +static char *repository; static int conflicts; static int use_file_modtime; static char *keyword_opt = NULL; @@ -79,7 +79,7 @@ import (argc, argv) ign_setup (); wrap_setup (); - (void) strcpy (vbranch, CVSBRANCH); + vbranch = xstrdup (CVSBRANCH); optind = 1; while ((c = getopt (argc, argv, "Qqdb:m:I:k:W:")) != -1) { @@ -100,7 +100,8 @@ import (argc, argv) use_file_modtime = 1; break; case 'b': - (void) strcpy (vbranch, optarg); + free (vbranch); + vbranch = xstrdup (optarg); break; case 'm': #ifdef FORCE_USE_EDITOR @@ -135,7 +136,14 @@ import (argc, argv) usage (import_usage); for (i = 1; i < argc; i++) /* check the tags for validity */ + { + int j; + RCS_check_tag (argv[i]); + for (j = 1; j < i; j++) + if (strcmp (argv[j], argv[i]) == 0) + error (1, 0, "tag `%s' was specified more than once", argv[i]); + } /* XXX - this should be a module, not just a pathname */ if (! isabsolute (argv[0])) @@ -146,11 +154,14 @@ import (argc, argv) error (1, 0, "Set it or specify the '-d' option to %s.", program_name); } + repository = xmalloc (strlen (CVSroot_directory) + strlen (argv[0]) + + 10); (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]); repos_len = strlen (CVSroot_directory); } else { + repository = xmalloc (strlen (argv[0]) + 5); (void) strcpy (repository, argv[0]); repos_len = 0; } @@ -166,7 +177,7 @@ import (argc, argv) error (1, 0, "%s is not a numeric branch", vbranch); if (numdots (vbranch) != 2) error (1, 0, "Only branches with two dots are supported: %s", vbranch); - (void) strcpy (vhead, vbranch); + vhead = xstrdup (vbranch); cp = strrchr (vhead, '.'); *cp = '\0'; @@ -318,6 +329,9 @@ import (argc, argv) if (message) free (message); + free (repository); + free (vbranch); + free (vhead); return (err); } @@ -435,28 +449,39 @@ process_import_file (message, vfile, vtag, targc, targv) int targc; char *targv[]; { - char attic_name[PATH_MAX]; - char rcs[PATH_MAX]; + char *rcs; int inattic = 0; + rcs = xmalloc (strlen (repository) + strlen (vfile) + sizeof (RCSEXT) + + 5); (void) sprintf (rcs, "%s/%s%s", repository, vfile, RCSEXT); if (!isfile (rcs)) { + char *attic_name; + + attic_name = xmalloc (strlen (repository) + strlen (vfile) + + sizeof (CVSATTIC) + sizeof (RCSEXT) + 10); (void) sprintf (attic_name, "%s/%s/%s%s", repository, CVSATTIC, vfile, RCSEXT); if (!isfile (attic_name)) { + int retval; + free (attic_name); /* * A new import source file; it doesn't exist as a ,v within the * repository nor in the Attic -- create it anew. */ add_log ('N', vfile); - return (add_rcs_file (message, rcs, vfile, vtag, targc, targv)); + retval = add_rcs_file (message, rcs, vfile, vtag, targc, targv); + free (rcs); + return retval; } + free (attic_name); inattic = 1; } + free (rcs); /* * an rcs file exists. have to do things the official, slow, way. */ @@ -495,10 +520,11 @@ update_rcs_file (message, vfile, vtag, targc, targv, inattic) if (vers->vn_rcs != NULL && !RCS_isdead(vers->srcfile, vers->vn_rcs)) { - char xtmpfile[PATH_MAX]; + char *xtmpfile; int different; int retcode = 0; + xtmpfile = xmalloc (strlen (Tmpdir) + 40); (void) sprintf (xtmpfile, "%s/cvs-imp%ld", Tmpdir, (long) getpid()); /* @@ -528,6 +554,7 @@ update_rcs_file (message, vfile, vtag, targc, targv, inattic) "ERROR: cannot co revision %s of file %s", vers->vn_rcs, vers->srcfile->path); (void) unlink_file (xtmpfile); + free (xtmpfile); return (1); } @@ -538,6 +565,7 @@ update_rcs_file (message, vfile, vtag, targc, targv, inattic) error (0, errno, "cannot remove %s", tocvsPath); (void) unlink_file (xtmpfile); + free (xtmpfile); if (!different) { int retval = 0; @@ -833,9 +861,11 @@ get_comment (user) char *user; { char *cp, *suffix; - char suffix_path[PATH_MAX]; + char *suffix_path; int i; + char *retval; + suffix_path = xmalloc (strlen (user) + 5); cp = strrchr (user, '.'); if (cp != NULL) { @@ -855,11 +885,21 @@ get_comment (user) suffix = ""; /* will use the default */ for (i = 0;; i++) { - if (comtable[i].suffix == NULL) /* default */ - return (comtable[i].comlead); + if (comtable[i].suffix == NULL) + { + /* Default. Note we'll always hit this case before we + ever return NULL. */ + retval = comtable[i].comlead; + break; + } if (strcmp (suffix, comtable[i].suffix) == 0) - return (comtable[i].comlead); + { + retval = comtable[i].comlead; + break; + } } + free (suffix_path); + return retval; } static int @@ -875,9 +915,9 @@ add_rcs_file (message, rcs, user, vtag, targc, targv) struct stat sb; struct tm *ftm; time_t now; - char altdate1[50]; + char altdate1[MAXDATELEN]; #ifndef HAVE_RCS5 - char altdate2[50]; + char altdate2[MAXDATELEN]; #endif char *author; int i, ierrno, err = 0; @@ -1175,6 +1215,7 @@ import_descend_dir (message, dir, vtag, targc, targv) struct saved_cwd cwd; char *cp; int ierrno, err; + char *rcs = NULL; if (islink (dir)) return (0); @@ -1183,13 +1224,24 @@ import_descend_dir (message, dir, vtag, targc, targv) fperror (logfp, 0, 0, "ERROR: cannot get working directory"); return (1); } + + /* Concatenate DIR to the end of REPOSITORY. */ if (repository[0] == '\0') - (void) strcpy (repository, dir); + { + char *new = xstrdup (dir); + free (repository); + repository = new; + } else { - (void) strcat (repository, "/"); - (void) strcat (repository, dir); + char *new = xmalloc (strlen (repository) + strlen (dir) + 10); + strcpy (new, repository); + (void) strcat (new, "/"); + (void) strcat (new, dir); + free (repository); + repository = new; } + #ifdef CLIENT_SUPPORT if (!quiet && !client_active) #else @@ -1211,12 +1263,12 @@ import_descend_dir (message, dir, vtag, targc, targv) if (!isdir (repository)) #endif { - char rcs[PATH_MAX]; - + rcs = xmalloc (strlen (repository) + sizeof (RCSEXT) + 5); (void) sprintf (rcs, "%s%s", repository, RCSEXT); if (isfile (repository) || isfile(rcs)) { - fperror (logfp, 0, 0, "ERROR: %s is a file, should be a directory!", + fperror (logfp, 0, 0, + "ERROR: %s is a file, should be a directory!", repository); error (0, 0, "ERROR: %s is a file, should be a directory!", repository); @@ -1236,6 +1288,8 @@ import_descend_dir (message, dir, vtag, targc, targv) } err = import_descend (message, vtag, targc, targv); out: + if (rcs != NULL) + free (rcs); if ((cp = strrchr (repository, '/')) != NULL) *cp = '\0'; else diff --git a/gnu/usr.bin/cvs/src/log.c b/gnu/usr.bin/cvs/src/log.c index 3bb7eb2a907..8c6634ba66c 100644 --- a/gnu/usr.bin/cvs/src/log.c +++ b/gnu/usr.bin/cvs/src/log.c @@ -236,7 +236,7 @@ cvslog (argc, argv) /* FIXME: We shouldn't have to send current files to get log entries, but it doesn't work yet and I haven't debugged it. So send the files -- it's slower but it works. gnu@cygnus.com Apr94 */ - send_files (argc - i, argv + i, local, 0, 0); + send_files (argc - i, argv + i, local, 0, 0, 0); send_to_server ("log\012", 0); err = get_responses_and_close (); diff --git a/gnu/usr.bin/cvs/src/login.c b/gnu/usr.bin/cvs/src/login.c index a0fab6a3ac0..656ff4171db 100644 --- a/gnu/usr.bin/cvs/src/login.c +++ b/gnu/usr.bin/cvs/src/login.c @@ -12,7 +12,16 @@ #ifdef AUTH_CLIENT_SUPPORT /* This covers the rest of the file. */ +/* There seems to be very little agreement on which system header + getpass is declared in. With a lot of fancy autoconfiscation, + we could perhaps detect this, but for now we'll just rely on + _CRAY, since Cray is perhaps the only system on which our own + declaration won't work (some Crays declare the 2#$@% thing as + varadic, believe it or not). On Cray, getpass will be declared + in either stdlib.h or unistd.h. */ +#ifndef _CRAY extern char *getpass (); +#endif #ifndef CVS_PASSWORD_FILE #define CVS_PASSWORD_FILE ".cvspass" @@ -258,10 +267,6 @@ login (argc, argv) return 0; } -/* todo: "cvs logout" could erase an entry from the file. - * But to what purpose? - */ - /* Returns the _scrambled_ password. The server must descramble before hashing and comparing. */ char * @@ -362,4 +367,99 @@ get_cvs_password () return NULL; } +static const char *const logout_usage[] = +{ + "Usage: %s %s\n", + NULL +}; + +/* Remove any entry for the CVSRoot repository found in "CVS/.cvspass". */ +int +logout (argc, argv) + int argc; + char **argv; +{ + char *passfile; + FILE *fp; + char *tmp_name; + FILE *tmp_fp; + char *linebuf = (char *) NULL; + size_t linebuf_len; + int root_len, found = 0; + + if (argc < 0) + usage (logout_usage); + + if (CVSroot_method != pserver_method) + { + error (0, 0, "can only use pserver method with `logout' command"); + error (1, 0, "CVSROOT: %s", CVSroot_original); + } + + if (! CVSroot_username) + { + error (0, 0, "CVSROOT \"%s\" is not fully-qualified.", + CVSroot_original); + error (1, 0, "Please make sure to specify \"user@host\"!"); + } + + /* Hmm. Do we want a variant of this command which deletes _all_ + the entries from the current .cvspass? Might be easier to + remember than "rm ~/.cvspass" but then again if people are + mucking with HOME (common in Win95 as the system doesn't set + it), then this variant of "cvs logout" might give a false sense + of security, in that it wouldn't delete entries from any + .cvspass files but the current one. */ + + printf ("(Logging out of %s@%s)\n", CVSroot_username, CVSroot_hostname); + fflush (stdout); + + /* IF we have a password for this "[user@]host:/path" already + * THEN + * drop the entry + * ELSE + * do nothing + */ + + passfile = construct_cvspass_filename (); + tmp_name = cvs_temp_name (); + if ((tmp_fp = CVS_FOPEN (tmp_name, "w")) == NULL) + { + error (1, errno, "unable to open temp file %s", tmp_name); + return 1; + } + chmod (tmp_name, 0600); + + root_len = strlen (CVSroot_original); + + fp = CVS_FOPEN (passfile, "r"); + if (fp == NULL) + error (1, errno, "Error opening %s", passfile); + + /* Check each line to see if we have this entry. */ + /* Copy only those lines that do not match this entry */ + while (getline (&linebuf, &linebuf_len, fp) >= 0) + { + if (strncmp (CVSroot_original, linebuf, root_len)) + fprintf (tmp_fp, "%s", linebuf); + else + found = TRUE; + } + fclose (fp); + fclose (tmp_fp); + + if (! found) + { + printf ("Entry not found for %s\n", CVSroot_original); + unlink_file (tmp_name); + } + else + { + copy_file (tmp_name, passfile); + unlink_file (tmp_name); + chmod (passfile, 0600); + } + return 0; +} + #endif /* AUTH_CLIENT_SUPPORT from beginning of file. */ diff --git a/gnu/usr.bin/cvs/src/logmsg.c b/gnu/usr.bin/cvs/src/logmsg.c index 0a4ffb601fc..98e4ae1ff93 100644 --- a/gnu/usr.bin/cvs/src/logmsg.c +++ b/gnu/usr.bin/cvs/src/logmsg.c @@ -409,9 +409,10 @@ do_verify (message, repository) fname = cvs_temp_name (); - if ((fp = fopen (fname, "w")) < 0) + fp = fopen (fname, "w"); + if (fp == NULL) { - error (1, 0, "cannot create temporary file %s", fname); + error (1, errno, "cannot create temporary file %s", fname); return; } else @@ -552,10 +553,13 @@ title_proc (p, closure) You can verify that this assumption is safe by checking the code in add.c (add_directory) and import.c (import). */ + str_list = xrealloc (str_list, strlen (str_list) + 5); (void) strcat (str_list, " "); if (li->type == T_TITLE) { + str_list = xrealloc (str_list, + strlen (str_list) + strlen (p->key) + 5); (void) strcat (str_list, p->key); } else @@ -567,13 +571,28 @@ title_proc (p, closure) switch (*c) { case 's': + str_list = + xrealloc (str_list, + strlen (str_list) + strlen (p->key) + 5); (void) strcat (str_list, p->key); break; case 'V': + str_list = + xrealloc (str_list, + (strlen (str_list) + + (li->rev_old ? strlen (li->rev_old) : 0) + + 10) + ); (void) strcat (str_list, (li->rev_old ? li->rev_old : "NONE")); break; case 'v': + str_list = + xrealloc (str_list, + (strlen (str_list) + + (li->rev_new ? strlen (li->rev_new) : 0) + + 10) + ); (void) strcat (str_list, (li->rev_new ? li->rev_new : "NONE")); break; @@ -584,19 +603,16 @@ title_proc (p, closure) won't blow up on an old CVS. */ } if (*(c + 1) != '\0') + { + str_list = xrealloc (str_list, strlen (str_list) + 5); (void) strcat (str_list, ","); + } } } } return (0); } -/* - * Since some systems don't define this... */ -#ifndef MAXHOSTNAMELEN -#define MAXHOSTNAMELEN 256 -#endif - /* * Writes some stuff to the logfile "filter" and returns the status of the * filter program. @@ -609,7 +625,6 @@ logfile_write (repository, filter, message, logfp, changes) FILE *logfp; List *changes; { - char cwd[PATH_MAX]; FILE *pipefp; char *prog; char *cp; @@ -618,8 +633,6 @@ logfile_write (repository, filter, message, logfp, changes) char *fmt_percent; /* the location of the percent sign that starts the format string. */ - prog = xmalloc (MAXPROGLEN); - /* The user may specify a format string as part of the filter. Originally, `%s' was the only valid string. The string that was substituted for it was: @@ -736,11 +749,11 @@ logfile_write (repository, filter, message, logfp, changes) str_list_format = xmalloc (sizeof (char) * (len + 1)); strncpy (str_list_format, fmt_begin, len); str_list_format[len] = '\0'; - - /* Allocate a chunk of memory to hold the string. */ + /* Allocate an initial chunk of memory. As we build up the string + we will realloc it. */ if (!str_list) - str_list = xmalloc (MAXLISTLEN); + str_list = xmalloc (1); str_list[0] = '\0'; /* Add entries to the string. Don't bother looking for @@ -762,6 +775,9 @@ logfile_write (repository, filter, message, logfp, changes) srepos = Short_Repository (repository); + prog = xmalloc ((fmt_percent - filter) + strlen (srepos) + + strlen (str_list) + strlen (fmt_continue) + + 10); (void) strncpy (prog, filter, fmt_percent - filter); prog[fmt_percent - filter] = '\0'; (void) strcat (prog, "'"); @@ -778,7 +794,7 @@ logfile_write (repository, filter, message, logfp, changes) else { /* There's no format string. */ - strcpy (prog, filter); + prog = xstrdup (filter); } if ((pipefp = run_popen (prog, "w")) == NULL) @@ -789,8 +805,17 @@ logfile_write (repository, filter, message, logfp, changes) return (1); } (void) fprintf (pipefp, "Update of %s\n", repository); - (void) fprintf (pipefp, "In directory %s:%s\n\n", hostname, - ((cp = getwd (cwd)) != NULL) ? cp : cwd); + (void) fprintf (pipefp, "In directory %s:", hostname); + cp = xgetwd (); + if (cp == NULL) + fprintf (pipefp, "\n\n", + strerror (errno)); + else + { + fprintf (pipefp, "%s\n\n", cp); + free (cp); + } + setup_tmpfile (pipefp, "", changes); (void) fprintf (pipefp, "Log Message:\n%s\n", message); if (logfp != (FILE *) 0) diff --git a/gnu/usr.bin/cvs/src/mkmodules.c b/gnu/usr.bin/cvs/src/mkmodules.c index 9f3f797cc48..add69b8c5a8 100644 --- a/gnu/usr.bin/cvs/src/mkmodules.c +++ b/gnu/usr.bin/cvs/src/mkmodules.c @@ -7,13 +7,14 @@ #include "cvs.h" #include "savecwd.h" +#include "getline.h" #ifndef DBLKSIZ #define DBLKSIZ 4096 /* since GNU ndbm doesn't define it */ #endif static int checkout_file PROTO((char *file, char *temp)); -static void make_tempfile PROTO((char *temp)); +static char *make_tempfile PROTO((void)); static void rename_rcsfile PROTO((char *temp, char *real)); #ifndef MY_NDBM @@ -46,7 +47,7 @@ struct admin_file { }; static const char *const loginfo_contents[] = { - "# The \"loginfo\" file controls where \"cvs commit\" log information\n" + "# The \"loginfo\" file controls where \"cvs commit\" log information\n", "# is sent. The first entry on a line is a regular expression which must match\n", "# the directory that the change is being made to, relative to the\n", "# $CVSROOT. If a match is found, then the remainder of the line is a filter\n", @@ -332,15 +333,14 @@ mkmodules (dir) char *dir; { struct saved_cwd cwd; - /* FIXME: arbitrary limit */ - char temp[PATH_MAX]; + char *temp; char *cp, *last, *fname; #ifdef MY_NDBM DBM *db; #endif FILE *fp; - /* FIXME: arbitrary limit */ - char line[512]; + char *line = NULL; + size_t line_allocated = 0; const struct admin_file *fileptr; if (save_cwd (&cwd)) @@ -352,7 +352,7 @@ mkmodules (dir) /* * First, do the work necessary to update the "modules" database. */ - make_tempfile (temp); + temp = make_tempfile (); switch (checkout_file (CVSROOTADM_MODULES, temp)) { @@ -381,12 +381,13 @@ mkmodules (dir) } /* switch on checkout_file() */ (void) unlink_file (temp); + free (temp); /* Checkout the files that need it in CVSROOT dir */ for (fileptr = filelist; fileptr && fileptr->filename; fileptr++) { if (fileptr->errormsg == NULL) continue; - make_tempfile (temp); + temp = make_tempfile (); if (checkout_file (fileptr->filename, temp) == 0) rename_rcsfile (temp, fileptr->filename); #if 0 @@ -401,9 +402,9 @@ mkmodules (dir) error (0, 0, fileptr->errormsg, fileptr->filename); #endif (void) unlink_file (temp); + free (temp); } - /* Use 'fopen' instead of 'open_file' because we want to ignore error */ fp = CVS_FOPEN (CVSROOTADM_CHECKOUTLIST, "r"); if (fp) { @@ -413,7 +414,7 @@ mkmodules (dir) * * comment lines begin with '#' */ - while (fgets (line, sizeof (line), fp) != NULL) + while (getline (&line, &line_allocated, fp) >= 0) { /* skip lines starting with # */ if (line[0] == '#') @@ -431,7 +432,7 @@ mkmodules (dir) ; *cp = '\0'; - make_tempfile (temp); + temp = make_tempfile (); if (checkout_file (fname, temp) == 0) { rename_rcsfile (temp, fname); @@ -443,8 +444,18 @@ mkmodules (dir) if (cp < last && *cp) error (0, 0, cp, fname); } + free (temp); } - (void) fclose (fp); + if (ferror (fp)) + error (0, errno, "cannot read %s", CVSROOTADM_CHECKOUTLIST); + if (fclose (fp) < 0) + error (0, errno, "cannot close %s", CVSROOTADM_CHECKOUTLIST); + } + else + { + /* Error from CVS_FOPEN. */ + if (!existence_error (errno)) + error (0, errno, "cannot open %s", CVSROOTADM_CHECKOUTLIST); } if (restore_cwd (&cwd, NULL)) @@ -457,15 +468,16 @@ mkmodules (dir) /* * Yeah, I know, there are NFS race conditions here. */ -static void -make_tempfile (temp) - char *temp; +static char * +make_tempfile () { static int seed = 0; int fd; + char *temp; if (seed == 0) seed = getpid (); + temp = xmalloc (sizeof (BAKPREFIX) + 40); while (1) { (void) sprintf (temp, "%s%d", BAKPREFIX, seed++); @@ -476,6 +488,7 @@ make_tempfile (temp) } if (close(fd) < 0) error(1, errno, "cannot close temporary file %s", temp); + return temp; } static int @@ -655,21 +668,25 @@ rename_rcsfile (temp, real) char *temp; char *real; { - char bak[50]; + char *bak; struct stat statbuf; - char rcs[PATH_MAX]; - + char *rcs; + /* Set "x" bits if set in original. */ + rcs = xmalloc (strlen (real) + sizeof (RCSEXT) + 10); (void) sprintf (rcs, "%s%s", real, RCSEXT); statbuf.st_mode = 0; /* in case rcs file doesn't exist, but it should... */ (void) CVS_STAT (rcs, &statbuf); + free (rcs); if (chmod (temp, 0444 | (statbuf.st_mode & 0111)) < 0) error (0, errno, "warning: cannot chmod %s", temp); + bak = xmalloc (strlen (real) + sizeof (BAKPREFIX) + 10); (void) sprintf (bak, "%s%s", BAKPREFIX, real); (void) unlink_file (bak); /* rm .#loginfo */ (void) CVS_RENAME (real, bak); /* mv loginfo .#loginfo */ (void) CVS_RENAME (temp, real); /* mv "temp" loginfo */ + free (bak); } const char *const init_usage[] = { diff --git a/gnu/usr.bin/cvs/src/modules.c b/gnu/usr.bin/cvs/src/modules.c index c9261f944c7..8ec1b7a38f5 100644 --- a/gnu/usr.bin/cvs/src/modules.c +++ b/gnu/usr.bin/cvs/src/modules.c @@ -54,16 +54,21 @@ static void save_d PROTO((char *k, int ks, char *d, int ds)); DBM * open_module () { - char mfile[PATH_MAX]; + char *mfile; + DBM *retval; if (CVSroot_original == NULL) { error (0, 0, "must set the CVSROOT environment variable"); error (1, 0, "or specify the '-d' global option"); } + mfile = xmalloc (strlen (CVSroot_directory) + sizeof (CVSROOTADM) + + sizeof (CVSROOTADM_MODULES) + 20); (void) sprintf (mfile, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSROOTADM_MODULES); - return (dbm_open (mfile, O_RDONLY, 0666)); + retval = dbm_open (mfile, O_RDONLY, 0666); + free (mfile); + return retval; } /* @@ -102,17 +107,18 @@ do_module (db, mname, m_type, msg, callback_proc, where, char *tag_prog = NULL; char *update_prog = NULL; struct saved_cwd cwd; + int cwd_saved = 0; char *line; int modargc; int xmodargc; char **modargv; - char *xmodargv[MAXFILEPERDIR]; + char **xmodargv; char *value; - char *zvalue; + char *zvalue = NULL; char *mwhere = NULL; char *mfile = NULL; char *spec_opt = NULL; - char xvalue[PATH_MAX]; + char *xvalue = NULL; int alias = 0; datum key, val; char *cp; @@ -147,7 +153,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (mname[0] == '!' && mname[1] != '\0') { ign_dir_add (mname+1); - return(err); + goto do_module_return; } /* strip extra stuff from the module name */ @@ -195,13 +201,16 @@ do_module (db, mname, m_type, msg, callback_proc, where, } else { - char file[PATH_MAX]; - char attic_file[PATH_MAX]; + char *file; + char *attic_file; char *acp; + int is_found = 0; /* check to see if mname is a directory or file */ - + file = xmalloc (strlen (CVSroot_directory) + strlen (mname) + 10); (void) sprintf (file, "%s/%s", CVSroot_directory, mname); + attic_file = xmalloc (strlen (CVSroot_directory) + strlen (mname) + + sizeof (CVSATTIC) + sizeof (RCSEXT) + 15); if ((acp = strrchr (mname, '/')) != NULL) { *acp = '\0'; @@ -216,7 +225,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (isdir (file)) { value = mname; - goto found; + is_found = 1; } else { @@ -228,7 +237,9 @@ do_module (db, mname, m_type, msg, callback_proc, where, { char *slashp; - /* put the ' ' in a copy so we don't mess up the original */ + /* put the ' ' in a copy so we don't mess up the + original */ + xvalue = xmalloc (strlen (mname) + 2); value = strcpy (xvalue, mname); slashp = strrchr (value, '/'); *slashp = ' '; @@ -243,19 +254,26 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (cp == mname) { /* drop the leading / if specified */ + xvalue = xmalloc (strlen (mname) + 10); value = strcpy (xvalue, ". "); (void) strcat (xvalue, mname + 1); } else { /* otherwise just copy it */ + xvalue = xmalloc (strlen (mname) + 10); value = strcpy (xvalue, ". "); (void) strcat (xvalue, mname); } } - goto found; + is_found = 1; } } + free (attic_file); + free (file); + + if (is_found) + goto found; } /* look up everything to the first / as a module */ @@ -306,9 +324,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, /* if we got here, we couldn't find it using our search, so give up */ error (0, 0, "cannot find module `%s' - ignored", mname); err++; - if (mwhere) - free (mwhere); - return (err); + goto do_module_return; /* @@ -320,6 +336,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, /* remember where we start */ if (save_cwd (&cwd)) error_exit (); + cwd_saved = 1; /* copy value to our own string since if we go recursive we'll be really screwed if we do another dbm lookup */ @@ -365,8 +382,12 @@ do_module (db, mname, m_type, msg, callback_proc, where, } if (!isfile (CVSADM)) { - char nullrepos[PATH_MAX]; + char *nullrepos; + nullrepos = xmalloc (strlen (CVSroot_directory) + + sizeof (CVSROOTADM) + + sizeof (CVSNULLREPOS) + + 10); (void) sprintf (nullrepos, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSNULLREPOS); if (!isfile (nullrepos)) @@ -393,6 +414,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, server_set_entstat (dir, nullrepos); #endif } + free (nullrepos); } out: goto do_special; @@ -417,7 +439,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, (void) sprintf (line, "%s %s", "XXX", value); /* turn the line into an argv[] array */ - line2argv (&xmodargc, xmodargv, line); + line2argv (&xmodargc, &xmodargv, line); free (line); modargc = xmodargc; modargv = xmodargv; @@ -466,11 +488,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, "modules file has invalid option for key %s value %s", key.dptr, val.dptr); err++; - if (mwhere) - free (mwhere); - free (zvalue); - free_cwd (&cwd); - return (err); + goto do_module_return; } } modargc -= optind; @@ -478,11 +496,8 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (modargc == 0) { error (0, 0, "modules file missing directory for module %s", mname); - if (mwhere) - free (mwhere); - free (zvalue); - free_cwd (&cwd); - return (++err); + ++err; + goto do_module_return; } if (alias && nonalias_opt) @@ -493,7 +508,8 @@ do_module (db, mname, m_type, msg, callback_proc, where, situation. */ error (0, 0, "\ -a cannot be specified in the modules file along with other options"); - return ++err; + ++err; + goto do_module_return; } /* if this was an alias, call ourselves recursively for each module */ @@ -512,11 +528,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, where, shorten, local_specified, run_module_prog, extra_arg); } - if (mwhere) - free (mwhere); - free (zvalue); - free_cwd (&cwd); - return (err); + goto do_module_return; } /* otherwise, process this module */ @@ -647,6 +659,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, if (restore_cwd (&cwd, NULL)) error_exit (); free_cwd (&cwd); + cwd_saved = 0; /* run checkout or tag prog if appropriate */ if (err == 0 && run_module_prog) @@ -661,7 +674,7 @@ do_module (db, mname, m_type, msg, callback_proc, where, * if we can't find a matching program, just punt and use * whatever is specified in the modules file. */ - char real_prog[PATH_MAX]; + char *real_prog = NULL; char *prog = (m_type == TAG ? tag_prog : (m_type == CHECKOUT ? checkout_prog : export_prog)); char *real_where = (where != NULL ? where : mwhere); @@ -669,6 +682,8 @@ do_module (db, mname, m_type, msg, callback_proc, where, if ((*prog != '/') && (*prog != '.')) { + real_prog = xmalloc (strlen (real_where) + strlen (prog) + + 10); (void) sprintf (real_prog, "%s/%s", real_where, prog); if (isfile (real_prog)) prog = real_prog; @@ -695,14 +710,21 @@ do_module (db, mname, m_type, msg, callback_proc, where, err += run_exec (RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL); free (expanded_path); } + free (real_prog); } } + do_module_return: /* clean up */ if (mwhere) free (mwhere); - free (zvalue); + if (cwd_saved) + free_cwd (&cwd); + if (zvalue != NULL) + free (zvalue); + if (xvalue != NULL) + free (xvalue); return (err); } @@ -857,8 +879,7 @@ cat_module (status) int moduleargc; struct sortrec *s_h; char *cp, *cp2, **argv; - char *line; - char *moduleargv[MAXFILEPERDIR]; + char **moduleargv; Status = status; @@ -884,23 +905,27 @@ cat_module (status) fill = cols - (indent + 2); for (s_h = s_head, i = 0; i < s_count; i++, s_h++) { - line = xmalloc (strlen (s_h->modname) + strlen (s_h->rest) - + strlen (status ? s_h->status : "") + 15); + char *line; /* Print module name (and status, if wanted) */ + line = xmalloc (strlen (s_h->modname) + 15); sprintf (line, "%-12s", s_h->modname); cvs_output (line, 0); + free (line); if (status) { + line = xmalloc (strlen (s_h->status) + 15); sprintf (line, " %-11s", s_h->status); cvs_output (line, 0); if (s_h->status != def_status) *(s_h->status + strlen (s_h->status)) = ' '; + free (line); } + line = xmalloc (strlen (s_h->modname) + strlen (s_h->rest) + 15); /* Parse module file entry as command line and print options */ (void) sprintf (line, "%s %s", s_h->modname, s_h->rest); - line2argv (&moduleargc, moduleargv, line); + line2argv (&moduleargc, &moduleargv, line); free (line); argc = moduleargc; argv = moduleargv; diff --git a/gnu/usr.bin/cvs/src/myndbm.c b/gnu/usr.bin/cvs/src/myndbm.c index 99fe9521ace..1a3fcaea1a2 100644 --- a/gnu/usr.bin/cvs/src/myndbm.c +++ b/gnu/usr.bin/cvs/src/myndbm.c @@ -199,11 +199,14 @@ mydbm_load_file (fp, list) { char *line = NULL; size_t line_len; - /* FIXME: arbitrary limit. */ - char value[MAXLINELEN]; + char *value; + size_t value_allocated; char *cp, *vp; int len, cont; + value_allocated = 1; + value = xmalloc (value_allocated); + for (cont = 0; getline (&line, &line_len, fp) >= 0;) { if ((cp = strrchr (line, '\012')) != NULL) @@ -221,9 +224,8 @@ mydbm_load_file (fp, list) * line; otherwise at the beginning, but only after any trailing * backslash is removed. */ - vp = value; - if (cont) - vp += strlen (value); + if (!cont) + value[0] = '\0'; /* * See if the line we read is a continuation line, and strip the @@ -243,7 +245,11 @@ mydbm_load_file (fp, list) { cont = 0; } - (void) strcpy (vp, line); + expand_string (&value, + &value_allocated, + strlen (value) + strlen (line) + 5); + strcat (value, line); + if (value[0] == '#') continue; /* comment line */ vp = value; @@ -283,6 +289,7 @@ mydbm_load_file (fp, list) } } free (line); + free (value); } #endif /* MY_NDBM */ diff --git a/gnu/usr.bin/cvs/src/parseinfo.c b/gnu/usr.bin/cvs/src/parseinfo.c index e68fd0bfbe7..1011965835e 100644 --- a/gnu/usr.bin/cvs/src/parseinfo.c +++ b/gnu/usr.bin/cvs/src/parseinfo.c @@ -7,6 +7,7 @@ */ #include "cvs.h" +#include "getline.h" /* * Parse the INFOFILE file for the specified REPOSITORY. Invoke CALLPROC for @@ -24,8 +25,9 @@ Parse_Info (infofile, repository, callproc, all) { int err = 0; FILE *fp_info; - char infopath[PATH_MAX]; - char line[MAXLINELEN]; + char *infopath; + char *line = NULL; + size_t line_allocated = 0; char *default_value = NULL; char *expanded_value= NULL; int callback_done, line_number; @@ -40,10 +42,20 @@ Parse_Info (infofile, repository, callproc, all) } /* find the info file and open it */ + infopath = xmalloc (strlen (CVSroot_directory) + + strlen (infofile) + + sizeof (CVSROOTADM) + + 10); (void) sprintf (infopath, "%s/%s/%s", CVSroot_directory, CVSROOTADM, infofile); - if ((fp_info = CVS_FOPEN (infopath, "r")) == NULL) - return (0); /* no file -> nothing special done */ + fp_info = CVS_FOPEN (infopath, "r"); + if (fp_info == NULL) + { + /* If no file, don't do anything special. */ + if (!existence_error (errno)) + error (0, errno, "cannot open %s", infopath); + return 0; + } /* strip off the CVSROOT if repository was absolute */ srepos = Short_Repository (repository); @@ -54,7 +66,7 @@ Parse_Info (infofile, repository, callproc, all) /* search the info file for lines that match */ callback_done = line_number = 0; - while (fgets (line, sizeof (line), fp_info) != NULL) + while (getline (&line, &line_allocated, fp_info) >= 0) { line_number++; @@ -146,7 +158,10 @@ Parse_Info (infofile, repository, callproc, all) err += callproc (repository, expanded_value); callback_done = 1; } - (void) fclose (fp_info); + if (ferror (fp_info)) + error (0, errno, "cannot read %s", infopath); + if (fclose (fp_info) < 0) + error (0, errno, "cannot close %s", infopath); /* if we fell through and didn't callback at all, do the default */ if (callback_done == 0 && default_value != NULL) @@ -157,6 +172,9 @@ Parse_Info (infofile, repository, callproc, all) free (default_value); if (expanded_value != NULL) free (expanded_value); + free (infopath); + if (line != NULL) + free (line); return (err); } diff --git a/gnu/usr.bin/cvs/src/rcs.c b/gnu/usr.bin/cvs/src/rcs.c index f5cef712298..405d375174c 100644 --- a/gnu/usr.bin/cvs/src/rcs.c +++ b/gnu/usr.bin/cvs/src/rcs.c @@ -778,8 +778,6 @@ static char *value = NULL; static size_t keysize = 0; static size_t valsize = 0; -#define ALLOCINCR 1024 - static int getrcskey (fp, keyp, valp, lenp) FILE *fp; @@ -813,9 +811,9 @@ getrcskey (fp, keyp, valp, lenp) { if (cur >= max) { - key = xrealloc (key, keysize + ALLOCINCR); - cur = key + keysize; - keysize += ALLOCINCR; + size_t curoff = cur - key; + expand_string (&key, &keysize, keysize + 1); + cur = key + curoff; max = key + keysize; } *cur++ = c; @@ -830,9 +828,9 @@ getrcskey (fp, keyp, valp, lenp) } if (cur >= max) { - key = xrealloc (key, keysize + ALLOCINCR); - cur = key + keysize; - keysize += ALLOCINCR; + size_t curoff = cur - key; + expand_string (&key, &keysize, keysize + 1); + cur = key + curoff; max = key + keysize; } *cur = '\0'; @@ -897,9 +895,9 @@ getrcskey (fp, keyp, valp, lenp) if (cur >= max) { - value = xrealloc (value, valsize + ALLOCINCR); - cur = value + valsize; - valsize += ALLOCINCR; + size_t curoff = cur - value; + expand_string (&value, &valsize, valsize + 1); + cur = value + curoff; max = value + valsize; } *cur++ = c; @@ -926,9 +924,9 @@ getrcskey (fp, keyp, valp, lenp) if (cur >= max) { - value = xrealloc (value, valsize + ALLOCINCR); - cur = value + valsize; - valsize += ALLOCINCR; + size_t curoff = cur - value; + expand_string (&value, &valsize, valsize + 1); + cur = value + curoff; max = value + valsize; } *cur++ = ' '; @@ -940,9 +938,9 @@ getrcskey (fp, keyp, valp, lenp) if (cur >= max) { - value = xrealloc (value, valsize + ALLOCINCR); - cur = value + valsize; - valsize += ALLOCINCR; + size_t curoff = cur - value; + expand_string (&value, &valsize, valsize + 1); + cur = value + curoff; max = value + valsize; } *cur++ = c; @@ -959,9 +957,9 @@ getrcskey (fp, keyp, valp, lenp) /* terminate the string */ if (cur >= max) { - value = xrealloc (value, valsize + ALLOCINCR); - cur = value + valsize; - valsize += ALLOCINCR; + size_t curoff = cur - value; + expand_string (&value, &valsize, valsize + 1); + cur = value + curoff; max = value + valsize; } *cur = '\0'; @@ -1008,9 +1006,9 @@ getrcsrev (fp, revp) { if (cur >= max) { - key = xrealloc (key, keysize + ALLOCINCR); - cur = key + keysize; - keysize += ALLOCINCR; + size_t curoff = cur - key; + expand_string (&key, &keysize, keysize + 1); + cur = key + curoff; max = key + keysize; } *cur++ = c; @@ -1025,9 +1023,9 @@ getrcsrev (fp, revp) if (cur >= max) { - key = xrealloc (key, keysize + ALLOCINCR); - cur = key + keysize; - keysize += ALLOCINCR; + size_t curoff = cur - key; + expand_string (&key, &keysize, keysize + 1); + cur = key + curoff; max = key + keysize; } *cur = '\0'; @@ -1821,13 +1819,17 @@ RCS_datecmp (date1, date2) return (length_diff ? length_diff : strcmp (date1, date2)); } -/* - * Lookup the specified revision in the ,v file and return, in the date - * argument, the date specified for the revision *minus one second*, so that - * the logically previous revision will be found later. - * - * Returns zero on failure, RCS revision time as a Unix "time_t" on success. - */ +/* Look up revision REV in RCS and return the date specified for the + revision minus FUDGE seconds (FUDGE will generally be one, so that the + logically previous revision will be found later, or zero, if we want + the exact date). + + The return value is the date being returned as a time_t, or (time_t)-1 + on error (previously was documented as zero on error; I haven't checked + the callers to make sure that they really check for (time_t)-1, but + the latter is what this function really returns). If DATE is non-NULL, + then it must point to MAXDATELEN characters, and we store the same + return value there in DATEFORM format. */ time_t RCS_getrevtime (rcs, rev, date, fudge) RCSNode *rcs; @@ -2005,6 +2007,7 @@ RCS_check_kflag (arg) " -kb\tGenerate binary file unmodified (merges not allowed) (RCS 5.7).\n", NULL, }; + /* Big enough to hold any of the strings from kflags. */ char karg[10]; char const *const *cpp = NULL; @@ -3364,7 +3367,7 @@ annotate (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("annotate\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/recurse.c b/gnu/usr.bin/cvs/src/recurse.c index 7eb7fe99c69..8a7a290173b 100644 --- a/gnu/usr.bin/cvs/src/recurse.c +++ b/gnu/usr.bin/cvs/src/recurse.c @@ -19,7 +19,7 @@ static void addlist PROTO((List ** listp, char *key)); static int unroll_files_proc PROTO((Node *p, void *closure)); static void addfile PROTO((List **listp, char *dir, char *file)); -static char update_dir[PATH_MAX]; +static char *update_dir; static char *repository = NULL; static List *filelist = NULL; /* holds list of files on which to operate */ static List *dirlist = NULL; /* holds list of directories on which to operate */ @@ -123,9 +123,9 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, expand_wild (argc, argv, &argc, &argv); if (update_preload == NULL) - update_dir[0] = '\0'; + update_dir = xstrdup (""); else - (void) strcpy (update_dir, update_preload); + update_dir = xstrdup (update_preload); /* clean up from any previous calls to start_recursion */ if (repository) @@ -155,7 +155,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, addlist (&dirlist, "."); err += do_recursion (&frame); - return(err); + goto out; } @@ -183,7 +183,6 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, /* otherwise, split argument into directory and component names. */ char *dir; char *comp; - char tmp[PATH_MAX]; char *file_to_try; /* Now break out argv[i] into directory part (DIR) and file part (COMP). @@ -209,42 +208,47 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, if (!(which & W_LOCAL)) { /* If doing rtag, we've done a chdir to the repository. */ - sprintf (tmp, "%s%s", argv[i], RCSEXT); - file_to_try = tmp; + file_to_try = xmalloc (strlen (argv[i]) + sizeof (RCSEXT) + 5); + sprintf (file_to_try, "%s%s", argv[i], RCSEXT); } else - file_to_try = argv[i]; + file_to_try = xstrdup (argv[i]); - if(isfile(file_to_try)) + if (isfile (file_to_try)) addfile (&files_by_dir, dir, comp); else if (isdir (dir)) { if ((which & W_LOCAL) && isdir (CVSADM)) { /* otherwise, look for it in the repository. */ - char *save_update_dir; + char *tmp_update_dir; char *repos; - - /* save & set (aka push) update_dir */ - save_update_dir = xstrdup (update_dir); + char *reposfile; + + tmp_update_dir = xmalloc (strlen (update_dir) + + strlen (dir) + + 5); + strcpy (tmp_update_dir, update_dir); - if (*update_dir != '\0') - (void) strcat (update_dir, "/"); + if (*tmp_update_dir != '\0') + (void) strcat (tmp_update_dir, "/"); + + (void) strcat (tmp_update_dir, dir); - (void) strcat (update_dir, dir); - /* look for it in the repository. */ - repos = Name_Repository (dir, update_dir); - (void) sprintf (tmp, "%s/%s", repos, comp); + repos = Name_Repository (dir, tmp_update_dir); + reposfile = xmalloc (strlen (repos) + + strlen (comp) + + 5); + (void) sprintf (reposfile, "%s/%s", repos, comp); free (repos); - if (!wrap_name_has (comp, WRAP_TOCVS) && isdir(tmp)) + if (!wrap_name_has (comp, WRAP_TOCVS) && isdir (reposfile)) addlist (&dirlist, argv[i]); else addfile (&files_by_dir, dir, comp); - (void) sprintf (update_dir, "%s", save_update_dir); - free (save_update_dir); + free (tmp_update_dir); } else addfile (&files_by_dir, dir, comp); @@ -252,6 +256,7 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, else error (1, 0, "no such directory `%s'", dir); + free (file_to_try); free (dir); free (comp); } @@ -272,6 +277,9 @@ start_recursion (fileproc, filesdoneproc, direntproc, dirleaveproc, callerdat, free (argv[i]); free (argv); + out: + free (update_dir); + update_dir = NULL; return (err); } @@ -351,8 +359,9 @@ do_recursion (frame) } else { - repository = xmalloc (PATH_MAX); - (void) getwd (repository); + repository = xgetwd (); + if (repository == NULL) + error (1, errno, "could not get working directory"); } srepository = repository; /* remember what to free */ @@ -545,7 +554,7 @@ do_dir_proc (p, closure) struct recursion_frame *frame = frent->frame; struct recursion_frame xframe; char *dir = p->key; - char newrepos[PATH_MAX]; + char *newrepos; List *sdirlist; char *srepository; char *cp; @@ -553,6 +562,13 @@ do_dir_proc (p, closure) int stripped_dot = 0; int err = 0; struct saved_cwd cwd; + char *saved_update_dir; + + saved_update_dir = update_dir; + update_dir = xmalloc (strlen (saved_update_dir) + + strlen (dir) + + 5); + strcpy (update_dir, saved_update_dir); /* set up update_dir - skip dots if not at start */ if (strcmp (dir, ".") != 0) @@ -573,9 +589,12 @@ do_dir_proc (p, closure) * update -d and in that case the generated name will be correct. */ if (repository == NULL) - newrepos[0] = '\0'; + newrepos = xstrdup (""); else + { + newrepos = xmalloc (strlen (repository) + strlen (dir) + 5); (void) sprintf (newrepos, "%s/%s", repository, dir); + } } else { @@ -583,15 +602,16 @@ do_dir_proc (p, closure) (void) strcpy (update_dir, dir); if (repository == NULL) - newrepos[0] = '\0'; + newrepos = xstrdup (""); else - (void) strcpy (newrepos, repository); + newrepos = xstrdup (repository); } /* call-back dir entry proc (if any) */ if (frame->direntproc != NULL) dir_return = frame->direntproc (frame->callerdat, dir, newrepos, update_dir, frent->entries); + free (newrepos); /* only process the dir if the return code was 0 */ if (dir_return != R_SKIP_ALL) @@ -640,12 +660,16 @@ do_dir_proc (p, closure) repository = srepository; } - /* put back update_dir */ + /* Put back update_dir. I think this is the same as just setting + update_dir back to saved_update_dir, but there are a few cases I'm + not sure about (in particular, if DIR is "." and update_dir is + not ""), so for conservatism I'm leaving this here. */ cp = last_component (update_dir); if (cp > update_dir) cp[-1] = '\0'; else update_dir[0] = '\0'; + free (saved_update_dir); return (err); } @@ -722,7 +746,11 @@ unroll_files_proc (p, closure) if ( CVS_CHDIR (p->key) < 0) error (1, errno, "could not chdir to %s", p->key); - save_update_dir = xstrdup (update_dir); + save_update_dir = update_dir; + update_dir = xmalloc (strlen (save_update_dir) + + strlen (p->key) + + 5); + strcpy (update_dir, save_update_dir); if (*update_dir != '\0') (void) strcat (update_dir, "/"); @@ -734,8 +762,8 @@ unroll_files_proc (p, closure) if (save_update_dir != NULL) { - (void) strcpy (update_dir, save_update_dir); - free (save_update_dir); + free (update_dir); + update_dir = save_update_dir; if (restore_cwd (&cwd, NULL)) error_exit (); diff --git a/gnu/usr.bin/cvs/src/release.c b/gnu/usr.bin/cvs/src/release.c index 8e5c992d3d0..d387e6e5b7b 100644 --- a/gnu/usr.bin/cvs/src/release.c +++ b/gnu/usr.bin/cvs/src/release.c @@ -6,6 +6,7 @@ */ #include "cvs.h" +#include "getline.h" static void release_delete PROTO((char *dir)); @@ -64,7 +65,9 @@ release (argc, argv) FILE *fp; int i, c; char *repository; - char line[PATH_MAX], update_cmd[PATH_MAX]; + char *line = NULL; + size_t line_allocated = 0; + char *update_cmd; char *thisarg; int arg_start_idx; int err = 0; @@ -106,6 +109,9 @@ release (argc, argv) * questions asked. Else we prompt, then maybe release. */ /* Construct the update command. */ + update_cmd = xmalloc (strlen (program_path) + + strlen (CVSroot_original) + + 20); sprintf (update_cmd, "%s -n -q -d %s update", program_path, CVSroot_original); @@ -159,7 +165,7 @@ release (argc, argv) fp = run_popen (update_cmd, "r"); c = 0; - while (fgets (line, sizeof (line), fp)) + while (getline (&line, &line_allocated, fp) >= 0) { if (strchr ("MARCZ", *line)) c++; @@ -242,6 +248,9 @@ release (argc, argv) } #endif /* CLIENT_SUPPORT */ + free (update_cmd); + if (line != NULL) + free (line); return err; } diff --git a/gnu/usr.bin/cvs/src/remove.c b/gnu/usr.bin/cvs/src/remove.c index 08a67bed58c..6f31e0acb55 100644 --- a/gnu/usr.bin/cvs/src/remove.c +++ b/gnu/usr.bin/cvs/src/remove.c @@ -17,6 +17,10 @@ #include "cvs.h" +#ifdef CLIENT_SUPPORT +static int remove_force_fileproc PROTO ((void *callerdat, + struct file_info *finfo)); +#endif static int remove_fileproc PROTO ((void *callerdat, struct file_info *finfo)); static Dtype remove_dirproc PROTO ((void *callerdat, char *dir, char *repos, char *update_dir, @@ -82,15 +86,10 @@ cvsremove (argc, argv) { if (!noexec) { - int i; - - for (i = 0; i < argc; i++) - { - if ( CVS_UNLINK (argv[i]) < 0 && ! existence_error (errno)) - { - error (0, errno, "unable to remove %s", argv[i]); - } - } + start_recursion (remove_force_fileproc, (FILESDONEPROC) NULL, + (DIRENTPROC) NULL, (DIRLEAVEPROC) NULL, + (void *) NULL, argc, argv, local, W_LOCAL, + 0, 0, (char *) NULL, 0); } /* else FIXME should probably act as if the file doesn't exist in doing the following checks. */ @@ -101,7 +100,7 @@ cvsremove (argc, argv) if (local) send_arg("-l"); send_file_names (argc, argv, 0); - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("remove\012", 0); return get_responses_and_close (); } @@ -127,6 +126,26 @@ cvsremove (argc, argv) return (err); } +#ifdef CLIENT_SUPPORT + +/* + * This is called via start_recursion if we are running as the client + * and the -f option was used. We just physically remove the file. + */ + +/*ARGSUSED*/ +static int +remove_force_fileproc (callerdat, finfo) + void *callerdat; + struct file_info *finfo; +{ + if (CVS_UNLINK (finfo->file) < 0 && ! existence_error (errno)) + error (0, errno, "unable to remove %s", finfo->fullname); + return 0; +} + +#endif + /* * remove the file, only if it has already been physically removed */ @@ -136,7 +155,6 @@ remove_fileproc (callerdat, finfo) void *callerdat; struct file_info *finfo; { - char fname[PATH_MAX]; Vers_TS *vers; if (force) @@ -168,11 +186,17 @@ remove_fileproc (callerdat, finfo) } else if (vers->vn_user[0] == '0' && vers->vn_user[1] == '\0') { + char *fname; + /* * It's a file that has been added, but not commited yet. So, * remove the ,t file for it and scratch it from the * entries file. */ Scratch_Entry (finfo->entries, finfo->file); + fname = xmalloc (strlen (finfo->file) + + sizeof (CVSADM) + + sizeof (CVSEXT_LOG) + + 10); (void) sprintf (fname, "%s/%s%s", CVSADM, finfo->file, CVSEXT_LOG); (void) unlink_file (fname); if (!quiet) @@ -182,6 +206,7 @@ remove_fileproc (callerdat, finfo) if (server_active) server_checked_in (finfo->file, finfo->update_dir, finfo->repository); #endif + free (fname); } else if (vers->vn_user[0] == '-') { @@ -191,7 +216,10 @@ remove_fileproc (callerdat, finfo) } else { + char *fname; + /* Re-register it with a negative version number. */ + fname = xmalloc (strlen (vers->vn_user) + 5); (void) strcpy (fname, "-"); (void) strcat (fname, vers->vn_user); Register (finfo->entries, finfo->file, fname, vers->ts_rcs, vers->options, @@ -204,6 +232,7 @@ remove_fileproc (callerdat, finfo) if (server_active) server_checked_in (finfo->file, finfo->update_dir, finfo->repository); #endif + free (fname); } freevers_ts (&vers); diff --git a/gnu/usr.bin/cvs/src/repos.c b/gnu/usr.bin/cvs/src/repos.c index d774c342120..2590df5a930 100644 --- a/gnu/usr.bin/cvs/src/repos.c +++ b/gnu/usr.bin/cvs/src/repos.c @@ -7,6 +7,7 @@ */ #include "cvs.h" +#include "getline.h" /* Determine the name of the RCS repository for directory DIR in the current working directory, or for the current working directory @@ -23,10 +24,10 @@ Name_Repository (dir, update_dir) char *update_dir; { FILE *fpin; - char *ret, *xupdate_dir; - char repos[PATH_MAX]; - char path[PATH_MAX]; - char tmp[PATH_MAX]; + char *xupdate_dir; + char *repos = NULL; + size_t repos_allocated = 0; + char *tmp; char *cp; if (update_dir && *update_dir) @@ -35,9 +36,12 @@ Name_Repository (dir, update_dir) xupdate_dir = "."; if (dir != NULL) + { + tmp = xmalloc (strlen (dir) + sizeof (CVSADM_REP) + 10); (void) sprintf (tmp, "%s/%s", dir, CVSADM_REP); + } else - (void) strcpy (tmp, CVSADM_REP); + tmp = xstrdup (CVSADM_REP); /* * The assumption here is that the repository is always contained in the @@ -48,12 +52,15 @@ Name_Repository (dir, update_dir) if (fpin == NULL) { int save_errno = errno; - char cvsadm[PATH_MAX]; + char *cvsadm; if (dir != NULL) + { + cvsadm = xmalloc (strlen (dir) + sizeof (CVSADM) + 10); (void) sprintf (cvsadm, "%s/%s", dir, CVSADM); + } else - (void) strcpy (cvsadm, CVSADM); + cvsadm = xstrdup (CVSADM); if (!isdir (cvsadm)) { @@ -61,6 +68,7 @@ Name_Repository (dir, update_dir) error (1, 0, "there is no version here; do '%s checkout' first", program_name); } + free (cvsadm); if (existence_error (save_errno)) { @@ -78,9 +86,11 @@ Name_Repository (dir, update_dir) error (1, save_errno, "cannot open %s", tmp); } + free (tmp); - if (fgets (repos, PATH_MAX, fpin) == NULL) + if (getline (&repos, &repos_allocated, fpin) < 0) { + /* FIXME: should be checking for end of file separately. */ error (0, 0, "in directory %s:", xupdate_dir); error (1, errno, "cannot read %s", CVSADM_REP); } @@ -101,6 +111,8 @@ Name_Repository (dir, update_dir) } if (! isabsolute(repos)) { + char *newrepos; + if (CVSroot_original == NULL) { error (0, 0, "in directory %s:", xupdate_dir); @@ -108,14 +120,14 @@ Name_Repository (dir, update_dir) error (0, 0, "or specify the '-d' option to %s.", program_name); error (1, 0, "illegal repository setting"); } - (void) strcpy (path, repos); - (void) sprintf (repos, "%s/%s", CVSroot_directory, path); + newrepos = xmalloc (strlen (CVSroot_directory) + strlen (repos) + 10); + (void) sprintf (newrepos, "%s/%s", CVSroot_directory, repos); + free (repos); + repos = newrepos; } - /* allocate space to return and fill it in */ strip_trailing_slashes (repos); - ret = xstrdup (repos); - return (ret); + return repos; } /* diff --git a/gnu/usr.bin/cvs/src/root.c b/gnu/usr.bin/cvs/src/root.c index 71e8f2883df..1e38c31478a 100644 --- a/gnu/usr.bin/cvs/src/root.c +++ b/gnu/usr.bin/cvs/src/root.c @@ -12,6 +12,7 @@ */ #include "cvs.h" +#include "getline.h" /* Printable names for things in the CVSroot_method enum variable. Watch out if the enum is changed in cvs.h! */ @@ -29,9 +30,10 @@ Name_Root(dir, update_dir) { FILE *fpin; char *ret, *xupdate_dir; - char root[PATH_MAX]; - char tmp[PATH_MAX]; - char cvsadm[PATH_MAX]; + char *root = NULL; + size_t root_allocated = 0; + char *tmp; + char *cvsadm; char *cp; if (update_dir && *update_dir) @@ -41,13 +43,15 @@ Name_Root(dir, update_dir) if (dir != NULL) { + cvsadm = xmalloc (strlen (dir) + sizeof (CVSADM) + 10); (void) sprintf (cvsadm, "%s/%s", dir, CVSADM); + tmp = xmalloc (strlen (dir) + sizeof (CVSADM_ROOT) + 10); (void) sprintf (tmp, "%s/%s", dir, CVSADM_ROOT); } else { - (void) strcpy (cvsadm, CVSADM); - (void) strcpy (tmp, CVSADM_ROOT); + cvsadm = xstrdup (CVSADM); + tmp = xstrdup (CVSADM_ROOT); } /* @@ -59,7 +63,10 @@ Name_Root(dir, update_dir) * /path/name or have the environment variable CVSROOT set in * order to continue. */ if ((!isdir (cvsadm)) || (!isreadable (tmp))) - return (NULL); + { + ret = NULL; + goto out; + } /* * The assumption here is that the CVS Root is always contained in the @@ -67,12 +74,15 @@ Name_Root(dir, update_dir) */ fpin = open_file (tmp, "r"); - if (fgets (root, PATH_MAX, fpin) == NULL) + if (getline (&root, &root_allocated, fpin) < 0) { + /* FIXME: should be checking for end of file separately; errno + is not set in that case. */ error (0, 0, "in directory %s:", xupdate_dir); error (0, errno, "cannot read %s", CVSADM_ROOT); error (0, 0, "please correct this problem"); - return (NULL); + ret = NULL; + goto out; } (void) fclose (fpin); if ((cp = strrchr (root, '\n')) != NULL) @@ -93,7 +103,8 @@ Name_Root(dir, update_dir) error (0, 0, "ignoring %s because it does not contain an absolute pathname.", CVSADM_ROOT); - return (NULL); + ret = NULL; + goto out; } #ifdef CLIENT_SUPPORT @@ -106,12 +117,18 @@ Name_Root(dir, update_dir) error (0, 0, "ignoring %s because it specifies a non-existent repository %s", CVSADM_ROOT, root); - return (NULL); + ret = NULL; + goto out; } /* allocate space to return and fill it in */ strip_trailing_slashes (root); ret = xstrdup (root); + out: + free (cvsadm); + free (tmp); + if (root != NULL) + free (root); return (ret); } @@ -153,7 +170,7 @@ Create_Root (dir, rootdir) char *rootdir; { FILE *fout; - char tmp[PATH_MAX]; + char *tmp; if (noexec) return; @@ -163,14 +180,19 @@ Create_Root (dir, rootdir) if (rootdir != NULL) { if (dir != NULL) + { + tmp = xmalloc (strlen (dir) + sizeof (CVSADM_ROOT) + 10); (void) sprintf (tmp, "%s/%s", dir, CVSADM_ROOT); + } else - (void) strcpy (tmp, CVSADM_ROOT); + tmp = xstrdup (CVSADM_ROOT); + fout = open_file (tmp, "w+"); if (fprintf (fout, "%s\n", rootdir) < 0) error (1, errno, "write to %s failed", tmp); if (fclose (fout) == EOF) error (1, errno, "cannot close %s", tmp); + free (tmp); } } @@ -349,6 +371,14 @@ parse_cvsroot (CVSroot) error (0, 0, "(%s)", CVSroot); return 1; } + /* cvs.texinfo has always told people that CVSROOT must be an + absolute pathname. Furthermore, attempts to use a relative + pathname produced various errors (I couldn't get it to work), + so there would seem to be little risk in making this a fatal + error. */ + if (!isabsolute (CVSroot_directory)) + error (1, 0, "CVSROOT %s must be an absolute pathname", + CVSroot_directory); break; case kserver_method: #ifndef HAVE_KERBEROS diff --git a/gnu/usr.bin/cvs/src/rtag.c b/gnu/usr.bin/cvs/src/rtag.c index dfc3c9364eb..d499e0b3fe5 100644 --- a/gnu/usr.bin/cvs/src/rtag.c +++ b/gnu/usr.bin/cvs/src/rtag.c @@ -164,9 +164,11 @@ rtag (argc, argv) { /* We're the client side. Fire up the remote server. */ start_server (); - + ign_setup (); + if (!force_tag_match) + send_arg ("-f"); if (local) send_arg("-l"); if (delete_flag) @@ -175,7 +177,7 @@ rtag (argc, argv) send_arg("-b"); if (force_tag_move) send_arg("-F"); - if (run_module_prog) + if (!run_module_prog) send_arg("-n"); if (attic_too) send_arg("-a"); @@ -229,19 +231,25 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, char *mname; char *msg; { + /* Begin section which is identical to patch_proc--should this + be abstracted out somehow? */ int err = 0; int which; - char repository[PATH_MAX]; - char where[PATH_MAX]; + char *repository; + char *where; + repository = xmalloc (strlen (CVSroot_directory) + strlen (argv[0]) + + (mfile == NULL ? 0 : strlen (mfile)) + 30); (void) sprintf (repository, "%s/%s", CVSroot_directory, argv[0]); + where = xmalloc (strlen (argv[0]) + (mfile == NULL ? 0 : strlen (mfile)) + + 10); (void) strcpy (where, argv[0]); /* if mfile isn't null, we need to set up to do only part of the module */ if (mfile != NULL) { char *cp; - char path[PATH_MAX]; + char *path; /* if the portion of the module is a path, put the dir part on repos */ if ((cp = strrchr (mfile, '/')) != NULL) @@ -255,6 +263,7 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, } /* take care of the rest */ + path = xmalloc (strlen (repository) + strlen (mfile) + 5); (void) sprintf (path, "%s/%s", repository, mfile); if (isdir (path)) { @@ -273,14 +282,18 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, argv[1] = xstrdup (mfile); (*pargc) = 2; } + free (path); } - /* chdir to the starting directory */ + /* cd to the starting repository */ if ( CVS_CHDIR (repository) < 0) { error (0, errno, "cannot chdir to %s", repository); + free (repository); return (1); } + free (repository); + /* End section which is identical to patch_proc. */ if (delete_flag || attic_too || (force_tag_match && numtag)) which = W_REPOS | W_ATTIC; @@ -312,7 +325,7 @@ rtag_proc (pargc, argv, xwhere, mwhere, mfile, shorten, local_specified, (DIRLEAVEPROC) NULL, NULL, *pargc - 1, argv + 1, local, which, 0, 0, where, 1); - + free (where); dellist(&mtlist); return (err); diff --git a/gnu/usr.bin/cvs/src/run.c b/gnu/usr.bin/cvs/src/run.c index df594312a8f..74e418dc3ed 100644 --- a/gnu/usr.bin/cvs/src/run.c +++ b/gnu/usr.bin/cvs/src/run.c @@ -28,10 +28,11 @@ #endif static void run_add_arg PROTO((const char *s)); -static void run_init_prog PROTO((void)); extern char *strtok (); +extern int vasprintf (); + /* * To exec a program under CVS, first call run_setup() to setup any initial * arguments. The options to run_setup are essentially like printf(). The @@ -45,7 +46,6 @@ extern char *strtok (); * The execvp() syscall will be used, so that the PATH is searched correctly. * File redirections can be performed in the call to run_exec(). */ -static char *run_prog; static char **run_argv; static int run_argc; static int run_argc_allocated; @@ -66,8 +66,7 @@ run_setup (fmt, va_alist) #endif char *cp; int i; - - run_init_prog (); + char *run_prog; /* clean out any malloc'ed values from run_argv */ for (i = 0; i < run_argc; i++) @@ -83,15 +82,18 @@ run_setup (fmt, va_alist) /* process the varargs into run_prog */ #ifdef HAVE_VPRINTF VA_START (args, fmt); - (void) vsprintf (run_prog, fmt, args); + (void) vasprintf (&run_prog, fmt, args); va_end (args); #else - (void) sprintf (run_prog, fmt, a1, a2, a3, a4, a5, a6, a7, a8); + you lose #endif + if (run_prog == NULL) + error (1, 0, "out of memory"); /* put each word into run_argv, allocating it as we go */ for (cp = strtok (run_prog, " \t"); cp; cp = strtok ((char *) NULL, " \t")) run_add_arg (cp); + free (run_prog); } void @@ -115,20 +117,22 @@ run_args (fmt, va_alist) #ifdef HAVE_VPRINTF va_list args; #endif - - run_init_prog (); + char *run_prog; /* process the varargs into run_prog */ #ifdef HAVE_VPRINTF VA_START (args, fmt); - (void) vsprintf (run_prog, fmt, args); + (void) vasprintf (&run_prog, fmt, args); va_end (args); #else - (void) sprintf (run_prog, fmt, a1, a2, a3, a4, a5, a6, a7, a8); + you lose #endif + if (run_prog == NULL) + error (1, 0, "out of memory"); /* and add the (single) argument to the run_argv list */ run_add_arg (run_prog); + free (run_prog); } static void @@ -149,14 +153,6 @@ run_add_arg (s) run_argv[run_argc] = (char *) 0; /* not post-incremented on purpose! */ } -static void -run_init_prog () -{ - /* make sure that run_prog is allocated once */ - if (run_prog == (char *) 0) - run_prog = xmalloc (10 * 1024); /* 10K of args for _setup and _arg */ -} - int run_exec (stin, stout, sterr, flags) char *stin; diff --git a/gnu/usr.bin/cvs/src/sanity.sh b/gnu/usr.bin/cvs/src/sanity.sh index ecf296cf028..84e678c25bb 100644 --- a/gnu/usr.bin/cvs/src/sanity.sh +++ b/gnu/usr.bin/cvs/src/sanity.sh @@ -41,7 +41,7 @@ if test x"$1" = x"-r"; then remote=yes # If we're going to do remote testing, make sure 'rsh' works first. host="`hostname`" - if test "x`${CVS_RSH-rsh} $host 'echo hi'`" != "xhi"; then + if test "x`${CVS_RSH-rsh} $host -n 'echo hi'`" != "xhi"; then echo "ERROR: cannot test remote CVS, because \`rsh $host' fails." >&2 exit 1 fi @@ -80,6 +80,11 @@ shift # special characters we are probably in big trouble. PROG=`basename ${testcvs}` +# Regexp to match an author name. I'm not really sure what characters +# should be here. a-zA-Z obviously. People complained when 0-9 were +# not allowed in usernames. Other than that I'm not sure. +username="[a-zA-Z0-9][a-zA-Z0-9]*" + # FIXME: try things (what things? checkins?) without -m. # # Some of these tests are written to expect -Q. But testing with @@ -451,7 +456,7 @@ HOME=${TESTDIR}/home; export HOME # tests. if test x"$*" = x; then - tests="basica basicb basic1 deep basic2 rdiff death death2 branches multibranch import join new newb conflicts conflicts2 modules modules2 mflag errmsg1 devcom devcom2 ignore binfiles binwrap info serverpatch log log2 crerepos rcs" + tests="basica basicb basic1 deep basic2 rdiff death death2 branches multibranch import join new newb conflicts conflicts2 modules modules2 modules3 mflag errmsg1 devcom devcom2 devcom3 ignore binfiles binwrap info serverpatch log log2 crerepos rcs big modes" else tests="$*" fi @@ -526,7 +531,7 @@ for what in $tests; do dotest basica-0a "${testcvs} -q co -l ." '' mkdir first-dir dotest basica-0b "${testcvs} add first-dir" \ -"Directory /tmp/cvs-sanity/cvsroot/\./first-dir added to the repository" +"Directory /tmp/cvs-sanity/cvsroot/first-dir added to the repository" cd .. rm -rf 1 @@ -626,6 +631,22 @@ done' '"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' dotest basica-8 "${testcvs} -q update" '' + # Test the -f option to ci + cd sdir/ssdir + dotest basica-8a "${testcvs} -q ci -f -m force-it" \ +'Checking in ssfile; +/tmp/cvs-sanity/cvsroot/first-dir/sdir/ssdir/ssfile,v <-- ssfile +new revision: 1\.3; previous revision: 1\.2 +done' + cd ../.. + dotest basica-8b "${testcvs} -q diff -r1.2 -r1.3" \ +'Index: sdir/ssdir/ssfile +=================================================================== +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/sdir/ssdir/ssfile,v +retrieving revision 1\.2 +retrieving revision 1\.3 +diff -r1\.2 -r1\.3' + # The .* here will normally be "No such file or directory", # but if memory serves some systems (AIX?) have a different message. : dotest_fail basica-9 \ @@ -638,8 +659,8 @@ done' dotest basica-10 "${testcvs} annotate" \ 'Annotations for sdir/ssdir/ssfile \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* -1\.1 .[a-z0-9@][a-z0-9@ ]* [0-9a-zA-Z-]*.: ssfile -1\.2 .[a-z0-9@][a-z0-9@ ]* [0-9a-zA-Z-]*.: ssfile line 2' +1\.1 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile +1\.2 .'"${username}"' *[0-9a-zA-Z-]*.: ssfile line 2' cd .. rm -rf ${CVSROOT_DIRNAME}/first-dir @@ -648,7 +669,30 @@ done' basicb) # More basic tests, including non-branch tags and co -d. - mkdir ${CVSROOT_DIRNAME}/first-dir + mkdir 1; cd 1 + dotest basicb-0a "${testcvs} -q co -l ." '' + touch topfile + dotest basicb-0b "${testcvs} add topfile" \ +"${PROG} [a-z]*: scheduling file .topfile. for addition +${PROG} [a-z]*: use .cvs commit. to add this file permanently" + dotest basicb-0c "${testcvs} -q ci -m add-it topfile" \ +'RCS file: /tmp/cvs-sanity/cvsroot/./topfile,v +done +Checking in topfile; +/tmp/cvs-sanity/cvsroot/./topfile,v <-- topfile +initial revision: 1\.1 +done' + cd .. + rm -rf 1 + mkdir 2; cd 2 + dotest basicb-0d "${testcvs} -q co -l ." "U topfile" + mkdir first-dir + dotest basicb-0e "${testcvs} add first-dir" \ +"Directory /tmp/cvs-sanity/cvsroot/first-dir added to the repository" + cd .. + rm -rf 2 + +: mkdir ${CVSROOT_DIRNAME}/first-dir dotest basicb-1 "${testcvs} -q co first-dir" '' dotest basicb-1a "test -d CVS" '' cd first-dir @@ -714,6 +758,10 @@ T sdir2/sfile2' /tmp/cvs-sanity/cvsroot/first-dir/sdir2/sfile2,v <-- sfile2 new revision: 1\.2; previous revision: 1\.1 done' + # See if CVS can correctly notice when an invalid numeric + # revision is specified. + # Commented out until we get around to fixing CVS +: dotest basicb-8a0 "${testcvs} diff -r 1.5 -r 1.7 sfile2" 'error msg' cd .. # Test that we recurse into the correct directory when checking @@ -737,6 +785,7 @@ sfile2 starts" rm -rf newdir rm -rf ${CVSROOT_DIRNAME}/first-dir + rm -f ${CVSROOT_DIRNAME}/topfile,v ;; basic1) # first dive - add a files, first singly, then in a group. @@ -965,7 +1014,27 @@ done' dotest deep-rm5 "${testcvs} -q update -d -P" '' dotest_fail deep-rm6 "test -d dir7" '' - cd ../../../../../../.. + # Test rm -f -R. + cd ../.. + dotest deep-rm7 "${testcvs} rm -f -R dir5" \ +"${PROG} [a-z]*: Removing dir5 +${PROG} [a-z]*: scheduling .dir5/file1. for removal +${PROG} [a-z]*: Removing dir5/dir6 +${PROG} [a-z]*: scheduling .dir5/dir6/file1. for removal +${PROG} [a-z]*: use .${PROG} commit. to remove these files permanently" + dotest deep-rm8 "${testcvs} -q ci -m rm-it" \ +'Removing dir5/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/file1,v <-- file1 +new revision: delete; previous revision: 1\.1 +done +Removing dir5/dir6/file1; +/tmp/cvs-sanity/cvsroot/first-dir/dir1/dir2/dir3/dir4/dir5/dir6/file1,v <-- file1 +new revision: delete; previous revision: 1\.1 +done' + dotest deep-rm9 "${testcvs} -q update -d -P" '' + dotest_fail deep-rm10 "test -d dir5" + + cd ../../../../.. if echo "yes" | ${testcvs} release -d first-dir >>${LOGFILE}; then pass deep-5 @@ -1429,10 +1498,10 @@ diff -c trdiff/foo:1\.1\.1\.1 trdiff/foo:1\.2 --- trdiff/foo .* \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 1,2 \*\*\*\* -! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$ +! \$''Id: foo,v 1\.1\.1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$ ! \$''Name: T1 \$ --- 1,3 ---- -! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$ +! \$''Id: foo,v 1\.2 [0-9/]* [0-9:]* '"${username}"' Exp \$ ! \$''Name: local-v0 \$ ! something Index: trdiff/new @@ -1442,7 +1511,7 @@ diff -c /dev/null trdiff/new:1\.1 \*\*\*\*\*\*\*\*\*\*\*\*\*\*\* \*\*\* 0 \*\*\*\* --- 1,2 ---- -'"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* [a-zA-Z0-9][a-zA-Z0-9]* Exp \$" +'"${PLUS}"' #ident "@(#)trdiff:\$''Name: local-v0 \$:\$''Id: new,v 1\.1 [0-9/]* [0-9:]* '"${username}"' Exp \$" '"${PLUS}"' new file' # FIXME: will this work here? @@ -1621,10 +1690,7 @@ T file2' echo "FAIL: test 76" | tee -a ${LOGFILE} ; exit 1 fi - # Remote CVS outputs nothing for 76a0 and 76a1; until - # this bug is fixed just skip those tests for remote. - if test "x$remote" = xno; then - dotest death-76a0 \ + dotest death-76a0 \ "${testcvs} -q rdiff -r bp_branch1 -r branch1 first-dir" \ "Index: first-dir/file3 diff -c /dev/null first-dir/file3:1\.1\.2\.1 @@ -1634,7 +1700,7 @@ diff -c /dev/null first-dir/file3:1\.1\.2\.1 \*\*\* 0 \*\*\*\* --- 1 ---- ${PLUS} line1 from branch1" - dotest death-76a1 \ + dotest death-76a1 \ "${testcvs} -q rdiff -r branch1 -r bp_branch1 first-dir" \ 'Index: first-dir/file3 diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed @@ -1644,7 +1710,6 @@ diff -c first-dir/file3:1\.1\.2\.1 first-dir/file3:removed \*\*\* 1 \*\*\*\* - line1 from branch1 --- 0 ----' - fi # remove rm file3 @@ -2395,16 +2460,16 @@ total revisions: 3; selected revisions: 3 description: ---------------------------- revision 1\.1 -date: [0-9/]* [0-9:]*; author: [0-9a-zA-Z-]*; state: Exp; +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; branches: 1\.1\.2; 1\.1\.4; add-it ---------------------------- revision 1\.1\.4\.1 -date: [0-9/]* [0-9:]*; author: [0-9a-zA-Z-]*; state: Exp; lines: ${PLUS}1 -0 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -0 modify-on-br2 ---------------------------- revision 1\.1\.2\.1 -date: [0-9/]* [0-9:]*; author: [0-9a-zA-Z-]*; state: Exp; lines: ${PLUS}1 -1 +date: [0-9/]* [0-9:]*; author: ${username}; state: Exp; lines: ${PLUS}1 -1 modify-on-br1 =============================================================================" cd .. @@ -2423,7 +2488,7 @@ modify-on-br1 mkdir import-dir ; cd import-dir for i in 1 2 3 4 ; do - echo imported file"$i" > imported-file"$i" + echo imported file"$i" > imported-f"$i" done # This directory should be on the default ignore list, @@ -2431,8 +2496,8 @@ modify-on-br1 mkdir RCS echo ignore.me >RCS/ignore.me - echo 'import should not expand $''Id$' >>imported-file2 - cp imported-file2 ../imported-file2-orig.tmp + echo 'import should not expand $''Id$' >>imported-f2 + cp imported-f2 ../imported-f2-orig.tmp if ${CVS} import -m first-import first-dir vendor-branch junk-1_0 ; then echo "PASS: test 96" >>${LOGFILE} @@ -2440,7 +2505,7 @@ modify-on-br1 echo "FAIL: test 96" | tee -a ${LOGFILE} ; exit 1 fi - if cmp ../imported-file2-orig.tmp imported-file2; then + if cmp ../imported-f2-orig.tmp imported-f2; then pass 96.5 else fail 96.5 @@ -2456,7 +2521,7 @@ modify-on-br1 cd first-dir for i in 1 2 3 4 ; do - if test -f imported-file"$i" ; then + if test -f imported-f"$i" ; then echo "PASS: test 98-$i" >>${LOGFILE} else echo "FAIL: test 98-$i" | tee -a ${LOGFILE} ; exit 1 @@ -2469,15 +2534,15 @@ modify-on-br1 fi # remove - rm imported-file1 - if ${CVS} rm imported-file1 2>> ${LOGFILE}; then + rm imported-f1 + if ${CVS} rm imported-f1 2>> ${LOGFILE}; then echo "PASS: test 99" >>${LOGFILE} else echo "FAIL: test 99" | tee -a ${LOGFILE} ; exit 1 fi # change - echo local-change >> imported-file2 + echo local-change >> imported-f2 # commit if ${CVS} ci -m local-changes >> ${LOGFILE} 2>&1; then @@ -2487,7 +2552,7 @@ modify-on-br1 fi # log - if ${CVS} log imported-file1 | grep '1.1.1.2 (dead)' ; then + if ${CVS} log imported-f1 | grep '1.1.1.2 (dead)' ; then echo "FAIL: test 101" | tee -a ${LOGFILE} ; exit 1 else echo "PASS: test 101" >>${LOGFILE} @@ -2501,16 +2566,16 @@ modify-on-br1 fi # remove file4 on the vendor branch - rm imported-file4 + rm imported-f4 - if ${CVS} rm imported-file4 2>> ${LOGFILE}; then + if ${CVS} rm imported-f4 2>> ${LOGFILE}; then echo "PASS: test 103" >>${LOGFILE} else echo "FAIL: test 103" | tee -a ${LOGFILE} ; exit 1 fi # commit - if ${CVS} ci -m vendor-removed imported-file4 >>${LOGFILE}; then + if ${CVS} ci -m vendor-removed imported-f4 >>${LOGFILE}; then echo "PASS: test 104" >>${LOGFILE} else echo "FAIL: test 104" | tee -a ${LOGFILE} ; exit 1 @@ -2526,16 +2591,16 @@ modify-on-br1 # second import - file4 deliberately unchanged cd ../import-dir for i in 1 2 3 ; do - echo rev 2 of file $i >> imported-file"$i" + echo rev 2 of file $i >> imported-f"$i" done - cp imported-file2 ../imported-file2-orig.tmp + cp imported-f2 ../imported-f2-orig.tmp if ${CVS} import -m second-import first-dir vendor-branch junk-2_0 ; then echo "PASS: test 106" >>${LOGFILE} else echo "FAIL: test 106" | tee -a ${LOGFILE} ; exit 1 fi - if cmp ../imported-file2-orig.tmp imported-file2; then + if cmp ../imported-f2-orig.tmp imported-f2; then pass 106.5 else fail 106.5 @@ -2551,14 +2616,14 @@ modify-on-br1 cd first-dir - if test -f imported-file1 ; then + if test -f imported-f1 ; then echo "FAIL: test 108" | tee -a ${LOGFILE} ; exit 1 else echo "PASS: test 108" >>${LOGFILE} fi for i in 2 3 ; do - if test -f imported-file"$i" ; then + if test -f imported-f"$i" ; then echo "PASS: test 109-$i" >>${LOGFILE} else echo "FAIL: test 109-$i" | tee -a ${LOGFILE} ; exit 1 @@ -2572,7 +2637,7 @@ modify-on-br1 echo "FAIL: test 110" | tee -a ${LOGFILE} ; exit 1 fi - if test -f imported-file4 ; then + if test -f imported-f4 ; then echo "PASS: test 111" >>${LOGFILE} else echo "FAIL: test 111" | tee -a ${LOGFILE} ; exit 1 @@ -2589,36 +2654,36 @@ modify-on-br1 dotest import-113 \ "${testcvs} -q co -jjunk-1_0 -jjunk-2_0 first-dir" \ -"${PROG}"' [a-z]*: file first-dir/imported-file1 is present in revision junk-2_0 -RCS file: /tmp/cvs-sanity/cvsroot/first-dir/imported-file2,v +"${PROG}"' [a-z]*: file first-dir/imported-f1 is present in revision junk-2_0 +RCS file: /tmp/cvs-sanity/cvsroot/first-dir/imported-f2,v retrieving revision 1\.1\.1\.1 retrieving revision 1\.1\.1\.2 -Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-file2 +Merging differences between 1\.1\.1\.1 and 1\.1\.1\.2 into imported-f2 rcsmerge: warning: conflicts during merge' cd first-dir - if test -f imported-file1 ; then + if test -f imported-f1 ; then echo "FAIL: test 114" | tee -a ${LOGFILE} ; exit 1 else echo "PASS: test 114" >>${LOGFILE} fi for i in 2 3 ; do - if test -f imported-file"$i" ; then + if test -f imported-f"$i" ; then echo "PASS: test 115-$i" >>${LOGFILE} else echo "FAIL: test 115-$i" | tee -a ${LOGFILE} ; exit 1 fi done - dotest import-116 'cat imported-file2' \ + dotest import-116 'cat imported-f2' \ 'imported file2 -[<]<<<<<< imported-file2 -import should not expand \$''Id: imported-file2,v 1\.2 [0-9/]* [0-9:]* [a-z0-9@][a-z0-9@]* Exp \$ +[<]<<<<<< imported-f2 +import should not expand \$''Id: imported-f2,v 1\.2 [0-9/]* [0-9:]* [a-z0-9@][a-z0-9@]* Exp \$ local-change [=]====== -import should not expand \$''Id: imported-file2,v 1\.1\.1\.2 [0-9/]* [0-9:]* [a-z0-9@][a-z0-9@]* Exp \$ +import should not expand \$''Id: imported-f2,v 1\.1\.1\.2 [0-9/]* [0-9:]* [a-z0-9@][a-z0-9@]* Exp \$ rev 2 of file 2 [>]>>>>>> 1\.1\.1\.2' @@ -3189,6 +3254,15 @@ add a line' '"${PROG}"' \[[a-z]* aborted\]: correct above errors first!' mkdir dir1 mkdir sdir + dotest conflicts-status-0 "${testcvs} status a" \ +"=================================================================== +File: a Status: Needs Merge + + Working revision: 1\.1.* + Repository revision: 1\.2 /tmp/cvs-sanity/cvsroot/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" dotest conflicts-130 "${testcvs} -q update" \ 'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/a,v retrieving revision 1\.1 @@ -3210,22 +3284,58 @@ rcsmerge: warning: conflicts during merge C a' rmdir dir1 sdir + dotest conflicts-status-1 "${testcvs} status a" \ +"=================================================================== +File: a Status: File had conflicts on merge + + Working revision: 1\.2.* + Repository revision: 1\.2 /tmp/cvs-sanity/cvsroot/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" dotest_fail conflicts-131 "${testcvs} -q ci -m try" \ "${PROG} [a-z]*: file .a. had a conflict and has not been modified ${PROG} \[[a-z]* aborted\]: correct above errors first!" echo lame attempt at resolving it >>a # Try to check in the file with the conflict markers in it. + dotest conflicts-status-2 "${testcvs} status a" \ +"=================================================================== +File: a Status: File had conflicts on merge + + Working revision: 1\.2.* + Repository revision: 1\.2 /tmp/cvs-sanity/cvsroot/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" dotest_fail conflicts-132 "${testcvs} -q ci -m try" \ "${PROG} [a-z]*: file .a. still contains conflict indicators ${PROG} \[[a-z]* aborted\]: correct above errors first!" echo resolve conflict >a + dotest conflicts-status-3 "${testcvs} status a" \ +"=================================================================== +File: a Status: File had conflicts on merge + + Working revision: 1\.2.* + Repository revision: 1\.2 /tmp/cvs-sanity/cvsroot/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" dotest conflicts-133 "${testcvs} -q ci -m resolved" \ "Checking in a; /tmp/cvs-sanity/cvsroot/first-dir/a,v <-- a new revision: 1\.3; previous revision: 1\.2 done" + dotest conflicts-status-4 "${testcvs} status a" \ +"=================================================================== +File: a Status: Up-to-date + + Working revision: 1\.3.* + Repository revision: 1\.3 /tmp/cvs-sanity/cvsroot/first-dir/a,v + Sticky Tag: (none) + Sticky Date: (none) + Sticky Options: (none)" # Now test that we can add a file in one working directory # and have an update in another get it. @@ -3777,6 +3887,56 @@ ${PROG} \[[a-z]* aborted\]: cannot expand modules" rm -rf ${CVSROOT_DIRNAME}/second-dir ;; + modules3) + # More tests of modules, in particular what happens if several + # modules point to the same file. + + # First just set up a directory first-dir and a file file1 in it. + mkdir 1; cd 1 + + dotest modules3-0 "${testcvs} -q co -l ." '' + mkdir first-dir + dotest modules3-1 "${testcvs} add first-dir" \ +"Directory /tmp/cvs-sanity/cvsroot/first-dir added to the repository" + + cd first-dir + echo file1 >file1 + dotest modules3-2 "${testcvs} add file1" \ +"${PROG}"' [a-z]*: scheduling file `file1'\'' for addition +'"${PROG}"' [a-z]*: use '\''cvs commit'\'' to add this file permanently' + dotest modules3-3 "${testcvs} -q ci -m add-it" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +done +Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done' + cd .. + + dotest modules3-4 "${testcvs} -q co CVSROOT/modules" \ +'U CVSROOT/modules' + cd CVSROOT + cat >modules <>${LOGFILE}; then pass binwrap-1 @@ -4854,7 +5075,7 @@ access list:' log_header2='keyword substitution: kv' log_dash='---------------------------- revision' - log_date='date: [0-9/]* [0-9:]*; author: [a-zA-Z0-9@]*; state: Exp;' + log_date="date: [0-9/]* [0-9:]*; author: ${username}; state: Exp;" log_lines=" lines: ${PLUS}1 -1" log_rev1="${log_dash} 1\.1 ${log_date} @@ -5041,7 +5262,7 @@ description: file1-is-for-testing ---------------------------- revision 1\.1 -date: [0-9/]* [0-9:]*; author: [a-zA-Z0-9@]*; state: Exp; +date: [0-9/]* [0-9:]*; author: '"${username}"'; state: Exp; 1 =============================================================================' @@ -5055,7 +5276,9 @@ date: [0-9/]* [0-9:]*; author: [a-zA-Z0-9@]*; state: Exp; # Various tests relating to creating repositories, operating # on repositories created with old versions of CVS, etc. - # At the moment local only but that should be changed. + # Because this test is all about -d options and such, it + # at least to some extent needs to be different for remote vs. + # local. if test "x$remote" = "xno"; then # First, if the repository doesn't exist at all... @@ -5092,17 +5315,53 @@ ${testcvs} -d ${TESTDIR}/crerepos release -d CVSROOT >>${LOGFILE}; then fi rm -rf CVS cd .. - # The directory tmp should be empty dotest crerepos-6 "rmdir tmp" '' - # CVS better not create a history file--if the administrator - # doesn't need it and wants to save on disk space, they just - # delete it. - dotest_fail crerepos-7 \ -"test -f ${TESTDIR}/crerepos/CVSROOT/history" '' + else + # For remote, just create the repository. We don't yet do + # the various other tests above for remote but that should be + # changed. + mkdir crerepos + mkdir crerepos/CVSROOT + fi + + if test "x$remote" = "xno"; then + # Test that CVS rejects a relative path in CVSROOT. + mkdir 1; cd 1 + dotest_fail crerepos-6a "${testcvs} -q -d ../crerepos get ." \ +"${PROG} \[[a-z]* aborted\]: CVSROOT ../crerepos must be an absolute pathname" + cd .. + rm -rf 1 + mkdir 1; cd 1 + dotest_fail crerepos-6b "${testcvs} -d crerepos init" \ +"${PROG} \[[a-z]* aborted\]: CVSROOT crerepos must be an absolute pathname" + cd .. + rm -rf 1 + else # remote + # Test that CVS rejects a relative path in CVSROOT. + mkdir 1; cd 1 + dotest_fail crerepos-6a \ +"${testcvs} -q -d :ext:`hostname`:../crerepos get ." \ +"Root ../crerepos must be an absolute pathname" + cd .. + rm -rf 1 + + mkdir 1; cd 1 + dotest_fail crerepos-6b \ +"${testcvs} -d :ext:`hostname`:crerepos init" \ +"Root crerepos must be an absolute pathname" + cd .. + rm -rf 1 fi # end of tests to be skipped for remote + + # CVS better not create a history file--if the administrator + # doesn't need it and wants to save on disk space, they just + # delete it. + dotest_fail crerepos-7 \ +"test -f ${TESTDIR}/crerepos/CVSROOT/history" '' + ;; rcs) @@ -5280,6 +5539,171 @@ add file1 rm -rf first-dir ${CVSROOT_DIRNAME}/first-dir ${TESTDIR}/rcs4.tmp ;; + big) + + # Test ability to operate on big files. Intention is to + # test various realloc'ing code in RCS_deltas, rcsgetkey, + # etc. "big" is currently defined to be 1000 lines (64000 + # bytes), which in terms of files that users will use is not + # large, merely average, but my reasoning is that this + # should be big enough to make sure realloc'ing is going on + # and that raising it a lot would start to stress resources + # on machines which run the tests, without any significant + # benefit. + + mkdir ${CVSROOT_DIRNAME}/first-dir + dotest big-1 "${testcvs} -q co first-dir" '' + cd first-dir + for i in 0 1 2 3 4 5 6 7 8 9; do + for j in 0 1 2 3 4 5 6 7 8 9; do + for k in 0 1 2 3 4 5 6 7 8 9; do + echo \ +"This is line ($i,$j,$k) which goes into the file file1 for testing" >>file1 + done + done + done + dotest big-2 "${testcvs} add file1" \ +"${PROG} [a-z]*: scheduling file .file1. for addition +${PROG} [a-z]*: use .cvs commit. to add this file permanently" + dotest big-3 "${testcvs} -q ci -m add" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/file1,v +done +Checking in file1; +/tmp/cvs-sanity/cvsroot/first-dir/file1,v <-- file1 +initial revision: 1\.1 +done' + cd .. + rm -rf first-dir + dotest big-4 "${testcvs} -q get first-dir" "U first-dir/file1" + + if test "$keep" = yes; then + echo Keeping /tmp/cvs-sanity and exiting due to --keep + exit 0 + fi + + rm -rf first-dir + rm -rf ${CVSROOT_DIRNAME}/first-dir + ;; + + modes) + # Test repository permissions (CVSUMASK and so on). + # Although the tests in this section "cheat" by testing + # repository permissions, which are sort of not a user-visible + # sort of thing, the modes do have user-visible consequences, + # such as whether a second user can check out the files. But + # it would be awkward to test the consequences, so we don't. + + export -n CVSUMASK # if unset, defaults to 002 + umask 077 + mkdir 1; cd 1 + dotest modes-1 "${testcvs} -q co -l ." '' + mkdir first-dir + dotest modes-2 "${testcvs} add first-dir" \ +"Directory /tmp/cvs-sanity/cvsroot/first-dir added to the repository" + cd first-dir + touch aa + dotest modes-3 "${testcvs} add aa" \ +"${PROG} [a-z]*: scheduling file .aa. for addition +${PROG} [a-z]*: use .cvs commit. to add this file permanently" + dotest modes-4 "${testcvs} -q ci -m add" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/aa,v +done +Checking in aa; +/tmp/cvs-sanity/cvsroot/first-dir/aa,v <-- aa +initial revision: 1\.1 +done' + dotest modes-5 "ls -l /tmp/cvs-sanity/cvsroot/first-dir/aa,v" \ +"-r--r--r-- .*" + + # Test for whether we can set the execute bit. + chmod +x aa + echo change it >>aa + dotest modes-6 "${testcvs} -q ci -m set-execute-bit" \ +'Checking in aa; +/tmp/cvs-sanity/cvsroot/first-dir/aa,v <-- aa +new revision: 1\.2; previous revision: 1\.1 +done' + # If CVS let us update the execute bit, it would be set here. + # But it doesn't, and as far as I know that is longstanding + # CVS behavior. + dotest modes-7 "ls -l /tmp/cvs-sanity/cvsroot/first-dir/aa,v" \ +"-r--r--r-- .*" + + # OK, now manually change the modes and see what happens. + chmod g=r,o= /tmp/cvs-sanity/cvsroot/first-dir/aa,v + echo second line >>aa + dotest modes-7a "${testcvs} -q ci -m set-execute-bit" \ +"Checking in aa; +${TESTDIR}/cvsroot/first-dir/aa,v <-- aa +new revision: 1\.3; previous revision: 1\.2 +done" + dotest modes-7b "ls -l /tmp/cvs-sanity/cvsroot/first-dir/aa,v" \ +"-r--r----- .*" + + CVSUMASK=007 + export CVSUMASK + touch ab + # Might as well test the execute bit too. + chmod +x ab + dotest modes-8 "${testcvs} add ab" \ +"${PROG} [a-z]*: scheduling file .ab. for addition +${PROG} [a-z]*: use .cvs commit. to add this file permanently" + dotest modes-9 "${testcvs} -q ci -m add" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/ab,v +done +Checking in ab; +/tmp/cvs-sanity/cvsroot/first-dir/ab,v <-- ab +initial revision: 1\.1 +done' + if test "x$remote" = xyes; then + # The problem here is that the CVSUMASK environment variable + # needs to be set on the server (e.g. .bashrc). This is, of + # course, bogus, but that is the way it is currently. + dotest modes-10 "ls -l /tmp/cvs-sanity/cvsroot/first-dir/ab,v" \ +"-r-xr-x---.*" "-r-xr-xr-x.*" + else + dotest modes-10 "ls -l /tmp/cvs-sanity/cvsroot/first-dir/ab,v" \ +"-r-xr-x---.*" + fi + + # OK, now add a file on a branch. Check that the mode gets + # set the same way (it is a different code path in CVS). + dotest modes-11 "${testcvs} -q tag -b br" 'T aa +T ab' + dotest modes-12 "${testcvs} -q update -r br" '' + touch ac + dotest modes-13 "${testcvs} add ac" \ +"${PROG} [a-z]*: scheduling file .ac. for addition on branch .br. +${PROG} [a-z]*: use .cvs commit. to add this file permanently" + # Not sure it really makes sense to refer to a "previous revision" + # when we are just now adding the file; as far as I know + # that is longstanding CVS behavior, for what it's worth. + dotest modes-14 "${testcvs} -q ci -m add" \ +'RCS file: /tmp/cvs-sanity/cvsroot/first-dir/Attic/ac,v +done +Checking in ac; +/tmp/cvs-sanity/cvsroot/first-dir/Attic/ac,v <-- ac +new revision: 1\.1\.2\.1; previous revision: 1\.1 +done' + if test "x$remote" = xyes; then + # The problem here is that the CVSUMASK environment variable + # needs to be set on the server (e.g. .bashrc). This is, of + # course, bogus, but that is the way it is currently. + dotest modes-15 \ +"ls -l /tmp/cvs-sanity/cvsroot/first-dir/Attic/ac,v" \ +"-r--r--r--.*" + else + dotest modes-15 \ +"ls -l /tmp/cvs-sanity/cvsroot/first-dir/Attic/ac,v" \ +"-r--r-----.*" + fi + + cd ../.. + rm -rf 1 ${TESTDIR}/first-dir + # Perhaps should restore the umask and CVSUMASK. But the other + # tests "should" not care about them... + ;; + *) echo $what is not the name of a test -- ignored ;; diff --git a/gnu/usr.bin/cvs/src/status.c b/gnu/usr.bin/cvs/src/status.c index 7254b1cfb2c..b794a2e43ab 100644 --- a/gnu/usr.bin/cvs/src/status.c +++ b/gnu/usr.bin/cvs/src/status.c @@ -79,7 +79,7 @@ status (argc, argv) send_file_names (argc, argv, SEND_EXPAND_WILD); /* XXX This should only need to send file info; the file contents themselves will not be examined. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("status\012", 0); err = get_responses_and_close (); @@ -127,6 +127,9 @@ status_fileproc (callerdat, finfo) break; #endif case T_CONFLICT: + /* I _think_ that "unresolved" is correct; that if it has + been resolved then the status will change. But I'm not + sure about that. */ sstat = "Unresolved Conflict"; break; case T_ADDED: @@ -137,7 +140,7 @@ status_fileproc (callerdat, finfo) break; case T_MODIFIED: if (vers->ts_conflict) - sstat = "Unresolved Conflict"; + sstat = "File had conflicts on merge"; else sstat = "Locally Modified"; break; diff --git a/gnu/usr.bin/cvs/src/subr.c b/gnu/usr.bin/cvs/src/subr.c index fbf184deb2e..71d8ef8f3a1 100644 --- a/gnu/usr.bin/cvs/src/subr.c +++ b/gnu/usr.bin/cvs/src/subr.c @@ -56,6 +56,43 @@ xrealloc (ptr, bytes) return (cp); } +/* Two constants which tune expand_string. Having MIN_INCR as large + as 1024 might waste a bit of memory, but it shouldn't be too bad + (CVS used to allocate arrays of, say, 3000, PATH_MAX (8192, often), + or other such sizes). Probably anything which is going to allocate + memory which is likely to get as big as MAX_INCR shouldn't be doing + it in one block which must be contiguous, but since getrcskey does + so, we might as well limit the wasted memory to MAX_INCR or so + bytes. */ + +#define MIN_INCR 1024 +#define MAX_INCR (2*1024*1024) + +/* *STRPTR is a pointer returned from malloc (or NULL), pointing to *N + characters of space. Reallocate it so that points to at least + NEWSIZE bytes of space. Gives a fatal error if out of memory; + if it returns it was successful. */ +void +expand_string (strptr, n, newsize) + char **strptr; + size_t *n; + size_t newsize; +{ + if (*n < newsize) + { + while (*n < newsize) + { + if (*n < MIN_INCR) + *n += MIN_INCR; + else if (*n > MAX_INCR) + *n += MAX_INCR; + else + *n *= 2; + } + *strptr = xrealloc (*strptr, *n); + } +} + /* * Duplicate a string, calling xmalloc to allocate some dynamic space */ @@ -85,7 +122,7 @@ strip_trailing_newlines (str) } /* - * Recover the space allocated by Find_Names() and line2argv() + * Recover the space allocated by line2argv() */ void free_names (pargc, argv) @@ -98,26 +135,40 @@ free_names (pargc, argv) { /* only do through *pargc */ free (argv[i]); } + free (argv); *pargc = 0; /* and set it to zero when done */ } -/* - * Convert a line into argc/argv components and return the result in the - * arguments as passed. Use free_names() to return the memory allocated here - * back to the free pool. - */ +/* Convert LINE into arguments separated by space and tab. Set *ARGC + to the number of arguments found, and (*ARGV)[0] to the first argument, + (*ARGV)[1] to the second, etc. *ARGV is malloc'd and so are each of + (*ARGV)[0], (*ARGV)[1], ... Use free_names() to return the memory + allocated here back to the free pool. */ void line2argv (pargc, argv, line) int *pargc; - char **argv; + char ***argv; char *line; { char *cp; + /* Could make a case for size_t or some other unsigned type, but + we'll stick with int to avoid signed/unsigned warnings when + comparing with *pargc. */ + int argv_allocated; + + /* Small for testing. */ + argv_allocated = 1; + *argv = (char **) xmalloc (argv_allocated * sizeof (**argv)); *pargc = 0; for (cp = strtok (line, " \t"); cp; cp = strtok ((char *) NULL, " \t")) { - argv[*pargc] = xstrdup (cp); + if (*pargc == argv_allocated) + { + argv_allocated *= 2; + *argv = xrealloc (*argv, argv_allocated * sizeof (**argv)); + } + (*argv)[*pargc] = xstrdup (cp); (*pargc)++; } } @@ -193,9 +244,10 @@ gca (rev1, rev2) char *rev2; { int dots; - char gca[PATH_MAX]; + char *gca; char *p[2]; int j[2]; + char *retval; if (rev1 == NULL || rev2 == NULL) { @@ -203,6 +255,11 @@ gca (rev1, rev2) abort(); } + /* The greatest common ancestor will have no more dots, and numbers + of digits for each component no greater than the arguments. Therefore + this string will be big enough. */ + gca = xmalloc (strlen (rev1) + strlen (rev2) + 100); + /* walk the strings, reading the common parts. */ gca[0] = '\0'; p[0] = rev1; @@ -290,7 +347,9 @@ gca (rev1, rev2) *s = '\0'; } - return (xstrdup (gca)); + retval = xstrdup (gca); + free (gca); + return retval; } /* diff --git a/gnu/usr.bin/cvs/src/tag.c b/gnu/usr.bin/cvs/src/tag.c index b09979e7d00..cee7aecbbe8 100644 --- a/gnu/usr.bin/cvs/src/tag.c +++ b/gnu/usr.bin/cvs/src/tag.c @@ -156,6 +156,8 @@ cvstag (argc, argv) ign_setup (); + if (!force_tag_match) + send_arg ("-f"); if (local) send_arg("-l"); if (delete_flag) @@ -178,7 +180,7 @@ cvstag (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("tag\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/version.c b/gnu/usr.bin/cvs/src/version.c index 26d1bd05fc0..f09017c3174 100644 --- a/gnu/usr.bin/cvs/src/version.c +++ b/gnu/usr.bin/cvs/src/version.c @@ -12,7 +12,7 @@ #include "cvs.h" -char *version_string = "\nConcurrent Versions System (CVS) 1.9.2"; +char *version_string = "\nConcurrent Versions System (CVS) 1.9.4"; #ifdef CLIENT_SUPPORT #ifdef SERVER_SUPPORT diff --git a/gnu/usr.bin/cvs/src/watch.c b/gnu/usr.bin/cvs/src/watch.c index 4fedda29c69..51b50fcd10e 100644 --- a/gnu/usr.bin/cvs/src/watch.c +++ b/gnu/usr.bin/cvs/src/watch.c @@ -336,7 +336,7 @@ watch_addremove (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server (the_args.adding ? "watch-add\012" : "watch-remove\012", 0); @@ -511,7 +511,7 @@ watchers (argc, argv) /* FIXME: We shouldn't have to send current files, but I'm not sure whether it works. So send the files -- it's slower but it works. */ - send_files (argc, argv, local, 0, 0); + send_files (argc, argv, local, 0, 0, 0); send_to_server ("watchers\012", 0); return get_responses_and_close (); } diff --git a/gnu/usr.bin/cvs/src/wrapper.c b/gnu/usr.bin/cvs/src/wrapper.c index 324f7cc7904..6a7cea4af10 100644 --- a/gnu/usr.bin/cvs/src/wrapper.c +++ b/gnu/usr.bin/cvs/src/wrapper.c @@ -1,4 +1,15 @@ +/* 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 + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program 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. */ + #include "cvs.h" +#include "getline.h" /* Original Author: athan@morgan.com 2/1/94 @@ -68,13 +79,18 @@ void wrap_restore_saved PROTO((void)); void wrap_setup() { - char file[PATH_MAX]; struct passwd *pw; #ifdef CLIENT_SUPPORT if (!client_active) #endif { + char *file; + + file = xmalloc (strlen (CVSroot_directory) + + sizeof (CVSROOTADM) + + sizeof (CVSROOTADM_WRAPPER) + + 10); /* Then add entries found in repository, if it exists. */ (void) sprintf (file, "%s/%s/%s", CVSroot_directory, CVSROOTADM, CVSROOTADM_WRAPPER); @@ -82,6 +98,7 @@ void wrap_setup() { wrap_add_file(file,0); } + free (file); } /* Then add entries found in home dir, (if user has one) and file @@ -89,11 +106,15 @@ void wrap_setup() get_homedir, i.e. $HOME). */ if ((pw = (struct passwd *) getpwuid (getuid ())) && pw->pw_dir) { + char *file; + + file = xmalloc (strlen (pw->pw_dir) + sizeof (CVSDOTWRAPPER) + 10); (void) sprintf (file, "%s/%s", pw->pw_dir, CVSDOTWRAPPER); if (isfile (file)) { wrap_add_file (file, 0); } + free (file); } /* Then add entries found in CVSWRAPPERS environment variable. */ @@ -144,17 +165,26 @@ wrap_add_file (file, temp) int temp; { FILE *fp; - char line[1024]; + char *line = NULL; + size_t line_allocated = 0; - wrap_restore_saved(); - wrap_kill_temp(); + wrap_restore_saved (); + wrap_kill_temp (); - /* load the file */ - if (!(fp = CVS_FOPEN (file, "r"))) + /* Load the file. */ + fp = CVS_FOPEN (file, "r"); + if (fp == NULL) + { + if (!existence_error (errno)) + error (0, errno, "cannot open %s", file); return; - while (fgets (line, sizeof (line), fp)) + } + while (getline (&line, &line_allocated, fp) >= 0) wrap_add (line, temp); - (void) fclose (fp); + if (ferror (fp)) + error (0, errno, "cannot read %s", file); + if (fclose (fp) == EOF) + error (0, errno, "cannot close %s", file); } void @@ -449,17 +479,16 @@ wrap_merge_is_copy (fileName) return 1; } -char * +void wrap_fromcvs_process_file(fileName) const char *fileName; { WrapperEntry *e=wrap_matching_entry(fileName); - static char buf[PATH_MAX]; if(e==NULL || e->fromcvsFilter==NULL) - return NULL; + return; run_setup(e->fromcvsFilter,fileName); run_exec(RUN_TTY, RUN_TTY, RUN_TTY, RUN_NORMAL ); - return buf; + return; } diff --git a/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in b/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in index f2387587218..9e6d9cec152 100644 --- a/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in +++ b/gnu/usr.bin/cvs/tools/pcl-cvs/Makefile.in @@ -4,7 +4,7 @@ # #ident "@(#)original: dist-makefile,v 1.19 1993/05/31 22:43:45 ceder Exp " # -#ident "@(#)elisp/pcl-cvs:$Name: $:$Id: Makefile.in,v 1.1.1.2 1997/02/21 06:38:25 tholo Exp $" +#ident "@(#)elisp/pcl-cvs:$Name: $:$Id: Makefile.in,v 1.1.1.3 1997/03/18 01:57:02 tholo Exp $" # # Makefile for pcl-cvs release 1.05-CVS-$Name: $. # Copyright (C) 1992, 1993 Per Cederqvist diff --git a/gnu/usr.bin/cvs/vms/ChangeLog b/gnu/usr.bin/cvs/vms/ChangeLog index bd4239d81ff..730bcf18697 100644 --- a/gnu/usr.bin/cvs/vms/ChangeLog +++ b/gnu/usr.bin/cvs/vms/ChangeLog @@ -1,3 +1,16 @@ +Wed Mar 12 16:10:01 1997 Jim Kingdon + + * config.h (HAVE_SETVBUF): Removed; no longer used. + +Wed Jan 29 18:27:41 1997 Jim Kingdon + + * options.h (GREP): Remove; no longer used. + +Tue Jan 28 18:29:03 1997 Jim Kingdon + + * config.h: Remove SIZEOF_INT and SIZEOF_LONG; no longer needed + with lib/md5.c changes. + Thu Jan 2 13:30:56 1997 Jim Kingdon * dir.h, filesubr.c, filutils.c, filutils.h, misc.c, misc.h, diff --git a/gnu/usr.bin/cvs/vms/config.h b/gnu/usr.bin/cvs/vms/config.h index d115228e309..4cb79eaba0a 100644 --- a/gnu/usr.bin/cvs/vms/config.h +++ b/gnu/usr.bin/cvs/vms/config.h @@ -89,12 +89,6 @@ /* Define if you have MIT Kerberos version 4 available. */ /* #undef HAVE_KERBEROS */ -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - /* Define if you have the fchmod function. */ /* #undef HAVE_FCHMOD */ @@ -131,9 +125,6 @@ /* Define if you have the putenv function. */ /* #undef HAVE_PUTENV */ -/* Define if you have the setvbuf function. */ -/* #undef HAVE_SETVBUF */ - /* Define if you have the timezone function. */ /* #undef HAVE_TIMEZONE */ diff --git a/gnu/usr.bin/cvs/vms/options.h b/gnu/usr.bin/cvs/vms/options.h index 264bfe146b5..a53091e0aeb 100644 --- a/gnu/usr.bin/cvs/vms/options.h +++ b/gnu/usr.bin/cvs/vms/options.h @@ -54,17 +54,6 @@ #define DIFF "/usr/local/bin/diff -a" #endif -/* - * The "grep" program to execute when checking to see if a merged file had - * any conflicts. This "grep" must support a standard basic - * regular expression as an argument. Specify a full pathname if your site - * wants to use a particular grep. - */ - -#ifndef GREP -#define GREP "grep" -#endif - /* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site diff --git a/gnu/usr.bin/cvs/windows-NT/ChangeLog b/gnu/usr.bin/cvs/windows-NT/ChangeLog index c902c92c76f..3ec249be90d 100644 --- a/gnu/usr.bin/cvs/windows-NT/ChangeLog +++ b/gnu/usr.bin/cvs/windows-NT/ChangeLog @@ -1,3 +1,36 @@ +13 Mar 1997 Jim Kingdon + + * filesubr.c (get_homedir): Allocate pathbuf; removes arbitrary + limit. + +Wed Mar 12 16:10:01 1997 Jim Kingdon + + * filesubr.c (get_homedir): Expand comment about HOME + vs. HOMEDRIVE/HOMEPATH. + + * config.h (HAVE_SETVBUF): Removed; no longer used. + +Thu Mar 6 19:46:53 1997 Jim Kingdon + + * README: tab stop setting apparently was under "Editor" in Visual + C++ 2.x but it is under "Tabs" in Visual C++ 4.x. + List number of warnings for regex.c (103, which is actually down + from 121 prior to the change I just made to regex.c). + +Sat Feb 15 15:27:39 1997 Jim Kingdon + + * Makefile.in (dist-dir): Also handle SUBDIRS. + (SUBDIRS): New variable. + +Wed Jan 29 18:28:17 1997 Jim Kingdon + + * config.h, options.h (GREP): Remove; no longer used. + +Tue Jan 28 18:29:03 1997 Jim Kingdon + + * config.h: Remove SIZEOF_INT and SIZEOF_LONG; no longer needed + with lib/md5.c changes. + 1997-01-08 Jim Kingdon * filesubr.c (expand_wild): If we just find a file (that diff --git a/gnu/usr.bin/cvs/windows-NT/Makefile.in b/gnu/usr.bin/cvs/windows-NT/Makefile.in index 76d7760c59f..1798db912ee 100644 --- a/gnu/usr.bin/cvs/windows-NT/Makefile.in +++ b/gnu/usr.bin/cvs/windows-NT/Makefile.in @@ -33,6 +33,8 @@ SOURCES = \ DISTFILES = ${HEADERS} ${SOURCES} \ README ChangeLog Makefile.in .cvsignore +SUBDIRS=SCC + all: .PHONY: all install uninstall @@ -63,6 +65,9 @@ dist-dir: for i in ${DISTFILES}; do \ ln $(srcdir)/$${i} ${DISTDIR}; \ done + for i in ${SUBDIRS}; do \ + cd $${i}; ${MAKE} dist-dir DISTDIR="../${DISTDIR}/$${i}"; \ + done clean: @echo make clean does nothing in windows-NT subdir diff --git a/gnu/usr.bin/cvs/windows-NT/README b/gnu/usr.bin/cvs/windows-NT/README index b86a28601d4..f4115e9f7d2 100644 --- a/gnu/usr.bin/cvs/windows-NT/README +++ b/gnu/usr.bin/cvs/windows-NT/README @@ -77,17 +77,19 @@ Here are some other things which may be of interest for unix junkies: http://www.halcyon.com/gvr/vim/ (VI clone) ftp://wuarchive.wustl.edu/systems/ibmpc/gnuish/less177.zip +If you want to browse/edit the sources using Visual C++, we recommend +setting tab stops to 8 spaces, since that is what the CVS sources +expect. The tab stop setting is in the "Editor" or "Tabs" section of +the "Options..." dialog which is in the "Tools..." menu. + The following harmless warnings are known: -- regex.c: These are signed/unsigned comparison conflicts. I am not - going to *touch* this code. :-) I got my fill of it when I was +- regex.c: 103 warnings, mostly signed/unsigned comparison conflicts. + I am not going to *touch* this code. :-) I got my fill of it when I was hacking GNU Emacs. + .\lib\getdate.c(760) : warning C4013: 'getdate_yyparse' undefined; assuming extern returning int .\lib\getdate.c(1612) : warning C4102: 'yyerrlab' : unreferenced label .\lib\getdate.c(1612) : warning C4102: 'yynewstate' : unreferenced label -If you want to browse/edit the sources using Visual C++, we recommend -setting tab stops to 8 spaces, since that is what the CVS sources -expect. The tab stop setting is in the "Editor" section of the "Options..." -dialog which is in the "Tools..." menu. diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/.cvsignore b/gnu/usr.bin/cvs/windows-NT/SCC/.cvsignore new file mode 100644 index 00000000000..fa65c0961ea --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/.cvsignore @@ -0,0 +1,3 @@ +SCC.mdp +SCC.ncb +Debug diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog b/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog new file mode 100644 index 00000000000..5b3ca835f1e --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/ChangeLog @@ -0,0 +1,52 @@ +14 Mar 1997 Jim Kingdon + + * scc.c: Go back to using debuglog not outproc for + most debugging messages. Developer Studio tends to + erase the outproc messages on an error. + More playing around with projects. + * README.txt: Describe results of this. I am making + grey (source controlled) file icons appear, which is + exciting. + +4 Mar 1997 Jim Kingdon + + Still some distance from being able to open a + project, but that's what I'm playing with: + * scc.c (SccOpenProject): Use outproc not debuglog + for debugging messages. + (SccGet): Add debugging messages. + (SccAddFromScc): Implemented. + (SccInitialize): Return AddFromScc in capabilities. + * scc.c: Change out_proc to outproc for consistency. + +2 Mar 1997 Jim Kingdon + + * scc.c: Add a bunch of things, to SccOpenProject, + SccGetProjPath, and perhaps elsewhere. The project + stuff doesn't really work yet, but the outproc does. + +27 Feb 1997 Jim Kingdon + + * scc.c (SCC_max_init_path, SCC_max_name): Added. + (SccInitialize): Set and use more arguments. + (SccUninitialize): Might want to check ferror here. + (SccOpenProject): Print to debug log if we get here. + +Thu Feb 27 19:02:50 1997 Jim Kingdon + + * README.txt (TOOLS IMPLEMENTING THE SCC): New section. + +Wed Feb 26 22:55:43 1997 David H. Hovemeyer + and Jim Kingdon + + * scc.c (SccGetVersion): Return the version number of the SCC + spec; we don't get to pick what to return here. + * README.txt: Update with current status. + +Sat Feb 15 15:19:41 1997 Jim Kingdon + + * Makefile.in: New file. + + * README.txt: Clarify a little more what this stuff does (and more + the point, does not) do. + diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/Makefile.in b/gnu/usr.bin/cvs/windows-NT/SCC/Makefile.in new file mode 100644 index 00000000000..9b1f59428a1 --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/Makefile.in @@ -0,0 +1,39 @@ +# Makefile for distributing files. Note that it only has a dist-dir +# target, so other targets should not recurse into this directory. +# This makefile is in the public domain. + +#### Start of system configuration section. #### + +srcdir = @srcdir@ +top_srcdir = @top_srcdir@ +VPATH = @srcdir@ + +# Just in case... +SHELL = /bin/sh +@SET_MAKE@ + +DISTFILES = \ + .cvsignore ChangeLog Makefile.in README.txt \ + SCC.mak scc.c scc.def + +all: +.PHONY: all + +dist-dir: ${DISTFILES} + mkdir ${DISTDIR} + for i in ${DISTFILES}; do \ + ln $(srcdir)/$${i} ${DISTDIR}; \ + done +.PHONY: dist-dir + +subdir = windows-NT/SCC +Makefile: ../../config.status Makefile.in + cd ../.. && CONFIG_FILES=$(subdir)/$@ CONFIG_HEADERS= ./config.status + +# CYGNUS LOCAL: don't depend on auto-re-config +#../config.status: ../configure +# cd .. ; $(SHELL) config.status --recheck + +# CYGNUS LOCAL: don't depend on auto-re-config +#../configure: ../configure.in +# cd $(top_srcdir) ; autoconf diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/README.txt b/gnu/usr.bin/cvs/windows-NT/SCC/README.txt new file mode 100644 index 00000000000..bc8cc76c6c3 --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/README.txt @@ -0,0 +1,66 @@ +This is an experimental attempt to interface to the SCC API. + +Note that this code doesn't (yet) do anything useful; this file +is currently for people who want to help hack on our SCC interface, +not people who want to use it. + +To install it, build scc.dll and then add the following +to the registry using the registry editor: + +key/value what to put there +HKEY_LOCAL_MACHINE + SOFTWARE + CVS + CVS + SCCServerName Concurrent Versions System + SCCServerPath + SourceCodeControlProvider + ProviderRegKey "SOFTWARE\CVS\CVS" + InstalledSCCProviders + Concurrent Versions System "SOFTWARE\CVS\CVS" + +Note that ProviderRegKey is the default source control +system, and InstalledSCCProviders list _all_ installed +source control systems. A development environment is allowed +to use either or both, so you should set both of them. + +Note also that we are using "CVS" as the supplier of CVS. +CVS is not owned by any one company, so CVS seems like the +most appropriate string to put there. + +If you do this right, then "Source Control" should appear +under the "Tools" menu. + +NOW WHAT? + +Well, I haven't yet figured out _all_ the different ways +that projects work at the SCC level. But here is what I +have done which has worked. SPECIAL NOTE: many paths are +hardcoded in scc.c, so you will need to fix that or put +things the same place I did. As you try the following you +will want to follow along in d:\debug.scc. + +* Create a dummy project in d:\sccwork. +* On the Tools/Source Control menu, select "Share from CVS..." +* This will cause SccAddFromScc to be called, which will + claim there are two files, foo.c and bar.c, which should + appear as source controlled (grey) files in the file + listing. +* Now select one of the files and pick "Get Latest Version..." + from Tools/Source Control. You'll get a cheezy dialog (we + need to see why it is cheezy--by that I mean the size and + placement are funny), and if you say OK, then SccGet will + get called (which doesn't currently do anything). + +TOOLS IMPLEMENTING THE SCC + +I'm not sure whether we'll want to try to make this a comprehensive +list, but at least for the moment it seems worthwhile to list a few of +the programs which implement the Integrated Development Environment +(IDE) side of the SCC. Some of this information is based on rumor or, +worse yet, usenet posting, so it probably should be verified before +relying on it. + +* Microsoft Developer Studio 4.x Professional (not Standard, not 2.x) +* Powersoft's Optima++ +* CodeWright editor diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/SCC.mak b/gnu/usr.bin/cvs/windows-NT/SCC/SCC.mak new file mode 100644 index 00000000000..ef4da647699 --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/SCC.mak @@ -0,0 +1,216 @@ +# Microsoft Developer Studio Generated NMAKE File, Format Version 40001 +# ** DO NOT EDIT ** + +# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102 + +!IF "$(CFG)" == "" +CFG=SCC - Win32 Debug +!MESSAGE No configuration specified. Defaulting to SCC - Win32 Debug. +!ENDIF + +!IF "$(CFG)" != "SCC - Win32 Release" && "$(CFG)" != "SCC - Win32 Debug" +!MESSAGE Invalid configuration "$(CFG)" specified. +!MESSAGE You can specify a configuration when running NMAKE on this makefile +!MESSAGE by defining the macro CFG on the command line. For example: +!MESSAGE +!MESSAGE NMAKE /f "SCC.mak" CFG="SCC - Win32 Debug" +!MESSAGE +!MESSAGE Possible choices for configuration are: +!MESSAGE +!MESSAGE "SCC - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE "SCC - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library") +!MESSAGE +!ERROR An invalid configuration is specified. +!ENDIF + +!IF "$(OS)" == "Windows_NT" +NULL= +!ELSE +NULL=nul +!ENDIF +################################################################################ +# Begin Project +# PROP Target_Last_Scanned "SCC - Win32 Debug" +CPP=cl.exe +RSC=rc.exe +MTL=mktyplib.exe + +!IF "$(CFG)" == "SCC - Win32 Release" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 0 +# PROP BASE Output_Dir "Release" +# PROP BASE Intermediate_Dir "Release" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 0 +# PROP Output_Dir "Release" +# PROP Intermediate_Dir "Release" +# PROP Target_Dir "" +OUTDIR=.\Release +INTDIR=.\Release + +ALL : "$(OUTDIR)\SCC.dll" + +CLEAN : + -@erase ".\Release\SCC.dll" + -@erase ".\Release\scc.obj" + -@erase ".\Release\SCC.lib" + -@erase ".\Release\SCC.exp" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /c +CPP_PROJ=/nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS"\ + /Fp"$(INTDIR)/SCC.pch" /YX /Fo"$(INTDIR)/" /c +CPP_OBJS=.\Release/ +CPP_SBRS= +# ADD BASE MTL /nologo /D "NDEBUG" /win32 +# ADD MTL /nologo /D "NDEBUG" /win32 +MTL_PROJ=/nologo /D "NDEBUG" /win32 +# ADD BASE RSC /l 0x409 /d "NDEBUG" +# ADD RSC /l 0x409 /d "NDEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/SCC.bsc" +BSC32_SBRS= +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /machine:I386 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ + /subsystem:windows /dll /incremental:no /pdb:"$(OUTDIR)/SCC.pdb" /machine:I386\ + /def:".\scc.def" /out:"$(OUTDIR)/SCC.dll" /implib:"$(OUTDIR)/SCC.lib" +DEF_FILE= \ + ".\scc.def" +LINK32_OBJS= \ + "$(INTDIR)/scc.obj" + +"$(OUTDIR)\SCC.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ELSEIF "$(CFG)" == "SCC - Win32 Debug" + +# PROP BASE Use_MFC 0 +# PROP BASE Use_Debug_Libraries 1 +# PROP BASE Output_Dir "Debug" +# PROP BASE Intermediate_Dir "Debug" +# PROP BASE Target_Dir "" +# PROP Use_MFC 0 +# PROP Use_Debug_Libraries 1 +# PROP Output_Dir "Debug" +# PROP Intermediate_Dir "Debug" +# PROP Target_Dir "" +OUTDIR=.\Debug +INTDIR=.\Debug + +ALL : "$(OUTDIR)\SCC.dll" + +CLEAN : + -@erase ".\Debug\vc40.pdb" + -@erase ".\Debug\vc40.idb" + -@erase ".\Debug\SCC.dll" + -@erase ".\Debug\scc.obj" + -@erase ".\Debug\SCC.ilk" + -@erase ".\Debug\SCC.lib" + -@erase ".\Debug\SCC.exp" + -@erase ".\Debug\SCC.pdb" + +"$(OUTDIR)" : + if not exist "$(OUTDIR)/$(NULL)" mkdir "$(OUTDIR)" + +# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +# ADD CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /c +CPP_PROJ=/nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS"\ + /Fp"$(INTDIR)/SCC.pch" /YX /Fo"$(INTDIR)/" /Fd"$(INTDIR)/" /c +CPP_OBJS=.\Debug/ +CPP_SBRS= +# ADD BASE MTL /nologo /D "_DEBUG" /win32 +# ADD MTL /nologo /D "_DEBUG" /win32 +MTL_PROJ=/nologo /D "_DEBUG" /win32 +# ADD BASE RSC /l 0x409 /d "_DEBUG" +# ADD RSC /l 0x409 /d "_DEBUG" +BSC32=bscmake.exe +# ADD BASE BSC32 /nologo +# ADD BSC32 /nologo +BSC32_FLAGS=/nologo /o"$(OUTDIR)/SCC.bsc" +BSC32_SBRS= +LINK32=link.exe +# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 +# ADD LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo /subsystem:windows /dll /debug /machine:I386 +LINK32_FLAGS=kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib\ + advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib /nologo\ + /subsystem:windows /dll /incremental:yes /pdb:"$(OUTDIR)/SCC.pdb" /debug\ + /machine:I386 /def:".\scc.def" /out:"$(OUTDIR)/SCC.dll"\ + /implib:"$(OUTDIR)/SCC.lib" +DEF_FILE= \ + ".\scc.def" +LINK32_OBJS= \ + "$(INTDIR)/scc.obj" + +"$(OUTDIR)\SCC.dll" : "$(OUTDIR)" $(DEF_FILE) $(LINK32_OBJS) + $(LINK32) @<< + $(LINK32_FLAGS) $(LINK32_OBJS) +<< + +!ENDIF + +.c{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_OBJS)}.obj: + $(CPP) $(CPP_PROJ) $< + +.c{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cpp{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +.cxx{$(CPP_SBRS)}.sbr: + $(CPP) $(CPP_PROJ) $< + +################################################################################ +# Begin Target + +# Name "SCC - Win32 Release" +# Name "SCC - Win32 Debug" + +!IF "$(CFG)" == "SCC - Win32 Release" + +!ELSEIF "$(CFG)" == "SCC - Win32 Debug" + +!ENDIF + +################################################################################ +# Begin Source File + +SOURCE=.\scc.c + +"$(INTDIR)\scc.obj" : $(SOURCE) "$(INTDIR)" + + +# End Source File +################################################################################ +# Begin Source File + +SOURCE=.\scc.def + +!IF "$(CFG)" == "SCC - Win32 Release" + +!ELSEIF "$(CFG)" == "SCC - Win32 Debug" + +!ENDIF + +# End Source File +# End Target +# End Project +################################################################################ diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/scc.c b/gnu/usr.bin/cvs/windows-NT/SCC/scc.c new file mode 100644 index 00000000000..6815208f357 --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/scc.c @@ -0,0 +1,486 @@ +/* This file was written by Jim Kingdon, and is hereby placed + in the public domain. */ + +#include +#include +#include /* For chdir */ + + +/* Bits of the interface. + For paranoia's sake, I'm not using the same names as Microsoft. + I don't imagine copying a few names could be a credible copyright + case, but it seems safer to stick to only what is necessary for + the interface to work. */ +typedef long SCC_return; +#define SCC_return_success 0 +#define SCC_return_unknown_project -2 +#define SCC_return_not_supported -14 +#define SCC_return_non_specific_error -15 +enum SCC_command +{ + SCC_command_get, + SCC_command_checkout, + SCC_command_checkin, + SCC_command_uncheckout, + SCC_command_add, + SCC_command_remove, + SCC_command_diff, + SCC_command_history, + SCC_command_rename, + SCC_command_properties, + SCC_command_options +}; + +/* Outproc codes, for second argument to outproc. */ +#define SCC_outproc_info 1 +#define SCC_outproc_warning 2 +#define SCC_outproc_error 3 +typedef long (*SCC_outproc) (char *, long); + +typedef BOOL (*SCC_popul_proc) (LPVOID callerdat, BOOL add_keep, + LONG status, LPCSTR file); + +/* Maximum sizes of various strings. These are arbitrary limits + which are imposed by the SCC. */ +/* Name argument to SccInitialize. */ +#define SCC_max_name 31 +/* Path argument to SccInitialize. */ +#define SCC_max_init_path 31 +/* Various paths many places in the interface. */ +#include +#define SCC_max_path _MAX_PATH + +/* Bits to set in the caps used by SccInitialize. */ +#define SCC_cap_GetProjPath 0x200L +#define SCC_cap_AddFromScc 0x400L +#define SCC_cap_want_outproc 0x8000L + +/* Flags for SccGet. */ +#define SCC_RECURSE 2L +/* This means to get all the files in a directory. */ +#define SCC_DIR 1L + + +/* We get to put whatever we want here, and the caller will pass it + to us, so we don't need any global variables. */ +struct context { + FILE *debuglog; + /* Value of the CVSROOT we are currently working with (that is, the + "open project" in SCC terminology), malloc'd, or NULL if there is + no project currently open. */ + char *root; + /* Local directory (working directory in CVS parlance). */ + char *local; + SCC_outproc outproc; +}; + +#include + +/* Report a malloc error and return the SCC_return_* value which the + caller should return to the IDE. Probably this should be getting + the window argument too, but for the moment we don't need it. + Note that we only use this for errors which occur after the + context->outproc is set up. */ +SCC_return +malloc_error (struct context *context) +{ + (*context->outproc) ("Out of memory\n", SCC_outproc_error); + return SCC_return_non_specific_error; +} + +/* Return the version of the SCC spec, major version in the high word, + minor version in the low word. */ +LONG +SccGetVersion () +{ + /* We implement version 1.1 of the spec. */ + return 0x10001; +} + +SCC_return +SccInitialize (void **contextp, HWND window, LPSTR caller, LPSTR name, + LPLONG caps, LPSTR path, LPDWORD co_comment_len, + LPDWORD comment_len) +{ + struct context *context; + FILE *fp; + fp = fopen ("d:\\debug.scc", "w"); + if (fp == NULL) + /* Do what? Return some error value? */ + abort (); + context = malloc (sizeof (struct context)); + if (context == NULL) + { + fprintf (fp, "Out of memory\n"); + fclose (fp); + /* Do what? Return some error? */ + abort (); + } + context->debuglog = fp; + context->root = NULL; + *contextp = context; + fprintf (fp, "Made it into SccInitialize!\n"); + *caps = (SCC_cap_GetProjPath + | SCC_cap_AddFromScc + | SCC_cap_want_outproc); + + /* I think maybe this should have some more CVS-like + name, like "CVS Root", if we decide that is what + a SCC "project" is. */ + strncpy (path, "CVS Project:", SCC_max_init_path); + fprintf (fp, "Caller name is %s\n", caller); + strncpy (name, "CVS", SCC_max_name); + /* CVS has no limit on comment length. But I suppose + we need to return a value which is small enough for + a caller to allocate a buffer this big. Not that I + would write a caller that way, but..... */ + *co_comment_len = 8192; + *comment_len = 8192; + fflush (fp); + return SCC_return_success; +} + +SCC_return +SccUninitialize (void *context_arg) +{ + struct context *context = (struct context *)context_arg; + if (ferror (context->debuglog)) + /* FIXME: return error value... */ + if (fclose (context->debuglog) == EOF) + /* FIXME: return error value, I think. */ + ; + free (context); + return SCC_return_success; +} + +SCC_return +SccOpenProject (void *context_arg, HWND window, LPSTR user, + LPSTR project, LPSTR local_proj, LPSTR aux_proj, + LPSTR comment, SCC_outproc outproc, LONG flags) +{ + struct context *context = (struct context *)context_arg; + + /* This can happen if the IDE opens a project which is not under + CVS control. I'm not sure whether checking for aux_proj + being "" is the right way to detect this case, but it seems + it should work because I think that the source code control + system is what has control over the contents of aux_proj. */ + if (aux_proj[0] == '\0') + return SCC_return_unknown_project; + + context->root = malloc (strlen (aux_proj) + 5); + if (context->root == NULL) + return SCC_return_non_specific_error; + strcpy (context->root, aux_proj); + /* Since we don't yet support creating projects, we don't + do anything with flags. */ + + if (outproc == 0) + { + /* This supposedly can happen if the IDE chooses not to implement + the outproc feature. */ + fprintf (context->debuglog, "Uh oh. outproc is a null pointer\n"); + context->root = NULL; + fflush (context->debuglog); + return SCC_return_non_specific_error; + } + context->outproc = outproc; + + fprintf (context->debuglog, "SccOpenProject (aux_proj=%s)\n", aux_proj); + + context->local = malloc (strlen (local_proj) + 5); + if (context->local == NULL) + return malloc_error (context); + strcpy (context->local, local_proj); + + fflush (context->debuglog); + return SCC_return_success; +} + +SCC_return +SccCloseProject (void *context_arg) +{ + struct context *context = (struct context *)context_arg; + fprintf (context->debuglog, "SccCloseProject\n"); + fflush (context->debuglog); + if (context->root != NULL) + free (context->root); + context->root = NULL; + return SCC_return_success; +} + +/* cvs get. */ +SCC_return +SccGet (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LONG options, void *prov_options) +{ + struct context *context = (struct context *)context_arg; + int i; + char *fname; + + fprintf (context->debuglog, "SccGet: %d; files:", num_files); +#if 1 + for (i = 0; i < num_files; ++i) + { + fprintf (context->debuglog, "%s ", file_names[i]); + } +#endif + fprintf (context->debuglog, "\n"); + if (options & SCC_DIR) + fprintf (context->debuglog, " Get all\n"); + /* Should be using this flag to set -R vs. -l. */ + if (options & SCC_RECURSE) + fprintf (context->debuglog, " recurse\n"); + + for (i = 0; i < num_files; ++i) + { + FILE *fp; + + /* As with all file names passed to us by the SCC, these + file names are absolute pathnames. I think they will + tend to be paths within context->local, although I + don't know whether there are any exceptions to that. */ + fname = file_names[i]; + fprintf (context->debuglog, "%s ", fname); +#if 0 + fp = fopen (fname, "w"); +#endif + } + fprintf (context->debuglog, "\nExiting SccGet\n"); + fflush (context->debuglog); + return SCC_return_success; +} + +/* cvs edit. */ +SCC_return +SccCheckout (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LPSTR comment, LONG options, + void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs ci. */ +SCC_return +SccCheckin (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LPSTR comment, LONG options, + void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs unedit. */ +SCC_return +SccUncheckout (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LONG options, void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs add + cvs ci, more or less, I think (but see also + the "keep checked out" flag in options). */ +SCC_return +SccAdd (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LPSTR comment, LONG *options, + void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs rm -f + cvs ci, I think. Should barf if SCC_REMOVE_KEEP + (or maybe just put the file there, as if the user had removed + it and then done a "copy ". */ +SCC_return +SccRemove (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names, LPSTR comment, LONG options, + void *prov_options) +{ + return SCC_return_not_supported; +} + +/* mv, cvs add, cvs rm, and cvs ci, I think. */ +SCC_return +SccRename (void *context_arg, HWND window, LPSTR old_name, + LPSTR new_name) +{ + return SCC_return_not_supported; +} + +/* If "contents flag", then implement this ourself. For no + args or checksum (which we fall back to full compare) basically a + call to No_Diff or ? in the client case. For timestamp, just a + Classify_File. Now, if contents not set, then want to do a + cvs diff, and preferably start up WinDiff or something (to be + determined, for now perhaps could just shove in the text). */ +SCC_return +SccDiff (void *context_arg, HWND window, LPSTR file_name, + LONG options, void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs log, I presume. If we want to get fancier we could bring + up a screen more analogous to the tkCVS log window, let the user + do "cvs update -r", etc. */ +SCC_return +SccHistory (void *context_arg, HWND window, LONG num_files, + LPSTR file_names, LONG options, void *prov_options) +{ + return SCC_return_not_supported; +} + +/* cvs status, presumably. */ +SCC_return +SccProperties (void *context_arg, HWND window, LPSTR file_name) +{ + return SCC_return_not_supported; +} + +/* Not sure what this should do. The most obvious thing is some + kind of front-end to "cvs admin" but I'm not actually sure that + is the most useful thing. */ +SCC_return +SccRunScc (void *context_arg, HWND window, LONG num_files, + LPSTR *file_names) +{ + return SCC_return_not_supported; +} + +/* Lots of things that we could do here. Options to get/update + such as -r -D -k etc. just for starters. */ +SCC_return +SccGetCommandOptions (void *context_arg, HWND window, + enum SCC_command command, + void **prov_optionsp) +{ + return SCC_return_not_supported; +} + +/* Not existing CVS functionality, I don't think. + Need to be able to tell user about what files + are out there without actually getting them. */ +SCC_return +SccPopulateList (void *context_arg, enum SCC_command command, + LONG num_files, + LPSTR *file_names, SCC_popul_proc populate, + void *callerdat, LONG options) +{ + return SCC_return_success; +} + +/* cvs status, sort of. */ +SCC_return +SccQueryInfo (void *context_arg, LONG num_files, LPSTR *file_names, + LPLONG status) +{ + return SCC_return_not_supported; +} + +SCC_return +SccGetEvents (void *context_arg, LPSTR file_name, LPLONG status, + LPLONG events_remaining) +{ + /* They say this is supposed to only return cached status + information, not go to disk or anything. OK, although I + haven't really figured out what calls would cause us to + cache status without returning it then. */ + return SCC_return_success; +} + +/* This is where the user gives us the CVSROOT. */ +SCC_return +SccGetProjPath (void *context_arg, HWND window, LPSTR user, + LPSTR proj_name, LPSTR local_proj, LPSTR aux_proj, + BOOL allow_change, BOOL *new) +{ + /* For now we just hardcode the CVSROOT. In the future we will + of course prompt the user for it (simple implementation would + have them supply a string; potentially better implementation + would have menus or something for access methods and so on, + although it might also have a way of bypassing that in case + CVS supports new features that the GUI code doesn't + understand). We probably will also at some point want a + "project" to encompass both a CVSROOT and a directory or + module name within that CVSROOT, but we don't try to handle + that yet either. We also will want to be able to use "user" + instead of having the username encoded in the aux_proj or + proj_name, probably. */ + + struct context *context = (struct context *)context_arg; + fprintf (context->debuglog, "SccGetProjPath called\n"); + + /* At least for now we leave the proj_name alone, and just use + the aux_proj. */ + strncpy (proj_name, "zwork", SCC_max_path); + strncpy (aux_proj, ":server:harvey:/home/kingdon/zwork/cvsroot", + SCC_max_path); + if (local_proj[0] == '\0' && allow_change) + strncpy (local_proj, "d:\\sccwork", SCC_max_path); + /* I don't think I saw anything in the spec about this, + but let's see if it helps. */ + if (_chdir (local_proj) < 0) + fprintf (context->debuglog, "Error in chdir: %s", strerror (errno)); + + if (*new) + /* It is OK for us to prompt the user for creating a new + project. */ + /* We will say that the user said to create a new one. */ + *new = 1; + + fflush (context->debuglog); + return SCC_return_success; +} + +/* Pretty much similar to SccPopulateList. */ +SCC_return +SccAddFromScc (void *context_arg, HWND window, LONG *files, + char ***file_names) +{ + struct context *context = (struct context *)context_arg; + + /* For now we have hardcoded the notion that there are two files, + foo.c and bar.c. */ +#define NUM_FILES 2 + if (files == NULL) + { + char **p; + + /* This means to free the memory that is allocated for + file_names. */ + for (p = *file_names; *p != NULL; ++p) + { + fprintf (context->debuglog, "Freeing %s\n", *p); + free (*p); + } + } + else + { + *file_names = malloc ((NUM_FILES + 1) * sizeof (char **)); + if (*file_names == NULL) + return malloc_error (context); + (*file_names)[0] = malloc (80); + if ((*file_names)[0] == NULL) + return malloc_error (context); + strcpy ((*file_names)[0], "foo.c"); + (*file_names)[1] = malloc (80); + if ((*file_names)[1] == NULL) + return malloc_error (context); + strcpy ((*file_names)[1], "bar.c"); + (*file_names)[2] = NULL; + *files = 2; + + /* Are we supposed to also Get the files? Or is the IDE + next going to call SccGet on each one? The spec doesn't + say explicitly. */ + } + fprintf (context->debuglog, "Success in SccAddFromScc\n"); + fflush (context->debuglog); + return SCC_return_success; +} + +/* This changes several aspects of how we interact with the IDE. */ +SCC_return +SccSetOption (void *context_arg, LONG option, LONG val) +{ + return SCC_return_success; +} diff --git a/gnu/usr.bin/cvs/windows-NT/SCC/scc.def b/gnu/usr.bin/cvs/windows-NT/SCC/scc.def new file mode 100644 index 00000000000..cf4eded511e --- /dev/null +++ b/gnu/usr.bin/cvs/windows-NT/SCC/scc.def @@ -0,0 +1,25 @@ +LIBRARY SCC +EXPORTS + SccInitialize @1 + SccUninitialize @2 + SccOpenProject @3 + SccCloseProject @4 + SccGet @5 + SccCheckout @6 + SccUncheckout @7 + SccCheckin @8 + SccAdd @9 + SccRemove @10 + SccRename @11 + SccDiff @12 + SccHistory @13 + SccProperties @14 + SccRunScc @15 + SccGetCommandOptions @16 + SccQueryInfo @17 + SccGetEvents @18 + SccGetProjPath @19 + SccPopulateList @20 + SccAddFromScc @21 + SccSetOption @22 + SccGetVersion @23 diff --git a/gnu/usr.bin/cvs/windows-NT/config.h b/gnu/usr.bin/cvs/windows-NT/config.h index 736390a7b4b..abcf0189597 100644 --- a/gnu/usr.bin/cvs/windows-NT/config.h +++ b/gnu/usr.bin/cvs/windows-NT/config.h @@ -104,16 +104,6 @@ /* We don't need this for CLIENT side. */ #undef DIFF -/* the path to the gnu grep program on your system */ -/* We don't need this for CLIENT side. */ -#undef GREP - -/* The number of bytes in a int. */ -#define SIZEOF_INT 4 - -/* The number of bytes in a long. */ -#define SIZEOF_LONG 4 - /* Define if you have the connect function. */ /* Not used? */ #define HAVE_CONNECT @@ -145,9 +135,6 @@ /* Define if you have the putenv function. */ #define HAVE_PUTENV 1 -/* Define if you have the setvbuf function. */ -#define HAVE_SETVBUF 1 - /* Define if you have the sigaction function. */ #undef HAVE_SIGACTION diff --git a/gnu/usr.bin/cvs/windows-NT/filesubr.c b/gnu/usr.bin/cvs/windows-NT/filesubr.c index 7ab5814d0f5..da5a3c86230 100644 --- a/gnu/usr.bin/cvs/windows-NT/filesubr.c +++ b/gnu/usr.bin/cvs/windows-NT/filesubr.c @@ -831,27 +831,43 @@ convert_file (char *infile, int inflags, when combined as ${HOMEDRIVE}${HOMEPATH}, give the unix equivalent of HOME. Some NT users are just too unixy, though, and set the HOME variable themselves. Therefore, we check for HOME first, and - then try to combine the other two if that fails. */ + then try to combine the other two if that fails. + + Looking for HOME strikes me as bogus, particularly if the only reason + is to cater to "unixy users". On the other hand, if the reasoning is + there should be a single variable, rather than requiring people to + set both HOMEDRIVE and HOMEPATH, then it starts to make a little more + sense. + + Win95: The system doesn't set HOME, HOMEDRIVE, or HOMEPATH (at + least if you set it up as the "all users under one user ID" or + whatever the name of that option is). Based on thing overheard on + the net, it seems that users of the pserver client have gotten in + the habit of setting HOME (if you don't use pserver, you can + probably get away without having a reasonable return from + get_homedir. Of course you lose .cvsrc and .cvsignore, but many + users won't notice). So it would seem that we should be somewhat + careful if we try to change the current behavior. + + NT 3.51 or NT 4.0: I haven't checked this myself, but I am told + that HOME gets set, but not to the user's home directory. It is + said to be set to c:\users\default by default. */ char * get_homedir () { - static char pathbuf[PATH_MAX * 2]; + static char *pathbuf; char *hd, *hp; - if ((hd = getenv ("HOME"))) + if (pathbuf != NULL) + return pathbuf; + else if ((hd = getenv ("HOME"))) return hd; else if ((hd = getenv ("HOMEDRIVE")) && (hp = getenv ("HOMEPATH"))) { - /* Watch for buffer overruns. */ - -#define cvs_min(x,y) ((x <= y) ? (x) : (y)) - - int ld = cvs_min (PATH_MAX, strlen (hd)); - int lp = cvs_min (PATH_MAX, strlen (hp)); - - strncpy (pathbuf, hd, ld); - strncpy (pathbuf + ld, hp, lp); + pathbuf = xmalloc (strlen (hd) + strlen (hp) + 5); + strcpy (pathbuf, hd); + strcat (pathbuf, hp); return pathbuf; } diff --git a/gnu/usr.bin/cvs/windows-NT/options.h b/gnu/usr.bin/cvs/windows-NT/options.h index b9bba3ffc3a..33103dda051 100644 --- a/gnu/usr.bin/cvs/windows-NT/options.h +++ b/gnu/usr.bin/cvs/windows-NT/options.h @@ -54,17 +54,6 @@ #define DIFF "diff" #endif -/* - * The "grep" program to execute when checking to see if a merged file had - * any conflicts. This "grep" must support the "-s" option and a standard - * regular expression as an argument. Specify a full pathname if your site - * wants to use a particular grep. - */ - -#ifndef GREP -#define GREP "grep" -#endif - /* * The "patch" program to run when using the CVS server and accepting * patches across the network. Specify a full pathname if your site