aboutsummaryrefslogtreecommitdiffstats
path: root/builtin.c
diff options
context:
space:
mode:
authorAndrew J. Schorr <aschorr@telemetry-investments.com>2016-07-04 11:20:07 -0400
committerAndrew J. Schorr <aschorr@telemetry-investments.com>2016-07-04 11:20:07 -0400
commitcedd0829b0075533986fce1e699bc6ae511a891e (patch)
treee2a67bf0ee7d67cb7b078f2863233529d5aece02 /builtin.c
parentb3fa425feb23dd36e82d4dd71f0bc1e03495a46b (diff)
downloadegawk-cedd0829b0075533986fce1e699bc6ae511a891e.tar.gz
egawk-cedd0829b0075533986fce1e699bc6ae511a891e.tar.bz2
egawk-cedd0829b0075533986fce1e699bc6ae511a891e.zip
Unify force_string handling of CONVFMT and OFMT.
Diffstat (limited to 'builtin.c')
-rw-r--r--builtin.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/builtin.c b/builtin.c
index 92ac9e49..a01018e3 100644
--- a/builtin.c
+++ b/builtin.c
@@ -2200,12 +2200,7 @@ do_print(int nargs, int redirtype)
DEREF(args_array[i]);
fatal(_("attempt to use array `%s' in a scalar context"), array_vname(tmp));
}
-
- if (tmp->type == Node_typedregex)
- args_array[i] = force_string(tmp);
- else if (!((tmp->flags & STRCUR) != 0
- && (tmp->stfmt == STFMT_UNUSED || tmp->stfmt == OFMTidx)))
- args_array[i] = format_val(OFMT, OFMTidx, tmp);
+ args_array[i] = force_string_ofmt(tmp);
}
if (redir_exp != NULL) {