You can subscribe to this list here.
| 2003 | Jan | Feb (4) | Mar (5) | Apr | May (5) | Jun (30) | Jul (2) | Aug (18) | Sep (14) | Oct (7) | Nov (21) | Dec (44) | 
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2004 | Jan (63) | Feb (94) | Mar (54) | Apr (39) | May (34) | Jun (25) | Jul (10) | Aug (33) | Sep (16) | Oct (62) | Nov (12) | Dec (2) | 
| 2005 | Jan (71) | Feb (8) | Mar (50) | Apr | May (2) | Jun (12) | Jul (19) | Aug (8) | Sep (3) | Oct (2) | Nov | Dec (8) | 
| 2006 | Jan (10) | Feb (1) | Mar (301) | Apr (232) | May (26) | Jun (20) | Jul (26) | Aug (79) | Sep (92) | Oct (174) | Nov (17) | Dec (93) | 
| 2007 | Jan (27) | Feb (179) | Mar (37) | Apr (81) | May (20) | Jun (5) | Jul | Aug (40) | Sep (68) | Oct (8) | Nov (47) | Dec (34) | 
| 2008 | Jan (154) | Feb (15) | Mar (5) | Apr (21) | May (4) | Jun (1) | Jul (4) | Aug (6) | Sep (8) | Oct (9) | Nov (35) | Dec (50) | 
| 2009 | Jan (8) | Feb (10) | Mar (6) | Apr (9) | May (7) | Jun (40) | Jul (7) | Aug (5) | Sep (2) | Oct (16) | Nov (42) | Dec (5) | 
| 2010 | Jan (3) | Feb (15) | Mar (32) | Apr (18) | May (6) | Jun (9) | Jul | Aug (11) | Sep (16) | Oct | Nov (4) | Dec (35) | 
| 2011 | Jan (24) | Feb (6) | Mar (27) | Apr (119) | May (72) | Jun (20) | Jul (31) | Aug (88) | Sep (86) | Oct (14) | Nov (11) | Dec (30) | 
| 2012 | Jan (4) | Feb (3) | Mar | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 
| 2017 | Jan | Feb | Mar (1) | Apr | May | Jun | Jul | Aug | Sep | Oct | Nov | Dec | 
| 
      
      
      From: <gi...@gp...> - 2009-11-13 19:59:42
      
     | 
