/[cmucl]/src/code/extfmts.lisp
ViewVC logotype

Diff of /src/code/extfmts.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.35.4.4 by rtoy, Thu Sep 2 23:47:31 2010 UTC revision 1.35.4.5 by rtoy, Mon Sep 6 01:01:27 2010 UTC
# Line 35  Line 35 
35    "Hash table mapping an external format alias to the actual external    "Hash table mapping an external format alias to the actual external
36    format implementation")    format implementation")
37    
38    ;; Each time DEF-EF-MACRO is used to define a new external format
39    ;; macro, a unique value must be used for the index.  The mapping
40    ;; between the macro and the index is here.
41  (vm::defenum (:prefix "+EF-" :suffix "+" :start 1)  (vm::defenum (:prefix "+EF-" :suffix "+" :start 1)
42    str                                   ; string length    str                                   ; string length
43    cin                                   ; input a character    cin                                   ; input a character
# Line 47  Line 50 
50    de                                    ; decode    de                                    ; decode
51    flush                                 ; flush state    flush                                 ; flush state
52    copy-state                            ; copy state    copy-state                            ; copy state
53      osc                                   ; octets to string, counted
54    max)    max)
55    
56  ;; Unicode replacement character U+FFFD  ;; Unicode replacement character U+FFFD
# Line 685  character and illegal outputs are replac Line 689  character and illegal outputs are replac
689  (defun ensure-cache (ef id reqd)  (defun ensure-cache (ef id reqd)
690    (let ((base (or (getf *ef-extensions* id)    (let ((base (or (getf *ef-extensions* id)
691                    (setf (getf *ef-extensions* id)                    (setf (getf *ef-extensions* id)
692                        (prog1 *ef-base* (incf *ef-base* reqd))))))                          (prog1 *ef-base* (incf *ef-base* reqd))))))
693      (when (< (length (ef-cache ef)) (+ base reqd))      (when (< (length (ef-cache ef)) (+ base reqd))
694        (setf (efx-cache (ef-efx ef))        (setf (efx-cache (ef-efx ef))
695            (adjust-array (ef-cache ef) (+ base reqd) :initial-element nil)))            (adjust-array (ef-cache ef) (+ base reqd) :initial-element nil)))
# Line 921  character and illegal outputs are replac Line 925  character and illegal outputs are replac
925        (values (if stringp string (lisp::shrink-vector string pos)) pos last-octet new-state))))        (values (if stringp string (lisp::shrink-vector string pos)) pos last-octet new-state))))
926    
927    
928  (def-ef-macro ef-octets-to-string-counted (extfmt lisp::lisp +ef-max+ +ef-os+)  (def-ef-macro ef-octets-to-string-counted (extfmt lisp::lisp +ef-max+ +ef-osc+)
929    `(lambda (octets ptr end state ocount string s-start s-end error    `(lambda (octets ptr end state ocount string s-start s-end error
930              &aux (pos s-start) (last-octet 0))              &aux (pos s-start) (last-octet 0))
931       (declare (optimize (speed 3) (safety 0) #|(space 0) (debug 0)|#)       (declare (optimize (speed 3) (safety 0) #|(space 0) (debug 0)|#)

Legend:
Removed from v.1.35.4.4  
changed lines
  Added in v.1.35.4.5

  ViewVC Help
Powered by ViewVC 1.1.5