Commit graph

551 commits

Author SHA1 Message Date
Alex Shinn
d79f557d46 fix variadic foreign functions with more than 4 params 2019-12-19 23:58:51 +08:00
Alex Shinn
5b60641f43 small documentation fixes 2019-12-17 23:47:53 +08:00
Alex Shinn
e10d82987a adding ignored failing match-letrec test case 2019-12-17 23:47:19 +08:00
krzygorz
5c43ca7720 move the col+ansi test to color section 2019-11-07 22:37:33 +01:00
krzygorz
15fef988af add a test for col with unicode and ANSI escapes 2019-11-07 22:31:29 +01:00
krzygorz
05521e5e1d use string-append for building ansi escape codes 2019-11-07 18:34:41 +01:00
Alex Shinn
abfa6a724e Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-11-04 20:15:40 +08:00
Alex Shinn
7b6a928974 adding levenshtein distance 2019-11-04 20:15:32 +08:00
Ekaitz Zárraga
bbe279b825 Update sxml docs 2019-10-30 10:15:52 +01:00
Alex Shinn
4ad228a0f6
Merge pull request #585 from ekaitz-zarraga/safe-string
[WIP] Add option to ignore escaping
2019-10-24 21:00:29 +08:00
Ekaitz Zárraga
12f941dbfe Add option to ignore escaping 2019-10-24 09:56:08 +02:00
Ekaitz Zárraga
5dfc3b7909
Correct typo 2019-10-23 18:29:48 +02:00
Ekaitz Zárraga
cb63e9130c
Missing ) in code example 2019-10-19 13:01:10 +02:00
Alex Shinn
f4b0277d01 allow rest param in let-optionals 2019-10-14 22:04:23 +08:00
Kris Katterjohn
9bbf48d084 (chibi net server-util): file-mime-type: fix load-mime-types call
Use find instead of any so load-mime-types will get the filename
instead of #t when a mime.types file is found.  Otherwise an error
occurs in load-mime-types.
2019-10-01 20:00:36 -05:00
Alex Shinn
e2d43bceb8
Merge pull request #575 from katterjohn/listener-socket-leak
(chibi net): make-listener-socket: close the socket on error
2019-09-23 16:52:48 +08:00
Alex Shinn
eaf8e90e8c fix inexact json parsing 2019-09-23 12:09:52 +08:00
Kris Katterjohn
a28da66990 (chibi net): make-listener-socket: close the socket on error
A socket was leaked in the case where setting socket-opt/reuseaddr
failed.  (The socket was closed in the cases where bind or listen
failed.)
2019-09-22 19:18:18 -05:00
Alex Shinn
144581b834
Merge pull request #573 from katterjohn/net-export-addrinfo-flags
(chibi net): export address-info-flags
2019-09-20 23:02:19 +08:00
Kris Katterjohn
407d420c21 (chibi system): export the struct group predicate group? 2019-09-19 15:47:41 -05:00
Kris Katterjohn
bb4239bac8 (chibi net): export the struct addrinfo getter address-info-flags 2019-09-19 15:45:26 -05:00
Alex Shinn
b9c25ab3f1
Merge pull request #567 from katterjohn/sockaddr-port-fix
(chibi net): sockaddr-port: return the port number in host byte order
2019-09-17 00:10:42 +08:00
Alex Shinn
dc18568236 forgot the factor of 8 in the range 2019-09-13 23:31:40 +08:00
Alex Shinn
713c6f7135 fix range check in unicode-string-width from edit-line 2019-09-13 23:10:39 +08:00
Kris Katterjohn
fd7ff6d33f (chibi net): sockaddr-name: fix support for IPv6 addresses
The buffer was too small to hold all IPv6 addresses in string form
2019-09-10 18:04:01 -05:00
Kris Katterjohn
a7a620af1a (chibi net): sockaddr-port: return the port number in host byte order 2019-09-10 17:54:14 -05:00
Alex Shinn
197894eb87 fix (expt fixnum flonum) by reverting ce9c60c1 2019-09-09 23:25:27 +08:00
Alex Shinn
00d084414e
Merge pull request #563 from fisherro/chicken-5-support
Change snow-chibi to work with Chicken 5
2019-08-31 22:37:50 +08:00
Kris Katterjohn
3da3f3cab3 (chibi process): fix process-running? on OpenBSD, NetBSD and DragonFly
tl;dr process-running? would always return #f on OpenBSD and
NetBSD, and in the one-argument case it would always return #t
on DragonFly.

To get the process information from the process table on OpenBSD
and NetBSD, we need to pass 6 level names to sysctl instead of 4.
Passing the wrong number of level names to sysctl has caused it
to always fail, which in turn caused process-running? to always
return #f:

  (process-running? 1)                        =>  #f
  (process-running? (current-process-id))     =>  #f

