[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gawk-diffs] [SCM] gawk branch, wasted-byte, updated. gawk-4.1.0-1014-g0
From: |
Arnold Robbins |
Subject: |
[gawk-diffs] [SCM] gawk branch, wasted-byte, updated. gawk-4.1.0-1014-g06cd783 |
Date: |
Thu, 18 Dec 2014 19:26:32 +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, wasted-byte has been updated
via 06cd783a8994b704c066aa59e11a6e76292d806e (commit)
from 6e786e9ea47966a9cac7cfef4a4079ac379580b0 (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=06cd783a8994b704c066aa59e11a6e76292d806e
commit 06cd783a8994b704c066aa59e11a6e76292d806e
Author: Arnold D. Robbins <address@hidden>
Date: Thu Dec 18 21:26:14 2014 +0200
More removal of extra unused byte.
diff --git a/ChangeLog b/ChangeLog
index 851eab2..f37a8c2 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-18 Arnold D. Robbins <address@hidden>
+
+ * builtin.c (do_sub): Do not waste a byte at the end of a string.
+
2014-12-14 Arnold D. Robbins <address@hidden>
* awkgram.y (yyerror): Do not waste a byte at the end of a string.
diff --git a/builtin.c b/builtin.c
index 067b410..42058ec 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2874,8 +2874,8 @@ set_how_many:
lastmatchnonzero = false;
- /* guesstimate how much room to allocate; +2 forces > 0 */
- buflen = textlen + (ampersands + 1) * repllen + 2;
+ /* guesstimate how much room to allocate; +1 forces > 0 */
+ buflen = textlen + (ampersands + 1) * repllen + 1;
emalloc(buf, char *, buflen + 1, "do_sub");
buf[buflen] = '\0';
diff --git a/helpers/ChangeLog b/helpers/ChangeLog
index a5bbafb..2cb3be4 100644
--- a/helpers/ChangeLog
+++ b/helpers/ChangeLog
@@ -1,3 +1,7 @@
+2014-12-18 Arnold D. Robbins <address@hidden>
+
+ * testdfa.c (setup_pattern): Do not waste a byte at the end of a string.
+
2014-09-04 Arnold D. Robbins <address@hidden>
* chlistref.awk: New file. Finds @ref{} to non-chapters.
diff --git a/helpers/testdfa.c b/helpers/testdfa.c
index 25a229a..092a13d 100644
--- a/helpers/testdfa.c
+++ b/helpers/testdfa.c
@@ -392,14 +392,14 @@ setup_pattern(const char *pattern, size_t *len)
* from that.
*/
if (buf == NULL) {
- buf = (char *) malloc(*len + 2);
+ buf = (char *) malloc(*len + 1);
if (buf == NULL) {
fprintf(stderr, "%s: malloc failed\n", __func__);
exit(EXIT_FAILURE);
}
buflen = *len;
} else if (*len > buflen) {
- buf = (char *) realloc(buf, *len + 2);
+ buf = (char *) realloc(buf, *len + 1);
if (buf == NULL) {
fprintf(stderr, "%s: realloc failed\n", __func__);
exit(EXIT_FAILURE);
diff --git a/old-extension/ChangeLog b/old-extension/ChangeLog
index 55c8d31..51f44db 100644
--- a/old-extension/ChangeLog
+++ b/old-extension/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-18 Arnold D. Robbins <address@hidden>
+
+ * bindarr.c (do_bind_array): Do not waste a byte at the end of a string.
+ * fileop.c (do_fread): Ditto.
+
2014-01-07 Arnold D. Robbins <address@hidden>
* dbarray.awk: Use full name for lib to load in extenstion() call.
diff --git a/old-extension/bindarr.c b/old-extension/bindarr.c
index 6095990..28da389 100644
--- a/old-extension/bindarr.c
+++ b/old-extension/bindarr.c
@@ -235,7 +235,7 @@ do_bind_array(int nargs)
}
/* copy the array -- this is passed as the second argument to the
functions */
- emalloc(aname, char *, strlen(t->vname) + 2, "do_bind_array");
+ emalloc(aname, char *, strlen(t->vname) + 1, "do_bind_array");
aname[0] = '~'; /* any illegal character */
strcpy(& aname[1], symbol->vname);
td = make_array();
diff --git a/old-extension/fileop.c b/old-extension/fileop.c
index 86f6257..d76a7de 100644
--- a/old-extension/fileop.c
+++ b/old-extension/fileop.c
@@ -55,7 +55,7 @@ do_fread(int nargs)
force_number(arg);
rlen = get_number_ui(arg);
- emalloc(rbuf, char *, rlen + 2, "do_fread");
+ emalloc(rbuf, char *, rlen + 1, "do_fread");
if ((count = fread(rbuf, 1, rlen, f->fp)) < rlen) {
if (! feof(f->fp))
update_ERRNO_int(errno);
-----------------------------------------------------------------------
Summary of changes:
ChangeLog | 4 ++++
builtin.c | 4 ++--
helpers/ChangeLog | 4 ++++
helpers/testdfa.c | 4 ++--
old-extension/ChangeLog | 5 +++++
old-extension/bindarr.c | 2 +-
old-extension/fileop.c | 2 +-
7 files changed, 19 insertions(+), 6 deletions(-)
hooks/post-receive
--
gawk
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [gawk-diffs] [SCM] gawk branch, wasted-byte, updated. gawk-4.1.0-1014-g06cd783,
Arnold Robbins <=