| Commit message (Expand) | Author | Age | Files | Lines |
* | Flush when getting string from r6rs string output port...* module/rnrs/io/ports.scm (open-string-output-port): Calling the
get-string proc should flush the buffer and reset the file position.
* test-suite/tests/r6rs-ports.test ("8.2.10 Output ports"): Add tests.
Thanks to Freja Nordsiek for the report.
| Andy Wingo | 2017-03-01 | 1 | -1/+5 |
* | Implement R6RS custom binary input/output ports...* NEWS: Add new feature.
* doc/ref/r6rs.texi (rnrs io ports):
* doc/ref/api-io.texi (Custom Ports): Document new procedure.
* libguile/r6rs-ports.h:
* libguile/r6rs-ports.c (make_custom_binary_input_output_port)
(scm_make_custom_binary_input_output_port)
(custom_binary_input_output_port_random_access_p)
(initialize_custom_binary_input_output_ports)
(scm_init_r6rs_ports): Implement custom binary input/output ports.
* module/rnrs/io/ports.scm (rnrs):
* module/ice-9/binary-ports.scm (ice-9): Export
make-custom-binary-input/output-port.
| Andy Wingo | 2016-08-04 | 1 | -0/+1 |
* | Add R6RS bytevector->string, string->bytevector...* module/rnrs/io/ports.scm (string->bytevector):
(bytevector->string): New procedures.
* module/rnrs.scm: Export new procedures.
* test-suite/tests/r6rs-ports.test: Add string->bytevector and
bytevector->string tests.
| Andy Wingo | 2016-06-21 | 1 | -0/+31 |
* | Export &i/o-decoding, &i/o-encoding from (rnrs)...* module/rnrs/io/ports.scm (&i/o-decoding, &i/o-encoding): Rename from
&i/o-decoding-error and &i/o-encoding-error, to conform to R6RS.
* module/rnrs.scm (rnrs): Export &i/o-decoding, &i/o-encoding, their
accessors and constructors.
| Andy Wingo | 2016-06-21 | 1 | -4/+4 |
* | Implement R6RS output-port-buffer-mode...* module/rnrs/io/ports.scm (r6rs-open): Set buffer-mode on new port.
(output-port-buffer-mode): Implement and export.
* module/rnrs.scm (rnrs): Export output-port-buffer-mode
* test-suite/tests/r6rs-ports.test (test-output-file-opener): Add
tests.
| Andy Wingo | 2016-06-21 | 1 | -2/+17 |
* | (rnrs hashtables): Hash functions of eq? and eqv? hashtables...Also pinging this thread with a (very slightly) updated patch. :-)
[2. text/x-diff; 0001-Hashtable-hash-function-returns-f-on-eq-and-eqv-tabl.patch]
From 17599f6ce7ba0beb100e80455ff99af07333d871 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
<taylanbayirli@gmail.com>
Date: Tue, 21 Jun 2016 00:23:29 +0200
Subject: [PATCH] Hashtable-hash-function returns #f on eq and eqv tables.
* module/rnrs/hashtables.scm (r6rs:hashtable)[type]: New field.
(r6rs:hashtable-type): New procedure.
* test-suite/tests/r6rs-hashtables.test: Add related tests.
| Taylan Ulrich Bayırlı/Kammer | 2016-06-21 | 1 | -7/+15 |
* | (rnrs hashtables): Mutation of immutable hashtable ignored...Pinging this thread with a (very slightly) updated patch. :-)
[2. text/x-diff; 0001-Hashtable-set-errors-on-immutable-hashtable.patch]
From 7f35d515d711e255bba5a89a013d9d92034edf41 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Taylan=20Ulrich=20Bay=C4=B1rl=C4=B1/Kammer?=
<taylanbayirli@gmail.com>
Date: Tue, 21 Jun 2016 00:25:19 +0200
Subject: [PATCH] Hashtable-set! errors on immutable hashtable.
* module/rnrs/hashtables.scm (hashtable-set!): Raise an assertion
violation error when the hashtable is immutable.
* test-suite/tests/r6rs-hashtables.test: Fix accordingly.
| Taylan Ulrich Bayırlı/Kammer | 2016-06-21 | 1 | -2/+3 |
* | Fix fixnum-range changes in R6RS fixnum bitops...* module/rnrs/arithmetic/fixnums.scm (fxcopy-bit, fxbit-field)
(fxcopy-bit-field, fxarithmetic-shift)
(fxarithmetic-shift-left, fx-arithmetic-shift-right)
(fxrotate-bit-field, fxreverse-bit-field): Enforce range on amount by
which to shift. Fixes #14917.
* test-suite/tests/r6rs-arithmetic-fixnums.test ("fxarithmetic-shift-left"):
Update test to not shift left by a negative amount.
| Andy Wingo | 2016-06-21 | 1 | -3/+25 |
* | Merge branch 'stable-2.0'...Conflicts:
GUILE-VERSION
NEWS
guile-readline/ice-9/readline.scm
libguile/async.c
libguile/backtrace.c
libguile/deprecated.h
libguile/gc-malloc.c
libguile/gdbint.c
libguile/init.c
libguile/ioext.c
libguile/mallocs.c
libguile/print.c
libguile/rw.c
libguile/scmsigs.c
libguile/script.c
libguile/simpos.c
libguile/snarf.h
libguile/strports.c
libguile/threads.c
libguile/vm-i-scheme.c
libguile/vm-i-system.c
module/srfi/srfi-18.scm
test-suite/Makefile.am
test-suite/standalone/test-num2integral.c
| Mark H Weaver | 2014-04-25 | 1 | -3/+10 |
|\ |
|
| * | Fix (rnrs io simple) to open file ports in textual mode....Fixes <http://bugs.gnu.org/17044>.
Reported and diagnosed by Xin Wang <dram.wang@gmail.com>.
* module/rnrs/io/simple.scm (open-input-file, open-output-file): Pass
missing buffer-mode argument to open-file-{input,output}-port.
Previously, (native-transcoder) was incorrectly passed as the
buffer-mode argument, so no transcoder was provided, thus creating a
binary port.
| Mark H Weaver | 2014-03-19 | 1 | -3/+10 |
* | | Merge commit '8571dbde639e0ee9885bad49c9e180474bd23646'...Conflicts:
libguile/procprop.c
| Andy Wingo | 2013-11-28 | 1 | -15/+145 |
|\| |
|
| * | Convert guile exceptions to R6RS conditions in R6RS exception handlers....* module/rnrs/exceptions.scm (&guile): New condition type.
(guile-condition-converters): New variable.
(convert-guile-condition, default-guile-condition-converter,
set-guile-condition-converter!, guile-common-conditions,
guile-lexical-violation-converter, guile-syntax-violation-converter,
guile-assertion-violation-converter, guile-system-error-converter,
guile-undefined-violation-converter, guile-error-converter,
guile-implementation-restriction-converter): New procedures.
(with-exception-handler): Catch all exceptions, not just R6RS
exceptions. Convert native Guile exceptions to R6RS conditions,
preserving the original Guile exception information in the &guile
condition object.
(raise): If the condition includes a &guile condition, use 'throw' to
throw the original native guile exception instead of raising an R6RS
exception.
* test-suite/tests/r6rs-exceptions.test ("guile condition conversions"):
Add tests.
| Mark H Weaver | 2013-11-18 | 1 | -15/+145 |
* | | Merge remote-tracking branch 'origin/stable-2.0' | Mark H Weaver | 2013-08-11 | 1 | -13/+2 |
|\| |
|
| * | Fix numerator and denominator handling of signed zeroes and infinities....* libguile/numbers.c (scm_numerator, scm_denominator): Handle signed
zeroes and infinities in accordance with the corresponding R6RS flonum
procedures.
* module/rnrs/arithmetic/flonums.scm (flnumerator, fldenominator):
Remove special handling of infinities.
* test-suite/tests/numbers.test (numerator, denominator): Add tests.
Convert existing tests to use 'pass-if-equal'.
* test-suite/tests/r6rs-arithmetic-flonums.test (flnumerator): Fix
broken test of (flnumerator -0.0).
| Mark H Weaver | 2013-08-09 | 1 | -13/+2 |
* | | String ports use UTF-8; ignore %default-port-encoding....* libguile/strports.c (scm_mkstrport): Use UTF-8; ignore
%default-port-encoding. Rename 'str_len' and 'c_pos' to
'num_bytes' and 'c_byte_pos'. Interpret 'pos' argument
as a character index instead of a byte index.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-6 to the
list of core features.
* module/srfi/srfi-6.scm (open-input-string, open-output-string): Simply
re-export these, since the core versions are now compliant.
* doc/ref/api-io.texi (String Ports): Remove text that describes
non-compliant behavior of string ports with regard to encoding.
* doc/ref/srfi-modules.texi (SRFI-0): Add srfi-6 to the list of
core features.
(SRFI-6): Remove text that mentions non-compliant behavior of
core string ports.
* module/ice-9/format.scm (format):
* module/ice-9/pretty-print.scm (truncated-print):
* module/rnrs/io/ports.scm (open-string-input-port,
open-string-output-port):
* test-suite/test-suite/lib.scm (format-test-name):
* test-suite/tests/chars.test ("combining accent is pretty-printed",
"combining X is pretty-printed"):
* test-suite/tests/ecmascript.test (eread, eread/1):
* test-suite/tests/rdelim.test:
* test-suite/tests/reader.test (read-string):
* test-suite/tests/regexp.test:
* test-suite/tests/srfi-105.test (read-string): Don't set
%default-port-encoding before creating string ports.
* benchmark-suite/benchmarks/ports.bm (%latin1-port): Use
'set-port-encoding!' to set the string port encoding.
(%utf8/ascii-port, %utf8/wide-port, "rdelim"): Don't set
%default-port-encoding before creating string ports.
* test-suite/tests/r6rs-ports.test ("lookahead-u8 non-ASCII"): Don't set
%default-port-encoding before creating string ports.
("put-bytevector with UTF-16 string port", "put-bytevector with
wrong-encoding string port"): Use 'set-port-encoding!' to set the
string port encoding.
* test-suite/tests/print.test (tprint): Use 'set-port-encoding!' to set
the string port encoding.
("truncated-print"): Use 'pass-if-equal'.
* test-suite/tests/ports.test ("encoding failure leads to exception",
"%default-port-encoding is honored", "peek-char [latin-1]", "peek-char
[utf-8]", "peek-char [utf-16]"): Remove tests.
("%default-port-encoding is ignored", "peek-char"): Add tests.
("suitable encoding [latin-1]", "suitable encoding [latin-3]",
"wrong encoding, error", "wrong encoding, substitute",
"wrong encoding, escape"): Use 'set-port-encoding!' to set the
string port encoding.
("%default-port-encoding, wrong encoding"): Rewrite to use
a file port instead of a string port.
| Mark H Weaver | 2013-08-07 | 1 | -4/+2 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/numbers.c
libguile/vm-i-scheme.c
| Mark H Weaver | 2013-08-06 | 1 | -59/+22 |
|\| |
|
| * | Optimize R6RS bitwise operators....* module/rnrs/arithmetic/bitwise.scm (bitwise-if, bitwise-length,
bitwise-first-bit-set, bitwise-bit-field, bitwise-reverse-bit-field):
Replace these with aliases to the identical SRFI-60 operators
'bitwise-if', 'integer-length', 'first-set-bit', 'bit-field', and
'reverse-bit-field'.
(bitwise-copy-bit, bitwise-copy-bit-field, bitwise-rotate-bit-field):
Reimplement these based upon the similar SRFI-60 operators 'copy-bit',
'copy-bit-field', and 'rotate-bit-field'.
* test-suite/tests/r6rs-arithmetic-bitwise.test (bitwise-copy-bit): Fix
test to conform to the specification, which requires the third
argument to be either 0 or 1.
* test-suite/tests/r6rs-arithmetic-fixnums.test (fxcopy-bit): Fix test
to conform to the specification, which requires the third argument to
be either 0 or 1.
| Mark H Weaver | 2013-07-21 | 1 | -59/+22 |
* | | Merge remote-tracking branch 'origin/stable-2.0' | Mark H Weaver | 2013-07-18 | 3 | -6/+14 |
|\| |
|
| * | Fix R6RS 'fixnum-width'....Fixes <http://bugs.gnu.org/14879>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/fixnums.scm (fixnum-width): Rewrite to avoid
inexact arithmetic, and correct the off-by-one error.
* test-suite/tests/r6rs-arithmetic-fixnums.test (fixnum-width): Add
tests.
| Mark H Weaver | 2013-07-16 | 1 | -2/+5 |
| * | Update copyright dates of recently-changed R6RS bitwise/flonums files....* module/rnrs/arithmetic/bitwise.scm:
module/rnrs/arithmetic/flonums.scm:
test-suite/tests/r6rs-arithmetic-bitwise.test:
test-suite/tests/r6rs-arithmetic-flonums.test: Add 2013 to the
copyright dates.
| Mark H Weaver | 2013-07-16 | 2 | -2/+2 |
| * | Fix 'fxbit-count' for negative arguments....Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/fixnums.scm (fxbit-count): If the argument is
negative, return the 'bitwise-not' of the result of 'logcount', as per
R6RS. Previously, 'fxbit-count' was identical to 'logcount'.
* test-suite/tests/r6rs-arithmetic-fixnums.test (fxbit-count): Add test.
| Mark H Weaver | 2013-07-16 | 1 | -2/+7 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/numbers.c
| Mark H Weaver | 2013-07-16 | 1 | -23/+34 |
|\| |
|
| * | Flonum operations always return flonums....Fixes <http://bugs.gnu.org/14871>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/flonums.scm (ensure-flonum): New procedure.
(fllog): Rewrite using case-lambda. Handle negative zeroes. Use
'ensure-flonum'.
(flatan): Rewrite using case-lambda.
(flasin, flacos, flsqrt, flexpt): Use 'ensure-flonum'.
* test-suite/tests/r6rs-arithmetic-flonums.test
(fllog, flasin, flacos, flsqrt, flexpt): Add tests.
| Mark H Weaver | 2013-07-16 | 1 | -13/+26 |
| * | flfinite? applied to a NaN returns false....Fixes <http://bugs.gnu.org/14868>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/flonums.scm (flfinite?): If the argument is a
NaN, return false.
* test-suite/tests/r6rs-arithmetic-flonums.test (flfinite?): Add test.
| Mark H Weaver | 2013-07-16 | 1 | -1/+1 |
| * | flonum? returns false for complex number objects....Fixes <http://bugs.gnu.org/14866>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/flonums.scm (flonum?): Use 'real?' instead of
'number?'.
* test-suite/tests/r6rs-arithmetic-flonums.test (flonum?): Add tests.
| Mark H Weaver | 2013-07-16 | 1 | -1/+1 |
| * | Allow fl+ and fl* to accept zero arguments....Fixes <http://bugs.gnu.org/14869>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/flonums.scm (fl+, fl*): Accept zero arguments.
* test-suite/tests/r6rs-arithmetic-flonums.test (fl+, fl*): Add tests.
| Mark H Weaver | 2013-07-16 | 1 | -8/+6 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/keywords.c
libguile/vm.c
| Mark H Weaver | 2013-07-16 | 1 | -1/+5 |
|\| |
|
| * | Fix 'bitwise-bit-count' for negative arguments....Fixes <http://bugs.gnu.org/14864>.
Reported by Göran Weinholt <goran@weinholt.se>.
* module/rnrs/arithmetic/bitwise.scm (bitwise-bit-count): If the
argument is negative, return the 'bitwise-not' of the result of
'logcount', as per R6RS. Previously, 'bitwise-bit-count' was
identical to 'logcount'.
| Mark H Weaver | 2013-07-14 | 1 | -1/+5 |
* | | merge stable-2.0...There are some bugs with command-line handling that will be sorted out
with the next commit.
| Andy Wingo | 2013-01-23 | 1 | -2/+2 |
|\| |
|
| * | add read-string and read-string! to (ice-9 rdelim)...* module/ice-9/rdelim.scm (read-string!, read-string): New functions.
* test-suite/tests/rdelim.test: Add tests.
* doc/ref/api-io.texi: Add docs.
* module/ice-9/iconv.scm:
* module/rnrs/io/ports.scm:
* module/web/uri.scm: Use the new functions.
| Andy Wingo | 2013-01-22 | 1 | -2/+2 |
* | | All r6rs ports are both textual and binary...* module/rnrs/io/ports.scm (binary-port?): All ports are binary _and_
textual. Bytevectors and strings may be written to or read from
either.
(port-transcoder): All textual ports (all ports) have transcoders of
some sort.
* test-suite/tests/r6rs-ports.test ("8.2.6 Input and output ports"):
Remove test that binary ports don't have transcoders, because binary
ports are also textual.
| Andy Wingo | 2013-01-15 | 1 | -16/+14 |
|/ |
|
* | R6RS `string-for-each' should accept multiple string arguments...* module/rnrs/base.scm (string-for-each): Rewrite.
* test-suite/tests/r6rs-base.test ("string-for-each"): Add tests.
| Ian Price | 2012-11-22 | 1 | -1/+38 |
* | Add missing R6RS `open-file-input/output-port' procedure...* module/rnrs/io/port.scm (r6rs-open): New internal helper procedure for
opening files.
(open-file-input-port, open-file-output-port): Make use of
`r6rs-open'.
(open-file-input/output-port): Implement in terms of `r6rs-open',
add to exported identifiers list.
* module/rnrs.scm (open-file-input/output-port): Add to exported
identifiers.
* test-suite/tests/r6rs-ports.test (test-input-file-opener): New
procedure, collects several tests for opening file input ports.
("7.2.7 Input Ports"): Use `test-input-file-opener' for checking
`open-file-input-port'.
(test-output-file-opener): New procedure, collects several tests for
opening file output ports.
("8.2.10 Output ports"): Use `test-output-file-opener' for checking
`open-file-output-port'.
("8.2.13 Input/output ports"): New test prefix, making use of both
`test-input-file-opener' and `test-output-file-opener' to check
`open-file-input/output-port'.
| Andreas Rottmann | 2012-11-12 | 1 | -26/+44 |
* | Improve the usage of variable names in Scheme docstrings....* module/ice-9/boot-9.scm:
* module/ice-9/popen.scm:
* module/ice-9/pretty-print.scm:
* module/ice-9/r4rs.scm:
* module/rnrs/io/ports.scm:
* module/texinfo/string-utils.scm:
* module/web/http.scm:
* module/web/request.scm:
* module/web/response.scm:
* test-suite/vm/run-vm-tests.scm: Make the variable names in Scheme docstrings more
consistent. Replace a few instances of @var with @code when appropriate.
| Bake Timmons | 2012-02-02 | 1 | -1/+1 |
* | remove duplicate when/unless definitions...* module/rnrs/control.scm:
* module/sxml/ssax.scm:
* test-suite/lalr/common-test.scm: Remove local `when'/`unless'
definitions.
| Andy Wingo | 2012-01-20 | 1 | -12/+2 |
* | Fix R6RS `fold-left' so the accumulator is the first argument....* module/rnrs/lists.scm (fold-left): New procedure.
* module/rnrs/records/syntactic.scm (define-record-type): Fix to use
corrected `fold-left'.
* test-suite/tests/r6rs-lists.test: Add tests.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Ian Price | 2011-11-01 | 2 | -5/+11 |
* | fix r6rs `map'...* module/rnrs/base.scm (map): Define a version of map that is safe for
multiple returns, though slower.
| Andy Wingo | 2011-08-17 | 1 | -1/+71 |
* | Fix hygiene issues with `define-record-type'...* module/rnrs/records/syntactic.scm (define-record-type0, process-fields):
Preserve hygiene of record clauses.
* test-suite/tests/r6rs-records-syntactic.test ("record hygiene"):
Add tests.
| Ian Price | 2011-06-19 | 1 | -153/+143 |
* | rnrs io ports: fix port encoding when opening file ports...* module/rnrs/io/ports.scm (open-file-input-port)
(open-file-output-port): Ensure the resulting ports are binary when no
transcoder is specified.
* test-suite/tests/r6rs-ports.test: Remove superfluous global change of
`%default-port-encoding' and accompanying comment.
("7.2.7 Input Ports"): Add test ensuring `open-file-input-port' opens
a binary port when no transcoder is specified.
("8.2.10 Output ports"): Strengthen existing `open-file-output-port'
binary-ness test by setting `%default-port-encoding' to "UTF-8".
| Andreas Rottmann | 2011-05-27 | 1 | -2/+6 |
* | Improve R6RS conformance wrt. conditions in the I/O libraries...* module/rnrs/io/ports.scm (open-file-output-port): Handle `no-fail'
file option.
(with-i/o-filename-conditions): Use `with-throw-handler' instead of `catch'.
(with-i/o-port-error,
with-textual-output-conditions. with-textual-input-conditions): New
exception-conversion helpers.
(put-char, put-datum, put-string, display): Use
`with-textual-output-conditions' instead of `with-i/o-encoding-error'
to get proper conditions in case of write errors.
(get-char, get-datum, get-line, get-string-all, lookahead-char):
Likewise, for the input case.
* test-suite/tests/r6rs-ports.test (pass-if-condition, test-file,
make-failing-port): New helpers.
("8.2.10 Output ports"): Add some tests for `open-file-output-port'.
("8.2.9 Textual Input"): Add tests read error conditions.
("8.2.12 Textual Output"): Add tests for write error conditions.
("8.3 Simple I/O"): Add tests for conditions, `call-with-input-file'
and `call-with-output-file'.
| Andreas Rottmann | 2011-05-14 | 1 | -27/+51 |
* | Make the R6RS simple I/O library use conditions...* module/rnrs/io/ports.scm (display): Implement as an
exception-converting wrapper around Guile's core display.
* module/rnrs/io/simple.scm: Don't export Guile's corresponding core
procedures, but use `(rnrs io ports)' instead. This way, we get the
conditions required by R6RS raised.
* doc/ref/r6rs.texi (rnrs io simple): Mention that these procedures are
supposed to raise R6RS conditions.
| Andreas Rottmann | 2011-05-07 | 2 | -27/+69 |
* | (rnrs arithmetic fixnums) fixnum? export a procedure again...* module/rnrs/arithmetic/fixnums.scm (fixnum?): Restore this export to
be a procedure, not syntax.
(inline-fixnum?): This is what fixnum? was. Use it internally.
| Andy Wingo | 2011-04-13 | 1 | -7/+12 |
* | fix assert to return true value....* module/rnrs/base.scm (assert): returns value instead of void.
* test-suite/tests/r6rs-base.test ("assert"): add test cases.
| Ian Price | 2011-04-11 | 1 | -1/+1 |
* | Added optional second arg to R6RS log function...* module/rnrs/base.scm (log): now takes a base argument, using the
change of base formula for logs.
* test-suite/tests/r6rs-base.test ("log (2nd arg)"): Add test cases.
| Ian Price | 2011-04-11 | 1 | -0/+9 |
* | Fix the R6RS exact-integer-sqrt and import into core guile...* libguile/numbers.c (scm_exact_integer_sqrt): New C procedure to
compute exact integer square root and remainder.
(scm_i_exact_integer_sqrt): New Scheme procedure `exact-integer-sqrt'
from the R6RS, imported into core guile.
* libguile/numbers.h: Add prototypes.
* module/rnrs/base.scm: Remove broken stub implementation, which would
fail badly when applied to large integers.
* doc/ref/api-data.texi: Add documentation.
* doc/ref/r6rs.texi: Change documentation for `exact-integer-sqrt' to a
stub that xrefs the core docs, as is done for other operations
available in core.
* test-suite/tests/numbers.test: Add tests.
* NEWS: Add news entries.
| Mark H Weaver | 2011-04-09 | 1 | -3/+0 |
* | Implement R6RS' `fixnum?' in a smarter way...* module/rnrs/arithmetic/fixnums.scm (fixnum?): Implemented using
bit-twiddling, and using `define-inlinable'.
| Andreas Rottmann | 2011-04-08 | 1 | -7/+6 |
* | Several optimizations for R6RS fixnum arithmetic...* module/rnrs/arithmetic/fixnums.scm (assert-fixnum): Is now a
macro.
(assert-fixnums): New procedure checking a the elements of a list
for fixnum-ness. All callers applying `assert-fixnum' to a list
now changed to use this procedure.
* module/rnrs/arithmetic/fixnums.scm (define-fxop*): New for defining
n-ary inlinable special-casing the binary case using `case-lambda'.
All applicable procedures redefined using this macro.
* module/rnrs/arithmetic/fixnums.scm: Alias all predicates to
their non-fixnum counterparts.
| Andreas Rottmann | 2011-04-04 | 1 | -45/+41 |
* | Enhance transcoder-related functionality of `(rnrs io ports)'...* module/rnrs/io/ports.scm (transcoder-eol-style)
(transcoder-error-handling-mode): Export these.
(textual-port?): Implement this procedure and export it.
* module/rnrs.scm: Export these here as well.
* module/rnrs/io/ports.scm (port-transcoder): Implement this procedure.
(binary-port?): Treat only ports without an encoding as binary ports,
add docstring.
(standard-input-port, standard-output-port, standard-error-port):
Ensure these are created without an encoding.
(eol-style): Add `none' as enumeration member.
(native-eol-style): Switch to `none' from `lf'.
* test-suite/tests/r6rs-ports.test (7.2.7 Input ports)
(8.2.10 Output ports): Test binary-ness of `standard-input-port',
`standard-output-port' and `standard-error-port'.
(8.2.6 Input and output ports): Add test for `port-transcoder'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Andreas Rottmann | 2011-03-13 | 1 | -9/+33 |
* | Export `current-*-port' from `(rnrs io ports)'...* module/rnrs/io/ports.scm: Export `current-input-port',
`current-output-port' and `current-error-port' (see R6RS 8.2.7 "Input
ports" and 8.2.10 "Output ports").
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Andreas Rottmann | 2011-03-13 | 1 | -0/+1 |
* | Add `get-string-n' and `get-string-n!' for R6RS ports...* libguile/r6rs-ports.c (scm_get_string_n_x): Implement `get-string-n!'
in C for efficiency.
* libguile/r6rs-ports.h: Add prototype for this function.
* module/ice-9/binary-ports.scm: Export `get-string-n!'.
* module/rnrs/io/ports.scm (get-string-n): Implement based on
`get-string-n!'.
Export both `get-string-n!' and `get-string-n'.
* module/rnrs.scm: Also export these.
* test-suite/tests/r6rs-ports.test (8.2.9 Textual input): Add a few
tests for `get-string-n' and `get-string-n!'.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
| Andreas Rottmann | 2011-03-13 | 1 | -2/+14 |