Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 5 Dec 2020 03:18:49 +0000 (UTC)
From:      Kyle Evans <kevans@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r368359 - head/lib/libc/regex
Message-ID:  <202012050318.0B53InNv094940@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: kevans
Date: Sat Dec  5 03:18:48 2020
New Revision: 368359
URL: https://svnweb.freebsd.org/changeset/base/368359

Log:
  libc: regex: retire internal EMPTBR ("Empty branch present")
  
  It was realized just a little too late that this was a hack that belonged in
  individual regex(3)-using applications. It was surrounded in NOTYET and not
  implemented in the engine, so remove it.

Modified:
  head/lib/libc/regex/regcomp.c
  head/lib/libc/regex/regex2.h

Modified: head/lib/libc/regex/regcomp.c
==============================================================================
--- head/lib/libc/regex/regcomp.c	Sat Dec  5 03:16:05 2020	(r368358)
+++ head/lib/libc/regex/regcomp.c	Sat Dec  5 03:18:48 2020	(r368359)
@@ -691,15 +691,9 @@ static bool
 p_branch_empty(struct parse *p, struct branchc *bc)
 {
 
-#if defined(LIBREGEX) && defined(NOTYET)
-	if (bc->outer)
-		p->g->iflags |= EMPTBR;
-	return (true);
-#else
 	(void)bc;
 	SETERROR(REG_EMPTY);
 	return (false);
-#endif
 }
 
 /*

Modified: head/lib/libc/regex/regex2.h
==============================================================================
--- head/lib/libc/regex/regex2.h	Sat Dec  5 03:16:05 2020	(r368358)
+++ head/lib/libc/regex/regex2.h	Sat Dec  5 03:18:48 2020	(r368359)
@@ -186,7 +186,6 @@ struct re_guts {
 #		define	USEBOL	01	/* used ^ */
 #		define	USEEOL	02	/* used $ */
 #		define	BAD	04	/* something wrong */
-#		define	EMPTBR	010	/* empty branch present */
 	int nbol;		/* number of ^ used */
 	int neol;		/* number of $ used */
 	char *must;		/* match must contain this string */



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202012050318.0B53InNv094940>