Commit graph

6012 commits

Author SHA1 Message Date
Daniel Kochmański
d017692cd8 changelog: add gmp fix
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-26 13:22:25 +02:00
Daniel Kochmański
bd48b85970 bignums: don't collect gmp internal memory
GMP manual at https://gmplib.org/manual/Custom-Allocation.html sates,
taht "GMP may use allocated blocks to hold pointers to other allocated
blocks. This will limit the assumptions a conservative garbage
collection scheme can make.", therefore we won't collect it's internal
blocks. Fixes #58.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-26 13:09:47 +02:00
Daniel Kochmański
26690cacdd ecl_stream_to_handle: fix problem when passing stream
Function for some types of streams without handler (not all) was
calling internal-error stopping whole implementation instead of
returning `INVALID_HANDLER'.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:07 +02:00
Daniel Kochmański
dd2e3903bc run-program: handle error' parameter value :output'
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:07 +02:00
Daniel Kochmański
73f60ca9d0 changelog: run-program works under cygwin
Cygwin fork/exec doesn't seem broken anymore. Fixes #52.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:07 +02:00
Daniel Kochmański
788eaf041a run-program: Major function refactor
A lot of code was duplicated due to creating descriptors for output,
input and error streams. It is reduced by extracting function
`create_descriptor'.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:07 +02:00
Daniel Kochmański
623857e379 run-program: Export error stream symbol
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:07 +02:00
Daniel Kochmański
43b0781eb2 run-program: Implement stderr handling as stream and as pathname
This makes `stderr` same class citizen as `stdout` and `stdin`. In
order to make it work structure process has been changed to be able to
handle stream_error and index of `exit-code` and `status` are
1+. Access to stream is possible via last value of run-program, which
returns process itself.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:41:01 +02:00
Daniel Kochmański
db8fcb2436 run-program: fix order of if/else clauses (sanity patch)
Order of checking the same conditions in input and output was slighly
different without an obvious reason. Fixed that, so code is easier to
read.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 12:01:29 +02:00
Daniel Kochmański
b4119db500 changelog: add GMP-6.0.0 bug to known issues
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-25 11:41:55 +02:00
Daniel Kochmański
180567dfbd stack-overflow: improve condition message
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 17:09:41 +02:00
Daniel Kochmański
8c73c415be stack: Protect user from resizing stack above maximum limit
If `rlimit' is available (ie on linux), then don't extend stack above
maximum value. If we don't know limit or limit is `infinity', then
there is no protection and user extends heap on his own risk.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 17:09:41 +02:00
Daniel Kochmański
5abfaad937 stacks.d: make `*_set_size' set size, not limit
Now `si:set-limit' calculates size by itself, while `*_set_size' sets
size as name says. Extend `c-stack' by magnitude of two.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 17:09:37 +02:00
Daniel Kochmański
202c35990a cosmetic: remove braces around single instruction
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:46:17 +02:00
Daniel Kochmański
fa8663fa8b changelog: update wrt stack and other fixes
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:45:54 +02:00
Daniel Kochmański
09ae630cde stack: add special conditional handler for stack-overflow
Add `serror' and `stack-error-handler', which behave like normal
`cerror' -> `universal-error-handler' call order, except fact, that
after handling stack-overflow condition they reset appropriate stack
limit. Fixes #56.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:45:54 +02:00
Daniel Kochmański
44c58e95f7 stacks.d: introduce function `si_reset_margin'
When stack overflow condition is risen, to throw cerror stack limit
has to be raised by pre-allocated margin. This function resets stack
limit to original value. The only argument is stack designator.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:45:07 +02:00
Daniel Kochmański
f849b4a99a stack: add fields keeping stacks size limits
It is different from stack size, because limit is space available to
user, while stack size is larger by safe_area necessary to act on
stack overflow conditions.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-24 13:37:36 +02:00
Daniel Kochmański
c9ae722ffd stacks.d: make `*_set_size' functions behave consistant
Some functions were setting size of stack to provided value, while
other added (* 2 margin) to it, what wasn't consistant. Now each
function treats provided size as a limit and adds margin to it.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-22 19:03:20 +02:00
Daniel Kochmański
4d19a27424 cosmetic: untabify
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-21 14:38:20 +02:00
Daniel Kochmański
c0f7a92651 cosmetic: indentation fix
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-20 21:58:03 +02:00
Daniel Kochmański
31e9ba9378 Makefile.in: add target dependency of clos/*.lsp
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-20 21:57:42 +02:00
Daniel Kochmański
6d3e7ef4e8 clos: implicit generic function definition doesn't have &key arguments
According to second paragraph of
http://www.lispworks.com/documentation/HyperSpec/Body/m_defmet.htm
generic function should mention key (if it is in method), but now key
arguments. Fixes #76.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-20 21:52:27 +02:00
Daniel Kochmański
21e02f53a8 tests: fix target check
Use wget to download tests (ecl-curl failed on https), use ecl
binaries and libs from installation directory and fix tests target
order.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-19 19:45:54 +02:00
Daniel Kochmański
673c9bc973 Makefile.in: add library symlinks in build directory
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-19 18:48:45 +02:00
Daniel Kochmański
1f73b02290 Makefile.in: slight cleanup
Change urls of project and repository and remove obsolete code.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-06-19 13:05:00 +02:00
Daniel Kochmański
d305313d95 clos: Add nickname 'MOP' for CLOS package.
Documentation explicitly mentions this nickname, and it's common for
many implementations.  Closes #72.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-25 10:51:05 +02:00
Daniel Kochmański
294b2e785e format: copy sequence after producing output string.
This is required because format is working on string with fill pointer
making it an array - not simple-array what is expected.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-19 23:56:31 +02:00
Daniel Kochmański
116c87344e Merge branch 'format' into develop 2015-05-19 09:52:10 +02:00
Daniel Kochmański
bc0da33dab shiftf: Fix order of lexical blocks to avoid unbound variable error.
`multiple-value-prog1` was called outside `let` bindings, thereof it
lead to returning unbound access-forms.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-19 09:49:09 +02:00
Daniel Kochmański
827d3035bc buildsystem: tests: fix test urls to use http.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 15:09:26 +02:00
Daniel Kochmański
983f36d3f5 changelog: update information.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 15:07:18 +02:00
Daniel Kochmański
afc46ed981 format-e: adjust scale factor. Closes #39.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 15:03:06 +02:00
Daniel Kochmański
586405328e format-e: fix typo.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 14:58:00 +02:00
Daniel Kochmański
c7e8144062 unicode: Fix builds without unicode support.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 11:18:12 +02:00
Daniel Kochmański
2023c47c42 cosmetic: indentation fix.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 10:20:28 +02:00
Daniel Kochmański
3d09e65110 format-e: Rework nested ifs to use cond in format-exponential.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 10:20:01 +02:00
Daniel Kochmański
3e19a62b2d format-f: simplify code.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-12 09:01:34 +02:00
Daniel Kochmański
1bd96da186 CHANGELOG: add improvement infor.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 22:15:03 +02:00
Daniel Kochmański
c07ff4d314 format-f: Too much work put into this to not become immortal ;-).
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 22:08:13 +02:00
Daniel Kochmański
e1fdc1ea03 format-f: Rework printing body to conform to ANSI standard.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 22:07:14 +02:00
Daniel Kochmański
21f10c6e50 format-f: Use sane minimal value for width passed to dragon4.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 22:05:30 +02:00
Daniel Kochmański
5b3231af8a format-f: prevent situation, when single "." is printed.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 22:02:31 +02:00
Daniel Kochmański
c02ffa180c fromat-f: Use new wrapper function float-to-digits*.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 21:37:38 +02:00
Daniel Kochmański
887770281d fromat-f: Create wrapper function float-to-digits* detecting zero.
If printed float is effectively zero, then if not explicitly specified
by `fdigits` it should be printed as 0.0 (or .0 if width is too small).

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 21:35:33 +02:00
Daniel Kochmański
bfa1f614ed format: flonum-to-string: Minimal width for numbers is 1 not 0.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-11 11:05:41 +02:00
Daniel Kochmański
8b0b31f34e format: format-fixed-aux: decrement digits when sign is printed.
Bugfix: decrement number of digitse provided to `flonum-to-string` if
sign is also to be printed.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 22:08:53 +02:00
Daniel Kochmański
30ce3bb408 cosmetic: indentation fix.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:50:43 +02:00
Daniel Kochmański
7798163815 float: flonum-to-string: Use normal if instead of 2-clause cond.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:44:54 +02:00
Daniel Kochmański
debc074c74 format: flonum-to-string: Simplify writing a string.
Instead of two separate overlapping cases use generalized algorithm.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:42:55 +02:00