aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorArnold D. Robbins <arnold@skeeve.com>2016-06-16 22:31:10 +0300
committerArnold D. Robbins <arnold@skeeve.com>2016-06-16 22:31:10 +0300
commitdb16a6179a87af037966e5192146ba908f4c9ba8 (patch)
tree4d7293289aab5b31c704208da6fc9c8ee88f371f
parentf4bbf63a287cd73f4eb989539e4813a428bf05ad (diff)
parentb5c92588dc5972fab63ee2b2b8983a74e6fa5872 (diff)
downloadegawk-db16a6179a87af037966e5192146ba908f4c9ba8.tar.gz
egawk-db16a6179a87af037966e5192146ba908f4c9ba8.tar.bz2
egawk-db16a6179a87af037966e5192146ba908f4c9ba8.zip
Merge branch 'master' into feature/fixtype
-rw-r--r--ChangeLog6
-rw-r--r--awk.h11
2 files changed, 17 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 106f3b3f..4dd62dc1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2016-06-16 Arnold D. Robbins <arnold@skeeve.com>
+
+ * awk.h: Add comment headers for several functions.
+ * builtin.c (nondec2awknum): Actually set a '\0' before
+ calling to strtod() so that the save and restore do something.
+
2016-06-15 Arnold D. Robbins <arnold@skeeve.com>
* config.sub: Update from GNULIB.
diff --git a/awk.h b/awk.h
index 0a7059b1..8b899b85 100644
--- a/awk.h
+++ b/awk.h
@@ -1782,6 +1782,8 @@ dupnode(NODE *n)
}
#endif
+/* force_string --- force a node to have a string value */
+
static inline NODE *
force_string(NODE *s)
{
@@ -1800,6 +1802,8 @@ force_string(NODE *s)
#define force_number str2number
#else /* not GAWKDEBUG */
+/* unref --- decrease the reference count and/or free a node */
+
static inline void
unref(NODE *r)
{
@@ -1807,6 +1811,8 @@ unref(NODE *r)
r_unref(r);
}
+/* force_number --- force a node to have a numeric value */
+
static inline NODE *
force_number(NODE *n)
{
@@ -1818,6 +1824,7 @@ force_number(NODE *n)
#endif /* GAWKDEBUG */
+
/*
* In certain contexts, the true type of a scalar value matters, and we
* must ascertain whether it is a a NUMBER or a STRING. In such situations,
@@ -1856,6 +1863,8 @@ boolval(NODE *t)
return (t->stlen > 0);
}
+/* emalloc_real --- malloc with error checking */
+
static inline void *
emalloc_real(size_t count, const char *where, const char *var, const char *file, int line)
{
@@ -1872,6 +1881,8 @@ emalloc_real(size_t count, const char *where, const char *var, const char *file,
return ret;
}
+/* erealloc_real --- realloc with error checking */
+
static inline void *
erealloc_real(void *ptr, size_t count, const char *where, const char *var, const char *file, int line)
{