aboutsummaryrefslogtreecommitdiffstats
path: root/awkgram.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-13 18:39:10 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-06-13 18:39:10 -0400
commit18c6b0f85db6683f1d0789e800acfdd35da3ce07 (patch)
tree6f2bd19e71ca42fb2a784451b9486b652fc00090 /awkgram.c
parent0e02913c51b1d737b4d283901e22c57b954e65ae (diff)
downloadegawk-18c6b0f85db6683f1d0789e800acfdd35da3ce07.tar.gz
egawk-18c6b0f85db6683f1d0789e800acfdd35da3ce07.tar.bz2
egawk-18c6b0f85db6683f1d0789e800acfdd35da3ce07.zip
Fix usage of scalar type flag bits and fix some bugs in numeric conversions and lint checks.
Diffstat (limited to 'awkgram.c')
-rw-r--r--awkgram.c14
1 files changed, 1 insertions, 13 deletions
diff --git a/awkgram.c b/awkgram.c
index bd531efb..c40217c4 100644
--- a/awkgram.c
+++ b/awkgram.c
@@ -6422,7 +6422,7 @@ retry:
}
#endif
if (base != 10)
- d = nondec2awknum(tokstart, strlen(tokstart));
+ d = nondec2awknum(tokstart, strlen(tokstart), NULL);
else
d = atof(tokstart);
yylval->memory = make_number(d);
@@ -7031,18 +7031,6 @@ valinfo(NODE *n, Func_print print_func, FILE *fp)
else
#endif
print_func(fp, "%.17g\n", n->numbr);
- } else if ((n->flags & STRCUR) != 0) {
- pp_string_fp(print_func, fp, n->stptr, n->stlen, '"', false);
- print_func(fp, "\n");
- } else if ((n->flags & NUMCUR) != 0) {
-#ifdef HAVE_MPFR
- if (is_mpg_float(n))
- print_func(fp, "%s\n", mpg_fmt("%.17R*g", ROUND_MODE, n->mpg_numbr));
- else if (is_mpg_integer(n))
- print_func(fp, "%s\n", mpg_fmt("%Zd", n->mpg_i));
- else
-#endif
- print_func(fp, "%.17g\n", n->numbr);
} else
print_func(fp, "?? flags %s\n", flags2str(n->flags));
}