Remove unused function colornametovalue(), and unused color related
structure and macro from libgeda s_basic.c.
---
 libgeda/include/prototype.h |    1 -
 libgeda/src/s_basic.c       |   60 -------------------------------------------
 2 files changed, 0 insertions(+), 61 deletions(-)

diff --git a/libgeda/include/prototype.h b/libgeda/include/prototype.h
index 82e69d8..77700df 100644
--- a/libgeda/include/prototype.h
+++ b/libgeda/include/prototype.h
@@ -344,7 +344,6 @@ void s_delete_object_glist(TOPLEVEL *toplevel, GList *list);
 OBJECT *s_remove(TOPLEVEL *toplevel, OBJECT *object);
 void string_toupper(char *in, char *out);
 void string_tolower(char *in, char *out);
-int colornametovalue(char *string);
 char *remove_nl(char *string);
 char *remove_last_nl(char *string);
 gchar *s_expand_env_variables (const gchar *string);
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index a733e94..1d93135 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -40,30 +40,6 @@
 /*! this is modified here and in o_list.c */
 int global_sid=0;
 
-#define NUMCOLORS 9  /*!< */
-
-/*! \brief */
-struct st_old_colors {
-        char *name;
-        int value;
-};
-
-/*! \brief
- * Colors must be in alphabetical order
- * be sure that you update above define
- */
-struct st_old_colors old_colors[] = {
-       { "black", 0 },
-       { "blue", 4 },
-       { "cyan", 6 },
-       { "green", 3 },
-       { "grey", 7 }, 
-       { "grey90", 8 },
-       { "red", 2 },
-       { "white", 1 },
-       { "yellow", 5 },
-};
-
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
@@ -571,42 +547,6 @@ void string_tolower(char *in, char *out)
  *  \par Function Description
  *
  */
-int colornametovalue(char *string)
-{
-       
-  int lower = 0; 
-  int upper = NUMCOLORS - 1;
-  int middle;
-  int val;
-  struct st_old_colors *ptr=NULL;
-
-  if (!string) {
-    return(-1);
-  }
-
-  string_tolower(string, string);
-  while (lower <= upper) {
-    middle = (lower + upper) / 2;
-
-    ptr = &old_colors[middle];
-    val = strcmp (ptr->name, string);
-
-    if (val < 0) {
-      lower = middle + 1;
-    } else if (val == 0) {
-      return(ptr->value);
-    } else {
-      upper = middle - 1;
-    }
-  }                
-  return(-1);
-}
-
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
 /* used by o_text_read */
 char *remove_nl(char *string)
 {
-- 
1.5.6




_______________________________________________
geda-dev mailing list
[email protected]
http://www.seul.org/cgi-bin/mailman/listinfo/geda-dev

Reply via email to