Commit graph

25 commits

Author SHA1 Message Date
Alex Shinn
cf1f333731 fixing edge cases 2019-03-12 00:37:00 +08:00
Alex Shinn
956e7ba761 allow proper list for comma-rule 2019-03-11 23:51:42 +08:00
Alex Shinn
bd78ebeed7 updating sign-rule to respect finalized SRFI 159 2019-03-10 14:50:44 +08:00
Alex Shinn
7380564933 inserting commas in numerator and denominator separately for rationals 2019-02-28 00:09:08 +08:00
Alex Shinn
4c5bdcb22c allowing strings for decimal-sep; s/fn-fork/forked/g 2019-02-27 23:59:10 +08:00
Alex Shinn
2c3dfbd295 fixing default padding/trimming to be left, matching the spec (from SRFI 13 convention) 2019-02-27 22:52:18 +08:00
Jim Rees
b3100857fd Fixed escaped to support the documented double-quoting functionality
when esc-char is #f.
2018-03-26 06:44:37 -04:00
Jim Rees
88e8d89460 Fixed integer-log-base to use exact arithmetic so rounding doesn't cause
a wrong result to things like (numeric (- (* 36 36 36) 1) 36).

Fixed a bug in numeric that caused comma-sep and dec-sep to get
initialized wrongly.

Fixed maybe-trim-zeros to leave behind at least a ".0" on
inexact numbers that otherwise would have been output without
the decimal point.  This is for consistency with number->string
which is used when the radix is 10.

In gen-general, fixed a bug in the digit-generating loop for the
whole part of the number.  Previously, an integer that should
have looked like 5003 would be emitted as 5300.

Switched the order of application of maybe-round and
maybe-trim-zeros so that a number that should round to
.0000000000000001 doesn't get emitted as 0.1.

In gen-positive-real, fixed the ratio case to not call
number->string with a radix that might not be in {2,8,10,16}.

Also in gen-positive-real, fixed the call to number->string to
include the radix which was missing previously.

Fixed wrap-sign to correctly handle the case of -0.0.

In numeric/si, always emit the supplied separator even if the
number is too small for an SI-suffix to be emitted.  The
examples in the SRFI document depend on this.
2018-03-23 12:22:03 -04:00
Jim Rees
406aacf4dd try-fitted2/output* calls output on the argument string if it's
determined the string will not exceed the column width.  But
output is the caller environment's output state variable.  A
better choice is output-default.

In two places (length+ form) is replaced with (or (length+ form) +inf.0)
so that arithmetic can be performed on the result.

To support cyclic structures in pretty-simply (wrapped with
trimmed/lazy), the call-with-output form in pp-with-indent needs to be
wrapped with an appropriate trimmed/lazy.

In pp-pair, call (pp (car ls)) instead of (pretty (car ls)).

In pretty-simply, don't use call-with-output, that prevents
(trimmed/lazy n (pretty-simply ...)) from working at all on cyclic
input.
2018-03-22 11:06:55 -04:00
Jim Rees
b947e4ef47 Fixed trivial bug in padded/both where the "odd space" was being emitted
on the left rather than the right as specified.

Fixed trivial bug in padded/left where a string longer than the provided
width would result in a call to make-string with a negative length.

Fixed trivial bug in trimmed/lazy around an fn-binding for the output
state variable.
2018-03-22 10:41:52 -04:00
Jim Rees
ece2d470c3 Fixed from-file so that it produces more than just one line of output. 2018-03-22 09:50:34 -04:00
Alex Shinn
03544833dc rename (chibi show) update! to with! as in srfi 159 2018-01-16 21:15:54 +09:00
Alex Shinn
73734c7010 adding (srfi 159) wrapper around (chibi show) 2018-01-16 19:54:59 +09:00
Alex Shinn
fd3e1f10d3 last arg of fn body should be displayed 2018-01-07 15:05:29 +09:00
Alex Shinn
f29a404324 buffer pretty output to work in columnar 2018-01-07 14:42:52 +09:00
Alex Shinn
eeaace2c50 adding (chibi show c) 2017-12-30 18:36:28 +09:00
Alex Shinn
9cc2192026 additional format fixes 2017-12-10 15:51:18 +09:00
Alex Shinn
79f08129b2 fixing formatting with 0 precision 2017-11-24 22:57:10 +09:00
Alex Shinn
0e4b4d6127 adding (chibi show color) and (chibi show unicode) 2017-11-18 14:26:51 +09:00
Alex Shinn
80c69291ba updating (chibi show) with srfi changes 2017-11-08 22:56:40 +09:00
Alex Shinn
ab57bb7681 renaming counted line-numbers 2017-08-21 22:08:29 +09:00
Alex Shinn
97716e8125 initial (chibi show column) impl 2017-06-17 21:53:35 +09:00
Alex Shinn
f1a2a8a8e0 s/string-cursor-backward/string-cursor-back/g 2016-05-15 20:07:26 +09:00
Alex Shinn
0c80f38a19 making string-cursors a disjoint type 2016-03-29 22:25:09 +09:00
Alex Shinn
2922ed591d Forgot to install regexp (patch from Lorenzo) 2015-01-26 08:06:59 +09:00