Alex Shinn
4ec2167f62
making the abi a little more stable by default
2020-06-08 00:54:36 +09:00
Alex Shinn
6caca77426
adding (scheme bytevector)
2020-05-31 23:24:51 +09:00
Alex Shinn
95310e5823
no more strcpy/sprintf (issue #653 )
2020-05-27 18:35:18 +09:00
Alex Shinn
61f2983fad
apply an explicit max vector length check (issue #636 )
2020-05-22 14:13:48 +09:00
Vitaliy Mysak
5726c2e490
Prevent stack overflow in sexp_mark_one (issue #601 )
...
Replace explicit recursion by heap allocations
in sexp_mark_one code.
This prevents crashes caused by stack overflow.
In particular, fixes issue #601 .
As an optimization, allocate a fixed sized stack buffer first,
which should be enough for "normal" uses.
When that stack overflows, switch to heap.
Also, store "ranges" on the stack, instead of the actual sexp's,
using the fact that sexp's of a single parent are continous in memory.
This patch doesn't remove recursion on the context saves
because it didn't seem like they overflow in practice.
But changing that is simple having the stack interface.
2020-05-15 20:11:50 +02:00
Vitaliy Mysak
f449bd157d
fix compilation under std=c89
...
There were few things that prevented successful compilation
using c89 standard. (and other c* standards in case of gcc).
Fix them in this small patch.
Changes in 27/rand.c:
- Use __GNU_SOURCE__ instead of __GNU_LIBRARY__
or else any of -std=c* options don't work with gcc
- Add a check before using rand_r() as suggested in rand_r(3)
- Move _WIN_32 definitions to "else" branch because it uses the most portable version
2020-05-13 11:12:02 +02:00
Alex Shinn
83e82f55a7
tweaks for fixed-size heaps, fix issue #632
2020-05-11 10:43:36 +09:00
Alex Shinn
e3db106f96
instrumenting alloc times and sizes
2020-05-06 23:39:01 +09:00
Alex Shinn
9100909ae1
better defaults and debugging for fixed size chunks
2020-05-05 00:41:20 +09:00
Alex Shinn
1795014dae
throw an error on get-output-string on non-string-ports (issue #621 )
2020-03-25 17:15:06 +09:00
Alex Shinn
72971fd4f4
pipes should be escaped in symbols (fixes issue #571 )
2019-09-23 11:53:54 +08:00
Andrew Gwozdziewycz
e5ae89c9c6
Define / detect explicit features for BSD platforms
2019-08-02 11:33:59 -07:00
Andrew Gwozdziewycz
ac467ea314
Add features for the various BSDs.
...
This could and should be done cleaner. Works as a proof of concept at
this point in time.
2019-08-02 01:56:51 -07:00
Alex Shinn
4cba9d3e6c
Merge branch 'master' of github.com:ashinn/chibi-scheme
2019-04-02 22:31:45 +08:00
Alex Shinn
08140baa3e
making builtin write bounded to avoid cycles (fixes issue #532 )
2019-04-02 22:31:33 +08:00
Ondřej Majerech
7d82b76bc3
Fix tests on Windows
2019-03-13 22:56:06 +01:00
Alex Shinn
a94a2c7902
uvector fixes
2019-02-25 23:01:35 +08:00
Alex Shinn
7b3413ec1a
fixing bounds checks on u32 and u64 vectors
2019-02-21 02:55:35 +08:00
Alex Shinn
ef0a8bd199
restoring efficient read-line
2019-01-27 22:10:35 +08:00
Alex Shinn
9569460a58
add compile-time option to store precomputed index->cursor tables for strings
2019-01-26 05:35:27 +08:00
Alex Shinn
2b4394ea74
adding initial support for SRFI 160 uniform vectors
2019-01-15 23:43:50 +08:00
Alex Shinn
2c37dfedd3
Merge pull request #500 from mnieper/syntax-case
...
Implement syntax-case
2018-12-09 04:08:31 +08:00
Alex Shinn
521e23e3c7
Reduce error in sexp_read_float_tail (from Taylor R Campbell)
...
scale*10 is computed exactly until scale exceeds 2^54/10; in
contrast, scale*0.1 may not be computed exactly, and fl(0.1) is not
even 0.1.
WARNING: This change is not complete -- it does nothing to prevent
overflow with very long strings of digits after the decimal point.
2018-12-02 12:22:14 +08:00
Marc Nieper-Wisskirchen
152b20f244
Implement syntax-case
2018-12-01 13:48:25 +01:00
Alex Shinn
5bbef040c5
BSD portability fixes from Taylor Campbell
2018-11-27 23:01:23 +08:00
Marc Nieper-Wisskirchen
5519679dcd
Display zeros in bytevectors as '0'
2018-11-08 16:16:07 +01:00
Marc Nieper-Wisskirchen
f9be5c8d46
Make write/display output bytevectors with hex constants (issue #483 )
2018-11-06 14:22:38 +01:00
Alex Shinn
0efa071672
use PRId64/32 where available for printing fixnums (issue #479 )
2018-06-29 22:44:16 +08:00
Alex Shinn
f5a228ee9e
fixing bug in flushed output on custom ports
2018-06-23 19:21:38 +08:00
Alex Shinn
39043bc47c
support infinite real with exact zero imaginary literals (issue #474 )
2018-06-09 18:02:50 +08:00
Alex Shinn
22f87f67ab
char names should obey case-(in)sensitivity (issue #471 )
2018-05-12 19:43:02 +08:00
Alex Shinn
f67f63d570
fixing number->string for numbers within an ulp of round numbers
2018-04-01 21:01:58 +09:00
Kris Katterjohn
5e80cb2c2b
In my last commit, make the feature variable a gc variable
2018-03-31 20:23:00 -05:00
Kris Katterjohn
dc80bf4f04
Avoid placing duplicate feature identifiers in the (features) list
...
In my case "bsd" was present twice on my *BSD boxes
2018-03-31 14:19:18 -05:00
okuoku
960c962798
Win32: Include <io.h> on sexp.c
...
Use POSIX-like functions(open, read and write) from its
compatibility library.
2017-12-13 17:20:53 +09:00
okuoku
7693881125
sexp.c: Use strncasecmp instead of strcasestr
...
strcasestr is not available on MS C runtime. Use strncasecmp instead
which is in POSIX. MS C runtime has _strnicmp().
2017-11-18 15:24:28 +09:00
okuoku
e092923aac
Win32: Fix win32 port
...
Try to fix win32 port. Now it runs both on Win32/Win64.
Win64 port currently depends on 128bits arithmetic thus it does not run on
MSVC.
Makefile now have EXCLUDE_POSIX_LIBS knob to exclude posix related library
from build.
Introduce msys PLATFORM for Makefile.detect to use MSYS's POSIX
emulation layer. It is intended for linking against MSYS tools; it is
not for embedding to Win32 applications.
2017-11-11 04:31:06 +09:00
Alex Shinn
e4eadba355
sprintf precision ranges from 15 to 17
2017-10-22 22:24:15 +09:00
Alex Shinn
b4b6d508d1
don't try to read polar notation when math is disabled
2017-09-01 16:56:55 +09:00
Alex Shinn
b1307a67f5
use fabsl instead of abs on long double
2017-08-29 22:50:52 +09:00
Alex Shinn
d9a40fbc61
conditionally using 17 digits of precision in flonum output when needed
2017-08-26 21:35:43 +09:00
Alex Shinn
b61c1b7077
better round-off reading floating point numbers with large exponents
2017-08-21 23:01:39 +09:00
Alex Shinn
8470534c39
using 16 decimal places of precision in number->string (issue #433 )
2017-08-20 15:00:24 +09:00
Alex Shinn
f2f6aadb3d
fixing sexp_port_size after buffered read on non-custom ports
2017-06-29 14:17:34 +09:00
Alex Shinn
da410523b0
fixing peek-char on non-ascii chars
2017-06-26 22:23:38 +09:00
Alex Shinn
0fa1179c2f
add -T option to disable TCO
2017-01-14 16:51:07 +09:00
Alex Shinn
82ebd3cbc3
remove unused vars, restore endianess feature
2016-06-12 22:58:35 +09:00
Alex Shinn
08494037ea
making features a context global
2016-06-12 14:25:46 +09:00
Alex Shinn
8ac14b5f91
Fixing printing of x-0.0i (issue #352 ).
2016-06-06 22:18:47 +09:00
Alex Shinn
d975aac7ed
Hashes in symbol names need to be escaped with |...|.
...
Fixes issue #348 .
2016-06-05 22:34:39 +09:00