anchor.diff:      (:unsigned-long    :unsigned-long)
       (:float            :float)
       (:double           :double)
  -    (:pointer          :foreign-address)
  +    (:pointer          (ecase context
  +                         (:normal '(* :void))
  +                         (:funcall :foreign-address)))
       (:void             :void)))
   
   (defun %mem-ref (ptr type &optional (offset 0))
  
positive.code: 
  (defun %foreign-type-size (type-keyword)
    "Return the size in bytes of a foreign type."
    (ff:sizeof-fobject type-keyword))
  
  ;; FIXME: figure out which Allegro function has this info --luis
  (defun %foreign-type-alignment (type-keyword)
    "Return the alignment in bytes of a foreign type."
    ;; hmm, according to the docs this is always equal to the size
    ;; except for :double on Linux/x86 FreeBSD/x86 and RS/6000
    ;; nhe, I'm not sure about these features, couldn't find a list
    ;; --luis
    #+(or linux86 (and freebsd x86))
    (when (eq type-keyword :double)
      (return-from %foreign-type-alignment 4))
    (%foreign-type-size type-keyword))
  
  (defun foreign-funcall-type-and-args (args)
    "Returns a list of types, list of args and return type."
    (let ((return-type :void))
      (loop for (type arg) on args by #'cddr
         if arg collect (convert-foreign-type type) into types
            and collect arg into fargs
         else do (setf return-type (convert-foreign-type type))
         finally (return (values types fargs return-type)))))
  
  ;(SYSTEM::FF-FUNCALL
  ; (LOAD-TIME-VALUE (EXCL::DETERMINE-FOREIGN-ADDRESS
  ;                   '("foo" :LANGUAGE :C)  2 NIL))
  ; '(:INT (INTEGER * *)) ARG1
  ; '(:DOUBLE (DOUBLE-FLOAT * *)) ARG2
  ; '(:INT (INTEGER * *)))
  
  (defun convert-to-lisp-type (type)
    (ecase type
      ((:char :unsigned-char
        :short :unsigned-short
        :int :unsigned-int
        :long :unsigned-long) '(integer * *))
      (:float '(single-float * *))
      (:double '(double-float * *))
      (:foreign-address :foreign-address)
      (:void 'null)))
  
  (defun foreign-allegro-type (type)
    (if (eq type :foreign-address)
        nil
        type))
  
  (defmacro %foreign-funcall (name &rest args)
    (multiple-value-bind (types fargs rettype)
        (foreign-funcall-type-and-args args)
      `(system::ff-funcall
        (load-time-value (excl::determine-foreign-address
                          '(,name :language :c) 2 nil))
        ,@(mapcan #'(lambda (type arg)
                      `('(,(foreign-allegro-type type)
                          ,(convert-to-lisp-type type))
                         ,arg))
                  types fargs)
        '(,(foreign-allegro-type rettype)
          ,(convert-to-lisp-type rettype)))))
  
  ;;;# Loading Foreign Libraries
  
  (defun %load-foreign-library (name)
    "Load the foreign library NAME."
    #+macosx
    ;; At least ACL 6.2 sets this to '("dylib") only.. not good.
    (let ((excl::*load-foreign-types* '("dylib" "so" "bundle")))
      (load name))
    #-macosx
  
negative.code: 
  ;;;# Dereferencing
  
  (defun convert-foreign-type (type-keyword &optional (context :normal))
    "Convert a CFFI type keyword to an Allegro type."
    (ecase type-keyword
      (:char             :char)
  