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

gEDA-cvs: branch: master updated (1.1.2.20070818-84-g6f0ab03)



The branch, master has been updated
       via  6f0ab03ed06d5cf0265a4f5bee516866efc16828 (commit)
       via  1ec03e992136e524a24b6bd593a4e0de3ce0158f (commit)
       via  88cdb643a1304cd283a2f2ad95993f237e81248b (commit)
      from  de2f3d240562202f305a0ba1a8d58f2ba78a3876 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.


=========
 Summary
=========

 gschem/include/prototype.h   |    1 +
 gschem/src/o_basic.c         |  150 ++++++-------
 libgeda/src/g_smob.c         |   37 ---
 libgeda/src/m_basic.c        |  116 ----------
 libgeda/src/o_arc_basic.c    |   20 --
 libgeda/src/o_bus_basic.c    |   13 -
 libgeda/src/o_circle_basic.c |   10 -
 libgeda/src/o_net_basic.c    |   13 -
 libgeda/src/o_pin_basic.c    |   15 --
 libgeda/src/o_text_basic.c   |  507 ------------------------------------------
 libgeda/src/s_basic.c        |   28 ---
 libgeda/src/s_tile.c         |   30 ---
 12 files changed, 66 insertions(+), 874 deletions(-)


=================
 Commit Messages
=================

commit 6f0ab03ed06d5cf0265a4f5bee516866efc16828
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 04:14:38 2007 +0100

    Tidy the o_drawbounding() function to make it more readable.

:100644 100644 87df9ac... 14b8fac... M	gschem/src/o_basic.c

commit 1ec03e992136e524a24b6bd593a4e0de3ce0158f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 04:14:25 2007 +0100

    Add function o_erase_list() to gschem, to undraw a GList of OBJECTS.

:100644 100644 27557a7... c9d6d61... M	gschem/include/prototype.h
:100644 100644 59a777c... 87df9ac... M	gschem/src/o_basic.c

commit 88cdb643a1304cd283a2f2ad95993f237e81248b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 03:53:38 2007 +0100

    Remove unused code from libgeda

:100644 100644 cbda446... ed57fab... M	libgeda/src/g_smob.c
:100644 100644 b9a3ff6... 2a2b466... M	libgeda/src/m_basic.c
:100644 100644 feba9be... 83304d0... M	libgeda/src/o_arc_basic.c
:100644 100644 d85d045... 7297b5d... M	libgeda/src/o_bus_basic.c
:100644 100644 9249361... a6de864... M	libgeda/src/o_circle_basic.c
:100644 100644 572e711... 735d95f... M	libgeda/src/o_net_basic.c
:100644 100644 0029c10... 79df6e9... M	libgeda/src/o_pin_basic.c
:100644 100644 9acf339... 5b8c679... M	libgeda/src/o_text_basic.c
:100644 100644 7668555... 6ebe35a... M	libgeda/src/s_basic.c
:100644 100644 3ad2a7f... 6fa373f... M	libgeda/src/s_tile.c

=========
 Changes
=========

commit 6f0ab03ed06d5cf0265a4f5bee516866efc16828
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 04:14:38 2007 +0100

    Tidy the o_drawbounding() function to make it more readable.

diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 87df9ac..14b8fac 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -307,15 +307,15 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
     return;
   }
 
+  diff_x = w_current->last_x - w_current->start_x;
+  diff_y = w_current->last_y - w_current->start_y;
+
   if ((w_current->last_drawb_mode == OUTLINE) &&
       (w_current->actionfeedback_mode == BOUNDINGBOX)) {
 #if DEBUG
     printf("going to bounding\n");
 #endif
 
-    diff_x = w_current->last_x - w_current->start_x;
-    diff_y = w_current->last_y - w_current->start_y;
-
     gdk_gc_set_foreground(w_current->bounding_xor_gc,
                           x_get_color(toplevel->background_color));
     o_complex_translate_display_object_glist(w_current, diff_x, diff_y, o_glist);
@@ -323,23 +323,16 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
     gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
 
     world_get_object_glist_bounds(toplevel, o_glist,
-                                  &w_rleft  ,
-                                  &w_rtop   ,
-                                  &w_rright ,
-                                  &w_rbottom);
+                                  &w_rleft, &w_rtop,
+                                  &w_rright, &w_rbottom);
 
-    WORLDtoSCREEN( toplevel, w_rleft, w_rtop,
-                   &rleft, &rtop );
-    WORLDtoSCREEN( toplevel, w_rright, w_rbottom,
-                 &rright, &rbottom );
+    WORLDtoSCREEN( toplevel, w_rleft, w_rtop, &rleft, &rtop );
+    WORLDtoSCREEN( toplevel, w_rright, w_rbottom, &rright, &rbottom );
 
     gdk_draw_rectangle(w_current->window,
                        w_current->bounding_xor_gc, FALSE,
-                       rleft + diff_x,
-                       rtop  + diff_y,
-                       rright  - rleft,
-                       rbottom - rtop);
-
+                       rleft + diff_x, rtop + diff_y,
+                       rright - rleft, rbottom - rtop);
   }
 
   if ((w_current->last_drawb_mode == BOUNDINGBOX) &&
@@ -349,26 +342,18 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
 #endif
 
     world_get_object_glist_bounds(toplevel, o_glist,
-                                  &w_rleft  ,
-                                  &w_rtop   ,
-                                  &w_rright ,
-                                  &w_rbottom);
+                                  &w_rleft, &w_rtop,
+                                  &w_rright, &w_rbottom);
 
