aboutsummaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorjohn haque <j.eh@mchsi.com>2012-03-19 04:30:00 -0500
committerjohn haque <j.eh@mchsi.com>2012-03-19 04:30:00 -0500
commit40645cb3cb155eb59dd745af4ae0e06e729c8eb1 (patch)
tree1c24a9a6cb2ac9acc985b3f4667c7139c10c4525 /debug.c
parentb5431a4825e325c61f4043e4d25e47d7891c228c (diff)
downloadegawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.tar.gz
egawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.tar.bz2
egawk-40645cb3cb155eb59dd745af4ae0e06e729c8eb1.zip
Add arbitrary-precision arithmetic on integers.
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 331c7d3c..03fbf47d 100644
--- a/debug.c
+++ b/debug.c
@@ -1591,7 +1591,7 @@ condition_triggered(struct condition *cndn)
return FALSE; /* not triggered */
force_number(r);
- di = is_nonzero_num(r);
+ di = ! iszero(r);
DEREF(r);
return di;
}
@@ -3659,6 +3659,8 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp)
#ifdef HAVE_MPFR
if (m->flags & MPFN)
print_func(fp, "%s", mpg_fmt("%R*g", RND_MODE, m->mpg_numbr));
+ else if (m->flags & MPZN)
+ print_func(fp, "%s", mpg_fmt("%Zd", m->mpg_i));
else
#endif
print_func(fp, "%g", m->numbr);
@@ -3668,6 +3670,8 @@ print_memory(NODE *m, NODE *func, Func_print print_func, FILE *fp)
#ifdef HAVE_MPFR
if (m->flags & MPFN)
print_func(fp, "%s", mpg_fmt("%R*g", RND_MODE, m->mpg_numbr));
+ else if (m->flags & MPZN)
+ print_func(fp, "%s", mpg_fmt("%Zd", m->mpg_i));
else
#endif
print_func(fp, "%g", m->numbr);