diff options
Diffstat (limited to 'awk.h')
-rw-r--r-- | awk.h | 18 |
1 files changed, 18 insertions, 0 deletions
@@ -1071,6 +1071,8 @@ struct block_header { enum block_id { BLOCK_NODE = 0, BLOCK_BUCKET, + BLOCK_MPFR, + BLOCK_MPZ, BLOCK_MAX /* count */ }; @@ -1974,6 +1976,22 @@ erealloc_real(void *ptr, size_t count, const char *where, const char *var, const return ret; } +/* make_number_node --- make node with the give flags */ + +static inline NODE * +make_number_node(unsigned int tp) +{ + NODE *r; + getnode(r); + r->type = Node_val; + r->valref = 1; + r->flags = (tp|MALLOC|NUMBER|NUMCUR); + r->stptr = NULL; + r->stlen = 0; + r->wstptr = NULL; + r->wstlen = 0; + return r; +} /* * str_terminate_f, str_terminate, str_restore: function and macros to |