-    diff_x = w_current->last_x - w_current->start_x;
-    diff_y = w_current->last_y - w_current->start_y;
     gdk_gc_set_foreground(w_current->gc,
                           x_get_color(toplevel->background_color));
 
-    WORLDtoSCREEN( toplevel, w_rleft, w_rtop,
-                   &rleft, &rtop );
-    WORLDtoSCREEN( toplevel, w_rright, w_rbottom,
-                   &rright, &rbottom );
+    WORLDtoSCREEN( toplevel, w_rleft, w_rtop, &rleft, &rtop );
+    WORLDtoSCREEN( toplevel, w_rright, w_rbottom, &rright, &rbottom );
     gdk_draw_rectangle(w_current->window,
                        w_current->gc, FALSE,
-                       rleft   + diff_x,
-                       rtop    + diff_y,
-                       rright  - rleft ,
-                       rbottom - rtop  );
+                       rleft + diff_x, rtop + diff_y,
+                       rright - rleft, rbottom - rtop);
 
     o_complex_translate_display_object_glist(w_current,
                                              diff_x, diff_y, o_glist);
@@ -387,8 +372,6 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
   /* going to constrained from free */
   if ( (w_current->CONTROLKEY) &&
        (w_current->drawbounding_action_mode == FREE)) {
-    diff_x = w_current->last_x - w_current->start_x;
-    diff_y = w_current->last_y - w_current->start_y;
     w_current->drawbounding_action_mode = CONSTRAINED;
 
     if (w_current->actionfeedback_mode == OUTLINE) {
@@ -397,23 +380,17 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
 
     } else {
       world_get_object_glist_bounds(toplevel, o_glist,
-                                    &w_rleft  ,
-                                    &w_rtop   ,
-                                    &w_rright ,
-                                    &w_rbottom);
-
-      gdk_gc_set_foreground(w_current->bounding_xor_gc,
-                            color);
-      WORLDtoSCREEN( toplevel, w_rleft, w_rtop,
-                     &rleft, &rtop );
-      WORLDtoSCREEN( toplevel, w_rright, w_rbottom,
-                     &rright, &rbottom );
+                                    &w_rleft, &w_rtop,
+                                    &w_rright, &w_rbottom);
+
+      gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
+
+      WORLDtoSCREEN( toplevel, w_rleft, w_rtop, &rleft, &rtop );
+      WORLDtoSCREEN( toplevel, w_rright, w_rbottom, &rright, &rbottom );
       gdk_draw_rectangle(w_current->window,
                          w_current->bounding_xor_gc, FALSE,
-                         rleft + diff_x,
-                         rtop  + diff_y,
-                         rright  - rleft,
-                         rbottom - rtop);
+                         rleft + diff_x, rtop + diff_y,
+                         rright - rleft, rbottom - rtop);
     }
 
     test_x = GET_BOX_WIDTH (w_current);
@@ -433,24 +410,18 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
 
     } else {
       world_get_object_glist_bounds(toplevel, o_glist,
-                                    &w_rleft  ,
-                                    &w_rtop   ,
-                                    &w_rright ,
-                                    &w_rbottom);
-
-      gdk_gc_set_foreground(w_current->bounding_xor_gc,
-                            color);
-      WORLDtoSCREEN( toplevel, w_rleft, w_rtop,
-                     &rleft, &rtop );
-      WORLDtoSCREEN( toplevel, w_rright, w_rbottom,
-                     &rright, &rbottom );
+                                    &w_rleft, &w_rtop,
+                                    &w_rright, &w_rbottom);
+
+      gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
+
+      WORLDtoSCREEN( toplevel, w_rleft, w_rtop, &rleft, &rtop );
+      WORLDtoSCREEN( toplevel, w_rright, w_rbottom, &rright, &rbottom );
       gdk_draw_rectangle(w_current->window,
                          w_current->bounding_xor_gc,
                          FALSE,
-                         rleft   + diff_x,
-                         rtop    + diff_y,
-                         rright  - rleft,
-                         rbottom - rtop);
+                         rleft + diff_x, rtop + diff_y,
+                         rright - rleft, rbottom - rtop);
     }
 
     if (w_current->netconn_rubberband) {
@@ -463,8 +434,6 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
   /* going to free from constrained */
   if ((!w_current->CONTROLKEY) &&
       (w_current->drawbounding_action_mode == CONSTRAINED)) {
-        diff_x = w_current->last_x - w_current->start_x;
-        diff_y = w_current->last_y - w_current->start_y;
         w_current->drawbounding_action_mode = FREE;
         if (w_current->actionfeedback_mode == OUTLINE) {
           /* do it twice to get rid of old outline */
@@ -477,10 +446,8 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
           /*! \todo why are we doing this here...?
            * probably a reason */
           world_get_object_glist_bounds(toplevel, o_glist,
-                                        &w_rleft  ,
-                                        &w_rtop   ,
-                                        &w_rright ,
-                                        &w_rbottom);
+                                        &w_rleft, &w_rtop,
+                                        &w_rright, &w_rbottom);
 
         }
         if (w_current->netconn_rubberband) {
@@ -497,40 +464,31 @@ void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,
     } else {
       w_current->last_x = w_current->start_x;
     }
+    diff_x = w_current->last_x - w_current->start_x;
+    diff_y = w_current->last_y - w_current->start_y;
   }
 
   if (w_current->actionfeedback_mode == BOUNDINGBOX) {
 
     if (firsttime == TRUE) {
       world_get_object_glist_bounds(toplevel, o_glist,
-                                    &w_rleft  ,
-                                    &w_rtop   ,
-                                    &w_rright ,
-                                    &w_rbottom);
+                                    &w_rleft, &w_rtop,
+                                    &w_rright, &w_rbottom);
 
       /*printf("once\n");*/
     
     }
