~ chicken-core (master) 9d3cf1b25619fdb4ded7eb42a4fd1c70be04ec61
commit 9d3cf1b25619fdb4ded7eb42a4fd1c70be04ec61
Author: felix <felix@call-with-current-continuation.org>
AuthorDate: Thu Sep 3 10:56:40 2026 +0200
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Thu Sep 3 10:56:40 2026 +0200
deprecate "read-buffered", some doc fixes
diff --git a/DEPRECATED b/DEPRECATED
index 1adda82c..8c68157b 100644
--- a/DEPRECATED
+++ b/DEPRECATED
@@ -1,6 +1,12 @@
Deprecated functions and variables
==================================
+6.0.1
+- The procedure "read-buffered" can return a string with incomplete
+ codepoints when a non-binary encoding is used in the port. It
+ will be replaced by a method that returns bytevectors in the
+ future.
+
6.0.0
- The foreign type "blob" is obsolete and equivalent to the
foreign type "bytevector".
diff --git a/NEWS b/NEWS
index 2036c50e..f9f3edae 100644
--- a/NEWS
+++ b/NEWS
@@ -6,7 +6,7 @@
- The default range used in `bytes->string' was calculated incorrectly.
- Fixed various bugs in the implementation of the use of explicit port
methods for reading bytevectors in custom input ports.
- - Fixed implementation of `read-buffered' for string input-ports.
+ - `read-buffered' has been deprecated.
- Printing at the REPL didn't implement output-limit handling, this has
been added now.
- "string-translate*" now properly checks the structure of the string
diff --git a/library.scm b/library.scm
index 16c94133..d7b63fbc 100644
--- a/library.scm
+++ b/library.scm
@@ -8301,7 +8301,7 @@ static C_word C_curdir(C_word buf, C_word size) {
(define chicken.io#read-bytevector/port read-bytevector/port)
(define chicken.io#read-bytevector!/port read-bytevector!/port)
-(define (read-buffered #!optional (port ##sys#standard-input))
+(define (read-buffered #!optional (port ##sys#standard-input)) ; DEPRECATED
(##sys#check-input-port port #t 'read-buffered)
(let ((rb (##sys#slot (##sys#slot port 2) 9))) ; read-buffered method
(if rb
diff --git a/manual/Module (chicken io) b/manual/Module (chicken io)
index 4cccd6e8..3b69c64f 100644
--- a/manual/Module (chicken io)
+++ b/manual/Module (chicken io)
@@ -16,15 +16,6 @@ The reader is called with one argument: {{PORT}}.
{{READER}} defaults to {{read}}, {{MAX}} to {{#f}} and {{PORT}} to {{current-input-port}}, so if you call it with no arguments, it will read all remaining s-expressions from the current input port.
-=== read-buffered
-
-<procedure>(read-buffered [PORT])</procedure>
-
-Reads any remaining data buffered after previous read operations on
-{{PORT}}. If no remaining data is currently buffered, an empty string
-is returned. This procedure will never block. Currently only useful
-for string-, process- and tcp ports.
-
=== read-byte
=== write-byte
diff --git a/manual/Module (chicken process signal) b/manual/Module (chicken process signal)
index a640f165..5e275ee4 100644
--- a/manual/Module (chicken process signal)
+++ b/manual/Module (chicken process signal)
@@ -134,7 +134,7 @@ procedure is unimplemented and will raise an error.
<constant>signals-list</constant><br>
These variables contain signal codes for use with {{process-signal}},
-{{set-signal-handler!}}, {{signal-handler}}, {{signal-masked?}},
+{{signal-masked?}},
{{signal-mask!}}, or {{signal-unmask!}}.
'''NOTE''': On native Windows builds (all except cygwin), only
diff --git a/types.db b/types.db
index 825ebc4c..02e4f716 100644
--- a/types.db
+++ b/types.db
@@ -1630,7 +1630,7 @@
;; io
(chicken.io#read-list (#(procedure #:enforce) chicken.io#read-list (#!optional input-port (procedure (input-port) *) fixnum) list))
-(chicken.io#read-buffered (#(procedure #:enforce) chicken.io#read-buffered (#!optional input-port) string))
+(chicken.io#read-buffered deprecated)
(chicken.io#read-byte (#(procedure #:enforce) chicken.io#read-byte (#!optional input-port) *))
(chicken.io#read-line (#(procedure #:enforce) chicken.io#read-line (#!optional input-port (or false fixnum)) (or eof string)))
(chicken.io#read-lines (#(procedure #:enforce) chicken.io#read-lines (#!optional input-port fixnum) (list-of string)))
Trap