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

gEDA-cvs: gaf.git: branch: master updated (1.7.2-20111231-76-gb3dfc6c)



The branch, master has been updated
       via  b3dfc6c7124810598042a78fe2800f36699769c3 (commit)
       via  f8a9c86e2e2fa7fa451cd504e62ebee6a3e73d2d (commit)
       via  bbcb153180b2c45fe74012059b428b06ad61eaae (commit)
       via  0df45c9f859537bf9683b7fa8fb3d4b35828672e (commit)
       via  c9757a3be117e537a958e19a2f344123951b2ff3 (commit)
      from  13664d6acc70b939668493bb43e60eeaa9c202ea (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/src/o_cue.c  |   77 ++++++++++++++++++++++++++-------------------------
 libgeda/src/s_cue.c |   59 ++++++++++++++++++++++++---------------
 2 files changed, 75 insertions(+), 61 deletions(-)


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

commit b3dfc6c7124810598042a78fe2800f36699769c3
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: rewrite s_cue_output_single

:100644 100644 5eb7eae... fb0580c... M	libgeda/src/s_cue.c

commit f8a9c86e2e2fa7fa451cd504e62ebee6a3e73d2d
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: fix printing of junction cues
    
    Closes bug "disappearing dots in gschem" reported by
    Gabriel Paubert <paubert@xxxxxxx>.  Issue was introduced in
    commit 65c68f9.
    
    Additionally, now junction cues are also printed when 3 or
    more pins are connected (same behavior as for net segments).

:100644 100644 f604e11... 5eb7eae... M	libgeda/src/s_cue.c

commit bbcb153180b2c45fe74012059b428b06ad61eaae
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: cleanup o_cue_draw_lowlevel

:100644 100644 ae497af... 648f044... M	gschem/src/o_cue.c

commit 0df45c9f859537bf9683b7fa8fb3d4b35828672e
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: fix drawing of junction cues
    
    Closes bug "disappearing dots in gschem" reported by
    Gabriel Paubert <paubert@xxxxxxx>.  Issue was introduced in
    commit 6cae96e.
    
    Additionally, now junction cues are also drawn when 3 or more pins are
    connected (same behavior as for net segments).

:100644 100644 db48fce... ae497af... M	gschem/src/o_cue.c

commit c9757a3be117e537a958e19a2f344123951b2ff3
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: rewrite o_cue_draw_single

:100644 100644 7690bae... db48fce... M	gschem/src/o_cue.c

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

commit b3dfc6c7124810598042a78fe2800f36699769c3
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: rewrite s_cue_output_single

diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index 5eb7eae..fb0580c 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -232,28 +232,48 @@ void s_cue_output_lowlevel_midpoints(TOPLEVEL * toplevel, OBJECT * object,
   }
 }
 
