On Tue, Oct 07, 2014 at 02:56:07PM +0200, Fritjof Bornebusch wrote: > On Tue, Oct 07, 2014 at 09:34:33AM +0200, Otto Moerbeek wrote: > > On Tue, Oct 07, 2014 at 03:10:44AM -0400, Daniel Dickman wrote: > > > > > Fritjof, have you let the gnu rcs project know about the segfault? > > > Maybe see how they choose to fix things and then follow their lead? > > > > That will only slow things down. Do what -L -U does is better, imo. > > > > Otto, so you appreciate a diff more like this one?
well, almost. I think it should be clear one flag and set one, not clear all and set one. > > > -Otto > > > > > > > > fritjof > > Index: rcsprog.c > =================================================================== > RCS file: /cvs/src/usr.bin/rcs/rcsprog.c,v > retrieving revision 1.152 > diff -u -p -r1.152 rcsprog.c > --- rcsprog.c 2 Oct 2014 06:23:15 -0000 1.152 > +++ rcsprog.c 7 Oct 2014 12:53:10 -0000 > @@ -235,9 +235,10 @@ rcs_main(int argc, char **argv) > lkmode = RCS_LOCK_STRICT; > break; > case 'l': > - /* XXX - Check with -u flag. */ > + if (rcsflags & RCSPROG_UFLAG) > + warnx("-u overridden by -l"); > lrev = rcs_optarg; > - rcsflags |= RCSPROG_LFLAG; > + rcsflags = RCSPROG_LFLAG; > break; > case 'm': > if (logstr != NULL) > @@ -273,9 +274,10 @@ rcs_main(int argc, char **argv) > lkmode = RCS_LOCK_LOOSE; > break; > case 'u': > - /* XXX - Check with -l flag. */ > + if (rcsflags & RCSPROG_LFLAG) > + warnx("-l overridden by -u"); > urev = rcs_optarg; > - rcsflags |= RCSPROG_UFLAG; > + rcsflags = RCSPROG_UFLAG; > break; > case 'V': > printf("%s\n", rcs_version);