Many hyperlinks are disabled.
Use anonymous login
to enable hyperlinks.
Overview
| Comment: | added binary-port->string |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk |
| Files: | files | file ages | folders |
| SHA1: |
3373c30b1e4284db7ae09ccbe9825a05 |
| User & Date: | aldo 2016-12-08 00:42:48 |
Context
|
2016-12-08
| ||
| 00:43 | include fixes for fmt check-in: a71834a427 user: aldo tags: trunk | |
| 00:42 | added binary-port->string check-in: 3373c30b1e user: aldo tags: trunk | |
| 00:41 | moved cast and char*->bytevector to ffi-utils check-in: 6cf5622d30 user: aldo tags: trunk | |
Changes
Changes to srfi/s41/streams/derived.sls.
48 49 50 51 52 53 54 55 56 57 58 59 60 61 |
(list->stream objs)))
(define (port->stream . port)
(define port->stream
(stream-lambda (p)
(let ((c (read-char p)))
(if (eof-object? c)
stream-null
(stream-cons c (port->stream p))))))
(let ((p (if (null? port) (current-input-port) (car port))))
(if (not (input-port? p))
(error 'port->stream "non-input-port argument")
(port->stream p))))
|
> > > > > > > > > > > > |
48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 |
(list->stream objs)))
(define (port->stream . port)
(define port->stream
(stream-lambda (p)
(let ((c (read-char p)))
(if (eof-object? c)
stream-null
(stream-cons c (port->stream p))))))
(let ((p (if (null? port) (current-input-port) (car port))))
(if (not (input-port? p))
(error 'port->stream "non-input-port argument")
(port->stream p))))
(define (binary-port->stream . port)
(define port->stream
(stream-lambda (p)
(let ((c (get-u8 p)))
(if (eof-object? c)
stream-null
(stream-cons c (port->stream p))))))
(let ((p (if (null? port) (current-input-port) (car port))))
(if (not (input-port? p))
(error 'port->stream "non-input-port argument")
(port->stream p))))
|