Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watmath!clyde!cbosgd!ihnp4!ptsfa!lll-lcc!lll-tis!ames!oliveb!sun!gorodish!guy From: guy@gorodish.UUCP Newsgroups: comp.unix.wizards Subject: Re: RCS vs. SCCS and make Message-ID: <20393@sun.uucp> Date: Thu, 4-Jun-87 19:55:13 EDT Article-I.D.: sun.20393 Posted: Thu Jun 4 19:55:13 1987 Date-Received: Sat, 6-Jun-87 11:20:07 EDT References: <41@esosun.UUCP> Sender: news@sun.uucp Lines: 319 > Is RCS fading away? Define "fading away". Have people *stopped* providing or supporting it? If it's just that some people never *started* providing it or supporting it, this can hardly be said to indicate that it's "fading away". > I always thought RCS had more features and is faster then SCCS; why does > Sun prefer SCCS? Define "prefer". We use SCCS in house, for what is probably a combination of technical and historical reasons. We only supply SCCS with our systems, probably because we don't want to have to support the user-supplied software that comes with 4.3BSD (note that DEC doesn't support RCS, either, they just supply it - see the article from Frederick Avolio of DEC). In short, we "prefer" to use SCCS, and we "prefer" not to have to support RCS. RCS has features that SCCS doesn't, and *vice versa*; the only really big feature that RCS has and SCCS doesn't that I wish SCCS did is symbolic version numbers. RCS is faster for the common case where you're retrieving the latest version, although SCCS is faster for retrieving earlier versions and, I'm told, when dealing with branches. (The time to retrieve a version from SCCS is pretty much constant; the time to retrieve a version from RCS increases the older the revision or, more generally, the more changes have to be applied to the version "currently" stored in the RCS file.) If you have the source to the version of RCS that came with 4.3BSD, and are running SunOS 3.2 or later, you can bring up RCS by applying a patch to keep it from dereferencing a null pointer. It won't be supported by us, but as I mentioned other people don't support RCS either, even though they supply it. Here's the patch; it also includes other bug fixes from Jay Lepreau, Ray Chen, and me: diff -c old/ci.c new/ci.c *** old/ci.c Tue Jan 27 13:43:23 1987 --- new/ci.c Tue Jan 27 13:58:01 1987 *************** *** 123,128 **** --- 123,129 ---- { register int i; register char * sp, *tp; + char * nametest; char * cmdusage; /* holds command format */ char command[NCPPN+50]; /* holds diff commands */ char curdate[datelength];/* date for new delta */ *************** *** 194,200 **** if ((*argv)[2]!='\0'){ if (symbol!=nil)warn("Redefinition of symbolic name"); symbol = (*argv)+2; ! checkid(symbol,' '); } else warn("Missing name for -n option"); break; --- 195,202 ---- if ((*argv)[2]!='\0'){ if (symbol!=nil)warn("Redefinition of symbolic name"); symbol = (*argv)+2; ! if (!(nametest=checkid(symbol,' '))||*nametest) ! faterror("Name %s must be one word",symbol); } else warn("Missing name for -n option"); break; *************** *** 203,209 **** if ((*argv)[2]!='\0'){ if (symbol!=nil)warn("Redefinition of symbolic name"); symbol = (*argv)+2; ! checkid(symbol,' '); } else warn("Missing name for -N option"); break; --- 205,212 ---- if ((*argv)[2]!='\0'){ if (symbol!=nil)warn("Redefinition of symbolic name"); symbol = (*argv)+2; ! if (!(nametest=checkid(symbol,' '))||*nametest) ! faterror("Name %s must be one word",symbol); } else warn("Missing name for -N option"); break; diff -c old/rcs.c new/rcs.c *** old/rcs.c Tue Jan 27 13:43:25 1987 --- new/rcs.c Tue Jan 27 13:56:32 1987 *************** *** 988,993 **** --- 988,995 ---- trail = &dummy; while (next!=nil) { numr = strcmp(num, next->delta->num); + if (num!=nil) + numr = strcmp(num, next->delta->num); if ((whor=strcmp(who,next->login))==0 && (num==nil || numr==0)) break; /* found a lock */ diff -c old/rcsdiff.c new/rcsdiff.c *** old/rcsdiff.c Tue Jan 27 13:43:26 1987 --- new/rcsdiff.c Tue Jan 27 13:55:10 1987 *************** *** 2,8 **** * RCS rcsdiff operation */ static char rcsid[]= ! "$Header: rcsdiff.c,v 3.7 86/05/19 02:36:16 lepreau Exp $ Purdue CS"; /***************************************************************************** * generate difference between RCS revisions ***************************************************************************** --- 2,8 ---- * RCS rcsdiff operation */ static char rcsid[]= ! "$Header: rcsdiff.c,v 3.8 86/06/18 15:02:32 lepreau Exp $ Purdue CS"; /***************************************************************************** * generate difference between RCS revisions ***************************************************************************** *************** *** 20,25 **** --- 20,29 ---- /* $Log: rcsdiff.c,v $ + * Revision 3.8 86/06/18 15:02:32 lepreau + * I broke -c in last rev. + * Also, mixing a bopt with an otheropt was broken. + * * Revision 3.7 86/05/19 02:36:16 lepreau * Pass on new diff options, and allow them to be clustered. * *************** *** 42,47 **** --- 46,52 ---- * Initial revision. * */ + #include #include "rcsbase.h" static char rcsbaseid[] = RCSBASE; *************** *** 56,61 **** --- 61,67 ---- char * temp1file, * temp2file; char bops[10] = "-"; + char otherops[10] = "-"; main (argc, argv) int argc; char **argv; *************** *** 75,81 **** register c; catchints(); ! otheroption=""; boption = bops + 1; cmdid = "rcsdiff"; cmdusage = "command format:\n rcsdiff [-biwt] [-cefhn] [-rrev1] [-rrev2] file"; --- 81,87 ---- register c; catchints(); ! otheroption = otherops + 1; boption = bops + 1; cmdid = "rcsdiff"; cmdusage = "command format:\n rcsdiff [-biwt] [-cefhn] [-rrev1] [-rrev2] file"; *************** *** 106,113 **** case 'f': case 'h': case 'n': ! if (*otheroption=='\0') { ! otheroption= argp-2; } else { faterror("Options c,e,f,h,n are mutually exclusive"); } --- 112,126 ---- case 'f': case 'h': case 'n': ! if (otheroption == otherops + 1) { ! *otheroption++ = c; ! if (c == 'c' && isdigit(*argp)) { ! while (isdigit(*argp)) ! *otheroption++ = *argp++; ! if (*argp) ! faterror("-c: bad count"); ! argp = ""; ! } } else { faterror("Options c,e,f,h,n are mutually exclusive"); } *************** *** 117,125 **** }; } /* end of option processing */ if (boption != bops + 1) { ! *boption = ' '; boption = bops; } if (argc<1) faterror("No input file\n%s",cmdusage); /* now handle all filenames */ --- 130,142 ---- }; } /* end of option processing */ if (boption != bops + 1) { ! *boption = ' '; boption = bops; } + if (otheroption != otherops + 1) { + *otheroption = ' '; + otheroption = otherops; + } if (argc<1) faterror("No input file\n%s",cmdusage); /* now handle all filenames */ *************** *** 166,172 **** } if (revnums<=1) { temp2file=workfilename; ! diagnose("diff %s%s -r%s %s",boption,otheroption,xrev1,workfilename); } else { temp2file=mktempfile("/tmp/",TMPFILE2); diagnose("retrieving revision %s",xrev2); --- 183,189 ---- } if (revnums<=1) { temp2file=workfilename; ! diagnose("diff %s%s-r%s %s",boption,otheroption,xrev1,workfilename); } else { temp2file=mktempfile("/tmp/",TMPFILE2); diagnose("retrieving revision %s",xrev2); *************** *** 176,184 **** error("co failed"); continue; } ! diagnose("diff %s%s -r%s -r%s",boption,otheroption,xrev1,xrev2); } ! sprintf(command,"%s %s %s %s %s\n",DIFF,boption, otheroption, temp1file, temp2file); exit_stats = system (command); if (exit_stats != 0 && exit_stats != (1 << BYTESIZ)) { --- 193,201 ---- error("co failed"); continue; } ! diagnose("diff %s%s-r%s -r%s",boption,otheroption,xrev1,xrev2); } ! sprintf(command,"%s %s%s%s %s\n",DIFF,boption, otheroption, temp1file, temp2file); exit_stats = system (command); if (exit_stats != 0 && exit_stats != (1 << BYTESIZ)) { diff -c old/rcsutil.c new/rcsutil.c *** old/rcsutil.c Tue Jan 27 13:43:31 1987 --- new/rcsutil.c Tue Jan 27 13:51:20 1987 *************** *** 178,188 **** void catchints() { ! signal(SIGINT,catchsig); signal(SIGHUP,catchsig); ! signal(SIGQUIT,catchsig); signal(SIGPIPE,catchsig); ! signal(SIGTERM,catchsig); } void ignoreints() { signal(SIGINT,SIG_IGN); signal(SIGHUP,SIG_IGN); --- 178,196 ---- void catchints() { ! cksignal(SIGINT); cksignal(SIGHUP); ! cksignal(SIGQUIT); cksignal(SIGPIPE); ! cksignal(SIGTERM); } + + cksignal(sig) + int sig; + { + if (signal(sig,SIG_IGN) != SIG_IGN) + VOID signal(sig,catchsig); + } + void ignoreints() { signal(SIGINT,SIG_IGN); signal(SIGHUP,SIG_IGN); *************** *** 204,210 **** while ((--inf->_cnt)>=0) { putc(*inf->_ptr++&0377,outf); } ! fflush(outf); /*now read the rest of the file in blocks*/ while ((rcount=read(fileno(inf),buf,BUFSIZ))>0) { --- 212,220 ---- while ((--inf->_cnt)>=0) { putc(*inf->_ptr++&0377,outf); } ! if (fflush(outf) == EOF) { ! faterror("write error"); ! } /*now read the rest of the file in blocks*/ while ((rcount=read(fileno(inf),buf,BUFSIZ))>0) { Guy Harris {ihnp4, decvax, seismo, decwrl, ...}!sun!guy guy@sun.com