~ chicken-core (master) 83ae2ab193b896900825f25e73ded0aaf4726e39
commit 83ae2ab193b896900825f25e73ded0aaf4726e39
Author: Kristian Lein-Mathisen <kristianlein@gmail.com>
AuthorDate: Sat Nov 22 19:56:06 2025 +0100
Commit: felix <felix@call-with-current-continuation.org>
CommitDate: Sun Nov 23 10:18:33 2025 +0100
fix terminal-size argument names
the documentation says two values are returned: rows and columns. this
is correct and the observed behaviour. however, the names are swapped.
this patch should not alter the actual values returned.
Signed-off-by: felix <felix@call-with-current-continuation.org>
diff --git a/port.scm b/port.scm
index 8cad547f..0a4e44a2 100644
--- a/port.scm
+++ b/port.scm
@@ -486,9 +486,9 @@ char *ttyname(int fd) {
(let-location ((columns int)
(rows int))
(if (fx= 0 (ttysize (##core#inline "C_port_fileno" port)
- (location columns)
- (location rows)))
- (values columns rows)
+ (location rows)
+ (location columns)))
+ (values rows columns)
(posix-error #:error 'terminal-size
"cannot determine terminal size" port))))))
Trap