aboutsummaryrefslogtreecommitdiffstats
path: root/awk.h
diff options
context:
space:
mode:
Diffstat (limited to 'awk.h')
-rw-r--r--awk.h17
1 files changed, 17 insertions, 0 deletions
diff --git a/awk.h b/awk.h
index 163ad362..0694bfa2 100644
--- a/awk.h
+++ b/awk.h
@@ -1062,6 +1062,8 @@ struct block_header {
enum block_id {
BLOCK_NODE = 0,
BLOCK_BUCKET,
+ BLOCK_MPFR,
+ BLOCK_MPZ,
BLOCK_MAX /* count */
};
@@ -1963,6 +1965,21 @@ erealloc_real(void *ptr, size_t count, const char *where, const char *var, const
return ret;
}
+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;
+}
+
#ifdef SIGPIPE
#define ignore_sigpipe() signal(SIGPIPE, SIG_IGN)
#define set_sigpipe_to_default() signal(SIGPIPE, SIG_DFL)