diff --git a/data/both.lisp b/data/both.lisp
index dbb88d50d38c3d6314810f7e69b202ce7a83ec84..23b7cfba7b7aa995c63159f2fd3ab3003e459bea 100644
--- a/data/both.lisp
+++ b/data/both.lisp
@@ -1,6 +1,6 @@
 ;; Functions for both vectors and matrices.
 ;; Liam Healy 2008-04-26 20:48:44EDT both.lisp
-;; Time-stamp: <2008-06-30 22:53:27EDT both.lisp>
+;; Time-stamp: <2008-07-12 13:48:13EDT both.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -162,7 +162,7 @@
 (defmfun m/ ((a matrix) (b matrix))
   ("gsl_" :category :type "_div_elements")
   (((mpointer a) :pointer) ((mpointer b) :pointer))
-  :definition :generic
+  :definition :methods
   :element-types :no-complex		; Question for GSL: why no complex?
   :inputs (a b)
   :outputs (a)
diff --git a/data/data.lisp b/data/data.lisp
index 39609a8c23afc4ff1a2a315d306354efdf40577a..9a9144ea6d77860f7abfc933e6032c3bd91c7a45 100644
--- a/data/data.lisp
+++ b/data/data.lisp
@@ -1,6 +1,6 @@
 ;; Data using ffa
 ;; Liam Healy 2008-04-06 21:23:41EDT data-ffa.lisp
-;; Time-stamp: <2008-07-07 21:26:18EDT data.lisp>
+;; Time-stamp: <2008-07-12 14:19:59EDT data.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -67,15 +67,6 @@
 	      :gsl)
       category))
 
