anchor.diff:  
   (cl:in-package :cl-charms)
   
  +#+sb-unicode
  +(define-foreign-library libcurses
  +    (:unix "libncursesw.so")
  +  (t (:default "libcurses")))
  +
  +#-sb-unicode
   (define-foreign-library libcurses
       (:unix (:or "libcurses.so" "libncurses.so"))
     (t (:default "libcurses")))
  
positive.code: (defctype file-ptr :pointer)
  (defctype screen-ptr :pointer)
  (defctype window-ptr :pointer)
  
  
  ;; add_wch
  
negative.code: 
  
  ;; get_wch
  
  ; C Prototype: int get_wch(wint_t *wch);
  #+sb-unicode
  (defcfun (c-get-wch "get_wch") :int (target (:pointer :unsigned-int)))
  #+sb-unicode
  (export (defun get-wch ()
            "Returns the character in the main value and C-function's return code in second
  value. Replaces primary value (which would be garbage) with :ERROR if C-function returned ERR"
            (let ((ch (foreign-alloc :unsigned-int)))
              (let ((result (c-get-wch ch)))
                (cond ((eql result ERR)
                       (values :error ERR))
                      (t (values (mem-ref ch :unsigned-int) result)))))))
  
  ; C Prototype: int wget_wch(WINDOW *win, wint_t *wch);
  #+sb-unicode
  (defcfun (c-wget-wch "wget_wch") :int
    (win window-ptr)
    (target (:pointer :unsigned-int)))
  #+sb-unicode
  (export (defun wget-wch (win)
            "Returns the character in the main value and C-function's return code in second
  value. Replaces primary value (which would be garbage) with :ERROR if C-function returned ERR"
            (let ((ch (foreign-alloc :unsigned-int)))
              (let ((result (c-wget-wch win ch)))
                (cond ((eql result ERR)
                       (values :error ERR))
                      (t (values (mem-ref ch :unsigned-int) result)))))))
  
  ; C Prototype: int mvget_wch(int y, int x, wint_t *wch);
  #+sb-unicode
  (defcfun (c-mvget-wch "mvget_wch") :int
    (y :int)
    (x :int)
    (target (:pointer wchar)))
  #+sb-unicode
  (export (defun mvget-wch (y x)
            "Returns the character in the main value and C-function's return code in second
  value. Replaces primary value (which would be garbage) with :ERROR if C-function returned ERR"
            (let ((ch (foreign-alloc :unsigned-int)))
              (let ((result (c-mvget-wch y x ch)))
                (cond ((eql result ERR)
                       (values :error ERR))
                      (t (values (mem-ref ch :unsigned-int) result)))))))
  
  ; C Prototype: int mvwget_wch(WINDOW *win, int y, int x, wint_t *wch);
  #+sb-unicode
  (defcfun (c-mvwget-wch "mvwget_wch") :int
    (win window-ptr)
    (y :int)
    (x :int)
    (target (:pointer :unsigned-int)))
  #+sb-unicode
  (export (defun mvwget-wch (win y x)
            "Returns the character in the main value and C-function's return code in second
  value. Replaces primary value (which would be garbage) with :ERROR if C-function returned ERR"
            (let ((ch (foreign-alloc :unsigned-int)))
              (let ((result (c-mvwget-wch win y x ch)))
                (cond ((eql result ERR)
                       (values :error ERR))
                      (t (values (mem-ref ch :unsigned-int) result)))))))
  
  ; C Prototype: int unget_wch(const wchar_t wch);
  #+sb-unicode
  (define-exported-cfuns ("unget_wch")
      :int
    (wch wchar))
  
  
  ;; get_wstr
  