Style changes.
[iolib/alendvai.git] / io.streams / zeta / misc.lisp
blob409298e53e120593185601b83b0567a3fbd2da15
1 (in-package :io.zeta-streams)
3 (defun device-write-string (device string)
4 (let ((octets (babel:string-to-octets string :encoding :utf-8)))
5 (device-write device octets 0 (length octets))))
7 (defun device-terpri (device)
8 (device-write device #.(coerce #(#xA) 'ub8-simple-vector) 0 1))
10 (defun device-write-line (device string)
11 (device-write-string device string)
12 (device-terpri device))
14 (defun device-read-char (device)
15 (let ((vector (make-iobuf-data-vector 1)))
16 (device-read device vector 0 1)
17 (code-char (aref vector 0))))