[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-735
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-735-g26ab51c |
Date: |
Fri, 04 Sep 2015 11:32:39 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "gawk".
The branch, gawk-4.1-stable has been updated
via 26ab51cc70109abd04ac04ff75bb58abb2eb957f (commit)
from 243b097279a89d456fda4a400412482d70b3665c (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.sv.gnu.org/cgit/gawk.git/commit/?id=26ab51cc70109abd04ac04ff75bb58abb2eb957f
commit 26ab51cc70109abd04ac04ff75bb58abb2eb957f
Author: Arnold D. Robbins <address@hidden>
Date: Fri Sep 4 14:32:07 2015 +0300
Profiling: print integral values as integers.
diff --git a/ChangeLog b/ChangeLog
index e685dd6..209c07f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2015-09-04 Arnold D. Robbins <address@hidden>
+
+ * profile.c (pp_num): Use format_val to print integral values
+ as integers. Thanks to Hermann Peifer for the report.
+
2015-08-25 Arnold D. Robbins <address@hidden>
* node.c (str2wstr): Upon finding an invalid character, if
diff --git a/profile.c b/profile.c
index 74fc4f9..5af7b92 100644
--- a/profile.c
+++ b/profile.c
@@ -1343,9 +1343,19 @@ pp_number(NODE *n)
} else
#endif
{
- count = PP_PRECISION + 10;
- emalloc(str, char *, count, "pp_number");
- sprintf(str, "%0.*g", PP_PRECISION, n->numbr);
+ /* Use format_val() to get integral values printed as integers
*/
+ NODE *s;
+
+ getnode(s);
+ *s = *n;
+ s->flags &= ~STRCUR;
+
+ s = r_format_val("%.6g", 0, s);
+
+ s->stptr[s->stlen] = '\0';
+ str = s->stptr;
+
+ freenode(s);
}
return str;
diff --git a/test/ChangeLog b/test/ChangeLog
index 7b9e273..2de6750 100644
--- a/test/ChangeLog
+++ b/test/ChangeLog
@@ -1,3 +1,7 @@
+2015-09-04 Arnold D. Robbins <address@hidden>
+
+ * profile.ok: Updated after code change.
+
2015-08-25 Arnold D. Robbins <address@hidden>
* mbstr1.ok: Updated after code change.
diff --git a/test/profile5.ok b/test/profile5.ok
index bff767e..2bae16b 100644
--- a/test/profile5.ok
+++ b/test/profile5.ok
@@ -2872,7 +2872,7 @@
_MACPFX84SFX["\204"] = "_macpfx84"
_MACPFX84SFX["\224"] = "_macsfx94"
_MACPFX84SFX[""] = "_mpusfxsubret"
- _VLDMAXSTRING = 1e+06
+ _VLDMAXSTRING = 1000000
}
function _macpfx84(F, D, C, p1, p2, p3)
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 5 +++++
profile.c | 16 +++++++++++++---
test/ChangeLog | 4 ++++
test/profile5.ok | 2 +-
4 files changed, 23 insertions(+), 4 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, gawk-4.1-stable, updated. gawk-4.1.0-735-g26ab51c,
Arnold Robbins <=