Commit graph

509 commits

Author SHA1 Message Date
okuoku
583c45a6c1 test: Do not create file under /tmp in show-test
Do not create test file under /tmp as it might break
concurrent builds. Creating file on the current directory should
suffice.
2018-04-04 05:27:03 +09:00
Alex Shinn
060cfd550e
Merge pull request #465 from jimrees/master
changes from jim rees
2018-04-01 15:32:32 +09:00
Jim Rees
9b72412e4e Added additional show-tests which demonstrate recent bugs & fixes. 2018-03-27 14:47:14 -04: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
933aeb5654 tests which expect an inexact value can accept an equivalent exact value 2018-03-17 16:50:41 +09:00
Alex Shinn
f0c9f0e705 adding chibi-version variable to (chibi ast) 2018-03-11 23:47:33 +09:00
Alex Shinn
cd0b6e32af fixing test-build 2018-01-25 01:07:49 +09: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
b0e5f70355 adding (chibi log) tests 2018-01-11 22:42:18 +09:00
Alex Shinn
1f805fd3ae log ip address of clients in net servers 2018-01-11 22:05:44 +09:00
Alex Shinn
fd3e1f10d3 last arg of fn body should be displayed 2018-01-07 15:05:29 +09:00
Alex Shinn
a328b3fb4a re-enable fixed tests 2018-01-07 14:53:03 +09:00
Alex Shinn
f29a404324 buffer pretty output to work in columnar 2018-01-07 14:42:52 +09:00
Alex Shinn
b9172a366c
Merge pull request #450 from okuoku/win32-cmake
Misc. fixes for Windows build
2018-01-04 14:09:19 +09:00
okuoku
9e773f3daf (chibi filesystem): Stub out several features on Win32
- Win32 does not support symbolic links generally (NTFS does support it
  but it is not available for non-root users until Win10)
- Win32 does not have block size on stat() API
2017-12-31 07:32:22 +09:00
Alex Shinn
eeaace2c50 adding (chibi show c) 2017-12-30 18:36:28 +09:00
okuoku
d313f85b16 (chibi disasm): Use %I64d on Win64 2017-12-13 22:00:13 +09:00
okuoku
4d4b6f0474 ast.c Win32: Workaround for MinGW header file
getenv_s should be in <stdlib.h> but it seem MinGW header lacks it.
2017-12-13 22:00:13 +09:00
okuoku
070f2925c4 (chibi filesystem) Win32: A bit more shims
Implement more shims.
2017-12-13 22:00:07 +09:00
okuoku
e46bd03239 (chibi win32 process-win32): New library
Implement Win32 specific process library. Currently the library only
provides `exit` procedure.
2017-12-13 19:04:04 +09:00
okuoku
d51a9e976b (chibi io) Win32: Include <io.h> on port.c
Include <io.h> to use various POSIX-like functions.
2017-12-13 17:27:16 +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
231c4bc04b Merge branch 'master' of https://github.com/ashinn/chibi-scheme 2017-11-18 14:36:25 +09:00
Alex Shinn
0e4b4d6127 adding (chibi show color) and (chibi show unicode) 2017-11-18 14:26:51 +09:00
okuoku
396c54ca58 ast.c: #include <stdlib.h> for setenv() 2017-11-11 04:52:06 +09:00
Alex Shinn
8d51cf053c Merge branch 'master' of https://github.com/ashinn/chibi-scheme 2017-11-08 23:00:02 +09:00
Alex Shinn
80c69291ba updating (chibi show) with srfi changes 2017-11-08 22:56:40 +09:00
okuoku
735719d9d6 Win32: Port/Stub-out libraries
- (scheme time): Win32 stub impl
 - (chibi filesystem): Win32 stubbing
 - (chibi process): ditto
 - (chibi time): ditto
 - SRFI-144: lgamma is not in C99 standard
 - SRFI-27: Win32 INSECURE rand
2017-11-06 04:10:28 +09:00
Alex Shinn
52b18ca665 fix bug in error reporint in verbose mode of (chibi test) 2017-10-22 22:25:05 +09:00
Alex Shinn
c5effc536f adding some additional precision tests 2017-10-14 21:49:47 +09:00
Alex Shinn
768a37c7a0 fixing empty match handling in regexp-split/partition 2017-10-11 22:59:55 +09:00
Alex Shinn
b2cdeba142 allow empty strings in regexp-split 2017-10-11 22:41:39 +09:00
Alex Shinn
70d61e1fcc removing duplicates from repl completion 2017-10-06 23:23:22 +09:00
Alex Shinn
fd28b5438b removing redundant renaming to same name execvp 2017-08-28 23:41:34 +09:00
Alex Shinn
03907a053c adding error checking for null lists in execute, improving (chibi process) docs 2017-08-28 23:39:14 +09:00
Alex Shinn
0f84fac70d adding (srfi 14) 2017-08-26 20:34:56 +09:00
Alex Shinn
ba0d15ec14 adding (print-stack-trace exn) for http internal errors 2017-08-25 00:01:03 +09:00
Alex Shinn
6d3ae7a28e replacing (srfi 142) with (srfi 151) 2017-08-21 22:32:57 +09:00
Alex Shinn
ab57bb7681 renaming counted line-numbers 2017-08-21 22:08:29 +09:00
Alex Shinn
8589333868 fix previous change for inline docs 2017-07-03 07:00:25 +09:00
Alex Shinn
c3e298757b Merge branch 'master' of https://github.com/ashinn/chibi-scheme 2017-07-03 06:57:13 +09:00
Alex Shinn
7b68f141c6 allow urls for snow docs 2017-07-03 06:57:09 +09:00
Alex Shinn
29e1c262c5 Merge pull request #422 from arthurmaciel/snow-cyclone
Added support for Cyclone to Snow
2017-07-03 06:56:22 +09:00
arthurmaciel
264a4a4ede Added support for Cyclone to Snow 2017-07-02 16:55:38 -03:00