From 2bf37cb37ece289ff5a9406e10df8c09fe248bc6 Mon Sep 17 00:00:00 2001
From: liam <liam@a3d8a0fb-c1db-0310-ace7-a616afeb9e30>
Date: Wed, 22 Mar 2006 22:43:18 +0000
Subject: [PATCH] Improve docstring, rename keyword argument to be more
 sensible.

git-svn-id: svn+ssh://pop/opt/space/mathematics/gsl/trunk@2993 a3d8a0fb-c1db-0310-ace7-a616afeb9e30
---
 interface.lisp  | 18 ++++++++++++------
 polynomial.lisp | 10 +++++-----
 2 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/interface.lisp b/interface.lisp
index feb5b998..acec769e 100644
--- a/interface.lisp
+++ b/interface.lisp
@@ -3,7 +3,7 @@
 ; description: Macros to interface GSL functions.
 ; date:        Mon Mar  6 2006 - 22:35                   
 ; author:      Liam M. Healy
-; modified:    Wed Mar 22 2006 - 10:08
+; modified:    Wed Mar 22 2006 - 12:20
 ;********************************************************
 
 (in-package :gsl)
@@ -112,9 +112,15 @@ and a scaling exponent e10, such that the value is val*10^e10."
 ;;; New name?
 (defmacro defun-sf
     (cl-name arguments gsl-name
-	     &key documentation return mode (return-code :check-status))
-  "Define a mathematical special function from GSL using the _e form
-   GSL function definition.  If cl-name is :lambda, make a lambda."
+	     &key documentation return mode (c-return-value :error-code))
+  "Define a CL function that provides an interface to a GSL function.
+   If cl-name is :lambda, make a lambda.  Arguments:
+     arguments:       a list of input arguments (symbol type) to the GSL function
+     gsl-name:        the C function name, as a string
+     documentation:   a string
+     return:          a list of return types
+     mode:            T or NIL, depending on whether gsl_mode is an argument
+     c-return-value:  The C function returns an :error-code or :number-of-answers."
   (let ((args (mapcar #'first arguments))
 	(return-symb-type
 	 (mapcar (lambda (typ)
@@ -144,10 +150,10 @@ and a scaling exponent e10, such that the value is val*10^e10."
 		,@(when mode '(sf-mode mode))
 		,@(mapcan (lambda (r) `(:pointer ,(first r))) return-symb-type)
 		:int)))
-	  ,@(if (eq return-code :check-status)
+	  ,@(if (eq c-return-value :error-code)
 		`((check-gsl-status status `(,',cl-name ,,@args))))
 	  (values
-	   ,@(if (eq return-code :number-of-answers)
+	   ,@(if (eq c-return-value :number-of-answers)
 		 (mapcan
 		  (lambda (decl seq)
 		    `((when (> status ,seq) ,@(pick-result decl))))
diff --git a/polynomial.lisp b/polynomial.lisp
index e97c6ffb..b96de5a4 100644
--- a/polynomial.lisp
+++ b/polynomial.lisp
@@ -3,7 +3,7 @@
 ; description: Polynomials                               
 ; date:        Tue Mar 21 2006 - 18:33                   
 ; author:      Liam M. Healy                             
-; modified:    Wed Mar 22 2006 - 10:23
+; modified:    Wed Mar 22 2006 - 12:10
 ;********************************************************
 ;;; $Id: $
 
@@ -118,7 +118,7 @@
    Two values are always returned; if the roots are not real, these
    values are NIL."
   :return (:double :double)
-  :return-code :number-of-answers)
+  :c-return-value :number-of-answers)
 
 (defun-sf solve-quadratic-complex ((a :double) (b :double) (c :double))
   "gsl_poly_complex_solve_quadratic"
@@ -127,7 +127,7 @@
    Two values are always returned; if a root does not exist, the
    value returned will be NIL."
   :return (gsl-complex gsl-complex)
-  :return-code :number-of-answers) 
+  :c-return-value :number-of-answers) 
 
 ;;;;****************************************************************************
 ;;;; Cubic Equations
@@ -151,7 +151,7 @@
    in ascending order.  Three values are always returned;
    if a root is not real, the value returned for it will be NIL."
   :return (:double :double :double)
-  :return-code :number-of-answers)
+  :c-return-value :number-of-answers)
 
 (defun-sf solve-cubic-complex ((a :double) (b :double) (c :double))
   "gsl_poly_complex_solve_cubic"
@@ -160,4 +160,4 @@
    with a leading coefficient of unity.  Three values are always returned;
    if a root does not exist, the value returned for it will be NIL."
   :return (gsl-complex gsl-complex gsl-complex)
-  :return-code :number-of-answers)
+  :c-return-value :number-of-answers)
-- 
GitLab