diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 17:54:22 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2012-09-17 17:54:22 -0700 |
commit | 9c0649bcfda1277ada69cc6e44f1df926458d922 (patch) | |
tree | 1a42978b1b5bea1089e8db38d9a04745be82c527 /stream.c | |
parent | 4a5a29a76b8e5aa139209aabe310c2179a60608d (diff) | |
download | txr-9c0649bcfda1277ada69cc6e44f1df926458d922.tar.gz txr-9c0649bcfda1277ada69cc6e44f1df926458d922.tar.bz2 txr-9c0649bcfda1277ada69cc6e44f1df926458d922.zip |
* stream.c (vformat): Slight change in ~s directive. For a floating
point integer, .0 is now always shown if the precision is not given,
or if it is given and nonzero. Previous behavior of ~s was add .0 only
when a precision is not specified. The new behavior is more
sensible and consistent with documentation.
* txr.1: Typo fixed in related documentation.
Diffstat (limited to 'stream.c')
-rw-r--r-- | stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1272,7 +1272,7 @@ val vformat(val stream, val fmtstr, va_list vl) *exp = 0; } - if (ch == 's' && !precision_p && !dec && !exp) + if (ch == 's' && (!precision_p || precision > 0) && !dec && !exp) strcat(num_buf, ".0"); } |