[bknr-cvs] r2033 - branches/xml-class-rework/thirdparty/iconv

bknr at bknr.net bknr at bknr.net
Mon Oct 23 05:53:29 UTC 2006


Author: hhubner
Date: 2006-10-23 01:53:29 -0400 (Mon, 23 Oct 2006)
New Revision: 2033

Modified:
   branches/xml-class-rework/thirdparty/iconv/iconv.lisp
Log:
Fix error handling


Modified: branches/xml-class-rework/thirdparty/iconv/iconv.lisp
===================================================================
--- branches/xml-class-rework/thirdparty/iconv/iconv.lisp	2006-10-23 05:11:42 UTC (rev 2032)
+++ branches/xml-class-rework/thirdparty/iconv/iconv.lisp	2006-10-23 05:53:29 UTC (rev 2033)
@@ -81,13 +81,11 @@
 				     in-ptr inbytesleft
 				     out-ptr outbytesleft)
 			     #xffffffff)
-		      (if (= (get-errno) EILSEQ)
+		      (if (find (get-errno) (list EILSEQ EINVAL) :test #'eql)
 			  (if error-p
-			      (error "invalid multibyte(~X)."
-				     (cffi-uffi-compat:deref-array inbuffer (cffi-uffi-compat::convert-uffi-type :unsigned-byte) (current)))
+			      (error "invalid multibyte character (0x~X)." (cffi:mem-aref inbuffer :unsigned-char (current)))
 			      (progn
-				(setf (cffi-uffi-compat:deref-array inbuffer (cffi-uffi-compat::convert-uffi-type :unsigned-byte) (current))
-				      error-value)
+				(setf (cffi:mem-aref inbuffer :unsigned-char (current)) error-value)
 				(self)))
 			  (error "unexpected iconv error ~A" (get-errno))))))
 	       (self))




More information about the Bknr-cvs mailing list