projects
/
kmrcl.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
r10985: actually apply diff
[kmrcl.git]
/
buff-input.lisp
diff --git
a/buff-input.lisp
b/buff-input.lisp
index dcae08c8e823836a34cc0c4e1173daca2e95a990..4868ba1690e293a9ab036b85159c5c11228239fd 100644
(file)
--- a/
buff-input.lisp
+++ b/
buff-input.lisp
@@
-7,7
+7,7
@@
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
;;;; Programmer: Kevin M. Rosenberg
;;;; Date Started: Apr 2000
;;;;
-;;;; $Id
: buff-input.lisp,v 1.9 2003/05/06 01:50:46 kevin Exp
$
+;;;; $Id$
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
;;;;
;;;; This file, part of KMRCL, is Copyright (c) 2002 by Kevin M. Rosenberg
;;;;
@@
-167,13
+167,16
@@
(if (eql c +eof-char+) eof linebuffer)))
(declare (character c))
(cond
(if (eql c +eof-char+) eof linebuffer)))
(declare (character c))
(cond
- ((char= c #\Newline)
- (unless (zerop pos)
- (setf (fill-pointer linebuffer) (1- pos)))
- (setf done t))
- ((char= +eof-char+)
- (setf done t))
- (t
- (setf (char linebuffer pos) c)
- (incf pos)))))))
+ ((>= pos +max-line+)
+ (warn "Line overflow")
+ (setf done t))
+ ((char= c #\Newline)
+ (when (plusp pos)
+ (setf (fill-pointer linebuffer) (1- pos)))
+ (setf done t))
+ ((char= +eof-char+)
+ (setf done t))
+ (t
+ (setf (char linebuffer pos) c)
+ (incf pos)))))))