aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2014-08-03 14:44:47 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2014-08-03 14:44:47 -0400
commitff21da5c7f072a69e9582f1a7ae2039f27f564cf (patch)
tree8b20736585506232ddc6e30863745b1e71a1911b
parentd3bd5c88e7505063348d88604180d3e1e6e0f5a9 (diff)
parent873f410df729f1c7bbe2d3a8b95b41c9706d700d (diff)
downloadegawk-ff21da5c7f072a69e9582f1a7ae2039f27f564cf.tar.gz
egawk-ff21da5c7f072a69e9582f1a7ae2039f27f564cf.tar.bz2
egawk-ff21da5c7f072a69e9582f1a7ae2039f27f564cf.zip
Merge branch 'gawk-4.1-stable' to get --profile to work with -M.
-rw-r--r--ChangeLog5
-rw-r--r--awkgram.c2
-rw-r--r--awkgram.y2
3 files changed, 7 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a1bf3ac4..f7a4c311 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2014-08-03 Andrew J. Schorr <aschorr@telemetry-investments.com>
+
+ * awkgram.y (getfname): Match on either ptr or ptr2 so --profile
+ will work in -M (MPFR bignum) mode.
+
2014-07-31 Arnold D. Robbins <arnold@skeeve.com>
* builtin.c (format_tree): Make %c handling more sane on Windows.
diff --git a/awkgram.c b/awkgram.c
index 28776494..1c5e952d 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -4284,7 +4284,7 @@ getfname(NODE *(*fptr)(int))
j = sizeof(tokentab) / sizeof(tokentab[0]);
/* linear search, no other way to do it */
for (i = 0; i < j; i++)
- if (tokentab[i].ptr == fptr)
+ if (tokentab[i].ptr == fptr || tokentab[i].ptr2 == fptr)
return tokentab[i].operator;
return NULL;
diff --git a/awkgram.y b/awkgram.y
index 9e4f82b3..2ceb88e0 100644
--- a/awkgram.y
+++ b/awkgram.y
@@ -1945,7 +1945,7 @@ getfname(NODE *(*fptr)(int))
j = sizeof(tokentab) / sizeof(tokentab[0]);
/* linear search, no other way to do it */
for (i = 0; i < j; i++)
- if (tokentab[i].ptr == fptr)
+ if (tokentab[i].ptr == fptr || tokentab[i].ptr2 == fptr)
return tokentab[i].operator;
return NULL;