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

gEDA-cvs: pcb.git: branch: master updated (bb23c2776daf072fa7eed46b2328f29d27d62de8)



The branch, master has been updated
       via  bb23c2776daf072fa7eed46b2328f29d27d62de8 (commit)
      from  5f85e6ed6482acdeb18de22bbdacdc33e635f86f (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/buffer.c |   70 +++++++++++++++++++++++++++------------------------------
 1 files changed, 33 insertions(+), 37 deletions(-)


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

commit bb23c2776daf072fa7eed46b2328f29d27d62de8
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    src/buffer.c: Gratuitous cosmetic changes
    
    Split from a future patch which ended up making these changes to help
    with consistency. Pre-patching here to avoid a huge delta when that
    patch lands.

:100644 100644 907c7e6... f3fa18a... M	src/buffer.c

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

commit bb23c2776daf072fa7eed46b2328f29d27d62de8
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    src/buffer.c: Gratuitous cosmetic changes
    
    Split from a future patch which ended up making these changes to help
    with consistency. Pre-patching here to avoid a huge delta when that
    patch lands.

diff --git a/src/buffer.c b/src/buffer.c
index 907c7e6..f3fa18a 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -288,25 +288,24 @@ MoveRatToBuffer (RatTypePtr Rat)
  * moves a line to buffer  
  */
 static void *
-MoveLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
+MoveLineToBuffer (LayerType *layer, LineType *Line)
 {
-  LayerTypePtr lay;
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
   LineTypePtr line;
 
-  RestoreToPolygon (Source, LINE_TYPE, Layer, Line);
-  r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
-  lay = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  RestoreToPolygon (Source, LINE_TYPE, layer, Line);
+  r_delete_entry (layer->line_tree, (BoxTypePtr) Line);
   line = GetLineMemory (lay);
   *line = *Line;
   CLEAR_FLAG (FOUNDFLAG, line);
   /* line pointers being shuffled */
-  if (Line != &Layer->Line[--Layer->LineN])
+  if (Line != &layer->Line[--layer->LineN])
   {
-  *Line = Layer->Line[Layer->LineN];
-  r_substitute (Layer->line_tree, (BoxTypePtr) & Layer->Line[Layer->LineN],
+  *Line = layer->Line[layer->LineN];
+  r_substitute (layer->line_tree, (BoxTypePtr) & layer->Line[layer->LineN],
 		(BoxTypePtr) Line);
   }
-  memset (&Layer->Line[Layer->LineN], 0, sizeof (LineType));
+  memset (&layer->Line[layer->LineN], 0, sizeof (LineType));
   if (!lay->line_tree)
     lay->line_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (lay->line_tree, (BoxTypePtr) line, 0);
@@ -318,25 +317,24 @@ MoveLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
  * moves an arc to buffer  
  */
 static void *
-MoveArcToBuffer (LayerTypePtr Layer, ArcTypePtr Arc)
+MoveArcToBuffer (LayerType *layer, ArcType *Arc)
 {
-  LayerTypePtr lay;
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
   ArcTypePtr arc;
 
-  RestoreToPolygon (Source, ARC_TYPE, Layer, Arc);
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
-  lay = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  RestoreToPolygon (Source, ARC_TYPE, layer, Arc);
+  r_delete_entry (layer->arc_tree, (BoxTypePtr) Arc);
   arc = GetArcMemory (lay);
   *arc = *Arc;
   CLEAR_FLAG (FOUNDFLAG, arc);
   /* arc pointers being shuffled */
-  if (Arc != &Layer->Arc[--Layer->ArcN])
+  if (Arc != &layer->Arc[--layer->ArcN])
   {
-  *Arc = Layer->Arc[Layer->ArcN];
-  r_substitute (Layer->arc_tree, (BoxTypePtr) & Layer->Arc[Layer->ArcN],
+  *Arc = layer->Arc[layer->ArcN];
+  r_substitute (layer->arc_tree, (BoxTypePtr) & layer->Arc[layer->ArcN],
 		(BoxTypePtr) Arc);
   }
-  memset (&Layer->Arc[Layer->ArcN], 0, sizeof (ArcType));
+  memset (&layer->Arc[layer->ArcN], 0, sizeof (ArcType));
   if (!lay->arc_tree)
     lay->arc_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (lay->arc_tree, (BoxTypePtr) arc, 0);
@@ -348,23 +346,22 @@ MoveArcToBuffer (LayerTypePtr Layer, ArcTypePtr Arc)
  * moves a text to buffer without allocating memory for the name
  */
 static void *
-MoveTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
+MoveTextToBuffer (LayerType *layer, TextType *Text)
 {
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
   TextTypePtr text;
-  LayerTypePtr lay;
 
-  r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
-  RestoreToPolygon (Source, TEXT_TYPE, Layer, Text);
-  lay = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  r_delete_entry (layer->text_tree, (BoxTypePtr) Text);
+  RestoreToPolygon (Source, TEXT_TYPE, layer, Text);
   text = GetTextMemory (lay);
   *text = *Text;
-  if (Text != &Layer->Text[--Layer->TextN])
+  if (Text != &layer->Text[--layer->TextN])
   {
-  *Text = Layer->Text[Layer->TextN];
-  r_substitute (Layer->text_tree, (BoxTypePtr) & Layer->Text[Layer->TextN],
+  *Text = layer->Text[layer->TextN];
+  r_substitute (layer->text_tree, (BoxTypePtr) & layer->Text[layer->TextN],
 		(BoxTypePtr) Text);
   }
-  memset (&Layer->Text[Layer->TextN], 0, sizeof (TextType));
+  memset (&layer->Text[layer->TextN], 0, sizeof (TextType));
   if (!lay->text_tree)
     lay->text_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (lay->text_tree, (BoxTypePtr) text, 0);
@@ -376,24 +373,23 @@ MoveTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
  * moves a polygon to buffer. Doesn't allocate memory for the points
  */
 static void *
-MovePolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
+MovePolygonToBuffer (LayerType *layer, PolygonType *Polygon)
 {
-  LayerTypePtr lay;
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
   PolygonTypePtr polygon;
 
-  r_delete_entry (Layer->polygon_tree, (BoxTypePtr) Polygon);
-  lay = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  r_delete_entry (layer->polygon_tree, (BoxTypePtr) Polygon);
   polygon = GetPolygonMemory (lay);
   *polygon = *Polygon;
   CLEAR_FLAG (FOUNDFLAG, polygon);
-  if (Polygon != &Layer->Polygon[--Layer->PolygonN])
+  if (Polygon != &layer->Polygon[--layer->PolygonN])
   {
-  *Polygon = Layer->Polygon[Layer->PolygonN];
-  r_substitute (Layer->polygon_tree,
-		(BoxTypePtr) & Layer->Polygon[Layer->PolygonN],
+  *Polygon = layer->Polygon[layer->PolygonN];
+  r_substitute (layer->polygon_tree,
+		(BoxTypePtr) & layer->Polygon[layer->PolygonN],
 		(BoxTypePtr) Polygon);
   }
-  memset (&Layer->Polygon[Layer->PolygonN], 0, sizeof (PolygonType));
+  memset (&layer->Polygon[layer->PolygonN], 0, sizeof (PolygonType));
   if (!lay->polygon_tree)
     lay->polygon_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (lay->polygon_tree, (BoxTypePtr) polygon, 0);
@@ -404,7 +400,7 @@ MovePolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * moves a element to buffer without allocating memory for pins/names
  */
 static void *
-MoveElementToBuffer (ElementTypePtr Element)
+MoveElementToBuffer (ElementType *Element)
 {
   ElementTypePtr element;
   int i;




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