-    diff_x = w_current->last_x - w_current->start_x;
-    diff_y = w_current->last_y - w_current->start_y;
     gdk_gc_set_foreground(w_current->bounding_xor_gc, color);
-    WORLDtoSCREEN( toplevel, w_rleft, w_rtop,
-                   &rleft, &rtop );
-    WORLDtoSCREEN( toplevel, w_rright, w_rbottom,
-                   &rright, &rbottom );
+    WORLDtoSCREEN( toplevel, w_rleft, w_rtop, &rleft, &rtop );
+    WORLDtoSCREEN( toplevel, w_rright, w_rbottom, &rright, &rbottom );
     gdk_draw_rectangle(w_current->window,
                        w_current->bounding_xor_gc, FALSE,
-                       rleft   + diff_x,
-                       rtop    + diff_y,
-                       rright  - rleft,
-                       rbottom - rtop);
+                       rleft + diff_x, rtop + diff_y,
+                       rright - rleft, rbottom - rtop);
 
     return;
   }
 
-  diff_x = w_current->last_x - w_current->start_x;
-  diff_y = w_current->last_y - w_current->start_y;
-
   /*! \todo have I mentioned how temp this is? Make this general
    * so that all lists can be moved ...
    */

commit 1ec03e992136e524a24b6bd593a4e0de3ce0158f
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 04:14:25 2007 +0100

    Add function o_erase_list() to gschem, to undraw a GList of OBJECTS.

diff --git a/gschem/include/prototype.h b/gschem/include/prototype.h
index 27557a7..c9d6d61 100644
--- a/gschem/include/prototype.h
+++ b/gschem/include/prototype.h
@@ -477,6 +477,7 @@ void o_draw_list(GSCHEM_TOPLEVEL *w_current, GList *list);
 void o_draw_selected(GSCHEM_TOPLEVEL *w_current);
 void o_erase_selected(GSCHEM_TOPLEVEL *w_current);
 void o_erase_single(GSCHEM_TOPLEVEL *w_current, OBJECT *object);
+void o_erase_list(GSCHEM_TOPLEVEL *w_current, GList *list);
 void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist, GdkColor *color, int firsttime);
 int o_erase_rubber(GSCHEM_TOPLEVEL *w_current);
 int o_redraw_cleanstates(GSCHEM_TOPLEVEL *w_current);
diff --git a/gschem/src/o_basic.c b/gschem/src/o_basic.c
index 59a777c..87df9ac 100644
--- a/gschem/src/o_basic.c
+++ b/gschem/src/o_basic.c
@@ -267,6 +267,28 @@ void o_erase_single(GSCHEM_TOPLEVEL *w_current, OBJECT *object)
  *  \par Function Description
  *
  */
+void o_erase_list(GSCHEM_TOPLEVEL *w_current, GList* list)
+{
+  OBJECT *o_current;
+  GList *iter;
+
+  if (w_current->inside_redraw) {
+    return;
+  }
+
+  iter = list;
+  while (iter != NULL) {
+    o_current = iter->data;
+    o_erase_single(w_current, o_current);
+    iter = g_list_next(iter);
+  }
+}
+
+/*! \todo Finish function documentation!!!
+ *  \brief
+ *  \par Function Description
+ *
+ */
 /* both outline and boundingbox work! */
 /* name is blah */
 void o_drawbounding(GSCHEM_TOPLEVEL *w_current, GList *o_glist,

commit 88cdb643a1304cd283a2f2ad95993f237e81248b
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Date:   Wed Oct 17 03:53:38 2007 +0100

    Remove unused code from libgeda

diff --git a/libgeda/src/g_smob.c b/libgeda/src/g_smob.c
index cbda446..ed57fab 100644
--- a/libgeda/src/g_smob.c
+++ b/libgeda/src/g_smob.c
@@ -681,43 +681,6 @@ void g_init_object_smob(void)
   return;
 }
 
