Skip to content
Snippets Groups Projects
Commit 0d642ca8 authored by rtoy's avatar rtoy
Browse files

iso8859-2.lisp:

mac-roman.lisp:
o Fix code so that the offending codepoint on output is actually
  passed to the error routine.  (Previously, we returned the value
  from the table which was always nil because the code did not have a
  valid output.)
parent 2466a71d
No related branches found
No related tags found
No related merge requests found
......@@ -4,7 +4,7 @@
;;; This code was written by Paul Foley and has been placed in the public
;;; domain.
;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/iso8859-2.lisp,v 1.4 2010/07/02 23:13:11 rtoy Exp $")
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/iso8859-2.lisp,v 1.5 2010/07/07 21:59:49 rtoy Exp $")
(in-package "STREAM")
......@@ -29,9 +29,9 @@
(code-to-octets (code state output error present)
`(,output (if (< ,code 160)
,code
(let ((,code (get-inverse ,itable ,code)))
(let ((,present (get-inverse ,itable ,code)))
(if ,code
(+ (the (unsigned-byte 7) ,code) 160)
(+ (the (unsigned-byte 7) ,present) 160)
(if ,error
(funcall ,error "Cannot output codepoint #x~X to ISO8859-2 stream" ,code)
#x3F)))))))
......@@ -4,7 +4,7 @@
;;; This code was written by Paul Foley and has been placed in the public
;;; domain.
;;;
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/mac-roman.lisp,v 1.5 2010/07/02 23:13:11 rtoy Exp $")
(ext:file-comment "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/pcl/simple-streams/external-formats/mac-roman.lisp,v 1.6 2010/07/07 21:59:49 rtoy Exp $")
(in-package "STREAM")
......@@ -34,9 +34,9 @@
(code-to-octets (code state output error present)
`(,output (if (< ,code 128)
,code
(let ((,code (get-inverse ,itable ,code)))
(if ,code
(+ (the (unsigned-byte 7) ,code) 128)
(let ((,present (get-inverse ,itable ,code)))
(if ,present
(+ (the (unsigned-byte 7) ,present) 128)
(if ,error
(funcall ,error "Cannot output codepoint #x~X to MAC-ROMAN stream"
,code)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment