[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (bcd7d69b63ea85a6b83e28e66fb87aebe2d26901)
The branch, master has been updated
via bcd7d69b63ea85a6b83e28e66fb87aebe2d26901 (commit)
from 76ce4ff37d8b36207fdfb10d06ae4f5d1fec5299 (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 | 45 +++++++++++++--------------------------------
1 files changed, 13 insertions(+), 32 deletions(-)
=================
Commit Messages
=================
commit bcd7d69b63ea85a6b83e28e66fb87aebe2d26901
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
draw.c: Remove unnecessary pin_info struct.
The argument specifying whether to clear pins was always true in any
case where clearPin_callback was called (the only user of this info).
:100644 100644 865bab2... 8b9b86a... M src/draw.c
=========
Changes
=========
commit bcd7d69b63ea85a6b83e28e66fb87aebe2d26901
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>
draw.c: Remove unnecessary pin_info struct.
The argument specifying whether to clear pins was always true in any
case where clearPin_callback was called (the only user of this info).
diff --git a/src/draw.c b/src/draw.c
index 865bab2..8b9b86a 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -645,32 +645,22 @@ DrawTop (const BoxType * screen)
r_search (PCB->Data->pin_tree, screen, NULL, hole_callback, NULL);
}
-struct pin_info
-{
- bool arg;
- LayerTypePtr Layer;
-};
-
static int
clearPin_callback (const BoxType * b, void *cl)
{
PinType *pin = (PinTypePtr) b;
- struct pin_info *i = (struct pin_info *) cl;
- if (i->arg)
- {
- if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
- gui->thindraw_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
- else
- gui->fill_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
- }
+ if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
+ gui->thindraw_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
+ else
+ gui->fill_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
return 1;
}
static int
poly_callback (const BoxType * b, void *cl)
{
- struct pin_info *i = (struct pin_info *) cl;
+ LayerType *layer = cl;
- DrawPlainPolygon (i->Layer, (PolygonTypePtr) b);
+ DrawPlainPolygon (layer, (PolygonTypePtr) b);
return 1;
}
@@ -694,7 +684,6 @@ DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
/* This code is used when you want to mask silk to avoid exposed
pins and pads. We decided it was a bad idea to do this
unconditionally, but the code remains. */
- struct pin_info info;
#endif
int save_swap = SWAP_IDENT;
SWAP_IDENT = new_swap;
@@ -714,10 +703,9 @@ DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
}
gui->use_mask (HID_MASK_CLEAR);
- info.arg = true;
- r_search (PCB->Data->pin_tree, drawn_area, NULL, clearPin_callback, &info);
- r_search (PCB->Data->via_tree, drawn_area, NULL, clearPin_callback, &info);
- r_search (PCB->Data->pad_tree, drawn_area, NULL, clearPad_callback, &info);
+ r_search (PCB->Data->pin_tree, drawn_area, NULL, clearPin_callback, NULL);
+ r_search (PCB->Data->via_tree, drawn_area, NULL, clearPin_callback, NULL);
+ r_search (PCB->Data->pad_tree, drawn_area, NULL, clearPad_callback, NULL);
if (gui->poly_after)
{
@@ -758,11 +746,8 @@ DrawMaskBoardArea (int mask_type, BoxType *screen)
static void
DrawMask (BoxType * screen)
{
- struct pin_info info;
int thin = TEST_FLAG(THINDRAWFLAG, PCB) || TEST_FLAG(THINDRAWPOLYFLAG, PCB);
- info.arg = true;
-
if (thin)
gui->set_color (Output.pmGC, PCB->MaskColor);
else
@@ -771,9 +756,9 @@ DrawMask (BoxType * screen)
gui->use_mask (HID_MASK_CLEAR);
}
- r_search (PCB->Data->pin_tree, screen, NULL, clearPin_callback, &info);
- r_search (PCB->Data->via_tree, screen, NULL, clearPin_callback, &info);
- r_search (PCB->Data->pad_tree, screen, NULL, clearPad_callback, &info);
+ r_search (PCB->Data->pin_tree, screen, NULL, clearPin_callback, NULL);
+ r_search (PCB->Data->via_tree, screen, NULL, clearPin_callback, NULL);
+ r_search (PCB->Data->pad_tree, screen, NULL, clearPad_callback, NULL);
if (thin)
gui->set_color (Output.pmGC, "erase");
@@ -829,13 +814,9 @@ text_callback (const BoxType * b, void *cl)
void
DrawLayerCommon (LayerTypePtr Layer, const BoxType * screen, bool clear_pins)
{
- struct pin_info info;
-
/* print the non-clearing polys */
- info.Layer = Layer;
- info.arg = clear_pins;
clip_box = screen;
- r_search (Layer->polygon_tree, screen, NULL, poly_callback, &info);
+ r_search (Layer->polygon_tree, screen, NULL, poly_callback, Layer);
if (clear_pins && TEST_FLAG (CHECKPLANESFLAG, PCB))
return;
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs