From 7eadb203617775d282af614bbbea6f2f9e42107b Mon Sep 17 00:00:00 2001
From: Liam Healy <liam@thinkpad.local>
Date: Sun, 11 Jan 2009 14:33:49 -0500
Subject: [PATCH] Rename #'validp from #'data-valid

For permutations and combinations, rename #'validp from #'data-valid
and return :success-failure rather than :boolean.  In fact, it returns
T or an error due to the design of the GSL functions; not clear if
this is wanted on the GSL designers' part.  Passes SBCL 64 test.
---
 data/combination.lisp     | 6 +++---
 data/permutation.lisp     | 8 ++++----
 documentation/status.text | 6 +++++-
 3 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/data/combination.lisp b/data/combination.lisp
index 17e5ee41..5156b3dc 100644
--- a/data/combination.lisp
+++ b/data/combination.lisp
@@ -1,6 +1,6 @@
 ;; Combinations
 ;; Liam Healy, Sun Mar 26 2006 - 11:51
-;; Time-stamp: <2008-12-31 21:10:06EST combination.lisp>
+;; Time-stamp: <2009-01-11 14:23:51EST combination.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -120,11 +120,11 @@
   "A pointer to the array of elements in the combination.")
 |#
 
-(defmfun data-valid ((combination combination))
+(defmfun validp ((combination combination))
   "gsl_combination_valid"
   (((mpointer combination) :pointer))
   :definition :method 
-  :c-return :boolean
+  :c-return :success-failure
   :documentation			; FDL
   "Check that the combination is valid.  The k
    elements should lie in the range 0 to n-1, with each
diff --git a/data/permutation.lisp b/data/permutation.lisp
index 002e05d4..5c39f75c 100644
--- a/data/permutation.lisp
+++ b/data/permutation.lisp
@@ -1,6 +1,6 @@
 ;; Permutations
 ;; Liam Healy, Sun Mar 26 2006 - 11:51
-;; Time-stamp: <2009-01-08 10:28:06EST permutation.lisp>
+;; Time-stamp: <2009-01-11 14:18:42EST permutation.lisp>
 ;; $Id$
 
 (in-package :gsl)
@@ -106,15 +106,15 @@
   "A pointer to the array of elements in the
    permutation p.")
 
-(defgeneric data-valid (object)
+(defgeneric validp (object)
   (:documentation			; FDL
    "Check that the object p is valid."))
 
-(defmfun data-valid ((permutation permutation))
+(defmfun validp ((permutation permutation))
   "gsl_permutation_valid"
   (((mpointer permutation) :pointer))
   :definition :method
-  :c-return :boolean
+  :c-return :success-failure
   :inputs (permutation)
   :documentation			; FDL
   "Check that the permutation p is valid.  The n
diff --git a/documentation/status.text b/documentation/status.text
index 49617c73..64b1dcca 100644
--- a/documentation/status.text
+++ b/documentation/status.text
@@ -34,10 +34,14 @@ Fail in CCL but not in SBCL:
 
 
 === GSL questions ===
+Sun Nov  9 2008:
 gsl_stats_float_wmean gives erroneous answers; other weighted?
 Query: What is _swap_rowcol supposed to do?  What is its purpose?
 gsl_blas_cdotu, gsl_blas_cdotc give nonsense results.
 Any explanation for any of the modified Givens rotations such as
 gsl_blas_drotmg? 
 gsl_blas_dger rank 1 update says lengths are bad?
-(from Sun Nov  9 2008)
+Sun Jan 11 2009:
+gsl_permutation_valid (presumably combination too) signals an error if
+the permutation is invalid, rather than just returning an error code.
+Is this intentional?
-- 
GitLab