| The branch, master has been updated
       via  c52891447c554ffebbddf30e10ebd66b4488dc6e (commit)
      from  ede7157be717b4cd22e1e51b6045a2ea5f28de26 (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
=========
 src/draw.c |   37 ++++++++++++++++---------------------
 1 files changed, 16 insertions(+), 21 deletions(-)
=================
 Commit Messages
=================
commit c52891447c554ffebbddf30e10ebd66b4488dc6e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Fix thindraw mask drawing for pins, including octagonal ones
    
    We need to set the line-width for round pins when in thin-draw and
    clearing the mask.
    
    We need to tell DrawSpecialPolygon() whether we need thin-draw or
    not depending on whether we're clearing the mask or not. We don't
    need to set the line-width outside of DrawSpecialPolygon(), since
    it sets it its-self.
    
    Fix DrawSpecialPolygon() to set the line width and cap style on the
    correct GC.
:100644 100644 a71b1b3... 3180723... M	src/draw.c
=========
 Changes
=========
commit c52891447c554ffebbddf30e10ebd66b4488dc6e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Fix thindraw mask drawing for pins, including octagonal ones
    
    We need to set the line-width for round pins when in thin-draw and
    clearing the mask.
    
    We need to tell DrawSpecialPolygon() whether we need thin-draw or
    not depending on whether we're clearing the mask or not. We don't
    need to set the line-width outside of DrawSpecialPolygon(), since
    it sets it its-self.
    
    Fix DrawSpecialPolygon() to set the line width and cap style on the
    correct GC.
diff --git a/src/draw.c b/src/draw.c
index a71b1b3..3180723 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -940,7 +940,8 @@ DrawLayerGroup (int group, const BoxType * screen)
   */
 static void
 DrawSpecialPolygon (HID * hid, hidGC DrawGC,
-		    LocationType X, LocationType Y, int Thickness)
+		    LocationType X, LocationType Y, int Thickness,
+		    int thin_draw)
 {
   static FloatPolyType p[8] = {
     {
@@ -983,11 +984,11 @@ DrawSpecialPolygon (HID * hid, hidGC DrawGC,
       polygon_x[i] = X + scaled_x[i];
       polygon_y[i] = Y + scaled_y[i];
     }
-  if (TEST_FLAG (THINDRAWFLAG, PCB))
+  if (thin_draw)
     {
       int i;
-      hid->set_line_cap (Output.fgGC, Round_Cap);
-      hid->set_line_width (Output.fgGC, 0);
+      hid->set_line_cap (DrawGC, Round_Cap);
+      hid->set_line_width (DrawGC, 0);
       polygon_x[8] = X + scaled_x[0];
       polygon_y[8] = Y + scaled_y[0];
       for (i = 0; i < 8; i++)
@@ -1045,12 +1046,8 @@ DrawPinOrViaLowLevel (PinTypePtr Ptr, Boolean drawHole)
     }
   else if (TEST_FLAG (OCTAGONFLAG, Ptr))
     {
-      gui->set_line_cap (Output.fgGC, Round_Cap);
-      gui->set_line_width (Output.fgGC,
-			   (Ptr->Thickness - Ptr->DrillingHole) / 2);
-
-      /* transform X11 specific coord system */
-      DrawSpecialPolygon (gui, Output.fgGC, Ptr->X, Ptr->Y, Ptr->Thickness);
+      DrawSpecialPolygon (gui, Output.fgGC, Ptr->X, Ptr->Y, Ptr->Thickness,
+			  TEST_FLAG (THINDRAWFLAG, PCB));
     }
   else
     {				/* draw a round pin or via */
@@ -1162,16 +1159,18 @@ ClearOnlyPin (PinTypePtr Pin, Boolean mask)
     }
   else if (TEST_FLAG (OCTAGONFLAG, Pin))
     {
-      gui->set_line_cap (Output.pmGC, Round_Cap);
-      gui->set_line_width (Output.pmGC, (Pin->Clearance + Pin->Thickness
-					 - Pin->DrillingHole));
-
-      DrawSpecialPolygon (gui, Output.pmGC, Pin->X, Pin->Y, half * 2);
+      DrawSpecialPolygon (gui, Output.pmGC, Pin->X, Pin->Y, half * 2,
+			  TEST_FLAG (THINDRAWFLAG, PCB) ||
+			  TEST_FLAG (THINDRAWPOLYFLAG, PCB));
     }
   else
     {
       if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
-	gui->draw_arc (Output.pmGC, Pin->X, Pin->Y, half, half, 0, 360);
+	{
+	  gui->set_line_cap (Output.pmGC, Round_Cap);
+	  gui->set_line_width (Output.pmGC, 0);
+	  gui->draw_arc (Output.pmGC, Pin->X, Pin->Y, half, half, 0, 360);
+	}
       else
 	gui->fill_circle (Output.pmGC, Pin->X, Pin->Y, half);
     }
@@ -1202,11 +1201,7 @@ ClearPin (PinTypePtr Pin, int Type, int unused)
     }
   else if (TEST_FLAG (OCTAGONFLAG, Pin))
     {
-      gui->set_line_cap (Output.pmGC, Round_Cap);
-      gui->set_line_width (Output.pmGC, (Pin->Clearance + Pin->Thickness
-					 - Pin->DrillingHole) / 2);
-
-      DrawSpecialPolygon (gui, Output.pmGC, Pin->X, Pin->Y, half * 2);
+      DrawSpecialPolygon (gui, Output.pmGC, Pin->X, Pin->Y, half * 2, False);
     }
   else
     {
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-13 01:17:56
      
     | 
| The branch, master has been updated
       via  ede7157be717b4cd22e1e51b6045a2ea5f28de26 (commit)
      from  5e0bb671c487f2ba723e2965b476d6fea437e700 (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
=========
 src/hid/common/draw_helpers.c |   47 +++++++++++++++++++++++++++++++++++++++-
 1 files changed, 45 insertions(+), 2 deletions(-)
=================
 Commit Messages
=================
commit ede7157be717b4cd22e1e51b6045a2ea5f28de26
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Control update of NoHoles cache based on clip region
    
    If at least 50% of the bounding box of a polygon is within the
    clip region, compute the whole NoHoles polygon and cache it for
    later rendering.
    
    If less of the polygon is within the clip region, just compute
    what we need to draw the piece we've been asked for.
:100644 100644 5020745... e975f3b... M	src/hid/common/draw_helpers.c
=========
 Changes
=========
commit ede7157be717b4cd22e1e51b6045a2ea5f28de26
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Control update of NoHoles cache based on clip region
    
    If at least 50% of the bounding box of a polygon is within the
    clip region, compute the whole NoHoles polygon and cache it for
    later rendering.
    
    If less of the polygon is within the clip region, just compute
    what we need to draw the piece we've been asked for.
diff --git a/src/hid/common/draw_helpers.c b/src/hid/common/draw_helpers.c
index 5020745..e975f3b 100644
--- a/src/hid/common/draw_helpers.c
+++ b/src/hid/common/draw_helpers.c
@@ -93,6 +93,42 @@ fill_clipped_contour (hidGC gc, PLINE *pl, const BoxType *clip_box)
   poly_Free (&clipped_pieces);
 }
 
+/* If at least 50% of the bounding box of the polygon is on the screen,
+ * lets compute the complete no-holes polygon.
+ */
+#define BOUNDS_INSIDE_CLIP_THRESHOLD 0.5
+static int
+should_compute_no_holes (PolygonType *poly, const BoxType *clip_box)
+{
+  int x1, x2, y1, y2;
+  float poly_bounding_area;
+  float clipped_poly_area;
+
+  /* If there is no passed clip box, compute the whole thing */
+  if (clip_box == NULL)
+    return 1;
+
+  x1 = MAX (poly->BoundingBox.X1, clip_box->X1);
+  x2 = MIN (poly->BoundingBox.X2, clip_box->X2);
+  y1 = MAX (poly->BoundingBox.Y1, clip_box->Y1);
+  y2 = MIN (poly->BoundingBox.Y2, clip_box->Y2);
+
+  /* Check if the polygon is outside the clip box */
+  if ((x2 <= x1) || (y2 <= y1))
+    return 0;
+
+  poly_bounding_area = (float)(poly->BoundingBox.X2 - poly->BoundingBox.X1) *
+                       (float)(poly->BoundingBox.Y2 - poly->BoundingBox.Y1);
+
+  clipped_poly_area = (float)(x2 - x1) * (float)(y2 - y1);
+
+  if (clipped_poly_area / poly_bounding_area >= BOUNDS_INSIDE_CLIP_THRESHOLD)
+    return 1;
+
+  return 0;
+}
+#undef BOUNDS_INSIDE_CLIP_THRESHOLD
+
 void common_fill_pcb_polygon (hidGC gc, PolygonType *poly,
                               const BoxType *clip_box)
 {
@@ -102,9 +138,16 @@ void common_fill_pcb_polygon (hidGC gc, PolygonType *poly,
 
   if (!poly->NoHolesValid)
     {
-      ComputeNoHoles (poly);
+      /* If enough of the polygon is on-screen, compute the entire
+       * NoHoles version and cache it for later rendering, otherwise
+       * just compute what we need to render now.
+       */
+      if (should_compute_no_holes (poly, clip_box))
+        ComputeNoHoles (poly);
+      else
+        NoHolesPolygonDicer (poly, clip_box, fill_contour_cb, gc);
     }
-  if (poly->NoHoles)
+  if (poly->NoHolesValid && poly->NoHoles)
     {
       PLINE *pl;
 
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-13 01:06:18
      
     | 
| The branch, master has been updated
       via  5e0bb671c487f2ba723e2965b476d6fea437e700 (commit)
      from  7dc2d854f3e58680577b2bb71cd68b2b769e3025 (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
=========
 src/hid/common/draw_helpers.c |   11 +++--------
 1 files changed, 3 insertions(+), 8 deletions(-)
=================
 Commit Messages
=================
commit 5e0bb671c487f2ba723e2965b476d6fea437e700
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Fix memory leak in polygon NoHoles clipping routine
    
    poly_CopyContour creates the edge tree, as does ContourToPoly(),
    which overwrite the one created in poly_CopyContour().
    
    Replace call to ContourToPoly() with a discrete alternative without
    the poly_PreContour() call.
    
    Also, don't try to poly_Free() the output of poly_Boolean_free() in
    an error condition. poly_Boolean_free() re-uses the A input polygon
    for its output, so attempting to free that might be dangerous.
    
    poly_Boolean_free() should free its inputs (and any partial output)
    if it encounters an error.
:100644 100644 81fb850... 5020745... M	src/hid/common/draw_helpers.c
=========
 Changes
=========
commit 5e0bb671c487f2ba723e2965b476d6fea437e700
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Fix memory leak in polygon NoHoles clipping routine
    
    poly_CopyContour creates the edge tree, as does ContourToPoly(),
    which overwrite the one created in poly_CopyContour().
    
    Replace call to ContourToPoly() with a discrete alternative without
    the poly_PreContour() call.
    
    Also, don't try to poly_Free() the output of poly_Boolean_free() in
    an error condition. poly_Boolean_free() re-uses the A input polygon
    for its output, so attempting to free that might be dangerous.
    
    poly_Boolean_free() should free its inputs (and any partial output)
    if it encounters an error.
diff --git a/src/hid/common/draw_helpers.c b/src/hid/common/draw_helpers.c
index 81fb850..5020745 100644
--- a/src/hid/common/draw_helpers.c
+++ b/src/hid/common/draw_helpers.c
@@ -76,16 +76,11 @@ fill_clipped_contour (hidGC gc, PLINE *pl, const BoxType *clip_box)
   clip_poly = RectPoly (clip_box->X1, clip_box->X2,
                         clip_box->Y1, clip_box->Y2);
   poly_CopyContour (&pl_copy, pl);
-  piece_poly = ContourToPoly (pl_copy);
+  piece_poly = poly_Create ();
+  poly_InclContour (piece_poly, pl_copy);
   x = poly_Boolean_free (piece_poly, clip_poly,
                          &clipped_pieces, PBO_ISECT);
-  if (x != err_ok)
-    {
-      poly_Free (&clipped_pieces);
-      return;
-    }
-
-  if (clipped_pieces == NULL)
+  if (x != err_ok || clipped_pieces == NULL)
     return;
 
   draw_piece = clipped_pieces;
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 23:55:02
      
     | 
| The branch, master has been updated
       via  7dc2d854f3e58680577b2bb71cd68b2b769e3025 (commit)
      from  670ce234f07f33a6ea09be3de4ceebd6d7002b7a (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
=========
 src/hid/common/draw_helpers.c |   42 ++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 41 insertions(+), 1 deletions(-)
=================
 Commit Messages
=================
commit 7dc2d854f3e58680577b2bb71cd68b2b769e3025
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Clip no-holes polygon pieces before calling fill_contour
    
    This avoids integer overflow in some HIDs (GTK, Lesstif?) when
    drawing at high zoom level. Such overflow would lead to incorrectly
    drawn polygons.
    
    It is possible that a similar bug could effect thin-drawn polygons,
    but that has not manifested its-self so far. If we were to clip these
    in the future, we need to be careful to extend the clip region
    slightly off-screen, so the outlines are not drawn.
    
    Ideally we would clip these vertices using a Sutherland-Hodgman
    clipping algorithm, then we could simply discard edges which are
    clipped completely.
:100644 100644 ded1bc8... 81fb850... M	src/hid/common/draw_helpers.c
=========
 Changes
=========
commit 7dc2d854f3e58680577b2bb71cd68b2b769e3025
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/common: Clip no-holes polygon pieces before calling fill_contour
    
    This avoids integer overflow in some HIDs (GTK, Lesstif?) when
    drawing at high zoom level. Such overflow would lead to incorrectly
    drawn polygons.
    
    It is possible that a similar bug could effect thin-drawn polygons,
    but that has not manifested its-self so far. If we were to clip these
    in the future, we need to be careful to extend the clip region
    slightly off-screen, so the outlines are not drawn.
    
    Ideally we would clip these vertices using a Sutherland-Hodgman
    clipping algorithm, then we could simply discard edges which are
    clipped completely.
diff --git a/src/hid/common/draw_helpers.c b/src/hid/common/draw_helpers.c
index ded1bc8..81fb850 100644
--- a/src/hid/common/draw_helpers.c
+++ b/src/hid/common/draw_helpers.c
@@ -63,6 +63,41 @@ static void fill_contour_cb (PLINE *pl, void *user_data)
   poly_FreeContours (&local_pl);
 }
 
+static void
+fill_clipped_contour (hidGC gc, PLINE *pl, const BoxType *clip_box)
+{
+  PLINE *pl_copy;
+  POLYAREA *clip_poly;
+  POLYAREA *piece_poly;
+  POLYAREA *clipped_pieces;
+  POLYAREA *draw_piece;
+  int x;
+
+  clip_poly = RectPoly (clip_box->X1, clip_box->X2,
+                        clip_box->Y1, clip_box->Y2);
+  poly_CopyContour (&pl_copy, pl);
+  piece_poly = ContourToPoly (pl_copy);
+  x = poly_Boolean_free (piece_poly, clip_poly,
+                         &clipped_pieces, PBO_ISECT);
+  if (x != err_ok)
+    {
+      poly_Free (&clipped_pieces);
+      return;
+    }
+
+  if (clipped_pieces == NULL)
+    return;
+
+  draw_piece = clipped_pieces;
+  do
+    {
+      /* NB: The polygon won't have any holes in it */
+      fill_contour (gc, draw_piece->contours);
+    }
+  while ((draw_piece = draw_piece->f) != clipped_pieces);
+  poly_Free (&clipped_pieces);
+}
+
 void common_fill_pcb_polygon (hidGC gc, PolygonType *poly,
                               const BoxType *clip_box)
 {
@@ -79,7 +114,12 @@ void common_fill_pcb_polygon (hidGC gc, PolygonType *poly,
       PLINE *pl;
 
       for (pl = poly->NoHoles; pl != NULL; pl = pl->next)
-        fill_contour (gc, pl);
+        {
+          if (clip_box == NULL)
+            fill_contour (gc, pl);
+          else
+            fill_clipped_contour (gc, pl, clip_box);
+        }
     }
 
   /* Draw other parts of the polygon if fullpoly flag is set */
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 14:10:05
      
     | 
| The branch, master has been updated
       via  47e06f69892e9886feda21a04a08e5edd3d74ec2 (commit)
      from  faae5572e9742bd0a8a846a9c94963f486c37b5e (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
=========
 src/polygon1.c |   28 +++++++++++++---------------
 1 files changed, 13 insertions(+), 15 deletions(-)
=================
 Commit Messages
=================
commit 47e06f69892e9886feda21a04a08e5edd3d74ec2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Tidy up label_contour() following node_label() changes
    
    Since node_label() will now only label the edge following the vertex
    passed as its argument, we can simplify label_contour() a little.
    
    By keeping a pointer to the edge where we first start successfully
    labelling the polygon, we can avoid having to complete a full loop
    around the contour after we've finished labelling.
:100644 100644 8ee6c30... eb4819d... M	src/polygon1.c
=========
 Changes
=========
commit 47e06f69892e9886feda21a04a08e5edd3d74ec2
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Tidy up label_contour() following node_label() changes
    
    Since node_label() will now only label the edge following the vertex
    passed as its argument, we can simplify label_contour() a little.
    
    By keeping a pointer to the edge where we first start successfully
    labelling the polygon, we can avoid having to complete a full loop
    around the contour after we've finished labelling.
diff --git a/src/polygon1.c b/src/polygon1.c
index 8ee6c30..eb4819d 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -946,29 +946,27 @@ static BOOLp
 label_contour (PLINE * a)
 {
   VNODE *cur = &a->head;
-  int did_label = FALSE, label = UNKNWN;
+  VNODE *first_labelled = NULL;
+  int label = UNKNWN;
 
   do
     {
-      if (cur == &a->head)
-	did_label = FALSE;
-      if (NODE_LABEL (cur) != UNKNWN)
-	{
-	  label = NODE_LABEL (cur);
-	  continue;
-	}
       if (cur->cvc_next)	/* examine cross vertex */
 	{
 	  label = node_label (cur);
-	  did_label = TRUE;
-	}
-      else if (label == INSIDE || label == OUTSIDE)
-	{
-	  LABEL_NODE (cur, label);
-	  did_label = TRUE;
+	  if (first_labelled == NULL)
+	    first_labelled = cur;
+	  continue;
 	}
+
+      if (first_labelled == NULL)
+	continue;
+
+      /* This labels nodes which aren't cross-connected */
+      assert (label == INSIDE || label == OUTSIDE);
+      LABEL_NODE (cur, label);
     }
-  while ((cur = cur->next) != &a->head || did_label);
+  while ((cur = cur->next) != first_labelled);
 #ifdef DEBUG_ALL_LABELS
   print_labels (a);
   DEBUGP ("\n\n");
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 14:09:58
      
     | 
| The branch, master has been updated
       via  cc26ae14e53d370b9e08d3950949d7ce7811ba6e (commit)
      from  47e06f69892e9886feda21a04a08e5edd3d74ec2 (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
=========
=================
 Commit Messages
=================
=========
 Changes
=========
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 14:09:54
      
     | 
| The branch, master has been updated
       via  ead902434b80f733b10248e35e12a5906e0a392a (commit)
      from  cc26ae14e53d370b9e08d3950949d7ce7811ba6e (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
=========
 src/hid/gtk/gui-top-window.c |   34 ++++++++++++++++++++++++++++------
 1 files changed, 28 insertions(+), 6 deletions(-)
=================
 Commit Messages
=================
commit ead902434b80f733b10248e35e12a5906e0a392a
Author: Patrick Bernaud <b-p...@wa...>
Commit: Peter Clifton <pc...@ca...>
    hid/gtk: Fix strncat length when building accelerator string. (CODE!)
    
    (Oops, I pushed an empty patch last time - Peter Clifton)
    
    Commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657 was not enough:
    strncat() must be given the remaining length of buffer to ensure it
    does not overflow. Plus it now emits a message in the unlikely case
    of a too small buffer for an accelerator.
:100644 100644 69e1909... c6a2e58... M	src/hid/gtk/gui-top-window.c
=========
 Changes
=========
commit ead902434b80f733b10248e35e12a5906e0a392a
Author: Patrick Bernaud <b-p...@wa...>
Commit: Peter Clifton <pc...@ca...>
    hid/gtk: Fix strncat length when building accelerator string. (CODE!)
    
    (Oops, I pushed an empty patch last time - Peter Clifton)
    
    Commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657 was not enough:
    strncat() must be given the remaining length of buffer to ensure it
    does not overflow. Plus it now emits a message in the unlikely case
    of a too small buffer for an accelerator.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 69e1909..c6a2e58 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -3110,6 +3110,7 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
   Resource *r;
   char tmps[32];
   char accel[64];
+  int accel_n;
   char *menulabel = NULL;
   char ch[2];
   char m = '\0';
@@ -3127,6 +3128,8 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 
       case 1:			/* unnamed subres */
 	accel[0] = '\0';
+	/* remaining number of chars available in accel (- 1 for '\0')*/
+	accel_n = sizeof (accel) - 1;
 	/* This is a menu choice.  The first value in the unnamed
 	 * subres is what the menu choice gets called.
 	 *
@@ -3198,17 +3201,20 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 		      }
 		    else if (strncmp (p, "Ctrl", 4) == 0)
 		      {
-			strncat (accel, "<control>", sizeof (accel) - 1);
+			strncat (accel, "<control>", accel_n);
+			accel_n -= strlen ("<control>");
 			p += 4;
 		      }
 		    else if (strncmp (p, "Shift", 5) == 0)
 		      {
-			strncat (accel, "<shift>", sizeof (accel) - 1);
+			strncat (accel, "<shift>", accel_n);
+			accel_n -= strlen ("<shift>");
 			p += 5;
 		      }
 		    else if (strncmp (p, "Alt", 3) == 0)
 		      {
-			strncat (accel, "<alt>", sizeof (accel) - 1);
+			strncat (accel, "<alt>", accel_n);
+			accel_n -= strlen ("<alt>");
 			p += 3;
 		      }
 		    else
@@ -3232,6 +3238,7 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 			  }
 			/* skip processing the rest */
 			accel[0] = '\0';
+			accel_n = sizeof (accel) - 1;
 			p += strlen (p);
 		      }
 		    break;
@@ -3239,7 +3246,8 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 		  case KEY:
 		    if (strncmp (p, "Enter", 5) == 0)
 		      {
-			strncat (accel, "Return", sizeof (accel) - 1);
+			strncat (accel, "Return", accel_n);
+			accel_n -= strlen ("Return");
 			p += 5;
 		      }
 		    else
@@ -3249,19 +3257,33 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 			  {
 			    if ( *p == key_table[j].in)
 			      {
-				strncat (accel, key_table[j].out, sizeof (accel) - 1);
+				strncat (accel, key_table[j].out, accel_n);
+				accel_n -= strlen (key_table[j].out);
 				j = n_key_table;
 			      }
 			  }
 			
 			if (j == n_key_table)
-			  strncat (accel, ch, sizeof (accel) - 1);
+			  {
+			    strncat (accel, ch, accel_n);
+			    accel_n -= strlen (ch);
+			  }
 		    
 			p++;
 		      }
 		    break;
 
 		  }
+
+		if (G_UNLIKELY (accel_n < 0))
+		  {
+		    accel_n = 0;
+		    Message ("Accelerator \"%s\" is too long to be parsed.\n", r->v[1].value);
+		    accel[0] = '\0';
+		    accel_n = 0;
+		    /* skip processing the rest */
+		    p += strlen (p);
+		  }
 	      }
 #ifdef DEBUG_MENUS
 	    printf ("\n    translated = \"%s\"\n", accel);
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 14:09:45
      
     | 
| The branch, master has been updated
       via  670ce234f07f33a6ea09be3de4ceebd6d7002b7a (commit)
      from  ead902434b80f733b10248e35e12a5906e0a392a (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
=========
 src/draw.c              |    6 +++---
 src/hid/common/flags.c  |    4 ++--
 src/hid/gerber/gerber.c |    4 ++--
 src/hid/png/png.c       |    2 +-
 src/hid/ps/ps.c         |    8 ++++----
 src/print.c             |    4 ++--
 6 files changed, 14 insertions(+), 14 deletions(-)
=================
 Commit Messages
=================
commit 670ce234f07f33a6ea09be3de4ceebd6d7002b7a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Use strcmp() for special layer names, rather than strcasecmp()
    
    Before commit 086aa491fae18f1ec72da047b772fa3510f72d0b, we were using
    strcmp() and strcasecmp() in different places. That commit changed to
    strcasecmp(). Lets choose to keep the more restrictive option for now,
    which reduces the number of "magic" layer names PCB supports.
:100644 100644 f3bb2cb... a71b1b3... M	src/draw.c
:100644 100644 8aba3ab... 3915c7a... M	src/hid/common/flags.c
:100644 100644 e33e6ef... afa6a08... M	src/hid/gerber/gerber.c
:100644 100644 c407840... 83f8976... M	src/hid/png/png.c
:100644 100644 2d96e16... e648fa1... M	src/hid/ps/ps.c
:100644 100644 1f7bc53... 3831b4a... M	src/print.c
=========
 Changes
=========
commit 670ce234f07f33a6ea09be3de4ceebd6d7002b7a
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Use strcmp() for special layer names, rather than strcasecmp()
    
    Before commit 086aa491fae18f1ec72da047b772fa3510f72d0b, we were using
    strcmp() and strcasecmp() in different places. That commit changed to
    strcasecmp(). Lets choose to keep the more restrictive option for now,
    which reduces the number of "magic" layer names PCB supports.
diff --git a/src/draw.c b/src/draw.c
index f3bb2cb..a71b1b3 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -801,7 +801,7 @@ DrawMask (BoxType * screen)
       for (i=PCB->Data->LayerN; i>=0; i--)
 	{
 	  LayerTypePtr Layer = PCB->Data->Layer + i;
-	  if (strcasecmp (Layer->Name, "outline") == 0)
+	  if (strcmp (Layer->Name, "outline") == 0)
 	    DrawLayer (Layer, screen);
 	}
     }
@@ -891,8 +891,8 @@ DrawLayerGroup (int group, const BoxType * screen)
     {
       layernum = layers[i];
       Layer = PCB->Data->Layer + layers[i];
-      if (strcasecmp (Layer->Name, "outline") == 0
-	  || strcasecmp (Layer->Name, "route") == 0)
+      if (strcmp (Layer->Name, "outline") == 0 ||
+	  strcmp (Layer->Name, "route") == 0)
 	rv = 0;
       if (layernum < max_layer && Layer->On)
 	{
diff --git a/src/hid/common/flags.c b/src/hid/common/flags.c
index 8aba3ab..3915c7a 100644
--- a/src/hid/common/flags.c
+++ b/src/hid/common/flags.c
@@ -185,8 +185,8 @@ layer_type_to_file_name (int idx)
       else if (group == GetLayerGroupNumberByNumber(max_layer+SOLDER_LAYER))
 	return "back";
       else if (PCB->LayerGroups.Number[group] == 1
-	       && (strcasecmp (PCB->Data->Layer[idx].Name, "route") == 0
-		   || strcasecmp (PCB->Data->Layer[idx].Name, "outline") == 0))
+	       && (strcmp (PCB->Data->Layer[idx].Name, "route") == 0 ||
+		   strcmp (PCB->Data->Layer[idx].Name, "outline") == 0))
 	return "outline";
       else
 	{
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index e33e6ef..afa6a08 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -467,8 +467,8 @@ gerber_set_layer (const char *name, int group, int empty)
     return 0;
 
   flash_drills = 0;
-  if (strcasecmp (name, "outline") == 0
-      || strcasecmp (name, "route") == 0)
+  if (strcmp (name, "outline") == 0 ||
+      strcmp (name, "route") == 0)
     flash_drills = 1;
 
   if (is_drill && n_pending_drills)
diff --git a/src/hid/png/png.c b/src/hid/png/png.c
index c407840..83f8976 100644
--- a/src/hid/png/png.c
+++ b/src/hid/png/png.c
@@ -923,7 +923,7 @@ png_set_layer (const char *name, int group, int empty)
 	  if (idx < 0)
 	    return 0;
 
-	  if (strcasecmp (name, "outline") == 0)
+	  if (strcmp (name, "outline") == 0)
 	    photo_im = &photo_outline;
 	  else
 	    photo_im = photo_copper + group;
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 2d96e16..e648fa1 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -377,8 +377,8 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
       if (layer->LineN || layer->TextN || layer->ArcN || layer->PolygonN)
 	print_group[GetLayerGroupNumberByNumber (i)] = 1;
 
-      if (strcasecmp (layer->Name, "outline") == 0
-	  || strcasecmp (layer->Name, "route") == 0)
+      if (strcmp (layer->Name, "outline") == 0 ||
+	  strcmp (layer->Name, "route") == 0)
 	{
 	  printf("see outline layer\n");
 	  outline_layer = layer;
@@ -704,8 +704,8 @@ ps_set_layer (const char *name, int group, int empty)
       && outline_layer
       && outline_layer != PCB->Data->Layer+idx
       && SL_TYPE (idx) == 0 /* copper */
-      && strcasecmp (name, "outline")
-      && strcasecmp (name, "route"))
+      && strcmp (name, "outline")
+      && strcmp (name, "route"))
     {
       printf("attempting to draw outlines on %s\n", name);
       DrawLayer (outline_layer, ®ion);
diff --git a/src/print.c b/src/print.c
index 1f7bc53..3831b4a 100644
--- a/src/print.c
+++ b/src/print.c
@@ -298,9 +298,9 @@ PrintFab (void)
       LayerType *l = LAYER_PTR (i);
       if (l->Name && (l->LineN || l->ArcN))
 	{
-	  if (strcasecmp ("route", l->Name) == 0)
+	  if (strcmp ("route", l->Name) == 0)
 	    break;
-	  if (strcasecmp ("outline", l->Name) == 0)
+	  if (strcmp ("outline", l->Name) == 0)
 	    break;
 	}
     }
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 02:14:49
      
     | 
| The branch, master has been updated
       via  faae5572e9742bd0a8a846a9c94963f486c37b5e (commit)
      from  086aa491fae18f1ec72da047b772fa3510f72d0b (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
=========
 src/draw.c    |    3 +++
 src/find.c    |   18 ++++++++----------
 src/polygon.c |    4 ++++
 3 files changed, 15 insertions(+), 10 deletions(-)
=================
 Commit Messages
=================
commit faae5572e9742bd0a8a846a9c94963f486c37b5e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Correct rendering and connectivity checks for zero clearance pads and pins
    
    NB: These areren't technically allowed by PCB, but it is nice that when a
    user hacks zero clearance in their PCB file, that we:
    
    a) Draw polygons without any cleared gaps in the output
    b) Correctly determine that these objects will be connected to the polygon
:100644 100644 3756955... f3bb2cb... M	src/draw.c
:100644 100644 e22d5cc... b24512a... M	src/find.c
:100644 100644 e9fc3df... 71cfd60... M	src/polygon.c
=========
 Changes
=========
commit faae5572e9742bd0a8a846a9c94963f486c37b5e
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Correct rendering and connectivity checks for zero clearance pads and pins
    
    NB: These areren't technically allowed by PCB, but it is nice that when a
    user hacks zero clearance in their PCB file, that we:
    
    a) Draw polygons without any cleared gaps in the output
    b) Correctly determine that these objects will be connected to the polygon
diff --git a/src/draw.c b/src/draw.c
index 3756955..f3bb2cb 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1349,6 +1349,9 @@ DrawPadLowLevel (hidGC gc, PadTypePtr Pad, Boolean clear, Boolean mask)
       return;
     }
 
+  if (clear && !mask && Pad->Clearance <= 0)
+    return;
+
   if (TEST_FLAG (THINDRAWFLAG, PCB) ||
       (clear && TEST_FLAG (THINDRAWPOLYFLAG, PCB)))
     {
diff --git a/src/find.c b/src/find.c
index e22d5cc..b24512a 100644
--- a/src/find.c
+++ b/src/find.c
@@ -2287,7 +2287,8 @@ LOCtoPadPoly_callback (const BoxType * b, void *cl)
   struct lo_info *i = (struct lo_info *) cl;
 
 
-  if (!TEST_FLAG (TheFlag, polygon) && !TEST_FLAG (CLEARPOLYFLAG, polygon))
+  if (!TEST_FLAG (TheFlag, polygon) &&
+      (!TEST_FLAG (CLEARPOLYFLAG, polygon) || !i->pad.Clearance))
     {
       if (IsPadInPolygon (&i->pad, polygon) &&
           ADD_POLYGON_TO_LIST (i->layer, polygon))
@@ -2532,15 +2533,12 @@ LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
         }
       else
         {
-          if (!TEST_FLAG (CLEARPOLYFLAG, Polygon))
-            {
-              info.layer = layer - max_layer;
-              if (setjmp (info.env) == 0)
-                r_search (PCB->Data->pad_tree, (BoxType *) & info.polygon,
-                          NULL, LOCtoPolyPad_callback, &info);
-              else
-                return True;
-            }
+          info.layer = layer - max_layer;
+          if (setjmp (info.env) == 0)
+            r_search (PCB->Data->pad_tree, (BoxType *) & info.polygon,
+                      NULL, LOCtoPolyPad_callback, &info);
+          else
+            return True;
         }
     }
   return (False);
diff --git a/src/polygon.c b/src/polygon.c
index e9fc3df..71cfd60 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -743,6 +743,8 @@ SubtractPad (PadType * pad, PolygonType * p)
 {
   POLYAREA *np = NULL;
 
+  if (pad->Clearance == 0)
+    return 0;
   if (TEST_FLAG (SQUAREFLAG, pad))
     {
       if (!
@@ -812,6 +814,8 @@ pad_sub_callback (const BoxType * b, void *cl)
   /* don't subtract the object that was put back! */
   if (b == info->other)
     return 0;
+  if (pad->Clearance == 0)
+    return 0;
   polygon = info->polygon;
   if (XOR (TEST_FLAG (ONSOLDERFLAG, pad), !info->solder))
     {
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 00:59:51
      
     | 
| The branch, master has been updated
       via  086aa491fae18f1ec72da047b772fa3510f72d0b (commit)
      from  4c90b8fe7bdd6f3ceb78e871a18c81dc8dd291e8 (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
=========
 src/draw.c              |    4 ++--
 src/hid/gerber/gerber.c |    4 ++--
 src/hid/ps/ps.c         |    8 ++++----
 3 files changed, 8 insertions(+), 8 deletions(-)
=================
 Commit Messages
=================
commit 086aa491fae18f1ec72da047b772fa3510f72d0b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Use strcasecmp when looking for the "outline" or "route" layer
    
    A some cases previously used strcmp, leading to inconsistencies
    in our handling of these "special" layers.
:100644 100644 1d902b2... 3756955... M	src/draw.c
:100644 100644 e68026d... e33e6ef... M	src/hid/gerber/gerber.c
:100644 100644 d7e0371... 2d96e16... M	src/hid/ps/ps.c
=========
 Changes
=========
commit 086aa491fae18f1ec72da047b772fa3510f72d0b
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Use strcasecmp when looking for the "outline" or "route" layer
    
    A some cases previously used strcmp, leading to inconsistencies
    in our handling of these "special" layers.
diff --git a/src/draw.c b/src/draw.c
index 1d902b2..3756955 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -891,8 +891,8 @@ DrawLayerGroup (int group, const BoxType * screen)
     {
       layernum = layers[i];
       Layer = PCB->Data->Layer + layers[i];
-      if (strcmp (Layer->Name, "outline") == 0
-	  || strcmp (Layer->Name, "route") == 0)
+      if (strcasecmp (Layer->Name, "outline") == 0
+	  || strcasecmp (Layer->Name, "route") == 0)
 	rv = 0;
       if (layernum < max_layer && Layer->On)
 	{
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index e68026d..e33e6ef 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -467,8 +467,8 @@ gerber_set_layer (const char *name, int group, int empty)
     return 0;
 
   flash_drills = 0;
-  if (strcmp (name, "outline") == 0
-      || strcmp (name, "route") == 0)
+  if (strcasecmp (name, "outline") == 0
+      || strcasecmp (name, "route") == 0)
     flash_drills = 1;
 
   if (is_drill && n_pending_drills)
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index d7e0371..2d96e16 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -377,8 +377,8 @@ ps_hid_export_to_file (FILE * the_file, HID_Attr_Val * options)
       if (layer->LineN || layer->TextN || layer->ArcN || layer->PolygonN)
 	print_group[GetLayerGroupNumberByNumber (i)] = 1;
 
-      if (strcmp (layer->Name, "outline") == 0
-	  || strcmp (layer->Name, "route") == 0)
+      if (strcasecmp (layer->Name, "outline") == 0
+	  || strcasecmp (layer->Name, "route") == 0)
 	{
 	  printf("see outline layer\n");
 	  outline_layer = layer;
@@ -704,8 +704,8 @@ ps_set_layer (const char *name, int group, int empty)
       && outline_layer
       && outline_layer != PCB->Data->Layer+idx
       && SL_TYPE (idx) == 0 /* copper */
-      && strcmp (name, "outline")
-      && strcmp (name, "route"))
+      && strcasecmp (name, "outline")
+      && strcasecmp (name, "route"))
     {
       printf("attempting to draw outlines on %s\n", name);
       DrawLayer (outline_layer, ®ion);
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 00:55:12
      
     | 
| The branch, master has been updated
       via  4c90b8fe7bdd6f3ceb78e871a18c81dc8dd291e8 (commit)
      from  7186efa74e656913be2f7183baf5cbbc38f98d80 (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
=========
 src/polygon.c |    1 -
 1 files changed, 0 insertions(+), 1 deletions(-)
=================
 Commit Messages
=================
commit 4c90b8fe7bdd6f3ceb78e871a18c81dc8dd291e8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon.c: Remove unused #define COARSE_CIRCLE 0
:100644 100644 4a4392f... e9fc3df... M	src/polygon.c
=========
 Changes
=========
commit 4c90b8fe7bdd6f3ceb78e871a18c81dc8dd291e8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon.c: Remove unused #define COARSE_CIRCLE 0
diff --git a/src/polygon.c b/src/polygon.c
index 4a4392f..e9fc3df 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -322,7 +322,6 @@ frac_circle (PLINE * c, LocationType X, LocationType Y, Vector v, int range)
     }
 }
 
-#define COARSE_CIRCLE 0
 /* create a circle approximation from lines */
 POLYAREA *
 CirclePoly (LocationType x, LocationType y, BDimension radius)
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 00:44:51
      
     | 
| The branch, master has been updated
       via  7186efa74e656913be2f7183baf5cbbc38f98d80 (commit)
      from  2682a6fdbae39859190e1527150464412e37c8eb (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
=========
 src/polygon.c |   49 +++++++++++++++++++++----------------------------
 1 files changed, 21 insertions(+), 28 deletions(-)
=================
 Commit Messages
=================
commit 7186efa74e656913be2f7183baf5cbbc38f98d80
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Speed up unsubtraction from polygons when objects are deleted
    
    This process worked by adding a new "blob" of polygon to cover in the
    hole made by the object being deleted. If this "blob" intersected the
    contour of the original polygon, it would cause the polygon's contour
    to be damaged. To avoid this, the unsubract code would always clip the
    resulting polygon against the original (pristine) polygon contour.
    
    Unfortunately.. this clipping operation is gauranteed to intersect the
    contour of the polygon - a very expensive operation, since all holes
    inside the polygon (many on a complex board) have to be re-processed.
    
    This speed-up is achieved by reversing the order of operation. The
    "blob" to be added to the polygon is first clipped against the pristine
    contour (a relatively cheap operation). This then allows us to add the
    new clipped blob to the more complex polygon on the board without worry
    that the contour may be compromised.
:100644 100644 6c34bc1... 4a4392f... M	src/polygon.c
=========
 Changes
=========
commit 7186efa74e656913be2f7183baf5cbbc38f98d80
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Speed up unsubtraction from polygons when objects are deleted
    
    This process worked by adding a new "blob" of polygon to cover in the
    hole made by the object being deleted. If this "blob" intersected the
    contour of the original polygon, it would cause the polygon's contour
    to be damaged. To avoid this, the unsubract code would always clip the
    resulting polygon against the original (pristine) polygon contour.
    
    Unfortunately.. this clipping operation is gauranteed to intersect the
    contour of the polygon - a very expensive operation, since all holes
    inside the polygon (many on a complex board) have to be re-processed.
    
    This speed-up is achieved by reversing the order of operation. The
    "blob" to be added to the polygon is first clipped against the pristine
    contour (a relatively cheap operation). This then allows us to add the
    new clipped blob to the more complex polygon on the board without worry
    that the contour may be compromised.
diff --git a/src/polygon.c b/src/polygon.c
index 6c34bc1..4a4392f 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -235,28 +235,6 @@ original_poly (PolygonType * p)
   return biggest (np);
 }
 
-static int
-ClipOriginal (PolygonType * poly)
-{
-  POLYAREA *p, *result;
-  int r;
-
-  p = original_poly (poly);
-  r = poly_Boolean_free (poly->Clipped, p, &result, PBO_ISECT);
-  if (r != err_ok)
-    {
-      fprintf (stderr, "Error while clipping PBO_ISECT: %d\n", r);
-      poly_Free (&result);
-      poly->Clipped = NULL;
-      if (poly->NoHoles) printf ("Just leaked in ClipOriginal\n");
-      poly->NoHoles = NULL;
-      return 0;
-    }
-  poly->Clipped = biggest (result);
-  assert (!poly->Clipped || poly_Valid (poly->Clipped));
-  return 1;
-}
-
 POLYAREA *
 RectPoly (LocationType x1, LocationType x2, LocationType y1, LocationType y2)
 {
@@ -942,22 +920,37 @@ static int
 Unsubtract (POLYAREA * np1, PolygonType * p)
 {
   POLYAREA *merged = NULL, *np = np1;
+  POLYAREA *orig_poly, *clipped_np;
   int x;
   assert (np);
   assert (p && p->Clipped);
-  x = poly_Boolean_free (p->Clipped, np, &merged, PBO_UNITE);
+
+  orig_poly = original_poly (p);
+
+  x = poly_Boolean_free (np, orig_poly, &clipped_np, PBO_ISECT);
+  if (x != err_ok)
+    {
+      fprintf (stderr, "Error while clipping PBO_ISECT: %d\n", x);
+      poly_Free (&clipped_np);
+      goto fail;
+    }
+
+  x = poly_Boolean_free (p->Clipped, clipped_np, &merged, PBO_UNITE);
   if (x != err_ok)
     {
       fprintf (stderr, "Error while clipping PBO_UNITE: %d\n", x);
       poly_Free (&merged);
-      p->Clipped = NULL;
-      if (p->NoHoles) printf ("Just leaked in Unsubtract\n");
-      p->NoHoles = NULL;
-      return 0;
+      goto fail;
     }
   p->Clipped = biggest (merged);
   assert (!p->Clipped || poly_Valid (p->Clipped));
-  return ClipOriginal (p);
+  return 1;
+
+fail:
+  p->Clipped = NULL;
+  if (p->NoHoles) printf ("Just leaked in Unsubtract\n");
+  p->NoHoles = NULL;
+  return 0;
 }
 
 static int
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 00:44:46
      
     | 
| The branch, master has been updated
       via  2682a6fdbae39859190e1527150464412e37c8eb (commit)
      from  71f29218994b8da19665bbb09f4e9d1213231047 (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
=========
 src/file.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)
=================
 Commit Messages
=================
commit 2682a6fdbae39859190e1527150464412e37c8eb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    file.c: Add profiling of CPU seconds consumed during file load
    
    This information is useful to benchmark the load of complex boards
    which consume a lot of CPU cycles clipping polygons during loading.
    
    Adding this upstream will allow me to gain information from users
    describing load slowness, without having a copy their design.
:100644 100644 dce31a8... 4cef71f... M	src/file.c
=========
 Changes
=========
commit 2682a6fdbae39859190e1527150464412e37c8eb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    file.c: Add profiling of CPU seconds consumed during file load
    
    This information is useful to benchmark the load of complex boards
    which consume a lot of CPU cycles clipping polygons during loading.
    
    Adding this upstream will allow me to gain information from users
    describing load slowness, without having a copy their design.
diff --git a/src/file.c b/src/file.c
index dce31a8..4cef71f 100644
--- a/src/file.c
+++ b/src/file.c
@@ -350,6 +350,10 @@ LoadPCB (char *Filename)
 {
   PCBTypePtr newPCB = CreateNewPCB (False);
   Boolean units_mm;
+  clock_t start, end;
+  double elapsed;
+
+  start = clock ();
 
   /* new data isn't added to the undo list */
   if (!ParsePCB (newPCB, Filename))
@@ -395,6 +399,11 @@ LoadPCB (char *Filename)
 
       hid_action ("PCBChanged");
 
+      end = clock ();
+      elapsed = ((double) (end - start)) / CLOCKS_PER_SEC;
+      gui->log ("Loading file %s took %f seconds of CPU time\n",
+		Filename, elapsed);
+
       return (0);
     }
   hid_action ("PCBChanged");
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-12 00:03:57
      
     | 
| The branch, master has been updated
       via  71f29218994b8da19665bbb09f4e9d1213231047 (commit)
      from  dbcbb88e326ae882c51063733ad5e98a5ea48014 (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
=========
 src/hid/ps/ps.c |   31 ++++++++++++++++++++++++++++++-
 1 files changed, 30 insertions(+), 1 deletions(-)
=================
 Commit Messages
=================
commit 71f29218994b8da19665bbb09f4e9d1213231047
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/ps: Don't use diced polygons for postscript output
    
    This speeds up postscript output on boards with complex polygons.
    
    It has the added advantage for some postscript and pdf readers
    that there are no accidental gaps rendered between pieces of the
    diced polygon due to non-global anti-aliasing in their renderer.
:100644 100644 fdbf7ac... d7e0371... M	src/hid/ps/ps.c
=========
 Changes
=========
commit 71f29218994b8da19665bbb09f4e9d1213231047
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/ps: Don't use diced polygons for postscript output
    
    This speeds up postscript output on boards with complex polygons.
    
    It has the added advantage for some postscript and pdf readers
    that there are no accidental gaps rendered between pieces of the
    diced polygon due to non-global anti-aliasing in their renderer.
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index fdbf7ac..d7e0371 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -945,6 +945,35 @@ ps_fill_polygon (hidGC gc, int n_coords, int *x, int *y)
 }
 
 static void
+ps_fill_pcb_polygon (hidGC gc, PolygonType * poly, const BoxType * clip_box)
+{
+  /* Ignore clip_box, just draw everything */
+
+  VNODE *v;
+  PLINE *pl;
+  char *op;
+
+  use_gc (gc);
+
+  pl = poly->Clipped->contours;
+
+  do
+    {
+      v = pl->head.next;
+      op = "moveto";
+      do
+	{
+	  fprintf (f, "%d %d %s\n", v->point[0], v->point[1], op);
+	  op = "lineto";
+	}
+      while ((v = v->next) != pl->head.next);
+    }
+  while ((pl = pl->next) != NULL);
+
+  fprintf (f, "fill\n");
+}
+
+static void
 ps_fill_rect (hidGC gc, int x1, int y1, int x2, int y2)
 {
   use_gc (gc);
@@ -1175,7 +1204,7 @@ HID ps_hid = {
   ps_draw_rect,
   ps_fill_circle,
   ps_fill_polygon,
-  common_fill_pcb_polygon,
+  ps_fill_pcb_polygon,
   0 /* ps_thindraw_pcb_polygon */,
   ps_fill_rect,
   ps_calibrate,
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-11 23:54:30
      
     | 
| The branch, master has been updated
       via  dbcbb88e326ae882c51063733ad5e98a5ea48014 (commit)
       via  d5d894d977e610308d6ec36a3670cf3c94a8b015 (commit)
      from  64c875b0662e285dc101e7b2a0392a4c743c8700 (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
=========
 src/polygon.c |    9 +++++----
 1 files changed, 5 insertions(+), 4 deletions(-)
=================
 Commit Messages
=================
commit dbcbb88e326ae882c51063733ad5e98a5ea48014
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Play with number of line segments in line caps
    
    By changing from 36 lines-segments per circle to 40, we create a symmetry
    at 45 degrees - a common angle for lines on a circuit board to intersect
    at. This avoids building additional complexity in the polygons which are
    cut by these intersections.
:100644 100644 f0b26af... 6c34bc1... M	src/polygon.c
commit d5d894d977e610308d6ec36a3670cf3c94a8b015
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Fixup frac_circle to avoid repeating a vertex the caller will add
    
    Before we were getting self-intersecting polygons in some cases,
    a big no-no. One less vertex should be added than the expected
    (CIRC_SEGS / range), since the caller adds the last vertex.
:100644 100644 0c8c0cb... f0b26af... M	src/polygon.c
=========
 Changes
=========
commit dbcbb88e326ae882c51063733ad5e98a5ea48014
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Play with number of line segments in line caps
    
    By changing from 36 lines-segments per circle to 40, we create a symmetry
    at 45 degrees - a common angle for lines on a circuit board to intersect
    at. This avoids building additional complexity in the polygons which are
    cut by these intersections.
diff --git a/src/polygon.c b/src/polygon.c
index f0b26af..6c34bc1 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -114,10 +114,10 @@ RCSID ("$Id$");
  * local prototypes
  */
 
-#define CIRC_SEGS 36
+#define CIRC_SEGS 40
 static double circleVerticies[] = {
   1.0, 0.0,
-  0.98480775301221, 0.17364817766693,
+  0.98768834059513777, 0.15643446504023087,
 };
 
 static void
@@ -345,7 +345,7 @@ frac_circle (PLINE * c, LocationType X, LocationType Y, Vector v, int range)
 }
 
 #define COARSE_CIRCLE 0
-/* create a 35-vertex circle approximation */
+/* create a circle approximation from lines */
 POLYAREA *
 CirclePoly (LocationType x, LocationType y, BDimension radius)
 {
commit d5d894d977e610308d6ec36a3670cf3c94a8b015
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Fixup frac_circle to avoid repeating a vertex the caller will add
    
    Before we were getting self-intersecting polygons in some cases,
    a big no-no. One less vertex should be added than the expected
    (CIRC_SEGS / range), since the caller adds the last vertex.
diff --git a/src/polygon.c b/src/polygon.c
index 0c8c0cb..f0b26af 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -330,7 +330,8 @@ frac_circle (PLINE * c, LocationType X, LocationType Y, Vector v, int range)
   e1 = v[0] - X;
   e2 = v[1] - Y;
 
-  range = range == 1 ? CIRC_SEGS-1 : (CIRC_SEGS / range);
+  /* NB: the caller adds the last vertex, hence the -1 */
+  range = CIRC_SEGS / range - 1;
   for (i = 0; i < range; i++)
     {
       /* rotate the vector */
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-11 23:31:14
      
     | 
| The branch, master has been updated
       via  64c875b0662e285dc101e7b2a0392a4c743c8700 (commit)
       via  7fb579af50cd41e1bb50a12af4d59003f90f0bbb (commit)
       via  dc9052b1b4976c3dee3e39290b03ed8da94a7a63 (commit)
      from  1099c473dc24b8c1567261235ae3f4916b47cfc7 (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
=========
 src/polygon1.c |   29 +++++++++++++++--------------
 1 files changed, 15 insertions(+), 14 deletions(-)
=================
 Commit Messages
=================
commit 64c875b0662e285dc101e7b2a0392a4c743c8700
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: #ifdef DEBUG_ALL_LABELS build print_labels()
    
    Avoids warnings when building with DEBUG defined, but without
    DEBUG_ALL_LABELS.
:100644 100644 30b6c34... 8ee6c30... M	src/polygon1.c
commit 7fb579af50cd41e1bb50a12af4d59003f90f0bbb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Tidy up poly_Valid debug print routines to match pline_dump
    
    Avoids a superfluous line:
    
    %d %d 10 10 ""]
    
    at the beginning of each output block.
:100644 100644 44b3ae7... 30b6c34... M	src/polygon1.c
commit dc9052b1b4976c3dee3e39290b03ed8da94a7a63
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Fixup pline_dump() (debug code) to match correct edge state
    
    The old code would mistakenly annotate with the edge state for the next
    edge. From polygon1.c:
    
    /* note that a vertex v's Flags.status represents the edge defined by
     * v to v->next (i.e. the edge is forward of v)
     */
:100644 100644 f8e711e... 44b3ae7... M	src/polygon1.c
=========
 Changes
=========
commit 64c875b0662e285dc101e7b2a0392a4c743c8700
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: #ifdef DEBUG_ALL_LABELS build print_labels()
    
    Avoids warnings when building with DEBUG defined, but without
    DEBUG_ALL_LABELS.
diff --git a/src/polygon1.c b/src/polygon1.c
index 30b6c34..8ee6c30 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -919,6 +919,7 @@ theState (VNODE * v)
     }
 }
 
+#ifdef DEBUG_ALL_LABELS
 static void
 print_labels (PLINE * a)
 {
@@ -932,6 +933,7 @@ print_labels (PLINE * a)
   while ((c = c->next) != &a->head);
 }
 #endif
+#endif
 
 /*
 label_contour
commit 7fb579af50cd41e1bb50a12af4d59003f90f0bbb
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Tidy up poly_Valid debug print routines to match pline_dump
    
    Avoids a superfluous line:
    
    %d %d 10 10 ""]
    
    at the beginning of each output block.
diff --git a/src/polygon1.c b/src/polygon1.c
index 44b3ae7..30b6c34 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -2386,7 +2386,7 @@ poly_Valid (POLYAREA * p)
   if (p->contours->Flags.orient == PLF_INV || poly_ChkContour (p->contours))
     {
 #ifndef NDEBUG
-      VNODE *v;
+      VNODE *v, *n;
       DEBUGP ("Invalid Outer PLINE\n");
       if (p->contours->Flags.orient == PLF_INV)
 	DEBUGP ("failed orient\n");
@@ -2395,8 +2395,9 @@ poly_Valid (POLYAREA * p)
       v = &p->contours->head;
       do
 	{
-	  fprintf (stderr, "%d %d 100 100 \"\"]\n", v->point[0], v->point[1]);
-	  fprintf (stderr, "Line [%d %d ", v->point[0], v->point[1]);
+	  n = v->next;
+	  fprintf (stderr, "Line [%d %d %d %d 100 100 \"\"]\n",
+		   v->point[0], v->point[1], n->point[0], n->point[1]);
 	}
       while ((v = v->next) != &p->contours->head);
 #endif
@@ -2408,7 +2409,7 @@ poly_Valid (POLYAREA * p)
 	  poly_ChkContour (c) || !poly_ContourInContour (p->contours, c))
 	{
 #ifndef NDEBUG
-	  VNODE *v;
+	  VNODE *v, *n;
 	  DEBUGP ("Invalid Inner PLINE orient = %d\n", c->Flags.orient);
 	  if (c->Flags.orient == PLF_DIR)
 	    DEBUGP ("failed orient\n");
@@ -2419,9 +2420,9 @@ poly_Valid (POLYAREA * p)
 	  v = &c->head;
 	  do
 	    {
-	      fprintf (stderr, "%d %d 100 100 \"\"]\n", v->point[0],
-		       v->point[1]);
-	      fprintf (stderr, "Line [%d %d ", v->point[0], v->point[1]);
+	      n = v->next;
+	      fprintf (stderr, "Line [%d %d %d %d 100 100 \"\"]\n",
+		       v->point[0], v->point[1], n->point[0], n->point[1]);
 	    }
 	  while ((v = v->next) != &c->head);
 #endif
commit dc9052b1b4976c3dee3e39290b03ed8da94a7a63
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Fixup pline_dump() (debug code) to match correct edge state
    
    The old code would mistakenly annotate with the edge state for the next
    edge. From polygon1.c:
    
    /* note that a vertex v's Flags.status represents the edge defined by
     * v to v->next (i.e. the edge is forward of v)
     */
diff --git a/src/polygon1.c b/src/polygon1.c
index f8e711e..44b3ae7 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -131,19 +131,17 @@ static char *theState (VNODE * v);
 static void
 pline_dump (VNODE * v)
 {
-  VNODE *s;
+  VNODE *s, *n;
 
   s = v;
   do
     {
-      if (v != s)
-	fprintf (stderr, "%d %d 10 10 \"%s\"]\n", v->point[0], v->point[1],
-		 theState (v));
-      fprintf (stderr, "Line [%d %d ", v->point[0], v->point[1]);
+      n = v->next;
+      fprintf (stderr, "Line [%d %d %d %d 10 10 \"%s\"]\n",
+	       v->point[0], v->point[1],
+	       n->point[0], n->point[1], theState (v));
     }
   while ((v = v->next) != s);
-  fprintf (stderr, "%d %d 10 10 \"%s\"]\n", v->point[0], v->point[1],
-	   theState (v));
   fprintf (stderr, "NEXT PLINE\n");
 }
 
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-11 17:26:39
      
     | 
| The branch, master has been updated
       via  1099c473dc24b8c1567261235ae3f4916b47cfc7 (commit)
      from  4082c9b12655bd5a5e77bf4ecd2755034079b0b8 (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
=========
 src/polygon1.c |  127 +++++++++++++++++++-------------------------------------
 1 files changed, 43 insertions(+), 84 deletions(-)
=================
 Commit Messages
=================
commit 1099c473dc24b8c1567261235ae3f4916b47cfc7
Author: Harry Eaton <hac...@us...>
Commit: Peter Clifton <pc...@ca...>
    Re-write node_label() to only label the edge being passed as its argument.
    
    Breifly, the old code tried to walk the entire CVCList labeling
    multiple edges. The new code tries only to label the argument vertex
    i.e. the forward ('N') edge from this vertex. It tries to look
    counter-clockwise just one edge which will give the answer in most
    cases. If that fails it looks further into the CVCList until it can
    find the answer, then stops. The code is much simpler because we know
    that the edge we are labeling is always departing the cross-vertex
    point.
    
    
    (Futher comments and original bug diagnosis by Peter Clifton)
    
    This prevents "double labeling", where the old routine could label any
    edges which intersect at the vertex passed to node_label().
    
    This fixes a bug discovered by Stefan Salewski, where certain boards
    could trigger an assert failure when PCB was built with debugging.
    
    
    The bug, it would seem - is relating to the way (and order) we were
    labeling edges of polygon contours:
    
    2
    |/\     In this diagram, x is on the outer contour of our polygon,
    x  |    and is in fact two vertices at the same point, lets denote
    |\/     these as |\ and |/
    1
    
    The labelling algorithm works up from point 1, gets to |\, whereupon it
    gets the CVCList for the spatial point x - which contains |\ AND |/
    along with the (shared) edges from the clipping contour.
    
    node_label is called with the |\ vertex, but in the process of scanning
    the CVCList at this point, it also checks for SHARED edges. It _only_
    checks shared edges against the |\ vertex, NOT the |/ one.
    
    During this pass, the | edge coming from the |/ vertex gets mis-labelled
    as "OUTSIDE", where is should eventually get labelled "SHARED"
    
    BUG:
    
    We then skip over calling node_label with the |/ vertex, since | has
    already been labelled. We next get to point 2.
    
    Point 2 looks at the | edge, and declares it to be "INSIDE". (It should
    already have been labelled "SHARED" by this point, so node_label doesn't
    know any better.
    
    The | edge is already labelled "OUTSIDE" when we go to label it
    "INSIDE".. assertion fail.
    
    This commit avoids missing the correct labelling of shared edges, by
    ensuring we never label any edges in advance of calling node_label
    for them.
:100644 100644 3b01bea... f8e711e... M	src/polygon1.c
=========
 Changes
=========
commit 1099c473dc24b8c1567261235ae3f4916b47cfc7
Author: Harry Eaton <hac...@us...>
Commit: Peter Clifton <pc...@ca...>
    Re-write node_label() to only label the edge being passed as its argument.
    
    Breifly, the old code tried to walk the entire CVCList labeling
    multiple edges. The new code tries only to label the argument vertex
    i.e. the forward ('N') edge from this vertex. It tries to look
    counter-clockwise just one edge which will give the answer in most
    cases. If that fails it looks further into the CVCList until it can
    find the answer, then stops. The code is much simpler because we know
    that the edge we are labeling is always departing the cross-vertex
    point.
    
    
    (Futher comments and original bug diagnosis by Peter Clifton)
    
    This prevents "double labeling", where the old routine could label any
    edges which intersect at the vertex passed to node_label().
    
    This fixes a bug discovered by Stefan Salewski, where certain boards
    could trigger an assert failure when PCB was built with debugging.
    
    
    The bug, it would seem - is relating to the way (and order) we were
    labeling edges of polygon contours:
    
    2
    |/\     In this diagram, x is on the outer contour of our polygon,
    x  |    and is in fact two vertices at the same point, lets denote
    |\/     these as |\ and |/
    1
    
    The labelling algorithm works up from point 1, gets to |\, whereupon it
    gets the CVCList for the spatial point x - which contains |\ AND |/
    along with the (shared) edges from the clipping contour.
    
    node_label is called with the |\ vertex, but in the process of scanning
    the CVCList at this point, it also checks for SHARED edges. It _only_
    checks shared edges against the |\ vertex, NOT the |/ one.
    
    During this pass, the | edge coming from the |/ vertex gets mis-labelled
    as "OUTSIDE", where is should eventually get labelled "SHARED"
    
    BUG:
    
    We then skip over calling node_label with the |/ vertex, since | has
    already been labelled. We next get to point 2.
    
    Point 2 looks at the | edge, and declares it to be "INSIDE". (It should
    already have been labelled "SHARED" by this point, so node_label doesn't
    know any better.
    
    The | edge is already labelled "OUTSIDE" when we go to label it
    "INSIDE".. assertion fail.
    
    This commit avoids missing the correct labelling of shared edges, by
    ensuring we never label any edges in advance of calling node_label
    for them.
diff --git a/src/polygon1.c b/src/polygon1.c
index 3b01bea..f8e711e 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -388,108 +388,67 @@ node_label (VNODE * pn)
   int region = UNKNWN;
 
   assert (pn);
-  assert (pn->cvc_prev);
-  this_poly = pn->cvc_prev->poly;
-  /* search clockwise in the cross vertex connectivity (CVC) list
+  assert (pn->cvc_next);
+  this_poly = pn->cvc_next->poly;
+  /* search counter-clockwise in the cross vertex connectivity (CVC) list
    *
-   * check for shared edges, and check if our edges
-   * are ever found between the other poly's entry and exit
+   * check for shared edges (that could be prev or next in the list since the angles are equal)
+   * and check if this edge (pn -> pn->next) is found between the other poly's entry and exit
    */
-#ifdef DEBUG_LABEL
-  DEBUGP ("CVCLIST for point (%d,%d)\n", pn->point[0], pn->point[1]);
-#endif
-  /* first find whether we're starting inside or outside */
-  for (l = pn->cvc_prev->prev; l != pn->cvc_prev; l = l->prev)
+  if (pn->cvc_next->angle == pn->cvc_next->prev->angle)
     {
-      if (l->poly != this_poly)
-	{
-	  if (l->side == 'P')
-	    region = INSIDE;
-	  else
-	    region = OUTSIDE;
-	}
+      l = pn->cvc_next->prev;
+      assert (l->poly != this_poly);
     }
-  l = pn->cvc_prev;
-  do
+  else
+    l = pn->cvc_next->next;
+  assert (l && l->angle >= 0 && l->angle <= 4.0);
+  if (l->poly != this_poly)
     {
-      assert (l->angle >= 0 && l->angle <= 4.0);
-#ifdef DEBUG_LABEL
-      DEBUGP ("  poly %c side %c angle = %g\n", l->poly, l->side, l->angle);
-#endif
-      if (l->poly != this_poly)
+      if (l->side == 'P')
 	{
-	  if (l->side == 'P')
+	  if (l->parent->prev->point[0] == pn->next->point[0] &&
+	      l->parent->prev->point[1] == pn->next->point[1])
 	    {
-	      region = INSIDE;
-	      if (l->parent->prev->point[0] == pn->prev->point[0] &&
-		  l->parent->prev->point[1] == pn->prev->point[1])
-		{
-		  LABEL_NODE (pn->prev, SHARED);	/* incoming is shared */
-		  pn->prev->shared = l->parent->prev;
-		}
-	      else if (l->parent->prev->point[0] == pn->next->point[0] &&
-		       l->parent->prev->point[1] == pn->next->point[1])
-		{
-		  LABEL_NODE (pn, SHARED2);	/* outgoing is shared2 */
-		  pn->shared = l->parent->prev;
-		}
+	      region = SHARED2;
+	      pn->shared = l->parent->prev;
 	    }
 	  else
-	    {
-	      region = OUTSIDE;
-	      if (l->parent->next->point[0] == pn->next->point[0] &&
-		  l->parent->next->point[1] == pn->next->point[1])
-		{
-		  LABEL_NODE (pn, SHARED);
-		  pn->shared = l->parent;
-		}
-	      else if (l->parent->next->point[0] == pn->prev->point[0] &&
-		       l->parent->next->point[1] == pn->prev->point[1])
-		{
-		  LABEL_NODE (pn->prev, SHARED2);	/* outgoing is shared2 */
-		  pn->prev->shared = l->parent;
-		}
-	    }
+	    region = INSIDE;
 	}
       else
 	{
-	  VNODE *v;
-	  if (l->side == 'P')
-	    v = l->parent->prev;
+	  if (l->angle == pn->cvc_next->angle)
+	    {
+	      assert (l->parent->next->point[0] == pn->next->point[0] &&
+		      l->parent->next->point[1] == pn->next->point[1]);
+	      region = SHARED;
+	      pn->shared = l->parent;
+	    }
 	  else
-	    v = l->parent;
-	  if (NODE_LABEL (v) != SHARED && NODE_LABEL (v) != SHARED2)
+	    region = OUTSIDE;
+	}
+    }
+  if (region == UNKNWN)
+    {
+      for (l = l->next; l != pn->cvc_next; l = l->next)
+	{
+	  if (l->poly != this_poly)
 	    {
-#ifdef DEBUG_LABEL
-	      /* debugging */
-	      if (NODE_LABEL (v) != UNKNWN && NODE_LABEL (v) != region)
-		{
-		  CVCList *x = l;
-		  LABEL_NODE (v, region);
-		  pline_dump (v);
-		  do
-		    {
-		      fprintf (stderr, "poly %c\n", x->poly);
-		      pline_dump (x->parent);
-		    }
-		  while ((x = x->next) != l);
-		}
-#endif
-	      assert (NODE_LABEL (v) == UNKNWN || NODE_LABEL (v) == region);
-	      LABEL_NODE (v, region);
+	      if (l->side == 'P')
+		region = INSIDE;
+	      else
+		region = OUTSIDE;
+	      break;
 	    }
 	}
     }
-  while ((l = l->prev) != pn->cvc_prev);
-#ifdef DEBUG_LABEL
-  DEBUGP ("\n");
-#endif
-  assert (NODE_LABEL (pn) != UNKNWN && NODE_LABEL (pn->prev) != UNKNWN);
-  if (NODE_LABEL (pn) == UNKNWN || NODE_LABEL (pn->prev) == UNKNWN)
+  assert (region != UNKNWN);
+  assert (NODE_LABEL (pn) == UNKNWN || NODE_LABEL (pn) == region);
+  LABEL_NODE (pn, region);
+  if (region == SHARED || region == SHARED2)
     return UNKNWN;
-  if (NODE_LABEL (pn) == INSIDE || NODE_LABEL (pn) == OUTSIDE)
-    return NODE_LABEL (pn);
-  return UNKNWN;
+  return region;
 }				/* node_label */
 
 /*
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-11 17:10:17
      
     | 
| The branch, master has been updated
       via  4082c9b12655bd5a5e77bf4ecd2755034079b0b8 (commit)
      from  573f93618ccffbc3084115db7e0d40c46f2b42fa (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
=========
 src/polygon1.c |  232 ++++++++++++++++++++++++++++----------------------------
 1 files changed, 116 insertions(+), 116 deletions(-)
=================
 Commit Messages
=================
commit 4082c9b12655bd5a5e77bf4ecd2755034079b0b8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Reindent polygon1.c with "indent"
    
    This is a painful one for me to push, as it will certainly cause
    rebase misery against all my local branches.
    
    Oh well... got to be done!
:100644 100644 b9cfa76... 3b01bea... M	src/polygon1.c
=========
 Changes
=========
commit 4082c9b12655bd5a5e77bf4ecd2755034079b0b8
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Reindent polygon1.c with "indent"
    
    This is a painful one for me to push, as it will certainly cause
    rebase misery against all my local branches.
    
    Oh well... got to be done!
diff --git a/src/polygon1.c b/src/polygon1.c
index b9cfa76..3b01bea 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -748,85 +748,85 @@ intersect (jmp_buf * jb, POLYAREA * b, POLYAREA * a, int add)
   {
     pa = a->contours;
     pb = b->contours;
-    while (pa)     /* Loop over the contours of POLYAREA "a" */
+    while (pa)			/* Loop over the contours of POLYAREA "a" */
       {
-        int found_overlapping_a_b_contour = FALSE;
-
-        while (pb) /* Loop over the contours of POLYAREA "b" */
-          {
-            /* Are there overlapping bounds? */
-            if (pb->xmin <= pa->xmax && pb->xmax >= pa->xmin &&
-                pb->ymin <= pa->ymax && pb->ymax >= pa->ymin)
-              {
-                found_overlapping_a_b_contour = TRUE;
-                break;
-              }
-            pb = pb->next;
-          }
-
-        /* If we didn't find anything intersting, move onto the next "a" contour */
-        if (!found_overlapping_a_b_contour)
-          {
-            pa = pa->next;
-            pb = b->contours;
-            continue;
-          }
-
-        /* something intersects so check the edges of the contour */
-
-        /* Pick which contour has the fewer points, and do the loop
-         * over that. The r_tree makes hit-testing against a contour
-         * faster, so we want to do that on the bigger contour.
-         */
-        if (pa->Count < pb->Count)
-          {
-            rtree_over   = pb;
-            looping_over = pa;
-          }
-        else
-          {
-            rtree_over   = pa;
-            looping_over = pb;
-          }
-
-        av = &looping_over->head;
-        do  /* Loop over the nodes in the smaller contour */
-          {
-            /* check this edge for any insertions */
-            double dx;
-            info.v = av;
-            /* compute the slant for region trimming */
-            dx = av->next->point[0] - av->point[0];
-            if (dx == 0)
-              info.m = 0;
-            else
-              {
-                info.m = (av->next->point[1] - av->point[1]) / dx;
-                info.b = av->point[1] - info.m * av->point[0];
-              }
-            box.X2 = (box.X1 = av->point[0]) + 1;
-            box.Y2 = (box.Y1 = av->point[1]) + 1;
-
-            /* fill in the segment in info corresponding to this node */
-            if (setjmp (info.sego) == 0)
-              {
-                r_search (looping_over->tree, &box, NULL, get_seg, &info);
-                assert (0);
-              }
-
-              /* NB: If this actually hits anything, we are teleported back to the beginning */
-              info.tree = rtree_over->tree;
-              if (info.tree)
-                if (UNLIKELY (r_search (info.tree, &info.s->box,
-                                        seg_in_region, seg_in_seg, &info)))
-                  return err_no_memory;	/* error */
-          }
-        while ((av = av->next) != &looping_over->head);
-
-        /* Continue the with the _same_ "a" contour,
-         * testing it against the next "b" contour.
-         */
-        pb = pb->next;
+	int found_overlapping_a_b_contour = FALSE;
+
+	while (pb)		/* Loop over the contours of POLYAREA "b" */
+	  {
+	    /* Are there overlapping bounds? */
+	    if (pb->xmin <= pa->xmax && pb->xmax >= pa->xmin &&
+		pb->ymin <= pa->ymax && pb->ymax >= pa->ymin)
+	      {
+		found_overlapping_a_b_contour = TRUE;
+		break;
+	      }
+	    pb = pb->next;
+	  }
+
+	/* If we didn't find anything intersting, move onto the next "a" contour */
+	if (!found_overlapping_a_b_contour)
+	  {
+	    pa = pa->next;
+	    pb = b->contours;
+	    continue;
+	  }
+
+	/* something intersects so check the edges of the contour */
+
+	/* Pick which contour has the fewer points, and do the loop
+	 * over that. The r_tree makes hit-testing against a contour
+	 * faster, so we want to do that on the bigger contour.
+	 */
+	if (pa->Count < pb->Count)
+	  {
+	    rtree_over = pb;
+	    looping_over = pa;
+	  }
+	else
+	  {
+	    rtree_over = pa;
+	    looping_over = pb;
+	  }
+
+	av = &looping_over->head;
+	do			/* Loop over the nodes in the smaller contour */
+	  {
+	    /* check this edge for any insertions */
+	    double dx;
+	    info.v = av;
+	    /* compute the slant for region trimming */
+	    dx = av->next->point[0] - av->point[0];
+	    if (dx == 0)
+	      info.m = 0;
+	    else
+	      {
+		info.m = (av->next->point[1] - av->point[1]) / dx;
+		info.b = av->point[1] - info.m * av->point[0];
+	      }
+	    box.X2 = (box.X1 = av->point[0]) + 1;
+	    box.Y2 = (box.Y1 = av->point[1]) + 1;
+
+	    /* fill in the segment in info corresponding to this node */
+	    if (setjmp (info.sego) == 0)
+	      {
+		r_search (looping_over->tree, &box, NULL, get_seg, &info);
+		assert (0);
+	      }
+
+	    /* NB: If this actually hits anything, we are teleported back to the beginning */
+	    info.tree = rtree_over->tree;
+	    if (info.tree)
+	      if (UNLIKELY (r_search (info.tree, &info.s->box,
+				      seg_in_region, seg_in_seg, &info)))
+		return err_no_memory;	/* error */
+	  }
+	while ((av = av->next) != &looping_over->head);
+
+	/* Continue the with the _same_ "a" contour,
+	 * testing it against the next "b" contour.
+	 */
+	pb = pb->next;
       }
   }				/* end of setjmp loop */
   return 0;
@@ -1117,7 +1117,7 @@ heap_it (const BoxType * b, void *cl)
   heap_t *heap = (heap_t *) cl;
   PLINE *p = (PLINE *) b;
   if (p->Count == 0)
-    return 0;  /* how did this happen? */
+    return 0;			/* how did this happen? */
   heap_insert (heap, p->area, (void *) p);
   return 1;
 }
@@ -1419,37 +1419,37 @@ Gather (VNODE * start, PLINE ** result, J_Rule v_rule, DIRECTION initdir)
 }				/* Gather */
 
 static void
-Collect1 (jmp_buf * e, VNODE *cur, DIRECTION dir, POLYAREA **contours, PLINE ** holes, J_Rule j_rule)
+Collect1 (jmp_buf * e, VNODE * cur, DIRECTION dir, POLYAREA ** contours,
+	  PLINE ** holes, J_Rule j_rule)
 {
   PLINE *p = NULL;		/* start making contour */
   int errc = err_ok;
-	if ((errc =
-	     Gather (dir == FORW ? cur : cur->next, &p, j_rule,
-		     dir)) != err_ok)
-	  {
-	    if (p != NULL)
-	      poly_DelContour (&p);
-	    error (errc);
-	  }
-	if (!p)
-	  return;
-	poly_PreContour (p, TRUE);
-	if (p->Count > 2)
-	  {
+  if ((errc =
+       Gather (dir == FORW ? cur : cur->next, &p, j_rule, dir)) != err_ok)
+    {
+      if (p != NULL)
+	poly_DelContour (&p);
+      error (errc);
+    }
+  if (!p)
+    return;
+  poly_PreContour (p, TRUE);
+  if (p->Count > 2)
+    {
 #ifdef DEBUG_GATHER
-	    DEBUGP ("adding contour with %d verticies and direction %c\n",
-		    p->Count, p->Flags.orient ? 'F' : 'B');
+      DEBUGP ("adding contour with %d verticies and direction %c\n",
+	      p->Count, p->Flags.orient ? 'F' : 'B');
 #endif
-	    PutContour (e, p, contours, holes, NULL);
-	  }
-	else
-	  {
-	    /* some sort of computation error ? */
+      PutContour (e, p, contours, holes, NULL);
+    }
+  else
+    {
+      /* some sort of computation error ? */
 #ifdef DEBUG_GATHER
-	    DEBUGP ("Bad contour! Not enough points!!\n");
+      DEBUGP ("Bad contour! Not enough points!!\n");
 #endif
-	    poly_DelContour (&p);
-	  }
+      poly_DelContour (&p);
+    }
 }
 
 static void
@@ -1461,13 +1461,13 @@ Collect (jmp_buf * e, PLINE * a, POLYAREA ** contours, PLINE ** holes,
 
   cur = &a->head;
   do
-   {
-    if (s_rule (cur, &dir) && cur->Flags.mark == 0)
-        Collect1(e, cur, dir, contours, holes, j_rule);
-    other = cur;
-    if ((other->cvc_prev && jump(&other, &dir, j_rule)))
-        Collect1(e, other, dir, contours, holes, j_rule);
-   }
+    {
+      if (s_rule (cur, &dir) && cur->Flags.mark == 0)
+	Collect1 (e, cur, dir, contours, holes, j_rule);
+      other = cur;
+      if ((other->cvc_prev && jump (&other, &dir, j_rule)))
+	Collect1 (e, other, dir, contours, holes, j_rule);
+    }
   while ((cur = cur->next) != &a->head);
 }				/* Collect */
 
@@ -1522,7 +1522,7 @@ cntr_Collect (jmp_buf * e, PLINE ** A, POLYAREA ** contours, PLINE ** holes,
 	      PutContour (e, tmprev, contours, holes, NULL);
 	      return TRUE;
 	    }
-	  /* break; */ /* Fall through (I think this is correct! pcjc2) */
+	  /* break; *//* Fall through (I think this is correct! pcjc2) */
 	case PBO_UNITE:
 	case PBO_SUB:
 	  if ((*A)->Flags.status == OUTSIDE)
@@ -1919,10 +1919,10 @@ poly_DelContour (PLINE ** c)
     {
       prev = cur->prev;
       if (cur->cvc_next != NULL)
-        {
-          free (cur->cvc_next);
-          free (cur->cvc_prev);
-        }
+	{
+	  free (cur->cvc_next);
+	  free (cur->cvc_prev);
+	}
       free (cur);
     }
   if ((*c)->head.cvc_next != NULL)
@@ -2315,7 +2315,7 @@ poly_Create (void)
 }
 
 void
-poly_FreeContours (PLINE **pline)
+poly_FreeContours (PLINE ** pline)
 {
   PLINE *pl;
 
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-09 17:07:24
      
     | 
| The branch, master has been updated
       via  573f93618ccffbc3084115db7e0d40c46f2b42fa (commit)
      from  f25ffbd309dd692389f1d517c8642cc9b66a406c (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
=========
 src/file.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
=================
 Commit Messages
=================
commit 573f93618ccffbc3084115db7e0d40c46f2b42fa
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    file.c: Don't walk off the end of a string in string_cmp()
    
    We need to check that we don't advance past the terminating \0
    in the string.
:100644 100644 db167c8... dce31a8... M	src/file.c
=========
 Changes
=========
commit 573f93618ccffbc3084115db7e0d40c46f2b42fa
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    file.c: Don't walk off the end of a string in string_cmp()
    
    We need to check that we don't advance past the terminating \0
    in the string.
diff --git a/src/file.c b/src/file.c
index db167c8..dce31a8 100644
--- a/src/file.c
+++ b/src/file.c
@@ -144,9 +144,9 @@ string_cmp (const char *a, const char *b)
 	  int ib = atoi (b);
 	  if (ia != ib)
 	    return ia - ib;
-	  while (isdigit ((int) *a))
+	  while (isdigit ((int) *a) && *(a+1))
 	    a++;
-	  while (isdigit ((int) *b))
+	  while (isdigit ((int) *b) && *(b+1))
 	    b++;
 	}
       else if (tolower ((int) *a) != tolower ((int) *b))
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-09 16:09:33
      
     | 
| The branch, master has been updated
       via  f25ffbd309dd692389f1d517c8642cc9b66a406c (commit)
      from  96de391be052275b6355e8b4778ea0a43a66b53c (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
=========
 src/polygon1.c |   14 +++++++-------
 1 files changed, 7 insertions(+), 7 deletions(-)
=================
 Commit Messages
=================
commit f25ffbd309dd692389f1d517c8642cc9b66a406c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Fix some printf format arguments in DEBUG sections
    
    %ld is for long int, and we are passing int, so use %d
:100644 100644 d27c255... b9cfa76... M	src/polygon1.c
=========
 Changes
=========
commit f25ffbd309dd692389f1d517c8642cc9b66a406c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    polygon1.c: Fix some printf format arguments in DEBUG sections
    
    %ld is for long int, and we are passing int, so use %d
diff --git a/src/polygon1.c b/src/polygon1.c
index d27c255..b9cfa76 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -259,7 +259,7 @@ new_descriptor (VNODE * a, char poly, char side)
   l->angle = ang;
   assert (ang >= 0.0 && ang <= 4.0);
 #ifdef DEBUG_ANGLE
-  DEBUGP ("node on %c at (%ld,%ld) assigned angle %g on side %c\n", poly,
+  DEBUGP ("node on %c at (%d,%d) assigned angle %g on side %c\n", poly,
 	  a->point[0], a->point[1], ang, side);
 #endif
   return l;
@@ -396,7 +396,7 @@ node_label (VNODE * pn)
    * are ever found between the other poly's entry and exit
    */
 #ifdef DEBUG_LABEL
-  DEBUGP ("CVCLIST for point (%ld,%ld)\n", pn->point[0], pn->point[1]);
+  DEBUGP ("CVCLIST for point (%d,%d)\n", pn->point[0], pn->point[1]);
 #endif
   /* first find whether we're starting inside or outside */
   for (l = pn->cvc_prev->prev; l != pn->cvc_prev; l = l->prev)
@@ -969,7 +969,7 @@ print_labels (PLINE * a)
 
   do
     {
-      DEBUGP ("(%ld,%ld)->(%ld,%ld) labeled %s\n", c->point[0], c->point[1],
+      DEBUGP ("(%d,%d)->(%d,%d) labeled %s\n", c->point[0], c->point[1],
 	      c->next->point[0], c->next->point[1], theState (c));
     }
   while ((c = c->next) != &a->head);
@@ -1337,7 +1337,7 @@ jump (VNODE ** cur, DIRECTION * cdir, J_Rule rule)
       return TRUE;
     }
 #ifdef DEBUG_JUMP
-  DEBUGP ("jump entering node at (%ld, %ld)\n", (*cur)->point[0],
+  DEBUGP ("jump entering node at (%d, %d)\n", (*cur)->point[0],
 	  (*cur)->point[1]);
 #endif
   if (*cdir == FORW)
@@ -1358,10 +1358,10 @@ jump (VNODE ** cur, DIRECTION * cdir, J_Rule rule)
 	    {
 #ifdef DEBUG_JUMP
 	      if (new == FORW)
-		DEBUGP ("jump leaving node at (%ld, %ld)\n",
+		DEBUGP ("jump leaving node at (%d, %d)\n",
 			e->next->point[0], e->next->point[1]);
 	      else
-		DEBUGP ("jump leaving node at (%ld, %ld)\n",
+		DEBUGP ("jump leaving node at (%d, %d)\n",
 			e->point[0], e->point[1]);
 #endif
 	      *cur = d->parent;
@@ -1402,7 +1402,7 @@ Gather (VNODE * start, PLINE ** result, J_Rule v_rule, DIRECTION initdir)
 	  poly_InclVertex ((*result)->head.prev, newn);
 	}
 #ifdef DEBUG_GATHER
-      DEBUGP ("gather vertex at (%ld, %ld)\n", cur->point[0], cur->point[1]);
+      DEBUGP ("gather vertex at (%d, %d)\n", cur->point[0], cur->point[1]);
 #endif
       /* Now mark the edge as included.  */
       newn = (dir == FORW ? cur : cur->prev);
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-09 16:06:40
      
     | 
| The branch, master has been updated
       via  96de391be052275b6355e8b4778ea0a43a66b53c (commit)
       via  d6b396c4a34bb619c8e91da1e9cd9bd27ff54657 (commit)
      from  ad325bd9f04707b91490038fc75307a08d61c72c (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
=========
 src/hid/gtk/gui-dialog.c     |    8 ++++----
 src/hid/gtk/gui-top-window.c |   14 +++++++-------
 2 files changed, 11 insertions(+), 11 deletions(-)
=================
 Commit Messages
=================
commit 96de391be052275b6355e8b4778ea0a43a66b53c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/gtk: Don't pass non-literat format argument to printf style functions.
:100644 100644 32ec48e... 7fcbf6d... M	src/hid/gtk/gui-dialog.c
:100644 100644 0734427... 69e1909... M	src/hid/gtk/gui-top-window.c
commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Pass correct length to strncat
    
    We need to pass "sizeof (string) - 1", due to the NULL pointer.
:100644 100644 b950a25... 0734427... M	src/hid/gtk/gui-top-window.c
=========
 Changes
=========
commit 96de391be052275b6355e8b4778ea0a43a66b53c
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    hid/gtk: Don't pass non-literat format argument to printf style functions.
diff --git a/src/hid/gtk/gui-dialog.c b/src/hid/gtk/gui-dialog.c
index 32ec48e..7fcbf6d 100644
--- a/src/hid/gtk/gui-dialog.c
+++ b/src/hid/gtk/gui-dialog.c
@@ -97,8 +97,7 @@ ghid_dialog_about (void)
 				   | GTK_DIALOG_DESTROY_WITH_PARENT,
 				   GTK_MESSAGE_INFO,
 				   GTK_BUTTONS_OK,
-				   GetInfoString ()
-				   );
+				   "%s", GetInfoString ());
 
   gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy (dialog);
@@ -142,7 +141,7 @@ ghid_dialog_message (gchar * message)
 				   GTK_DIALOG_MODAL |
 				   GTK_DIALOG_DESTROY_WITH_PARENT,
 				   GTK_MESSAGE_WARNING, GTK_BUTTONS_OK,
-				   message);
+				   "%s", message);
 
   gtk_dialog_run (GTK_DIALOG (dialog));
   gtk_widget_destroy (dialog);
@@ -169,7 +168,8 @@ ghid_dialog_confirm (gchar * message, gchar * cancelmsg, gchar * okmsg)
 				   GTK_DIALOG_MODAL |
 				   GTK_DIALOG_DESTROY_WITH_PARENT,
 				   GTK_MESSAGE_QUESTION,
-				   GTK_BUTTONS_NONE, message);
+				   GTK_BUTTONS_NONE,
+				   "%s", message);
   gtk_dialog_add_buttons (GTK_DIALOG (dialog), 
 			  cancelmsg, GTK_RESPONSE_CANCEL,
 			  okmsg, GTK_RESPONSE_OK,
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index 0734427..69e1909 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -2509,7 +2509,7 @@ ghid_create_pcb_widgets (void)
     ghidgui->bg_pixbuf = gdk_pixbuf_new_from_file(bg_image_file, &err);
   if (err)
     {
-    g_error(err->message);
+    g_error("%s", err->message);
     g_error_free(err);
     }
   ghid_build_pcb_top_window ();
commit d6b396c4a34bb619c8e91da1e9cd9bd27ff54657
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    Pass correct length to strncat
    
    We need to pass "sizeof (string) - 1", due to the NULL pointer.
diff --git a/src/hid/gtk/gui-top-window.c b/src/hid/gtk/gui-top-window.c
index b950a25..0734427 100644
--- a/src/hid/gtk/gui-top-window.c
+++ b/src/hid/gtk/gui-top-window.c
@@ -3198,17 +3198,17 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 		      }
 		    else if (strncmp (p, "Ctrl", 4) == 0)
 		      {
-			strncat (accel, "<control>", sizeof (accel));
+			strncat (accel, "<control>", sizeof (accel) - 1);
 			p += 4;
 		      }
 		    else if (strncmp (p, "Shift", 5) == 0)
 		      {
-			strncat (accel, "<shift>", sizeof (accel));
+			strncat (accel, "<shift>", sizeof (accel) - 1);
 			p += 5;
 		      }
 		    else if (strncmp (p, "Alt", 3) == 0)
 		      {
-			strncat (accel, "<alt>", sizeof (accel));
+			strncat (accel, "<alt>", sizeof (accel) - 1);
 			p += 3;
 		      }
 		    else
@@ -3239,7 +3239,7 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 		  case KEY:
 		    if (strncmp (p, "Enter", 5) == 0)
 		      {
-			strncat (accel, "Return", sizeof (accel));
+			strncat (accel, "Return", sizeof (accel) - 1);
 			p += 5;
 		      }
 		    else
@@ -3249,13 +3249,13 @@ add_resource_to_menu (char * menu, Resource * node, void * callback, int indent)
 			  {
 			    if ( *p == key_table[j].in)
 			      {
-				strncat (accel, key_table[j].out, sizeof (accel));
+				strncat (accel, key_table[j].out, sizeof (accel) - 1);
 				j = n_key_table;
 			      }
 			  }
 			
 			if (j == n_key_table)
-			  strncat (accel, ch, sizeof (accel));
+			  strncat (accel, ch, sizeof (accel) - 1);
 		    
 			p++;
 		      }
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-06 15:04:23
      
     | 
| The branch, master has been updated
       via  9299b3bbeaa5567f2548541c602072a06e8d28d5 (commit)
      from  01d718218c8202ac06d12dfcdc8427a751df2ec6 (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
=========
 src/hid/lesstif/main.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
=================
 Commit Messages
=================
commit 9299b3bbeaa5567f2548541c602072a06e8d28d5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    lesstif: Remove errornous & operator in free () call
    
    GCC spotted this one.
:100644 100644 370d816... 93bb2b8... M	src/hid/lesstif/main.c
=========
 Changes
=========
commit 9299b3bbeaa5567f2548541c602072a06e8d28d5
Author: Peter Clifton <pc...@ca...>
Commit: Peter Clifton <pc...@ca...>
    lesstif: Remove errornous & operator in free () call
    
    GCC spotted this one.
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 370d816..93bb2b8 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -3704,7 +3704,7 @@ lesstif_show_item (void *item)
 
   if (pd->left > pd->right)
     {
-      free (&pd);
+      free (pd);
       return;
     }
   pd->prev = 0;
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-06 02:12:58
      
     | 
| The branch, master has been updated
       via  01d718218c8202ac06d12dfcdc8427a751df2ec6 (commit)
      from  4bc0d814ae42f57b1a7bf38c0b80f992e437debc (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
=========
 README.snapshots |    5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)
=================
 Commit Messages
=================
commit 01d718218c8202ac06d12dfcdc8427a751df2ec6
Author: Dan McMahill <da...@mc...>
Commit: Dan McMahill <da...@mc...>
    Fix some details on branching and pushing a local branch.
:100644 100644 7f72ed3... 9a4582e... M	README.snapshots
=========
 Changes
=========
commit 01d718218c8202ac06d12dfcdc8427a751df2ec6
Author: Dan McMahill <da...@mc...>
Commit: Dan McMahill <da...@mc...>
    Fix some details on branching and pushing a local branch.
diff --git a/README.snapshots b/README.snapshots
index 7f72ed3..9a4582e 100644
--- a/README.snapshots
+++ b/README.snapshots
@@ -72,8 +72,9 @@ To make a pcb release do the following:
 
 =)	if this is a major release, then branch:
 
-	1. Create the release branch
-		git branch origin/pcb-20091103
+	1. Create the release branch and push to the remove
+		git branch pcb-20091103
+		git push origin pcb-20091103
 
 	3. FIX_ME [fix up this step.  what shall we do with the version
 	   on the trunk?  We are about to run out of letters!] 
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-05 17:20:17
      
     | 
| The branch, pcb-20091103 has been created
        at  e0977ee60a28e95eb28ca3b80ccf72350a7e8f34 (commit)
commit e0977ee60a28e95eb28ca3b80ccf72350a7e8f34
Author: Dan McMahill <da...@mc...>
Date:   Tue Nov 3 17:59:59 2009 -0500
    Set version for 20091103 release
 | 
| 
      
      
      From: <gi...@gp...> - 2009-11-04 00:50:27
      
     | 
| The branch, master has been updated
       via  4bc0d814ae42f57b1a7bf38c0b80f992e437debc (commit)
      from  4250e30238ab77475715cda5ae648b19470afa4d (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
=========
 README.snapshots |   49 +++++++++++++++++++------------------------------
 1 files changed, 19 insertions(+), 30 deletions(-)
=================
 Commit Messages
=================
commit 4bc0d814ae42f57b1a7bf38c0b80f992e437debc
Author: Dan McMahill <da...@mc...>
Commit: Dan McMahill <da...@mc...>
    Update how to release files on sourceforge since it has all changed.
:100644 100644 83aee61... 7f72ed3... M	README.snapshots
=========
 Changes
=========
commit 4bc0d814ae42f57b1a7bf38c0b80f992e437debc
Author: Dan McMahill <da...@mc...>
Commit: Dan McMahill <da...@mc...>
    Update how to release files on sourceforge since it has all changed.
diff --git a/README.snapshots b/README.snapshots
index 83aee61..7f72ed3 100644
--- a/README.snapshots
+++ b/README.snapshots
@@ -73,7 +73,7 @@ To make a pcb release do the following:
 =)	if this is a major release, then branch:
 
 	1. Create the release branch
-		git branch pcb-20091103
+		git branch origin/pcb-20091103
 
 	3. FIX_ME [fix up this step.  what shall we do with the version
 	   on the trunk?  We are about to run out of letters!] 
@@ -127,39 +127,28 @@ To make a pcb release do the following:
 
 	   https://sourceforge.net/projects/pcb  (you must be logged in to sourceforge)
 
-	   Pick Admin->File Releases
+	   Click "Develop".
+	   Click "Project Admin->File Manager".
+	   Left click on "pcb" to expand it.
+	   Right click on "pcb" and choose "New folder".  Use "pcb-20091103" as the name.
+           Copy out the section from NEWS which are the release notes for this release.
+           Place the into a file called pcb-20091103.txt.
 
-	   Next to the "gerbv" package, click "Add Release"
+	   Right click on "pcb-20091103" and choose "Uploads here".
+           Click "Upload File" and upload the .tar.gz, .txt and .cksum files.
+ 
+           Left click on pcb-20091103.txt and check the "Release notes" box and
+           click "Save".
 
-           In the "Step 1:  Edit Existing Release" section, paste in the section of the NEWS
-	   for this version.  Check the "Preserve my pre-formatted text" radio button and click
-	   "Submit/Refresh".
+           Left click on pcb-20091103.tar.gz to bring up a form to edit the file
+           details.  Change the label to "source code release".  Check all the platforms
+           except for windows.  Select the release notes file and click "Save".
 
-           In the "Step 2: Add Files To This Release" section follow the "upload new files" link
-	   and then in the next page the "Web Upload" link.  You will have to log in to
-	   sourceforge again.
+           Left click on pcb-20091103.cksum to bring up a form to edit the file
+           details.  Change the label to "checksum file", select the release notes file,
+           and click "Save".
 
-           Upload the .tar.gz, .cksum, and if you built one, the windows installer.
-
-           Once you have completed the file uploads return to the edit releases page, check
-	   the radio buttons next to the uploaded files and click the "Add Files..." button.
-
-           In the "Step 3:  Edit Files in this Release" section, set the following:
-		For file types:
-			.tar.gz  -  any / source .gz
-			.cksum   -  Platform Independent / Other Source File
-			.exe     -  i386 / .exe (32-bit Windows)
-
-           You will have to click "update" for each file as you go.
-
-           In the "Step 4:  Email Release Notice" section, check the "I'm sure" 
-	   radio button and click the "Send Notice" button.
-        
-	 9. Have a project admin go to the Admin->File Releases page and then
-	    follow the "Create/Edit Download page" to change the default download
-	    file to the new release.
-
-	10. Return to your regularly scheduled trunk development
+=)      return to your regularly scheduled trunk development
 		git checkout master
 
 =) 	if this is a patch release, then simply make desired changes to the branch, and
 |