diff options
author | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-29 22:03:40 +0200 |
---|---|---|
committer | Arnold D. Robbins <arnold@skeeve.com> | 2010-11-29 22:03:40 +0200 |
commit | da212ddb7ed3f4578f1c83d9e0e472245efbea1e (patch) | |
tree | 325d01bb8203e5ea4bd70ff06faffbf21cb93beb /re.c | |
parent | 28436897d3289b4fe1b7e84e63c9cffecfcb17f6 (diff) | |
download | gawk-da212ddb7ed3f4578f1c83d9e0e472245efbea1e.tar.gz |
Doc updates. Strftime fix for PC. Check ranges in REs.
Diffstat (limited to 're.c')
-rw-r--r-- | re.c | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -533,10 +533,20 @@ again: goto done; for (count++, sp++; *sp != '\0'; sp++) { + static short range_warned = FALSE; + if (*sp == '[') count++; else if (*sp == ']') count--; + if (*sp == '-' && ! range_warned && count == 1 + && sp[-1] != '[' && sp[1] != ']' + && ! isdigit(sp[-1]) && ! isdigit(sp[1])) { + /* found a range, we think */ + range_warned = TRUE; + warning(_("range of the form `[%c-%c]' is locale dependant"), + sp[-1], sp[1]); + } if (count == 0) break; } |