gawk-diffs
[Top][All Lists]
Advanced

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

[gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-186


From: Andrew J. Schorr
Subject: [gawk-diffs] [SCM] gawk branch, feature/fixtype, updated. gawk-4.1.0-1864-g25b0547
Date: Tue, 28 Jun 2016 00:36:41 +0000 (UTC)

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, feature/fixtype has been updated
       via  25b0547949a05839988dae236fa9a28be6573586 (commit)
      from  e4863f1b6341cbcc4132a8161e000e81092b4d65 (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=25b0547949a05839988dae236fa9a28be6573586

commit 25b0547949a05839988dae236fa9a28be6573586
Author: Andrew J. Schorr <address@hidden>
Date:   Mon Jun 27 20:36:13 2016 -0400

    Add comment to awk.h regarding the potential lack of NUL-termination for 
strings.

diff --git a/ChangeLog b/ChangeLog
index 3f3541b..24dcaf3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
 2016-06-27         Andrew J. Schorr     <address@hidden>
 
+       * awk.h: Add a comment regarding the potential lack of NUL-termination
+       for Node_val strings.
+
+2016-06-27         Andrew J. Schorr     <address@hidden>
+
        * node.c (r_format_val): Do not free stptr unless STRCUR is set.
        This is safer than testing for non-NULL stptr, since, for example,
        pp_number copies a node and calls r_format_val, but does not bother
diff --git a/awk.h b/awk.h
index 1d1e4fb..c737c16 100644
--- a/awk.h
+++ b/awk.h
@@ -476,6 +476,13 @@ typedef struct exp_node {
 #define re_cnt flags
 
 /* Node_val */
+/*
+ * Note that the string in stptr may not be NUL-terminated, but it is
+ * guaranteed to have at least one extra byte that may be temporarily set
+ * to '\0'. This is helpful when calling functions such as strtod that require
+ * a NUL-terminated argument. In particular, field values $n for n > 0 and
+ * n < NF will not have a NUL terminator, since they point into the $0 buffer.
+ */
 #define stptr  sub.val.sp
 #define stlen  sub.val.slen
 #define valref sub.val.sref

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

Summary of changes:
 ChangeLog |    5 +++++
 awk.h     |    7 +++++++
 2 files changed, 12 insertions(+)


hooks/post-receive
-- 
gawk



reply via email to

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