Article View: gnu.utils.bug
Article #1069sed-1.12 bug: -n flag
From: bothner
Date: Tue, 10 Nov 1992 07:18
Date: Tue, 10 Nov 1992 07:18
40 lines
1645 bytes
1645 bytes
It seems to me that the -n flag is a trifle hyper-active: If should not suppress the output from the 'p' and 'w' flags of the 's[ubstitute]' command. A patch is included below. If you're unconvinced, I can send a test case. This bug prevents libg++ from configuring when using sed-1.12. --Per Bothner Cygnus Support bothner@cygnus.com *** sed.c~ Wed Nov 4 20:34:47 1992 --- sed.c Tue Nov 10 13:30:33 1992 *************** *** 1562,1573 **** tmp.text = t.text; tmp.length = t.length; tmp.alloc = t.alloc; ! if (cur_cmd->x.cmd_regex.flags & S_WRITE_BIT ! && !no_default_output) ck_fwrite (line.text, 1, line.length, cur_cmd->x.cmd_regex.wio_file); ! if (cur_cmd->x.cmd_regex.flags & S_PRINT_BIT ! && !no_default_output) ck_fwrite (line.text, 1, line.length, stdout); break; --- 1562,1571 ---- tmp.text = t.text; tmp.length = t.length; tmp.alloc = t.alloc; ! if (cur_cmd->x.cmd_regex.flags & S_WRITE_BIT) ck_fwrite (line.text, 1, line.length, cur_cmd->x.cmd_regex.wio_file); ! if (cur_cmd->x.cmd_regex.flags & S_PRINT_BIT) ck_fwrite (line.text, 1, line.length, stdout); break;
Technical Details
Message-ID:
<9211102318.AA00366@cygnus.com>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!bothnerShow Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug Path: arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!cygnus.com!bothner From: bothner@cygnus.com Subject: sed-1.12 bug: -n flag Message-ID: <9211102318.AA00366@cygnus.com> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Tue, 10 Nov 1992 07:18:04 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 41