src/streams.lisp @ 0711b20b976c default tip

Update documentation
author Steve Losh <steve@stevelosh.com>
date Fri, 02 Oct 2026 11:39:39 -0400
parents 443af0e76dd6
children (none)
(in-package :losh.streams)

(defmacro with-eof-handled ((stream eof-error-p eof-value) &body body)
  (alexandria:once-only (stream eof-error-p eof-value)
    `(if (null (peek-char nil ,stream nil))
       (if ,eof-error-p
         (error 'end-of-file)
         ,eof-value)
       (progn ,@body))))