aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/awk.h b/awk.h
index 1d1e4fb8..c737c16b 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