Index: /branches/event-ide/ccl/cocoa-ide/cocoa-listener.lisp
===================================================================
--- /branches/event-ide/ccl/cocoa-ide/cocoa-listener.lisp	(revision 7930)
+++ /branches/event-ide/ccl/cocoa-ide/cocoa-listener.lisp	(revision 7931)
@@ -188,7 +188,4 @@
     ((filehandle :foreign-type :id)	;Filehandle for I/O
      (clientfd :foreign-type :int)	;Client (listener)'s side of pty
-     (nextra :foreign-type :int)        ;count of untranslated bytes remaining
-     (translatebuf :foreign-type :address) ;buffer for utf8 translation
-     (bufsize :foreign-type :int)       ;size of translatebuf
      )
   (:metaclass ns:+ns-object)
@@ -213,68 +210,6 @@
 		      :close-on-dealloc t)))
 	    (setf (slot-value new 'filehandle) fh)
-	    (setf (slot-value new 'clientfd) (setup-client-pty client))
-            (let* ((bufsize #$BUFSIZ)
-                   (buffer (#_malloc bufsize)))
-              (setf (slot-value new 'translatebuf) buffer
-                    (slot-value new 'bufsize) bufsize
-                    (slot-value new 'nextra) 0))
-            (#/addObserver:selector:name:object:
-             (#/defaultCenter ns:ns-notification-center)
-             new
-             (@selector #/gotData:)
-             #&NSFileHandleReadCompletionNotification
-             fh)
-            (#/readInBackgroundAndNotify fh)))))
+	    (setf (slot-value new 'clientfd) (setup-client-pty client))))))
     new))
-
-(objc:defmethod (#/gotData: :void) ((self hemlock-listener-window-controller)
-                                    notification)
-  (with-slots (filehandle nextra translatebuf bufsize) self
-    (let* ((data (#/objectForKey: (#/userInfo notification)
-                                  #&NSFileHandleNotificationDataItem))
-           (encoding (load-time-value (get-character-encoding :utf-8)))
-	   (data-length (#/length data))
-           (n nextra)
-           (cursize bufsize)
-           (need (+ n data-length))
-           (xlate translatebuf)
-	   (fh filehandle))
-      (when (> need cursize)
-        (let* ((new (#_malloc need)))
-          (dotimes (i n) (setf (%get-unsigned-byte new i)
-                               (%get-unsigned-byte xlate i)))
-          (#_free xlate)
-          (setq xlate new translatebuf new bufsize need)))
-      #+debug :GZ (#_NSLog #@"got %d bytes of data" :int data-length)
-      (with-macptrs ((target (%inc-ptr xlate n)))
-        (#/getBytes:range: data target (ns:make-ns-range 0 data-length)))
-      (let* ((total (+ n data-length)))
-        (multiple-value-bind (nchars noctets-used)
-            (funcall (ccl::character-encoding-length-of-memory-encoding-function encoding)
-                     xlate
-                     total
-                     0)
-          (let* ((string (make-string nchars)))
-            (funcall (ccl::character-encoding-memory-decode-function encoding)
-                     xlate
-                     noctets-used
-                     0
-                     string)
-            (unless (zerop (setq n (- total noctets-used)))
-              ;; By definition, the number of untranslated octets
-              ;; can't be more than 3.
-              (dotimes (i n)
-                (setf (%get-unsigned-byte xlate i)
-                      (%get-unsigned-byte xlate (+ noctets-used i)))))
-            (setq nextra n)
-	    (let ((view (hemlock-view self)))
-	      (queue-for-gui #'(lambda () (append-output view string))))
-            (#/readInBackgroundAndNotify fh)))))))
-	     
-
-
-(objc:defmethod (#/dealloc :void) ((self hemlock-listener-window-controller))
-  (#/removeObserver: (#/defaultCenter ns:ns-notification-center) self)
-  (call-next-method))
 
 (objc:defmethod #/windowTitleForDocumentDisplayName: ((self hemlock-listener-window-controller) name)
