From d52d17b46e53bb0d4a991cd32f859eb349d3b101 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Mon, 10 Jun 2013 06:05:58 +0300 Subject: Remove obsolete warning in re.c. --- re.c | 10 ---------- 1 file changed, 10 deletions(-) (limited to 're.c') diff --git a/re.c b/re.c index a4891cb1..e427a8fe 100644 --- a/re.c +++ b/re.c @@ -555,8 +555,6 @@ again: goto done; for (count++, sp++; *sp != '\0'; sp++) { - static bool range_warned = false; - if (*sp == '[') count++; /* @@ -575,14 +573,6 @@ again: count--; } - if (*sp == '-' && do_lint && ! range_warned && count == 1 - && sp[-1] != '[' && sp[1] != ']' - && ! isdigit((unsigned char) sp[-1]) && ! isdigit((unsigned char) sp[1]) - && ! (sp[-2] == '[' && sp[-1] == '^')) { - range_warned = true; - warning(_("range of the form `[%c-%c]' is locale dependent"), - sp[-1], sp[1]); - } if (count == 0) { sp++; /* skip past ']' */ break; -- cgit v1.2.3 From c3e4d0cf3f1fd24164e0a58db23b86b56c6dc7c8 Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Sun, 8 Sep 2013 12:46:20 +0200 Subject: Fixes based on problems from a static checker. --- re.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 're.c') diff --git a/re.c b/re.c index e427a8fe..b9db6556 100644 --- a/re.c +++ b/re.c @@ -259,7 +259,7 @@ research(Regexp *rp, char *str, int start, size_t len, int flags) { const char *ret = str; - int try_backref; + int try_backref = false; int need_start; int no_bol; int res; -- cgit v1.2.3 From 9a5ad7ae3c0bb78eebdf18ede5521e2cd14f111c Mon Sep 17 00:00:00 2001 From: "Arnold D. Robbins" Date: Wed, 16 Oct 2013 05:09:23 +0300 Subject: Add a comment in re.c:resetup. --- re.c | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 're.c') diff --git a/re.c b/re.c index b9db6556..9118129e 100644 --- a/re.c +++ b/re.c @@ -396,6 +396,13 @@ re_update(NODE *t) void resetup() { + /* + * Syntax bits: _that_ is yet another mind trip. Recreational drugs + * are helpful for recovering from the experience. + * + * Aharon Robbins + * Sun, 21 Oct 2007 23:55:33 +0200 + */ if (do_posix) syn = RE_SYNTAX_POSIX_AWK; /* strict POSIX re's */ else if (do_traditional) -- cgit v1.2.3