aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/awk.h b/awk.h
index 127eb927..0ab47914 100644
--- a/awk.h
+++ b/awk.h
@@ -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