gawk-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1773-g7eed15


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, master, updated. gawk-4.1.0-1773-g7eed151
Date: Tue, 03 May 2016 16:43:48 +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, master has been updated
       via  7eed1513d0834de26528551f990372a5c2674ef2 (commit)
       via  a9f8c06d673af6c51153bc8008e58276cecfef6b (commit)
       via  a6df7afc605079df7d85318846a522ef64aaa44d (commit)
      from  315f1d61de4e536642e1bcf9f10903e3dd4f584b (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=7eed1513d0834de26528551f990372a5c2674ef2

commit 7eed1513d0834de26528551f990372a5c2674ef2
Author: Andrew J. Schorr <address@hidden>
Date:   Tue May 3 12:43:30 2016 -0400

    Stop wasting extra byte at the end of sprintf strings.

diff --git a/ChangeLog b/ChangeLog
index bb9cadf..45ba7f6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2016-05-03         Andrew J. Schorr     <address@hidden>
 
+       * builtin.c (format_tree): Do not waste a byte at the end of a string.
+
+2016-05-03         Andrew J. Schorr     <address@hidden>
+
        * builtin.c (format_tree): After the string has been rendered, use
        realloc to shrink the buffer to the needed size. Otherwise, the minimum
        buffer size of 512 bytes can result in lots of wasted memory if many
diff --git a/builtin.c b/builtin.c
index 31c13a8..77314d4 100644
--- a/builtin.c
+++ b/builtin.c
@@ -722,7 +722,7 @@ format_tree(
        emalloc(obuf, char *, INITIAL_OUT_SIZE, "format_tree");
        obufout = obuf;
        osiz = INITIAL_OUT_SIZE;
-       ofre = osiz - 2;
+       ofre = osiz - 1;
 
        cur_arg = 1;
 
@@ -1584,7 +1584,7 @@ mpf1:
        bchunk(s0, s1 - s0);
        olen_final = obufout - obuf;
        if (ofre > 0)
-               erealloc(obuf, char *, olen_final + 2, "format_tree");
+               erealloc(obuf, char *, olen_final + 1, "format_tree");
        r = make_str_node(obuf, olen_final, ALREADY_MALLOCED);
        obuf = NULL;
 out:

http://git.sv.gnu.org/cgit/gawk.git/commit/?id=a9f8c06d673af6c51153bc8008e58276cecfef6b

commit a9f8c06d673af6c51153bc8008e58276cecfef6b
Merge: 315f1d6 a6df7af
Author: Andrew J. Schorr <address@hidden>
Date:   Tue May 3 12:32:35 2016 -0400

    Merge branch 'gawk-4.1-stable'


-----------------------------------------------------------------------

Summary of changes:
 ChangeLog |   11 +++++++++++
 builtin.c |    9 ++++++---
 2 files changed, 17 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
gawk



reply via email to

[Prev in Thread] Current Thread [Next in Thread]