[gnumeric] unused functions...



commit f4886ba0bc0cf3d118f1c847ac506e556d39b336
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Thu May 26 15:55:39 2011 -0600

    unused functions...
    
    2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* src/rangefunc.c (gnm_range_minabs): deleted
    	(gnm_range_correl_est): deleted
    	* src/rangefunc.h (gnm_range_minabs): deleted
    	(gnm_range_correl_est): deleted
    	* src/stf-parse.c (stf_parse_options_new): made static
    	* src/stf-parse.h (stf_parse_options_new): deleted
    	* src/workbook.c (workbook_local_functions): deleted
    	* src/workbook.h (workbook_local_functions): deleted

 ChangeLog       |   11 +++++++++++
 src/rangefunc.c |   43 -------------------------------------------
 src/rangefunc.h |    4 ----
 src/stf-parse.c |    2 +-
 src/stf-parse.h |    1 -
 src/workbook.c  |    6 ------
 src/workbook.h  |    1 -
 7 files changed, 12 insertions(+), 56 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 592d80b..d4902f7 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
 
+	* src/rangefunc.c (gnm_range_minabs): deleted
+	(gnm_range_correl_est): deleted
+	* src/rangefunc.h (gnm_range_minabs): deleted
+	(gnm_range_correl_est): deleted
+	* src/stf-parse.c (stf_parse_options_new): made static
+	* src/stf-parse.h (stf_parse_options_new): deleted
+	* src/workbook.c (workbook_local_functions): deleted
+	* src/workbook.h (workbook_local_functions): deleted
+
+2011-05-26  Andreas J. Guelzow <aguelzow pyrshep ca>
+
 	* src/parse-util.h (gnm_conventions_dup): delete again
 	* src/parse-util.c (gnm_conventions_dup): delete again
 	* src/workbook-control.c (wb_control_parse_and_jump): use
diff --git a/src/rangefunc.c b/src/rangefunc.c
index 19defde..d976265 100644
--- a/src/rangefunc.c
+++ b/src/rangefunc.c
@@ -37,23 +37,6 @@ gnm_range_hypot (gnm_float const *xs, int n, gnm_float *res)
 	}
 }
 
-/* Minimum absolute element.  */
-int
-gnm_range_minabs (gnm_float const *xs, int n, gnm_float *res)
-{
-	if (n > 0) {
-		gnm_float min = gnm_abs (xs[0]);
-		int i;
-
-		for (i = 1; i < n; i++)
-			if (gnm_abs (xs[i]) < min)
-				min = gnm_abs (xs[i]);
-		*res = min;
-		return 0;
-	} else
-		return 1;
-}
-
 /* Average absolute deviation from mean.  */
 int
 gnm_range_avedev (gnm_float const *xs, int n, gnm_float *res)
@@ -387,21 +370,6 @@ gnm_range_correl_pop (gnm_float const *xs, const gnm_float *ys, int n, gnm_float
 	return 0;
 }
 
-/* Maximum-likelyhood correlation coefficient.  */
-int
-gnm_range_correl_est (gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res)
-{
-	gnm_float sx, sy, vxy;
-
-	if (gnm_range_stddev_est (xs, n, &sx) || sx == 0 ||
-	    gnm_range_stddev_est (ys, n, &sy) || sy == 0 ||
-	    gnm_range_covar (xs, ys, n, &vxy))
-		return 1;
-
-	*res = vxy / (sx * sy);
-	return 0;
-}
-
 /* Population R-squared.  */
 int
 gnm_range_rsq_pop (gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res)
@@ -413,17 +381,6 @@ gnm_range_rsq_pop (gnm_float const *xs, const gnm_float *ys, int n, gnm_float *r
 	return 0;
 }
 
