diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-08-31 14:58:21 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-08-31 14:58:21 -0700 |
commit | af11cf8971267c7e44c400477383d5fa8acf9771 (patch) | |
tree | 957c1e6b383a16ad3ff6b717ea95f04c2fd096bd /stream.c | |
parent | 7a4304462d4004d51f748ed83bb9e7dcd6a958cd (diff) | |
download | txr-af11cf8971267c7e44c400477383d5fa8acf9771.tar.gz txr-af11cf8971267c7e44c400477383d5fa8acf9771.tar.bz2 txr-af11cf8971267c7e44c400477383d5fa8acf9771.zip |
* stream.c (vformat): Bugfix: under the ~a and ~s directives,
apply field formatting to the object not only if a nonzero width has
been specified, but also if precision has been specified.
* txr.1: documented stream global variables and format.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1285,7 +1285,7 @@ val vformat(val stream, val fmtstr, va_list vl) precision = 0; goto output_num; default: - if (width != 0) { + if (width != 0 || precision_p) { val str = format(nil, ch == 'a' ? lit("~a") : lit("~s"), obj, nao); if (!vformat_str(stream, str, width, left, precision)) |