-/*! \todo Finish function documentation!!!
- *  \brief
+/*! \brief Output cues for a single object
+ *
  *  \par Function Description
+ *  Cues are drawn on pins, nets and buses.
+ *  Two types of cues are drawn:
+ *   - endpoint cues (identifying unconnected ends of objects)
+ *   - junction cues (identifying net/pin/bus junctions)
  *
+ *  \param [in] toplevel   The TOPLEVEL object
+ *  \param [in] object     The OBJECT to output cues for
+ *  \param [in] fp         The file handle to output to
+ *  \param [in] type       The type of output being produced
  */
 void s_cue_output_single(TOPLEVEL * toplevel, OBJECT * object, FILE * fp,
 			 int type)
 {
-  if (!object) {
-    return;
-  }
-
-  if (object->type != OBJ_NET && object->type != OBJ_PIN &&
-      object->type != OBJ_BUS) {
-	return;
+  g_return_if_fail (object != NULL);
+
+  switch (object->type) {
+    case (OBJ_NET):
+      /*
+       * s_cue_output_lowlevel handles both endpoints and junctions.
+       * The intention of the check is to skip drawing endpoint cues on nets
+       * that are not "fully connected".
+       * Junctions will be drawn correctly, as:
+       *  - net-net junctions are handled by s_cue_output_lowlevel_midpoints
+       *  - net-pin and pin-pin junctions are handled by case OBJ_PIN below
+       */
+      if (!o_net_is_fully_connected (toplevel, object)) {
+        s_cue_output_lowlevel(toplevel, object, 0, fp, type);
+        s_cue_output_lowlevel(toplevel, object, 1, fp, type);
       }
-
-  if (object->type != OBJ_NET
-      || ((object->type == OBJ_NET)
-          && !o_net_is_fully_connected (toplevel, object))) {
-    s_cue_output_lowlevel(toplevel, object, 0, fp, type);
-    s_cue_output_lowlevel(toplevel, object, 1, fp, type);
+      break;
+    case (OBJ_BUS):
+      s_cue_output_lowlevel(toplevel, object, 0, fp, type);
+      s_cue_output_lowlevel(toplevel, object, 1, fp, type);
+      break;
+    case (OBJ_PIN):
+      s_cue_output_lowlevel(toplevel, object, object->whichend, fp, type);
+      break;
+    default:
+      return;
   }
   s_cue_output_lowlevel_midpoints(toplevel, object, fp, type);
 }

commit f8a9c86e2e2fa7fa451cd504e62ebee6a3e73d2d
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    libgeda: fix printing of junction cues
    
    Closes bug "disappearing dots in gschem" reported by
    Gabriel Paubert <paubert@xxxxxxx>.  Issue was introduced in
    commit 65c68f9.
    
    Additionally, now junction cues are also printed when 3 or
    more pins are connected (same behavior as for net segments).

diff --git a/libgeda/src/s_cue.c b/libgeda/src/s_cue.c
index f604e11..5eb7eae 100644
--- a/libgeda/src/s_cue.c
+++ b/libgeda/src/s_cue.c
@@ -170,7 +170,7 @@ void s_cue_output_lowlevel(TOPLEVEL * toplevel, OBJECT * object, int whichone,
   switch (type) {
 
     case (CONN_ENDPOINT):
-      if (object->type == OBJ_NET) {	/* only nets have these cues */
+      if (object->type == OBJ_NET || object->type == OBJ_PIN) {
         if (count < 1) {	/* Didn't find anything connected there */
           if (output_type == POSTSCRIPT) {
             s_cue_postscript_fillbox(toplevel, fp, x, y);
@@ -182,13 +182,6 @@ void s_cue_output_lowlevel(TOPLEVEL * toplevel, OBJECT * object, int whichone,
             s_cue_postscript_junction (toplevel, fp, x, y, bus_involved);
         }
       }
-      else if (object->type == OBJ_PIN
-               && count == 0
-               && whichone == object->whichend) {
-        if (output_type == POSTSCRIPT) {
-          s_cue_postscript_fillbox(toplevel, fp, x, y);
-        }
-      }
       break;
 
     case (CONN_MIDPOINT):

commit bbcb153180b2c45fe74012059b428b06ad61eaae
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: cleanup o_cue_draw_lowlevel

diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index ae497af..648f044 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -131,10 +131,9 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
   int type, count = 0;
   int done = FALSE;
   int size;
-  int otherone;
-  int bus_involved=FALSE;
+  int bus_involved = FALSE;
 
-  if (whichone < 0 || whichone > 1) return;
+  g_return_if_fail (whichone == 0 || whichone == 1);
   
   x = object->line->x[whichone];
   y = object->line->y[whichone];
@@ -146,7 +145,7 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
     bus_involved = TRUE;
 
   cl_current = object->conn_list;
-  while(cl_current != NULL && !done) {
+  while (cl_current != NULL && !done) {
     conn = (CONN *) cl_current->data;
    
     if (conn->x == x && conn->y == y) {

commit 0df45c9f859537bf9683b7fa8fb3d4b35828672e
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: fix drawing of junction cues
    
    Closes bug "disappearing dots in gschem" reported by
    Gabriel Paubert <paubert@xxxxxxx>.  Issue was introduced in
    commit 6cae96e.
    
    Additionally, now junction cues are also drawn when 3 or more pins are
    connected (same behavior as for net segments).

diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index db48fce..ae497af 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -181,28 +181,15 @@ void o_cue_draw_lowlevel(GSCHEM_TOPLEVEL *w_current, OBJECT *object, int whichon
   switch(type) {
 
     case(CONN_ENDPOINT):
-      if (object->type == OBJ_NET) { /* only nets have these cues */
+      if (object->type == OBJ_NET || object->type == OBJ_PIN) {
         if (count < 1) { /* Didn't find anything connected there */
           size = CUE_BOX_SIZE;
           gschem_cairo_center_box (w_current, -1, -1, x, y, size, size);
           o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
           cairo_fill (w_current->cr);
-
         } else if (count >= 2) {
           draw_junction_cue (w_current, x, y, bus_involved);
         }
-      } else if (object->type == OBJ_PIN) {
-        /* Didn't find anything connected there */
-        if (count < 1 && object->whichend == whichone) {
-          size = (bus_involved) ? PIN_CUE_SIZE_BUS : PIN_CUE_SIZE_NET;
-
-          otherone = !whichone;
-
-          o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
-          gschem_cairo_center_box (w_current, -1, -1, x, y, size, size);
-          o_cue_set_color (w_current, NET_ENDPOINT_COLOR);
-          cairo_fill (w_current->cr);
-        }
       }
       break;
 

commit c9757a3be117e537a958e19a2f344123951b2ff3
Author: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>
Commit: Krzysztof KoÅ?ciuszkiewicz <k.kosciuszkiewicz@xxxxxxxxx>

    gschem: rewrite o_cue_draw_single

diff --git a/gschem/src/o_cue.c b/gschem/src/o_cue.c
index 7690bae..db48fce 100644
--- a/gschem/src/o_cue.c
+++ b/gschem/src/o_cue.c
@@ -240,32 +240,47 @@ void o_cue_draw_lowlevel_midpoints(GSCHEM_TOPLEVEL *w_current, OBJECT *object)
 }
 
 
-/*! \todo Finish function documentation!!!
- *  \brief
+/*! \brief Draw cues for a single object
+ *
  *  \par Function Description
+ *  Cues are drawn on pins, nets and buses.
+ *  Two types of cues are drawn:
+ *   - endpoint cues (identifying unconnected ends of objects)
+ *   - junction cues (identifying net/pin/bus junctions)
  *
+ *  \param [in] w_current   The GSCHEM_TOPLEVEL object
+ *  \param [in] object      The OBJECT to draw cues for
  */
 void o_cue_draw_single(GSCHEM_TOPLEVEL *w_current, OBJECT *object)
 {
-  if (!object) {
-    return;
-  }
-
-  if (object->type != OBJ_NET && object->type != OBJ_PIN &&
-      object->type != OBJ_BUS) {
-        return;
+  g_return_if_fail (object != NULL);
+
+  switch (object->type) {
+    case(OBJ_NET):
+      /*
+       * o_cue_draw_lowlevel handles both endpoints and junctions.
+       * The intention of the check is to skip drawing endpoint cues on nets
+       * that are not "fully connected".
+       * Junctions will be drawn correctly, as:
+       *  - net-net junctions are handled by o_cue_draw_lowlevel_midpoints
+       *  - net-pin and pin-pin junctions are handled by case OBJ_PIN below
+       */
+      if (!o_net_is_fully_connected (w_current->toplevel, object)) {
+        o_cue_draw_lowlevel (w_current, object, 0);
+        o_cue_draw_lowlevel (w_current, object, 1);
       }
-
-  if (object->type != OBJ_PIN) {
-    if (object->type != OBJ_NET
-        || ((object->type == OBJ_NET)
-            && !o_net_is_fully_connected (w_current->toplevel, object))) {
-      o_cue_draw_lowlevel(w_current, object, 0);
-      o_cue_draw_lowlevel(w_current, object, 1);
-    }
-    o_cue_draw_lowlevel_midpoints(w_current, object);
-  } else {
-    o_cue_draw_lowlevel(w_current, object, object->whichend);
+      o_cue_draw_lowlevel_midpoints (w_current, object);
+      break;
+    case(OBJ_BUS):
+      o_cue_draw_lowlevel (w_current, object, 0);
+      o_cue_draw_lowlevel (w_current, object, 1);
+      o_cue_draw_lowlevel_midpoints (w_current, object);
+      break;
+    case(OBJ_PIN):
+      o_cue_draw_lowlevel (w_current, object, object->whichend);
+      break;
+    default:
+      return;
   }
 }
 



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