-#if 0
-/*! \brief Gets the OBJECT data from the object smob.
- *  \par Function Description
- *  Get the OBJECT data from the object smob.
- *
- *  \param [in] object_smob  The object smob to get the OBJECT data from.
- *  \return The OBJECT data.
- *  \deprecated
- *  \todo check and remove?
- */
-OBJECT *g_get_object_from_object_smob(SCM object_smob)
-{
-  
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               (SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get_object_from_object_smob");
-  return ((OBJECT *) (((struct st_object_smob *)SCM_CDR(object_smob))->object));
-}
-
-/*! \brief Get the TOPLEVEL data from the object smob.
- *  \par Function Description
- *  Get the TOPLEVEL data from the object smob.
- *
- *  \param [in] object_smob  The object smob to get the TOPLEVEL data from.
- *  \return The TOPLEVEL data.
- *  \deprecated
- *  \todo check and remove?
- */
-TOPLEVEL *g_get_toplevel_from_object_smob(SCM object_smob)
-{
-  
-  SCM_ASSERT ( SCM_NIMP(object_smob) && 
-               (SCM_CAR(object_smob) == object_smob_tag),
-               object_smob, SCM_ARG1, "get_toplevel_from_object_smob");
-  return ((TOPLEVEL *) (((struct st_object_smob *)SCM_CDR(object_smob))->world));
-}
-#endif
 
 /*! \brief Get the TOPLEVEL and OBJECT data from an object smob.
  *  \par Function Description
diff --git a/libgeda/src/m_basic.c b/libgeda/src/m_basic.c
index b9a3ff6..2a2b466 100644
--- a/libgeda/src/m_basic.c
+++ b/libgeda/src/m_basic.c
@@ -49,22 +49,10 @@ int mil_x(TOPLEVEL *toplevel, int val)
   double fval;
   int j;
 
-#if 0 /* removed for speed improvements */
-  double fw0,fw1,fw,fval;
-  fw1 = toplevel->page_current->right;
-  fw0 = toplevel->page_current->left;
-  fw  = toplevel->width;
-#endif
-
   fval = val;
   i = fval * toplevel->page_current->to_world_x_constant +
   toplevel->page_current->left;
 
-  /* i -= mil_x_tw2;
-     i = ((i) / 100 ) * 100; I don't think we need this 
-     i += mil_x_tw1;*/
-
-
 #ifdef HAS_RINT
   j = rint(i);
 #else
@@ -88,20 +76,10 @@ int mil_y(TOPLEVEL *toplevel, int val)
   double fval;
   int j;
 
-#if 0 /* removed for speed improvements */
-  double fw0,fw1,fw,fval;
-  fw1 = toplevel->page_current->bottom;
-  fw0 = toplevel->page_current->top;
-  fw  = toplevel->height;
-#endif
-
   fval = toplevel->height - val;
   i = fval * toplevel->page_current->to_world_y_constant +
   toplevel->page_current->top;
 
-  /* i = ((i) / 100 ) * 100; I don't think we need this */
-  /* i += mil_y_tw1; or this*/
-
 #ifdef HAS_RINT
   j = rint(i);
 #else
@@ -125,15 +103,6 @@ int pix_x(TOPLEVEL *toplevel, int val)
   double i;
   int j;
 
-#if 0 /* removed for speed */
-  double fs,f0,f1,f;
-  f0 = toplevel->page_current->left;
-  f1 = toplevel->page_current->right;
-  fs = toplevel->width;
-  f = toplevel->width / (f1 - f0);
-#endif
-
-
   i = toplevel->page_current->to_screen_x_constant *
   (double)(val - toplevel->page_current->left);
 
@@ -168,13 +137,6 @@ int pix_y(TOPLEVEL *toplevel, int val)
   double i;
   int j;
 
-#if 0 /* removed for speed */
-  double fs,f0,f1,f;
-  f0 = toplevel->page_current->top;
-  f1 = toplevel->page_current->bottom;
-  fs = toplevel->height;
-  f = fs / (f1 - f0); /* fs was toplevel->height */
-#endif
   i = toplevel->height - (
                            toplevel->page_current->to_screen_y_constant *
                            (double)(val - toplevel->page_current->top));
@@ -277,32 +239,6 @@ int snap_grid(TOPLEVEL *toplevel, int input)
 #endif
 
   return(sign*n);
-
-#if 0 /* working snap code, crude, slow */
-  int interm; 
-  int final;
-  int power;
-  int itop;
-	
-  power = snap_grid;
-  itop = input / power;
-  interm = abs(input % power);
-
-  if (interm > 0 && interm < snap_grid/2) {	
-    interm = 0;
-  } else if (interm >= snap_grid/2 && interm <= snap_grid) {
-    interm = snap_grid;
-  }
-
-  if (input >= 0) {	
-    final = itop*snap_grid+interm;
-  } else if (input < 0) {
-    final = itop*snap_grid-interm;
-  }
-
-  return(final);
-#endif
-
 }                               
 
 /*! \brief Get absolute SCREEN coordinate.
@@ -357,11 +293,6 @@ int WORLDabs(TOPLEVEL *toplevel, int val)
   fval = val;
   i = fval * (fw1 - fw0) / fw;
 
-  /* i -= mil_x_tw2;
-     i = ((i) / 100 ) * 100; I don't think we need this 
-     i += mil_x_tw1;*/
-
-
 #ifdef HAS_RINT
   j = rint(i);
 #else
