[PATCH 14/17] Regex: Improve error text for REG_EBRACK.

Arnold Robbins arnold@skeeve.com
Fri Dec 8 09:20:00 GMT 2017


This patch improves the error text for REG_EBRACK.

2017-11-30         Arnold D. Robbins     <arnold@skeeve.com>

	* regcomp.c (__re_error_msgid): Improve the text for REG_EBRACK.

diff --git a/posix/regcomp.c b/posix/regcomp.c
index 701855a..8920cf1 100644
--- a/posix/regcomp.c
+++ b/posix/regcomp.c
@@ -155,9 +155,9 @@ const char __re_error_msgid[] attribute_hidden =
     gettext_noop ("Invalid back reference") /* REG_ESUBREG */
     "\0"
 #define REG_EBRACK_IDX	(REG_ESUBREG_IDX + sizeof "Invalid back reference")
-    gettext_noop ("Unmatched [ or [^")	/* REG_EBRACK */
+    gettext_noop ("Unmatched [, [^, [:, [., or [=")	/* REG_EBRACK */
     "\0"
-#define REG_EPAREN_IDX	(REG_EBRACK_IDX + sizeof "Unmatched [ or [^")
+#define REG_EPAREN_IDX	(REG_EBRACK_IDX + sizeof "Unmatched [, [^, [:, [., or [=")
     gettext_noop ("Unmatched ( or \\(") /* REG_EPAREN */
     "\0"
 #define REG_EBRACE_IDX	(REG_EPAREN_IDX + sizeof "Unmatched ( or \\(")



More information about the Libc-alpha mailing list