Changeset 10532
- Timestamp:
- 08/22/08 10:12:03 (3 months ago)
- Files:
-
- branches/working-0711/ccl/level-1/l1-io.lisp (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branches/working-0711/ccl/level-1/l1-io.lisp
r10350 r10532 1016 1016 1017 1017 1018 (defvar *pname-buffer* (%cons-pool "12345678901234567890"))1019 1018 1020 1019 (defun write-pname (name case stream) … … 1095 1094 (let* ((outbuf-len (+ len len)) 1096 1095 (outbuf-ptr -1) 1097 (pool *pname-buffer*) 1098 (outbuf (pool.data pool))) 1099 (declare (fixnum outbuf-ptr) (simple-string outbuf)) 1100 (setf (pool.data pool) nil) ; grab it. 1101 (unless (and outbuf (>= (length outbuf) outbuf-len)) 1102 (setq outbuf (make-array outbuf-len :element-type 'character))) 1096 (outbuf (make-string outbuf-len))) 1097 (declare (fixnum outbuf-ptr outbuf-len) 1098 (dynamic-extent outbuf) 1099 (simple-string outbuf)) 1103 1100 (dotimes (pos (the fixnum len)) 1104 1101 (declare (type fixnum pos)) … … 1115 1112 (setf (schar outbuf (incf outbuf-ptr)) #\\)) 1116 1113 (setf (schar outbuf (incf outbuf-ptr)) char))) 1117 (write-string outbuf stream :start 0 :end (1+ outbuf-ptr)) 1118 (setf (pool.data pool) outbuf))))))) 1114 (write-string outbuf stream :start 0 :end (1+ outbuf-ptr)))))))) 1119 1115 1120 1116 #| … … 1158 1154 (let* ((readtable *readtable*) 1159 1155 (readcase (readtable-case readtable)) 1160 (pool *pname-buffer*)1161 1156 (outbuf-ptr -1) 1162 (outbuf ( pool.data pool))1157 (outbuf (make-string end)) 1163 1158 (word-start t) 1164 1159 (offset 0)) 1165 (declare (fixnum offset outbuf-ptr)) 1166 (setf (pool.data pool) nil) 1167 (unless (and outbuf (>= (length outbuf) end)) 1168 (setq outbuf (make-array end :element-type 'character))) ; this may be fat string now - do we care? 1160 (declare (fixnum offset outbuf-ptr) 1161 (dynamic-extent outbuf)) 1169 1162 (when (eq type :studly) 1170 1163 (do ((i 0 (%i+ i 1))) … … 1206 1199 (t (setq word-start t))) 1207 1200 (setf (schar outbuf (incf outbuf-ptr)) c))) 1208 (write-string outbuf stream :start 0 :end end) 1209 (setf (pool.data pool) outbuf))) 1201 (write-string outbuf stream :start 0 :end end))) 1210 1202 1211 1203
