Subject: bin/1947: rcsdiff doesn't accept two -L options
To: None <gnats-bugs@gnats.netbsd.org>
From: Niklas Hallqvist <niklas@filippa.appli.se>
List: netbsd-bugs
Date: 01/15/1996 22:45:01
>Number: 1947
>Category: bin
>Synopsis: rcsdiff doesn't accept two -L options
>Confidential: no
>Severity: serious
>Priority: low
>Responsible: bin-bug-people (Utility Bug People)
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Mon Jan 15 17:05:01 1996
>Last-Modified:
>Originator: Niklas Hallqvist
>Organization:
Applitron Datasystem AB
>Release: 951218
>Environment:
System: NetBSD filippa.appli.se 1.1_ALPHA NetBSD 1.1_ALPHA (FILIPPA) #562: Mon Dec 11 19:15:43 MET 1995 root@filippa.appli.se:/u3/newex/sys/arch/amiga/compile/FILIPPA amiga
>Description:
Rcsdiff have a way to enter labels to be used instead of filenames
in the context diff headers. This is done via the -L option. A typo
makes it impossible to enter a label for *both* files in the diff.
>How-To-Repeat:
echo a >rcs-file
ci rcs-file
co -l rcs-file
echo b >rcs-file
rcsdiff -c -L label-A -L label-B rcs-file,v
watch the error message:
rcsdiff: too many -L options
rcsdiff aborted
>Fix:
Fix the typo in the code. Patch included.
Index: rcsdiff.c
===================================================================
RCS file: /cvs/src/gnu/usr.bin/rcs/rcsdiff/rcsdiff.c,v
retrieving revision 1.1.1.1
diff -c -r1.1.1.1 rcsdiff.c
*** rcsdiff.c 1995/10/18 08:41:03 1.1.1.1
--- rcsdiff.c 1996/01/15 21:28:32
***************
*** 211,217 ****
/* fall into */
case 'C': case 'F': case 'I': case 'L': case 'W':
#if DIFF_L
! if (c == 'L' && ++file_labels == 2)
faterror("too many -L options");
#endif
*dcp++ = c;
--- 211,217 ----
/* fall into */
case 'C': case 'F': case 'I': case 'L': case 'W':
#if DIFF_L
! if (c == 'L' && file_labels++ == 2)
faterror("too many -L options");
#endif
*dcp++ = c;
>Audit-Trail:
>Unformatted: