awk: add comment about fixing bug 1333

Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
This commit is contained in:
Denys Vlasenko 2010-04-04 01:48:12 +02:00
parent fab288cf0b
commit 7379cd1ca1

View File

@ -2060,6 +2060,8 @@ static int awk_sub(node *rn, const char *repl, int nm, var *src, var *dest, int
//gsub(/\<b*/,"") on "abc" will reach this point, advance to "bc" //gsub(/\<b*/,"") on "abc" will reach this point, advance to "bc"
//... and will erroneously match "b" even though it is NOT at the word start. //... and will erroneously match "b" even though it is NOT at the word start.
//we need REG_NOTBOW but it does not exist... //we need REG_NOTBOW but it does not exist...
//TODO: if EXTRA_COMPAT=y, use GNU matching and re_search,
//it should be able to do it correctly.
/* Subtle: this is safe only because /* Subtle: this is safe only because
* qrealloc allocated at least one extra byte */ * qrealloc allocated at least one extra byte */
resbuf[residx] = *sp; resbuf[residx] = *sp;