and so on.

After the above fix, we also need to check the amount of data
actually filled in by sysctl.  It appears that on OpenBSD, NetBSD
and DragonFly, if the requested process doesn't exist then sysctl
will return with a return value of 0 and just not actually fill in
the given structure.  This caused process-running? to return #t
when no process with the given PID existed:

  (process-running? -1)                       =>  #t
  (process-running? <other nonexistent pid>)  =>  #t

and so on.

I have tested on OpenBSD, NetBSD, DragonFly BSD and FreeBSD, and
process-running? now behaves as expected on all of them.
2019-08-30 13:05:32 -05:00
Robert Fisher
7f3d322407 Fix installation for Chicken 5
To get the repository path in Chicken 5, we not only have to require the
chicken.platform module, we also need to take the car of the result
since it now returns a list.
2019-08-29 11:42:21 -05:00
Robert Fisher
13d4bbf1d1 Change snow-chibi to work with Chicken 5
The method snow-chibi used to get the version of Chicken installed
doesn't work with Chicken 5. Adding "-R chicken.platform" would make it
work with Chicken 5, but then it wouldn't work with Chicken 4.

In both Chicken 4 & 5, however, csi has a -release option that will just
give the version number. So, I've changed the Chicken version detection
in snow-chibi to use this option.

Testing with...

	./chibi-scheme tools/snow-chibi.scm implementations

...then seemed to work with both Chicken 4 & 5.
2019-08-29 09:16:36 -05:00
Alex Shinn
e7b9510656 allowing required args in opt-lambda, adding define-opt 2019-08-24 22:34:20 +08:00
Alex Shinn
8645b23d42 fixing bug in pp-with-indent on dotted list 2019-08-24 16:00:47 +08:00
Kris Katterjohn
8b6e236b09 (chibi pty): fix compilation errors on the BSDs
* Include util.h instead of pty.h on OpenBSD and NetBSD

* Include libutil.h instead of pty.h on FreeBSD and DragonFly BSD

* Include utmp.h only on non-BSD systems (FreeBSD does not have that
  header and none of these BSDs require it)

Tested on all four of these BSDs.
2019-08-22 16:33:10 -05:00
Alex Shinn
a9cebfb8da adding wip json parser 2019-08-23 00:45:58 +08:00
Alex Shinn
c7d2638fbc s/pty.h/util.h on macosx (fixes issue #558) 2019-08-22 23:53:42 +08:00
Alex Shinn
8ea1852ac1 adding (chibi pty) 2019-08-19 23:03:09 +08:00
Alex Shinn
ec09e0eed4 Merge branch 'master' of github.com:ashinn/chibi-scheme 2019-08-19 21:53:12 +08:00
Alex Shinn
4aac80e41b
Merge pull request #555 from richlowe/sunos-build
build on Solaris-like systems
2019-08-17 21:56:07 +08:00
Alex Shinn
42b6eeff1b fix string-mismatch usage in (chibi repl) 2019-08-16 23:39:36 +08:00
Alex Shinn
39f34ffffb adding port-source?[-set!] to ast 2019-08-15 23:18:07 +08:00
Alex Shinn
93b718f7c3 adding set-source to ast 2019-08-15 23:11:39 +08:00
Richard Lowe
2311e41003 build on Solaris-like systems 2019-08-11 22:30:17 +00:00
Alex Shinn
a8680bb0b4
Merge pull request #551 from v01dXYZ/master
Fix include-shared for process
2019-07-24 22:54:30 +08:00
v01dXYZ
94ca5a95ca
Fix include-shared for process
`chibi-genstatic` doesn't support expansion of `cond-expand` when the pattern is `(cond-expand (cond) (else (include-shared "module")))`
2019-07-24 11:10:04 +00:00
Nguyễn Thái Ngọc Duy
829d963a9d More error checking on some SRE syntax
When char-set, w/case, w/nocase, w/ascii or w/unicode is applied on a
<cset-sre>, only (cadr sre) is taken, the rest is ignored. Which is the
right thing to do only if (null? (cddr sre)). If there are more
arguments, error out instead of silently ignoring them.
2019-07-21 10:46:44 +07:00
Alex Shinn
bbcb571ba5 fix comparison of negative bignums (issue #541) 2019-05-21 22:26:37 +08:00
Alex Shinn
104811942f fixing read-line on network ports 2019-05-04 13:18:27 +08:00
Alex Shinn
105a4672e7 more helpful error messages on missing libraries 2019-04-21 22:11:11 +08:00
Alex Shinn
cd10668b3c adding true color ansi support 2019-03-13 23:57:22 +08:00