diff -cbr rcs-orig/src/conf.heg rcs/src/conf.heg *** rcs-orig/src/conf.heg Mon Aug 01 15:32:16 1994 --- rcs/src/conf.heg Mon Aug 01 15:20:30 1994 *************** *** 140,145 **** --- 140,146 ---- /* This may need changing on non-Unix systems (notably DOS). */ #define OPEN_CREAT_READONLY (S_IRUSR|S_IRGRP|S_IROTH) /* lock file mode */ #define OPEN_O_LOCK 0 /* extra open flags for creating lock file */ + #define OPEN_O_WRONLY O_WRONLY /* Define or comment out the following symbols as needed. */ #define bad_chmod_close 0 /* Can chmod() close file descriptors? */ diff -cbr rcs-orig/src/ident.c rcs/src/ident.c *** rcs-orig/src/ident.c Sun Mar 20 05:52:58 1994 --- rcs/src/ident.c Tue Mar 22 21:33:28 1994 *************** *** 239,241 **** --- 239,247 ---- VOID fprintf(stdout, " %c%s\n", KDELIM, line); return 0; } + + void + exiterr() + { + _exit(EXIT_FAILURE); + } diff -cbr rcs-orig/src/rcs.c rcs/src/rcs.c *** rcs-orig/src/rcs.c Thu Mar 17 15:05:48 1994 --- rcs/src/rcs.c Tue Mar 22 21:00:02 1994 *************** *** 1052,1058 **** --- 1052,1060 ---- warn("Mail notification of broken locks is not available."), #endif warn("Please tell `%s' why you broke the lock.", who); + #ifdef SENDMAIL Ozclose(&mailmess); + #endif return(true); } diff -cbr rcs-orig/src/rcsedit.c rcs/src/rcsedit.c *** rcs-orig/src/rcsedit.c Sun Mar 20 05:52:58 1994 --- rcs/src/rcsedit.c Tue Jul 26 20:46:50 1994 *************** *** 1371,1377 **** # if !open_can_creat # define create(f) creat(f, OPEN_CREAT_READONLY) # else ! # define create(f) open(f, OPEN_O_BINARY|OPEN_O_LOCK|O_CREAT|O_EXCL|O_TRUNC|O_WRONLY, OPEN_CREAT_READONLY) # endif catchints(); --- 1371,1377 ---- # if !open_can_creat # define create(f) creat(f, OPEN_CREAT_READONLY) # else ! # define create(f) open(f, OPEN_O_BINARY|OPEN_O_LOCK|O_CREAT|O_EXCL|O_TRUNC|OPEN_O_WRONLY, OPEN_CREAT_READONLY) # endif catchints(); diff -cbr rcs-orig/src/rlog.c rcs/src/rlog.c *** rcs-orig/src/rlog.c Thu Apr 14 16:14:06 1994 --- rcs/src/rlog.c Thu Apr 14 16:14:34 1994 *************** *** 208,218 **** static struct lockers *lockerlist; static struct stateattri *statelist; mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.16 1994/04/13 16:30:34 eggert Exp $") { static char const cmdusage[] = ! "\nrlog usage: rlog -{bhLNRt} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; register FILE *out; char *a, **newargv; --- 208,221 ---- static struct lockers *lockerlist; static struct stateattri *statelist; + static int onlyid; + static char const *numrev2symbrev P((char const *numrev)); + mainProg(rlogId, "rlog", "$Id: rlog.c,v 5.16 1994/04/13 16:30:34 eggert Exp $") { static char const cmdusage[] = ! "\nrlog usage: rlog -{bhLNRtIZ} -ddates -l[lockers] -r[revs] -sstates -Vn -w[logins] -xsuff -zzone file ..."; register FILE *out; char *a, **newargv; *************** *** 226,231 **** --- 229,235 ---- int descflag, selectflag; int onlylockflag; /* print only files with locks */ int onlyRCSflag; /* print only RCS pathname */ + int onlylockers = 0; int pre5; int shownames; int revno; *************** *** 252,257 **** --- 256,269 ---- onlyRCSflag =true; break; + case 'I': + onlyid = (*a == 'I') ? 2 : 1; + break; + + case 'Z': + onlylockers = (*a == 'Z') ? 2 : 1; + break; + case 'l': lockflag = true; getlocker(a); *************** *** 353,358 **** --- 365,431 ---- * workname contains the name of the working file. */ + /* Options 'Z' and 'ZZ' added to quickly get the relevant Data + * for locked File(s)/Revisions. + * Options 'I' and 'II' added to easily get Information about + * unlocked File(s) of the specified Revision(s). These Records + * could be used as an Entry of an Revision-List. + * The single-option Version prints Basenames, the double-option + * Version prints Filenames with the full path. + */ + if (onlyid) { + if (Locks) { /* Issue Warnings for locked Versions */ + currlock = Locks; + aprintf (stderr, "Warning: there are Locks for File %s:\n", + onlyid == 1 ? RCSname : getfullRCSname()); + while (currlock) { + aprintf (stderr, + "\tFile: %s Revision: %s [%s] locked by: %s\n", + onlyid == 1 ? RCSname : getfullRCSname(), + currlock->delta->num, + numrev2symbrev (currlock->delta->num), + currlock->login); + currlock = currlock->nextlock; + } + } + + if (! Head) continue; + gettree (); + revno = 0; + getnumericrev (); + exttree (Head); + currdate = duelst; + while (currdate) { + VOID sprintf (currdate->strtdate,dateform,0,0,0,0,0,0); + recentdate (Head, currdate); + currdate = currdate->dnext; + } + revno = extdate (Head); + getdesc (false); + if (revno) { + while (! (delta = readdeltalog())->selector || --revno) ; + if (delta->next && countnumflds(delta->num)==2) { + while (readdeltalog() != delta->next) ; + } + putrunk (); + putree (Head); + } + continue; + } + + if (onlylockers) { + currlock = Locks; + while (currlock) { + aprintf (out, "File: %s Revision: %s [%s] locked by: %s\n", + onlylockers == 1 ? RCSname : getfullRCSname(), + currlock->delta->num, + numrev2symbrev (currlock->delta->num), + currlock->login); + currlock = currlock->nextlock; + } + continue; + } + /* Keep only those locks given by -l. */ if (lockflag) trunclocks(); *************** *** 560,565 **** --- 633,648 ---- return; out = stdout; + + if (onlyid) { + aprintf (out, + "File: %s Revision: %s [%s] Date: %s Author: %s State: %s\n", + onlyid == 1 ? workname : getfullRCSname(), + node->num, numrev2symbrev (node->num), + date2str (node->date, datebuf), node->author, node->state); + return; + } + aprintf(out, "----------------------------\nrevision %s%s", node->num, pre5 ? " " : "" *************** *** 1254,1257 **** --- 1337,1352 ---- else error("missing `,' near `%c%s'", c, argv+1); } + } + + static char const *numrev2symbrev (numrev) + char const *numrev; + { + struct assoc const *p; + + for (p = Symbols; p; p = p->nextassoc) { + if (! strcmp (numrev, p->num)) return (p->symbol); + } + + return (""); }