-(defparameter *array-element-types*
-  (remove-duplicates (all-types *cstd-cl-type-mapping* t) :test 'equal)
-  ;;(all-types ffa::*cffi-and-lisp-types* t)
-  "All the array element types supported.")
-
-(defparameter *array-element-types-no-complex*
-  (remove-if (lambda (tp) (subtypep tp 'complex)) *array-element-types*)
-  "All the array element types supported except for complex types.")
-
 (defun data-defclass (category superclass)
   "Define all the subclasses based on the known element types."
   (cons 'progn
diff --git a/data/permutation.lisp b/data/permutation.lisp
index fd5735bbae60050522c370616cb7ebd0701a188b..bd0b45726bade55cb2344a240b4337bc23872bf1 100644
--- a/data/permutation.lisp
+++ b/data/permutation.lisp
@@ -1,6 +1,6 @@
 ;; Permutations
 ;; Liam Healy, Sun Mar 26 2006 - 11:51
-;; Time-stamp: <2008-07-05 14:48:43EDT permutation.lisp>
+;; Time-stamp: <2008-07-12 14:12:36EDT permutation.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -17,9 +17,10 @@
 
 ;;; The following three forms take the place of a data-defclass call
 
+(eval-when (:compile-toplevel :load-toplevel :execute)
 (defmethod letm-expansion
     (symbol (type (eql 'permutation)) args body)
-  (expand-data symbol type (first args) (second args) body))
+  (expand-data symbol type (first args) (second args) body)))
 
 (arglist-only permutation
 	      "A permutation."
@@ -88,10 +89,14 @@
   "A pointer to the array of elements in the
    permutation p.")
 
+(defgeneric data-valid (object)
+  (:documentation			; FDL
+   "Check that the object p is valid."))
+
 (defmfun data-valid ((permutation permutation))
   "gsl_permutation_valid"
   (((mpointer permutation) :pointer))
-  :definition :generic
+  :definition :method
   :c-return :boolean
   :documentation			; FDL
   "Check that the permutation p is valid.  The n
diff --git a/gsll.asd b/gsll.asd
index b3006b2402974bf3dfb554129550e3248d452163..07410e5bc762292043b87c6b2eb48e7048e7efa9 100644
--- a/gsll.asd
+++ b/gsll.asd
@@ -1,6 +1,6 @@
 ;; Definition of GSLL system 
 ;; Liam Healy
-;; Time-stamp: <2008-07-07 20:29:37EDT gsll.asd>
+;; Time-stamp: <2008-07-12 14:20:01EDT gsll.asd>
 ;; $Id$
 
 (asdf:defsystem "gsll"
@@ -19,7 +19,7 @@
 	     (:file "element-types" :depends-on (init))
 	     (:file "number-conversion" :depends-on (init))
 	     (:file "interface" :depends-on (init conditions element-types number-conversion))
-	     (:file "defmfun" :depends-on (init))
+	     (:file "defmfun" :depends-on (init element-types))
 	     (:file "callback" :depends-on (init))
 	     ;; http://www.cs.northwestern.edu/academics/courses/325/readings/lisp-unit.html
 	     (:file "lisp-unit")
@@ -36,14 +36,13 @@
 	    ((:file "foreign-friendly")
 	     (:file "data")
 	     (:file "vector" :depends-on (data))
-	     (:file "matrix" :depends-on (data))
+	     (:file "matrix" :depends-on (data vector))
 	     (:file "both" :depends-on (data vector matrix))
 	     (:file "permutation" :depends-on (data))
 	     (:file "combination"
 		    :depends-on (data matrix both permutation))	; preload defgeneric
 	     ))
    (:file "polynomial" :depends-on (init data))
-   #+no
    (:module special-functions
 	    :depends-on (init)
 	    :components
diff --git a/init/defmfun.lisp b/init/defmfun.lisp
index f63a76681e5d7eefb3b2201464bd737a39fa77f7..3c7f76b258a9df4f91bcd8e907c42598ec75e006 100644
--- a/init/defmfun.lisp
+++ b/init/defmfun.lisp
@@ -1,6 +1,6 @@
 ;; Macro for defining GSL functions.
 ;; Liam Healy 2008-04-16 20:49:50EDT defmfun.lisp
-;; Time-stamp: <2008-06-29 19:16:23EDT defmfun.lisp>
+;; Time-stamp: <2008-07-08 21:37:09EDT defmfun.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -79,7 +79,7 @@
       (setf indexed-functions (list))
       (wrap-index-export
        (cond
-	 ((member '&optional arglist)
+	 ((and (member '&optional arglist) (listp gsl-name))
 	  (expand-defmfun-optional name arglist gsl-name c-arguments key-args))
 	 ((eq definition :function)
 	  (setf defn 'cl:defun)
diff --git a/init/element-types.lisp b/init/element-types.lisp
index 88b08bf5be23f43a59715232aef75588c976391e..d6d5900d76ead9a293fd87bc7d3b72c761394916 100644
--- a/init/element-types.lisp
+++ b/init/element-types.lisp
@@ -1,6 +1,6 @@
 ;; Mapping of element type names
 ;; Liam Healy 2008-04-13 11:22:46EDT element-types.lisp
-;; Time-stamp: <2008-06-29 22:40:33EDT element-types.lisp>
+;; Time-stamp: <2008-07-12 14:21:59EDT element-types.lisp>
 ;; $Id$
 
 ;;; The different element type forms:
@@ -250,6 +250,19 @@
   :c-return :double)
 |#
 
+;;;;****************************************************************************
+;;;; Element types
+;;;;****************************************************************************
+
+(defparameter *array-element-types*
+  (remove-duplicates (all-types *cstd-cl-type-mapping* t) :test 'equal)
+  ;;(all-types ffa::*cffi-and-lisp-types* t)
+  "All the array element types supported.")
+
+(defparameter *array-element-types-no-complex*
+  (remove-if (lambda (tp) (subtypep tp 'complex)) *array-element-types*)
+  "All the array element types supported except for complex types.")
+
 ;;;;****************************************************************************
 ;;;; Types for CFFI (will eventually be in CFFI)
 ;;;;****************************************************************************
diff --git a/init/interface.lisp b/init/interface.lisp
index 510fd0b5104e297e718b40d15e709f780d691d3e..85e218d3a9fb9e026ad1e712b6baa51ecf94399a 100644
--- a/init/interface.lisp
+++ b/init/interface.lisp
@@ -1,6 +1,6 @@
 ;; Macros to interface GSL functions, including definitions necessary for defmfun.
 ;; Liam Healy 
-;; Time-stamp: <2008-05-12 21:00:47EDT interface.lisp>
+;; Time-stamp: <2008-07-10 21:39:43EDT interface.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -94,13 +94,17 @@
 ;;;; Argument check
 ;;;;****************************************************************************
 
+(defun cl-symbols (arglist)
+  "The symbols in the arglist."
+  (mapcar (lambda (s) (if (listp s) (first s) s)) arglist))
+
 ;;; (cl-argument-types '(a b) '((a :double) (b :int32)))
 (defun cl-argument-types (cl-arguments c-arguments-types)
   "Create CL argument and types from the C arguments."
   (loop for sd in c-arguments-types
 	for cl-type = (cffi-cl (st-type sd))
 	append
-	(when (and cl-type (member (st-symbol sd) cl-arguments))
+	(when (and cl-type (member (st-symbol sd) (cl-symbols cl-arguments)))
 	  (list (list (st-symbol sd) cl-type)))))
 
 (defun declaration-form (cl-argument-types)
diff --git a/polynomial.lisp b/polynomial.lisp
index b75563c68c7583eb7cd2d1114b72cfd04e093cf6..c04bc3e2ffed341ccb74bd75c8af649df5dfcb5f 100644
--- a/polynomial.lisp
+++ b/polynomial.lisp
@@ -1,6 +1,6 @@
 ;; Polynomials
 ;; Liam Healy, Tue Mar 21 2006 - 18:33
-;; Time-stamp: <2008-03-17 21:35:52EDT polynomial.lisp>
+;; Time-stamp: <2008-07-06 16:57:52EDT polynomial.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -14,7 +14,7 @@
 
 (defmfun polynomial-eval (coefficients x)
   "gsl_poly_eval"
-  (((gsl-array coefficients) :pointer) ((dim0 coefficients) size) (x :double))
+  (((c-pointer coefficients) :pointer) ((dim0 coefficients) sizet) (x :double))
   :documentation			; FDL
   "Evaluate the polyonomial with coefficients at the point x."
   :c-return :double)
@@ -25,17 +25,26 @@
 
 (defmfun divided-difference (dd xa ya)
   "gsl_poly_dd_init"
-  (((gsl-array dd) :pointer)
-   ((gsl-array xa) :pointer) ((gsl-array ya) :pointer)
-   ((dim0 xa) size))
-  :return (dd))
+  (((c-pointer dd) :pointer)
+   ((c-pointer xa) :pointer) ((c-pointer ya) :pointer)
+   ((dim0 xa) sizet))
+  :inputs (xa ya)
+  :outputs (dd)
+  :return (dd)
+  :documentation			; FDL
+  "Compute a divided-difference representation of the
+   interpolating polynomial for the points (xa, ya) stored in
+   the arrays of equal length.  On output the
+   divided-differences of (@var{xa},@var{ya}) are stored in the array
+   dd, of the same length.")
 
 (defmfun polynomial-eval-divided-difference (dd xa x)
   "gsl_poly_dd_eval"
-  (((gsl-array dd) :pointer)
-   ((gsl-array xa) :pointer)
-   ((dim0 xa) size)
+  (((c-pointer dd) :pointer)
+   ((c-pointer xa) :pointer)
+   ((dim0 xa) sizet)
    (x :double))
+  :inputs (dd xa)
   :c-return :double
   :documentation			; FDL
   "Evaluate the polynomial stored in divided-difference form
@@ -43,20 +52,21 @@
 
 (defmfun taylor-divided-difference (coefs xp dd xa workspace)
   "gsl_poly_dd_taylor"
-  (((gsl-array coefs) :pointer)
+  (((c-pointer coefs) :pointer)
    (xp :double)
-   ((gsl-array dd) :pointer)
-   ((gsl-array xa) :pointer)
-   ((dim0 xa) size)
-   ((gsl-array workspace) :pointer))
-  :invalidate (coefs)
+   ((c-pointer dd) :pointer)
+   ((c-pointer xa) :pointer)
+   ((dim0 xa) sizet)
+   ((c-pointer workspace) :pointer))
+  :inputs (coefs xa)
+  :outputs (coefs)
   :documentation			; FDL
   "Convert the divided-difference representation of a
   polynomial to a Taylor expansion.  The divided-difference representation
   is supplied in the arrays dd and xa of the same length.
   On output the Taylor coefficients of the polynomial expanded about the
   point xp are stored in the array coefs which has the same length
-  as xa and dd.  A workspace of length must be provided.")
+  as xa and dd.  A workspace of that length must be provided.")
 
 ;;;;****************************************************************************
 ;;;; Quadratic Equations
@@ -73,7 +83,8 @@
 
 (defmfun solve-quadratic-complex (a b c)
   "gsl_poly_complex_solve_quadratic"
-  ((a :double) (b :double) (c :double) (root1 gsl-complex) (root2 gsl-complex))
+  ((a :double) (b :double) (c :double)
+   (root1 complex-double-c) (root2 complex-double-c))
   :c-return :number-of-answers
   :documentation			; FDL
   "The complex roots of the quadratic equation a x^2 + b x + c = 0.
@@ -98,7 +109,7 @@
 (defmfun solve-cubic-complex (a b c)
   "gsl_poly_complex_solve_cubic"
   ((a :double) (b :double) (c :double)
-   (root1 gsl-complex) (root2 gsl-complex) (root3 gsl-complex))
+   (root1 complex-double-c) (root2 complex-double-c) (root3 complex-double-c))
   :c-return :number-of-answers
   :documentation			; FDL
   "Find the complex roots of the cubic equation, x^3 + a x^2 + b x + c = 0
@@ -113,7 +124,7 @@
 	 allocate-complex-workspace free-complex-workspace)
 
 (defmfun allocate-complex-workspace (n)
-  "gsl_poly_complex_workspace_alloc" ((n size))
+  "gsl_poly_complex_workspace_alloc" ((n sizet))
   :c-return :pointer
   :export nil
   :index (letm complex-workspace))
@@ -124,6 +135,7 @@
   :export nil
   :index (letm complex-workspace))
 
+(export 'polynomial-solve)
 (defun polynomial-solve (coefficients)
   ;; FDL
   "The roots of the general polynomial 
@@ -142,17 +154,17 @@
 
 (defmfun polynomial-solve-ws (coefficients workspace answer-pd)
   "gsl_poly_complex_solve"
-  (((gsl-array coefficients) :pointer) ((dim0 coefficients) size)
-   (workspace :pointer) ((gsl-array answer-pd) :pointer))
+  (((c-pointer coefficients) :pointer) ((dim0 coefficients) sizet)
+   (workspace :pointer) ((c-pointer answer-pd) :pointer))
   :return
   ((loop for i from 0 below (dim0 answer-pd) by 2
 	 collect (complex (maref answer-pd i)
 			  (maref answer-pd (1+ i)))))
+  :export nil
+  :index polynomial-solve
   :documentation			; FDL
   "Arguments are:
-   a GSL array of coefficients, a workspace, a gsl-array of doubles."
-  :export nil
-  :index polynomial-solve)
+   a GSL array of coefficients, a workspace, a gsl-array of doubles.")
 
 
 ;;;;****************************************************************************
diff --git a/special-functions/airy.lisp b/special-functions/airy.lisp
index 1ab96e582fd8ccc5a794efa1f3fb0240dc65bfcb..25fb67f2c6914e00033fad9681ab28d37600347f 100644
--- a/special-functions/airy.lisp
+++ b/special-functions/airy.lisp
@@ -1,6 +1,6 @@
 ;; Airy functions
 ;; Liam Healy, Fri Mar 17 2006 - 18:41
-;; Time-stamp: <2008-02-16 17:57:19EST airy.lisp>
+;; Time-stamp: <2008-07-10 21:20:39EDT airy.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -57,22 +57,22 @@
    exp(-(2/3) x^(3/2)), and is 1 for x<0.")
 
 (defmfun airy-zero-Ai (s)
-  "gsl_sf_airy_zero_Ai_e" ((s size) (ret sf-result))
+  "gsl_sf_airy_zero_Ai_e" ((s sizet) (ret sf-result))
   :documentation			; FDL
   "The location of the s-th zero of the Airy function Ai(x).")
 
 (defmfun airy-zero-Bi (s)
-  "gsl_sf_airy_zero_Bi_e" ((s size) (ret sf-result))
+  "gsl_sf_airy_zero_Bi_e" ((s sizet) (ret sf-result))
   :documentation			; FDL
   "The location of the s-th zero of the Airy function Bi(x).")
 
 (defmfun airy-zero-Ai-deriv (s)
-  "gsl_sf_airy_zero_Ai_deriv_e" ((s size) (ret sf-result))
+  "gsl_sf_airy_zero_Ai_deriv_e" ((s sizet) (ret sf-result))
   :documentation			; FDL
   "The location of the s-th zero of the Airy function derivative Ai'(x).")
 
 (defmfun airy-zero-Bi-deriv (s)
-  "gsl_sf_airy_zero_Bi_deriv_e" ((s size) (ret sf-result))
+  "gsl_sf_airy_zero_Bi_deriv_e" ((s sizet) (ret sf-result))
   :documentation			; FDL
   "The location of the s-th zero of the Airy function derivative Bi'(x).")
 
diff --git a/special-functions/bessel.lisp b/special-functions/bessel.lisp
index 3d287f11d1aa35548a7621a811ab169b85b2f928..bfcaaeb9b98d8d6dbfc72f750d23c73fa9444ee7 100644
--- a/special-functions/bessel.lisp
+++ b/special-functions/bessel.lisp
@@ -1,6 +1,6 @@
 ;; Bessel functions
 ;; Liam Healy, Fri Mar 17 2006 - 18:42
-;; Time-stamp: <2008-03-09 19:29:18EDT bessel.lisp>
+;; Time-stamp: <2008-07-08 21:43:01EDT bessel.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -28,8 +28,8 @@
 (defmfun cylindrical-bessel-Jn-array (x array &optional (nmin 0))
   "gsl_sf_bessel_Jn_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the regular cylindrical Bessel functions J_n(x)
    for n from nmin to nmin+length(array)-1 inclusive.
@@ -59,8 +59,8 @@
 (defmfun cylindrical-bessel-Yn-array (x array &optional (nmin 0))
   "gsl_sf_bessel_Yn_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the irregular cylindrical Bessel functions
    Y_n(x) for n from from nmin to
@@ -90,8 +90,8 @@
 (defmfun cylindrical-bessel-In-array (x array &optional (nmin 0))
   "gsl_sf_bessel_In_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the regular modified cylindrical Bessel functions
    I_n(x) for n from from nmin to nmin+length(array)-1 inclusive.
@@ -119,8 +119,8 @@
 (defmfun cylindrical-bessel-In-scaled-array (x array &optional (nmin 0))
   "gsl_sf_bessel_In_scaled_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   ;; Bug in original documentation?  doesn't say "modified"
   "The values of the scaled regular modified cylindrical Bessel
@@ -152,8 +152,8 @@
 (defmfun cylindrical-bessel-Kn-array (x array &optional (nmin 0))
   "gsl_sf_bessel_Kn_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the irregular modified cylindrical Bessel functions
    K_n(x) for n from from nmin to nmin+length(array)-1 inclusive.
@@ -181,8 +181,8 @@
 (defmfun cylindrical-bessel-Kn-scaled-array (x array &optional (nmin 0))
   "gsl_sf_bessel_Kn_scaled_array"
   ((nmin :int) ((+ nmin (dim0 array) -1) :int) (x :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the scaled irregular cylindrical
    Bessel functions \exp(x) K_n(x) for n from from nmin to
@@ -221,8 +221,8 @@
 
 (defmfun spherical-bessel-jl-array (x array)
   "gsl_sf_bessel_jl_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
-  :invalidate (array)
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the regular spherical Bessel
   functions j_l(x) for l from 0 to length(array)-1 and x >= 0.
@@ -231,8 +231,8 @@
 
 (defmfun spherical-bessel-jl-steed-array (x array)
   "gsl_sf_bessel_jl_steed_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
-  :invalidate (array)
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "Uses Steed's method to compute the values of the regular spherical
   Bessel functions j_l(x) for l from 0 to length(array)-1
@@ -270,8 +270,8 @@
 
 (defmfun spherical-bessel-yl-array (x array)
   "gsl_sf_bessel_yl_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
-  :invalidate (array)
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The irregular spherical Bessel functions y_l(x) for l
   from 0 to length(array)-1.  The values are computed using
@@ -308,8 +308,8 @@
 
 (defmfun spherical-bessel-il-scaled-array (x array)
   "gsl_sf_bessel_il_scaled_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
-  :invalidate (array)
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the scaled regular modified cylindrical Bessel
   functions \exp(-|x|) i_l(x) for l from 0 to length(array)-1
@@ -346,8 +346,8 @@
 
 (defmfun spherical-bessel-kl-scaled-array (x array)
   "gsl_sf_bessel_kl_scaled_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
-  :invalidate (array)
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "The values of the scaled irregular modified spherical Bessel
   functions \exp(x) k_l(x) for l from 0 to length(array)-1
@@ -367,8 +367,8 @@
 
 (defmfun spherical-Jnu-array (nu v)
   "gsl_sf_bessel_sequence_Jnu_e"
-  ((nu :double) :mode ((dim0 v) :int) ((gsl-array v) :pointer))
-  :invalidate (v)
+  ((nu :double) :mode ((dim0 v) :int) ((c-pointer v) :pointer))
+  :outputs (v)
   :documentation			; FDL
   "The regular cylindrical Bessel function of
   fractional order \nu, J_\nu(x), evaluated at a series of
@@ -458,6 +458,7 @@
 ;; in macroexpansion the form from within SLIME using SBCL (expands
 ;; fine from shell)
 
+#|
 (make-tests bessel
 	    (cylindrical-bessel-J0 4.0d0)
 	    (cylindrical-bessel-J1 4.0d0)
@@ -540,6 +541,7 @@
 	    (bessel-zero-J0 5)
 	    (bessel-zero-J1 5)
 	    (bessel-zero-Jnu 2.0d0 5))
+|#
 
 |#
 
diff --git a/special-functions/coulomb.lisp b/special-functions/coulomb.lisp
index 2e7cbbc41a7c9ce0c36675a75cbcef6ee2269cab..1ac1b570ddb2e7cff08513fddd78d687d16444e2 100644
--- a/special-functions/coulomb.lisp
+++ b/special-functions/coulomb.lisp
@@ -1,6 +1,6 @@
 ;; Coulumb functions
 ;; Liam Healy, Sat Mar 18 2006 - 23:23
-;; Time-stamp: <2008-03-09 19:29:18EDT coulomb.lisp>
+;; Time-stamp: <2008-07-08 21:46:07EDT coulomb.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -54,8 +54,8 @@
 (defmfun coulomb-wave-F-array (L-min eta x fc-array)
   "gsl_sf_coulomb_wave_F_array"
   ((L-min :double) ((1- (dim0 fc-array)) :int) (eta :double) (x :double)
-   ((gsl-array fc-array) :pointer) (F-exponent :double))
-  :invalidate (fc-array)
+   ((c-pointer fc-array) :pointer) (F-exponent :double))
+  :outputs (fc-array)
   :return (fc-array (dcref F-exponent))
   :documentation			; FDL
   "The Coulomb wave function F_L(\eta,x) for
@@ -65,7 +65,7 @@
 (defmfun coulomb-wave-FG-array (L-min eta x fc-array gc-array)
   "gsl_sf_coulomb_wave_FG_array"
   ((L-min :double) ((1- (dim0 fc-array)) :int) (eta :double) (x :double)
-   ((gsl-array fc-array) :pointer) ((gsl-array gc-array) :pointer)
+   ((c-pointer fc-array) :pointer) ((c-pointer gc-array) :pointer)
    (F-exponent :double) (G-exponent :double))
   :return (fc-array gc-array (dcref F-exponent) (dcref G-exponent))
   :documentation			; FDL
@@ -77,8 +77,8 @@
 (defmfun coulomb-wave-FGp-array (L-min eta x fc-array fcp-array gc-array gcp-array)
   "gsl_sf_coulomb_wave_FGp_array"
   ((L-min :double) ((1- (dim0 fc-array)) :int) (eta :double) (x :double)
-   ((gsl-array fc-array) :pointer) ((gsl-array fcp-array) :pointer)
-   ((gsl-array gc-array) :pointer) ((gsl-array gcp-array) :pointer)
+   ((c-pointer fc-array) :pointer) ((c-pointer fcp-array) :pointer)
+   ((c-pointer gc-array) :pointer) ((c-pointer gcp-array) :pointer)
    (F-exponent :double) (G-exponent :double))
   :return
   (fc-array fcp-array gc-array gcp-array
@@ -94,8 +94,8 @@
 (defmfun coulomb-wave-sphF-array (L-min eta x fc-array)
   "gsl_sf_coulomb_wave_sphF_array"
   ((L-min :double) ((1- (dim0 fc-array)) :int) (eta :double) (x :double)
-   ((gsl-array fc-array) :pointer) (F-exponent :double))
-  :invalidate (fc-array)
+   ((c-pointer fc-array) :pointer) (F-exponent :double))
+  :outputs (fc-array)
   :return (fc-array (dcref F-exponent))
   :documentation			; FDL
   "The Coulomb wave function divided by the argument
@@ -117,11 +117,11 @@
 (defmfun coulomb-CL-array (L-min eta cl)
   "gsl_sf_coulomb_CL_array"
   ((L-min :double) ((1- (dim0 cl)) :int) (eta :double)
-   ((gsl-array cl) :pointer))
+   ((c-pointer cl) :pointer))
   :documentation			; FDL
   "The Coulomb wave function normalization constant C_L(\eta)
    for L = Lmin ... Lmin + kmax, Lmin > -1."
-  :invalidate (cl))
+  :outputs (cl))
 
 ;;;;****************************************************************************
 ;;;; Examples and unit test
@@ -146,6 +146,7 @@
     (coulomb-CL-array 0.0d0 1.0d0 cl) (data cl)))
 |#
 
+#|
 (LISP-UNIT:DEFINE-TEST COULOMB
   (LISP-UNIT::ASSERT-NUMERICAL-EQUAL
    (LIST 0.1641699972477976d0 1.8226531089715347d-16)
@@ -206,4 +207,5 @@
    (MULTIPLE-VALUE-LIST
     (LETM ((CL (VECTOR-DOUBLE-FLOAT 3)))
       (COULOMB-CL-ARRAY 0.0d0 1.0d0 CL) (DATA CL)))))
+|#
 
diff --git a/special-functions/dilogarithm.lisp b/special-functions/dilogarithm.lisp
index 62ab7c14bf4ad084cad6632daa1d9c7fd9f3e645..9b31142aaf8bb45efaa9f6260bfeab62363ee92b 100644
--- a/special-functions/dilogarithm.lisp
+++ b/special-functions/dilogarithm.lisp
@@ -1,6 +1,6 @@
 ;; Dilogarithm
 ;; Liam Healy, Fri Mar 17 2006 - 18:44
-;; Time-stamp: <2008-02-16 20:19:55EST dilogarithm.lisp>
+;; Time-stamp: <2008-07-10 21:36:14EDT dilogarithm.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -12,12 +12,12 @@
 
 (defmfun dilogarithm ((x float))
   "gsl_sf_dilog_e" ((x :double) (ret sf-result))
-  :type :method)
+  :definition :method)
 
 (defmfun dilogarithm ((x complex))
   "gsl_sf_complex_dilog_e"
   (((abs x) :double) ((phase x) :double) (re sf-result) (im sf-result))
-  :type :method
+  :definition :method
   :return ((complex (val re) (val im)) (complex (err re) (err im))))
 
 #|
diff --git a/special-functions/gamma.lisp b/special-functions/gamma.lisp
index 8e9c49d9fedf0ddc8283159674fc73dac9b4ad96..53bd73931a72e19603e0aebc52e16baef035d137 100644
--- a/special-functions/gamma.lisp
+++ b/special-functions/gamma.lisp
@@ -1,6 +1,6 @@
 ;; Gamma functions
 ;; Liam Healy, Thu Apr 27 2006 - 22:06
-;; Time-stamp: <2008-03-27 21:29:36EDT gamma.lisp>
+;; Time-stamp: <2008-07-12 13:44:42EDT gamma.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -79,34 +79,34 @@
   "Compute the Taylor coefficient x^n / n! for x >= 0, n >= 0.")
 
 (defmfun factorial (n)
-  "gsl_sf_fact_e" ((n size) (ret sf-result))
+  "gsl_sf_fact_e" ((n sizet) (ret sf-result))
   :documentation			; FDL
   "The factorial n!, related to the Gamma function by n! = \Gamma(n+1).")
 
 (defmfun double-factorial (n)
-  "gsl_sf_doublefact_e" ((n size) (ret sf-result))
+  "gsl_sf_doublefact_e" ((n sizet) (ret sf-result))
   :documentation			; FDL
   "The double factorial n!! = n(n-2)(n-4) \dots.")
 
 (defmfun log-factorial (n)
-  "gsl_sf_lnfact_e" ((n size) (ret sf-result))
+  "gsl_sf_lnfact_e" ((n sizet) (ret sf-result))
   :documentation			; FDL
   "The logarithm of the factorial of n, log(n!).
   The algorithm is faster than computing
   ln(Gamma(n+1)) via #'log-gamma for n < 170, but defers for larger n.")
 
 (defmfun log-double-factorial (n)
-  "gsl_sf_lndoublefact_e" ((n size) (ret sf-result))
+  "gsl_sf_lndoublefact_e" ((n sizet) (ret sf-result))
   :documentation			; FDL
   "Compute the logarithm of the double factorial of n, log(n!!).")
 
 (defmfun choose (n m)
-  "gsl_sf_choose_e" ((n size) (m size) (ret sf-result))
+  "gsl_sf_choose_e" ((n sizet) (m sizet) (ret sf-result))
   :documentation			; FDL
   "The combinatorial factor (n choose m) = n!/(m!(n-m)!).")
 
 (defmfun log-choose (n m)
-  "gsl_sf_lnchoose_e" ((n size) (m size) (ret sf-result))
+  "gsl_sf_lnchoose_e" ((n sizet) (m sizet) (ret sf-result))
   :documentation			; FDL
   "The logarithm of (n choose m).  This is
   equivalent to the sum log(n!) - log(m!) - log((n-m)!).")
diff --git a/special-functions/gegenbauer.lisp b/special-functions/gegenbauer.lisp
index aeab5776ee13d90df7fffe74ed69b1fda3bcb5f3..eccf729999e1ca0ad5394254616282fc4e28c4fc 100644
--- a/special-functions/gegenbauer.lisp
+++ b/special-functions/gegenbauer.lisp
@@ -1,6 +1,6 @@
 ;; Gegenbauer polynomials
 ;; Liam Healy, Fri Apr 28 2006 - 20:40
-;; Time-stamp: <2008-03-09 19:29:18EDT gegenbauer.lisp>
+;; Time-stamp: <2008-07-08 21:53:11EDT gegenbauer.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -30,8 +30,8 @@
 (defmfun gegenbauer-array (lambda x result)
   "gsl_sf_gegenpoly_array"
   (((1- (dim0 result)) :int)
-   (lambda :double) (x :double) ((gsl-array result) :pointer))
-  :invalidate (result)
+   (lambda :double) (x :double) ((c-pointer result) :pointer))
+  :outputs (result)
   :documentation			; FDL
   "Compute an array of Gegenbauer polynomials C^{(\lambda)}_n(X)}
    for n = 0, 1, 2, ..., length(result)-1}, subject to \lambda > -1/2.")
diff --git a/special-functions/hypergeometric.lisp b/special-functions/hypergeometric.lisp
index 62032e07934ef2f8413141cd4e630a81b94fcc05..ed4a75b2dcdb02f6f54f7205aba228cdb718134e 100644
--- a/special-functions/hypergeometric.lisp
+++ b/special-functions/hypergeometric.lisp
@@ -1,6 +1,6 @@
 ;; Hypergeometric function
 ;; Liam Healy, Fri Apr 28 2006 - 23:00
-;; Time-stamp: <2008-02-17 18:30:53EST hypergeometric.lisp>
+;; Time-stamp: <2008-07-10 21:40:45EDT hypergeometric.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -16,7 +16,7 @@
 
 (defmfun hypergeometric-1F1 ((m integer) (n integer) x)
   "gsl_sf_hyperg_1F1_int_e" ((m :int) (n :int) (x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "The confluent hypergeometric function 1F1(m,n,x) = M(m,n,x)
@@ -24,7 +24,7 @@
 
 (defmfun hypergeometric-1F1 ((a float) (b float) x)
   "gsl_sf_hyperg_1F1_e" ((a :double) (b :double) (x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :documentation			; FDL
   "The confluent hypergeometric function
   1F1(a,b,x) = M(a,b,x) for general parameters a, b.")
@@ -35,14 +35,14 @@
 
 (defmfun hypergeometric-U ((m integer) (n integer) x)
   "gsl_sf_hyperg_U_int_e" ((m :int) (n :int) (x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "The confluent hypergeometric function U(m,n,x) for integer parameters m, n.")
 
 (defmfun hypergeometric-U ((a float) (b float) x)
   "gsl_sf_hyperg_U_e" ((a :double) (b :double) (x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :documentation "The confluent hypergeometric function U(a,b,x).")
 
 (defgeneric hypergeometric-U-e10 (m n x)
@@ -53,7 +53,7 @@
 (defmfun hypergeometric-U-e10 ((m integer) (n integer) x)
   "gsl_sf_hyperg_U_int_e10_e"
   ((m :int) (n :int) (x :double) (ret sf-result-e10))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "The confluent hypergeometric function
@@ -63,7 +63,7 @@
 (defmfun hypergeometric-U-e10 ((a float) (b float) x)
   "gsl_sf_hyperg_U_e10_e"
   ((a :double) (b :double) (x :double) (ret sf-result-e10))
-  :type :method
+  :definition :method
   :documentation			; FDL
   "The confluent hypergeometric function
   U(a,b,x) using that returns a result with extended range.")
diff --git a/special-functions/legendre.lisp b/special-functions/legendre.lisp
index c80d1ea2cdcbfb097466aed9cb9ea653c113cf6d..b4f1c58d50001322d456b5d2ade79a82bb6ba93e 100644
--- a/special-functions/legendre.lisp
+++ b/special-functions/legendre.lisp
@@ -1,6 +1,6 @@
 ;; Legendre functions
 ;; Liam Healy, Sat Apr 29 2006 - 19:16
-;; Time-stamp: <2008-03-27 21:30:02EDT legendre.lisp>
+;; Time-stamp: <2008-07-08 21:55:40EDT legendre.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -37,19 +37,19 @@
 
 (defmfun legendre-Pl-array (x array)
   "gsl_sf_legendre_Pl_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
   :documentation			; FDL
   "Compute an array of Legendre polynomials
   P_l(x) for l = 0, ..., length(array), |x| <= 1."
-  :invalidate (array))
+  :outputs (array))
 
 (defmfun legendre-Pl-deriv-array (x array)
   "gsl_sf_legendre_Pl_deriv_array"
-  (((1- (dim0 array)) :int) (x :double) ((gsl-array array) :pointer))
+  (((1- (dim0 array)) :int) (x :double) ((c-pointer array) :pointer))
   :documentation			; FDL
   "Compute an array of Legendre polynomials derivatives
   dP_l(x)/dx, for l = 0, ...,  length(array), |x| <= 1."
-  :invalidate (array))
+  :outputs (array))
 
 (defmfun legendre-Q0 (x)
   "gsl_sf_legendre_Q0_e" ((x :double) (ret sf-result))
@@ -94,22 +94,22 @@
 (defmfun legendre-Plm-array (m x array)
   "gsl_sf_legendre_Plm_array"
   (((+ (dim0 array) m -1) :int) (m :int) (x :double)
-   ((gsl-array array) :pointer))
+   ((c-pointer array) :pointer))
   :documentation			; FDL
   "An array of Legendre polynomials
     P_l^m(x), for m >= 0, 
     l = |m|, ..., |m|+length(array)-1} and |x| <= 1."
-  :invalidate (array))
+  :outputs (array))
 
 (defmfun legendre-Plm-deriv-array (m x values derivatives)
   "gsl_sf_legendre_Plm_deriv_array"
   (((+ (dim0 values) m -1) :int) (m :int) (x :double)
-   ((gsl-array values) :pointer) ((gsl-array derivatives) :pointer))
+   ((c-pointer values) :pointer) ((c-pointer derivatives) :pointer))
   :documentation			; FDL
   "An array of Legendre polynomials
     values and derivatives dP_l^m(x)/dx for m >= 0, 
     l = |m|, ..., length(values) and |x| <= 1."
-  :invalidate (values derivatives))
+  :outputs (values derivatives))
 
 (defmfun legendre-sphPlm (l m x)
   "gsl_sf_legendre_sphPlm_e" ((l :int) (m :int) (x :double) (ret sf-result))
@@ -123,22 +123,22 @@
 (defmfun legendre-sphPlm-array (m x array)
   "gsl_sf_legendre_sphPlm_array"
   (((+ (dim0 array) m -1) :int) (m :int) (x :double)
-   ((gsl-array array) :pointer))
+   ((c-pointer array) :pointer))
   :documentation			; FDL
   "An array of normalized associated Legendre functions
    \sqrt(2l+1)/(4\pi) \sqrt(l-m)!/(l+m)! P_l^m(x),
    for m >= 0, l = |m|, ..., length(array)}, |x| <= 1.0."
-  :invalidate (array))
+  :outputs (array))
 
 (defmfun legendre-sphPlm-deriv-array (m x values derivatives)
   "gsl_sf_legendre_sphPlm_deriv_array"
   (((+ (dim0 values) m -1) :int) (m :int) (x :double)
-   ((gsl-array values) :pointer) ((gsl-array derivatives) :pointer))
+   ((c-pointer values) :pointer) ((c-pointer derivatives) :pointer))
   :documentation			; FDL
   "An array of normalized associated Legendre functions
    values and derivatives for m >= 0,
    l = |m|, ..., length(array)}, |x| <= 1.0."
-  :invalidate (values derivatives))
+  :outputs (values derivatives))
 
 (defmfun legendre-array-size (lmax m)
   "gsl_sf_legendre_array_size" ((lmax :int) (m :int))
@@ -237,8 +237,8 @@
 (defmfun legendre-H3d-array (lambda eta array)
   "gsl_sf_legendre_H3d_array"
   (((1- (dim0 array)) :int) (lambda :double) (eta :double)
-   ((gsl-array array) :pointer))
-  :invalidate (array)
+   ((c-pointer array) :pointer))
+  :outputs (array)
   :documentation			; FDL
   "An array of radial eigenfunctions
    L^{H3d}_l(\lambda, \eta) for 0 <= l <= length(array).")
diff --git a/special-functions/logarithm.lisp b/special-functions/logarithm.lisp
index b776fb8210ba4f6a9208503e3cdd668cbc5c6dff..db38e78ab2c9f1645c915e0a301d9c088a07beb3 100644
--- a/special-functions/logarithm.lisp
+++ b/special-functions/logarithm.lisp
@@ -1,6 +1,6 @@
 ;; Logarithm
 ;; Liam Healy, Sun Apr 30 2006 - 22:08
-;; Time-stamp: <2008-02-16 22:34:59EST logarithm.lisp>
+;; Time-stamp: <2008-07-10 21:41:27EDT logarithm.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -12,14 +12,14 @@
 (defmfun gsl-log ((x float))
   "gsl_sf_log_e"
   ((x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :export t)
 
 (defmfun gsl-log ((x complex))
   "gsl_sf_complex_log_e"
   (((realpart x) :double) ((imagpart x) :double)
    (re-ret sf-result) (im-ret sf-result))
-  :type :method
+  :definition :method
   :return
   ((complex (val re-ret) (val im-ret)) (complex (err re-ret) (err im-ret)))
   :documentation			; FDL
diff --git a/special-functions/psi.lisp b/special-functions/psi.lisp
index 64daa5cbe569b666502fe5c60904606ec8b3d910..c33bc7b4717fa08a672e334913d7d75bedc4f0b2 100644
--- a/special-functions/psi.lisp
+++ b/special-functions/psi.lisp
@@ -1,6 +1,6 @@
 ;; Psi (digamma) functions
 ;; Liam Healy, Mon May  1 2006 - 22:11
-;; Time-stamp: <2008-02-16 22:43:28EST psi.lisp>
+;; Time-stamp: <2008-07-10 21:42:08EDT psi.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -15,14 +15,14 @@
 
 (defmfun psi  ((n integer))
   "gsl_sf_psi_int_e" ((n :int) (ret sf-result))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "Domain: n integer, n > 0.")
 
 (defmfun psi ((x float))
   "gsl_sf_psi_e" ((x :double) (ret sf-result))
-  :type :method 
+  :definition :method 
   :documentation			; FDL
   "Domain: x /= 0.0, -1.0, -2.0, ...")
 
@@ -42,13 +42,13 @@
 
 (defmfun psi-1 ((n integer))
   "gsl_sf_psi_1_int_e" ((n :int) (ret sf-result))
-  :type :method 
+  :definition :method 
   :documentation			; FDL
   "Domain: n integer, n > 0.")
 
 (defmfun psi-1 ((x float))
   "gsl_sf_psi_1_e" ((x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :documentation			; FDL
   "Domain: x /= 0.0, -1.0, -2.0, ...")
 
diff --git a/special-functions/trigonometry.lisp b/special-functions/trigonometry.lisp
index 3f906456e4531bc6a05a09576e530816f8002617..78024fed8064bb5dd416e8dce30d44f90923d9c7 100644
--- a/special-functions/trigonometry.lisp
+++ b/special-functions/trigonometry.lisp
@@ -1,6 +1,6 @@
 ;; Trigonometry
 ;; Liam Healy, Thu May  4 2006 - 22:58
-;; Time-stamp: <2008-02-17 18:30:19EST trigonometry.lisp>
+;; Time-stamp: <2008-07-12 13:41:22EDT trigonometry.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -17,27 +17,27 @@
 
 (defmfun gsl-sin ((x float))
   "gsl_sf_sin_e" ((x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :export t)
 
 (defmfun gsl-sin ((x complex))
   "gsl_sf_complex_sin_e"
   (((realpart x) :double) ((imagpart x) :double)
    (re-ret sf-result) (im-ret sf-result))
-  :type :method
+  :definition :method
   :return ((complex (val re-ret) (val im-ret))
 	   (complex (err re-ret) (err im-ret))))
 
 (defmfun gsl-cos ((x float))
   "gsl_sf_cos_e" ((x :double) (ret sf-result))
-  :type :method
+  :definition :method
   :export t)
 
 (defmfun gsl-cos ((x complex))
   "gsl_sf_complex_cos_e"
   (((realpart x) :double) ((imagpart x) :double)
    (re-ret sf-result) (im-ret sf-result))
-  :type :method 
+  :definition :method 
   :return ((complex (val re-ret) (val im-ret))
 	   (complex (err re-ret) (err im-ret))))
 
diff --git a/special-functions/zeta.lisp b/special-functions/zeta.lisp
index cc8fb1336ff9cf43eeb23a66eab32df9ce8f12ef..7857876ed1d665c77f7121dfda75736a4e1d230b 100644
--- a/special-functions/zeta.lisp
+++ b/special-functions/zeta.lisp
@@ -1,6 +1,6 @@
 ;; Zeta functions
 ;; Liam Healy, Sat May 13 2006 - 23:27
-;; Time-stamp: <2008-02-16 23:04:22EST zeta.lisp>
+;; Time-stamp: <2008-07-12 13:40:50EDT zeta.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -19,14 +19,14 @@
 
 (defmfun zeta ((n integer))
   "gsl_sf_zeta_int_e" ((n :int) (ret sf-result))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "The Riemann zeta function zeta(n) for integer n, n \ne 1.")
 
 (defmfun zeta ((s float))
   "gsl_sf_zeta_e" ((s :double) (ret sf-result))
-  :type :method
+  :definition :method
   :documentation			; FDL
   "The Riemann zeta function zeta(s) for arbitrary s, s \ne 1.")
 
@@ -39,14 +39,14 @@
 
 (defmfun zeta-1 ((n integer))
   "gsl_sf_zetam1_int_e" ((n :int) (ret sf-result))
-  :type :method
+  :definition :method
   :export t
   :documentation			; FDL
   "The Riemann zeta function zeta(n) for integer n, n \ne 1.")
 
 (defmfun zeta-1 ((s float))
   "gsl_sf_zetam1_e" ((s :double) (ret sf-result))
-  :type :method
+  :definition :method
   :documentation			; FDL
   "The Riemann zeta function zeta(s) for arbitrary s, s \ne 1.")