Path: 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 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 /* {f}puts, {f}printf, getc/putc, f{re}open, fclose */ < #include /* 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 /* {f}puts, {f}printf, getc/putc, f{re}open, fclose */ > #include /* 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