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

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



The branch, master has been updated
       via  76ce4ff37d8b36207fdfb10d06ae4f5d1fec5299 (commit)
       via  29111f3faa0c3e0e4820ffc0b8449bf478fb05dc (commit)
       via  198057f8123c97ab84fcfff96cb5bf633f842187 (commit)
      from  537a453ae39cc440c62f24b76df2482ce64699aa (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  |    2 -
 src/line.c  |    2 -
 src/macro.h |   90 -----------------------------------------------------------
 3 files changed, 0 insertions(+), 94 deletions(-)


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

commit 76ce4ff37d8b36207fdfb10d06ae4f5d1fec5299
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    macro.h: Remove unused X11 specific macros

:100644 100644 484f284... 7cba5ac... M	src/macro.h

commit 29111f3faa0c3e0e4820ffc0b8449bf478fb05dc
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    macro.h: Remove unused object visibility macros

:100644 100644 1a82f69... 484f284... M	src/macro.h

commit 198057f8123c97ab84fcfff96cb5bf633f842187
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove some old unused coordinate conversion macros from the core
    
    Sadly, there are still some left to expunge which are being used - and
    their usage appears broken in many cases!

:100644 100644 76c9a89... 865bab2... M	src/draw.c
:100644 100644 d1faaec... 0411afc... M	src/line.c
:100644 100644 ddb1fb3... 1a82f69... M	src/macro.h

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

commit 76ce4ff37d8b36207fdfb10d06ae4f5d1fec5299
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    macro.h: Remove unused X11 specific macros

diff --git a/src/macro.h b/src/macro.h
index 484f284..7cba5ac 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -149,20 +149,6 @@ extern int mem_any_set (unsigned char *, int);
 #define	NAMEONPCB_TEXT(e)	((e)->Name[NAMEONPCB_INDEX])
 #define	VALUE_TEXT(e)		((e)->Name[VALUE_INDEX])
 
-/* ----------------------------------------------------------------------
- * checks for correct X values
- */
-#define	VALID_PIXMAP(p)	((p) != BadValue && \
-	(p) != BadAlloc && \
-	(p) != BadDrawable)
-
-#define	VALID_GC(p)	((p) != BadValue && \
-	(p) != BadAlloc && \
-	(p) != BadDrawable && \
-	(p) != BadFont && \
-	(p) != BadMatch && \
-	(p) != BadPixmap)
-
 /* ---------------------------------------------------------------------------
  *  Determines if text is actually visible
 #define TEXT_IS_VISIBLE(b, l, t)					\

commit 29111f3faa0c3e0e4820ffc0b8449bf478fb05dc
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    macro.h: Remove unused object visibility macros

diff --git a/src/macro.h b/src/macro.h
index 1a82f69..484f284 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -81,64 +81,6 @@
 #define TO_RADIANS(degrees)	(M180 * (degrees))
 
 /* ---------------------------------------------------------------------------
- * macros to determine if something is on the visible part of the screen
- */
-
-#define VELEMENT(e)	((e)->BoundingBox.X1 <= vxh && \
-	(e)->BoundingBox.X2 >= vxl && \
-	(e)->BoundingBox.Y1 <= vyh && \
-	(e)->BoundingBox.Y2 >= vyl)
-#define VELTEXT(e) 	(ELEMENT_TEXT(PCB,(e)).BoundingBox.X1 <= vxh && \
-	ELEMENT_TEXT(PCB,(e)).BoundingBox.X2 >= vxl && \
-	ELEMENT_TEXT(PCB,(e)).BoundingBox.Y1 <= vyh && \
-	ELEMENT_TEXT(PCB,(e)).BoundingBox.Y2 >= vyl)
-#define VTEXT(t) 	((t)->BoundingBox.X1 <= vxh && \
-	(t)->BoundingBox.X2 >= vxl && \
-	(t)->BoundingBox.Y1 <= vyh && \
-	(t)->BoundingBox.Y2 >= vyl)
-#define VLINE(l)	((((l)->Point2.X >= vxl - (l)->Thickness && \
-        (l)->Point1.X <= vxh + (l)->Thickness) || \
-	((l)->Point1.X >= vxl - (l)->Thickness && \
-	(l)->Point2.X <= vxh + (l)->Thickness)) && \
-	((((l)->Point2.Y >= vyl - (l)->Thickness && \
-	(l)->Point1.Y <= vyh + (l)->Thickness) || \
-	((l)->Point1.Y >= vyl - (l)->Thickness && \
-	(l)->Point2.Y <= vyh + (l)->Thickness))))
-#define VARC(a) 	((a)->BoundingBox.X1 <= vxh && \
-	(a)->BoundingBox.X2 >= vxl && \
-	(a)->BoundingBox.Y1 <= vyh && \
-	(a)->BoundingBox.Y2 >= vyl)
-#define VPOLY(p) 	(IsRectangleInPolygon(vxl, vyl, vxh, vyh, (p)))
-/* (p)->BoundingBox.X1 <= vxh && \
-	(p)->BoundingBox.X2 >= vxl && \
-	(p)->BoundingBox.Y1 <= vyh && \
-	(p)->BoundingBox.Y2 >= vyl)
-*/
-#define VVIA(v) 	((v)->X+(v)->Thickness >= vxl && (v)->X - (v)->Thickness <= vxh && \
-			(v)->Y+(v)->Thickness >= vyl && (v)->Y - (v)->Thickness  <= vyh)
-#define VTHERM(v) 	((v)->X + (v)->Thickness + (v)->Clearance >= vxl && \
-			(v)->X - (v)->Thickness - (v)->Clearance <= vxh && \
-			(v)->Y + (v)->Thickness + (v)->Thickness >= vyl && \
-			(v)->Y - (v)->Thickness - (v)->Clearance <= vyh)
-
-#undef VELEMENT
-#define VELEMENT(e) 1
-#undef VELTEXT
-#define VELTEXT(e) 1
-#undef VTEXT
-#define VTEXT(e) 1
-#undef VLINE
-#define VLINE(e) 1
-#undef VARC
-#define VARC(e) 1
-#undef VPOLY
-#define VPOLY(e) 1
-#undef VVIA
-#define VVIA(e) 1
-#undef VTHERM
-#define VTHERM(e) 1
-
-/* ---------------------------------------------------------------------------
  * layer macros
  */
 #define	LAYER_ON_STACK(n)	(&PCB->Data->Layer[LayerStack[(n)]])