@@ -965,13 +896,6 @@ void rotate_point_90(int x, int y, int angle, int *newx, int *newy)
 
   *newx = x * costheta - y * sintheta;
   *newy = x * sintheta + y * costheta;
-
-#if 0 /* fixed rotation */
-
-  *newx = -y ; 
-  *newy = x ;
-#endif
-
 }
 
 /*! \brief Convert Paper size to World coordinates.
@@ -1019,46 +943,6 @@ void PAPERSIZEtoWORLD(int width, int height, int border, int *right, int *bottom
 
 }
 
-/*! \deprecated
- *  \brief Get the number of zoom's done.
- *  \par Function Description
- *  This function returns the number of zoom's that have been done.
- *  It is computed from the zoom_factor since, the zoom_factor is
- *  actually the magnification level.
- *
- *  \param [in] zoom_factor The current zoom factor being used.
- *  \return The number of zoom's done so far.
- */
-#if 0 /* no longer used at all */
-int return_zoom_number(int zoom_factor)
-{
-  double check=0;
-  double factor;
-  int i=0;
-	
-  if (zoom_factor != 0) {
-    factor = zoom_factor;
-    check = pow(2, i);
-    while( check != factor && check < factor) {
-      i++;
-      check = pow(2, i);
-    }
-  } else {
-    return(0);
-  }
-	
-  return(i);
-
-#if 0 /* delete eventually */
-  if (zoom_factor > 0) {
-    return(log(zoom_factor)+2);
-    /* return(log(zoom_factor+1));*/
-  } else {
-    return(1);
-  }
-#endif
-}
-#endif
 
 /*! \brief Rounds numbers by a power of 10.
  *  \par Function Description
diff --git a/libgeda/src/o_arc_basic.c b/libgeda/src/o_arc_basic.c
index feba9be..83304d0 100644
--- a/libgeda/src/o_arc_basic.c
+++ b/libgeda/src/o_arc_basic.c
@@ -847,26 +847,6 @@ void o_arc_print_dotted(TOPLEVEL *toplevel, FILE *fp,
     */
     fprintf(fp,"[%d] ",d);
 
-
-#if 0 
-    /*! \note
-     *  A dot is represented by a filled circle.
-     *  Position of the circle is (<B>xa</B>, <B>ya</B>) and its radius is the <B>arc_width</B> parameter.
-     */
-    /* PB : problem corrected : diameter of printed dots */
-    /* 
-      fprintf(fp, "newpath\n");
-      fprintf(fp, "%d mils %d mils\n", (int) xa, (int) ya);
-      if (arc_width <= 1) {
-        fprintf(fp, "2 mils\n");
-      } else {
-        fprintf(fp, "%d mils\n", (int) arc_width/2);
-      }
-      fprintf(fp, "0 360 arc\n");
-      fprintf(fp, "fill\n");
-    */
-    /* PB : end */		
-#endif
     d = d + da;
   }
   fprintf(fp,"] %d %d %d %d dashedarc %% dotted\n",
diff --git a/libgeda/src/o_bus_basic.c b/libgeda/src/o_bus_basic.c
index d85d045..7297b5d 100644
--- a/libgeda/src/o_bus_basic.c
+++ b/libgeda/src/o_bus_basic.c
@@ -458,14 +458,6 @@ void o_bus_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
 
         printf("object DID have attributes\n");
 
-#if 0
-	printf("object->attribs\n");
-	o_attrib_print(object->attribs);
-	printf("--\n");
-	printf("del_object->attribs\n");
-	o_attrib_print(del_object->attribs);
-	printf("--\n");
-#endif
         tail = o_attrib_return_tail(object->attribs);
 
 				/* skip over old attrib head */
@@ -487,11 +479,6 @@ void o_bus_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
 				/* attribs list */
 
         del_object->attribs = NULL;
-#if 0
-	printf("\n\nfinal object->attribs\n");
-	o_attrib_print(object->attribs);
-	printf("--\n");
-#endif
 
       } else {
 
diff --git a/libgeda/src/o_circle_basic.c b/libgeda/src/o_circle_basic.c
index 9249361..a6de864 100644
--- a/libgeda/src/o_circle_basic.c
+++ b/libgeda/src/o_circle_basic.c
@@ -385,16 +385,6 @@ char *o_circle_save(OBJECT *object)
     color = object->saved_color;
   }
   
