1
0
mirror of git://git.sv.gnu.org/coreutils.git synced 2026-07-25 10:16:53 +02:00

(docolon): Give a warning when the first character

of the basic regular expression is `^'.
This commit is contained in:
Jim Meyering
1996-05-30 02:32:03 +00:00
parent ab8cec12c9
commit f1d4b41340
+8
View File
@@ -421,6 +421,14 @@ docolon (VALUE *sv, VALUE *pv)
tostring (sv);
tostring (pv);
if (pv->u.s[0] == '^')
{
error (0, 0, _("\
warning: unportable BRE: `%s': using `^' as the first character \n\
of the basic regular expression is not portable; it is being ignored"),
pv->u.s);
}
len = strlen (pv->u.s);
memset (&re_buffer, 0, sizeof (re_buffer));
memset (&re_regs, 0, sizeof (re_regs));