--- /dev/null
+(declare (unit charport))
+;(define (charport-read chprt)
+; (define ch (read-char (charport-port chprt)))
+; (cond
+; ((eof-object? ch)) ; Do nothing for EOFs
+; ((char=? ch #\newline)
+; (charport-line-set! chprt (+ 1 (charport-line chprt)))
+; (charport-column-set! chprt 1))
+; (else
+; (charport-column-set! chprt (+ 1 (charport-column chprt)))))
+; (charobj ch (charport-posdata chprt))
+;
+;(define (charport-posdata chprt)
+; (posdata
+; (port-name (charport-port chprt))
+; (charport-line chprt)
+; (charport-column chprt)))
+
+
(syntree=? (car ch1) (car ch2))
(syntree-children=? (cdr ch1) (cdr ch2))))))
+(define-record charobj char pos)
+(define charobj make-charobj)
+
(define (charport-read chprt)
(define ch (read-char (charport-port chprt)))
(cond
(charport-column-set! chprt 1))
(else
(charport-column-set! chprt (+ 1 (charport-column chprt)))))
- ch)
+ (if (eof-object? ch) ch (charobj ch (charport-posdata chprt))))
(define (charport-posdata chprt)
(posdata