Article View: gnu.utils.bug
Article #327SED bug
From: Dario Alcocer
Date: Fri, 28 Jul 1989 20:46
Date: Fri, 28 Jul 1989 20:46
72 lines
2687 bytes
2687 bytes
Hello, I wanted to report a bug in GNU sed. Whenever a
regular expression range is specified, the negate operator
(\!) does not work correctly. I think I have a fix, but
I wanted to check with you first. My fix is contained in
the following lines; this is output from Bob Stout's
diff program:
DIFF 2.01B
< \TEMP\SEDEXEC.C
> \TMP\SEDEXEC.C
------------------------------------
16,16
< #include <stdio.h> /* {f}puts, {f}printf, getc/putc, f{re}open, fclose */
< #include <ctype.h> /* for isprint(), isdigit(), toascii() macros */
< #include "sed.h" /* command type structures & miscellaneous constants */
< #include "sed.dcl"
---
> /*
> BUG FIX:
> Changed match() so that regular expression addresses will NOT be matched
> if the allbut flag is true. Changed by Dario Alcocer 7/12/89.
> */
21,22
< extern char *strcpy(); /* used in dosub */
---
> #include <stdio.h> /* {f}puts, {f}printf, getc/putc, f{re}open, fclose */
> #include <ctype.h> /* for isprint(), isdigit(), toascii() macros */
> #include "sed.h" /* command type structures & miscellaneous constants */
> #include "sed.dcl"
23,27
< /***** shared variables imported from the main ******/
---
> extern char *strcpy(); /* used in dosub */
29
> /***** shared variables imported from the main ******/
>
213,219
< }
< else
< {
< if (ipc->flags.allbut)
< return(TRUE);
< ipc++;
< return(FALSE);
---
> /*
> * Code added 7/12/89 by Dario Alcocer to prevent
> * regular expression addresses from being matched if
> * the allbut flag is true.
> */
> if (ipc->flags.allbut)
> return(FALSE);
227
> else
> {
> if (ipc->flags.allbut)
> return(TRUE);
> ipc++;
> return(FALSE);
> }
eof \TEMP\SEDEXEC.C
Please let me know if this fix is correct. I can be
reached voice at 619-450-1667 ext. 6363, or at
dar@nucleus.mi.org (try to logon regularly, but
sometimes I can't get on for days...).
Thanks for your attention,
Dario Alcocer
Technical Details
Message-ID:
<8907281646.AA02801@nucleus.mi.org>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!tut.cis.ohio-state.edu!nucleus.mi.org!darShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!watmath!iuvax!mailrus!tut.cis.ohio-state.edu!nucleus.mi.org!dar From: dar@nucleus.mi.org (Dario Alcocer) Newsgroups: gnu.utils.bug Subject: SED bug Message-ID: <8907281646.AA02801@nucleus.mi.org> Date: 28 Jul 89 20:46:32 GMT Sender: daemon@tut.cis.ohio-state.edu Distribution: gnu Organization: GNUs Not Usenet Lines: 72