mirror of
https://github.com/ashinn/chibi-scheme.git
synced 2025-05-19 21:59:17 +02:00
They can be close()d explicitly with close-file-descriptor, and will close() on gc, but only explicitly closing the last port on them will close the fileno. Notably needed for network sockets where we open separate input and output ports on the same socket.
20 lines
620 B
Scheme
20 lines
620 B
Scheme
|
|
(define char-set:letter+digit
|
|
(immutable-char-set (char-set-union char-set:letter char-set:digit)))
|
|
|
|
(define char-set:hex-digit
|
|
(immutable-char-set
|
|
(char-set-union (string->char-set "0123456789abcdefABCDEF"))))
|
|
|
|
(define char-set:iso-control
|
|
(immutable-char-set
|
|
(char-set-union (ucs-range->char-set 0 #x20)
|
|
(ucs-range->char-set #x7F #xA0))))
|
|
|
|
(define char-set:graphic
|
|
(immutable-char-set
|
|
(char-set-union
|
|
char-set:letter char-set:digit char-set:punctuation char-set:symbol)))
|
|
|
|
(define char-set:printing
|
|
(immutable-char-set (char-set-union char-set:whitespace char-set:graphic)))
|