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

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



The branch, master has been updated
       via  24ae95932e113db79d85d487523576d6e8747ebc (commit)
       via  eede3d7571ce74665609f47e376e8423474f522a (commit)
      from  242490769b668619e6d3aaf91c1ce26687021ffa (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                |    8 ++++----
 src/draw.h                |    2 +-
 src/hid.h                 |    1 +
 src/hid/gtk/gtkhid-main.c |    2 ++
 src/hid/lesstif/main.c    |    2 ++
 5 files changed, 10 insertions(+), 5 deletions(-)


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

commit 24ae95932e113db79d85d487523576d6e8747ebc
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Add SL_RATS layer ID to tell the GUI we're drawing rats
    
    Also, let the GUI decide whether it wants to draw rats or not,
    rather than have the core test PCB->RatsOn directly.

:100644 100644 8340b85... b843da6... M	src/draw.c
:100644 100644 ee48b9f... 7966346... M	src/hid.h
:100644 100644 cbdd104... 280cfbe... M	src/hid/gtk/gtkhid-main.c
:100644 100644 93bb2b8... 6ff7e74... M	src/hid/lesstif/main.c

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

    draw.c: Apply const qualifier to DrawLayer and DrawSilk bounds
    
    This keeps the compiler happier.

:100644 100644 4605ae5... 8340b85... M	src/draw.c
:100644 100644 088d01b... 5d7c874... M	src/draw.h

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

commit 24ae95932e113db79d85d487523576d6e8747ebc
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Add SL_RATS layer ID to tell the GUI we're drawing rats
    
    Also, let the GUI decide whether it wants to draw rats or not,
    rather than have the core test PCB->RatsOn directly.

diff --git a/src/draw.c b/src/draw.c
index 8340b85..b843da6 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -518,7 +518,7 @@ DrawEverything (BoxTypePtr drawn_area)
 	r_search (PCB->Data->element_tree, drawn_area, NULL, EMark_callback,
 		  NULL);
       /* Draw rat lines on top */
-      if (PCB->RatOn)
+      if (gui->set_layer ("rats", SL (RATS, 0), 0))
 	DrawRats(drawn_area);
     }
 
diff --git a/src/hid.h b/src/hid.h
index ee48b9f..7966346 100644
--- a/src/hid.h
+++ b/src/hid.h
@@ -214,6 +214,7 @@ extern "C"
 #define SL_INVISIBLE	0x0060
 #define SL_FAB		0x0070
 #define SL_ASSY		0x0080
+#define SL_RATS		0x0090
 /* Callers should use this.  */
 #define SL(type,side) (~0xfff | SL_##type | SL_##side##_SIDE)
 
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index cbdd104..280cfbe 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -551,6 +551,8 @@ ghid_set_layer (const char *name, int group, int empty)
 	case SL_PDRILL:
 	case SL_UDRILL:
 	  return 1;
+	case SL_RATS:
+	  return PCB->RatOn;
 	}
     }
   return 0;
diff --git a/src/hid/lesstif/main.c b/src/hid/lesstif/main.c
index 93bb2b8..6ff7e74 100644
--- a/src/hid/lesstif/main.c
+++ b/src/hid/lesstif/main.c
@@ -2890,6 +2890,8 @@ lesstif_set_layer (const char *name, int group, int empty)
 	case SL_UDRILL:
 	case SL_PDRILL:
 	  return 1;
+	case SL_RATS:
+	  return PCB->RatOn;
 	}
     }
   return 0;

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

    draw.c: Apply const qualifier to DrawLayer and DrawSilk bounds
    
    This keeps the compiler happier.

diff --git a/src/draw.c b/src/draw.c
index 4605ae5..8340b85 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -110,7 +110,7 @@ static void ClearPad (PadTypePtr, Boolean);
 static void DrawHole (PinTypePtr);
 static void DrawMask (BoxType *);
 static void DrawRats (BoxType *);
-static void DrawSilk (int, int, BoxType *);
+static void DrawSilk (int, int, const BoxType *);
 static int pin_callback (const BoxType * b, void *cl);
 static int pad_callback (const BoxType * b, void *cl);
 
@@ -688,7 +688,7 @@ clearPad_callback (const BoxType * b, void *cl)
  */
 
 static void
-DrawSilk (int new_swap, int layer, BoxTypePtr drawn_area)
+DrawSilk (int new_swap, int layer, const BoxType * drawn_area)
 {
 #if 0
   /* This code is used when you want to mask silk to avoid exposed
@@ -837,7 +837,7 @@ text_callback (const BoxType * b, void *cl)
  * draws one non-copper layer
  */
 void
-DrawLayer (LayerTypePtr Layer, BoxType * screen)
+DrawLayer (LayerTypePtr Layer, const BoxType * screen)
 {
   struct pin_info info;
 
diff --git a/src/draw.h b/src/draw.h
index 088d01b..5d7c874 100644
--- a/src/draw.h
+++ b/src/draw.h
@@ -55,7 +55,7 @@ void DrawElementName (ElementTypePtr, int);
 void DrawElementPackage (ElementTypePtr, int);
 void DrawElementPinsAndPads (ElementTypePtr, int);
 void DrawObject (int, void *, void *, int);
-void DrawLayer (LayerTypePtr, BoxType *);
+void DrawLayer (LayerTypePtr, const BoxType *);
 void EraseVia (PinTypePtr);
 void EraseRat (RatTypePtr);
 void EraseViaName (PinTypePtr);




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