r4822: *** empty log message ***
[kmrcl.git] / buff-input.lisp
index 53f76e018d538471b8cff0d139f941b0c2fc3710..d17590dc0f29790645575155477a01c70908ef4b 100644 (file)
@@ -7,17 +7,19 @@
 ;;;; Programmer:    Kevin M. Rosenberg
 ;;;; Date Started:  Apr 2000
 ;;;;
-;;;; $Id: buff-input.lisp,v 1.2 2002/10/06 13:30:17 kevin Exp $
+;;;; $Id: buff-input.lisp,v 1.6 2003/05/06 01:43:14 kevin Exp $
 ;;;;
-;;;; 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
 ;;;;
-;;;; Kmrcl users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the GNU General Public License.
+;;;; KMRCL users are granted the rights to distribute and use this software
+;;;; as governed by the terms of the Lisp Lesser GNU Public License
+;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
 (in-package :kmrcl)
 
-(declaim (optimize (speed 3) (safety 0) (space 0) (debug 0)))
+(eval-when (:compile-toplevel)
+  (declaim (optimize (speed 3) (safety 0) (space 0) (debug 0))))
 
 (defconstant +max-field+ 10000)
 (defconstant +max-fields-per-line+ 20)
@@ -38,7 +40,8 @@
       (setf (aref bufs i) (make-array max-field-len :element-type 'character :fill-pointer 0 :adjustable nil)))
     bufs))
 
-(defun read-buffered-fields (fields strm &optional (field-delim +field-delim+))
+(defun read-buffered-fields (fields strm &optional (field-delim +field-delim+)
+                            (eof 'eof))
   "Read a line from a stream into a field buffers"
   (declare (type base-char field-delim)
           (type vector fields))
@@ -86,9 +89,6 @@
   (buffers)
   (field-lengths))
 
-(defmethod print-object ((f field-buffers) s)
-  (format s "#<~d>~%" (field-buffers-nfields f)))
-   
 (defun make-fields-buffer2 (&optional (max-fields +max-fields-per-line+) 
                                   (max-field-len +max-field+))
   (let ((bufs (make-array max-fields :element-type 'vector :fill-pointer nil :adjustable nil))