commit 198057f8123c97ab84fcfff96cb5bf633f842187
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove some old unused coordinate conversion macros from the core
    
    Sadly, there are still some left to expunge which are being used - and
    their usage appears broken in many cases!

diff --git a/src/draw.c b/src/draw.c
index 76c9a89..865bab2 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -1001,8 +1001,6 @@ DrawPinOrViaNameLowLevel (PinTypePtr Ptr)
       AddPart (&box);
       return;
     }
-/*printf("DrawPin(%d,%d): x=%d y=%d w=%d h=%d\n",
-  TO_DRAW_X(Ptr->X), TO_DRAW_Y(Ptr->Y), box.X1, box.Y1, width, height);*/
 
   gui->set_color (Output.fgGC, PCB->PinNameColor);
 
diff --git a/src/line.c b/src/line.c
index d1faaec..0411afc 100644
--- a/src/line.c
+++ b/src/line.c
@@ -31,8 +31,6 @@
 #include "config.h"
 #endif
 
-#define NUDGE (TO_PCB (6))
-
 #include <math.h>
 #include <setjmp.h>
 #include <stdlib.h>
diff --git a/src/macro.h b/src/macro.h
index ddb1fb3..1a82f69 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -40,28 +40,13 @@
 #define	SWAP_IDENT			Settings.ShowSolderSide
 #endif
 
-#ifndef XORIG
-#define XORIG Xorig
-#define YORIG Yorig
-#endif
-
 #define	SWAP_SIGN_X(x)		(x)
 #define	SWAP_SIGN_Y(y)		(-(y))
 #define	SWAP_ANGLE(a)		(-(a))
 #define	SWAP_DELTA(d)		(-(d))
 #define	SWAP_X(x)		(SWAP_SIGN_X(x))
 #define	SWAP_Y(y)		(PCB->MaxHeight +SWAP_SIGN_Y(y))
-#define SATURATE(x)             ((x) > 32767 ? 32767 : ((x) < -32767 ? -32767 : (x)))
-
-#define	TO_DRAW_X(x)		TO_SCREEN((SWAP_IDENT ? SWAP_X(x) : (x)) - XORIG)
-#define	TO_DRAWABS_X(x)		(TO_SCREEN((x) - XORIG))
-#define	TO_DRAW_Y(y)		TO_SCREEN((SWAP_IDENT ? SWAP_Y(y) : (y)) - YORIG)
-#define	TO_DRAWABS_Y(y)		(TO_SCREEN((y) - YORIG))
-#define TO_LIMIT_X(x)           ((Position)(SATURATE(Local_Zoom * ((x) - XORIG))))
-#define TO_LIMIT_Y(y)           ((Position)(SATURATE(Local_Zoom * \
-                                ((SWAP_IDENT ? SWAP_Y(y) : (y)) - YORIG))))
-#define	TO_SCREEN_ANGLE(a)	(SWAP_IDENT ? SWAP_ANGLE((a)) : (a))
-#define	TO_SCREEN_DELTA(d)	(SWAP_IDENT ? SWAP_DELTA((d)) : (d))
+
 #define	TO_SCREEN_SIGN_X(x)	(SWAP_IDENT ? SWAP_SIGN_X(x) : (x))
 #define	TO_SCREEN_SIGN_Y(y)	(SWAP_IDENT ? SWAP_SIGN_Y(y) : (y))
 
@@ -71,9 +56,6 @@
 #define	TO_PCB_X(x)		TO_PCB(x) + Xorig
 #define	TO_PCB_Y(y)		(SWAP_IDENT ? \
 				PCB->MaxHeight - TO_PCB(y) - Yorig : TO_PCB(y) + Yorig)
-#ifdef __GNUC__
-#pragma GCC poison TO_SCREEN TO_SCREEN_X TO_SCREEN_Y
-#endif
 
 /* ---------------------------------------------------------------------------
  * misc macros, some might already be defined by <limits.h>




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