Subject: Bug fix for diff -l
To: None <netbsd-bugs@sun-lamp.cs.berkeley.edu>
From: Mark P. Gooderum <mark@aggregate.com>
List: netbsd-bugs
Date: 03/18/1994 10:22:23
I ran accross this bug in diff when giving the wrong option by mistake.
I was diffing two /etc dirs and did a "diff -l" to get a report of files
only (thinking like "egrep -l", oh well...). Anyways, I got the following
error message:
nirvana::root-3# diff -l etc /etc
diff: /bin/pr: No such file or directory
Broken pipe
nirvana::root-4# exit
exit
Well, I thought I'd be smart and just link it, but this got me:
nirvana::root-1# diff -l etc /etc
pr: illegal option -- f
usage: pr [+page] [-col] [-adFmrt] [-e[ch][gap]] [-h header]
[-i[ch][gap]] [-l line] [-n[ch][width]] [-o offset]
[-s[ch]] [-w width] [-] [file ...]
diff: subsidiary pr failed
Well, I tracked it down to two problems. When invoking pr, diff (util.c)
uses the "-f" option for a formfeed instead of the now needed "-F" and
diff.h defines PR_FILE_NAME to "/bin/pr".
The following patch (as of the March 15th current) fixes the problem.
Yeah, kind of a long mail for a simple problem, but I figure too much info
is better than not enough.
--
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Mark P. Gooderum USSnail: Aggregate Computing, Inc.
Software Engineer 300 So. Hiway 169 Ste 400
"Working hard to be hardly working..." Minneapolis, MN 55426
EMail: mark@aggregate.com Voice: (612) 546-5579
Interactive: mark@jupiter.aggregate.com Fax: (612) 546-9485
mark@sol.aggregate.com Sales/Sup:(800) 966-1666
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
*** diff.h.install Thu Mar 17 20:45:18 1994
--- diff.h Thu Mar 17 20:47:11 1994
***************
*** 23,29 ****
#include "regex.h"
#ifndef PR_FILE_NAME
! #define PR_FILE_NAME "/bin/pr"
#endif
#define TAB_WIDTH 8
--- 23,29 ----
#include "regex.h"
#ifndef PR_FILE_NAME
! #define PR_FILE_NAME "/usr/bin/pr"
#endif
#define TAB_WIDTH 8
*** util.c.install Thu Mar 17 20:46:01 1994
--- util.c Thu Mar 17 20:46:53 1994
***************
*** 205,211 ****
close (pipes[0]);
}
! execl (PR_FILE_NAME, PR_FILE_NAME, "-f", "-h", name, 0);
pfatal_with_name (PR_FILE_NAME);
}
else
--- 205,211 ----
close (pipes[0]);
}
! execl (PR_FILE_NAME, PR_FILE_NAME, "-F", "-h", name, 0);
pfatal_with_name (PR_FILE_NAME);
}
else
----- End Included Message -----
------------------------------------------------------------------------------