-#if 0 /* old system */
-  radius = abs(x2 - x1)/2;
-  if (radius == 0) {
-    radius = abs(y2 - y1)/2;
-  }
-  
-  x = x1 + radius; 
-  y = y1 - radius; /* careful */
-#endif
-  
   buf = g_strdup_printf("%c %d %d %d %d %d %d %d %d %d %d %d %d %d %d %d", 
 			object->type, x, y, radius, color,
 			circle_width, circle_end, circle_type, circle_length, 
diff --git a/libgeda/src/o_net_basic.c b/libgeda/src/o_net_basic.c
index 572e711..735d95f 100644
--- a/libgeda/src/o_net_basic.c
+++ b/libgeda/src/o_net_basic.c
@@ -475,14 +475,6 @@ void o_net_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
         /* fix it, because you can't just go around deleting objects */
         /* this whole net conslidate needs to be re thought.. since you */
         /* don't really del the del_object */
-#if 0
-        printf("object->attribs\n");
-        o_attrib_print(object->attribs);
-        printf("--\n");
-        printf("del_object->attribs\n");
-        o_attrib_print(del_object->attribs);
-        printf("--\n");
-#endif
         tail = o_attrib_return_tail(object->attribs);
 
         /* skip over old attrib head */
@@ -505,11 +497,6 @@ void o_net_consolidate_lowlevel(OBJECT *object, OBJECT *del_object,
         /* attribs list */
 
         del_object->attribs = NULL;
-#if 0
-        printf("\n\nfinal object->attribs\n");
-        o_attrib_print(object->attribs);
-        printf("--\n");
-#endif
 
       } else {
 
diff --git a/libgeda/src/o_pin_basic.c b/libgeda/src/o_pin_basic.c
index 0029c10..79df6e9 100644
--- a/libgeda/src/o_pin_basic.c
+++ b/libgeda/src/o_pin_basic.c
@@ -88,21 +88,6 @@ OBJECT *o_pin_add(TOPLEVEL *toplevel, OBJECT *object_list,
   
   object_list = (OBJECT *) s_basic_link_object(new_node, object_list);
 
-  /* this mod causes shadow pins to appear at 0,0 if you copy a complex
-   * that has pins... 
-   * This mod was added so that you could draw pins to nets and have
-   * the dangling cue go away 
-   * There is a complementary one in o_nets, but it doesn't work 
-   * completely either... hack */
-#if 0
-  /*  ifed out 3/15/98 due to above  */
-  if (!adding_sel) {
-    o_pin_conn_recalc(toplevel, object_list); /* old conn system */
-    /*o_net_conn_recalc(object_list); */
-  }     
-#endif
-
-
   if (!toplevel->ADDING_SEL) {
     s_tile_add_object(toplevel, object_list,
                       new_node->line->x[0], new_node->line->y[0], 
diff --git a/libgeda/src/o_text_basic.c b/libgeda/src/o_text_basic.c
index 9acf339..5b8c679 100644
--- a/libgeda/src/o_text_basic.c
+++ b/libgeda/src/o_text_basic.c
@@ -1818,513 +1818,6 @@ void o_text_rotate_world(TOPLEVEL *toplevel,
   o_text_recreate(toplevel, object);
 }
 
-#if 0 /* code which is no longer needed, replaced by new functions below */
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-void o_text_mirror_old(TOPLEVEL *toplevel, int centerx, int centery,
-		       OBJECT *object)
-{
-  int newx=0, newy=0;
-  int origx, origy;
-  int world_centerx, world_centery;
-  int x, y;
-  char *output_string = NULL;
-  char *name = NULL;
-  char *value = NULL;
-  int height_mod=0;
-  int sign=1;
-	
-  SCREENtoWORLD(toplevel, centerx, centery,
-                &world_centerx,
-                &world_centery);
-
-  origx = object->text->x;
-  origy = object->text->y;
-
-  x = origx + (-world_centerx);
-  y = origy + (-world_centery);
-
-  if (o_attrib_get_name_value(object->text->string, &name, &value)) {
-    switch(object->show_name_value) {
-      case(SHOW_NAME_VALUE):
-        output_string = g_strdup(object->text->string);
-        break;
-
-      case(SHOW_NAME):
-        if (name[0] != '\0') {
-          output_string = g_strdup(name);
-        } else {
-          /* you probably can remove this now... */
-          /* since improper attributes will never get here */
-          fprintf(stderr, 
-                  "Got an improper attribute: %s\n", 
-                  object->text->string);
-          output_string = g_strdup("invalid");
-        }
-        break;
-
-      case(SHOW_VALUE):
-        if (value[0] != '\0') {
-          output_string = g_strdup(value);
-        } else {
-          /* you probably can remove this now... */
-          /* since improper attributes will never get here */
-          fprintf(stderr, 
-                  "Got an improper attribute: %s\n", 
-                  object->text->string);
-          output_string = g_strdup("invalid");
-        }
-        break;
-    }
-  } else {
-    output_string = g_strdup(object->text->string);
-  }
-
-  switch(object->text->alignment) {
-    case(LOWER_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-
-    case(LOWER_MIDDLE):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_MIDDLE): 
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_MIDDLE): 
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-
-    case(LOWER_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-  }
-
-  switch (object->text->angle) {
-
-    case(0): 
-    newx = -(x + sign*o_text_width(toplevel,
-                                   output_string, 
-                                   object->text->size/2)); 
-    break;
-
-    case(90):
-    newx = -(x - sign*o_text_height(object->text->string,
-                                    object->text->size)+
-             height_mod);
-    break;
-
-    case(180):
-    newx = -(x - sign*o_text_width(toplevel,
-                                   output_string, 
-                                   object->text->size/2)); 
-    break;
-
-    case(270):
-    newx = -(x + sign*o_text_height(object->text->string,
-                                    object->text->size)-
-             height_mod);
-    break;
-
-
-    default:
-    fprintf(stderr, "Invalid angle specified!\n");
-    return;
-    break;
-
-  }
-
-  newy = y;
-
-  x = newx + (world_centerx);
-  y = newy + (world_centery);
-	
-  /* don't know if this is needed? */	
-  o_text_translate_world(toplevel, x-object->text->x, y-object->text->y, object);
-
-  o_text_recreate(toplevel, object);
-  if (output_string) g_free(output_string);
-  if (name) g_free(name);
-  if (value) g_free(value);
-}
-
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-void o_text_mirror_world_old(TOPLEVEL *toplevel, int world_centerx,
-			     int world_centery, OBJECT *object)
-{
-  int newx=0, newy=0;
-  int origx, origy;
-  int x, y;
-  char *output_string = NULL;
-  char *name = NULL;
-  char *value = NULL;
-  int sign=1;
-  int height_mod=0;
-	
-  origx = object->text->x;
-  origy = object->text->y;
-
-  /* translate to origin */
-  x = origx + (-world_centerx);
-  y = origy + (-world_centery);
-
-
-  if (o_attrib_get_name_value(object->text->string, &name, &value)) {
-    switch(object->show_name_value) {
-      case(SHOW_NAME_VALUE):
-        output_string = g_strdup(object->text->string);
-        break;
-
-      case(SHOW_NAME):
-        if (name[0] != '\0') {
-          output_string = g_strdup(name);
-        } else {
-          /* you probably can remove this now... */
-          /* since improper attributes will never get here */
-          fprintf(stderr, 
-                  "Got an improper attribute: %s\n", 
-                  object->text->string);
-          output_string = g_strdup("invalid");
-        }
-        break;
-
-      case(SHOW_VALUE):
-        if (value[0] != '\0') {
-          output_string = g_strdup(value);
-        } else {
-          /* you probably can remove this now... */
-          /* since improper attributes will never get here */
-          fprintf(stderr, 
-                  "Got an improper attribute: %s\n", 
-                  object->text->string);
-          output_string = g_strdup("invalid");
-        }
-        break;
-    }
-  } else {
-    output_string = g_strdup(object->text->string);
-  }
-
-  switch(object->text->alignment) {
-    case(LOWER_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_LEFT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-
-    case(LOWER_MIDDLE): 
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_MIDDLE): 
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_MIDDLE): 
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = 0.5;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-
-    case(LOWER_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 0;
-    }
-    break;
-
-    case(MIDDLE_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = o_text_height(object->text->string,
-                                 object->text->size);
-    }
-    break;
-
-    case(UPPER_RIGHT):
-    if (object->text->angle == 0 || object->text->angle == 180) {
-      sign = -1;
-      height_mod = 0;
-    } else if (object->text->angle == 90 || object->text->angle == 270) {
-      sign = 1;
-      height_mod = 2*o_text_height(object->text->string,
-                                   object->text->size);
-    }
-    break;
-  }
-
-  switch (object->text->angle) {
-
-    case(0): 
-    newx = -(x + sign*o_text_width(toplevel,
-                                   output_string, 
-                                   object->text->size/2)); 
-
-    break;
-
-    case(90):
-    newx = -(x - sign*o_text_height(object->text->string,
-                                    object->text->size)+height_mod);
-    break;
-
-    case(180):
-    newx = -(x - sign*o_text_width(toplevel,
-                                   output_string, 
-                                   object->text->size/2)); 
-    break;
-
-    case(270):
-    newx = -(x + sign*o_text_height(object->text->string,
-                                    object->text->size)+height_mod);
-    break;
-
-    default:
-    fprintf(stderr, "Invalid angle specified!\n");
-    return;
-    break;
-
-  }
-
-  newy = y;
-
-  x = newx + (world_centerx);
-  y = newy + (world_centery);
-
-  object->text->x = x;
-  object->text->y = y;
-
-  /* don't know if this is needed ?*/	
-  /* o_text_translate_world(toplevel, x-object->text->x, y-object->text->y, object);*/
-  o_text_recreate(toplevel, object);
-  if (output_string) g_free(output_string);
-  if (name) g_free(name);
-  if (value) g_free(value);
-}
-#endif
-
-#if 0 /* interesting, but currently unused code */
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-void o_text_return_center(TOPLEVEL *toplevel, OBJECT *o_current,
-			  int *centerx, int *centery)
-{
-  int text_height; 
-  int text_width;
-
-  text_height = o_text_height(o_current->text->string,
-			      o_current->text->size);
-
-  /* this will NOT NOT NOT work with attributes */
-  text_width = o_text_width(toplevel, o_current->text->string,
-                            o_current->text->size/2); 
-	
-  switch(o_current->text->angle) {
-    case(0):
-      *centerx = o_current->text->x + text_width/2;
-      *centery = o_current->text->y + text_height/2;
-      break;
-
-    case(90):
-      *centerx = o_current->text->x - text_height/2;
-      *centery = o_current->text->y + text_width/2;
-      break;
-
-    case(180):
-      *centerx = o_current->text->x - text_width/2;
-      *centery = o_current->text->y - text_height/2;
-      break;
-
-    case(270):
-      *centerx = o_current->text->x + text_height/2;
-      *centery = o_current->text->y - text_width/2;
-      break;
-  }	
-}
-
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-/* the complex here is the complex of a complex object */
-void o_text_change_angle(TOPLEVEL *toplevel, OBJECT *prim_objs, int new_angle)
-{
-  OBJECT *o_current;
-  int centerx, centery;
-
-  o_current = prim_objs;
-
-  while (o_current != NULL) {
-    if (o_current->type == OBJ_TEXT) {
-      o_current->text->angle = new_angle;
-
-      /* change world to non */
-      o_text_return_center(toplevel, o_current, &centerx, &centery);
-
-      o_text_translate_world(toplevel,
-                             -centerx, -centery, o_current);
-
-      o_text_mirror_world(toplevel, 0, 0,
-                          o_current);
-      /* 
-         o_text_rotate_world(toplevel, 0, 0,
-         new_angle, 180, o_current);
-      */
-
-      /*			o_text_rotate_world(toplevel, 0, 0, new_angle,
-                                180, o_current)*/
-
-      o_text_translate_world(toplevel,
-                             centerx, centery, o_current);
-
-      /* 			o_text_rotate_lowlevel(toplevel,
-				0, 0, new_angle, 180, o_current->text->prim_objs);*/
-
-#if 0
-      toplevel->override_color =
-        toplevel->background_color;
-      o_text_draw(toplevel, o_current);
-      toplevel->override_color = -1;
-#endif
-
-      o_text_recreate(toplevel, o_current);
-    }
-    o_current = o_current->next;
-  }
-}
-#endif
 
 /*! \todo Finish function documentation!!!
  *  \brief
diff --git a/libgeda/src/s_basic.c b/libgeda/src/s_basic.c
index 7668555..6ebe35a 100644
--- a/libgeda/src/s_basic.c
+++ b/libgeda/src/s_basic.c
@@ -505,41 +505,13 @@ void s_delete_list_fromstart(TOPLEVEL *toplevel, OBJECT *start)
   current = return_tail(start);
 
   /* do the delete backwards */
-  /*while(current != NULL && current->type != OBJ_HEAD ) {*/
   while(current != NULL) {
     o_current = current->prev;
     s_delete(toplevel, current);
     current = o_current;
   }
-
-  /* now delete the head node */
-  /* might not need this but what the hell */
-  /* no longer needed, since it's deleted above */
-  /*s_delete_head(toplevel, start);*/
 }
 
-#if 0 /* old way of doing this */
-/*! \todo Finish function documentation!!!
- *  \brief
- *  \par Function Description
- *
- */
-void s_delete_list_fromstart(OBJECT *start)
-{
-  OBJECT *traverse=NULL;
-  OBJECT *o_current=NULL;
-
-  for (traverse = start; traverse ; traverse = o_current) {
-    o_current = traverse->next;
-    if (traverse->type != OBJ_HEAD) /* don't delete any head nodes */
-      s_delete(traverse);
-    else 
-      break; /* found a head node */
-  }
-  s_delete(traverse);
-}
-#endif
-
 /*! \todo Finish function documentation!!!
  *  \brief
  *  \par Function Description
diff --git a/libgeda/src/s_tile.c b/libgeda/src/s_tile.c
index 3ad2a7f..6fa373f 100644
--- a/libgeda/src/s_tile.c
+++ b/libgeda/src/s_tile.c
@@ -337,22 +337,8 @@ void s_tile_remove_object_all_crude(TOPLEVEL * toplevel, OBJECT * object)
 
   for (j = 0; j < MAX_TILES_Y; j++) {
     for (i = 0; i < MAX_TILES_X; i++) {
-#if 0				/* this checks for existance */
-      t_current = &toplevel->page_current->world_tiles[i][j];
-      found = g_list_find(t_current->objects, object);
-
-      if (found) {
-        printf("found object %s in %d, %d\n", object->name, i, j);
-        t_current->objects = g_list_remove(t_current->objects,
-                                           object);
-      }
-#endif
-
-      /* this just does the remove if the object is found */
-#if 1
       t_current = &toplevel->page_current->world_tiles[i][j];
       t_current->objects = g_list_remove(t_current->objects, object);
-#endif
     }
   }
 }
@@ -472,22 +458,6 @@ void s_tile_free_all(PAGE * p_current)
         fprintf(stderr,
                 "OOPS! t_current->objects had something in it when it was freed!\n");
         fprintf(stderr, "Length: %d\n", g_list_length(t_current->objects));
-
-
-#if 0  /* was if DEBUG, but code won't compile.  Remove it? */
-        printf("%s %d %d\n", p_current->page_filename, i, j);
-        objects = t_current->objects;
-        while(objects != NULL) {
-          real_object = (OBJECT *) objects->data;
-          printf("yes %s\n", real_object->name);
-          objects = objects->next;
-        }
-                        
-        if (t_current->objects == NULL) {
-          printf("yes null\n");
-        }
-#endif
-        
       }
       g_list_free(t_current->objects);
     }




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs