[gnumeric] delete abandoned code



commit 4fff5efe39bf6a115e8874a30fe66aaff0d0eff6
Author: Andreas J. Guelzow <aguelzow pyrshep ca>
Date:   Tue Mar 23 17:44:56 2010 -0600

    delete abandoned code
    
    2010-03-23 Andreas J. Guelzow <aguelzow pyrshep ca>
    
    	* auto-correct.h (AutoCorrectFeature): move to auto-correct.c
    	(autocorrect_store_config): delete
    	(autocorrect_get_feature): delete
    	(autocorrect_set_feature): delete
    	(autocorrect_get_exceptions): delete
    	(autocorrect_set_exceptions): move to auto-correct.c
    	* auto-correct.c (AutoCorrectFeature): moved here from auto-correct.h
    	(autocorrect_store_config): delete
    	(autocorrect_get_feature): delete
    	(autocorrect_set_feature): delete
    	(autocorrect_get_exceptions): delete
    	(autocorrect_set_exceptions): make static

 src/tools/ChangeLog      |   15 ++++++++
 src/tools/auto-correct.c |   82 +++++++---------------------------------------
 src/tools/auto-correct.h |   14 --------
 3 files changed, 27 insertions(+), 84 deletions(-)
---
diff --git a/src/tools/ChangeLog b/src/tools/ChangeLog
index 97e24e0..9dd60db 100644
--- a/src/tools/ChangeLog
+++ b/src/tools/ChangeLog
@@ -1,3 +1,18 @@
+2010-03-23 Andreas J. Guelzow <aguelzow pyrshep ca>
+
+	* auto-correct.h (AutoCorrectFeature): move to auto-correct.c
+	(autocorrect_store_config): delete
+	(autocorrect_get_feature): delete
+	(autocorrect_set_feature): delete
+	(autocorrect_get_exceptions): delete
+	(autocorrect_set_exceptions): move to auto-correct.c
+	* auto-correct.c (AutoCorrectFeature): moved here from auto-correct.h
+	(autocorrect_store_config): delete
+	(autocorrect_get_feature): delete
+	(autocorrect_set_feature): delete
+	(autocorrect_get_exceptions): delete
+	(autocorrect_set_exceptions): make static
+
 2010-03-08  Morten Welinder <terra gnome org>
 
 	* Release 1.10.1
diff --git a/src/tools/auto-correct.c b/src/tools/auto-correct.c
index ea3c1de..3d55a02 100644
--- a/src/tools/auto-correct.c
+++ b/src/tools/auto-correct.c
@@ -37,6 +37,14 @@
 #include <gsf/gsf-impl-utils.h>
 #include <string.h>
 
+typedef enum {
+	AC_INIT_CAPS,
+	AC_FIRST_LETTER,
+	AC_NAMES_OF_DAYS,
+	AC_REPLACE,
+	AC_MAX_FEATURE
+} AutoCorrectFeature;
+
 static struct {
 	gboolean init_caps;
 	gboolean first_letter;
@@ -60,6 +68,9 @@ static struct {
 #define AUTOCORRECT_REPLACE		"replace"
 
 static void
+autocorrect_set_exceptions (AutoCorrectFeature feat, GSList const *list);
+
+static void
 autocorrect_clear (void)
 {
 	autocorrect_set_exceptions (AC_INIT_CAPS, NULL);
@@ -103,82 +114,13 @@ autocorrect_init (void)
 		(GDestroyNotify) autocorrect_clear);
 }
 
-void
-autocorrect_store_config (void)
-{
-	gnm_conf_set_autocorrect_init_caps (autocorrect.init_caps);
-	gnm_conf_set_autocorrect_init_caps_list (autocorrect.exceptions.init_caps);
-
-	gnm_conf_set_autocorrect_first_letter (autocorrect.first_letter);
-	gnm_conf_set_autocorrect_first_letter_list (autocorrect.exceptions.first_letter);
-
-	gnm_conf_set_autocorrect_names_of_days (autocorrect.names_of_days);
-
-	gnm_conf_set_autocorrect_replace (autocorrect.replace);
-}
-
-gboolean
-autocorrect_get_feature (AutoCorrectFeature feature)
-{
-	autocorrect_init ();
-
-	switch (feature) {
-	case AC_INIT_CAPS :	return autocorrect.init_caps;
-	case AC_FIRST_LETTER :	return autocorrect.first_letter;
-	case AC_NAMES_OF_DAYS :	return autocorrect.names_of_days;
-	case AC_REPLACE :	return autocorrect.replace;
-	default :
-		g_warning ("Invalid autocorrect feature %d.", feature);
-	};
-	return TRUE;
-}
-
-void
-autocorrect_set_feature (AutoCorrectFeature feature, gboolean val)
-{
-	switch (feature) {
-	case AC_INIT_CAPS :	autocorrect.init_caps = val;	break;
-	case AC_FIRST_LETTER :	autocorrect.first_letter = val;	break;
-	case AC_NAMES_OF_DAYS :	autocorrect.names_of_days = val;break;
-	case AC_REPLACE :	autocorrect.replace = val;	break;
-	default :
-		g_warning ("Invalid autocorrect feature %d.", feature);
-	};
-}
-
-/**
- * autocorrect_get_exceptions :
- * @feature :
- *
- * Return a list of UTF-8 encoded strings.  Both the list and the content need to be freed.
- **/
-GSList *
-autocorrect_get_exceptions (AutoCorrectFeature feature)
-{
-	GSList *ptr, *accum;
-
-	autocorrect_init ();
-
-	switch (feature) {
-	case AC_INIT_CAPS :    ptr = autocorrect.exceptions.init_caps; break;
-	case AC_FIRST_LETTER : ptr = autocorrect.exceptions.first_letter; break;
-	default :
-		g_warning ("Invalid autocorrect feature %d.", feature);
-		return NULL;
-	};
-
-	for (accum = NULL; ptr != NULL; ptr = ptr->next)
-		accum = g_slist_prepend (accum, g_strdup (ptr->data));
-	return g_slist_reverse (accum);
-}
-
 /**
  * autocorrect_set_exceptions :
  * @feature :
  * @list : A GSList of UTF-8 encoded strings.
  *
  **/
-void
+static void
 autocorrect_set_exceptions (AutoCorrectFeature feature, GSList const *list)
 {
 	GSList **res, *accum = NULL;
diff --git a/src/tools/auto-correct.h b/src/tools/auto-correct.h
index 5567e99..787bf77 100644
--- a/src/tools/auto-correct.h
+++ b/src/tools/auto-correct.h
@@ -3,20 +3,6 @@
 
 #include "gnumeric.h"
 
-typedef enum {
-	AC_INIT_CAPS,
-	AC_FIRST_LETTER,
-	AC_NAMES_OF_DAYS,
-	AC_REPLACE,
-	AC_MAX_FEATURE
-} AutoCorrectFeature;
-
-void	 autocorrect_store_config   (void);
-gboolean autocorrect_get_feature    (AutoCorrectFeature feat);
-void	 autocorrect_set_feature    (AutoCorrectFeature feat, gboolean val);
-GSList  *autocorrect_get_exceptions (AutoCorrectFeature feat);
-void	 autocorrect_set_exceptions (AutoCorrectFeature feat, GSList const *list);
-
 char    *autocorrect_tool	 (char const *input);
 
 #endif /* AUTO_CORRECT_H */



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