Commit graph

5998 commits

Author SHA1 Message Date
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
Daniel Kochmański
0f68b54cf1 format: flonum-to-string: Remove special case when width is 1.
This "special case" isn't general enough to cover situations, when
width is too small. If we print ie "3.1421", then at least three
characters are required, but printing "0.1231" requires only two of
them. Also 0 is a valid argument forcing using minimal set of
characters to print number reliably (with smallest accuracy possible).

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:36:30 +02:00
Daniel Kochmański
ac5f80ab29 format: format-fixed-aux: trailing zero is obligatory.
Trailing zero is obligatory unless d is explicitly set to 0. Consider
following example:

(format nil "~0f" 3.0) ; 3.0

If trailing zero is optional, then 3. would be printed and this would
be an integer (not float). If d is explicitly set to 0 we assume, that
programmer knows what he's doing and tries to convert float to
integer.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:31:42 +02:00
Daniel Kochmański
ac4f2fd323 format: flonum-to-string: cover another corner-case when printing 0.
When user supplies "0.0" to format and fdigits parameter is nil, then
".0" should be printed (at least). If fdigits is set to zero, then
correct result is "0.". For values 1 and more appropriate number of
zeros after period is printed.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 21:18:31 +02:00
Daniel Kochmański
1e2d00ed3a format: flonum-to-string: Fix corner-case when printing "0.0".
When printing 0.0 and fdigits parameter set to 0 or nil, single "."
was printed, what is not valid float number. Now it at least prints
".0".

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 20:13:06 +02:00
Daniel Kochmański
5cbb3b905a format: flonum-to-string: rework nested IF statements as cond.
Simplifies code. Also creates additional clause (commented now) to
handle special case, when width is too small to display number.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-10 15:14:49 +02:00
Daniel Kochmański
3efcb4ed78 format: float: fix bug causing error, when no width is claimed.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 15:27:54 +02:00
Daniel Kochmański
c95e07bc09 format: Update documentating commet to reflect new fmin and scale defaults.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 14:49:35 +02:00
Daniel Kochmański
5201c28148 buildsystem: tests: fix archives mirror address.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 14:32:45 +02:00
Daniel Kochmański
612b6bb64b format: floats: Fix non-conformity bug regarding output characters.
When width is supplied to format, CLHS 22.3.3.1 Says "Exactly w
characters will be output." This patch fixes this non-conformity to
count separator (".") as well.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 14:32:45 +02:00
Daniel Kochmański
5536f98294 format: flotnum-to-string: Resolve FIXME regarding non-negative input.
`floatnum-to-string` requires it's first argument to be non-negative
number. To assure that, it was setting it to it's abs, with FIXME
hint, that only one function seems to be able to pass negative number
there. This commit assures, that mentioned function passes
non-negative argument.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 14:32:45 +02:00
Daniel Kochmański
cc3b31f02d format: flotnum-to-string: scale and fmin parameters default to 0.
Specification says, that scale parameter defaults to 0 (same applis to
fmin in regard of implementation). Both parameters were sanity checked
all over the function flotnum-to-string. This change simplifies the
code in regard of removing this sanity-checks due to sane default.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-09 14:32:38 +02:00
Daniel Kochmański
fa7ba1f27e seq.lib: Recognize (array /type/ 1) as valid sequence subtype.
Fixes erroneous assumption, that for sequence dimension-spec mustn't
be an atom. '(array t 1) designates simple-vector of any type and
unknown length. Fixes issue #6.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-08 20:17:08 +02:00
Daniel Kochmański
7599ca2967 unicode: fix typo in surrogate characters sanity check.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-06 22:35:57 +02:00
Daniel Kochmański
c7e9372240 changelog: add recent changes.
Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-03 11:52:49 +02:00