chibi-scheme/build-lib/chibi/char-set/compute.scm
Alex Shinn 8b5eb68238 File descriptors maintain a reference count of ports open on them
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.
2014-02-20 22:32:50 +09:00

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)))