Article View: gnu.utils.bug
Article #984sed 1.09 uses wrong regular expression syntax
From: Rainer Orth
Date: Thu, 01 Oct 1992 17:11
Date: Thu, 01 Oct 1992 17:11
28 lines
1485 bytes
1485 bytes
GNU sed 1.09 uses a wrong syntax for its regular expression. POSIX P1003.2
draft 11.2 section 4.55.7.2 specifies basic regular expressions for sed.
At least sed.c (main) should call re_set_syntax without RE_NO_BK_BRACES,
since /bin/sed on SunOS 4.1.2, SunOS 5.0, and AIX 3.2 all require \{, \}
instead of plain {, } for intervals. This is also what POSIX specifies for
its basic regular expressions (2.8.3.3 (5)).
===================================================================
RCS file: RCS/sed.c,v
retrieving revision 1.1
diff -u -r1.1 sed.c
--- sed.c 1992/05/23 23:53:56 1.1
+++ sed.c 1992/10/01 15:05:46
@@ -327,7 +327,7 @@
struct sed_label *go,*lbl;
/* see regex.h */
- re_set_syntax (RE_INTERVALS | RE_NO_BK_BRACES);
+ re_set_syntax (RE_SYNTAX_POSIX_BASIC);
myname=argv[0];
-----------------------------------------------------------------------------
Rainer Orth, Technical Computer Science, University of Bielefeld
Internet: ro@TechFak.Uni-Bielefeld.DE
Technical Details
Message-ID:
<9210011511.AA19474@anemone.techfak.uni-bielefeld.de>Path:
arc1-ca.pugleaf.net!sparky!uunet!convex!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!techfak.uni-bielefeld.DE!roShow 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!techfak.uni-bielefeld.DE!ro From: ro@techfak.uni-bielefeld.DE (Rainer Orth) Subject: sed 1.09 uses wrong regular expression syntax Message-ID: <9210011511.AA19474@anemone.techfak.uni-bielefeld.de> Sender: gnulists@ai.mit.edu Organization: GNUs Not Usenet Distribution: gnu Date: Thu, 1 Oct 1992 17:11:21 GMT Approved: bug-gnu-utils@prep.ai.mit.edu Lines: 30