--- rlog.c 1995/06/16 06:19:24 5.18 +++ rlog.c 2005/08/12 22:45:15 @@ -212,6 +212,8 @@ static int branchflag; /*set on -b */ static int exitstatus; static int lockflag; +static int onlyRCSflag; /* print only RCS pathname */ +static int printedRCS; /* RCS pathaname printed for -R */ static struct Datepairs *datelist, *duelst; static struct Revpairs *revlist, *Revlst; static struct authors *authorlist; @@ -235,7 +237,6 @@ struct rcslock const *currlock; int descflag, selectflag; int onlylockflag; /* print only files with locks */ - int onlyRCSflag; /* print only RCS pathname */ int pre5; int shownames; int revno; @@ -371,11 +372,6 @@ if (onlylockflag && !Locks) continue; - if ( onlyRCSflag ) { - aprintf(out, "%s\n", RCSname); - continue; - } - gettree(); if (!getnumericrev()) @@ -385,7 +381,8 @@ * Output the first character with putc, not printf. * Otherwise, an SVR4 stdio bug buffers output inefficiently. */ - aputc_('\n', out) + if (! onlyRCSflag ) { + afputc('\n', out); /* print RCS pathname, working pathname and optional administrative information */ @@ -429,6 +426,7 @@ aprintf(out, "\ntotal revisions: %d", TotalDeltas); revno = 0; + } if (Head && selectflag & descflag) { @@ -444,12 +442,19 @@ revno = extdate(Head); + if (! onlyRCSflag ) { aprintf(out, ";\tselected revisions: %d", revno); } + } + if (! onlyRCSflag ) { afputc('\n',out); + } if (descflag) { + if (! onlyRCSflag ) { aputs("description:\n", out); + getdesc(false); + } else getdesc(true); } if (revno) { @@ -459,11 +464,15 @@ /* Read through delta->next to get its insertlns. */ while (readdeltalog() != delta->next) continue; + printedRCS = false; putrunk(); putree(Head); + printedRCS = false; } + if (! onlyRCSflag ) { aputs("=============================================================================\n",out); } + } Ofclose(out); exitmain(exitstatus); } @@ -571,6 +580,13 @@ return; out = stdout; + if ( onlyRCSflag ) { + if (! printedRCS ) { + aprintf(out, "%s\n", RCSname); + printedRCS = true; + } + return; + } aprintf(out, "----------------------------\nrevision %s%s", node->num, pre5 ? " " : ""