Commit graph

5435 commits

Author SHA1 Message Date
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
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
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
88b8ad015a pathname: Make type of pathname being (simple-array character (*)).
Removes coercion to base-string and improves some use cases. Due to
recent change in double-quote reader (conformity fix), now type of
each read string is (simple-array character (*)), so when pathnames
were created, it were copying it to (simple-array base-char (*)), lead
to buggy results. Consider:

(let ((path
       (let ((x "foo"))
	 (make-pathname :name x :type x))))
  (eql (pathname-name path)
       (pathname-type path))) ; => T

Before change, this construct was returning NIL, what in case of
serialization might be a problem, and wasn't `the right thing`® to do.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-03 11:52:08 +02:00
Daniel Kochmański
3938eb8893 unicode: Improve unicode handling for characters.
Additional sanity checks and bugfixes in case of providing extended
strings to character low-level functions.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-03 11:36:20 +02:00
Daniel Kochmański
8977a7cc85 unixfsys.d: enter-directory: Coerce if directory is extended string.
If directory is of type (simple-array character(*)), then coerce it to
(simple-array base-char (*)) instead of throwing an error.

Signed-off-by: Daniel Kochmański <dkochmanski@turtle-solutions.eu>
2015-05-02 14:00:08 +02:00
Daniel Kochmański
f92fb005e0 Merge branch 'develop' into upgrade-libs 2015-05-01 20:19:22 +02:00
Daniel Kochmański
ebb2373650 bdwgc: Update library to version 7.4.2.
- libatomic_ops is updated accordingly,
- new directory for garbage collector is bdwgc,
- updated MSVC Makefiles,
- obsolete directories gc and gc-unstable are removed.
2015-04-24 23:28:24 +02:00
Daniel Kochmański
9cacaacac2 Revert "symols_list2.h: build actualized this file after symbols_list.h"
This reverts commit 4ff5921d7c.
2015-04-24 16:15:27 +02:00
Daniel Kochmański
9f1f595b3d Revert "sombols-list: fix bogus entry for ext::make-encoding in symbols_list.h."
This reverts commit 518264369e.
2015-04-24 16:14:57 +02:00
Daniel Kochmański
65be797cd4 Merge branch 'develop' into upgrade-libs 2015-04-12 16:31:31 +02:00
Daniel Kochmański
6d3d3b9966 Use one file for tracking relevant changes.
Also replaces used till now Markdown format with org-mode syntax.
2015-04-12 15:05:12 +02:00
Daniel Kochmański
f056b3d000 Merge branch 'develop' into upgrade-libs 2015-04-12 11:54:37 +02:00
Roger Sen
b0e78cad8d Removed external reference to GC_dont_gc, no needed in the new Boehm
GC API.
2015-04-12 11:47:50 +02:00
Roger Sen
cddb87313d Updated GC api to remove deprecated methods 2015-04-12 11:47:43 +02:00
Daniel Kochmański
757ba68312 cosmetic: Indentation fix. 2015-04-08 18:42:07 +02:00
Tomas Hlavaty
0b4018c284 add configure option libffi-prefix
similar to gmp-prefix;  useful on nixos for example
2015-04-08 18:36:41 +02:00
Daniel Kochmański
ff865d1c59 cmplet: Remove invalid declaration. Fixes #28. 2015-04-07 21:34:01 +02:00
Daniel Kochmański
69d9c6e43b setf.lsp: rework psetf, shiftf and rotatef to work with places with multiple values.
Additional macros has been proposed:

- with-setf-expansions maps setf expansions of places on provided list
  into lists of pairs (bindings), stores, store-forms and
  access-forms.

- with-expansion-setter creates lexically scoped function, which binds
  forms to stores using multiple-value-binds, and at the end places
  code provided at start macro-call.
2015-04-07 14:33:36 +02:00
Daniel Kochmański
e32a9b0000 clos: walk-c-inline: Declare ignoring unused variable context. Closes #26. 2015-04-03 10:05:54 +02:00
Daniel Kochmański
e8b4391ef7 libffi: add .gitignore to directory. 2015-03-30 22:23:52 +02:00
Daniel Kochmański
d3eb56ff9d libffi: invoke autoreconf. 2015-03-30 22:17:02 +02:00
Daniel Kochmański
cbe966ed03 libffi: fix autotools scripts to respect libdir and includedir
configure flags.
2015-03-30 22:15:32 +02:00
Daniel Kochmański
959e9aaf95 libffi: update included library to version 3.2.1. 2015-03-30 22:12:09 +02:00
Daniel Kochmański
ea6adc6aea pprint.lsp: remove unsupportet declare extension 'values' calls.
Closes #10.
2015-03-14 22:09:15 +01:00