diff options
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | NEWS | 8 | ||||
-rw-r--r-- | dfa.c | 7 | ||||
-rw-r--r-- | interpret.h | 24 |
4 files changed, 23 insertions, 25 deletions
@@ -1,3 +1,12 @@ +2014-11-16 Arnold D. Robbins <arnold@skeeve.com> + + * interpret.h: Revert change of 2014-11-11 since it breaks + certain uses. + + Unrelated: + + * dfa.c: Sync with GNU grep. + 2014-11-15 Arnold D. Robbins <arnold@skeeve.com> * array.c, awk.h, awkgram.y, builtin.c, dfa.c, eval.c, field.c, @@ -62,17 +62,19 @@ Changes from 4.1.1 to 4.1.2 5. Indirect function calls now work for both built-in and extension functions. -6. In non-English locales, it was accidentally possible to use "letters" +6. Built-in functions are now included in FUNCTAB. + +7. In non-English locales, it was accidentally possible to use "letters" beside those of the English alphabet in identifiers. This has been fixed. (isalpha and isalnum are NOT our friends.) If you feel that you must have this misfeature, use `configure --help' to see what option to use when configuring gawk to reenable it. -7. The "where" command has been added to the debugger as an alias +8. The "where" command has been added to the debugger as an alias for "backtrace". This will make life easier for long-time GDB users. -8. Gawk no longer explicitly checks the current directory after doing +9. Gawk no longer explicitly checks the current directory after doing a path search of AWKPATH. The default value continues to have "." at the front, so most people should not be affected. If you have your own AWKPATH setting, be sure to put "." in it somewhere. The documentation @@ -3685,8 +3685,11 @@ dfassbuild (struct dfa *d) sup->musts = NULL; sup->charclasses = xnmalloc (sup->calloc, sizeof *sup->charclasses); - memcpy (sup->charclasses, d->charclasses, - d->cindex * sizeof *sup->charclasses); + if (d->cindex) + { + memcpy (sup->charclasses, d->charclasses, + d->cindex * sizeof *sup->charclasses); + } sup->tokens = xnmalloc (d->tindex, 2 * sizeof *sup->tokens); sup->talloc = d->tindex * 2; diff --git a/interpret.h b/interpret.h index 1b8b09b0..2ffd07f2 100644 --- a/interpret.h +++ b/interpret.h @@ -340,12 +340,7 @@ uninitialized_scalar: lhs = r_get_field(t1, (Func_ptr *) 0, true); decr_sp(); DEREF(t1); - /* only for $0, up ref count */ - if (*lhs == fields_arr[0]) { - r = *lhs; - UPREF(r); - } else - r = dupnode(*lhs); + r = dupnode(*lhs); /* can't use UPREF here */ PUSH(r); break; @@ -654,22 +649,11 @@ mod: lhs = get_lhs(pc->memory, false); unref(*lhs); r = pc->initval; /* constant initializer */ - if (r != NULL) { + if (r == NULL) + *lhs = POP_SCALAR(); + else { UPREF(r); *lhs = r; - } else { - r = POP_SCALAR(); - - /* if was a field, turn it into a var */ - if ((r->flags & FIELD) == 0) { - *lhs = r; - } else if (r->valref == 1) { - r->flags &= ~FIELD; - *lhs = r; - } else { - *lhs = dupnode(r); - DEREF(r); - } } break; |