-/* Maximum-likelyhood R-squared.  */
-int
-gnm_range_rsq_est (gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res)
-{
-	if (gnm_range_correl_est (xs, ys, n, res))
-		return 1;
-
-	*res *= *res;
-	return 0;
-}
-
 /* Most-common element.  (The one whose first occurrence comes first in
    case of several equally common.  */
 int
diff --git a/src/rangefunc.h b/src/rangefunc.h
index 85efff5..dba7f32 100644
--- a/src/rangefunc.h
+++ b/src/rangefunc.h
@@ -44,8 +44,6 @@ int gnm_range_hypot		(gnm_float const *xs, int n, gnm_float *res);
 int gnm_range_harmonic_mean	(gnm_float const *xs, int n, gnm_float *res);
 int gnm_range_geometric_mean (gnm_float const *xs, int n, gnm_float *res);
 
-int gnm_range_minabs	(gnm_float const *xs, int n, gnm_float *res);
-
 int gnm_range_var_pop	(gnm_float const *xs, int n, gnm_float *res);
 int gnm_range_var_est	(gnm_float const *xs, int n, gnm_float *res);
 int gnm_range_stddev_pop	(gnm_float const *xs, int n, gnm_float *res);
@@ -57,9 +55,7 @@ int gnm_range_kurtosis_m3_est (gnm_float const *xs, int n, gnm_float *res);
 
 int gnm_range_covar		(gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res);
 int gnm_range_correl_pop	(gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res);
-int gnm_range_correl_est	(gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res);
 int gnm_range_rsq_pop	(gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res);
-int gnm_range_rsq_est	(gnm_float const *xs, const gnm_float *ys, int n, gnm_float *res);
 
 int gnm_range_mode	(gnm_float const *xs, int n, gnm_float *res);
 
diff --git a/src/stf-parse.c b/src/stf-parse.c
index d0c2b0f..fd7b2d5 100644
--- a/src/stf-parse.c
+++ b/src/stf-parse.c
@@ -125,7 +125,7 @@ compare_terminator (char const *s, StfParseOptions_t *parseoptions)
  * This will return a new StfParseOptions_t struct.
  * The struct should, after being used, freed with stf_parse_options_free.
  **/
-StfParseOptions_t *
+static StfParseOptions_t *
 stf_parse_options_new (void)
 {
 	StfParseOptions_t* parseoptions = g_new0 (StfParseOptions_t, 1);
diff --git a/src/stf-parse.h b/src/stf-parse.h
index 57e800b..c48cd9d 100644
--- a/src/stf-parse.h
+++ b/src/stf-parse.h
@@ -60,7 +60,6 @@ typedef struct {
 
 /* CREATION/DESTRUCTION of stf options struct */
 
-StfParseOptions_t  *stf_parse_options_new                             (void);
 void                stf_parse_options_free                            (StfParseOptions_t *parseoptions);
 
 StfParseOptions_t  *stf_parse_options_guess                           (char const *data);
diff --git a/src/workbook.c b/src/workbook.c
index 22f71bb..9ba5f9c 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -548,12 +548,6 @@ workbook_optimize_style (Workbook *wb)
 	});
 }
 
-GSList *
-workbook_local_functions (Workbook const *wb)
-{
-	return NULL;
-}
-
 void
 workbook_foreach_name (Workbook const *wb, gboolean globals_only,
 		       GHFunc func, gpointer data)
diff --git a/src/workbook.h b/src/workbook.h
index 1dfe40c..1128905 100644
--- a/src/workbook.h
+++ b/src/workbook.h
@@ -58,7 +58,6 @@ GnmValue   *workbook_foreach_cell_in_range (GnmEvalPos const  *pos,
 					    gpointer	    closure);
 GPtrArray  *workbook_cells               (Workbook *wb, gboolean comments,
 					  GnmSheetVisibility vis);
-GSList     *workbook_local_functions	 (Workbook const *wb);
 
 void workbook_foreach_name (Workbook const *wb, gboolean globals_only,
 			    GHFunc func, gpointer data);



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]