From owner-freebsd-hackers Wed Jul 7 12:42:57 1999 Delivered-To: freebsd-hackers@freebsd.org Received: from flood.ping.uio.no (flood.ping.uio.no [129.240.78.31]) by hub.freebsd.org (Postfix) with ESMTP id 4844A14FEE for ; Wed, 7 Jul 1999 12:42:51 -0700 (PDT) (envelope-from des@flood.ping.uio.no) Received: (from des@localhost) by flood.ping.uio.no (8.9.3/8.9.1) id VAA91613; Wed, 7 Jul 1999 21:42:31 +0200 (CEST) (envelope-from des) To: Jamie Howard Cc: Dag-Erling Smorgrav , freebsd-hackers@FreeBSD.ORG, tech-userlevel@netbsd.org, tech@openbsd.org Subject: Re: Replacement for grep(1) (part 2) References: From: Dag-Erling Smorgrav Date: 07 Jul 1999 21:42:31 +0200 In-Reply-To: Jamie Howard's message of "Wed, 7 Jul 1999 15:35:19 -0400 (EDT)" Message-ID: Lines: 39 X-Mailer: Gnus v5.5/Emacs 19.34 Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Jamie Howard writes: > On 7 Jul 1999, Dag-Erling Smorgrav wrote: > > I see you switched to using extended regexps by default, and made -E a > > no-op; this breaks the ports collection, so I changed it back. > > The FreeBSD, NetBSD, and OpenBSD manpage for grep says this: > > Grep understands two different versions of regular expression > syntax: ``basic'' and ``extended.'' In GNU grep, there is > no difference in available functionality using either syntax. > > Is this inaccurate or am I reading it wrong? One or the other. Try it out for yourself. root@flood /tmp# cat > foo abcd efgh ijkl abcd (efgh) ijkl root@flood /tmp# grep -V GNU grep version 2.0 usage: grep [-[AB] ] [-CEFGLVXHPRSZabchilnqsvwxy] [-e ] [-f file] [files ...] root@flood /tmp# grep '(efgh)' foo abcd (efgh) ijkl root@flood /tmp# grep -E '(efgh)' foo abcd efgh ijkl abcd (efgh) ijkl > > Don't use err() indiscriminately after a malloc() failure; malloc() > > doesn't set errno. > Shouldn't malloc be fixed? :) Should, but probably won't in the near future. Oh well. I guess you can just remove 'errno = ENOMEM' from grep_malloc() and grep_realloc() and blame phk if anyone complains :) DES -- Dag-Erling Smorgrav - des@flood.ping.uio.no To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message