Changeset 917
- Timestamp:
- Feb 16, 2005, 11:35:24 AM (20 years ago)
- File:
-
- 1 edited
-
trunk/ccl/level-1/l1-streams.lisp (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ccl/level-1/l1-streams.lisp
r885 r917 1308 1308 (setf (slot-value s 'did-untyi) c)) 1309 1309 1310 (defmethod stream-read-char-no-hang ((s echo-stream)) 1311 (let* ((char (stream-read-char-no-hang (echo-stream-input-stream s)))) 1312 (unless (eq char :eof) 1313 (if (slot-value s 'did-untyi) 1314 (setf (slot-value s 'did-untyi) nil) 1315 (stream-write-char (echo-stream-output-stream s) char))) 1316 char)) 1317 1310 1318 (defmethod stream-clear-input ((s echo-stream)) 1311 1319 (call-next-method) 1312 1320 (setf (slot-value s 'did-untyi) nil)) 1321 1322 (defmethod stream-read-byte ((s echo-stream)) 1323 (let* ((byte (stream-read-byte (echo-stream-input-stream s)))) 1324 (unless (eq byte :eof) 1325 (stream-write-byte (echo-stream-output-stream s) byte)) 1326 byte)) 1327 1328 (defmethod stream-read-line ((s echo-stream)) 1329 (generic-read-line s)) 1330 1331 (defmethod stream-read-vector ((s echo-stream) vector start end) 1332 (if (subtypep (stream-element-type s) 'character) 1333 (generic-character-read-vector s vector start end) 1334 (generic-binary-read-vector s vector start end))) 1313 1335 1314 1336 (defun make-echo-stream (input-stream output-stream) … … 1346 1368 (return ch))))) 1347 1369 1370 (defmethod stream-read-char-no-hang ((s concatenated-stream)) 1371 (do* ((c (concatenated-stream-current-input-stream s) 1372 (concatenated-stream-next-input-stream s))) 1373 ((null c) :eof) 1374 (let* ((ch (stream-read-char-no-hang c))) 1375 (unless (eq ch :eof) 1376 (return ch))))) 1377 1348 1378 (defmethod stream-read-byte ((s concatenated-stream)) 1349 1379 (do* ((c (concatenated-stream-current-input-stream s) … … 1353 1383 (unless (eq b :eof) 1354 1384 (return b))))) 1385 1386 (defmethod stream-peek-char ((s concatenated-stream)) 1387 (do* ((c (concatenated-stream-current-input-stream s) 1388 (concatenated-stream-next-input-stream s))) 1389 ((null c) :eof) 1390 (let* ((ch (stream-peek-char c))) 1391 (unless (eq ch :eof) 1392 (return ch))))) 1393 1394 (defmethod stream-read-line ((s concatenated-stream)) 1395 (generic-read-line s)) 1396 1397 (defmethod stream-read-list ((s concatenated-stream) list count) 1398 (generic-character-read-list s list count)) 1399 1400 (defmethod stream-read-vector ((s concatenated-stream) vector start end) 1401 (if (subtypep (stream-element-type s) 'character) 1402 (generic-character-read-vector s vector start end) 1403 (generic-binary-read-vector s vector start end))) 1355 1404 1356 1405 (defmethod stream-unread-char ((s concatenated-stream) char)
Note:
See TracChangeset
for help on using the changeset viewer.
