Raymond Toy pushed to branch issue-367-count-octets-for-encoding at cmucl / cmucl

Commits:

6 changed files:

Changes:

  • src/pcl/simple-streams/external-formats/utf-16-be.lisp
    ... ... @@ -111,7 +111,7 @@ Unicode replacement character.")
    111 111
         ;; The state is either NIL or a codepoint, so nothing really
    
    112 112
         ;; special is needed to copy it.
    
    113 113
         `(progn ,state))
    
    114
    -  (code-to-octets (code state error)
    
    114
    +  (octet-count (code state error)
    
    115 115
         `(cond ((< ,code #x10000)
    
    116 116
     	    2)
    
    117 117
     	   ((< ,code #x110000)
    

  • src/pcl/simple-streams/external-formats/utf-16-le.lisp
    ... ... @@ -112,7 +112,7 @@ Unicode replacement character.")
    112 112
         ;; The state is either NIL or a codepoint, so nothing really
    
    113 113
         ;; special is needed.
    
    114 114
         `(progn ,state))
    
    115
    -  (code-to-octets (code state error)
    
    115
    +  (octet-count (code state error)
    
    116 116
         `(cond ((< ,code #x10000)
    
    117 117
     	    2)
    
    118 118
     	   ((< ,code #x110000)
    

  • src/pcl/simple-streams/external-formats/utf-16.lisp
    ... ... @@ -157,7 +157,7 @@ Unicode replacement character.")
    157 157
       (copy-state (state)
    
    158 158
         ;; The state is list. Copy it
    
    159 159
     	      `(copy-list ,state))
    
    160
    -  (code-to-octets (code state error)
    
    160
    +  (octet-count (code state error)
    
    161 161
         `(progn
    
    162 162
            #+nil
    
    163 163
            (unless ,state
    

  • src/pcl/simple-streams/external-formats/utf-32-be.lisp
    ... ... @@ -64,7 +64,7 @@ Unicode replacement character.")
    64 64
     	      (out ,code)))))
    
    65 65
       ()
    
    66 66
       ()
    
    67
    -  (code-to-octets (code state error)
    
    67
    +  (octet-count (code state error)
    
    68 68
         `(cond ((lisp::surrogatep ,code)
    
    69 69
     	    (if ,error
    
    70 70
     		(locally
    
    ... ... @@ -75,4 +75,4 @@ Unicode replacement character.")
    75 75
     		;; Replacement character is 2 octets
    
    76 76
     		2))
    
    77 77
     	   (t
    
    78
    -	    4)))))
    78
    +	    4))))

  • src/pcl/simple-streams/external-formats/utf-32-le.lisp
    ... ... @@ -65,7 +65,7 @@ Unicode replacement character.")
    65 65
     	      (out ,code)))))
    
    66 66
       ()
    
    67 67
       ()
    
    68
    -  (code-to-octets (code state error)
    
    68
    +  (octet-count (code state error)
    
    69 69
         `(cond ((lisp::surrogatep ,code)
    
    70 70
     	    (if ,error
    
    71 71
     		(locally
    

  • src/pcl/simple-streams/external-formats/utf-32.lisp
    ... ... @@ -115,7 +115,7 @@ Unicode replacement character.")
    115 115
       (copy-state (state)
    
    116 116
         ;; The state is either NIL or T, so we can just return that.
    
    117 117
         `(progn ,state))
    
    118
    -  (code-to-octets (code state output error i c)
    
    118
    +  (octet-count (code state error)
    
    119 119
         `(progn
    
    120 120
            ;; Should we count the BOM?
    
    121 121
            #+nil