[1948] in Athena Bugs
(RT/PC) Version 6.1C: /usr/ucb/grep
daemon@ATHENA.MIT.EDU (Jonathan I. Kamens)
Tue Mar 21 22:42:12 1989
Date: Tue, 21 Mar 89 22:41:56 EST
From: Jonathan I. Kamens <jik@ATHENA.MIT.EDU>
To: bugs@ATHENA.MIT.EDU
System type, version: (RT/PC) Version 6.1C
System name: pit-manager
pit-manager% /usr/ucb/grep \* /mit/jik/.login
Segmentation violation (core dumped)
The problem is that the wonderful VAX-using people at Berkeley use a
char * before it is set and assume that it has been initialized to
NULL.
In addition, there are a couple of missing declarations (lint problems
only, probably, because they result in a char * being taken as an
int).
Below are context diffs to grep. Note that this stuff is probably
fixed in 4.3tahoe, since there appears to be a totally new egrep
there.
*** /minos/source/4.3/ucb/grep.c Tue Mar 4 12:32:43 1986
--- grep.c Tue Mar 21 22:03:52 1989
***************
*** 124,130 ****
{
register c;
register char *ep, *sp;
! char *lastep;
int cclcnt;
ep = expbuf;
--- 124,130 ----
{
register c;
register char *ep, *sp;
! char *lastep = (char *) NULL;
int cclcnt;
ep = expbuf;
***************
*** 222,227 ****
--- 222,228 ----
}
execute(file)
+ char *file;
{
register char *p1, *p2;
register c;
***************
*** 327,333 ****
char *alp, *aep;
{
register char *lp, *ep, *curlp;
- char *nextep;
lp = alp;
ep = aep;
--- 328,333 ----
***************
*** 436,441 ****
--- 436,442 ----
}
succeed(f)
+ char *f;
{
nsucc = 1;
if (sflag)