wswietse@eutrc3.UUCP (Wietse Venema) (04/15/88)
The following patches to the sed program (posted sept 1987?) solve
the problems I stumbled upon.
For maximum UNIX compatibility you should remove the support for the +
operator in regular expressions...
*** sedcomp.c.orig Fri Apr 15 11:27:22 1988
--- sedcomp.c Fri Apr 15 11:33:21 1988
***************
*** 538,545 ****
c = '\n';
else if (c == 't') /* match a tab */
c = '\t';
! else
! goto defchar; /* else match \c */
case '\0': /* ignore nuls */
continue;
--- 538,544 ----
c = '\n';
else if (c == 't') /* match a tab */
c = '\t';
! goto defchar; /* else match \c */
case '\0': /* ignore nuls */
continue;
***************
*** 786,792 ****
register char *ep; /* where to compile to */
char delim; /* end delimiter to look for */
{
! register char c, *tp, *sp;
/* scan the 'from' section for invalid chars */
for(sp = tp = cp; *tp != delim; tp++)
--- 785,792 ----
register char *ep; /* where to compile to */
char delim; /* end delimiter to look for */
{
! register char *tp, *sp;
! register int c;
/* scan the 'from' section for invalid chars */
for(sp = tp = cp; *tp != delim; tp++)
*** sedexec.c.orig Fri Apr 15 11:27:25 1988
--- sedexec.c Fri Apr 15 11:29:49 1988
***************
*** 225,230 ****
--- 225,231 ----
ipc++;
return(FALSE);
}
+ return(!ipc->flags.allbut);
}
static int match(expbuf, gf) /* uses genbuf */
--
uucp: mcvax!eutrc3!wswietse | Eindhoven University of Technology
bitnet: wswietse@heithe5 | Dept. of Mathematics and Computer Science
surf: tuerc5::wswietse | Eindhoven, The Netherlands.