aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h11
1 files changed, 11 insertions, 0 deletions
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)
{