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

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



The branch, master has been updated
       via  356d1e05840111c190490f2e6b2e5987a2d2364c (commit)
       via  9f239a9c2e0a16c15070d90cb128d3688da0ebac (commit)
      from  8e70de4d87dd2bf1979ddf17ce235bb0e2f7d113 (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/action.c                     |  178 ++++++++++++------------
 src/autoplace.c                  |   56 ++++----
 src/autoroute.c                  |   40 +++---
 src/buffer.c                     |  112 +++++++-------
 src/buffer.h                     |   22 ++--
 src/change.c                     |  270 +++++++++++++++++-----------------
 src/change.h                     |   10 +-
 src/copy.c                       |   52 ++++----
 src/copy.h                       |    6 +-
 src/create.c                     |  154 ++++++++++----------
 src/create.h                     |   71 ++++------
 src/crosshair.c                  |   64 ++++----
 src/data.c                       |    2 +-
 src/data.h                       |    2 +-
 src/djopt.c                      |    6 +-
 src/draw.c                       |  152 ++++++++++----------
 src/draw.h                       |   62 ++++----
 src/drill.c                      |   40 +++---
 src/drill.h                      |    6 +-
 src/edif.y                       |    8 +-
 src/file.c                       |   52 ++++----
 src/find.c                       |  293 +++++++++++++++++++-------------------
 src/find.h                       |   22 ++--
 src/fontmode.c                   |    8 +-
 src/global.h                     |  151 ++++++++++----------
 src/hid/gerber/gerber.c          |    2 +-
 src/hid/gtk/gtkhid-gl.c          |    2 +-
 src/hid/gtk/gtkhid-main.c        |    2 +-
 src/hid/gtk/gui-drc-window.c     |    2 +-
 src/hid/gtk/gui-netlist-window.c |    4 +-
 src/hid/gtk/gui-output-events.c  |    4 +-
 src/hid/gtk/gui.h                |    6 +-
 src/hid/lesstif/netlist.c        |   20 ++--
 src/hid/nelma/nelma.c            |   14 +-
 src/hid/ps/ps.c                  |    4 +-
 src/insert.c                     |   26 ++--
 src/insert.h                     |    2 +-
 src/intersect.c                  |   22 ++--
 src/intersect.h                  |    4 +-
 src/line.c                       |   20 ++--
 src/line.h                       |    2 +-
 src/macro.h                      |   56 ++++----
 src/mirror.c                     |    2 +-
 src/mirror.h                     |    2 +-
 src/misc.c                       |   98 +++++++-------
 src/misc.h                       |   46 +++---
 src/move.c                       |   84 ++++++------
 src/move.h                       |    8 +-
 src/mtspace.c                    |    4 +-
 src/mymem.c                      |  126 ++++++++--------
 src/mymem.h                      |   72 +++++-----
 src/netlist.c                    |    4 +-
 src/parse_l.h                    |    8 +-
 src/parse_l.l                    |   20 ++-
 src/parse_y.y                    |   30 ++--
 src/polygon.c                    |  116 ++++++++--------
 src/polygon.h                    |   24 ++--
 src/polygon1.c                   |    8 +-
 src/print.c                      |   14 +-
 src/puller.c                     |   96 ++++++------
 src/rats.c                       |  124 ++++++++--------
 src/rats.h                       |   12 +-
 src/remove.c                     |   88 ++++++------
 src/remove.h                     |   14 +-
 src/report.c                     |   68 +++++-----
 src/rotate.c                     |   58 ++++----
 src/rotate.h                     |   14 +-
 src/rubberband.c                 |  102 +++++++-------
 src/search.c                     |  258 +++++++++++++++++-----------------
 src/search.h                     |   24 ++--
 src/select.c                     |   74 +++++-----
 src/select.h                     |    6 +-
 src/thermal.c                    |    8 +-
 src/thermal.h                    |    2 +-
 src/toporouter.c                 |    8 +-
 src/undo.c                       |  263 ++++++++++++++++------------------
 src/undo.h                       |    2 +-
 src/vendor.c                     |    2 +-
 src/vendor.h                     |    2 +-
 79 files changed, 1948 insertions(+), 1974 deletions(-)


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

commit 356d1e05840111c190490f2e6b2e5987a2d2364c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove *TypePtr and *TypeHandle aliases now we no longer use them
    
    (May break build of plugins, hence keeping this as a separately
    revertable commit).

:100644 100644 4b21931... 7b28396... M	src/global.h
:100644 100644 71c0a84... 46061a3... M	src/mymem.h

commit 9f239a9c2e0a16c15070d90cb128d3688da0ebac
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove usage of *TypePtr and *TypeHandle type aliases
    
    Coverity already caught several bugs where we mixed up the various
    FooType FooTypePtr and FooTypeHandle types when passing to sizeof().
    
    Personally I find it much easier to follow FooType * and FooType **,
    so drop the aliases and hopefully keep things earier to follow.

:100644 100644 b1c33ab... affefba... M	src/action.c
:100644 100644 e7cdee8... 21ab5f2... M	src/autoplace.c
:100644 100644 374b6ac... 8081262... M	src/autoroute.c
:100644 100644 1f9293a... 0394f2f... M	src/buffer.c
:100644 100644 6871216... 6a264ea... M	src/buffer.h
:100644 100644 aaad7a2... f7d571c... M	src/change.c
:100644 100644 3fd896d... f42842a... M	src/change.h
:100644 100644 193bb52... 9d92ced... M	src/copy.c
:100644 100644 af0b7ff... e9871fc... M	src/copy.h
:100644 100644 8a1effd... 9ed7caa... M	src/create.c
:100644 100644 faebe52... 4872514... M	src/create.h
:100644 100644 055f390... f0526b8... M	src/crosshair.c
:100644 100644 702d9ca... 9d6588c... M	src/data.c
:100644 100644 efb2ed1... 28cbfda... M	src/data.h
:100644 100644 a377508... 8a51d0e... M	src/djopt.c
:100644 100644 a11c6e2... ae1e99a... M	src/draw.c
:100644 100644 cc0822f... c7ffa97... M	src/draw.h
:100644 100644 efa9baa... 7830e49... M	src/drill.c
:100644 100644 f155a72... e9c4e92... M	src/drill.h
:100644 100644 cb31d9a... e5a606d... M	src/edif.y
:100644 100644 c157659... 1f5c406... M	src/file.c
:100644 100644 fa03ba7... d854b0b... M	src/find.c
:100644 100644 1d54111... 6ccc81f... M	src/find.h
:100644 100644 f218e7c... e09f825... M	src/fontmode.c
:100644 100644 79c1456... 4b21931... M	src/global.h
:100644 100644 dd9c1c9... 2181718... M	src/hid/gerber/gerber.c
:100644 100644 7471afc... f3133ec... M	src/hid/gtk/gtkhid-gl.c
:100644 100644 d8bf02c... db7d831... M	src/hid/gtk/gtkhid-main.c
:100644 100644 9cbc955... 1613923... M	src/hid/gtk/gui-drc-window.c
:100644 100644 51192c6... 447b10e... M	src/hid/gtk/gui-netlist-window.c
:100644 100644 20e8e03... 2ca39de... M	src/hid/gtk/gui-output-events.c
:100644 100644 788553e... e4d55dd... M	src/hid/gtk/gui.h
:100644 100644 572fba1... ba2cd4b... M	src/hid/lesstif/netlist.c
:100644 100644 fd0aa11... 048f476... M	src/hid/nelma/nelma.c
:100644 100644 263a240... ebab761... M	src/hid/ps/ps.c
:100644 100644 7e12874... a254998... M	src/insert.c
:100644 100644 2793edf... 31fc6dc... M	src/insert.h
:100644 100644 33b359d... 59aa064... M	src/intersect.c
:100644 100644 7ed758e... f3e3205... M	src/intersect.h
:100644 100644 6846b2d... 8898238... M	src/line.c
:100644 100644 8a5e4d2... 8552cae... M	src/line.h
:100644 100644 59c53ba... 715f0c9... M	src/macro.h
:100644 100644 54c53cb... 1adeda9... M	src/mirror.c
:100644 100644 50f648a... 97ea0bb... M	src/mirror.h
:100644 100644 13ce8f6... f675079... M	src/misc.c
:100644 100644 2f34cfe... 9ce0905... M	src/misc.h
:100644 100644 f1971d5... 8f7045d... M	src/move.c
:100644 100644 801a5cc... f91602e... M	src/move.h
:100644 100644 8bb3a8c... 3eba55a... M	src/mtspace.c
:100644 100644 c79e068... 3de31f6... M	src/mymem.c
:100644 100644 88c5628... 71c0a84... M	src/mymem.h
:100644 100644 f467f52... d47f7d2... M	src/netlist.c
:100644 100644 dfeed70... d11b0c8... M	src/parse_l.h
:100644 100644 c0ec6a7... 882fd2c... M	src/parse_l.l
:100644 100644 adc2387... 2ae9f6c... M	src/parse_y.y
:100644 100644 1114e33... 2d3e9e4... M	src/polygon.c
:100644 100644 e5d1ace... c217653... M	src/polygon.h
:100644 100644 9da353e... 667e26d... M	src/polygon1.c
:100644 100644 6d984a6... 972d13e... M	src/print.c
:100644 100644 90f082a... 7c9f0f9... M	src/puller.c
:100644 100644 fc6948f... e7221fa... M	src/rats.c
:100644 100644 16e5338... dc7479b... M	src/rats.h
:100644 100644 d38805f... 39af48f... M	src/remove.c
:100644 100644 9066428... f1f4596... M	src/remove.h
:100644 100644 d461bd2... 64db36a... M	src/report.c
:100644 100644 99f379d... fb23ba1... M	src/rotate.c
:100644 100644 2ac060e... 85a9361... M	src/rotate.h
:100644 100644 f5f7442... cd2c4f6... M	src/rubberband.c
:100644 100644 29271f0... 5f4ea5e... M	src/search.c
:100644 100644 30553dd... bdf460e... M	src/search.h
:100644 100644 31ea28d... 4cdc008... M	src/select.c
:100644 100644 6d91278... 3e0369f... M	src/select.h
:100644 100644 d2cfa95... 2f91d7d... M	src/thermal.c
:100644 100644 b252f4f... c476420... M	src/thermal.h
:100644 100644 d31c788... 0a83569... M	src/toporouter.c
:100644 100644 c3fc57e... ca41c74... M	src/undo.c
:100644 100644 2ec6442... f415c3c... M	src/undo.h
:100644 100644 f7b89f7... fbed9f0... M	src/vendor.c
:100644 100644 9706448... 26e3dc5... M	src/vendor.h

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

commit 356d1e05840111c190490f2e6b2e5987a2d2364c
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove *TypePtr and *TypeHandle aliases now we no longer use them
    
    (May break build of plugins, hence keeping this as a separately
    revertable commit).

diff --git a/src/global.h b/src/global.h
index 4b21931..7b28396 100644
--- a/src/global.h
+++ b/src/global.h
@@ -118,7 +118,7 @@ typedef struct
 {
   unsigned long f;		/* generic flags */
   unsigned char t[(MAX_LAYER + 1) / 2];	/* thermals */
-} FlagType, *FlagTypePtr;
+} FlagType;
 
 #ifndef __GNUC__
 #define __FUNCTION1(a,b) a ":" #b
@@ -190,7 +190,7 @@ typedef struct			/* holds information about output window */
     fgGC,			/* changed from some routines */
     pmGC;			/* depth 1 pixmap GC to store clip */
 }
-OutputType, *OutputTypePtr;
+OutputType;
 
 /* ----------------------------------------------------------------------
  * layer group. A layer group identifies layers which are always switched
@@ -200,7 +200,7 @@ typedef struct
 {
   Cardinal Number[MAX_LAYER],	/* number of entries per groups */
     Entries[MAX_LAYER][MAX_LAYER + 2];
-} LayerGroupType, *LayerGroupTypePtr;
+} LayerGroupType;
 
 struct BoxType		/* a bounding box */
 {
@@ -212,13 +212,13 @@ typedef struct
 {
   Coord x, y;
   Coord width, height;
-} RectangleType, *RectangleTypePtr;
+} RectangleType;
 
 typedef struct
 {
   char *name;
   char *value;
-} AttributeType, *AttributeTypePtr;
+} AttributeType;
 
 struct AttributeListType
 {
@@ -234,24 +234,24 @@ struct AttributeListType
    based on this. */
 typedef struct {
   ANYOBJECTFIELDS;
-} AnyObjectType, *AnyObjectTypePtr;
+} AnyObjectType;
 
 typedef struct			/* a line/polygon point */
 {
   Coord X, Y, X2, Y2;	/* so Point type can be cast as BoxType */
   long int ID;
-} PointType, *PointTypePtr;
+} PointType;
 
 /* Lines, rats, pads, etc.  */
 typedef struct {
   ANYLINEFIELDS;
-} AnyLineObjectType, *AnyLineObjectTypePtr;
+} AnyLineObjectType;
 
 typedef struct			/* holds information about one line */
 {
   ANYLINEFIELDS;
   char *Number;
-} LineType, *LineTypePtr;
+} LineType;
 
 typedef struct
 {
@@ -261,7 +261,7 @@ typedef struct
   BYTE Direction;
   char *TextString;		/* string */
   void *Element;
-} TextType, *TextTypePtr;
+} TextType;
 
 struct polygon_st			/* holds information about a polygon */
 {
@@ -287,7 +287,7 @@ typedef struct			/* holds information about arcs */
   Coord Width, Height,		/* length of axis */
     X, Y;			/* center coordinates */
   Angle StartAngle, Delta;	/* the two limiting angles in degrees */
-} ArcType, *ArcTypePtr;
+} ArcType;
 
 struct rtree
 {
@@ -313,13 +313,13 @@ typedef struct			/* holds information about one layer */
   AttributeListType Attributes;
   int no_drc; /* whether to ignore the layer when checking the design rules */
 }
-LayerType, *LayerTypePtr;
+LayerType;
 
 typedef struct			/* a rat-line */
 {
   ANYLINEFIELDS;
   Cardinal group1, group2;	/* the layer group each point is on */
-} RatType, *RatTypePtr;
+} RatType;
 
 struct pad_st			/* a SMD pad */
 {
@@ -365,7 +365,7 @@ typedef struct
   GList *Arc;
   BoxType VBox;
   AttributeListType Attributes;
-} ElementType, *ElementTypePtr, **ElementTypeHandle;
+} ElementType;
 
 /* ---------------------------------------------------------------------------
  * symbol and font related stuff
@@ -378,7 +378,7 @@ typedef struct			/* a single symbol */
     LineMax;
   Coord Width, Height,		/* size of cell */
     Delta;			/* distance to next symbol */
-} SymbolType, *SymbolTypePtr;
+} SymbolType;
 
 typedef struct			/* complete set of symbols */
 {
@@ -387,7 +387,7 @@ typedef struct			/* complete set of symbols */
   BoxType DefaultSymbol;	/* the default symbol is a filled box */
   SymbolType Symbol[MAX_FONTPOSITION + 1];
   bool Valid;
-} FontType, *FontTypePtr;
+} FontType;
 
 typedef struct			/* holds all objects */
 {
@@ -403,7 +403,7 @@ typedef struct			/* holds all objects */
   struct PCBType *pcb;
   LayerType Layer[MAX_LAYER + 2];	/* add 2 silkscreen layers */
   int polyClip;
-} DataType, *DataTypePtr;
+} DataType;
 
 typedef struct			/* holds drill information */
 {
@@ -417,14 +417,14 @@ typedef struct			/* holds drill information */
     PinMax;			/* max number of coordinates from malloc() */
   PinType **Pin;		/* coordinates to drill */
   ElementType **Element;	/* a pointer to an array of element pointers */
-} DrillType, *DrillTypePtr;
+} DrillType;
 
 typedef struct			/* holds a range of Drill Infos */
 {
   Cardinal DrillN,		/* number of drill sizes */
     DrillMax;			/* max number from malloc() */
   DrillType *Drill;		/* plated holes */
-} DrillInfoType, *DrillInfoTypePtr;
+} DrillInfoType;
 
 typedef struct
 {
@@ -434,7 +434,7 @@ typedef struct
     Keepaway;			/* min. separation from other nets */
   char *Name;
   int index;
-} RouteStyleType, *RouteStyleTypePtr;
+} RouteStyleType;
 
 /* ---------------------------------------------------------------------------
  * structure used by library routines
@@ -448,8 +448,7 @@ typedef struct
    *Package,			/* package */
    *Value,			/* the value field */
    *Description;		/* some descritional text */
-} LibraryEntryType, *LibraryEntryTypePtr;
-//typedef LibraryEntryType *LibraryEntryTypePtr;
+} LibraryEntryType;
 
 /* If the internal flag is set, the only field that is valid is Name,
    and the struct is allocated with malloc instead of
@@ -467,14 +466,14 @@ typedef struct
   char flag;			/* used by the netlist window to enable/disable nets */
   char internal;		/* if set, this is an internal-only entry, not
 				   part of the global netlist. */
-} LibraryMenuType, *LibraryMenuTypePtr;
+} LibraryMenuType;
 
 typedef struct
 {
   Cardinal MenuN;               /* number of objects */
   Cardinal MenuMax;             /* number of reserved memory locations */
   LibraryMenuType *Menu;      /* the entries */
-} LibraryType, *LibraryTypePtr;
+} LibraryType;
 
 
   /* The PCBType struct holds information about board layout most of which is
@@ -528,7 +527,7 @@ typedef struct PCBType
 
   bool is_footprint;		/* If set, the user has loaded a footprint, not a pcb. */
 }
-PCBType, *PCBTypePtr;
+PCBType;
 
 typedef struct			/* information about the paste buffer */
 {
@@ -536,7 +535,7 @@ typedef struct			/* information about the paste buffer */
   BoxType BoundingBox;
   DataType *Data;		/* data; not all members of PCBType */
   /* are used */
-} BufferType, *BufferTypePtr;
+} BufferType;
 
 /* ---------------------------------------------------------------------------
  * some types for cursor drawing, setting of block and lines
@@ -547,7 +546,7 @@ typedef struct			/* rubberband lines for element moves */
   LayerType *Layer;		/* layer that holds the line */
   LineType *Line;		/* the line itself */
   PointType *MovedPoint;	/* and finally the point */
-} RubberbandType, *RubberbandTypePtr;
+} RubberbandType;
 
 typedef struct			/* current marked line */
 {
@@ -555,7 +554,7 @@ typedef struct			/* current marked line */
     Point2;
   long int State;
   bool draw;
-} AttachedLineType, *AttachedLineTypePtr;
+} AttachedLineType;
 
 typedef struct			/* currently marked block */
 {
@@ -563,7 +562,7 @@ typedef struct			/* currently marked block */
     Point2;
   long int State;
   bool otherway;
-} AttachedBoxType, *AttachedBoxTypePtr;
+} AttachedBoxType;
 
 typedef struct			/* currently attached object */
 {
@@ -577,7 +576,7 @@ typedef struct			/* currently attached object */
   Cardinal RubberbandN,		/* number of lines in array */
     RubberbandMax;
   RubberbandType *Rubberband;
-} AttachedObjectType, *AttachedObjectTypePtr;
+} AttachedObjectType;
 
 enum crosshair_shape
 {
@@ -599,13 +598,13 @@ typedef struct			/* holds cursor information */
   PolygonType AttachedPolygon;
   AttachedObjectType AttachedObject;	/* data of attached objects */
   enum crosshair_shape shape; 	/* shape of crosshair */
-} CrosshairType, *CrosshairTypePtr;
+} CrosshairType;
 
 typedef struct
 {
   bool status;
   Coord X, Y;
-} MarkType, *MarkTypePtr;
+} MarkType;
 
 /* ---------------------------------------------------------------------------
  * our resources
@@ -696,7 +695,7 @@ typedef struct			/* some resources... */
     AutoPlace;			/* flag which says we should force placement of the
 				   windows on startup */
 }
-SettingType, *SettingTypePtr;
+SettingType;
 
 /* ----------------------------------------------------------------------
  * pointer to low-level copy, move and rotate functions
@@ -715,7 +714,7 @@ typedef struct
   void *(*Point) (LayerType *, PolygonType *, PointType *);
   void *(*Arc) (LayerType *, ArcType *);
   void *(*Rat) (RatType *);
-} ObjectFunctionType, *ObjectFunctionTypePtr;
+} ObjectFunctionType;
 
 /* ---------------------------------------------------------------------------
  * structure used by device drivers
@@ -728,7 +727,7 @@ typedef struct			/* holds a connection */
   void *ptr1, *ptr2;		/* the object of the connection */
   Cardinal group;		/* the layer group of the connection */
   LibraryMenuType *menu;	/* the netmenu this *SHOULD* belong too */
-} ConnectionType, *ConnectionTypePtr;
+} ConnectionType;
 
 typedef struct			/* holds a net of connections */
 {
@@ -736,28 +735,28 @@ typedef struct			/* holds a net of connections */
     ConnectionMax;		/* max connections from malloc */
   ConnectionType *Connection;
   RouteStyleType *Style;
-} NetType, *NetTypePtr;
+} NetType;
 
 typedef struct			/* holds a list of nets */
 {
   Cardinal NetN,		/* the number of subnets contained */
     NetMax;			/* max subnets from malloc */
   NetType *Net;
-} NetListType, *NetListTypePtr;
+} NetListType;
 
 typedef struct			/* holds a list of net lists */
 {
   Cardinal NetListN,		/* the number of net lists contained */
     NetListMax;			/* max net lists from malloc */
   NetListType *NetList;
-} NetListListType, *NetListListTypePtr;
+} NetListListType;
 
 typedef struct			/* holds a generic list of pointers */
 {
   Cardinal PtrN,		/* the number of pointers contained */
     PtrMax;			/* max subnets from malloc */
   void **Ptr;
-} PointerListType, *PointerListTypePtr;
+} PointerListType;
 
 typedef struct
 {
@@ -765,7 +764,7 @@ typedef struct
     BoxMax;			/* max boxes from malloc */
   BoxType *Box;
 
-} BoxListType, *BoxListTypePtr;
+} BoxListType;
 
 struct drc_violation_st
 {
diff --git a/src/mymem.h b/src/mymem.h
index 71c0a84..46061a3 100644
--- a/src/mymem.h
+++ b/src/mymem.h
@@ -62,7 +62,7 @@ typedef struct
 {
   size_t MaxLength;
   char *Data;
-} DynamicStringType, *DynamicStringTypePtr;
+} DynamicStringType;
 
 RubberbandType * GetRubberbandMemory (void);
 PinType * GetPinMemory (ElementType *);

commit 9f239a9c2e0a16c15070d90cb128d3688da0ebac
Author: Peter Clifton <pcjc2@xxxxxxxxx>
Commit: Peter Clifton <pcjc2@xxxxxxxxx>

    Remove usage of *TypePtr and *TypeHandle type aliases
    
    Coverity already caught several bugs where we mixed up the various
    FooType FooTypePtr and FooTypeHandle types when passing to sizeof().
    
    Personally I find it much easier to follow FooType * and FooType **,
    so drop the aliases and hopefully keep things earier to follow.

diff --git a/src/action.c b/src/action.c
index b1c33ab..affefba 100644
--- a/src/action.c
+++ b/src/action.c
@@ -216,7 +216,7 @@ typedef struct			/* used to identify subfunctions */
   char *Identifier;
   FunctionID ID;
 }
-FunctionType, *FunctionTypePtr;
+FunctionType;
 
 /* --------------------------------------------------------------------------- */
 
@@ -295,10 +295,10 @@ either round or, if the octagon flag is set, octagonal.
  * some local identifiers
  */
 static PointType InsertedPoint;
-static LayerTypePtr lastLayer;
+static LayerType *lastLayer;
 static struct
 {
-  PolygonTypePtr poly;
+  PolygonType *poly;
   LineType line;
 }
 fake;
@@ -823,7 +823,7 @@ AdjustAttachedBox (void)
 void
 AdjustAttachedObjects (void)
 {
-  PointTypePtr pnt;
+  PointType *pnt;
   switch (Settings.Mode)
     {
       /* update at least an attached block (selection) */
@@ -897,13 +897,13 @@ NotifyLine (void)
       if (type == PIN_TYPE || type == VIA_TYPE)
 	{
 	  Crosshair.AttachedLine.Point1.X =
-	    Crosshair.AttachedLine.Point2.X = ((PinTypePtr) ptr2)->X;
+	    Crosshair.AttachedLine.Point2.X = ((PinType *) ptr2)->X;
 	  Crosshair.AttachedLine.Point1.Y =
-	    Crosshair.AttachedLine.Point2.Y = ((PinTypePtr) ptr2)->Y;
+	    Crosshair.AttachedLine.Point2.Y = ((PinType *) ptr2)->Y;
 	}
       else if (type == PAD_TYPE)
 	{
-	  PadTypePtr pad = (PadTypePtr) ptr2;
+	  PadType *pad = (PadType *) ptr2;
 	  double d1 = Distance (Crosshair.X, Crosshair.Y, pad->Point1.X, pad->Point1.Y);
 	  double d2 = Distance (Crosshair.X, Crosshair.Y, pad->Point2.X, pad->Point2.Y);
 	  if (d2 < d1)
@@ -996,7 +996,7 @@ NotifyMode (void)
 	  {
 	    type = SearchScreen (Note.X, Note.Y, test, &ptr1, &ptr2, &ptr3);
 	    if (!Note.Hit && (type & MOVE_TYPES) &&
-		!TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+		!TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 	      {
 		Note.Hit = type;
 		Note.ptr1 = ptr1;
@@ -1004,7 +1004,7 @@ NotifyMode (void)
 		Note.ptr3 = ptr3;
 	      }
 	    if (!Note.Moving && (type & SELECT_TYPES) &&
-		TEST_FLAG (SELECTEDFLAG, (PinTypePtr) ptr2))
+		TEST_FLAG (SELECTEDFLAG, (PinType *) ptr2))
 	      Note.Moving = true;
 	    if ((Note.Hit && Note.Moving) || type == NO_TYPE)
 	      break;
@@ -1014,7 +1014,7 @@ NotifyMode (void)
 
     case VIA_MODE:
       {
-	PinTypePtr via;
+	PinType *via;
 
 	if (!PCB->ViaOn)
 	  {
@@ -1052,7 +1052,7 @@ NotifyMode (void)
 	  case STATE_SECOND:
 	  case STATE_THIRD:
 	    {
-	      ArcTypePtr arc;
+	      ArcType *arc;
 	      Coord wx, wy;
 	      Angle sa, dir;
 
@@ -1105,7 +1105,7 @@ NotifyMode (void)
 							       CLEARLINEFLAG :
 							       0))))
 		{
-		  BoxTypePtr bx;
+		  BoxType *bx;
 
 		  bx = GetArcEnds (arc);
 		  Crosshair.AttachedBox.Point1.X =
@@ -1129,7 +1129,7 @@ NotifyMode (void)
 	type = SearchScreen (Note.X, Note.Y, LOCK_TYPES, &ptr1, &ptr2, &ptr3);
 	if (type == ELEMENT_TYPE)
 	  {
-	    ElementTypePtr element = (ElementTypePtr) ptr2;
+	    ElementType *element = (ElementType *) ptr2;
 
 	    TOGGLE_FLAG (LOCKFLAG, element);
 	    PIN_LOOP (element);
@@ -1154,7 +1154,7 @@ NotifyMode (void)
 	  }
 	else if (type != NO_TYPE)
 	  {
-	    TextTypePtr thing = (TextTypePtr) ptr3;
+	    TextType *thing = (TextType *) ptr3;
 	    TOGGLE_FLAG (LOCKFLAG, thing);
 	    if (TEST_FLAG (LOCKFLAG, thing)
 		&& TEST_FLAG (SELECTEDFLAG, thing))
@@ -1174,17 +1174,17 @@ NotifyMode (void)
 	      =
 	      SearchScreen (Note.X, Note.Y, PIN_TYPES, &ptr1, &ptr2,
 			    &ptr3)) != NO_TYPE)
-	    && !TEST_FLAG (HOLEFLAG, (PinTypePtr) ptr3))
+	    && !TEST_FLAG (HOLEFLAG, (PinType *) ptr3))
 	  {
 	    if (gui->shift_is_pressed ())
 	      {
-		int tstyle = GET_THERM (INDEXOFCURRENT, (PinTypePtr) ptr3);
+		int tstyle = GET_THERM (INDEXOFCURRENT, (PinType *) ptr3);
 		tstyle++;
 		if (tstyle > 5)
 		  tstyle = 1;
 		ChangeObjectThermal (type, ptr1, ptr2, ptr3, tstyle);
 	      }
-	    else if (GET_THERM (INDEXOFCURRENT, (PinTypePtr) ptr3))
+	    else if (GET_THERM (INDEXOFCURRENT, (PinType *) ptr3))
 	      ChangeObjectThermal (type, ptr1, ptr2, ptr3, 0);
 	    else
 	      ChangeObjectThermal (type, ptr1, ptr2, ptr3, PCB->ThermStyle);
@@ -1213,7 +1213,7 @@ NotifyMode (void)
 
       if (PCB->RatDraw)
 	{
-	  RatTypePtr line;
+	  RatType *line;
 	  if ((line = AddNet ()))
 	    {
 	      addedLines++;
@@ -1231,7 +1231,7 @@ NotifyMode (void)
       else
 	/* create line if both ends are determined && length != 0 */
 	{
-	  LineTypePtr line;
+	  LineType *line;
 	  int maybe_found_flag;
 
 	  if (PCB->Clipping
@@ -1273,7 +1273,7 @@ NotifyMode (void)
 						       PCB) ? CLEARLINEFLAG :
 						      0)))) != NULL)
 	    {
-	      PinTypePtr via;
+	      PinType *via;
 
 	      addedLines++;
 	      AddObjectToCreateUndoList (LINE_TYPE, CURRENT, line, line);
@@ -1355,7 +1355,7 @@ NotifyMode (void)
 	  Crosshair.AttachedBox.Point1.X != Crosshair.AttachedBox.Point2.X &&
 	  Crosshair.AttachedBox.Point1.Y != Crosshair.AttachedBox.Point2.Y)
 	{
-	  PolygonTypePtr polygon;
+	  PolygonType *polygon;
 
 	  int flags = CLEARPOLYFLAG;
 	  if (TEST_FLAG (NEWFULLPOLYFLAG, PCB))
@@ -1393,7 +1393,7 @@ NotifyMode (void)
 	  {
 	    if (strlen(string) > 0)
 	      {
-		TextTypePtr text;
+		TextType *text;
 		int flag = CLEARLINEFLAG;
 
 		if (GetLayerGroupNumberByNumber (INDEXOFCURRENT) ==
@@ -1416,7 +1416,7 @@ NotifyMode (void)
 
     case POLYGON_MODE:
       {
-	PointTypePtr points = Crosshair.AttachedPolygon.Points;
+	PointType *points = Crosshair.AttachedPolygon.Points;
 	Cardinal n = Crosshair.AttachedPolygon.PointN;
 
 	/* do update of position; use the 'LINE_MODE' mechanism */
@@ -1464,7 +1464,7 @@ NotifyMode (void)
 
 	    if (Crosshair.AttachedObject.Type != NO_TYPE)
 	      {
-		if (TEST_FLAG (LOCKFLAG, (PolygonTypePtr)
+		if (TEST_FLAG (LOCKFLAG, (PolygonType *)
 			       Crosshair.AttachedObject.Ptr2))
 		  {
 		    Message (_("Sorry, the object is locked\n"));
@@ -1479,7 +1479,7 @@ NotifyMode (void)
             /* second notify, insert new point into object */
           case STATE_SECOND:
             {
-	      PointTypePtr points = Crosshair.AttachedPolygon.Points;
+	      PointType *points = Crosshair.AttachedPolygon.Points;
 	      Cardinal n = Crosshair.AttachedPolygon.PointN;
 	      POLYAREA *original, *new_hole, *result;
 	      FlagType Flags;
@@ -1548,7 +1548,7 @@ NotifyMode (void)
     case PASTEBUFFER_MODE:
       {
 	TextType estr[MAX_ELEMENTNAMES];
-	ElementTypePtr e = 0;
+	ElementType *e = 0;
 
 	if (gui->shift_is_pressed ())
 	  {
@@ -1557,7 +1557,7 @@ NotifyMode (void)
 			    &ptr3);
 	    if (type == ELEMENT_TYPE)
 	      {
-		e = (ElementTypePtr) ptr1;
+		e = (ElementType *) ptr1;
 		if (e)
 		  {
 		    int i;
@@ -1580,7 +1580,7 @@ NotifyMode (void)
 	    if (type == ELEMENT_TYPE && ptr1)
 	      {
 		int i, save_n;
-		e = (ElementTypePtr) ptr1;
+		e = (ElementType *) ptr1;
 
 		save_n = NAME_INDEX (PCB);
 
@@ -1608,14 +1608,14 @@ NotifyMode (void)
 	   SearchScreen (Note.X, Note.Y, REMOVE_TYPES, &ptr1, &ptr2,
 			 &ptr3)) != NO_TYPE)
 	{
-	  if (TEST_FLAG (LOCKFLAG, (LineTypePtr) ptr2))
+	  if (TEST_FLAG (LOCKFLAG, (LineType *) ptr2))
 	    {
 	      Message (_("Sorry, the object is locked\n"));
 	      break;
 	    }
 	  if (type == ELEMENT_TYPE)
 	    {
-	      RubberbandTypePtr ptr;
+	      RubberbandType *ptr;
 	      int i;
 
 	      Crosshair.AttachedObject.RubberbandN = 0;
@@ -1624,7 +1624,7 @@ NotifyMode (void)
 	      for (i = 0; i < Crosshair.AttachedObject.RubberbandN; i++)
 		{
 		  if (PCB->RatOn)
-		    EraseRat ((RatTypePtr) ptr->Line);
+		    EraseRat ((RatType *) ptr->Line);
                   if (TEST_FLAG (RUBBERENDFLAG, ptr->Line))
 		    MoveObjectToRemoveUndoList (RATLINE_TYPE,
 					        ptr->Line, ptr->Line,
@@ -1666,7 +1666,7 @@ NotifyMode (void)
 	    if (Crosshair.AttachedObject.Type != NO_TYPE)
 	      {
 		if (Settings.Mode == MOVE_MODE &&
-		    TEST_FLAG (LOCKFLAG, (PinTypePtr)
+		    TEST_FLAG (LOCKFLAG, (PinType *)
 			       Crosshair.AttachedObject.Ptr2))
 		  {
 		    Message (_("Sorry, the object is locked\n"));
@@ -1720,7 +1720,7 @@ NotifyMode (void)
 
 	  if (Crosshair.AttachedObject.Type != NO_TYPE)
 	    {
-	      if (TEST_FLAG (LOCKFLAG, (PolygonTypePtr)
+	      if (TEST_FLAG (LOCKFLAG, (PolygonType *)
 			     Crosshair.AttachedObject.Ptr2))
 		{
 		  Message (_("Sorry, the object is locked\n"));
@@ -1733,7 +1733,7 @@ NotifyMode (void)
 		  if (Crosshair.AttachedObject.Type == POLYGON_TYPE)
 		    {
 		      fake.poly =
-			(PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
+			(PolygonType *) Crosshair.AttachedObject.Ptr2;
 		      polyIndex =
 			GetLowestDistancePolygonPoint (fake.poly, Note.X,
 						       Note.Y);
@@ -1955,7 +1955,7 @@ static int
 ActionFlip (int argc, char **argv, Coord x, Coord y)
 {
   char *function = ARG (0);
-  ElementTypePtr element;
+  ElementType *element;
   void *ptrtmp;
   int err = 0;
 
@@ -1967,7 +1967,7 @@ ActionFlip (int argc, char **argv, Coord x, Coord y)
 	  if ((SearchScreen (x, y, ELEMENT_TYPE,
 			     &ptrtmp, &ptrtmp, &ptrtmp)) != NO_TYPE)
 	    {
-	      element = (ElementTypePtr) ptrtmp;
+	      element = (ElementType *) ptrtmp;
 	      ChangeElementSide (element, 2 * Crosshair.Y - PCB->MaxHeight);
 	      IncrementUndoSerialNumber ();
 	      Draw ();
@@ -2821,7 +2821,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 	  /* display the pinout of an element */
 	case F_Pinout:
 	  {
-	    ElementTypePtr element;
+	    ElementType *element;
 	    void *ptrtmp;
 	    Coord x, y;
 
@@ -2830,7 +2830,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		 (x, y, ELEMENT_TYPE, &ptrtmp,
 		  &ptrtmp, &ptrtmp)) != NO_TYPE)
 	      {
-		element = (ElementTypePtr) ptrtmp;
+		element = (ElementType *) ptrtmp;
 		gui->show_item (element);
 	      }
 	    break;
@@ -2847,7 +2847,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 				  (void **) &ptr3))
 	      {
 	      case ELEMENT_TYPE:
-		PIN_LOOP ((ElementTypePtr) ptr1);
+		PIN_LOOP ((ElementType *) ptr1);
 		{
 		  if (TEST_FLAG (DISPLAYNAMEFLAG, pin))
 		    ErasePinName (pin);
@@ -2857,7 +2857,7 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		  TOGGLE_FLAG (DISPLAYNAMEFLAG, pin);
 		}
 		END_LOOP;
-		PAD_LOOP ((ElementTypePtr) ptr1);
+		PAD_LOOP ((ElementType *) ptr1);
 		{
 		  if (TEST_FLAG (DISPLAYNAMEFLAG, pad))
 		    ErasePadName (pad);
@@ -2873,35 +2873,35 @@ ActionDisplay (int argc, char **argv, Coord childX, Coord childY)
 		break;
 
 	      case PIN_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2))
-		  ErasePinName ((PinTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2))
+		  ErasePinName ((PinType *) ptr2);
 		else
-		  DrawPinName ((PinTypePtr) ptr2);
+		  DrawPinName ((PinType *) ptr2);
 		AddObjectToFlagUndoList (PIN_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
 		break;
 
 	      case PAD_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PadTypePtr) ptr2))
-		  ErasePadName ((PadTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PadType *) ptr2))
+		  ErasePadName ((PadType *) ptr2);
 		else
-		  DrawPadName ((PadTypePtr) ptr2);
+		  DrawPadName ((PadType *) ptr2);
 		AddObjectToFlagUndoList (PAD_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PadTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PadType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
 		break;
 	      case VIA_TYPE:
-		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2))
-		  EraseViaName ((PinTypePtr) ptr2);
+		if (TEST_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2))
+		  EraseViaName ((PinType *) ptr2);
 		else
-		  DrawViaName ((PinTypePtr) ptr2);
+		  DrawViaName ((PinType *) ptr2);
 		AddObjectToFlagUndoList (VIA_TYPE, ptr1, ptr2, ptr3);
-		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinTypePtr) ptr2);
+		TOGGLE_FLAG (DISPLAYNAMEFLAG, (PinType *) ptr2);
 		SetChangedFlag (true);
 		IncrementUndoSerialNumber ();
 		Draw ();
@@ -3248,8 +3248,8 @@ static int
 ActionRenumber (int argc, char **argv, Coord x, Coord y)
 {
   bool changed = false;
-  ElementTypePtr *element_list;
-  ElementTypePtr *locked_element_list;
+  ElementType **element_list;
+  ElementType **locked_element_list;
   unsigned int i, j, k, cnt, lock_cnt;
   unsigned int tmpi;
   size_t sz;
@@ -3329,8 +3329,8 @@ ActionRenumber (int argc, char **argv, Coord x, Coord y)
    *
    * We'll actually renumber things in the 2nd pass.
    */
-  element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementTypePtr));
-  locked_element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementTypePtr));
+  element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementType *));
+  locked_element_list = (ElementType **)calloc (PCB->Data->ElementN, sizeof (ElementType *));
   was = (char **)calloc (PCB->Data->ElementN, sizeof (char *));
   is = (char **)calloc (PCB->Data->ElementN, sizeof (char *));
   if (element_list == NULL || locked_element_list == NULL || was == NULL
@@ -3745,7 +3745,7 @@ static int
 ActionAddRats (int argc, char **argv, Coord x, Coord y)
 {
   char *function = ARG (0);
-  RatTypePtr shorty;
+  RatType *shorty;
   float len, small;
 
   if (function)
@@ -4056,7 +4056,7 @@ ActionChangeSize (int argc, char **argv, Coord x, Coord y)
 	    if ((type =
 		 SearchScreen (Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES,
 			       &ptr1, &ptr2, &ptr3)) != NO_TYPE)
-	      if (TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+	      if (TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 		Message (_("Sorry, the object is locked\n"));
 	    if (ChangeObjectSize (type, ptr1, ptr2, ptr3, value, absolute))
 	      SetChangedFlag (true);
@@ -4586,7 +4586,7 @@ ActionChangeName (int argc, char **argv, Coord x, Coord y)
 		    SetChangedFlag (true);
 		    if (type == ELEMENT_TYPE)
 		      {
-			RubberbandTypePtr ptr;
+			RubberbandType *ptr;
 			int i;
 
 			RestoreUndoSerialNumber ();
@@ -4597,7 +4597,7 @@ ActionChangeName (int argc, char **argv, Coord x, Coord y)
 			     i++, ptr++)
 			  {
 			    if (PCB->RatOn)
-			      EraseRat ((RatTypePtr) ptr->Line);
+			      EraseRat ((RatType *) ptr->Line);
 			    MoveObjectToRemoveUndoList (RATLINE_TYPE,
 							ptr->Line, ptr->Line,
 							ptr->Line);
@@ -4722,9 +4722,9 @@ ActionToggleHideName (int argc, char **argv, Coord x, Coord y)
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE)
 	      {
 		AddObjectToFlagUndoList (type, ptr1, ptr2, ptr3);
-		EraseElementName ((ElementTypePtr) ptr2);
-		TOGGLE_FLAG (HIDENAMEFLAG, (ElementTypePtr) ptr2);
-		DrawElementName ((ElementTypePtr) ptr2);
+		EraseElementName ((ElementType *) ptr2);
+		TOGGLE_FLAG (HIDENAMEFLAG, (ElementType *) ptr2);
+		DrawElementName ((ElementType *) ptr2);
 		Draw ();
 		IncrementUndoSerialNumber ();
 	      }
@@ -5218,7 +5218,7 @@ ActionChangeHole (int argc, char **argv, Coord x, Coord y)
 	    gui->get_coords (_("Select an Object"), &x, &y);
 	    if ((type = SearchScreen (x, y, VIA_TYPE,
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE
-		&& ChangeHole ((PinTypePtr) ptr3))
+		&& ChangeHole ((PinType *) ptr3))
 	      IncrementUndoSerialNumber ();
 	    break;
 	  }
@@ -5266,7 +5266,7 @@ ActionChangePaste (int argc, char **argv, Coord x, Coord y)
 	    gui->get_coords (_("Select an Object"), &x, &y);
 	    if ((type = SearchScreen (x, y, PAD_TYPE,
 				      &ptr1, &ptr2, &ptr3)) != NO_TYPE
-		&& ChangePaste ((PadTypePtr) ptr3))
+		&& ChangePaste ((PadType *) ptr3))
 	      IncrementUndoSerialNumber ();
 	    break;
 	  }
@@ -5721,7 +5721,7 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
 
   if (strcasecmp (function, "ElementConnections") == 0)
     {
-      ElementTypePtr element;
+      ElementType *element;
       void *ptrtmp;
       FILE *fp;
       bool result;
@@ -5729,7 +5729,7 @@ ActionSaveTo (int argc, char **argv, Coord x, Coord y)
       if ((SearchScreen (Crosshair.X, Crosshair.Y, ELEMENT_TYPE,
 			 &ptrtmp, &ptrtmp, &ptrtmp)) != NO_TYPE)
 	{
-	  element = (ElementTypePtr) ptrtmp;
+	  element = (ElementType *) ptrtmp;
 	  if ((fp =
 	       CheckAndOpenFile (name, true, false, &result, NULL)) != NULL)
 	    {
@@ -6197,13 +6197,13 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 	    {
 	      int type;
 	      void *ptr1, *ptr3, *ptrtmp;
-	      LineTypePtr ptr2;
+	      LineType *ptr2;
 	      /* this search is guaranteed to succeed */
 	      SearchObjectByLocation (LINE_TYPE | RATLINE_TYPE, &ptr1,
 				      &ptrtmp, &ptr3,
 				      Crosshair.AttachedLine.Point1.X,
 				      Crosshair.AttachedLine.Point1.Y, 0);
-	      ptr2 = (LineTypePtr) ptrtmp;
+	      ptr2 = (LineType *) ptrtmp;
 
 	      /* save both ends of line */
 	      Crosshair.AttachedLine.Point2.X = ptr2->Point1.X;
@@ -6235,7 +6235,7 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 					  &ptr3,
 					  Crosshair.AttachedLine.Point2.X,
 					  Crosshair.AttachedLine.Point2.Y, 0);
-		  ptr2 = (LineTypePtr) ptrtmp;
+		  ptr2 = (LineType *) ptrtmp;
 	          if (TEST_FLAG (AUTODRCFLAG, PCB))
 		    {
 		      /* undo loses FOUNDFLAG */
@@ -6262,8 +6262,8 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 					  &ptr3,
 					  Crosshair.AttachedLine.Point1.X,
 					  Crosshair.AttachedLine.Point1.Y, 0);
-		  ptr2 = (LineTypePtr) ptrtmp;
-		  lastLayer = (LayerTypePtr) ptr1;
+		  ptr2 = (LineType *) ptrtmp;
+		  lastLayer = (LayerType *) ptr1;
 		}
 	      notify_crosshair_change (true);
 	      return 0;
@@ -6280,12 +6280,12 @@ ActionUndo (int argc, char **argv, Coord x, Coord y)
 	  if (Crosshair.AttachedBox.State == STATE_THIRD)
 	    {
 	      void *ptr1, *ptr2, *ptr3;
-	      BoxTypePtr bx;
+	      BoxType *bx;
 	      /* guaranteed to succeed */
 	      SearchObjectByLocation (ARC_TYPE, &ptr1, &ptr2, &ptr3,
 				      Crosshair.AttachedBox.Point1.X,
 				      Crosshair.AttachedBox.Point1.Y, 0);
-	      bx = GetArcEnds ((ArcTypePtr) ptr2);
+	      bx = GetArcEnds ((ArcType *) ptr2);
 	      Crosshair.AttachedBox.Point1.X =
 		Crosshair.AttachedBox.Point2.X = bx->X1;
 	      Crosshair.AttachedBox.Point1.Y =
@@ -6561,7 +6561,7 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
-  LayerTypePtr layer = CURRENT;
+  LayerType *layer = CURRENT;
 
   type = SearchScreen (x, y, CLONE_TYPES, &ptr1, &ptr2, &ptr3);
 /* set layer current and size from line or arc */
@@ -6569,9 +6569,9 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
     {
     case LINE_TYPE:
       notify_crosshair_change (false);
-      Settings.LineThickness = ((LineTypePtr) ptr2)->Thickness;
-      Settings.Keepaway = ((LineTypePtr) ptr2)->Clearance / 2;
-      layer = (LayerTypePtr) ptr1;
+      Settings.LineThickness = ((LineType *) ptr2)->Thickness;
+      Settings.Keepaway = ((LineType *) ptr2)->Clearance / 2;
+      layer = (LayerType *) ptr1;
       if (Settings.Mode != LINE_MODE)
 	SetMode (LINE_MODE);
       notify_crosshair_change (true);
@@ -6580,9 +6580,9 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
 
     case ARC_TYPE:
       notify_crosshair_change (false);
-      Settings.LineThickness = ((ArcTypePtr) ptr2)->Thickness;
-      Settings.Keepaway = ((ArcTypePtr) ptr2)->Clearance / 2;
-      layer = (LayerTypePtr) ptr1;
+      Settings.LineThickness = ((ArcType *) ptr2)->Thickness;
+      Settings.Keepaway = ((ArcType *) ptr2)->Clearance / 2;
+      layer = (LayerType *) ptr1;
       if (Settings.Mode != ARC_MODE)
 	SetMode (ARC_MODE);
       notify_crosshair_change (true);
@@ -6590,14 +6590,14 @@ ActionSetSame (int argc, char **argv, Coord x, Coord y)
       break;
 
     case POLYGON_TYPE:
-      layer = (LayerTypePtr) ptr1;
+      layer = (LayerType *) ptr1;
       break;
 
     case VIA_TYPE:
       notify_crosshair_change (false);
-      Settings.ViaThickness = ((PinTypePtr) ptr2)->Thickness;
-      Settings.ViaDrillingHole = ((PinTypePtr) ptr2)->DrillingHole;
-      Settings.Keepaway = ((PinTypePtr) ptr2)->Clearance / 2;
+      Settings.ViaThickness = ((PinType *) ptr2)->Thickness;
+      Settings.ViaDrillingHole = ((PinType *) ptr2)->DrillingHole;
+      Settings.Keepaway = ((PinType *) ptr2)->Clearance / 2;
       if (Settings.Mode != VIA_MODE)
 	SetMode (VIA_MODE);
       notify_crosshair_change (true);
@@ -6752,7 +6752,7 @@ ChangeFlag (char *what, char *flag_name, int value, char *cmd_name)
 	if ((type =
 	     SearchScreen (Crosshair.X, Crosshair.Y, CHANGESIZE_TYPES,
 			   &ptr1, &ptr2, &ptr3)) != NO_TYPE)
-	  if (TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+	  if (TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
 	    Message (_("Sorry, the object is locked\n"));
 	if (set_object (type, ptr1, ptr2, ptr3))
 	  SetChangedFlag (true);
@@ -6909,7 +6909,7 @@ find_element_by_refdes (char *refdes)
 }
 
 static AttributeType *
-lookup_attr (AttributeListTypePtr list, const char *name)
+lookup_attr (AttributeListType *list, const char *name)
 {
   int i;
   for (i=0; i<list->Number; i++)
@@ -6919,7 +6919,7 @@ lookup_attr (AttributeListTypePtr list, const char *name)
 }
 
 static void
-delete_attr (AttributeListTypePtr list, AttributeType *attr)
+delete_attr (AttributeListType *list, AttributeType *attr)
 {
   int idx = attr - list->List;
   if (idx < 0 || idx >= list->Number)
@@ -7946,7 +7946,7 @@ ActionAttributes (int argc, char **argv, Coord x, Coord y)
 	    if ((SearchScreen
 		 (x, y, ELEMENT_TYPE, &ptrtmp,
 		  &ptrtmp, &ptrtmp)) != NO_TYPE)
-	      e = (ElementTypePtr) ptrtmp;
+	      e = (ElementType *) ptrtmp;
 	    else
 	      {
 		Message (_("No element found there\n"));
diff --git a/src/autoplace.c b/src/autoplace.c
index e7cdee8..21ab5f2 100644
--- a/src/autoplace.c
+++ b/src/autoplace.c
@@ -74,7 +74,7 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static double ComputeCost (NetListTypePtr Nets, double T0, double T);
+static double ComputeCost (NetListType *Nets, double T0, double T);
 
 /* ---------------------------------------------------------------------------
  * some local types
@@ -123,7 +123,7 @@ CostParameter =
 
 typedef struct
 {
-  ElementTypePtr *element;
+  ElementType **element;
   Cardinal elementN;
 }
 ElementPtrListType;
@@ -133,11 +133,11 @@ enum ewhich
 
 typedef struct
 {
-  ElementTypePtr element;
+  ElementType *element;
   enum ewhich which;
   Coord DX, DY;			/* for shift */
   unsigned rotate;		/* for rotate/flip */
-  ElementTypePtr other;		/* for exchange */
+  ElementType *other;		/* for exchange */
 }
 PerturbationType;
 
@@ -150,7 +150,7 @@ PerturbationType;
  * elements have possibly been moved, rotated, flipped, etc.
  */
 static void
-UpdateXY (NetListTypePtr Nets)
+UpdateXY (NetListType *Nets)
 {
   Cardinal SLayer, CLayer;
   Cardinal i, j;
@@ -162,20 +162,20 @@ UpdateXY (NetListTypePtr Nets)
     {
       for (j = 0; j < Nets->Net[i].ConnectionN; j++)
 	{
-	  ConnectionTypePtr c = &(Nets->Net[i].Connection[j]);
+	  ConnectionType *c = &(Nets->Net[i].Connection[j]);
 	  switch (c->type)
 	    {
 	    case PAD_TYPE:
 	      c->group = TEST_FLAG (ONSOLDERFLAG,
-				    (ElementTypePtr) c->ptr1)
+				    (ElementType *) c->ptr1)
 		? SLayer : CLayer;
-	      c->X = ((PadTypePtr) c->ptr2)->Point1.X;
-	      c->Y = ((PadTypePtr) c->ptr2)->Point1.Y;
+	      c->X = ((PadType *) c->ptr2)->Point1.X;
+	      c->Y = ((PadType *) c->ptr2)->Point1.Y;
 	      break;
 	    case PIN_TYPE:
 	      c->group = SLayer;	/* any layer will do */
-	      c->X = ((PinTypePtr) c->ptr2)->X;
-	      c->Y = ((PinTypePtr) c->ptr2)->Y;
+	      c->X = ((PinType *) c->ptr2)->X;
+	      c->Y = ((PinType *) c->ptr2)->Y;
 	      break;
 	    default:
 	      Message ("Odd connection type encountered in " "UpdateXY");
@@ -196,7 +196,7 @@ collectSelectedElements ()
   {
     if (TEST_FLAG (SELECTEDFLAG, element))
       {
-	ElementTypePtr *epp = (ElementTypePtr *) GetPointerMemory (&list);
+	ElementType **epp = (ElementType **) GetPointerMemory (&list);
 	*epp = element;
       }
   }
@@ -208,10 +208,10 @@ collectSelectedElements ()
 #include "create.h"
 /* makes a line on the solder layer surrounding all boxes in blist */
 static void
-showboxes (BoxListTypePtr blist)
+showboxes (BoxListType *blist)
 {
   Cardinal i;
-  LayerTypePtr SLayer = &(PCB->Data->Layer[solder_silk_layer]);
+  LayerType *SLayer = &(PCB->Data->Layer[solder_silk_layer]);
   for (i = 0; i < blist->BoxN; i++)
     {
       CreateNewLineOnLayer (SLayer, blist->Box[i].X1, blist->Box[i].Y1,
@@ -323,7 +323,7 @@ r_find_neighbor (rtree_t * rtree, const BoxType * box,
  *  Marcel Dekker, Inc. 1993.  ISBN: 0-8247-8916-4 TK7868.P7.P57 1993
  */
 static double
-ComputeCost (NetListTypePtr Nets, double T0, double T)
+ComputeCost (NetListType *Nets, double T0, double T)
 {
   double W = 0;			/* wire cost */
   double delta1 = 0;		/* wire congestion penalty function */
@@ -346,7 +346,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
    * the "layer height" of the net. */
   for (i = 0; i < Nets->NetN; i++)
     {
-      NetTypePtr n = &Nets->Net[i];
+      NetType *n = &Nets->Net[i];
       if (n->ConnectionN < 2)
 	continue;		/* no cost to go nowhere */
       minx = maxx = n->Connection[0].X;
@@ -356,7 +356,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
       allsameside = true;
       for (j = 1; j < n->ConnectionN; j++)
 	{
-	  ConnectionTypePtr c = &(n->Connection[j]);
+	  ConnectionType *c = &(n->Connection[j]);
 	  MAKEMIN (minx, c->X);
 	  MAKEMAX (maxx, c->X);
 	  MAKEMIN (miny, c->Y);
@@ -368,7 +368,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
 	}
       /* save bounding rectangle */
       {
-	BoxTypePtr box = GetBoxMemory (&bounds);
+	BoxType *box = GetBoxMemory (&bounds);
 	box->X1 = minx;
 	box->Y1 = miny;
 	box->X2 = maxx;
@@ -393,10 +393,10 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
 
   ELEMENT_LOOP (PCB->Data);
   {
-    BoxListTypePtr thisside;
-    BoxListTypePtr otherside;
-    BoxTypePtr box;
-    BoxTypePtr lastbox = NULL;
+    BoxListType *thisside;
+    BoxListType *otherside;
+    BoxType *box;
+    BoxType *lastbox = NULL;
     Coord thickness;
     Coord clearance;
     if (TEST_FLAG (ONSOLDERFLAG, element))
@@ -514,7 +514,7 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
     struct ebox
     {
       BoxType box;
-      ElementTypePtr element;
+      ElementType *element;
     };
     direction_t dir[4] = { NORTH, EAST, SOUTH, WEST };
     struct ebox **boxpp, *boxp;
@@ -613,11 +613,11 @@ ComputeCost (NetListTypePtr Nets, double T0, double T)
  *  -- Only perturb selected elements (need count/list of selected?) --
  */
 PerturbationType
-createPerturbation (PointerListTypePtr selected, double T)
+createPerturbation (PointerListType *selected, double T)
 {
   PerturbationType pt = { 0 };
   /* pick element to perturb */
-  pt.element = (ElementTypePtr) selected->Ptr[random () % selected->PtrN];
+  pt.element = (ElementType *) selected->Ptr[random () % selected->PtrN];
   /* exchange, flip/rotate or shift? */
   switch (random () % ((selected->PtrN > 1) ? 3 : 2))
     {
@@ -655,10 +655,10 @@ createPerturbation (PointerListTypePtr selected, double T)
     case 2:
       {				/* exchange! */
 	pt.which = EXCHANGE;
-	pt.other = (ElementTypePtr)
+	pt.other = (ElementType *)
 	  selected->Ptr[random () % (selected->PtrN - 1)];
 	if (pt.other == pt.element)
-	  pt.other = (ElementTypePtr) selected->Ptr[selected->PtrN - 1];
+	  pt.other = (ElementType *) selected->Ptr[selected->PtrN - 1];
 	/* don't allow exchanging a solderside-side SMD component
 	 * with a non-SMD component. */
 	if ((pt.element->PinN != 0 /* non-SMD */  &&
@@ -748,7 +748,7 @@ doPerturb (PerturbationType * pt, bool undo)
 bool
 AutoPlaceSelected (void)
 {
-  NetListTypePtr Nets;
+  NetListType *Nets;
   PointerListType Selected = { 0, 0, NULL };
   PerturbationType pt;
   double C0, T0;
diff --git a/src/autoroute.c b/src/autoroute.c
index 374b6ac..8081262 100644
--- a/src/autoroute.c
+++ b/src/autoroute.c
@@ -231,12 +231,12 @@ typedef struct routebox
   BoxType box, sbox;
   union
   {
-    PadTypePtr pad;
-    PinTypePtr pin;
-    PinTypePtr via;
+    PadType *pad;
+    PinType *pin;
+    PinType *via;
     struct routebox *via_shadow;	/* points to the via in r-tree which
 					 * points to the PinType in the PCB. */
-    LineTypePtr line;
+    LineType *line;
     void *generic;		/* 'other' is polygon, arc, text */
     struct routebox *expansion_area;	/* previous expansion area in search */
   }
@@ -639,7 +639,7 @@ point_in_shrunk_box (const routebox_t * box, Coord X, Coord Y)
  */
 
 static routebox_t *
-AddPin (PointerListType layergroupboxes[], PinTypePtr pin, bool is_via,
+AddPin (PointerListType layergroupboxes[], PinType *pin, bool is_via,
 	RouteStyleType * style)
 {
   routebox_t **rbpp, *lastrb = NULL;
@@ -687,7 +687,7 @@ AddPin (PointerListType layergroupboxes[], PinTypePtr pin, bool is_via,
 }
 static routebox_t *
 AddPad (PointerListType layergroupboxes[],
-	ElementTypePtr element, PadTypePtr pad, RouteStyleType * style)
+	ElementType *element, PadType *pad, RouteStyleType * style)
 {
   Coord halfthick;
   routebox_t **rbpp;
@@ -721,8 +721,8 @@ AddPad (PointerListType layergroupboxes[],
   return *rbpp;
 }
 static routebox_t *
-AddLine (PointerListType layergroupboxes[], int layergroup, LineTypePtr line,
-	 LineTypePtr ptr, RouteStyleType * style)
+AddLine (PointerListType layergroupboxes[], int layergroup, LineType *line,
+	 LineType *ptr, RouteStyleType * style)
 {
   routebox_t **rbpp;
   assert (layergroupboxes && line);
@@ -794,7 +794,7 @@ AddIrregularObstacle (PointerListType layergroupboxes[],
 
 static routebox_t *
 AddPolygon (PointerListType layergroupboxes[], Cardinal layer,
-	    PolygonTypePtr polygon, RouteStyleType * style)
+	    PolygonType *polygon, RouteStyleType * style)
 {
   int is_not_rectangle = 1;
   int layergroup = GetLayerGroupNumberByNumber (layer);
@@ -830,7 +830,7 @@ AddPolygon (PointerListType layergroupboxes[], Cardinal layer,
 }
 static void
 AddText (PointerListType layergroupboxes[], Cardinal layergroup,
-	 TextTypePtr text, RouteStyleType * style)
+	 TextType *text, RouteStyleType * style)
 {
   AddIrregularObstacle (layergroupboxes,
 			text->BoundingBox.X1, text->BoundingBox.Y1,
@@ -839,7 +839,7 @@ AddText (PointerListType layergroupboxes[], Cardinal layergroup,
 }
 static routebox_t *
 AddArc (PointerListType layergroupboxes[], Cardinal layergroup,
-	ArcTypePtr arc, RouteStyleType * style)
+	ArcType *arc, RouteStyleType * style)
 {
   return AddIrregularObstacle (layergroupboxes,
 			       arc->BoundingBox.X1, arc->BoundingBox.Y1,
@@ -1042,7 +1042,7 @@ CreateRouteData ()
 	CONNECTION_LOOP (net);
 	{
 	  routebox_t *rb = NULL;
-	  SET_FLAG (DRCFLAG, (PinTypePtr) connection->ptr2);
+	  SET_FLAG (DRCFLAG, (PinType *) connection->ptr2);
 	  if (connection->type == LINE_TYPE)
 	    {
 	      LineType *line = (LineType *) connection->ptr2;
@@ -1460,8 +1460,8 @@ bloat_routebox (routebox_t * rb)
 void
 showbox (BoxType b, Dimension thickness, int group)
 {
-  LineTypePtr line;
-  LayerTypePtr SLayer = LAYER_PTR (group);
+  LineType *line;
+  LayerType *SLayer = LAYER_PTR (group);
   if (showboxen < -1)
     return;
   if (showboxen != -1 && showboxen != group)
@@ -4963,7 +4963,7 @@ out:
 
 struct fpin_info
 {
-  PinTypePtr pin;
+  PinType *pin;
   Coord X, Y;
   jmp_buf env;
 };
@@ -4971,18 +4971,18 @@ struct fpin_info
 static int
 fpin_rect (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct fpin_info *info = (struct fpin_info *) cl;
   if (pin->X == info->X && pin->Y == info->Y)
     {
-      info->pin = (PinTypePtr) b;
+      info->pin = (PinType *) b;
       longjmp (info->env, 1);
     }
   return 0;
 }
 
 static int
-FindPin (const BoxType * box, PinTypePtr * pin)
+FindPin (const BoxType * box, PinType ** pin)
 {
   struct fpin_info info;
 
@@ -5014,7 +5014,7 @@ bool
 IronDownAllUnfixedPaths (routedata_t * rd)
 {
   bool changed = false;
-  LayerTypePtr layer;
+  LayerType *layer;
   routebox_t *net, *p;
   int i;
   LIST_LOOP (rd->first_net, different_net, net);
@@ -5123,7 +5123,7 @@ IronDownAllUnfixedPaths (routedata_t * rd)
     {
       if (p->type == THERMAL)
 	{
-	  PinTypePtr pin = NULL;
+	  PinType *pin = NULL;
 	  /* thermals are alread a single point search, no need to shrink */
 	  int type = FindPin (&p->box, &pin);
 	  if (pin)
diff --git a/src/buffer.c b/src/buffer.c
index 1f9293a..0394f2f 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -63,28 +63,28 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *AddViaToBuffer (PinTypePtr);
-static void *AddLineToBuffer (LayerTypePtr, LineTypePtr);
-static void *AddArcToBuffer (LayerTypePtr, ArcTypePtr);
-static void *AddRatToBuffer (RatTypePtr);
-static void *AddTextToBuffer (LayerTypePtr, TextTypePtr);
-static void *AddPolygonToBuffer (LayerTypePtr, PolygonTypePtr);
-static void *AddElementToBuffer (ElementTypePtr);
-static void *MoveViaToBuffer (PinTypePtr);
-static void *MoveLineToBuffer (LayerTypePtr, LineTypePtr);
-static void *MoveArcToBuffer (LayerTypePtr, ArcTypePtr);
-static void *MoveRatToBuffer (RatTypePtr);
-static void *MoveTextToBuffer (LayerTypePtr, TextTypePtr);
-static void *MovePolygonToBuffer (LayerTypePtr, PolygonTypePtr);
-static void *MoveElementToBuffer (ElementTypePtr);
-static void SwapBuffer (BufferTypePtr);
+static void *AddViaToBuffer (PinType *);
+static void *AddLineToBuffer (LayerType *, LineType *);
+static void *AddArcToBuffer (LayerType *, ArcType *);
+static void *AddRatToBuffer (RatType *);
+static void *AddTextToBuffer (LayerType *, TextType *);
+static void *AddPolygonToBuffer (LayerType *, PolygonType *);
+static void *AddElementToBuffer (ElementType *);
+static void *MoveViaToBuffer (PinType *);
+static void *MoveLineToBuffer (LayerType *, LineType *);
+static void *MoveArcToBuffer (LayerType *, ArcType *);
+static void *MoveRatToBuffer (RatType *);
+static void *MoveTextToBuffer (LayerType *, TextType *);
+static void *MovePolygonToBuffer (LayerType *, PolygonType *);
+static void *MoveElementToBuffer (ElementType *);
+static void SwapBuffer (BufferType *);
 
 #define ARG(n) (argc > (n) ? argv[n] : 0)
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
-static DataTypePtr Dest, Source;
+static DataType *Dest, *Source;
 
 static ObjectFunctionType AddBufferFunctions = {
   AddLineToBuffer,
@@ -115,7 +115,7 @@ static int ExtraFlag = 0;
  * copies a via to paste buffer
  */
 static void *
-AddViaToBuffer (PinTypePtr Via)
+AddViaToBuffer (PinType *Via)
 {
   return (CreateNewVia (Dest, Via->X, Via->Y, Via->Thickness, Via->Clearance,
 			Via->Mask, Via->DrillingHole, Via->Name,
@@ -126,7 +126,7 @@ AddViaToBuffer (PinTypePtr Via)
  * copies a rat-line to paste buffer
  */
 static void *
-AddRatToBuffer (RatTypePtr Rat)
+AddRatToBuffer (RatType *Rat)
 {
   return (CreateNewRat (Dest, Rat->Point1.X, Rat->Point1.Y,
 			Rat->Point2.X, Rat->Point2.Y, Rat->group1,
@@ -138,10 +138,10 @@ AddRatToBuffer (RatTypePtr Rat)
  * copies a line to buffer  
  */
 static void *
-AddLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
+AddLineToBuffer (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LineType *line;
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   line = CreateNewLineOnLayer (layer, Line->Point1.X, Line->Point1.Y,
 			       Line->Point2.X, Line->Point2.Y,
@@ -157,9 +157,9 @@ AddLineToBuffer (LayerTypePtr Layer, LineTypePtr Line)
  * copies an arc to buffer  
  */
 static void *
-AddArcToBuffer (LayerTypePtr Layer, ArcTypePtr Arc)
+AddArcToBuffer (LayerType *Layer, ArcType *Arc)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   return (CreateNewArcOnLayer (layer, Arc->X, Arc->Y,
 			       Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta,
@@ -172,9 +172,9 @@ AddArcToBuffer (LayerTypePtr Layer, ArcTypePtr Arc)
  * copies a text to buffer
  */
 static void *
-AddTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
+AddTextToBuffer (LayerType *Layer, TextType *Text)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
 
   return (CreateNewText (layer, &PCB->Font, Text->X, Text->Y,
 			 Text->Direction, Text->Scale, Text->TextString,
@@ -185,10 +185,10 @@ AddTextToBuffer (LayerTypePtr Layer, TextTypePtr Text)
  * copies a polygon to buffer
  */
 static void *
-AddPolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
+AddPolygonToBuffer (LayerType *Layer, PolygonType *Polygon)
 {
-  LayerTypePtr layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
-  PolygonTypePtr polygon;
+  LayerType *layer = &Dest->Layer[GetLayerNumber (Source, Layer)];
+  PolygonType *polygon;
 
   polygon = CreateNewPolygon (layer, Polygon->Flags);
   CopyPolygonLowLevel (polygon, Polygon);
@@ -209,9 +209,9 @@ AddPolygonToBuffer (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * copies a element to buffer
  */
 static void *
-AddElementToBuffer (ElementTypePtr Element)
+AddElementToBuffer (ElementType *Element)
 {
-  ElementTypePtr element;
+  ElementType *element;
 
   element = GetElementMemory (Dest);
   CopyElementLowLevel (Dest, element, Element, false, 0, 0);
@@ -287,7 +287,7 @@ MoveRatToBuffer (RatType *rat)
 static void *
 MoveLineToBuffer (LayerType *layer, LineType *line)
 {
-  LayerTypePtr lay = &Dest->Layer[GetLayerNumber (Source, layer)];
+  LayerType *lay = &Dest->Layer[GetLayerNumber (Source, layer)];
 
   RestoreToPolygon (Source, LINE_TYPE, layer, line);
   r_delete_entry (layer->line_tree, (BoxType *)line);
@@ -428,9 +428,9 @@ MoveElementToBuffer (ElementType *element)
  * calculates the bounding box of the buffer
  */
 void
-SetBufferBoundingBox (BufferTypePtr Buffer)
+SetBufferBoundingBox (BufferType *Buffer)
 {
-  BoxTypePtr box = GetDataBoundingBox (Buffer->Data);
+  BoxType *box = GetDataBoundingBox (Buffer->Data);
 
   if (box)
     Buffer->BoundingBox = *box;
@@ -440,7 +440,7 @@ SetBufferBoundingBox (BufferTypePtr Buffer)
  * clears the contents of the paste buffer
  */
 void
-ClearBuffer (BufferTypePtr Buffer)
+ClearBuffer (BufferType *Buffer)
 {
   if (Buffer && Buffer->Data)
     {
@@ -454,7 +454,7 @@ ClearBuffer (BufferTypePtr Buffer)
  * returns true if any objects have been removed
  */
 void
-AddSelectedToBuffer (BufferTypePtr Buffer, Coord X, Coord Y, bool LeaveSelected)
+AddSelectedToBuffer (BufferType *Buffer, Coord X, Coord Y, bool LeaveSelected)
 {
   /* switch crosshair off because adding objects to the pastebuffer
    * may change the 'valid' area for the cursor
@@ -488,9 +488,9 @@ AddSelectedToBuffer (BufferTypePtr Buffer, Coord X, Coord Y, bool LeaveSelected)
  * if successful, update some other stuff and reposition the pastebuffer
  */
 bool
-LoadElementToBuffer (BufferTypePtr Buffer, char *Name, bool FromFile)
+LoadElementToBuffer (BufferType *Buffer, char *Name, bool FromFile)
 {
-  ElementTypePtr element;
+  ElementType *element;
 
   ClearBuffer (Buffer);
   if (FromFile)
@@ -716,7 +716,7 @@ search_footprint_hash (const char *footprint)
 
 /* Returns zero on success, non-zero on error.  */
 int
-LoadFootprintByName (BufferTypePtr Buffer, char *Footprint)
+LoadFootprintByName (BufferType *Buffer, char *Footprint)
 {
   int i;
   FootprintHashEntry *fpe;
@@ -816,7 +816,7 @@ LoadFootprint (int argc, char **argv, Coord x, Coord y)
   char *name = ARG(0);
   char *refdes = ARG(1);
   char *value = ARG(2);
-  ElementTypePtr e;
+  ElementType *e;
 
   if (!name)
     AFAIL (loadfootprint);
@@ -857,11 +857,11 @@ LoadFootprint (int argc, char **argv, Coord x, Coord y)
  * break buffer element into pieces
  */
 bool
-SmashBufferElement (BufferTypePtr Buffer)
+SmashBufferElement (BufferType *Buffer)
 {
-  ElementTypePtr element;
+  ElementType *element;
   Cardinal group;
-  LayerTypePtr clayer, slayer;
+  LayerType *clayer, *slayer;
 
   if (Buffer->Data->ElementN != 1)
     {
@@ -920,7 +920,7 @@ SmashBufferElement (BufferTypePtr Buffer)
   slayer = &Buffer->Data->Layer[PCB->LayerGroups.Entries[group][0]];
   PAD_LOOP (element);
   {
-    LineTypePtr line;
+    LineType *line;
     line = CreateNewLineOnLayer (TEST_FLAG (ONSOLDERFLAG, pad) ? slayer : clayer,
 				 pad->Point1.X, pad->Point1.Y,
 				 pad->Point2.X, pad->Point2.Y,
@@ -940,7 +940,7 @@ SmashBufferElement (BufferTypePtr Buffer)
  */
 
 static int
-polygon_is_rectangle (PolygonTypePtr poly)
+polygon_is_rectangle (PolygonType *poly)
 {
   int i, best;
   PointType temp[4];
@@ -976,9 +976,9 @@ polygon_is_rectangle (PolygonTypePtr poly)
  * convert buffer contents into an element
  */
 bool
-ConvertBufferToElement (BufferTypePtr Buffer)
+ConvertBufferToElement (BufferType *Buffer)
 {
-  ElementTypePtr Element;
+  ElementType *Element;
   Cardinal group;
   Cardinal pin_n = 1;
   bool hasParts = false, crooked = false;
@@ -1144,9 +1144,9 @@ ConvertBufferToElement (BufferTypePtr Buffer)
  * if successful, update some other stuff
  */
 bool
-LoadLayoutToBuffer (BufferTypePtr Buffer, char *Filename)
+LoadLayoutToBuffer (BufferType *Buffer, char *Filename)
 {
-  PCBTypePtr newPCB = CreateNewPCB (false);
+  PCBType *newPCB = CreateNewPCB (false);
 
   /* new data isn't added to the undo list */
   if (!ParsePCB (newPCB, Filename))
@@ -1173,7 +1173,7 @@ LoadLayoutToBuffer (BufferTypePtr Buffer, char *Filename)
  * rotates the contents of the pastebuffer
  */
 void
-RotateBuffer (BufferTypePtr Buffer, BYTE Number)
+RotateBuffer (BufferType *Buffer, BYTE Number)
 {
   /* rotate vias */
   VIA_LOOP (Buffer->Data);
@@ -1243,7 +1243,7 @@ free_rotate (Coord *x, Coord *y, Coord cx, Coord cy, double cosa, double sina)
 }
 
 void
-FreeRotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+FreeRotateElementLowLevel (DataType *Data, ElementType *Element,
 			   Coord X, Coord Y,
 			   double cosa, double sina, Angle angle)
 {
@@ -1302,7 +1302,7 @@ FreeRotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
 }
 
 void
-FreeRotateBuffer (BufferTypePtr Buffer, Angle angle)
+FreeRotateBuffer (BufferType *Buffer, Angle angle)
 {
   double cosa, sina;
 
@@ -1419,7 +1419,7 @@ SwapBuffers (void)
 }
 
 void
-MirrorBuffer (BufferTypePtr Buffer)
+MirrorBuffer (BufferType *Buffer)
 {
   int i;
 
@@ -1430,7 +1430,7 @@ MirrorBuffer (BufferTypePtr Buffer)
     }
   for (i = 0; i < max_copper_layer + 2; i++)
     {
-      LayerTypePtr layer = Buffer->Data->Layer + i;
+      LayerType *layer = Buffer->Data->Layer + i;
       if (layer->TextN)
 	{
 	  Message (_("You can't mirror a buffer that has text!\n"));
@@ -1482,7 +1482,7 @@ MirrorBuffer (BufferTypePtr Buffer)
  * flip components/tracks from one side to the other
  */
 static void
-SwapBuffer (BufferTypePtr Buffer)
+SwapBuffer (BufferType *Buffer)
 {
   int j, k;
   Cardinal sgroup, cgroup;
@@ -1608,7 +1608,7 @@ SwapBuffer (BufferTypePtr Buffer)
  * from its original place
  */
 void *
-MoveObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
+MoveObjectToBuffer (DataType *Destination, DataType *Src,
 		    int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   /* setup local identifiers used by move operations */
@@ -1621,7 +1621,7 @@ MoveObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
  * Adds the passed object to the passed buffer
  */
 void *
-CopyObjectToBuffer (DataTypePtr Destination, DataTypePtr Src,
+CopyObjectToBuffer (DataType *Destination, DataType *Src,
 		    int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   /* setup local identifiers used by Add operations */
diff --git a/src/buffer.h b/src/buffer.h
index 6871216..6a264ea 100644
--- a/src/buffer.h
+++ b/src/buffer.h
@@ -35,20 +35,20 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-void SetBufferBoundingBox (BufferTypePtr);
-void ClearBuffer (BufferTypePtr);
-void AddSelectedToBuffer (BufferTypePtr, Coord, Coord, bool);
-bool LoadElementToBuffer (BufferTypePtr, char *, bool);
-bool ConvertBufferToElement (BufferTypePtr);
-bool SmashBufferElement (BufferTypePtr);
-bool LoadLayoutToBuffer (BufferTypePtr, char *);
-void RotateBuffer (BufferTypePtr, BYTE);
+void SetBufferBoundingBox (BufferType *);
+void ClearBuffer (BufferType *);
+void AddSelectedToBuffer (BufferType *, Coord, Coord, bool);
+bool LoadElementToBuffer (BufferType *, char *, bool);
+bool ConvertBufferToElement (BufferType *);
+bool SmashBufferElement (BufferType *);
+bool LoadLayoutToBuffer (BufferType *, char *);
+void RotateBuffer (BufferType *, BYTE);
 void SelectPasteBuffer (int);
 void SwapBuffers (void);
-void MirrorBuffer (BufferTypePtr);
+void MirrorBuffer (BufferType *);
 void InitBuffers (void);
-void *MoveObjectToBuffer (DataTypePtr, DataTypePtr, int, void *, void *, void *); 
-void *CopyObjectToBuffer (DataTypePtr, DataTypePtr, int,
+void *MoveObjectToBuffer (DataType *, DataType *, int, void *, void *, void *); 
+void *CopyObjectToBuffer (DataType *, DataType *, int,
 			  void *, void *, void *);
 
 /* This action is called from ActionElementAddIf() */
diff --git a/src/change.c b/src/change.c
index aaad7a2..f7d571c 100644
--- a/src/change.c
+++ b/src/change.c
@@ -64,62 +64,62 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *ChangePinSize (ElementTypePtr, PinTypePtr);
-static void *ChangePinClearSize (ElementTypePtr, PinTypePtr);
-static void *ChangePinMaskSize (ElementTypePtr, PinTypePtr);
-static void *ChangePadSize (ElementTypePtr, PadTypePtr);
-static void *ChangePadClearSize (ElementTypePtr, PadTypePtr);
-static void *ChangePadMaskSize (ElementTypePtr, PadTypePtr);
-static void *ChangePin2ndSize (ElementTypePtr, PinTypePtr);
-static void *ChangeElement2ndSize (ElementTypePtr);
-static void *ChangeViaSize (PinTypePtr);
-static void *ChangeVia2ndSize (PinTypePtr);
-static void *ChangeViaClearSize (PinTypePtr);
-static void *ChangeViaMaskSize (PinTypePtr);
-static void *ChangeLineSize (LayerTypePtr, LineTypePtr);
-static void *ChangeLineClearSize (LayerTypePtr, LineTypePtr);
-static void *ChangePolygonClearSize (LayerTypePtr, PolygonTypePtr);
-static void *ChangeArcSize (LayerTypePtr, ArcTypePtr);
-static void *ChangeArcClearSize (LayerTypePtr, ArcTypePtr);
-static void *ChangeTextSize (LayerTypePtr, TextTypePtr);
-static void *ChangeElementSize (ElementTypePtr);
-static void *ChangeElementNameSize (ElementTypePtr);
-static void *ChangePinName (ElementTypePtr, PinTypePtr);
-static void *ChangePadName (ElementTypePtr, PadTypePtr);
-static void *ChangeViaName (PinTypePtr);
-static void *ChangeLineName (LayerTypePtr, LineTypePtr);
-static void *ChangeElementName (ElementTypePtr);
-static void *ChangeTextName (LayerTypePtr, TextTypePtr);
-static void *ChangeElementSquare (ElementTypePtr);
-static void *SetElementSquare (ElementTypePtr);
-static void *ClrElementSquare (ElementTypePtr);
-static void *ChangeElementOctagon (ElementTypePtr);
-static void *SetElementOctagon (ElementTypePtr);
-static void *ClrElementOctagon (ElementTypePtr);
-static void *ChangePinSquare (ElementTypePtr, PinTypePtr);
-static void *SetPinSquare (ElementTypePtr, PinTypePtr);
-static void *ClrPinSquare (ElementTypePtr, PinTypePtr);
-static void *ChangePinOctagon (ElementTypePtr, PinTypePtr);
-static void *SetPinOctagon (ElementTypePtr, PinTypePtr);
-static void *ClrPinOctagon (ElementTypePtr, PinTypePtr);
-static void *ChangeViaOctagon (PinTypePtr);
-static void *SetViaOctagon (PinTypePtr);
-static void *ClrViaOctagon (PinTypePtr);
-static void *ChangePadSquare (ElementTypePtr, PadTypePtr);
-static void *SetPadSquare (ElementTypePtr, PadTypePtr);
-static void *ClrPadSquare (ElementTypePtr, PadTypePtr);
-static void *ChangeViaThermal (PinTypePtr);
-static void *ChangePinThermal (ElementTypePtr, PinTypePtr);
-static void *ChangeLineJoin (LayerTypePtr, LineTypePtr);
-static void *SetLineJoin (LayerTypePtr, LineTypePtr);
-static void *ClrLineJoin (LayerTypePtr, LineTypePtr);
-static void *ChangeArcJoin (LayerTypePtr, ArcTypePtr);
-static void *SetArcJoin (LayerTypePtr, ArcTypePtr);
-static void *ClrArcJoin (LayerTypePtr, ArcTypePtr);
-static void *ChangeTextJoin (LayerTypePtr, TextTypePtr);
-static void *SetTextJoin (LayerTypePtr, TextTypePtr);
-static void *ClrTextJoin (LayerTypePtr, TextTypePtr);
-static void *ChangePolyClear (LayerTypePtr, PolygonTypePtr);
+static void *ChangePinSize (ElementType *, PinType *);
+static void *ChangePinClearSize (ElementType *, PinType *);
+static void *ChangePinMaskSize (ElementType *, PinType *);
+static void *ChangePadSize (ElementType *, PadType *);
+static void *ChangePadClearSize (ElementType *, PadType *);
+static void *ChangePadMaskSize (ElementType *, PadType *);
+static void *ChangePin2ndSize (ElementType *, PinType *);
+static void *ChangeElement2ndSize (ElementType *);
+static void *ChangeViaSize (PinType *);
+static void *ChangeVia2ndSize (PinType *);
+static void *ChangeViaClearSize (PinType *);
+static void *ChangeViaMaskSize (PinType *);
+static void *ChangeLineSize (LayerType *, LineType *);
+static void *ChangeLineClearSize (LayerType *, LineType *);
+static void *ChangePolygonClearSize (LayerType *, PolygonType *);
+static void *ChangeArcSize (LayerType *, ArcType *);
+static void *ChangeArcClearSize (LayerType *, ArcType *);
+static void *ChangeTextSize (LayerType *, TextType *);
+static void *ChangeElementSize (ElementType *);
+static void *ChangeElementNameSize (ElementType *);
+static void *ChangePinName (ElementType *, PinType *);
+static void *ChangePadName (ElementType *, PadType *);
+static void *ChangeViaName (PinType *);
+static void *ChangeLineName (LayerType *, LineType *);
+static void *ChangeElementName (ElementType *);
+static void *ChangeTextName (LayerType *, TextType *);
+static void *ChangeElementSquare (ElementType *);
+static void *SetElementSquare (ElementType *);
+static void *ClrElementSquare (ElementType *);
+static void *ChangeElementOctagon (ElementType *);
+static void *SetElementOctagon (ElementType *);
+static void *ClrElementOctagon (ElementType *);
+static void *ChangePinSquare (ElementType *, PinType *);
+static void *SetPinSquare (ElementType *, PinType *);
+static void *ClrPinSquare (ElementType *, PinType *);
+static void *ChangePinOctagon (ElementType *, PinType *);
+static void *SetPinOctagon (ElementType *, PinType *);
+static void *ClrPinOctagon (ElementType *, PinType *);
+static void *ChangeViaOctagon (PinType *);
+static void *SetViaOctagon (PinType *);
+static void *ClrViaOctagon (PinType *);
+static void *ChangePadSquare (ElementType *, PadType *);
+static void *SetPadSquare (ElementType *, PadType *);
+static void *ClrPadSquare (ElementType *, PadType *);
+static void *ChangeViaThermal (PinType *);
+static void *ChangePinThermal (ElementType *, PinType *);
+static void *ChangeLineJoin (LayerType *, LineType *);
+static void *SetLineJoin (LayerType *, LineType *);
+static void *ClrLineJoin (LayerType *, LineType *);
+static void *ChangeArcJoin (LayerType *, ArcType *);
+static void *SetArcJoin (LayerType *, ArcType *);
+static void *ClrArcJoin (LayerType *, ArcType *);
+static void *ChangeTextJoin (LayerType *, TextType *);
+static void *SetTextJoin (LayerType *, TextType *);
+static void *ClrTextJoin (LayerType *, TextType *);
+static void *ChangePolyClear (LayerType *, PolygonType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -347,7 +347,7 @@ static ObjectFunctionType ClrOctagonFunctions = {
  * returns TRUE if changed
  */
 static void *
-ChangeViaThermal (PinTypePtr Via)
+ChangeViaThermal (PinType *Via)
 {
   AddObjectToClearPolyUndoList (VIA_TYPE, Via, Via, Via, false);
   RestoreToPolygon (PCB->Data, VIA_TYPE, CURRENT, Via);
@@ -367,7 +367,7 @@ ChangeViaThermal (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangePinThermal (ElementTypePtr element, PinTypePtr Pin)
+ChangePinThermal (ElementType *element, PinType *Pin)
 {
   AddObjectToClearPolyUndoList (PIN_TYPE, element, Pin, Pin, false);
   RestoreToPolygon (PCB->Data, VIA_TYPE, CURRENT, Pin);
@@ -387,7 +387,7 @@ ChangePinThermal (ElementTypePtr element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeViaSize (PinTypePtr Via)
+ChangeViaSize (PinType *Via)
 {
   Coord value = Absolute ? Absolute : Via->Thickness + Delta;
 
@@ -422,7 +422,7 @@ ChangeViaSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangeVia2ndSize (PinTypePtr Via)
+ChangeVia2ndSize (PinType *Via)
 {
   Coord value = (Absolute) ? Absolute : Via->DrillingHole + Delta;
 
@@ -455,7 +455,7 @@ ChangeVia2ndSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangeViaClearSize (PinTypePtr Via)
+ChangeViaClearSize (PinType *Via)
 {
   Coord value = (Absolute) ? Absolute : Via->Clearance + Delta;
 
@@ -489,7 +489,7 @@ ChangeViaClearSize (PinTypePtr Via)
  * returns TRUE if changed
  */
 static void *
-ChangePinSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Thickness + Delta;
 
@@ -521,7 +521,7 @@ ChangePinSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangePinClearSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinClearSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Clearance + Delta;
 
@@ -553,7 +553,7 @@ ChangePinClearSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangePadSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Thickness + Delta;
 
@@ -582,7 +582,7 @@ ChangePadSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangePadClearSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadClearSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Clearance + Delta;
 
@@ -614,7 +614,7 @@ ChangePadClearSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangeElement2ndSize (ElementTypePtr Element)
+ChangeElement2ndSize (ElementType *Element)
 {
   bool changed = false;
   Coord value;
@@ -657,7 +657,7 @@ ChangeElement2ndSize (ElementTypePtr Element)
  * returns TRUE if changed
  */
 static void *
-ChangePin2ndSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePin2ndSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->DrillingHole + Delta;
 
@@ -690,7 +690,7 @@ ChangePin2ndSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineSize (LayerType *Layer, LineType *Line)
 {
   Coord value = (Absolute) ? Absolute : Line->Thickness + Delta;
 
@@ -701,11 +701,11 @@ ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
     {
       AddObjectToSizeUndoList (LINE_TYPE, Layer, Line, Line);
       EraseLine (Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       Line->Thickness = value;
       SetLineBoundingBox (Line);
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
       return (Line);
@@ -718,7 +718,7 @@ ChangeLineSize (LayerTypePtr Layer, LineTypePtr Line)
  * returns TRUE if changed
  */
 static void *
-ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineClearSize (LayerType *Layer, LineType *Line)
 {
   Coord value = (Absolute) ? Absolute : Line->Clearance + Delta;
 
@@ -730,7 +730,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
       AddObjectToClearSizeUndoList (LINE_TYPE, Layer, Line, Line);
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       EraseLine (Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
       Line->Clearance = value;
       if (Line->Clearance == 0)
 	{
@@ -738,7 +738,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
 	  Line->Clearance = MIL_TO_COORD(10);
 	}
       SetLineBoundingBox (Line);
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
       return (Line);
@@ -750,7 +750,7 @@ ChangeLineClearSize (LayerTypePtr Layer, LineTypePtr Line)
  * Handle attepts to change the clearance of a polygon.
  */
 static void *
-ChangePolygonClearSize (LayerTypePtr Layer, PolygonTypePtr poly)
+ChangePolygonClearSize (LayerType *Layer, PolygonType *poly)
 {
   static int shown_this_message = 0;
   if (!shown_this_message)
@@ -771,7 +771,7 @@ ChangePolygonClearSize (LayerTypePtr Layer, PolygonTypePtr poly)
  * returns TRUE if changed
  */
 static void *
-ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcSize (LayerType *Layer, ArcType *Arc)
 {
   Coord value = (Absolute) ? Absolute : Arc->Thickness + Delta;
 
@@ -782,11 +782,11 @@ ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
     {
       AddObjectToSizeUndoList (ARC_TYPE, Layer, Arc, Arc);
       EraseArc (Arc);
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+      r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
       RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       Arc->Thickness = value;
       SetArcBoundingBox (Arc);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
       ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       DrawArc (Layer, Arc);
       return (Arc);
@@ -799,7 +799,7 @@ ChangeArcSize (LayerTypePtr Layer, ArcTypePtr Arc)
  * returns TRUE if changed
  */
 static void *
-ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcClearSize (LayerType *Layer, ArcType *Arc)
 {
   Coord value = (Absolute) ? Absolute : Arc->Clearance + Delta;
 
@@ -810,7 +810,7 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
     {
       AddObjectToClearSizeUndoList (ARC_TYPE, Layer, Arc, Arc);
       EraseArc (Arc);
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+      r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
       RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       Arc->Clearance = value;
       if (Arc->Clearance == 0)
@@ -819,7 +819,7 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
 	  Arc->Clearance = MIL_TO_COORD(10);
 	}
       SetArcBoundingBox (Arc);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
       ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
       DrawArc (Layer, Arc);
       return (Arc);
@@ -832,7 +832,7 @@ ChangeArcClearSize (LayerTypePtr Layer, ArcTypePtr Arc)
  * returns TRUE if changed
  */
 static void *
-ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextSize (LayerType *Layer, TextType *Text)
 {
   int value = (Absolute != 0 ? 0 : Text->Scale) +
               (double)(Absolute != 0 ? Absolute : Delta)
@@ -845,11 +845,11 @@ ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
     {
       AddObjectToSizeUndoList (TEXT_TYPE, Layer, Text, Text);
       EraseText (Layer, Text);
-      r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+      r_delete_entry (Layer->text_tree, (BoxType *) Text);
       RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
       Text->Scale = value;
       SetTextBoundingBox (&PCB->Font, Text);
-      r_insert_entry (Layer->text_tree, (BoxTypePtr) Text, 0);
+      r_insert_entry (Layer->text_tree, (BoxType *) Text, 0);
       ClearFromPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
       DrawText (Layer, Text);
       return (Text);
@@ -862,7 +862,7 @@ ChangeTextSize (LayerTypePtr Layer, TextTypePtr Text)
  * returns TRUE if changed
  */
 static void *
-ChangeElementSize (ElementTypePtr Element)
+ChangeElementSize (ElementType *Element)
 {
   Coord value;
   bool changed = false;
@@ -909,7 +909,7 @@ ChangeElementSize (ElementTypePtr Element)
  * returns TRUE if changed
  */
 static void *
-ChangeElementNameSize (ElementTypePtr Element)
+ChangeElementNameSize (ElementType *Element)
 {
   int value = (Absolute != 0 ? 0 : DESCRIPTION_TEXT (Element).Scale) +
               (double)(Absolute != 0 ? Absolute : Delta)
@@ -939,7 +939,7 @@ ChangeElementNameSize (ElementTypePtr Element)
  * changes the name of a via
  */
 static void *
-ChangeViaName (PinTypePtr Via)
+ChangeViaName (PinType *Via)
 {
   char *old = Via->Name;
 
@@ -958,7 +958,7 @@ ChangeViaName (PinTypePtr Via)
  * changes the name of a pin
  */
 static void *
-ChangePinName (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinName (ElementType *Element, PinType *Pin)
 {
   char *old = Pin->Name;
 
@@ -978,7 +978,7 @@ ChangePinName (ElementTypePtr Element, PinTypePtr Pin)
  * changes the name of a pad
  */
 static void *
-ChangePadName (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadName (ElementType *Element, PadType *Pad)
 {
   char *old = Pad->Name;
 
@@ -998,7 +998,7 @@ ChangePadName (ElementTypePtr Element, PadTypePtr Pad)
  * changes the name of a line
  */
 static void *
-ChangeLineName (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineName (LayerType *Layer, LineType *Line)
 {
   char *old = Line->Number;
 
@@ -1012,7 +1012,7 @@ ChangeLineName (LayerTypePtr Layer, LineTypePtr Line)
  */
 
 char *
-ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element, int which, char *new_name)
+ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element, int which, char *new_name)
 {
   char *old = Element->Name[which].TextString;
 
@@ -1039,7 +1039,7 @@ ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element, int whi
 }
 
 static void *
-ChangeElementName (ElementTypePtr Element)
+ChangeElementName (ElementType *Element)
 {
   if (TEST_FLAG (LOCKFLAG, &Element->Name[0]))
     return (NULL);
@@ -1063,7 +1063,7 @@ ChangeElementName (ElementTypePtr Element)
  * returns true if the string has been changed
  */
 static void *
-ChangeTextName (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextName (LayerType *Layer, TextType *Text)
 {
   char *old = Text->TextString;
 
@@ -1097,7 +1097,7 @@ ChangeLayoutName (char *Name)
  * returns TRUE if done
  */
 bool
-ChangeElementSide (ElementTypePtr Element, Coord yoff)
+ChangeElementSide (ElementType *Element, Coord yoff)
 {
   if (TEST_FLAG (LOCKFLAG, Element))
     return (false);
@@ -1112,7 +1112,7 @@ ChangeElementSide (ElementTypePtr Element, Coord yoff)
  * changes the name of a layer; memory has to be already allocated
  */
 bool
-ChangeLayerName (LayerTypePtr Layer, char *Name)
+ChangeLayerName (LayerType *Layer, char *Name)
 {
   free (CURRENT->Name);
   CURRENT->Name = Name;
@@ -1124,7 +1124,7 @@ ChangeLayerName (LayerTypePtr Layer, char *Name)
  * changes the clearance flag of a line
  */
 static void *
-ChangeLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+ChangeLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line))
     return (NULL);
@@ -1149,7 +1149,7 @@ ChangeLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * sets the clearance flag of a line
  */
 static void *
-SetLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+SetLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line) || TEST_FLAG (CLEARLINEFLAG, Line))
     return (NULL);
@@ -1160,7 +1160,7 @@ SetLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * clears the clearance flag of a line
  */
 static void *
-ClrLineJoin (LayerTypePtr Layer, LineTypePtr Line)
+ClrLineJoin (LayerType *Layer, LineType *Line)
 {
   if (TEST_FLAG (LOCKFLAG, Line) || !TEST_FLAG (CLEARLINEFLAG, Line))
     return (NULL);
@@ -1171,7 +1171,7 @@ ClrLineJoin (LayerTypePtr Layer, LineTypePtr Line)
  * changes the clearance flag of an arc
  */
 static void *
-ChangeArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+ChangeArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc))
     return (NULL);
@@ -1196,7 +1196,7 @@ ChangeArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * sets the clearance flag of an arc
  */
 static void *
-SetArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+SetArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc) || TEST_FLAG (CLEARLINEFLAG, Arc))
     return (NULL);
@@ -1207,7 +1207,7 @@ SetArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * clears the clearance flag of an arc
  */
 static void *
-ClrArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
+ClrArcJoin (LayerType *Layer, ArcType *Arc)
 {
   if (TEST_FLAG (LOCKFLAG, Arc) || !TEST_FLAG (CLEARLINEFLAG, Arc))
     return (NULL);
@@ -1218,7 +1218,7 @@ ClrArcJoin (LayerTypePtr Layer, ArcTypePtr Arc)
  * changes the clearance flag of a text
  */
 static void *
-ChangeTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+ChangeTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text))
     return (NULL);
@@ -1243,7 +1243,7 @@ ChangeTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * sets the clearance flag of a text
  */
 static void *
-SetTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+SetTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text) || TEST_FLAG (CLEARLINEFLAG, Text))
     return (NULL);
@@ -1254,7 +1254,7 @@ SetTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * clears the clearance flag of a text
  */
 static void *
-ClrTextJoin (LayerTypePtr Layer, TextTypePtr Text)
+ClrTextJoin (LayerType *Layer, TextType *Text)
 {
   if (TEST_FLAG (LOCKFLAG, Text) || !TEST_FLAG (CLEARLINEFLAG, Text))
     return (NULL);
@@ -1265,7 +1265,7 @@ ClrTextJoin (LayerTypePtr Layer, TextTypePtr Text)
  * changes the square flag of all pins on an element
  */
 static void *
-ChangeElementSquare (ElementTypePtr Element)
+ChangeElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1288,7 +1288,7 @@ ChangeElementSquare (ElementTypePtr Element)
  * sets the square flag of all pins on an element
  */
 static void *
-SetElementSquare (ElementTypePtr Element)
+SetElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1311,7 +1311,7 @@ SetElementSquare (ElementTypePtr Element)
  * clears the square flag of all pins on an element
  */
 static void *
-ClrElementSquare (ElementTypePtr Element)
+ClrElementSquare (ElementType *Element)
 {
   void *ans = NULL;
 
@@ -1334,7 +1334,7 @@ ClrElementSquare (ElementTypePtr Element)
  * changes the octagon flags of all pins of an element
  */
 static void *
-ChangeElementOctagon (ElementTypePtr Element)
+ChangeElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1353,7 +1353,7 @@ ChangeElementOctagon (ElementTypePtr Element)
  * sets the octagon flags of all pins of an element
  */
 static void *
-SetElementOctagon (ElementTypePtr Element)
+SetElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1372,7 +1372,7 @@ SetElementOctagon (ElementTypePtr Element)
  * clears the octagon flags of all pins of an element
  */
 static void *
-ClrElementOctagon (ElementTypePtr Element)
+ClrElementOctagon (ElementType *Element)
 {
   void *result = NULL;
 
@@ -1391,7 +1391,7 @@ ClrElementOctagon (ElementTypePtr Element)
  * changes the square flag of a pad
  */
 static void *
-ChangePadSquare (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadSquare (ElementType *Element, PadType *Pad)
 {
   if (TEST_FLAG (LOCKFLAG, Pad))
     return (NULL);
@@ -1410,7 +1410,7 @@ ChangePadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * sets the square flag of a pad
  */
 static void *
-SetPadSquare (ElementTypePtr Element, PadTypePtr Pad)
+SetPadSquare (ElementType *Element, PadType *Pad)
 {
 
   if (TEST_FLAG (LOCKFLAG, Pad) || TEST_FLAG (SQUAREFLAG, Pad))
@@ -1424,7 +1424,7 @@ SetPadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * clears the square flag of a pad
  */
 static void *
-ClrPadSquare (ElementTypePtr Element, PadTypePtr Pad)
+ClrPadSquare (ElementType *Element, PadType *Pad)
 {
 
   if (TEST_FLAG (LOCKFLAG, Pad) || !TEST_FLAG (SQUAREFLAG, Pad))
@@ -1438,7 +1438,7 @@ ClrPadSquare (ElementTypePtr Element, PadTypePtr Pad)
  * changes the square flag of a pin
  */
 static void *
-ChangePinSquare (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin))
     return (NULL);
@@ -1457,7 +1457,7 @@ ChangePinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * sets the square flag of a pin
  */
 static void *
-SetPinSquare (ElementTypePtr Element, PinTypePtr Pin)
+SetPinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || TEST_FLAG (SQUAREFLAG, Pin))
     return (NULL);
@@ -1469,7 +1469,7 @@ SetPinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * clears the square flag of a pin
  */
 static void *
-ClrPinSquare (ElementTypePtr Element, PinTypePtr Pin)
+ClrPinSquare (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || !TEST_FLAG (SQUAREFLAG, Pin))
     return (NULL);
@@ -1481,7 +1481,7 @@ ClrPinSquare (ElementTypePtr Element, PinTypePtr Pin)
  * changes the octagon flag of a via 
  */
 static void *
-ChangeViaOctagon (PinTypePtr Via)
+ChangeViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via))
     return (NULL);
@@ -1500,7 +1500,7 @@ ChangeViaOctagon (PinTypePtr Via)
  * sets the octagon flag of a via 
  */
 static void *
-SetViaOctagon (PinTypePtr Via)
+SetViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via) || TEST_FLAG (OCTAGONFLAG, Via))
     return (NULL);
@@ -1512,7 +1512,7 @@ SetViaOctagon (PinTypePtr Via)
  * clears the octagon flag of a via 
  */
 static void *
-ClrViaOctagon (PinTypePtr Via)
+ClrViaOctagon (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via) || !TEST_FLAG (OCTAGONFLAG, Via))
     return (NULL);
@@ -1524,7 +1524,7 @@ ClrViaOctagon (PinTypePtr Via)
  * changes the octagon flag of a pin
  */
 static void *
-ChangePinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin))
     return (NULL);
@@ -1543,7 +1543,7 @@ ChangePinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * sets the octagon flag of a pin
  */
 static void *
-SetPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+SetPinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || TEST_FLAG (OCTAGONFLAG, Pin))
     return (NULL);
@@ -1555,7 +1555,7 @@ SetPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * clears the octagon flag of a pin
  */
 static void *
-ClrPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
+ClrPinOctagon (ElementType *Element, PinType *Pin)
 {
   if (TEST_FLAG (LOCKFLAG, Pin) || !TEST_FLAG (OCTAGONFLAG, Pin))
     return (NULL);
@@ -1567,7 +1567,7 @@ ClrPinOctagon (ElementTypePtr Element, PinTypePtr Pin)
  * changes the hole flag of a via
  */
 bool
-ChangeHole (PinTypePtr Via)
+ChangeHole (PinType *Via)
 {
   if (TEST_FLAG (LOCKFLAG, Via))
     return (false);
@@ -1610,7 +1610,7 @@ ChangeHole (PinTypePtr Via)
  * changes the nopaste flag of a pad
  */
 bool
-ChangePaste (PadTypePtr Pad)
+ChangePaste (PadType *Pad)
 {
   if (TEST_FLAG (LOCKFLAG, Pad))
     return (false);
@@ -1626,7 +1626,7 @@ ChangePaste (PadTypePtr Pad)
  * changes the CLEARPOLY flag of a polygon
  */
 static void *
-ChangePolyClear (LayerTypePtr Layer, PolygonTypePtr Polygon)
+ChangePolyClear (LayerType *Layer, PolygonType *Polygon)
 {
   if (TEST_FLAG (LOCKFLAG, Polygon))
     return (NULL);
@@ -2273,33 +2273,33 @@ QueryInputAndChangeObjectName (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case LINE_TYPE:
       name = gui->prompt_for (_("Linename:"),
-			      EMPTY (((LineTypePtr) Ptr2)->Number));
+			      EMPTY (((LineType *) Ptr2)->Number));
       break;
 
     case VIA_TYPE:
       name = gui->prompt_for (_("Vianame:"),
-			      EMPTY (((PinTypePtr) Ptr2)->Name));
+			      EMPTY (((PinType *) Ptr2)->Name));
       break;
 
     case PIN_TYPE:
-      sprintf (msg, _("%s Pin Name:"), EMPTY (((PinTypePtr) Ptr2)->Number));
-      name = gui->prompt_for (msg, EMPTY (((PinTypePtr) Ptr2)->Name));
+      sprintf (msg, _("%s Pin Name:"), EMPTY (((PinType *) Ptr2)->Number));
+      name = gui->prompt_for (msg, EMPTY (((PinType *) Ptr2)->Name));
       break;
 
     case PAD_TYPE:
-      sprintf (msg, _("%s Pad Name:"), EMPTY (((PadTypePtr) Ptr2)->Number));
-      name = gui->prompt_for (msg, EMPTY (((PadTypePtr) Ptr2)->Name));
+      sprintf (msg, _("%s Pad Name:"), EMPTY (((PadType *) Ptr2)->Number));
+      name = gui->prompt_for (msg, EMPTY (((PadType *) Ptr2)->Name));
       break;
 
     case TEXT_TYPE:
       name = gui->prompt_for (_("Enter text:"),
-			      EMPTY (((TextTypePtr) Ptr2)->TextString));
+			      EMPTY (((TextType *) Ptr2)->TextString));
       break;
 
     case ELEMENT_TYPE:
       name = gui->prompt_for (_("Elementname:"),
 			      EMPTY (ELEMENT_NAME
-				     (PCB, (ElementTypePtr) Ptr2)));
+				     (PCB, (ElementType *) Ptr2)));
       break;
     }
   if (name)
@@ -2353,7 +2353,7 @@ ChangePCBSize (Coord Width, Coord Height)
  * returns TRUE if changed
  */
 static void *
-ChangePadMaskSize (ElementTypePtr Element, PadTypePtr Pad)
+ChangePadMaskSize (ElementType *Element, PadType *Pad)
 {
   Coord value = (Absolute) ? Absolute : Pad->Mask + Delta;
 
@@ -2378,7 +2378,7 @@ ChangePadMaskSize (ElementTypePtr Element, PadTypePtr Pad)
  * returns TRUE if changed
  */
 static void *
-ChangePinMaskSize (ElementTypePtr Element, PinTypePtr Pin)
+ChangePinMaskSize (ElementType *Element, PinType *Pin)
 {
   Coord value = (Absolute) ? Absolute : Pin->Mask + Delta;
 
@@ -2403,7 +2403,7 @@ ChangePinMaskSize (ElementTypePtr Element, PinTypePtr Pin)
  * returns TRUE if changed
  */
 static void *
-ChangeViaMaskSize (PinTypePtr Via)
+ChangeViaMaskSize (PinType *Via)
 {
   Coord value;
 
diff --git a/src/change.h b/src/change.h
index 3fd896d..f42842a 100644
--- a/src/change.h
+++ b/src/change.h
@@ -65,7 +65,7 @@
         (PIN_TYPE | VIA_TYPE | PAD_TYPE)
 
 bool ChangeLayoutName (char *);
-bool ChangeLayerName (LayerTypePtr, char *);
+bool ChangeLayerName (LayerType *, char *);
 bool ChangeSelectedSize (int, Coord, bool);
 bool ChangeSelectedClearSize (int, Coord, bool);
 bool ChangeSelected2ndSize (int, Coord, bool);
@@ -83,9 +83,9 @@ bool ChangeSelectedOctagon (int);
 bool SetSelectedOctagon (int);
 bool ClrSelectedOctagon (int);
 bool ChangeSelectedElementSide (void);
-bool ChangeElementSide (ElementTypePtr, Coord);
-bool ChangeHole (PinTypePtr);
-bool ChangePaste (PadTypePtr);
+bool ChangeElementSide (ElementType *, Coord);
+bool ChangeHole (PinType *);
+bool ChangePaste (PadType *);
 bool ChangeObjectSize (int, void *, void *, void *, Coord, bool);
 bool ChangeObjectThermal (int, void *, void *, void *, int);
 bool ChangeObjectClearSize (int, void *, void *, void *, Coord,
@@ -110,7 +110,7 @@ void ChangePCBSize (Coord, Coord);
 /* Change the specified text on an element, either on the board (give
    PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data).  The old
    string is returned, and must be properly freed by the caller.  */
-char *ChangeElementText (PCBType *pcb, DataType *data, ElementTypePtr Element,
+char *ChangeElementText (PCBType *pcb, DataType *data, ElementType *Element,
 			 int which, char *new_name);
 
 #endif
diff --git a/src/copy.c b/src/copy.c
index 193bb52..9d92ced 100644
--- a/src/copy.c
+++ b/src/copy.c
@@ -58,12 +58,12 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *CopyVia (PinTypePtr);
-static void *CopyLine (LayerTypePtr, LineTypePtr);
-static void *CopyArc (LayerTypePtr, ArcTypePtr);
-static void *CopyText (LayerTypePtr, TextTypePtr);
-static void *CopyPolygon (LayerTypePtr, PolygonTypePtr);
-static void *CopyElement (ElementTypePtr);
+static void *CopyVia (PinType *);
+static void *CopyLine (LayerType *, LineType *);
+static void *CopyArc (LayerType *, ArcType *);
+static void *CopyText (LayerType *, TextType *);
+static void *CopyPolygon (LayerType *, PolygonType *);
+static void *CopyElement (ElementType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -88,8 +88,8 @@ static ObjectFunctionType CopyFunctions = {
  * copies data from one polygon to another
  * 'Dest' has to exist
  */
-PolygonTypePtr
-CopyPolygonLowLevel (PolygonTypePtr Dest, PolygonTypePtr Src)
+PolygonType *
+CopyPolygonLowLevel (PolygonType *Dest, PolygonType *Src)
 {
   Cardinal hole = 0;
   Cardinal n;
@@ -113,9 +113,9 @@ CopyPolygonLowLevel (PolygonTypePtr Dest, PolygonTypePtr Src)
  * copies data from one element to another and creates the destination 
  * if necessary
  */
-ElementTypePtr
-CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
-		     ElementTypePtr Src, bool uniqueName, Coord dx,
+ElementType *
+CopyElementLowLevel (DataType *Data, ElementType *Dest,
+		     ElementType *Src, bool uniqueName, Coord dx,
 		     Coord dy)
 {
   int i;
@@ -184,9 +184,9 @@ CopyElementLowLevel (DataTypePtr Data, ElementTypePtr Dest,
  * copies a via 
  */
 static void *
-CopyVia (PinTypePtr Via)
+CopyVia (PinType *Via)
 {
-  PinTypePtr via;
+  PinType *via;
 
   via = CreateNewVia (PCB->Data, Via->X + DeltaX, Via->Y + DeltaY,
 		      Via->Thickness, Via->Clearance, Via->Mask,
@@ -203,9 +203,9 @@ CopyVia (PinTypePtr Via)
  * copies a line 
  */
 static void *
-CopyLine (LayerTypePtr Layer, LineTypePtr Line)
+CopyLine (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
+  LineType *line;
 
   line = CreateDrawnLineOnLayer (Layer, Line->Point1.X + DeltaX,
 				 Line->Point1.Y + DeltaY,
@@ -226,9 +226,9 @@ CopyLine (LayerTypePtr Layer, LineTypePtr Line)
  * copies an arc
  */
 static void *
-CopyArc (LayerTypePtr Layer, ArcTypePtr Arc)
+CopyArc (LayerType *Layer, ArcType *Arc)
 {
-  ArcTypePtr arc;
+  ArcType *arc;
 
   arc = CreateNewArcOnLayer (Layer, Arc->X + DeltaX,
 			     Arc->Y + DeltaY, Arc->Width, Arc->Height, Arc->StartAngle,
@@ -245,9 +245,9 @@ CopyArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * copies a text 
  */
 static void *
-CopyText (LayerTypePtr Layer, TextTypePtr Text)
+CopyText (LayerType *Layer, TextType *Text)
 {
-  TextTypePtr text;
+  TextType *text;
 
   text = CreateNewText (Layer, &PCB->Font, Text->X + DeltaX,
 			Text->Y + DeltaY, Text->Direction,
@@ -262,16 +262,16 @@ CopyText (LayerTypePtr Layer, TextTypePtr Text)
  * copies a polygon 
  */
 static void *
-CopyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+CopyPolygon (LayerType *Layer, PolygonType *Polygon)
 {
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   polygon = CreateNewPolygon (Layer, NoFlags ());
   CopyPolygonLowLevel (polygon, Polygon);
   MovePolygonLowLevel (polygon, DeltaX, DeltaY);
   if (!Layer->polygon_tree)
     Layer->polygon_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->polygon_tree, (BoxTypePtr) polygon, 0);
+  r_insert_entry (Layer->polygon_tree, (BoxType *) polygon, 0);
   InitClip (PCB->Data, Layer, polygon);
   DrawPolygon (Layer, polygon);
   AddObjectToCreateUndoList (POLYGON_TYPE, Layer, polygon, polygon);
@@ -282,7 +282,7 @@ CopyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * copies an element onto the PCB.  Then does a draw. 
  */
 static void *
-CopyElement (ElementTypePtr Element)
+CopyElement (ElementType *Element)
 {
 
 #ifdef DEBUG
@@ -290,7 +290,7 @@ CopyElement (ElementTypePtr Element)
 	 Element->Name[1].TextString);
 #endif
 
-  ElementTypePtr element = CopyElementLowLevel (PCB->Data,
+  ElementType *element = CopyElementLowLevel (PCB->Data,
 						NULL, Element,
 						TEST_FLAG (UNIQUENAMEFLAG,
 							   PCB), DeltaX,
@@ -333,8 +333,8 @@ CopyPastebufferToLayout (Coord X, Coord Y)
   /* paste all layers */
   for (i = 0; i < max_copper_layer + 2; i++)
     {
-      LayerTypePtr sourcelayer = &PASTEBUFFER->Data->Layer[i],
-	destlayer = LAYER_PTR (i);
+      LayerType *sourcelayer = &PASTEBUFFER->Data->Layer[i];
+      LayerType *destlayer = LAYER_PTR (i);
 
       if (destlayer->On)
 	{
diff --git a/src/copy.h b/src/copy.h
index af0b7ff..e9871fc 100644
--- a/src/copy.h
+++ b/src/copy.h
@@ -40,9 +40,9 @@
 	ELEMENT_TYPE | ELEMENTNAME_TYPE | POLYGON_TYPE | ARC_TYPE)
 
 
-PolygonTypePtr CopyPolygonLowLevel (PolygonTypePtr, PolygonTypePtr);
-ElementTypePtr CopyElementLowLevel (DataTypePtr, ElementTypePtr,
-				    ElementTypePtr, bool, Coord, Coord);
+PolygonType * CopyPolygonLowLevel (PolygonType *, PolygonType *);
+ElementType * CopyElementLowLevel (DataType *, ElementType *,
+				    ElementType *, bool, Coord, Coord);
 bool CopyPastebufferToLayout (Coord, Coord);
 void *CopyObject (int, void *, void *, void *, Coord, Coord);
 
diff --git a/src/create.c b/src/create.c
index 8a1effd..9ed7caa 100644
--- a/src/create.c
+++ b/src/create.c
@@ -68,7 +68,7 @@ static bool be_lenient = false;
 /* ----------------------------------------------------------------------
  * some local prototypes
  */
-static void AddTextToElement (TextTypePtr, FontTypePtr,
+static void AddTextToElement (TextType *, FontType *,
 			      Coord, Coord, unsigned, char *, int,
 			      FlagType);
 
@@ -85,12 +85,12 @@ CreateBeLenient (bool v)
 /* ---------------------------------------------------------------------------
  * creates a new paste buffer
  */
-DataTypePtr
+DataType *
 CreateNewBuffer (void)
 {
-  DataTypePtr data;
-  data = (DataTypePtr) calloc (1, sizeof (DataType));
-  data->pcb = (PCBTypePtr) PCB;
+  DataType *data;
+  data = (DataType *) calloc (1, sizeof (DataType));
+  data->pcb = (PCBType *) PCB;
   return data;
 }
 
@@ -99,7 +99,7 @@ CreateNewBuffer (void)
  * use this to set PCB colors so the config can reassign PCB colors.
  */
 void
-pcb_colors_from_settings (PCBTypePtr ptr)
+pcb_colors_from_settings (PCBType *ptr)
 {
   int i;
 
@@ -138,16 +138,16 @@ pcb_colors_from_settings (PCBTypePtr ptr)
 /* ---------------------------------------------------------------------------
  * creates a new PCB
  */
-PCBTypePtr
+PCBType *
 CreateNewPCB (bool SetDefaultNames)
 {
-  PCBTypePtr ptr;
+  PCBType *ptr;
   int i;
 
   /* allocate memory, switch all layers on and copy resources */
-  ptr = (PCBTypePtr)calloc (1, sizeof (PCBType));
+  ptr = (PCBType *)calloc (1, sizeof (PCBType));
   ptr->Data = CreateNewBuffer ();
-  ptr->Data->pcb = (PCBTypePtr) ptr;
+  ptr->Data->pcb = (PCBType *) ptr;
   ptr->Data->polyClip = 1;
 
   ptr->ThermStyle = 4;
@@ -213,7 +213,7 @@ CreateNewPCB (bool SetDefaultNames)
  * pre-existing PCB.
  */
 int
-CreateNewPCBPost (PCBTypePtr pcb, int use_defaults)
+CreateNewPCBPost (PCBType *pcb, int use_defaults)
 {
   /* copy default settings */
   pcb_colors_from_settings (pcb);
@@ -232,13 +232,13 @@ CreateNewPCBPost (PCBTypePtr pcb, int use_defaults)
 /* ---------------------------------------------------------------------------
  * creates a new via
  */
-PinTypePtr
-CreateNewVia (DataTypePtr Data,
+PinType *
+CreateNewVia (DataType *Data,
 	      Coord X, Coord Y,
 	      Coord Thickness, Coord Clearance, Coord Mask,
 	      Coord DrillingHole, char *Name, FlagType Flags)
 {
-  PinTypePtr Via;
+  PinType *Via;
 
   if (!be_lenient)
     {
@@ -294,7 +294,7 @@ CreateNewVia (DataTypePtr Data,
   SetPinBoundingBox (Via);
   if (!Data->via_tree)
     Data->via_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Data->via_tree, (BoxTypePtr) Via, 0);
+  r_insert_entry (Data->via_tree, (BoxType *) Via, 0);
   return (Via);
 }
 
@@ -310,14 +310,14 @@ struct line_info
 static int
 line_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct line_info *i = (struct line_info *) cl;
 
   if (line->Point1.X == i->X1 &&
       line->Point2.X == i->X2 &&
       line->Point1.Y == i->Y1 && line->Point2.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) (-1);
+      i->ans = (LineType *) (-1);
       longjmp (i->env, 1);
     }
   /* check the other point order */
@@ -325,14 +325,14 @@ line_callback (const BoxType * b, void *cl)
       line->Point2.X == i->X2 &&
       line->Point1.Y == i->Y1 && line->Point2.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) (-1);
+      i->ans = (LineType *) (-1);
       longjmp (i->env, 1);
     }
   if (line->Point2.X == i->X1 &&
       line->Point1.X == i->X2 &&
       line->Point2.Y == i->Y1 && line->Point1.Y == i->Y2)
     {
-      i->ans = (LineTypePtr) - 1;
+      i->ans = (LineType *) - 1;
       longjmp (i->env, 1);
     }
   /* remove unnecessary line points */
@@ -396,8 +396,8 @@ line_callback (const BoxType * b, void *cl)
 /* ---------------------------------------------------------------------------
  * creates a new line on a layer and checks for overlap and extension
  */
-LineTypePtr
-CreateDrawnLineOnLayer (LayerTypePtr Layer,
+LineType *
+CreateDrawnLineOnLayer (LayerType *Layer,
 			Coord X1, Coord Y1,
 			Coord X2, Coord Y2,
 			Coord Thickness, Coord Clearance,
@@ -450,14 +450,14 @@ CreateDrawnLineOnLayer (LayerTypePtr Layer,
 			       Thickness, Clearance, Flags);
 }
 
-LineTypePtr
-CreateNewLineOnLayer (LayerTypePtr Layer,
+LineType *
+CreateNewLineOnLayer (LayerType *Layer,
 		      Coord X1, Coord Y1,
 		      Coord X2, Coord Y2,
 		      Coord Thickness, Coord Clearance,
 		      FlagType Flags)
 {
-  LineTypePtr Line;
+  LineType *Line;
 
   Line = GetLineMemory (Layer);
   if (!Line)
@@ -476,19 +476,19 @@ CreateNewLineOnLayer (LayerTypePtr Layer,
   SetLineBoundingBox (Line);
   if (!Layer->line_tree)
     Layer->line_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+  r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
   return (Line);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new rat-line
  */
-RatTypePtr
-CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
+RatType *
+CreateNewRat (DataType *Data, Coord X1, Coord Y1,
 	      Coord X2, Coord Y2, Cardinal group1,
 	      Cardinal group2, Coord Thickness, FlagType Flags)
 {
-  RatTypePtr Line = GetRatMemory (Data);
+  RatType *Line = GetRatMemory (Data);
 
   if (!Line)
     return (Line);
@@ -505,7 +505,7 @@ CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
   Line->Point2.ID = ID++;
   Line->group1 = group1;
   Line->group2 = group2;
-  SetLineBoundingBox ((LineTypePtr) Line);
+  SetLineBoundingBox ((LineType *) Line);
   if (!Data->rat_tree)
     Data->rat_tree = r_create_tree (NULL, 0, 0);
   r_insert_entry (Data->rat_tree, &Line->BoundingBox, 0);
@@ -515,8 +515,8 @@ CreateNewRat (DataTypePtr Data, Coord X1, Coord Y1,
 /* ---------------------------------------------------------------------------
  * creates a new arc on a layer
  */
-ArcTypePtr
-CreateNewArcOnLayer (LayerTypePtr Layer,
+ArcType *
+CreateNewArcOnLayer (LayerType *Layer,
 		     Coord X1, Coord Y1,
 		     Coord width,
 		     Coord height,
@@ -524,7 +524,7 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
 		     Angle dir, Coord Thickness,
 		     Coord Clearance, FlagType Flags)
 {
-  ArcTypePtr Arc;
+  ArcType *Arc;
 
   ARC_LOOP (Layer);
   {
@@ -551,7 +551,7 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
   SetArcBoundingBox (Arc);
   if (!Layer->arc_tree)
     Layer->arc_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
   return (Arc);
 }
 
@@ -559,13 +559,13 @@ CreateNewArcOnLayer (LayerTypePtr Layer,
 /* ---------------------------------------------------------------------------
  * creates a new polygon from the old formats rectangle data
  */
-PolygonTypePtr
-CreateNewPolygonFromRectangle (LayerTypePtr Layer,
+PolygonType *
+CreateNewPolygonFromRectangle (LayerType *Layer,
 			       Coord X1, Coord Y1,
 			       Coord X2, Coord Y2,
 			       FlagType Flags)
 {
-  PolygonTypePtr polygon = CreateNewPolygon (Layer, Flags);
+  PolygonType *polygon = CreateNewPolygon (Layer, Flags);
   if (!polygon)
     return (polygon);
 
@@ -576,15 +576,15 @@ CreateNewPolygonFromRectangle (LayerTypePtr Layer,
   SetPolygonBoundingBox (polygon);
   if (!Layer->polygon_tree)
     Layer->polygon_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->polygon_tree, (BoxTypePtr) polygon, 0);
+  r_insert_entry (Layer->polygon_tree, (BoxType *) polygon, 0);
   return (polygon);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new text on a layer
  */
-TextTypePtr
-CreateNewText (LayerTypePtr Layer, FontTypePtr PCBFont,
+TextType *
+CreateNewText (LayerType *Layer, FontType *PCBFont,
 	       Coord X, Coord Y,
 	       unsigned Direction, int Scale, char *TextString, FlagType Flags)
 {
@@ -612,17 +612,17 @@ CreateNewText (LayerTypePtr Layer, FontTypePtr PCBFont,
   text->ID = ID++;
   if (!Layer->text_tree)
     Layer->text_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (Layer->text_tree, (BoxTypePtr) text, 0);
+  r_insert_entry (Layer->text_tree, (BoxType *) text, 0);
   return (text);
 }
 
 /* ---------------------------------------------------------------------------
  * creates a new polygon on a layer
  */
-PolygonTypePtr
-CreateNewPolygon (LayerTypePtr Layer, FlagType Flags)
+PolygonType *
+CreateNewPolygon (LayerType *Layer, FlagType Flags)
 {
-  PolygonTypePtr polygon = GetPolygonMemory (Layer);
+  PolygonType *polygon = GetPolygonMemory (Layer);
 
   /* copy values */
   polygon->Flags = Flags;
@@ -636,10 +636,10 @@ CreateNewPolygon (LayerTypePtr Layer, FlagType Flags)
 /* ---------------------------------------------------------------------------
  * creates a new point in a polygon
  */
-PointTypePtr
-CreateNewPointInPolygon (PolygonTypePtr Polygon, Coord X, Coord Y)
+PointType *
+CreateNewPointInPolygon (PolygonType *Polygon, Coord X, Coord Y)
 {
-  PointTypePtr point = GetPointMemoryInPolygon (Polygon);
+  PointType *point = GetPointMemoryInPolygon (Polygon);
 
   /* copy values */
   point->X = X;
@@ -663,9 +663,9 @@ CreateNewHoleInPolygon (PolygonType *Polygon)
  * creates an new element
  * memory is allocated if needed
  */
-ElementTypePtr
-CreateNewElement (DataTypePtr Data, ElementTypePtr Element,
-		  FontTypePtr PCBFont,
+ElementType *
+CreateNewElement (DataType *Data, ElementType *Element,
+		  FontType *PCBFont,
 		  FlagType Flags,
 		  char *Description, char *NameOnPCB, char *Value,
 		  Coord TextX, Coord TextY, BYTE Direction,
@@ -704,8 +704,8 @@ CreateNewElement (DataTypePtr Data, ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new arc in an element
  */
-ArcTypePtr
-CreateNewArcInElement (ElementTypePtr Element,
+ArcType *
+CreateNewArcInElement (ElementType *Element,
 		       Coord X, Coord Y,
 		       Coord Width, Coord Height,
 		       Angle angle, Angle delta, Coord Thickness)
@@ -742,8 +742,8 @@ CreateNewArcInElement (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new line for an element
  */
-LineTypePtr
-CreateNewLineInElement (ElementTypePtr Element,
+LineType *
+CreateNewLineInElement (ElementType *Element,
 			Coord X1, Coord Y1,
 			Coord X2, Coord Y2,
 			Coord Thickness)
@@ -771,14 +771,14 @@ CreateNewLineInElement (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new pin in an element
  */
-PinTypePtr
-CreateNewPin (ElementTypePtr Element,
+PinType *
+CreateNewPin (ElementType *Element,
 	      Coord X, Coord Y,
 	      Coord Thickness, Coord Clearance, Coord Mask,
 	      Coord DrillingHole, char *Name, char *Number,
 	      FlagType Flags)
 {
-  PinTypePtr pin = GetPinMemory (Element);
+  PinType *pin = GetPinMemory (Element);
 
   /* copy values */
   pin->X = X;
@@ -840,13 +840,13 @@ CreateNewPin (ElementTypePtr Element,
 /* ---------------------------------------------------------------------------
  * creates a new pad in an element
  */
-PadTypePtr
-CreateNewPad (ElementTypePtr Element,
+PadType *
+CreateNewPad (ElementType *Element,
 	      Coord X1, Coord Y1, Coord X2,
 	      Coord Y2, Coord Thickness, Coord Clearance,
 	      Coord Mask, char *Name, char *Number, FlagType Flags)
 {
-  PadTypePtr pad = GetPadMemory (Element);
+  PadType *pad = GetPadMemory (Element);
 
   /* copy values */
   if (X1 > X2 || (X1 == X2 && Y1 > Y2))
@@ -880,7 +880,7 @@ CreateNewPad (ElementTypePtr Element,
  * copies the values to the appropriate text object
  */
 static void
-AddTextToElement (TextTypePtr Text, FontTypePtr PCBFont,
+AddTextToElement (TextType *Text, FontType *PCBFont,
 		  Coord X, Coord Y,
 		  unsigned Direction, char *TextString, int Scale, FlagType Flags)
 {
@@ -900,18 +900,18 @@ AddTextToElement (TextTypePtr Text, FontTypePtr PCBFont,
 /* ---------------------------------------------------------------------------
  * creates a new line in a symbol
  */
-LineTypePtr
-CreateNewLineInSymbol (SymbolTypePtr Symbol,
+LineType *
+CreateNewLineInSymbol (SymbolType *Symbol,
 		       Coord X1, Coord Y1,
 		       Coord X2, Coord Y2, Coord Thickness)
 {
-  LineTypePtr line = Symbol->Line;
+  LineType *line = Symbol->Line;
 
   /* realloc new memory if necessary and clear it */
   if (Symbol->LineN >= Symbol->LineMax)
     {
       Symbol->LineMax += STEP_SYMBOLLINE;
-      line = (LineTypePtr)realloc (line, Symbol->LineMax * sizeof (LineType));
+      line = (LineType *)realloc (line, Symbol->LineMax * sizeof (LineType));
       Symbol->Line = line;
       memset (line + Symbol->LineN, 0, STEP_SYMBOLLINE * sizeof (LineType));
     }
@@ -932,7 +932,7 @@ CreateNewLineInSymbol (SymbolTypePtr Symbol,
  * if the fonts filename doesn't contain a directory component
  */
 void
-CreateDefaultFont (PCBTypePtr pcb)
+CreateDefaultFont (PCBType *pcb)
 {
   if (ParseFont (&pcb->Font, Settings.FontFile))
     Message (_("Can't find font-symbol-file '%s'\n"), Settings.FontFile);
@@ -942,11 +942,11 @@ CreateDefaultFont (PCBTypePtr pcb)
  * adds a new line to the rubberband list of 'Crosshair.AttachedObject'
  * if Layer == 0  it is a rat line
  */
-RubberbandTypePtr
-CreateNewRubberbandEntry (LayerTypePtr Layer,
-			  LineTypePtr Line, PointTypePtr MovedPoint)
+RubberbandType *
+CreateNewRubberbandEntry (LayerType *Layer,
+			  LineType *Line, PointType *MovedPoint)
 {
-  RubberbandTypePtr ptr = GetRubberbandMemory ();
+  RubberbandType *ptr = GetRubberbandMemory ();
 
   /* we toggle the RUBBERENDFLAG of the line to determine if */
   /* both points are being moved. */
@@ -960,10 +960,10 @@ CreateNewRubberbandEntry (LayerTypePtr Layer,
 /* ---------------------------------------------------------------------------
  * Add a new net to the netlist menu
  */
-LibraryMenuTypePtr
-CreateNewNet (LibraryTypePtr lib, char *name, char *style)
+LibraryMenuType *
+CreateNewNet (LibraryType *lib, char *name, char *style)
 {
-  LibraryMenuTypePtr menu;
+  LibraryMenuType *menu;
   char temp[64];
 
   sprintf (temp, "  %s", name);
@@ -980,10 +980,10 @@ CreateNewNet (LibraryTypePtr lib, char *name, char *style)
 /* ---------------------------------------------------------------------------
  * Add a connection to the net
  */
-LibraryEntryTypePtr
-CreateNewConnection (LibraryMenuTypePtr net, char *conn)
+LibraryEntryType *
+CreateNewConnection (LibraryMenuType *net, char *conn)
 {
-  LibraryEntryTypePtr entry = GetLibraryEntryMemory (net);
+  LibraryEntryType *entry = GetLibraryEntryMemory (net);
 
   entry->ListEntry = STRDUP (conn);
   return (entry);
@@ -992,8 +992,8 @@ CreateNewConnection (LibraryMenuTypePtr net, char *conn)
 /* ---------------------------------------------------------------------------
  * Add an attribute to a list.
  */
-AttributeTypePtr
-CreateNewAttribute (AttributeListTypePtr list, char *name, char *value)
+AttributeType *
+CreateNewAttribute (AttributeListType *list, char *name, char *value)
 {
   if (list->Number >= list->Max)
     {
diff --git a/src/create.h b/src/create.h
index faebe52..4872514 100644
--- a/src/create.h
+++ b/src/create.h
@@ -37,53 +37,32 @@
    things.  */
 void CreateBeLenient (bool);
 
-DataTypePtr CreateNewBuffer (void);
-void pcb_colors_from_settings (PCBTypePtr);
-PCBTypePtr CreateNewPCB (bool);
+DataType * CreateNewBuffer (void);
+void pcb_colors_from_settings (PCBType *);
+PCBType * CreateNewPCB (bool);
 /* Called after PCB->Data->LayerN is set.  Returns zero if no errors,
    else nonzero.  */
-int CreateNewPCBPost (PCBTypePtr, int /* set defaults */);
-PinTypePtr CreateNewVia (DataTypePtr, Coord, Coord, Coord, Coord,
-			 Coord, Coord, char *, FlagType);
-LineTypePtr CreateDrawnLineOnLayer (LayerTypePtr, Coord, Coord, Coord,
-				    Coord, Coord, Coord, FlagType);
-LineTypePtr CreateNewLineOnLayer (LayerTypePtr, Coord, Coord, Coord,
-				  Coord, Coord, Coord, FlagType);
-RatTypePtr CreateNewRat (DataTypePtr, Coord, Coord, Coord,
-			 Coord, Cardinal, Cardinal, Coord, FlagType);
-ArcTypePtr CreateNewArcOnLayer (LayerTypePtr, Coord, Coord, Coord, Coord,
-				Angle, Angle, Coord, Coord, FlagType);
-PolygonTypePtr CreateNewPolygonFromRectangle (LayerTypePtr, Coord,
-					      Coord, Coord,
-					      Coord, FlagType);
-TextTypePtr CreateNewText (LayerTypePtr, FontTypePtr, Coord,
-			   Coord, unsigned, int, char *, FlagType);
-PolygonTypePtr CreateNewPolygon (LayerTypePtr, FlagType);
-PointTypePtr CreateNewPointInPolygon (PolygonTypePtr,
-				      Coord, Coord);
-PolygonType *CreateNewHoleInPolygon (PolygonType *polygon);
-ElementTypePtr CreateNewElement (DataTypePtr, ElementTypePtr,
-				 FontTypePtr, FlagType, char *, char *,
-				 char *, Coord, Coord, BYTE,
-				 int, FlagType, bool);
-LineTypePtr CreateNewLineInElement (ElementTypePtr, Coord, Coord,
-				    Coord, Coord, Coord);
-ArcTypePtr CreateNewArcInElement (ElementTypePtr, Coord, Coord,
-				  Coord, Coord, Angle, Angle, Coord);
-PinTypePtr CreateNewPin (ElementTypePtr, Coord, Coord,
-			 Coord, Coord, Coord, Coord,
-			 char *, char *, FlagType);
-PadTypePtr CreateNewPad (ElementTypePtr, Coord, Coord,
-			 Coord, Coord, Coord, Coord,
-			 Coord, char *, char *, FlagType);
-LineTypePtr CreateNewLineInSymbol (SymbolTypePtr, Coord, Coord,
-				   Coord, Coord, Coord);
-void CreateDefaultFont (PCBTypePtr);
-RubberbandTypePtr CreateNewRubberbandEntry (LayerTypePtr,
-					    LineTypePtr, PointTypePtr);
-LibraryMenuTypePtr CreateNewNet (LibraryTypePtr, char *, char *);
-LibraryEntryTypePtr CreateNewConnection (LibraryMenuTypePtr, char *);
-
-AttributeTypePtr CreateNewAttribute (AttributeListTypePtr list, char *name, char *value);
+int CreateNewPCBPost (PCBType *, int /* set defaults */);
+PinType * CreateNewVia (DataType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, FlagType);
+LineType * CreateDrawnLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType);
+LineType * CreateNewLineOnLayer (LayerType *, Coord, Coord, Coord, Coord, Coord, Coord, FlagType);
+RatType * CreateNewRat (DataType *, Coord, Coord, Coord, Coord, Cardinal, Cardinal, Coord, FlagType);
+ArcType * CreateNewArcOnLayer (LayerType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord, Coord, FlagType);
+PolygonType * CreateNewPolygonFromRectangle (LayerType *, Coord, Coord, Coord, Coord, FlagType);
+TextType * CreateNewText (LayerType *, FontType *, Coord, Coord, unsigned, int, char *, FlagType);
+PolygonType * CreateNewPolygon (LayerType *, FlagType);
+PointType * CreateNewPointInPolygon (PolygonType *, Coord, Coord);
+PolygonType * CreateNewHoleInPolygon (PolygonType *polygon);
+ElementType * CreateNewElement (DataType *, ElementType *, FontType *, FlagType, char *, char *, char *, Coord, Coord, BYTE, int, FlagType, bool);
+LineType * CreateNewLineInElement (ElementType *, Coord, Coord, Coord, Coord, Coord);
+ArcType * CreateNewArcInElement (ElementType *, Coord, Coord, Coord, Coord, Angle, Angle, Coord);
+PinType * CreateNewPin (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType);
+PadType * CreateNewPad (ElementType *, Coord, Coord, Coord, Coord, Coord, Coord, Coord, char *, char *, FlagType);
+LineType * CreateNewLineInSymbol (SymbolType *, Coord, Coord, Coord, Coord, Coord);
+void CreateDefaultFont (PCBType *);
+RubberbandType * CreateNewRubberbandEntry (LayerType *, LineType *, PointType *);
+LibraryMenuType * CreateNewNet (LibraryType *, char *, char *);
+LibraryEntryType * CreateNewConnection (LibraryMenuType *, char *);
+AttributeType * CreateNewAttribute (AttributeListType *list, char *name, char *value);
 
 #endif
diff --git a/src/crosshair.c b/src/crosshair.c
index 055f390..f0526b8 100644
--- a/src/crosshair.c
+++ b/src/crosshair.c
@@ -59,9 +59,9 @@ typedef struct
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void XORPolygon (PolygonTypePtr, Coord, Coord);
-static void XORDrawElement (ElementTypePtr, Coord, Coord);
-static void XORDrawBuffer (BufferTypePtr);
+static void XORPolygon (PolygonType *, Coord, Coord);
+static void XORDrawElement (ElementType *, Coord, Coord);
+static void XORDrawBuffer (BufferType *);
 static void XORDrawInsertPointObject (void);
 static void XORDrawMoveOrCopyObject (void);
 static void XORDrawAttachedLine (Coord, Coord, Coord, Coord, Coord);
@@ -82,7 +82,7 @@ thindraw_moved_pv (PinType *pv, Coord x, Coord y)
  * creates a tmp polygon with coordinates converted to screen system
  */
 static void
-XORPolygon (PolygonTypePtr polygon, Coord dx, Coord dy)
+XORPolygon (PolygonType *polygon, Coord dx, Coord dy)
 {
   Cardinal i;
   for (i = 0; i < polygon->PointN; i++)
@@ -103,7 +103,7 @@ static void
 XORDrawAttachedArc (Coord thick)
 {
   ArcType arc;
-  BoxTypePtr bx;
+  BoxType *bx;
   Coord wx, wy;
   Angle sa, dir;
   Coord wid = thick / 2;
@@ -186,7 +186,7 @@ XORDrawAttachedLine (Coord x1, Coord y1, Coord x2, Coord y2, Coord thick)
  * draws the elements of a loaded circuit which is to be merged in
  */
 static void
-XORDrawElement (ElementTypePtr Element, Coord DX, Coord DY)
+XORDrawElement (ElementType *Element, Coord DX, Coord DY)
 {
   /* if no silkscreen, draw the bounding box */
   if (Element->ArcN == 0 && Element->LineN == 0)
@@ -278,7 +278,7 @@ XORDrawElement (ElementTypePtr Element, Coord DX, Coord DY)
  * draws all visible and attached objects of the pastebuffer
  */
 static void
-XORDrawBuffer (BufferTypePtr Buffer)
+XORDrawBuffer (BufferType *Buffer)
 {
   Cardinal i;
   Coord x, y;
@@ -291,7 +291,7 @@ XORDrawBuffer (BufferTypePtr Buffer)
   for (i = 0; i < max_copper_layer + 2; i++)
     if (PCB->Data->Layer[i].On)
       {
-	LayerTypePtr layer = &Buffer->Data->Layer[i];
+	LayerType *layer = &Buffer->Data->Layer[i];
 
 	LINE_LOOP (layer);
 	{
@@ -316,7 +316,7 @@ XORDrawBuffer (BufferTypePtr Buffer)
 	END_LOOP;
 	TEXT_LOOP (layer);
 	{
-	  BoxTypePtr box = &text->BoundingBox;
+	  BoxType *box = &text->BoundingBox;
 	  gui->draw_rect (Crosshair.GC,
 			  x + box->X1, y + box->Y1, x + box->X2, y + box->Y2);
 	}
@@ -355,8 +355,8 @@ XORDrawBuffer (BufferTypePtr Buffer)
 static void
 XORDrawInsertPointObject (void)
 {
-  LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
-  PointTypePtr point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+  LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
+  PointType *point = (PointType *) Crosshair.AttachedObject.Ptr3;
 
   if (Crosshair.AttachedObject.Type != NO_TYPE)
     {
@@ -373,7 +373,7 @@ XORDrawInsertPointObject (void)
 static void
 XORDrawMoveOrCopyObject (void)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   Cardinal i;
   Coord dx = Crosshair.X - Crosshair.AttachedObject.X,
     dy = Crosshair.Y - Crosshair.AttachedObject.Y;
@@ -382,14 +382,14 @@ XORDrawMoveOrCopyObject (void)
     {
     case VIA_TYPE:
       {
-        PinTypePtr via = (PinTypePtr) Crosshair.AttachedObject.Ptr1;
+        PinType *via = (PinType *) Crosshair.AttachedObject.Ptr1;
         thindraw_moved_pv (via, dx, dy);
         break;
       }
 
     case LINE_TYPE:
       {
-	LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
+	LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
 
 	XORDrawAttachedLine (line->Point1.X + dx, line->Point1.Y + dy,
 			     line->Point2.X + dx, line->Point2.Y + dy,
@@ -399,7 +399,7 @@ XORDrawMoveOrCopyObject (void)
 
     case ARC_TYPE:
       {
-	ArcTypePtr Arc = (ArcTypePtr) Crosshair.AttachedObject.Ptr2;
+	ArcType *Arc = (ArcType *) Crosshair.AttachedObject.Ptr2;
 
 	gui->draw_arc (Crosshair.GC,
 		       Arc->X + dx,
@@ -410,8 +410,8 @@ XORDrawMoveOrCopyObject (void)
 
     case POLYGON_TYPE:
       {
-	PolygonTypePtr polygon =
-	  (PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
+	PolygonType *polygon =
+	  (PolygonType *) Crosshair.AttachedObject.Ptr2;
 
 	/* the tmp polygon has n+1 points because the first
 	 * and the last one are set to the same coordinates
@@ -422,11 +422,11 @@ XORDrawMoveOrCopyObject (void)
 
     case LINEPOINT_TYPE:
       {
-	LineTypePtr line;
-	PointTypePtr point;
+	LineType *line;
+	PointType *point;
 
-	line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
-	point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+	line = (LineType *) Crosshair.AttachedObject.Ptr2;
+	point = (PointType *) Crosshair.AttachedObject.Ptr3;
 	if (point == &line->Point1)
 	  XORDrawAttachedLine (point->X + dx,
 			       point->Y + dy, line->Point2.X,
@@ -440,12 +440,12 @@ XORDrawMoveOrCopyObject (void)
 
     case POLYGONPOINT_TYPE:
       {
-	PolygonTypePtr polygon;
-	PointTypePtr point;
+	PolygonType *polygon;
+	PointType *point;
 	Cardinal point_idx, prev, next;
 
-	polygon = (PolygonTypePtr) Crosshair.AttachedObject.Ptr2;
-	point = (PointTypePtr) Crosshair.AttachedObject.Ptr3;
+	polygon = (PolygonType *) Crosshair.AttachedObject.Ptr2;
+	point = (PointType *) Crosshair.AttachedObject.Ptr3;
 	point_idx = polygon_point_idx (polygon, point);
 
 	/* get previous and following point */
@@ -465,8 +465,8 @@ XORDrawMoveOrCopyObject (void)
     case ELEMENTNAME_TYPE:
       {
 	/* locate the element "mark" and draw an association line from crosshair to it */
-	ElementTypePtr element =
-	  (ElementTypePtr) Crosshair.AttachedObject.Ptr1;
+	ElementType *element =
+	  (ElementType *) Crosshair.AttachedObject.Ptr1;
 
 	gui->draw_line (Crosshair.GC,
 			element->MarkX,
@@ -475,8 +475,8 @@ XORDrawMoveOrCopyObject (void)
       }
     case TEXT_TYPE:
       {
-	TextTypePtr text = (TextTypePtr) Crosshair.AttachedObject.Ptr2;
-	BoxTypePtr box = &text->BoundingBox;
+	TextType *text = (TextType *) Crosshair.AttachedObject.Ptr2;
+	BoxType *box = &text->BoundingBox;
 	gui->draw_rect (Crosshair.GC,
 			box->X1 + dx,
 			box->Y1 + dy, box->X2 + dx, box->Y2 + dy);
@@ -487,7 +487,7 @@ XORDrawMoveOrCopyObject (void)
     case PAD_TYPE:
     case PIN_TYPE:
     case ELEMENT_TYPE:
-      XORDrawElement ((ElementTypePtr) Crosshair.AttachedObject.Ptr2, dx, dy);
+      XORDrawElement ((ElementType *) Crosshair.AttachedObject.Ptr2, dx, dy);
       break;
     }
 
@@ -496,7 +496,7 @@ XORDrawMoveOrCopyObject (void)
   ptr = Crosshair.AttachedObject.Rubberband;
   while (i)
     {
-      PointTypePtr point1, point2;
+      PointType *point1, *point2;
 
       if (TEST_FLAG (VIAFLAG, ptr->Line))
 	{
@@ -986,7 +986,7 @@ FitCrosshairIntoGrid (Coord X, Coord Y)
        (Settings.Mode == MOVE_MODE &&
         Crosshair.AttachedObject.Type == LINEPOINT_TYPE)))
     {
-      PadTypePtr pad = (PadTypePtr) ptr2;
+      PadType *pad = (PadType *) ptr2;
       LayerType *desired_layer;
       Cardinal desired_group;
       Cardinal SLayer, CLayer;
diff --git a/src/data.c b/src/data.c
index 702d9ca..9d6588c 100644
--- a/src/data.c
+++ b/src/data.c
@@ -43,7 +43,7 @@
 CrosshairType Crosshair;	/* information about cursor settings */
 MarkType Marked;		/* a cross-hair mark */
 OutputType Output;		/* some widgets ... used for drawing */
-PCBTypePtr PCB;			/* pointer to layout struct */
+PCBType *PCB;			/* pointer to layout struct */
 
 char *Progname;
 SettingType Settings;
diff --git a/src/data.h b/src/data.h
index efb2ed1..28cbfda 100644
--- a/src/data.h
+++ b/src/data.h
@@ -43,7 +43,7 @@ extern MarkType Marked;
 
 extern OutputType Output;
 
-extern PCBTypePtr PCB;
+extern PCBType *PCB;
 
 #define max_group (PCB->Data->LayerN)
 #define max_copper_layer (PCB->Data->LayerN)
diff --git a/src/djopt.c b/src/djopt.c
index a377508..8a51d0e 100644
--- a/src/djopt.c
+++ b/src/djopt.c
@@ -868,7 +868,7 @@ move_corner (corner_s * c, int x, int y)
     }
   for (i = 0; i < c->n_lines; i++)
     {
-      LineTypePtr tl = c->lines[i]->line;
+      LineType *tl = c->lines[i]->line;
       if (tl)
 	{
 	  if (c->lines[i]->s == c)
@@ -2479,7 +2479,7 @@ choose_example_line (corner_s * c1, corner_s * c2)
 		 c[ci]->lines[li]->line->Clearance,
 		 flags_to_string (c[ci]->lines[li]->line->Flags, LINE_TYPE));
 	/* Pads are disqualified, as we want to mimic a trace line. */
-	if (c[ci]->lines[li]->line == (LineTypePtr) c[ci]->pad)
+	if (c[ci]->lines[li]->line == (LineType *) c[ci]->pad)
 	  {
 	    dprintf ("  bad, pad\n");
 	    continue;
@@ -2950,7 +2950,7 @@ ActionDJopt (int argc, char **argv, Coord x, Coord y)
     ls->e = find_corner (pad->Point2.X, pad->Point2.Y, layern);
     ls->e->pad = pad;
     ls->layer = layern;
-    ls->line = (LineTypePtr) pad;
+    ls->line = (LineType *) pad;
     add_line_to_corner (ls, ls->s);
     add_line_to_corner (ls, ls->e);
 
diff --git a/src/draw.c b/src/draw.c
index a11c6e2..ae1e99a 100644
--- a/src/draw.c
+++ b/src/draw.c
@@ -80,15 +80,15 @@ static bool doing_assy = false;
 static void DrawEverything (const BoxType *);
 static void DrawPPV (int group, const BoxType *);
 static void AddPart (void *);
-static void SetPVColor (PinTypePtr, int);
-static void DrawEMark (ElementTypePtr, Coord, Coord, bool);
+static void SetPVColor (PinType *, int);
+static void DrawEMark (ElementType *, Coord, Coord, bool);
 static void DrawRats (const BoxType *);
 
 /*--------------------------------------------------------------------------------------
  * setup color for pin or via
  */
 static void
-SetPVColor (PinTypePtr Pin, int Type)
+SetPVColor (PinType *Pin, int Type)
 {
   char *color;
 
@@ -205,7 +205,7 @@ _draw_pv_name (PinType *pv)
 }
 
 static void
-_draw_pv (PinTypePtr pv, bool draw_hole)
+_draw_pv (PinType *pv, bool draw_hole)
 {
   if (TEST_FLAG (THINDRAWFLAG, PCB))
     gui->thindraw_pcb_pv (Output.fgGC, Output.fgGC, pv, draw_hole, false);
@@ -217,7 +217,7 @@ _draw_pv (PinTypePtr pv, bool draw_hole)
 }
 
 static void
-draw_pin (PinTypePtr pin, bool draw_hole)
+draw_pin (PinType *pin, bool draw_hole)
 {
   SetPVColor (pin, PIN_TYPE);
   _draw_pv (pin, draw_hole);
@@ -231,7 +231,7 @@ pin_callback (const BoxType * b, void *cl)
 }
 
 static void
-draw_via (PinTypePtr via, bool draw_hole)
+draw_via (PinType *via, bool draw_hole)
 {
   SetPVColor (via, VIA_TYPE);
   _draw_pv (via, draw_hole);
@@ -327,7 +327,7 @@ draw_pad (PadType *pad)
 static int
 pad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   int *side = cl;
 
   if (ON_SIDE (pad, *side))
@@ -355,8 +355,8 @@ draw_element_name (ElementType *element)
 static int
 name_callback (const BoxType * b, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) b;
-  ElementTypePtr element = (ElementTypePtr) text->Element;
+  TextType *text = (TextType *) b;
+  ElementType *element = (ElementType *) text->Element;
   int *side = cl;
 
   if (TEST_FLAG (HIDENAMEFLAG, element))
@@ -386,7 +386,7 @@ draw_element_pins_and_pads (ElementType *element)
 static int
 EMark_callback (const BoxType * b, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) b;
+  ElementType *element = (ElementType *) b;
 
   DrawEMark (element, element->MarkX, element->MarkY, !FRONT (element));
   return 1;
@@ -395,7 +395,7 @@ EMark_callback (const BoxType * b, void *cl)
 static int
 hole_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   int plated = cl ? *(int *) cl : -1;
 
   if ((plated == 0 && !TEST_FLAG (HOLEFLAG, pv)) ||
@@ -551,7 +551,7 @@ draw_arc (LayerType *layer, ArcType *arc)
 static int
 arc_callback (const BoxType * b, void *cl)
 {
-  draw_arc ((LayerTypePtr) cl, (ArcTypePtr) b);
+  draw_arc ((LayerType *) cl, (ArcType *) b);
   return 1;
 }
 
@@ -584,7 +584,7 @@ draw_element_package (ElementType *element)
 static int
 element_callback (const BoxType * b, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) b;
+  ElementType *element = (ElementType *) b;
   int *side = cl;
 
   if (ON_SIDE (element, *side))
@@ -769,7 +769,7 @@ DrawEverything (const BoxType *drawn_area)
 }
 
 static void
-DrawEMark (ElementTypePtr e, Coord X, Coord Y, bool invisible)
+DrawEMark (ElementType *e, Coord X, Coord Y, bool invisible)
 {
   Coord mark_size = EMARK_SIZE;
   if (!PCB->InvisibleObjectsOn && invisible)
@@ -854,7 +854,7 @@ DrawPPV (int group, const BoxType *drawn_area)
 static int
 clearPin_callback (const BoxType * b, void *cl)
 {
-  PinType *pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   if (TEST_FLAG (THINDRAWFLAG, PCB) || TEST_FLAG (THINDRAWPOLYFLAG, PCB))
     gui->thindraw_pcb_pv (Output.pmGC, Output.pmGC, pin, false, true);
   else
@@ -911,7 +911,7 @@ poly_callback (const BoxType * b, void *cl)
 static int
 clearPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   int *side = cl;
   if (ON_SIDE (pad, *side) && pad->Mask)
     _draw_pad (Output.pmGC, pad, true, true);
@@ -1065,7 +1065,7 @@ text_callback (const BoxType * b, void *cl)
 }
 
 void
-DrawLayer (LayerTypePtr Layer, const BoxType * screen)
+DrawLayer (LayerType *Layer, const BoxType *screen)
 {
   struct poly_info info = {screen, Layer};
 
@@ -1108,7 +1108,7 @@ DrawLayerGroup (int group, const BoxType *drawn_area)
 {
   int i, rv = 1;
   int layernum;
-  LayerTypePtr Layer;
+  LayerType *Layer;
   int n_entries = PCB->LayerGroups.Number[group];
   Cardinal *layers = PCB->LayerGroups.Entries[group];
 
@@ -1130,7 +1130,7 @@ DrawLayerGroup (int group, const BoxType *drawn_area)
 }
 
 static void
-GatherPVName (PinTypePtr Ptr)
+GatherPVName (PinType *Ptr)
 {
   BoxType box;
   bool vert = TEST_FLAG (EDGE2FLAG, Ptr);
@@ -1160,7 +1160,7 @@ GatherPVName (PinTypePtr Ptr)
 }
 
 static void
-GatherPadName (PadTypePtr Pad)
+GatherPadName (PadType *Pad)
 {
   BoxType box;
   bool vert;
@@ -1195,19 +1195,19 @@ GatherPadName (PadTypePtr Pad)
  * lowlevel drawing routine for text objects
  */
 void
-DrawTextLowLevel (TextTypePtr Text, Coord min_line_width)
+DrawTextLowLevel (TextType *Text, Coord min_line_width)
 {
   Coord x = 0;
   unsigned char *string = (unsigned char *) Text->TextString;
   Cardinal n;
-  FontTypePtr font = &PCB->Font;
+  FontType *font = &PCB->Font;
 
   while (string && *string)
     {
       /* draw lines if symbol is valid and data is present */
       if (*string <= MAX_FONTPOSITION && font->Symbol[*string].Valid)
 	{
-	  LineTypePtr line = font->Symbol[*string].Line;
+	  LineType *line = font->Symbol[*string].Line;
 	  LineType newline;
 
 	  for (n = font->Symbol[*string].LineN; n; n--, line++)
@@ -1278,7 +1278,7 @@ DrawTextLowLevel (TextTypePtr Text, Coord min_line_width)
  * draw a via object
  */
 void
-DrawVia (PinTypePtr Via)
+DrawVia (PinType *Via)
 {
   AddPart (Via);
   if (!TEST_FLAG (HOLEFLAG, Via) && TEST_FLAG (DISPLAYNAMEFLAG, Via))
@@ -1289,7 +1289,7 @@ DrawVia (PinTypePtr Via)
  * draws the name of a via
  */
 void
-DrawViaName (PinTypePtr Via)
+DrawViaName (PinType *Via)
 {
   GatherPVName (Via);
 }
@@ -1298,7 +1298,7 @@ DrawViaName (PinTypePtr Via)
  * draw a pin object
  */
 void
-DrawPin (PinTypePtr Pin)
+DrawPin (PinType *Pin)
 {
   AddPart (Pin);
   if ((!TEST_FLAG (HOLEFLAG, Pin) && TEST_FLAG (DISPLAYNAMEFLAG, Pin))
@@ -1310,7 +1310,7 @@ DrawPin (PinTypePtr Pin)
  * draws the name of a pin
  */
 void
-DrawPinName (PinTypePtr Pin)
+DrawPinName (PinType *Pin)
 {
   GatherPVName (Pin);
 }
@@ -1319,7 +1319,7 @@ DrawPinName (PinTypePtr Pin)
  * draw a pad object
  */
 void
-DrawPad (PadTypePtr Pad)
+DrawPad (PadType *Pad)
 {
   AddPart (Pad);
   if (doing_pinout || TEST_FLAG (DISPLAYNAMEFLAG, Pad))
@@ -1330,7 +1330,7 @@ DrawPad (PadTypePtr Pad)
  * draws the name of a pad
  */
 void
-DrawPadName (PadTypePtr Pad)
+DrawPadName (PadType *Pad)
 {
   GatherPadName (Pad);
 }
@@ -1339,7 +1339,7 @@ DrawPadName (PadTypePtr Pad)
  * draws a line on a layer
  */
 void
-DrawLine (LayerTypePtr Layer, LineTypePtr Line)
+DrawLine (LayerType *Layer, LineType *Line)
 {
   AddPart (Line);
 }
@@ -1348,7 +1348,7 @@ DrawLine (LayerTypePtr Layer, LineTypePtr Line)
  * draws a ratline
  */
 void
-DrawRat (RatTypePtr Rat)
+DrawRat (RatType *Rat)
 {
   if (Settings.RatThickness < 20)
     Rat->Thickness = pixel_slop * Settings.RatThickness;
@@ -1373,7 +1373,7 @@ DrawRat (RatTypePtr Rat)
  * draws an arc on a layer
  */
 void
-DrawArc (LayerTypePtr Layer, ArcTypePtr Arc)
+DrawArc (LayerType *Layer, ArcType *Arc)
 {
   AddPart (Arc);
 }
@@ -1382,7 +1382,7 @@ DrawArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * draws a text on a layer
  */
 void
-DrawText (LayerTypePtr Layer, TextTypePtr Text)
+DrawText (LayerType *Layer, TextType *Text)
 {
   AddPart (Text);
 }
@@ -1392,7 +1392,7 @@ DrawText (LayerTypePtr Layer, TextTypePtr Text)
  * draws a polygon on a layer
  */
 void
-DrawPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+DrawPolygon (LayerType *Layer, PolygonType *Polygon)
 {
   AddPart (Polygon);
 }
@@ -1401,7 +1401,7 @@ DrawPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * draws an element
  */
 void
-DrawElement (ElementTypePtr Element)
+DrawElement (ElementType *Element)
 {
   DrawElementPackage (Element);
   DrawElementName (Element);
@@ -1412,7 +1412,7 @@ DrawElement (ElementTypePtr Element)
  * draws the name of an element
  */
 void
-DrawElementName (ElementTypePtr Element)
+DrawElementName (ElementType *Element)
 {
   if (TEST_FLAG (HIDENAMEFLAG, Element))
     return;
@@ -1423,7 +1423,7 @@ DrawElementName (ElementTypePtr Element)
  * draws the package of an element
  */
 void
-DrawElementPackage (ElementTypePtr Element)
+DrawElementPackage (ElementType *Element)
 {
   ELEMENTLINE_LOOP (Element);
   {
@@ -1441,7 +1441,7 @@ DrawElementPackage (ElementTypePtr Element)
  * draw pins of an element
  */
 void
-DrawElementPinsAndPads (ElementTypePtr Element)
+DrawElementPinsAndPads (ElementType *Element)
 {
   PAD_LOOP (Element);
   {
@@ -1460,7 +1460,7 @@ DrawElementPinsAndPads (ElementTypePtr Element)
  * erase a via
  */
 void
-EraseVia (PinTypePtr Via)
+EraseVia (PinType *Via)
 {
   AddPart (Via);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Via))
@@ -1471,7 +1471,7 @@ EraseVia (PinTypePtr Via)
  * erase a ratline
  */
 void
-EraseRat (RatTypePtr Rat)
+EraseRat (RatType *Rat)
 {
   if (TEST_FLAG(VIAFLAG, Rat))
     {
@@ -1494,7 +1494,7 @@ EraseRat (RatTypePtr Rat)
  * erase a via name
  */
 void
-EraseViaName (PinTypePtr Via)
+EraseViaName (PinType *Via)
 {
   GatherPVName (Via);
 }
@@ -1503,7 +1503,7 @@ EraseViaName (PinTypePtr Via)
  * erase a pad object
  */
 void
-ErasePad (PadTypePtr Pad)
+ErasePad (PadType *Pad)
 {
   AddPart (Pad);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pad))
@@ -1514,7 +1514,7 @@ ErasePad (PadTypePtr Pad)
  * erase a pad name
  */
 void
-ErasePadName (PadTypePtr Pad)
+ErasePadName (PadType *Pad)
 {
   GatherPadName (Pad);
 }
@@ -1523,7 +1523,7 @@ ErasePadName (PadTypePtr Pad)
  * erase a pin object
  */
 void
-ErasePin (PinTypePtr Pin)
+ErasePin (PinType *Pin)
 {
   AddPart (Pin);
   if (TEST_FLAG (DISPLAYNAMEFLAG, Pin))
@@ -1534,7 +1534,7 @@ ErasePin (PinTypePtr Pin)
  * erase a pin name
  */
 void
-ErasePinName (PinTypePtr Pin)
+ErasePinName (PinType *Pin)
 {
   GatherPVName (Pin);
 }
@@ -1543,7 +1543,7 @@ ErasePinName (PinTypePtr Pin)
  * erases a line on a layer
  */
 void
-EraseLine (LineTypePtr Line)
+EraseLine (LineType *Line)
 {
   AddPart (Line);
 }
@@ -1552,7 +1552,7 @@ EraseLine (LineTypePtr Line)
  * erases an arc on a layer
  */
 void
-EraseArc (ArcTypePtr Arc)
+EraseArc (ArcType *Arc)
 {
   if (!Arc->Thickness)
     return;
@@ -1563,7 +1563,7 @@ EraseArc (ArcTypePtr Arc)
  * erases a text on a layer
  */
 void
-EraseText (LayerTypePtr Layer, TextTypePtr Text)
+EraseText (LayerType *Layer, TextType *Text)
 {
   AddPart (Text);
 }
@@ -1572,7 +1572,7 @@ EraseText (LayerTypePtr Layer, TextTypePtr Text)
  * erases a polygon on a layer
  */
 void
-ErasePolygon (PolygonTypePtr Polygon)
+ErasePolygon (PolygonType *Polygon)
 {
   AddPart (Polygon);
 }
@@ -1581,7 +1581,7 @@ ErasePolygon (PolygonTypePtr Polygon)
  * erases an element
  */
 void
-EraseElement (ElementTypePtr Element)
+EraseElement (ElementType *Element)
 {
   ELEMENTLINE_LOOP (Element);
   {
@@ -1601,7 +1601,7 @@ EraseElement (ElementTypePtr Element)
  * erases all pins and pads of an element
  */
 void
-EraseElementPinsAndPads (ElementTypePtr Element)
+EraseElementPinsAndPads (ElementType *Element)
 {
   PIN_LOOP (Element);
   {
@@ -1619,7 +1619,7 @@ EraseElementPinsAndPads (ElementTypePtr Element)
  * erases the name of an element
  */
 void
-EraseElementName (ElementTypePtr Element)
+EraseElementName (ElementType *Element)
 {
   if (TEST_FLAG (HIDENAMEFLAG, Element))
     return;
@@ -1634,29 +1634,29 @@ EraseObject (int type, void *lptr, void *ptr)
     {
     case VIA_TYPE:
     case PIN_TYPE:
-      ErasePin ((PinTypePtr) ptr);
+      ErasePin ((PinType *) ptr);
       break;
     case TEXT_TYPE:
     case ELEMENTNAME_TYPE:
-      EraseText ((LayerTypePtr)lptr, (TextTypePtr) ptr);
+      EraseText ((LayerType *)lptr, (TextType *) ptr);
       break;
     case POLYGON_TYPE:
-      ErasePolygon ((PolygonTypePtr) ptr);
+      ErasePolygon ((PolygonType *) ptr);
       break;
     case ELEMENT_TYPE:
-      EraseElement ((ElementTypePtr) ptr);
+      EraseElement ((ElementType *) ptr);
       break;
     case LINE_TYPE:
     case ELEMENTLINE_TYPE:
     case RATLINE_TYPE:
-      EraseLine ((LineTypePtr) ptr);
+      EraseLine ((LineType *) ptr);
       break;
     case PAD_TYPE:
-      ErasePad ((PadTypePtr) ptr);
+      ErasePad ((PadType *) ptr);
       break;
     case ARC_TYPE:
     case ELEMENTARC_TYPE:
-      EraseArc ((ArcTypePtr) ptr);
+      EraseArc ((ArcType *) ptr);
       break;
     default:
       Message ("hace: Internal ERROR, trying to erase an unknown type\n");
@@ -1672,51 +1672,51 @@ DrawObject (int type, void *ptr1, void *ptr2)
     {
     case VIA_TYPE:
       if (PCB->ViaOn)
-	DrawVia ((PinTypePtr) ptr2);
+	DrawVia ((PinType *) ptr2);
       break;
     case LINE_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawLine ((LayerTypePtr) ptr1, (LineTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawLine ((LayerType *) ptr1, (LineType *) ptr2);
       break;
     case ARC_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawArc ((LayerTypePtr) ptr1, (ArcTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawArc ((LayerType *) ptr1, (ArcType *) ptr2);
       break;
     case TEXT_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawText ((LayerTypePtr) ptr1, (TextTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawText ((LayerType *) ptr1, (TextType *) ptr2);
       break;
     case POLYGON_TYPE:
-      if (((LayerTypePtr) ptr1)->On)
-	DrawPolygon ((LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+      if (((LayerType *) ptr1)->On)
+	DrawPolygon ((LayerType *) ptr1, (PolygonType *) ptr2);
       break;
     case ELEMENT_TYPE:
       if (PCB->ElementOn &&
-	  (FRONT ((ElementTypePtr) ptr2) || PCB->InvisibleObjectsOn))
-	DrawElement ((ElementTypePtr) ptr2);
+	  (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn))
+	DrawElement ((ElementType *) ptr2);
       break;
     case RATLINE_TYPE:
       if (PCB->RatOn)
-	DrawRat ((RatTypePtr) ptr2);
+	DrawRat ((RatType *) ptr2);
       break;
     case PIN_TYPE:
       if (PCB->PinOn)
-	DrawPin ((PinTypePtr) ptr2);
+	DrawPin ((PinType *) ptr2);
       break;
     case PAD_TYPE:
       if (PCB->PinOn)
-	DrawPad ((PadTypePtr) ptr2);
+	DrawPad ((PadType *) ptr2);
       break;
     case ELEMENTNAME_TYPE:
       if (PCB->ElementOn &&
-	  (FRONT ((ElementTypePtr) ptr2) || PCB->InvisibleObjectsOn))
-	DrawElementName ((ElementTypePtr) ptr1);
+	  (FRONT ((ElementType *) ptr2) || PCB->InvisibleObjectsOn))
+	DrawElementName ((ElementType *) ptr1);
       break;
     }
 }
 
 static void
-draw_element (ElementTypePtr element)
+draw_element (ElementType *element)
 {
   draw_element_package (element);
   draw_element_name (element);
diff --git a/src/draw.h b/src/draw.h
index cc0822f..c7ffa97 100644
--- a/src/draw.h
+++ b/src/draw.h
@@ -36,38 +36,38 @@
 
 void Draw (void);
 void Redraw (void);
-void DrawVia (PinTypePtr);
-void DrawRat (RatTypePtr);
-void DrawViaName (PinTypePtr);
-void DrawPin (PinTypePtr);
-void DrawPinName (PinTypePtr);
-void DrawPad (PadTypePtr);
-void DrawPadName (PadTypePtr);
-void DrawLine (LayerTypePtr, LineTypePtr);
-void DrawArc (LayerTypePtr, ArcTypePtr);
-void DrawText (LayerTypePtr, TextTypePtr);
-void DrawTextLowLevel (TextTypePtr, Coord);
-void DrawPolygon (LayerTypePtr, PolygonTypePtr);
-void DrawElement (ElementTypePtr);
-void DrawElementName (ElementTypePtr);
-void DrawElementPackage (ElementTypePtr);
-void DrawElementPinsAndPads (ElementTypePtr);
+void DrawVia (PinType *);
+void DrawRat (RatType *);
+void DrawViaName (PinType *);
+void DrawPin (PinType *);
+void DrawPinName (PinType *);
+void DrawPad (PadType *);
+void DrawPadName (PadType *);
+void DrawLine (LayerType *, LineType *);
+void DrawArc (LayerType *, ArcType *);
+void DrawText (LayerType *, TextType *);
+void DrawTextLowLevel (TextType *, Coord);
+void DrawPolygon (LayerType *, PolygonType *);
+void DrawElement (ElementType *);
+void DrawElementName (ElementType *);
+void DrawElementPackage (ElementType *);
+void DrawElementPinsAndPads (ElementType *);
 void DrawObject (int, void *, void *);
-void DrawLayer (LayerTypePtr, const BoxType *);
-void EraseVia (PinTypePtr);
-void EraseRat (RatTypePtr);
-void EraseViaName (PinTypePtr);
-void ErasePad (PadTypePtr);
-void ErasePadName (PadTypePtr);
-void ErasePin (PinTypePtr);
-void ErasePinName (PinTypePtr);
-void EraseLine (LineTypePtr);
-void EraseArc (ArcTypePtr);
-void EraseText (LayerTypePtr, TextTypePtr);
-void ErasePolygon (PolygonTypePtr);
-void EraseElement (ElementTypePtr);
-void EraseElementPinsAndPads (ElementTypePtr);
-void EraseElementName (ElementTypePtr);
+void DrawLayer (LayerType *, const BoxType *);
+void EraseVia (PinType *);
+void EraseRat (RatType *);
+void EraseViaName (PinType *);
+void ErasePad (PadType *);
+void ErasePadName (PadType *);
+void ErasePin (PinType *);
+void ErasePinName (PinType *);
+void EraseLine (LineType *);
+void EraseArc (ArcType *);
+void EraseText (LayerType *, TextType *);
+void ErasePolygon (PolygonType *);
+void EraseElement (ElementType *);
+void EraseElementPinsAndPads (ElementType *);
+void EraseElementName (ElementType *);
 void EraseObject (int, void *, void *);
 
 void DrawLayerGroup (int side, const BoxType *drawn_area);
diff --git a/src/drill.c b/src/drill.c
index efa9baa..7830e49 100644
--- a/src/drill.c
+++ b/src/drill.c
@@ -42,16 +42,16 @@
 /*
  * some local prototypes
  */
-static void FillDrill (DrillTypePtr, ElementTypePtr, PinTypePtr);
-static void InitializeDrill (DrillTypePtr, PinTypePtr, ElementTypePtr);
+static void FillDrill (DrillType *, ElementType *, PinType *);
+static void InitializeDrill (DrillType *, PinType *, ElementType *);
 
 
 static void
-FillDrill (DrillTypePtr Drill, ElementTypePtr Element, PinTypePtr Pin)
+FillDrill (DrillType *Drill, ElementType *Element, PinType *Pin)
 {
   Cardinal n;
-  ElementTypeHandle ptr;
-  PinTypeHandle pin;
+  ElementType **ptr;
+  PinType **pin;
 
   pin = GetDrillPinMemory (Drill);
   *pin = Pin;
@@ -74,7 +74,7 @@ FillDrill (DrillTypePtr Drill, ElementTypePtr Element, PinTypePtr Pin)
 }
 
 static void
-InitializeDrill (DrillTypePtr drill, PinTypePtr pin, ElementTypePtr element)
+InitializeDrill (DrillType *drill, PinType *pin, ElementType *element)
 {
   void *ptr;
 
@@ -89,11 +89,11 @@ InitializeDrill (DrillTypePtr drill, PinTypePtr pin, ElementTypePtr element)
   drill->Pin = NULL;
   drill->PinMax = 0;
   ptr = (void *) GetDrillPinMemory (drill);
-  *((PinTypeHandle) ptr) = pin;
+  *((PinType **) ptr) = pin;
   if (element)
     {
       ptr = (void *) GetDrillElementMemory (drill);
-      *((ElementTypeHandle) ptr) = element;
+      *((ElementType **) ptr) = element;
       drill->PinCount = 1;
     }
   else
@@ -110,16 +110,16 @@ DrillQSort (const void *va, const void *vb)
   return a->DrillSize - b->DrillSize;
 }
 
-DrillInfoTypePtr
-GetDrillInfo (DataTypePtr top)
+DrillInfoType *
+GetDrillInfo (DataType *top)
 {
-  DrillInfoTypePtr AllDrills;
-  DrillTypePtr Drill = NULL;
+  DrillInfoType *AllDrills;
+  DrillType *Drill = NULL;
   DrillType savedrill, swapdrill;
   bool DrillFound = false;
   bool NewDrill;
 
-  AllDrills = (DrillInfoTypePtr)calloc (1, sizeof (DrillInfoType));
+  AllDrills = (DrillInfoType *)calloc (1, sizeof (DrillInfoType));
   ALLPIN_LOOP (top);
   {
     if (!DrillFound)
@@ -211,7 +211,7 @@ GetDrillInfo (DataTypePtr top)
 #define ROUND(x,n) ((int)(((x)+(n)/2)/(n))*(n))
 
 void
-RoundDrillInfo (DrillInfoTypePtr d, int roundto)
+RoundDrillInfo (DrillInfoType *d, int roundto)
 {
   unsigned int i = 0;
 
@@ -228,9 +228,9 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 	    = d->Drill[i].ElementN + d->Drill[i+1].ElementN;
 	  if (d->Drill[i].ElementMax)
 	    {
-	      d->Drill[i].Element = (ElementTypePtr *)realloc (d->Drill[i].Element,
+	      d->Drill[i].Element = (ElementType **)realloc (d->Drill[i].Element,
 					     d->Drill[i].ElementMax *
-					     sizeof (ElementTypePtr));
+					     sizeof (ElementType *));
 
 	      for (ei = 0; ei < d->Drill[i+1].ElementN; ei++)
 		{
@@ -246,11 +246,11 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 	  d->Drill[i + 1].Element = NULL;
 
 	  d->Drill[i].PinMax = d->Drill[i].PinN + d->Drill[i + 1].PinN;
-	  d->Drill[i].Pin = (PinTypePtr *)realloc (d->Drill[i].Pin,
+	  d->Drill[i].Pin = (PinType **)realloc (d->Drill[i].Pin,
 				     d->Drill[i].PinMax *
-				     sizeof (PinTypePtr));
+				     sizeof (PinType *));
 	  memcpy (d->Drill[i].Pin + d->Drill[i].PinN, d->Drill[i + 1].Pin,
-		  d->Drill[i + 1].PinN * sizeof (PinTypePtr));
+		  d->Drill[i + 1].PinN * sizeof (PinType *));
 	  d->Drill[i].PinN += d->Drill[i + 1].PinN;
 	  free (d->Drill[i + 1].Pin);
 	  d->Drill[i + 1].Pin = NULL;
@@ -275,7 +275,7 @@ RoundDrillInfo (DrillInfoTypePtr d, int roundto)
 }
 
 void
-FreeDrillInfo (DrillInfoTypePtr Drills)
+FreeDrillInfo (DrillInfoType *Drills)
 {
   DRILL_LOOP (Drills);
   {
diff --git a/src/drill.h b/src/drill.h
index f155a72..e9c4e92 100644
--- a/src/drill.h
+++ b/src/drill.h
@@ -26,6 +26,6 @@
  *
  */
 
-DrillInfoTypePtr GetDrillInfo (DataTypePtr);
-void FreeDrillInfo (DrillInfoTypePtr);
-void RoundDrillInfo (DrillInfoTypePtr, int);
+DrillInfoType * GetDrillInfo (DataType *);
+void FreeDrillInfo (DrillInfoType *);
+void RoundDrillInfo (DrillInfoType *, int);
diff --git a/src/edif.y b/src/edif.y
index cb31d9a..e5a606d 100644
--- a/src/edif.y
+++ b/src/edif.y
@@ -29,8 +29,8 @@
 #include "global.h"
 #include "data.h"
 /* from mymem.h, not include because of the malloc junk */
-LibraryMenuTypePtr GetLibraryMenuMemory (LibraryTypePtr);
-LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
+LibraryMenuType * GetLibraryMenuMemory (LibraryType *);
+LibraryEntryType * GetLibraryEntryMemory (LibraryMenuType *);
 
 /*
  *	Local definitions.
@@ -98,8 +98,8 @@ LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
      str_pair* node;
      char* buf;
      char* p;
-     LibraryEntryTypePtr entry;
-     LibraryMenuTypePtr menu = GetLibraryMenuMemory (&PCB->NetlistLib);
+     LibraryEntryType *entry;
+     LibraryMenuType *menu = GetLibraryMenuMemory (&PCB->NetlistLib);
 
      if ( !name->str1 )
      {
diff --git a/src/file.c b/src/file.c
index c157659..1f5c406 100644
--- a/src/file.c
+++ b/src/file.c
@@ -113,10 +113,10 @@ static void PrintQuotedString (FILE *, char *);
 static void WritePCBInfoHeader (FILE *);
 static void WritePCBDataHeader (FILE *);
 static void WritePCBFontData (FILE *);
-static void WriteViaData (FILE *, DataTypePtr);
+static void WriteViaData (FILE *, DataType *);
 static void WritePCBRatData (FILE *);
-static void WriteElementData (FILE *, DataTypePtr);
-static void WriteLayerData (FILE *, Cardinal, LayerTypePtr);
+static void WriteElementData (FILE *, DataType *);
+static void WriteLayerData (FILE *, Cardinal, LayerType *);
 static int WritePCB (FILE *);
 static int WritePCBFile (char *);
 static int WritePipe (char *, bool);
@@ -228,7 +228,7 @@ netnode_sort (const void *va, const void *vb)
 }
 
 static void
-sort_library (LibraryTypePtr lib)
+sort_library (LibraryType *lib)
 {
   int i;
   qsort (lib->Menu, lib->MenuN, sizeof (lib->Menu[0]), netlist_sort);
@@ -388,8 +388,8 @@ real_load_pcb (char *Filename, bool revert)
 {
   const char *unit_suffix, *grid_size;
   char *new_filename;
-  PCBTypePtr newPCB = CreateNewPCB (false);
-  PCBTypePtr oldPCB;
+  PCBType *newPCB = CreateNewPCB (false);
+  PCBType *oldPCB;
 #ifdef DEBUG
   double elapsed;
   clock_t start, end;
@@ -498,9 +498,9 @@ RevertPCB (void)
  * functions for loading elements-as-pcb
  */
 
-extern	PCBTypePtr		yyPCB;
-extern	DataTypePtr		yyData;
-extern	FontTypePtr		yyFont;
+extern	PCBType *		yyPCB;
+extern	DataType *		yyData;
+extern	FontType *		yyFont;
 
 void
 PreLoadElementPCB ()
@@ -518,8 +518,8 @@ PreLoadElementPCB ()
 void
 PostLoadElementPCB ()
 {
-  PCBTypePtr pcb_save = PCB;
-  ElementTypePtr e;
+  PCBType *pcb_save = PCB;
+  ElementType *e;
 
   if (!yyPCB)
     return;
@@ -552,7 +552,7 @@ PrintQuotedString (FILE * FP, char *S)
  * writes out an attribute list
  */
 static void
-WriteAttributeList (FILE * FP, AttributeListTypePtr list, char *prefix)
+WriteAttributeList (FILE * FP, AttributeListType *list, char *prefix)
 {
   int i;
 
@@ -632,8 +632,8 @@ static void
 WritePCBFontData (FILE * FP)
 {
   Cardinal i, j;
-  LineTypePtr line;
-  FontTypePtr font;
+  LineType *line;
+  FontType *font;
 
   for (font = &PCB->Font, i = 0; i <= MAX_FONTPOSITION; i++)
     {
@@ -658,7 +658,7 @@ WritePCBFontData (FILE * FP)
  * writes via data
  */
 static void
-WriteViaData (FILE * FP, DataTypePtr Data)
+WriteViaData (FILE * FP, DataType *Data)
 {
   GList *iter;
   /* write information about vias */
@@ -704,7 +704,7 @@ WritePCBNetlistData (FILE * FP)
 
       for (n = 0; n < PCB->NetlistLib.MenuN; n++)
 	{
-	  LibraryMenuTypePtr menu = &PCB->NetlistLib.Menu[n];
+	  LibraryMenuType *menu = &PCB->NetlistLib.Menu[n];
 	  fprintf (FP, "\tNet(");
 	  PrintQuotedString(FP, &menu->Name[2]);
 	  fprintf (FP, " ");
@@ -712,7 +712,7 @@ WritePCBNetlistData (FILE * FP)
 	  fprintf (FP, ")\n\t(\n");
 	  for (p = 0; p < menu->EntryN; p++)
 	    {
-	      LibraryEntryTypePtr entry = &menu->Entry[p];
+	      LibraryEntryType *entry = &menu->Entry[p];
 	      fprintf (FP, "\t\tConnect(");
 	      PrintQuotedString (FP, entry->ListEntry);
 	      fprintf (FP, ")\n");
@@ -727,7 +727,7 @@ WritePCBNetlistData (FILE * FP)
  * writes element data
  */
 static void
-WriteElementData (FILE * FP, DataTypePtr Data)
+WriteElementData (FILE * FP, DataType *Data)
 {
   GList *n, *p;
   for (n = Data->Element; n != NULL; n = g_list_next (n))
@@ -810,7 +810,7 @@ WriteElementData (FILE * FP, DataTypePtr Data)
  * writes layer data
  */
 static void
-WriteLayerData (FILE * FP, Cardinal Number, LayerTypePtr layer)
+WriteLayerData (FILE * FP, Cardinal Number, LayerType *layer)
 {
   GList *n;
   /* write information about non empty layers */
@@ -857,7 +857,7 @@ WriteLayerData (FILE * FP, Cardinal Number, LayerTypePtr layer)
 	  fprintf (FP, "\tPolygon(%s)\n\t(", F2S (polygon, POLYGON_TYPE));
 	  for (p = 0; p < polygon->PointN; p++)
 	    {
-	      PointTypePtr point = &polygon->Points[p];
+	      PointType *point = &polygon->Points[p];
 
 	      if (hole < polygon->HoleIndexN &&
 		  p == polygon->HoleIndex[hole])
@@ -1174,8 +1174,8 @@ LoadNewlibFootprintsFromDir(char *libpath, char *toppath)
   DIR *subdirobj;                 /* Interable object holding all subdir entries */
   struct dirent *subdirentry;     /* Individual subdir entry */
   struct stat buffer;             /* Buffer used in stat */
-  LibraryMenuTypePtr menu = NULL; /* Pointer to PCB's library menu structure */
-  LibraryEntryTypePtr entry;      /* Pointer to individual menu entry */
+  LibraryMenuType *menu = NULL; /* Pointer to PCB's library menu structure */
+  LibraryEntryType *entry;      /* Pointer to individual menu entry */
   size_t l;
   size_t len;
   int n_footprints = 0;           /* Running count of footprints found in this subdir */
@@ -1413,8 +1413,8 @@ ReadLibraryContents (void)
   static char *command = NULL;
   char inputline[MAX_LIBRARY_LINE_LENGTH + 1];
   FILE *resultFP = NULL;
-  LibraryMenuTypePtr menu = NULL;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu = NULL;
+  LibraryEntryType *entry;
 
   /* If we don't have a command to execute to find the library contents,
    * skip this. This is used by default on Windows builds (set in main.c),
@@ -1528,8 +1528,8 @@ ReadNetlist (char *filename)
   char inputline[MAX_NETLIST_LINE_LENGTH + 1];
   char temp[MAX_NETLIST_LINE_LENGTH + 1];
   FILE *fp;
-  LibraryMenuTypePtr menu = NULL;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu = NULL;
+  LibraryEntryType *entry;
   int i, j, lines, kind;
   bool continued;
   bool used_popen = false;
diff --git a/src/find.c b/src/find.c
index fa03ba7..d854b0b 100644
--- a/src/find.c
+++ b/src/find.c
@@ -120,22 +120,22 @@
 	}
 
 #define	PADLIST_ENTRY(L,I)	\
-	(((PadTypePtr *)PadList[(L)].Data)[(I)])
+	(((PadType **)PadList[(L)].Data)[(I)])
 
 #define	LINELIST_ENTRY(L,I)	\
-	(((LineTypePtr *)LineList[(L)].Data)[(I)])
+	(((LineType **)LineList[(L)].Data)[(I)])
 
 #define	ARCLIST_ENTRY(L,I)	\
-	(((ArcTypePtr *)ArcList[(L)].Data)[(I)])
+	(((ArcType **)ArcList[(L)].Data)[(I)])
 
 #define RATLIST_ENTRY(I)	\
-	(((RatTypePtr *)RatList.Data)[(I)])
+	(((RatType **)RatList.Data)[(I)])
 
 #define	POLYGONLIST_ENTRY(L,I)	\
-	(((PolygonTypePtr *)PolygonList[(L)].Data)[(I)])
+	(((PolygonType **)PolygonList[(L)].Data)[(I)])
 
 #define	PVLIST_ENTRY(I)	\
-	(((PinTypePtr *)PVList.Data)[(I)])
+	(((PinType **)PVList.Data)[(I)])
 
 #define IS_PV_ON_RAT(PV, Rat) \
 	(IsPointOnLineEnd((PV)->X,(PV)->Y, (Rat)))
@@ -278,8 +278,7 @@ typedef struct
   Cardinal Location,            /* currently used position */
     DrawLocation, Number,       /* number of objects in list */
     Size;
-}
-ListType, *ListTypePtr;
+} ListType;
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -304,24 +303,24 @@ static bool LookupLOConnectionsToPVList (bool);
 static bool LookupLOConnectionsToLOList (bool);
 static bool LookupPVConnectionsToLOList (bool);
 static bool LookupPVConnectionsToPVList (void);
-static bool LookupLOConnectionsToLine (LineTypePtr, Cardinal, bool);
-static bool LookupLOConnectionsToPad (PadTypePtr, Cardinal);
-static bool LookupLOConnectionsToPolygon (PolygonTypePtr, Cardinal);
-static bool LookupLOConnectionsToArc (ArcTypePtr, Cardinal);
-static bool LookupLOConnectionsToRatEnd (PointTypePtr, Cardinal);
-static bool IsRatPointOnLineEnd (PointTypePtr, LineTypePtr);
-static bool ArcArcIntersect (ArcTypePtr, ArcTypePtr);
+static bool LookupLOConnectionsToLine (LineType *, Cardinal, bool);
+static bool LookupLOConnectionsToPad (PadType *, Cardinal);
+static bool LookupLOConnectionsToPolygon (PolygonType *, Cardinal);
+static bool LookupLOConnectionsToArc (ArcType *, Cardinal);
+static bool LookupLOConnectionsToRatEnd (PointType *, Cardinal);
+static bool IsRatPointOnLineEnd (PointType *, LineType *);
+static bool ArcArcIntersect (ArcType *, ArcType *);
 static bool PrepareNextLoop (FILE *);
-static bool PrintElementConnections (ElementTypePtr, FILE *, bool);
+static bool PrintElementConnections (ElementType *, FILE *, bool);
 static bool ListsEmpty (bool);
 static bool DoIt (bool, bool);
-static void PrintElementNameList (ElementTypePtr, FILE *);
-static void PrintConnectionElementName (ElementTypePtr, FILE *);
-static void PrintConnectionListEntry (char *, ElementTypePtr,
+static void PrintElementNameList (ElementType *, FILE *);
+static void PrintConnectionElementName (ElementType *, FILE *);
+static void PrintConnectionListEntry (char *, ElementType *,
                                       bool, FILE *);
 static void PrintPadConnections (Cardinal, FILE *, bool);
 static void PrintPinConnections (FILE *, bool);
-static bool PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr,
+static bool PrintAndSelectUnusedPinsAndPadsOfElement (ElementType *,
                                                          FILE *);
 static void DrawNewConnections (void);
 static void DumpList (void);
@@ -330,8 +329,8 @@ static void BuildObjectList (int *, long int **, int **);
 static void GotoError (void);
 static bool DRCFind (int, void *, void *, void *);
 static bool ListStart (int, void *, void *, void *);
-static bool LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup);
-static bool PVTouchesLine (LineTypePtr line);
+static bool LOTouchesLine (LineType *Line, Cardinal LayerGroup);
+static bool PVTouchesLine (LineType *line);
 static bool SetThing (int, void *, void *, void *);
 
 /* ---------------------------------------------------------------------------
@@ -339,19 +338,19 @@ static bool SetThing (int, void *, void *, void *);
  * struct starts with a line struct. See global.h for details
  */
 bool
-LinePadIntersect (LineTypePtr Line, PadTypePtr Pad)
+LinePadIntersect (LineType *Line, PadType *Pad)
 {
-  return LineLineIntersect ((Line), (LineTypePtr)Pad);
+  return LineLineIntersect ((Line), (LineType *)Pad);
 }
 
 bool
-ArcPadIntersect (ArcTypePtr Arc, PadTypePtr Pad)
+ArcPadIntersect (ArcType *Arc, PadType *Pad)
 {
-  return LineArcIntersect ((LineTypePtr) (Pad), (Arc));
+  return LineArcIntersect ((LineType *) (Pad), (Arc));
 }
 
 static bool
-ADD_PV_TO_LIST (PinTypePtr Pin)
+ADD_PV_TO_LIST (PinType *Pin)
 {
   if (User)
     AddObjectToFlagUndoList (Pin->Element ? PIN_TYPE : VIA_TYPE,
@@ -370,7 +369,7 @@ ADD_PV_TO_LIST (PinTypePtr Pin)
 }
 
 static bool
-ADD_PAD_TO_LIST (Cardinal L, PadTypePtr Pad)
+ADD_PAD_TO_LIST (Cardinal L, PadType *Pad)
 {
   if (User)
     AddObjectToFlagUndoList (PAD_TYPE, Pad->Element, Pad, Pad);
@@ -388,7 +387,7 @@ ADD_PAD_TO_LIST (Cardinal L, PadTypePtr Pad)
 }
 
 static bool
-ADD_LINE_TO_LIST (Cardinal L, LineTypePtr Ptr)
+ADD_LINE_TO_LIST (Cardinal L, LineType *Ptr)
 {
   if (User)
     AddObjectToFlagUndoList (LINE_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
@@ -406,7 +405,7 @@ ADD_LINE_TO_LIST (Cardinal L, LineTypePtr Ptr)
 }
 
 static bool
-ADD_ARC_TO_LIST (Cardinal L, ArcTypePtr Ptr)
+ADD_ARC_TO_LIST (Cardinal L, ArcType *Ptr)
 {
   if (User)
     AddObjectToFlagUndoList (ARC_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
@@ -424,7 +423,7 @@ ADD_ARC_TO_LIST (Cardinal L, ArcTypePtr Ptr)
 }
 
 static bool
-ADD_RAT_TO_LIST (RatTypePtr Ptr)
+ADD_RAT_TO_LIST (RatType *Ptr)
 {
   if (User)
     AddObjectToFlagUndoList (RATLINE_TYPE, (Ptr), (Ptr), (Ptr));
@@ -442,7 +441,7 @@ ADD_RAT_TO_LIST (RatTypePtr Ptr)
 }
 
 static bool
-ADD_POLYGON_TO_LIST (Cardinal L, PolygonTypePtr Ptr)
+ADD_POLYGON_TO_LIST (Cardinal L, PolygonType *Ptr)
 {
   if (User)
     AddObjectToFlagUndoList (POLYGON_TYPE, LAYER_PTR (L), (Ptr), (Ptr));
@@ -460,7 +459,7 @@ ADD_POLYGON_TO_LIST (Cardinal L, PolygonTypePtr Ptr)
 }
 
 bool
-PinLineIntersect (PinTypePtr PV, LineTypePtr Line)
+PinLineIntersect (PinType *PV, LineType *Line)
 {
   /* IsLineInRectangle already has Bloat factor */
   return TEST_FLAG (SQUAREFLAG,
@@ -475,7 +474,7 @@ PinLineIntersect (PinTypePtr PV, LineTypePtr Line)
                                                                          2.0 +
                                                                          Bloat,
                                                                          0.0),
-                                                                    (PadTypePtr)Line);
+                                                                    (PadType *)Line);
 }
 
 
@@ -495,7 +494,7 @@ SetThing (int type, void *ptr1, void *ptr2, void *ptr3)
 }
 
 bool
-BoxBoxIntersection (BoxTypePtr b1, BoxTypePtr b2)
+BoxBoxIntersection (BoxType *b1, BoxType *b2)
 {
   if (b2->X2 < b1->X1 || b2->X1 > b1->X2)
     return false;
@@ -505,13 +504,13 @@ BoxBoxIntersection (BoxTypePtr b1, BoxTypePtr b2)
 }
 
 static bool
-PadPadIntersect (PadTypePtr p1, PadTypePtr p2)
+PadPadIntersect (PadType *p1, PadType *p2)
 {
-  return LinePadIntersect ((LineTypePtr) p1, p2);
+  return LinePadIntersect ((LineType *) p1, p2);
 }
 
 static inline bool
-PV_TOUCH_PV (PinTypePtr PV1, PinTypePtr PV2)
+PV_TOUCH_PV (PinType *PV1, PinType *PV2)
 {
   double t1, t2;
   BoxType b1, b2;
@@ -592,7 +591,7 @@ InitComponentLookup (void)
   for (i = 0; i < 2; i++)
     {
       /* allocate memory for working list */
-      PadList[i].Data = (void **)calloc (NumberOfPads[i], sizeof (PadTypePtr));
+      PadList[i].Data = (void **)calloc (NumberOfPads[i], sizeof (PadType *));
 
       /* clear some struct members */
       PadList[i].Location = 0;
@@ -614,17 +613,17 @@ InitLayoutLookup (void)
   /* initialize line arc and polygon data */
   for (i = 0; i < max_copper_layer; i++)
     {
-      LayerTypePtr layer = LAYER_PTR (i);
+      LayerType *layer = LAYER_PTR (i);
 
       if (layer->LineN)
         {
           /* allocate memory for line pointer lists */
-          LineList[i].Data = (void **)calloc (layer->LineN, sizeof (LineTypePtr));
+          LineList[i].Data = (void **)calloc (layer->LineN, sizeof (LineType *));
           LineList[i].Size = layer->LineN;
         }
       if (layer->ArcN)
         {
-          ArcList[i].Data = (void **)calloc (layer->ArcN, sizeof (ArcTypePtr));
+          ArcList[i].Data = (void **)calloc (layer->ArcN, sizeof (ArcType *));
           ArcList[i].Size = layer->ArcN;
         }
 
@@ -632,7 +631,7 @@ InitLayoutLookup (void)
       /* allocate memory for polygon list */
       if (layer->PolygonN)
         {
-          PolygonList[i].Data = (void **)calloc (layer->PolygonN, sizeof (PolygonTypePtr));
+          PolygonList[i].Data = (void **)calloc (layer->PolygonN, sizeof (PolygonType *));
           PolygonList[i].Size = layer->PolygonN;
         }
 
@@ -657,13 +656,13 @@ InitLayoutLookup (void)
   else
     TotalV = 0;
   /* allocate memory for 'new PV to check' list and clear struct */
-  PVList.Data = (void **)calloc (TotalP + TotalV, sizeof (PinTypePtr));
+  PVList.Data = (void **)calloc (TotalP + TotalV, sizeof (PinType *));
   PVList.Size = TotalP + TotalV;
   PVList.Location = 0;
   PVList.DrawLocation = 0;
   PVList.Number = 0;
   /* Initialize ratline data */
-  RatList.Data = (void **)calloc (PCB->Data->RatN, sizeof (RatTypePtr));
+  RatList.Data = (void **)calloc (PCB->Data->RatN, sizeof (RatType *));
   RatList.Size = PCB->Data->RatN;
   RatList.Location = 0;
   RatList.DrawLocation = 0;
@@ -680,7 +679,7 @@ struct pv_info
 static int
 LOCtoPVline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && PinLineIntersect (&i->pv, line) &&
@@ -695,7 +694,7 @@ LOCtoPVline_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   if (!TEST_FLAG (TheFlag, arc) && IS_PV_ON_ARC (&i->pv, arc) &&
@@ -710,7 +709,7 @@ LOCtoPVarc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVpad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && IS_PV_ON_PAD (&i->pv, pad) &&
@@ -724,7 +723,7 @@ LOCtoPVpad_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVrat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   if (!TEST_FLAG (TheFlag, rat) && IS_PV_ON_RAT (&i->pv, rat) &&
@@ -735,7 +734,7 @@ LOCtoPVrat_callback (const BoxType * b, void *cl)
 static int
 LOCtoPVpoly_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   /* if the pin doesn't have a therm and polygon is clearing
@@ -959,7 +958,7 @@ LookupLOConnectionsToLOList (bool AndRats)
 static int
 pv_pv_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct pv_info *i = (struct pv_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pin) && PV_TOUCH_PV (&i->pv, pin))
@@ -1026,7 +1025,7 @@ struct lo_info
 static int
 pv_line_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pv) && PinLineIntersect (pv, &i->line))
@@ -1046,7 +1045,7 @@ pv_line_callback (const BoxType * b, void *cl)
 static int
 pv_pad_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pv) && IS_PV_ON_PAD (pv, &i->pad))
@@ -1066,7 +1065,7 @@ pv_pad_callback (const BoxType * b, void *cl)
 static int
 pv_arc_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pv) && IS_PV_ON_ARC (pv, &i->arc))
@@ -1086,7 +1085,7 @@ pv_arc_callback (const BoxType * b, void *cl)
 static int
 pv_poly_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   /* note that holes in polygons are ok, so they don't generate warnings. */
@@ -1126,7 +1125,7 @@ pv_poly_callback (const BoxType * b, void *cl)
 static int
 pv_rat_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pv = (PinTypePtr) b;
+  PinType *pv = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   /* rats can't cause DRC so there is no early exit */
@@ -1275,7 +1274,7 @@ LookupPVConnectionsToLOList (bool AndRats)
 int
 pv_touch_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pin) && PinLineIntersect (pin, &i->line))
@@ -1284,7 +1283,7 @@ pv_touch_callback (const BoxType * b, void *cl)
 }
 
 static bool
-PVTouchesLine (LineTypePtr line)
+PVTouchesLine (LineType *line)
 {
   struct lo_info info;
 
@@ -1319,7 +1318,7 @@ normalize_angles (Angle *sa, Angle *d)
 }
 
 static int
-radius_crosses_arc (double x, double y, ArcTypePtr arc)
+radius_crosses_arc (double x, double y, ArcType *arc)
 {
   double alpha = atan2 (y - arc->Y, -x + arc->X) * RAD_TO_DEG;
   Angle sa = arc->StartAngle, d = arc->Delta;
@@ -1333,7 +1332,7 @@ radius_crosses_arc (double x, double y, ArcTypePtr arc)
 }
 
 static void
-get_arc_ends (Coord *box, ArcTypePtr arc)
+get_arc_ends (Coord *box, ArcType *arc)
 {
   box[0] = arc->X - arc->Width  * cos (M180 * arc->StartAngle);
   box[1] = arc->Y + arc->Height * sin (M180 * arc->StartAngle);
@@ -1366,7 +1365,7 @@ get_arc_ends (Coord *box, ArcTypePtr arc)
  *
  */
 static bool
-ArcArcIntersect (ArcTypePtr Arc1, ArcTypePtr Arc2)
+ArcArcIntersect (ArcType *Arc1, ArcType *Arc2)
 {
   double x, y, dx, dy, r1, r2, a, d, l, t, t1, t2, dl;
   Coord pdx, pdy;
@@ -1485,7 +1484,7 @@ ArcArcIntersect (ArcTypePtr Arc1, ArcTypePtr Arc2)
  * Tests if point is same as line end point
  */
 static bool
-IsRatPointOnLineEnd (PointTypePtr Point, LineTypePtr Line)
+IsRatPointOnLineEnd (PointType *Point, LineType *Line)
 {
   if ((Point->X == Line->Point1.X
        && Point->Y == Line->Point1.Y)
@@ -1495,7 +1494,7 @@ IsRatPointOnLineEnd (PointTypePtr Point, LineTypePtr Line)
 }
 
 static void 
-form_slanted_rectangle (PointType p[4], LineTypePtr l)
+form_slanted_rectangle (PointType p[4], LineType *l)
 /* writes vertices of a squared line */
 {
    double dwx = 0, dwy = 0;
@@ -1572,7 +1571,7 @@ form_slanted_rectangle (PointType p[4], LineTypePtr l)
  *
  */
 bool
-LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
+LineLineIntersect (LineType *Line1, LineType *Line2)
 {
   double s, r;
   double line1_dx, line1_dy, line2_dx, line2_dy,
@@ -1599,16 +1598,16 @@ LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
    *  below does not cause a divide-by-zero. */
   if (IsPointInPad (Line2->Point1.X, Line2->Point1.Y,
                     MAX (Line2->Thickness / 2 + Bloat, 0),
-                    (PadTypePtr) Line1)
+                    (PadType *) Line1)
        || IsPointInPad (Line2->Point2.X, Line2->Point2.Y,
                         MAX (Line2->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line1)
+                        (PadType *) Line1)
        || IsPointInPad (Line1->Point1.X, Line1->Point1.Y,
                         MAX (Line1->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line2)
+                        (PadType *) Line2)
        || IsPointInPad (Line1->Point2.X, Line1->Point2.Y,
                         MAX (Line1->Thickness / 2 + Bloat, 0),
-                        (PadTypePtr) Line2))
+                        (PadType *) Line2))
     return true;
 
   /* setup some constants */
@@ -1681,10 +1680,10 @@ LineLineIntersect (LineTypePtr Line1, LineTypePtr Line2)
  * The end points are hell so they are checked individually
  */
 bool
-LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
+LineArcIntersect (LineType *Line, ArcType *Arc)
 {
   double dx, dy, dx1, dy1, l, d, r, r2, Radius;
-  BoxTypePtr box;
+  BoxType *box;
 
   dx = Line->Point2.X - Line->Point1.X;
   dy = Line->Point2.Y - Line->Point1.Y;
@@ -1730,9 +1729,9 @@ LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
     return (true);
   /* check arc end points */
   box = GetArcEnds (Arc);
-  if (IsPointInPad (box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (PadTypePtr)Line))
+  if (IsPointInPad (box->X1, box->Y1, Arc->Thickness * 0.5 + Bloat, (PadType *)Line))
     return true;
-  if (IsPointInPad (box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (PadTypePtr)Line))
+  if (IsPointInPad (box->X2, box->Y2, Arc->Thickness * 0.5 + Bloat, (PadType *)Line))
     return true;
   return false;
 }
@@ -1740,7 +1739,7 @@ LineArcIntersect (LineTypePtr Line, ArcTypePtr Arc)
 static int
 LOCtoArcLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && LineArcIntersect (line, &i->arc))
@@ -1754,7 +1753,7 @@ LOCtoArcLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoArcArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
@@ -1770,7 +1769,7 @@ LOCtoArcArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoArcPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -1788,7 +1787,7 @@ LOCtoArcPad_callback (const BoxType * b, void *cl)
  * Xij means Xj at arc i
  */
 static bool
-LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
+LookupLOConnectionsToArc (ArcType *Arc, Cardinal LayerGroup)
 {
   Cardinal entry;
   struct lo_info info;
@@ -1846,7 +1845,7 @@ LookupLOConnectionsToArc (ArcTypePtr Arc, Cardinal LayerGroup)
 static int
 LOCtoLineLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && LineLineIntersect (&i->line, line))
@@ -1860,7 +1859,7 @@ LOCtoLineLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoLineArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
@@ -1876,7 +1875,7 @@ LOCtoLineArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoLineRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, rat))
@@ -1900,7 +1899,7 @@ LOCtoLineRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoLinePad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -1918,7 +1917,7 @@ LOCtoLinePad_callback (const BoxType * b, void *cl)
  * Xij means Xj at line i
  */
 static bool
-LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
+LookupLOConnectionsToLine (LineType *Line, Cardinal LayerGroup,
                            bool PolysTo)
 {
   Cardinal entry;
@@ -1989,7 +1988,7 @@ LookupLOConnectionsToLine (LineTypePtr Line, Cardinal LayerGroup,
 static int
 LOT_Linecallback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && LineLineIntersect (&i->line, line))
@@ -2000,7 +1999,7 @@ LOT_Linecallback (const BoxType * b, void *cl)
 static int
 LOT_Arccallback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
@@ -2013,7 +2012,7 @@ LOT_Arccallback (const BoxType * b, void *cl)
 static int
 LOT_Padcallback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -2024,7 +2023,7 @@ LOT_Padcallback (const BoxType * b, void *cl)
 }
 
 static bool
-LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup)
+LOTouchesLine (LineType *Line, Cardinal LayerGroup)
 {
   Cardinal entry;
   struct lo_info info;
@@ -2085,14 +2084,14 @@ LOTouchesLine (LineTypePtr Line, Cardinal LayerGroup)
 struct rat_info
 {
   Cardinal layer;
-  PointTypePtr Point;
+  PointType *Point;
   jmp_buf env;
 };
 
 static int
 LOCtoRat_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) &&
@@ -2108,7 +2107,7 @@ LOCtoRat_callback (const BoxType * b, void *cl)
 static int
 PolygonToRat_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
   if (!TEST_FLAG (TheFlag, polygon) && polygon->Clipped &&
@@ -2124,7 +2123,7 @@ PolygonToRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct rat_info *i = (struct rat_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -2146,7 +2145,7 @@ LOCtoPad_callback (const BoxType * b, void *cl)
  * Xij means Xj at line i
  */
 static bool
-LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
+LookupLOConnectionsToRatEnd (PointType *Point, Cardinal LayerGroup)
 {
   Cardinal entry;
   struct rat_info info;
@@ -2192,7 +2191,7 @@ LookupLOConnectionsToRatEnd (PointTypePtr Point, Cardinal LayerGroup)
 static int
 LOCtoPadLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && LinePadIntersect (line, &i->pad))
@@ -2206,7 +2205,7 @@ LOCtoPadLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
@@ -2222,7 +2221,7 @@ LOCtoPadArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadPoly_callback (const BoxType * b, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
 
@@ -2239,7 +2238,7 @@ LOCtoPadPoly_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, rat))
@@ -2269,7 +2268,7 @@ LOCtoPadRat_callback (const BoxType * b, void *cl)
 static int
 LOCtoPadPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -2284,13 +2283,13 @@ LOCtoPadPad_callback (const BoxType * b, void *cl)
  * layergroup. All found connections are added to the list
  */
 static bool
-LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
+LookupLOConnectionsToPad (PadType *Pad, Cardinal LayerGroup)
 {
   Cardinal entry;
   struct lo_info info;
 
   if (!TEST_FLAG (SQUAREFLAG, Pad))
-    return (LookupLOConnectionsToLine ((LineTypePtr) Pad, LayerGroup, false));
+    return (LookupLOConnectionsToLine ((LineType *) Pad, LayerGroup, false));
 
   info.pad = *Pad;
   EXPAND_BOUNDS (&info.pad);
@@ -2349,7 +2348,7 @@ LookupLOConnectionsToPad (PadTypePtr Pad, Cardinal LayerGroup)
 static int
 LOCtoPolyLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, line) && IsLineInPolygon (line, &i->polygon))
@@ -2363,7 +2362,7 @@ LOCtoPolyLine_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!arc->Thickness)
@@ -2379,7 +2378,7 @@ LOCtoPolyArc_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, pad) && i->layer ==
@@ -2395,7 +2394,7 @@ LOCtoPolyPad_callback (const BoxType * b, void *cl)
 static int
 LOCtoPolyRat_callback (const BoxType * b, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) b;
+  RatType *rat = (RatType *) b;
   struct lo_info *i = (struct lo_info *) cl;
 
   if (!TEST_FLAG (TheFlag, rat))
@@ -2418,7 +2417,7 @@ LOCtoPolyRat_callback (const BoxType * b, void *cl)
  * on the given layergroup. All found connections are added to the list
  */
 static bool
-LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
+LookupLOConnectionsToPolygon (PolygonType *Polygon, Cardinal LayerGroup)
 {
   Cardinal entry;
   struct lo_info info;
@@ -2494,9 +2493,9 @@ LookupLOConnectionsToPolygon (PolygonTypePtr Polygon, Cardinal LayerGroup)
  * - check all segments of the polygon against the arc.
  */
 bool
-IsArcInPolygon (ArcTypePtr Arc, PolygonTypePtr Polygon)
+IsArcInPolygon (ArcType *Arc, PolygonType *Polygon)
 {
-  BoxTypePtr Box = (BoxType *) Arc;
+  BoxType *Box = (BoxType *) Arc;
 
   /* arcs with clearance never touch polys */
   if (TEST_FLAG (CLEARPOLYFLAG, Polygon) && TEST_FLAG (CLEARLINEFLAG, Arc))
@@ -2526,9 +2525,9 @@ IsArcInPolygon (ArcTypePtr Arc, PolygonTypePtr Polygon)
  * - check all segments of the polygon against the line.
  */
 bool
-IsLineInPolygon (LineTypePtr Line, PolygonTypePtr Polygon)
+IsLineInPolygon (LineType *Line, PolygonType *Polygon)
 {
-  BoxTypePtr Box = (BoxType *) Line;
+  BoxType *Box = (BoxType *) Line;
   POLYAREA *lp;
 
   /* lines with clearance never touch polygons */
@@ -2565,9 +2564,9 @@ IsLineInPolygon (LineTypePtr Line, PolygonTypePtr Polygon)
  * The polygon is assumed to already have been proven non-clearing
  */
 bool
-IsPadInPolygon (PadTypePtr pad, PolygonTypePtr polygon)
+IsPadInPolygon (PadType *pad, PolygonType *polygon)
 {
-    return IsLineInPolygon ((LineTypePtr) pad, polygon);
+    return IsLineInPolygon ((LineType *) pad, polygon);
 }
 
 /* ---------------------------------------------------------------------------
@@ -2577,7 +2576,7 @@ IsPadInPolygon (PadTypePtr pad, PolygonTypePtr polygon)
  * If both fail check all lines of P1 against the ones of P2
  */
 bool
-IsPolygonInPolygon (PolygonTypePtr P1, PolygonTypePtr P2)
+IsPolygonInPolygon (PolygonType *P1, PolygonType *P2)
 {
   if (!P1->Clipped || !P2->Clipped)
     return false;
@@ -2635,7 +2634,7 @@ IsPolygonInPolygon (PolygonTypePtr P1, PolygonTypePtr P2)
  * writes the several names of an element to a file
  */
 static void
-PrintElementNameList (ElementTypePtr Element, FILE * FP)
+PrintElementNameList (ElementType *Element, FILE * FP)
 {
   static DynamicStringType cname, pname, vname;
 
@@ -2649,7 +2648,7 @@ PrintElementNameList (ElementTypePtr Element, FILE * FP)
  * writes the several names of an element to a file
  */
 static void
-PrintConnectionElementName (ElementTypePtr Element, FILE * FP)
+PrintConnectionElementName (ElementType *Element, FILE * FP)
 {
   fputs ("Element", FP);
   PrintElementNameList (Element, FP);
@@ -2660,7 +2659,7 @@ PrintConnectionElementName (ElementTypePtr Element, FILE * FP)
  * prints one {pin,pad,via}/element entry of connection lists
  */
 static void
-PrintConnectionListEntry (char *ObjName, ElementTypePtr Element,
+PrintConnectionListEntry (char *ObjName, ElementType *Element,
                           bool FirstOne, FILE * FP)
 {
   static DynamicStringType oname;
@@ -2686,7 +2685,7 @@ static void
 PrintPadConnections (Cardinal Layer, FILE * FP, bool IsFirst)
 {
   Cardinal i;
-  PadTypePtr ptr;
+  PadType *ptr;
 
   if (!PadList[Layer].Number)
     return;
@@ -2708,7 +2707,7 @@ PrintPadConnections (Cardinal Layer, FILE * FP, bool IsFirst)
     {
       ptr = PADLIST_ENTRY (Layer, i);
       if (ptr != NULL)
-        PrintConnectionListEntry ((char *)EMPTY (ptr->Name), (ElementTypePtr)ptr->Element, false, FP);
+        PrintConnectionListEntry ((char *)EMPTY (ptr->Name), (ElementType *)ptr->Element, false, FP);
       else
         printf ("Skipping NULL ptr in 2nd part of PrintPadConnections\n");
     }
@@ -2722,7 +2721,7 @@ static void
 PrintPinConnections (FILE * FP, bool IsFirst)
 {
   Cardinal i;
-  PinTypePtr pv;
+  PinType *pv;
 
   if (!PVList.Number)
     return;
@@ -2741,7 +2740,7 @@ PrintPinConnections (FILE * FP, bool IsFirst)
     {
       /* get the elements name or assume that its a via */
       pv = PVLIST_ENTRY (i);
-      PrintConnectionListEntry ((char *)EMPTY (pv->Name), (ElementTypePtr)pv->Element, false, FP);
+      PrintConnectionListEntry ((char *)EMPTY (pv->Name), (ElementType *)pv->Element, false, FP);
     }
 }
 
@@ -2771,7 +2770,7 @@ reassign_no_drc_flags (void)
 
   for (layer = 0; layer < max_copper_layer; layer++)
     {
-      LayerTypePtr l = LAYER_PTR (layer);
+      LayerType *l = LAYER_PTR (layer);
       l->no_drc = AttributeGet (l, "PCB::skip-drc") != NULL;
     }
 }
@@ -2811,7 +2810,7 @@ DoIt (bool AndRats, bool AndDraw)
  */
 
 bool
-lineClear (LineTypePtr line, Cardinal group)
+lineClear (LineType *line, Cardinal group)
 {
   if (LOTouchesLine (line, group))
     return (false);
@@ -2824,7 +2823,7 @@ lineClear (LineTypePtr line, Cardinal group)
  * prints all unused pins of an element to file FP
  */
 static bool
-PrintAndSelectUnusedPinsAndPadsOfElement (ElementTypePtr Element, FILE * FP)
+PrintAndSelectUnusedPinsAndPadsOfElement (ElementType *Element, FILE * FP)
 {
   bool first = true;
   Cardinal number;
@@ -2960,7 +2959,7 @@ PrepareNextLoop (FILE * FP)
  * Returns true if operation was aborted
  */
 static bool
-PrintElementConnections (ElementTypePtr Element, FILE * FP, bool AndDraw)
+PrintElementConnections (ElementType *Element, FILE * FP, bool AndDraw)
 {
   PrintConnectionElementName (Element, FP);
 
@@ -3070,7 +3069,7 @@ DrawNewConnections (void)
    */
   while (PVList.DrawLocation < PVList.Number)
     {
-      PinTypePtr pv = PVLIST_ENTRY (PVList.DrawLocation);
+      PinType *pv = PVLIST_ENTRY (PVList.DrawLocation);
 
       if (TEST_FLAG (PINFLAG, pv))
         {
@@ -3095,7 +3094,7 @@ DrawNewConnections (void)
  * find all connections to pins within one element
  */
 void
-LookupElementConnections (ElementTypePtr Element, FILE * FP)
+LookupElementConnections (ElementType *Element, FILE * FP)
 {
   /* reset all currently marked connections */
   User = true;
@@ -3153,14 +3152,14 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case PIN_TYPE:
     case VIA_TYPE:
       {
-        if (ADD_PV_TO_LIST ((PinTypePtr) ptr2))
+        if (ADD_PV_TO_LIST ((PinType *) ptr2))
           return true;
         break;
       }
 
     case RATLINE_TYPE:
       {
-        if (ADD_RAT_TO_LIST ((RatTypePtr) ptr1))
+        if (ADD_RAT_TO_LIST ((RatType *) ptr1))
           return true;
         break;
       }
@@ -3168,9 +3167,9 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case LINE_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_LINE_TO_LIST (layer, (LineTypePtr) ptr2))
+        if (ADD_LINE_TO_LIST (layer, (LineType *) ptr2))
           return true;
         break;
       }
@@ -3178,9 +3177,9 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case ARC_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_ARC_TO_LIST (layer, (ArcTypePtr) ptr2))
+        if (ADD_ARC_TO_LIST (layer, (ArcType *) ptr2))
           return true;
         break;
       }
@@ -3188,16 +3187,16 @@ ListStart (int type, void *ptr1, void *ptr2, void *ptr3)
     case POLYGON_TYPE:
       {
         int layer = GetLayerNumber (PCB->Data,
-                                    (LayerTypePtr) ptr1);
+                                    (LayerType *) ptr1);
 
-        if (ADD_POLYGON_TO_LIST (layer, (PolygonTypePtr) ptr2))
+        if (ADD_POLYGON_TO_LIST (layer, (PolygonType *) ptr2))
           return true;
         break;
       }
 
     case PAD_TYPE:
       {
-        PadTypePtr pad = (PadTypePtr) ptr2;
+        PadType *pad = (PadType *) ptr2;
         if (ADD_PAD_TO_LIST
             (TEST_FLAG
              (ONSOLDERFLAG, pad) ? SOLDER_LAYER : COMPONENT_LAYER, pad))
@@ -3239,10 +3238,10 @@ LookupConnection (Coord X, Coord Y, bool AndDraw, Coord Range, int which_flag)
       if (type & SILK_TYPE)
         {
           int laynum = GetLayerNumber (PCB->Data,
-                                       (LayerTypePtr) ptr1);
+                                       (LayerType *) ptr1);
 
           /* don't mess with non-conducting objects! */
-          if (laynum >= max_copper_layer || ((LayerTypePtr)ptr1)->no_drc)
+          if (laynum >= max_copper_layer || ((LayerType *)ptr1)->no_drc)
             return;
         }
     }
@@ -3648,7 +3647,7 @@ RestoreFindFlag (void)
 /* DRC clearance callback */
 
 static int
-drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
+drc_callback (DataType *data, LayerType *layer, PolygonType *polygon,
               int type, void *ptr1, void *ptr2)
 {
   char *message;
@@ -3658,10 +3657,10 @@ drc_callback (DataTypePtr data, LayerTypePtr layer, PolygonTypePtr polygon,
   int *object_type_list;
   DrcViolationType *violation;
 
-  LineTypePtr line = (LineTypePtr) ptr2;
-  ArcTypePtr arc = (ArcTypePtr) ptr2;
-  PinTypePtr pin = (PinTypePtr) ptr2;
-  PadTypePtr pad = (PadTypePtr) ptr2;
+  LineType *line = (LineType *) ptr2;
+  ArcType *arc = (ArcType *) ptr2;
+  PinType *pin = (PinType *) ptr2;
+  PadType *pad = (PadType *) ptr2;
 
   thing_type = type;
   thing_ptr1 = ptr1;
@@ -4250,21 +4249,21 @@ LocateError (Coord *x, Coord *y)
     {
     case LINE_TYPE:
       {
-        LineTypePtr line = (LineTypePtr) thing_ptr3;
+        LineType *line = (LineType *) thing_ptr3;
         *x = (line->Point1.X + line->Point2.X) / 2;
         *y = (line->Point1.Y + line->Point2.Y) / 2;
         break;
       }
     case ARC_TYPE:
       {
-        ArcTypePtr arc = (ArcTypePtr) thing_ptr3;
+        ArcType *arc = (ArcType *) thing_ptr3;
         *x = arc->X;
         *y = arc->Y;
         break;
       }
     case POLYGON_TYPE:
       {
-        PolygonTypePtr polygon = (PolygonTypePtr) thing_ptr3;
+        PolygonType *polygon = (PolygonType *) thing_ptr3;
         *x =
           (polygon->Clipped->contours->xmin +
            polygon->Clipped->contours->xmax) / 2;
@@ -4276,21 +4275,21 @@ LocateError (Coord *x, Coord *y)
     case PIN_TYPE:
     case VIA_TYPE:
       {
-        PinTypePtr pin = (PinTypePtr) thing_ptr3;
+        PinType *pin = (PinType *) thing_ptr3;
         *x = pin->X;
         *y = pin->Y;
         break;
       }
     case PAD_TYPE:
       {
-        PadTypePtr pad = (PadTypePtr) thing_ptr3;
+        PadType *pad = (PadType *) thing_ptr3;
         *x = (pad->Point1.X + pad->Point2.X) / 2;
         *y = (pad->Point1.Y + pad->Point2.Y) / 2;
         break;
       }
     case ELEMENT_TYPE:
       {
-        ElementTypePtr element = (ElementTypePtr) thing_ptr3;
+        ElementType *element = (ElementType *) thing_ptr3;
         *x = element->MarkX;
         *y = element->MarkY;
         break;
@@ -4351,9 +4350,9 @@ GotoError (void)
     case LINE_TYPE:
     case ARC_TYPE:
     case POLYGON_TYPE:
-      ChangeGroupVisibility (GetLayerNumber
-                             (PCB->Data, (LayerTypePtr) thing_ptr1), true,
-                             true);
+      ChangeGroupVisibility (
+          GetLayerNumber (PCB->Data, (LayerType *) thing_ptr1),
+          true, true);
     }
   CenterDisplay (X, Y);
 }
diff --git a/src/find.h b/src/find.h
index 1d54111..6ccc81f 100644
--- a/src/find.h
+++ b/src/find.h
@@ -43,13 +43,13 @@
 #define SILK_TYPE	\
 	(LINE_TYPE | ARC_TYPE | POLYGON_TYPE)
 
-bool LineLineIntersect (LineTypePtr, LineTypePtr);
-bool LineArcIntersect (LineTypePtr, ArcTypePtr);
-bool PinLineIntersect (PinTypePtr, LineTypePtr);
-bool LinePadIntersect (LineTypePtr, PadTypePtr);
-bool ArcPadIntersect (ArcTypePtr, PadTypePtr);
-bool IsPolygonInPolygon (PolygonTypePtr, PolygonTypePtr);
-void LookupElementConnections (ElementTypePtr, FILE *);
+bool LineLineIntersect (LineType *, LineType *);
+bool LineArcIntersect (LineType *, ArcType *);
+bool PinLineIntersect (PinType *, LineType *);
+bool LinePadIntersect (LineType *, PadType *);
+bool ArcPadIntersect (ArcType *, PadType *);
+bool IsPolygonInPolygon (PolygonType *, PolygonType *);
+void LookupElementConnections (ElementType *, FILE *);
 void LookupConnectionsToAllElements (FILE *);
 void LookupConnection (Coord, Coord, bool, Coord, int);
 void LookupUnusedPins (FILE *);
@@ -66,9 +66,9 @@ void RatFindHook (int, void *, void *, void *, bool, bool);
 void SaveFindFlag (int);
 void RestoreFindFlag (void);
 int DRCAll (void);
-bool lineClear (LineTypePtr, Cardinal);
-bool IsLineInPolygon (LineTypePtr, PolygonTypePtr);
-bool IsArcInPolygon (ArcTypePtr, PolygonTypePtr);
-bool IsPadInPolygon (PadTypePtr, PolygonTypePtr);
+bool lineClear (LineType *, Cardinal);
+bool IsLineInPolygon (LineType *, PolygonType *);
+bool IsArcInPolygon (ArcType *, PolygonType *);
+bool IsPadInPolygon (PadType *, PolygonType *);
 
 #endif
diff --git a/src/fontmode.c b/src/fontmode.c
index f218e7c..e09f825 100644
--- a/src/fontmode.c
+++ b/src/fontmode.c
@@ -76,7 +76,7 @@ FontEdit (int argc, char **argv, Coord Ux, Coord Uy)
 {
   FontType *font;
   SymbolType *symbol;
-  LayerTypePtr lfont, lorig, lwidth, lgrid;
+  LayerType *lfont, *lorig, *lwidth, *lgrid;
   int s, l;
 
   if (hid_actionl ("New", "Font", 0))
@@ -176,11 +176,11 @@ static const char fontsave_help[] = "Convert the current PCB back to a font.";
 static int
 FontSave (int argc, char **argv, Coord Ux, Coord Uy)
 {
-  FontTypePtr font;
-  SymbolTypePtr symbol;
+  FontType *font;
+  SymbolType *symbol;
   int i;
   GList *ii;
-  LayerTypePtr lfont, lwidth;
+  LayerType *lfont, *lwidth;
 
   font = &PCB->Font;
   lfont = PCB->Data->Layer + 0;
diff --git a/src/global.h b/src/global.h
index 79c1456..4b21931 100644
--- a/src/global.h
+++ b/src/global.h
@@ -58,13 +58,13 @@
 #include <glib.h>
 
 /* Forward declarations for structures the HIDs need.  */
-typedef struct BoxType BoxType, *BoxTypePtr;
-typedef struct polygon_st PolygonType, *PolygonTypePtr;
-typedef struct pad_st PadType, *PadTypePtr;
-typedef struct pin_st PinType, *PinTypePtr, **PinTypeHandle;
-typedef struct drc_violation_st DrcViolationType, *DrcViolationTypePtr;
+typedef struct BoxType BoxType;
+typedef struct polygon_st PolygonType;
+typedef struct pad_st PadType;
+typedef struct pin_st PinType;
+typedef struct drc_violation_st DrcViolationType;
 typedef struct rtree rtree_t;
-typedef struct AttributeListType AttributeListType, *AttributeListTypePtr;
+typedef struct AttributeListType AttributeListType;
 
 typedef struct unit Unit;
 typedef struct increments Increments;
@@ -271,7 +271,7 @@ struct polygon_st			/* holds information about a polygon */
   POLYAREA *Clipped;		/* the clipped region of this polygon */
   PLINE *NoHoles;		/* the polygon broken into hole-less regions */
   int NoHolesValid;		/* Is the NoHoles polygon up to date? */
-  PointTypePtr Points;		/* data */
+  PointType *Points;		/* data */
   Cardinal *HoleIndex;		/* Index of hole data within the Points array */
   Cardinal HoleIndexN;		/* number of holes in polygon */
   Cardinal HoleIndexMax;	/* max number from malloc() */
@@ -372,7 +372,7 @@ typedef struct
  */
 typedef struct			/* a single symbol */
 {
-  LineTypePtr Line;
+  LineType *Line;
   bool Valid;
   Cardinal LineN,		/* number of lines */
     LineMax;
@@ -415,15 +415,15 @@ typedef struct			/* holds drill information */
     UnplatedCount,		/* number of these holes that are unplated */
     PinN,			/* number of drill coordinates in the list */
     PinMax;			/* max number of coordinates from malloc() */
-  PinTypePtr *Pin;		/* coordinates to drill */
-  ElementTypePtr *Element;	/* a pointer to an array of element pointers */
+  PinType **Pin;		/* coordinates to drill */
+  ElementType **Element;	/* a pointer to an array of element pointers */
 } DrillType, *DrillTypePtr;
 
 typedef struct			/* holds a range of Drill Infos */
 {
   Cardinal DrillN,		/* number of drill sizes */
     DrillMax;			/* max number from malloc() */
-  DrillTypePtr Drill;		/* plated holes */
+  DrillType *Drill;		/* plated holes */
 } DrillInfoType, *DrillInfoTypePtr;
 
 typedef struct
@@ -463,7 +463,7 @@ typedef struct
    *Style;			/* routing style */
   Cardinal EntryN,		/* number of objects */
     EntryMax;			/* number of reserved memory locations */
-  LibraryEntryTypePtr Entry;	/* the entries */
+  LibraryEntryType *Entry;	/* the entries */
   char flag;			/* used by the netlist window to enable/disable nets */
   char internal;		/* if set, this is an internal-only entry, not
 				   part of the global netlist. */
@@ -473,7 +473,7 @@ typedef struct
 {
   Cardinal MenuN;               /* number of objects */
   Cardinal MenuMax;             /* number of reserved memory locations */
-  LibraryMenuTypePtr Menu;      /* the entries */
+  LibraryMenuType *Menu;      /* the entries */
 } LibraryType, *LibraryTypePtr;
 
 
@@ -524,7 +524,7 @@ typedef struct PCBType
   RouteStyleType RouteStyle[NUM_STYLES];
   LibraryType NetlistLib;
   AttributeListType Attributes;
-  DataTypePtr Data;		/* entire database */
+  DataType *Data;		/* entire database */
 
   bool is_footprint;		/* If set, the user has loaded a footprint, not a pcb. */
 }
@@ -534,7 +534,7 @@ typedef struct			/* information about the paste buffer */
 {
   Coord X, Y;			/* offset */
   BoxType BoundingBox;
-  DataTypePtr Data;		/* data; not all members of PCBType */
+  DataType *Data;		/* data; not all members of PCBType */
   /* are used */
 } BufferType, *BufferTypePtr;
 
@@ -544,9 +544,9 @@ typedef struct			/* information about the paste buffer */
  */
 typedef struct			/* rubberband lines for element moves */
 {
-  LayerTypePtr Layer;		/* layer that holds the line */
-  LineTypePtr Line;		/* the line itself */
-  PointTypePtr MovedPoint;	/* and finally the point */
+  LayerType *Layer;		/* layer that holds the line */
+  LineType *Line;		/* the line itself */
+  PointType *MovedPoint;	/* and finally the point */
 } RubberbandType, *RubberbandTypePtr;
 
 typedef struct			/* current marked line */
@@ -576,7 +576,7 @@ typedef struct			/* currently attached object */
    *Ptr3;
   Cardinal RubberbandN,		/* number of lines in array */
     RubberbandMax;
-  RubberbandTypePtr Rubberband;
+  RubberbandType *Rubberband;
 } AttachedObjectType, *AttachedObjectTypePtr;
 
 enum crosshair_shape
@@ -703,18 +703,18 @@ SettingType, *SettingTypePtr;
  */
 typedef struct
 {
-  void *(*Line) (LayerTypePtr, LineTypePtr);
-  void *(*Text) (LayerTypePtr, TextTypePtr);
-  void *(*Polygon) (LayerTypePtr, PolygonTypePtr);
-  void *(*Via) (PinTypePtr);
-  void *(*Element) (ElementTypePtr);
-  void *(*ElementName) (ElementTypePtr);
-  void *(*Pin) (ElementTypePtr, PinTypePtr);
-  void *(*Pad) (ElementTypePtr, PadTypePtr);
-  void *(*LinePoint) (LayerTypePtr, LineTypePtr, PointTypePtr);
-  void *(*Point) (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-  void *(*Arc) (LayerTypePtr, ArcTypePtr);
-  void *(*Rat) (RatTypePtr);
+  void *(*Line) (LayerType *, LineType *);
+  void *(*Text) (LayerType *, TextType *);
+  void *(*Polygon) (LayerType *, PolygonType *);
+  void *(*Via) (PinType *);
+  void *(*Element) (ElementType *);
+  void *(*ElementName) (ElementType *);
+  void *(*Pin) (ElementType *, PinType *);
+  void *(*Pad) (ElementType *, PadType *);
+  void *(*LinePoint) (LayerType *, LineType *, PointType *);
+  void *(*Point) (LayerType *, PolygonType *, PointType *);
+  void *(*Arc) (LayerType *, ArcType *);
+  void *(*Rat) (RatType *);
 } ObjectFunctionType, *ObjectFunctionTypePtr;
 
 /* ---------------------------------------------------------------------------
@@ -734,22 +734,22 @@ typedef struct			/* holds a net of connections */
 {
   Cardinal ConnectionN,		/* the number of connections contained */
     ConnectionMax;		/* max connections from malloc */
-  ConnectionTypePtr Connection;
-  RouteStyleTypePtr Style;
+  ConnectionType *Connection;
+  RouteStyleType *Style;
 } NetType, *NetTypePtr;
 
 typedef struct			/* holds a list of nets */
 {
   Cardinal NetN,		/* the number of subnets contained */
     NetMax;			/* max subnets from malloc */
-  NetTypePtr Net;
+  NetType *Net;
 } NetListType, *NetListTypePtr;
 
 typedef struct			/* holds a list of net lists */
 {
   Cardinal NetListN,		/* the number of net lists contained */
     NetListMax;			/* max net lists from malloc */
-  NetListTypePtr NetList;
+  NetListType *NetList;
 } NetListListType, *NetListListTypePtr;
 
 typedef struct			/* holds a generic list of pointers */
@@ -763,7 +763,7 @@ typedef struct
 {
   Cardinal BoxN,		/* the number of boxes contained */
     BoxMax;			/* max boxes from malloc */
-  BoxTypePtr Box;
+  BoxType *Box;
 
 } BoxListType, *BoxListTypePtr;
 
diff --git a/src/hid/gerber/gerber.c b/src/hid/gerber/gerber.c
index dd9c1c9..2181718 100644
--- a/src/hid/gerber/gerber.c
+++ b/src/hid/gerber/gerber.c
@@ -88,7 +88,7 @@ static int current_mask;
 static int flash_drills;
 static int copy_outline_mode;
 static int name_style;
-static LayerTypePtr outline_layer;
+static LayerType *outline_layer;
 
 enum ApertureShape
 {
diff --git a/src/hid/gtk/gtkhid-gl.c b/src/hid/gtk/gtkhid-gl.c
index 7471afc..f3133ec 100644
--- a/src/hid/gtk/gtkhid-gl.c
+++ b/src/hid/gtk/gtkhid-gl.c
@@ -193,7 +193,7 @@ ghid_make_gc (void)
 }
 
 static void
-ghid_draw_grid (BoxTypePtr drawn_area)
+ghid_draw_grid (BoxType *drawn_area)
 {
   if (Vz (PCB->Grid) < MIN_GRID_DISTANCE)
     return;
diff --git a/src/hid/gtk/gtkhid-main.c b/src/hid/gtk/gtkhid-main.c
index d8bf02c..db7d831 100644
--- a/src/hid/gtk/gtkhid-main.c
+++ b/src/hid/gtk/gtkhid-main.c
@@ -653,7 +653,7 @@ ghid_fileselect (const char *title, const char *descr,
 void
 ghid_show_item (void *item)
 {
-  ghid_pinout_window_show (&ghid_port, (ElementTypePtr) item);
+  ghid_pinout_window_show (&ghid_port, (ElementType *) item);
 }
 
 void
diff --git a/src/hid/gtk/gui-drc-window.c b/src/hid/gtk/gui-drc-window.c
index 9cbc955..1613923 100644
--- a/src/hid/gtk/gui-drc-window.c
+++ b/src/hid/gtk/gui-drc-window.c
@@ -236,7 +236,7 @@ selection_changed_cb (GtkTreeSelection *selection, gpointer user_data)
 	case LINE_TYPE:
 	case ARC_TYPE:
 	case POLYGON_TYPE:
-	  ChangeGroupVisibility (GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1), true, true);
+	  ChangeGroupVisibility (GetLayerNumber (PCB->Data, (LayerType *) ptr1), true, true);
 	}
       DrawObject (object_type, ptr1, ptr2);
     }
diff --git a/src/hid/gtk/gui-netlist-window.c b/src/hid/gtk/gui-netlist-window.c
index 51192c6..447b10e 100644
--- a/src/hid/gtk/gui-netlist-window.c
+++ b/src/hid/gtk/gui-netlist-window.c
@@ -279,7 +279,7 @@ node_selection_changed_cb (GtkTreeSelection * selection, gpointer data)
     switch (conn.type) {
       case PIN_TYPE:
         {
-          PinTypePtr pin = (PinTypePtr) conn.ptr2;
+          PinType *pin = (PinType *) conn.ptr2;
           x = pin->X;
           y = pin->Y;
           gui->set_crosshair (x, y, 0);
@@ -288,7 +288,7 @@ node_selection_changed_cb (GtkTreeSelection * selection, gpointer data)
         }
       case PAD_TYPE:
         {
-          PadTypePtr pad = (PadTypePtr) conn.ptr2;
+          PadType *pad = (PadType *) conn.ptr2;
           x = pad->Point1.X + (pad->Point2.X - pad->Point1.X) / 2;
           y = pad->Point1.Y + (pad->Point2.Y - pad->Point1.Y) / 2;
           gui->set_crosshair (x, y, 0);
diff --git a/src/hid/gtk/gui-output-events.c b/src/hid/gtk/gui-output-events.c
index 20e8e03..2ca39de 100644
--- a/src/hid/gtk/gui-output-events.c
+++ b/src/hid/gtk/gui-output-events.c
@@ -409,11 +409,11 @@ describe_location (Coord X, Coord Y)
 
   /* don't mess with silk objects! */
   if (type & SILK_TYPE &&
-      GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1) >= max_copper_layer)
+      GetLayerNumber (PCB->Data, (LayerType *) ptr1) >= max_copper_layer)
     return NULL;
 
   if (type == PIN_TYPE || type == PAD_TYPE)
-    elename = (char *)UNKNOWN (NAMEONPCB_NAME ((ElementTypePtr) ptr1));
+    elename = (char *)UNKNOWN (NAMEONPCB_NAME ((ElementType *) ptr1));
 
   pinname = ConnectionName (type, ptr1, ptr2);
 
diff --git a/src/hid/gtk/gui.h b/src/hid/gtk/gui.h
index 788553e..e4d55dd 100644
--- a/src/hid/gtk/gui.h
+++ b/src/hid/gtk/gui.h
@@ -347,8 +347,8 @@ void make_route_style_buttons (GHidRouteStyleSelector *rss);
 gboolean dup_string (gchar ** dst, const gchar * src);
 void free_glist_and_data (GList ** list_head);
 
-ModifierKeysState ghid_modifier_keys_state (GdkModifierType * state);
-ButtonState ghid_button_state (GdkModifierType * state);
+ModifierKeysState ghid_modifier_keys_state (GdkModifierType *state);
+ButtonState ghid_button_state (GdkModifierType *state);
 gboolean ghid_is_modifier_key_sym (gint ksym);
 gboolean ghid_control_is_pressed (void);
 gboolean ghid_mod1_is_pressed (void);
@@ -463,7 +463,7 @@ void ghid_log (const char *fmt, ...);
 void ghid_logv (const char *fmt, va_list args);
 
 /* gui-pinout-window.c */
-void ghid_pinout_window_show (GHidPort * out, ElementTypePtr Element);
+void ghid_pinout_window_show (GHidPort *out, ElementType *Element);
 
 /* gtkhid-gdk.c AND gtkhid-gl.c */
 int ghid_set_layer (const char *name, int group, int empty);
diff --git a/src/hid/lesstif/netlist.c b/src/hid/lesstif/netlist.c
index 572fba1..ba2cd4b 100644
--- a/src/hid/lesstif/netlist.c
+++ b/src/hid/lesstif/netlist.c
@@ -70,7 +70,7 @@ netlist_select (Widget w, void *v, XmListCallbackStruct * cbs)
 {
   XmString str;
   int pos = cbs->item_position;
-  LibraryMenuTypePtr net = & (PCB->NetlistLib.Menu[pos - 1]);
+  LibraryMenuType *net = & (PCB->NetlistLib.Menu[pos - 1]);
   char *name = net->Name;
   if (name[0] == ' ')
     {
@@ -96,10 +96,10 @@ netlist_extend (Widget w, void *v, XmListCallbackStruct * cbs)
     pick_net (cbs->item_position - 1);
 }
 
-typedef void (*Std_Nbcb_Func)(LibraryMenuTypePtr, int);
+typedef void (*Std_Nbcb_Func)(LibraryMenuType *, int);
 
 static void
-nbcb_rat_on (LibraryMenuTypePtr net, int pos)
+nbcb_rat_on (LibraryMenuType *net, int pos)
 {
   XmString str;
   char *name = net->Name;
@@ -111,7 +111,7 @@ nbcb_rat_on (LibraryMenuTypePtr net, int pos)
 }
 
 static void
-nbcb_rat_off (LibraryMenuTypePtr net, int pos)
+nbcb_rat_off (LibraryMenuType *net, int pos)
 {
   XmString str;
   char *name = net->Name;
@@ -126,7 +126,7 @@ nbcb_rat_off (LibraryMenuTypePtr net, int pos)
 /* Select on the layout the current net treeview selection
  */
 static void
-nbcb_select_common (LibraryMenuTypePtr net, int pos, int select_flag)
+nbcb_select_common (LibraryMenuType *net, int pos, int select_flag)
 {
   LibraryEntryType *entry;
   ConnectionType conn;
@@ -147,19 +147,19 @@ nbcb_select_common (LibraryMenuTypePtr net, int pos, int select_flag)
 }
 
 static void
-nbcb_select (LibraryMenuTypePtr net, int pos)
+nbcb_select (LibraryMenuType *net, int pos)
 {
   nbcb_select_common (net, pos, 1);
 }
 
 static void
-nbcb_deselect (LibraryMenuTypePtr net, int pos)
+nbcb_deselect (LibraryMenuType *net, int pos)
 {
   nbcb_select_common (net, pos, 0);
 }
 
 static void
-nbcb_find (LibraryMenuTypePtr net, int pos)
+nbcb_find (LibraryMenuType *net, int pos)
 {
   char *name = net->Name + 2;
   hid_actionl ("netlist", "find", name, NULL);
@@ -176,7 +176,7 @@ nbcb_std_callback (Widget w, Std_Nbcb_Func v, XmPushButtonCallbackStruct * cbs)
     hid_actionl ("connection", "reset", NULL);
   for (i=0; i<posc; i++)
     {
-      LibraryMenuTypePtr net = & (PCB->NetlistLib.Menu[posl[i] - 1]);
+      LibraryMenuType *net = & (PCB->NetlistLib.Menu[posl[i] - 1]);
       v(net, posl[i]);
     }
   n = 0;
@@ -422,7 +422,7 @@ LesstifNetlistShow (int argc, char **argv, Coord x, Coord y)
 
   if (argc == 1)
     {
-      LibraryMenuTypePtr net;
+      LibraryMenuType *net;
 
       net = netnode_to_netname(argv[0]);
       if (net)
diff --git a/src/hid/nelma/nelma.c b/src/hid/nelma/nelma.c
index fd0aa11..048f476 100644
--- a/src/hid/nelma/nelma.c
+++ b/src/hid/nelma/nelma.c
@@ -324,8 +324,8 @@ static void
 nelma_write_nets(FILE * out)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m, i, idx;
 
@@ -373,8 +373,8 @@ nelma_write_layer(FILE * out, int z, int h,
 		  char *mat)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m;
 
@@ -453,7 +453,7 @@ nelma_write_layers(FILE * out)
 }
 
 static void 
-nelma_write_object(FILE * out, LibraryEntryTypePtr pin)
+nelma_write_object(FILE * out, LibraryEntryType *pin)
 {
 	int             i, idx;
 	Coord           px = 0, py = 0;
@@ -494,8 +494,8 @@ static void
 nelma_write_objects(FILE * out)
 {
 	LibraryType     netlist;
-	LibraryMenuTypePtr net;
-	LibraryEntryTypePtr pin;
+	LibraryMenuType *net;
+	LibraryEntryType *pin;
 
 	int             n, m;
 
diff --git a/src/hid/ps/ps.c b/src/hid/ps/ps.c
index 263a240..ebab761 100644
--- a/src/hid/ps/ps.c
+++ b/src/hid/ps/ps.c
@@ -61,7 +61,7 @@ typedef struct
   char *name;
   Coord Width, Height;
   Coord MarginX, MarginY;
-} MediaType, *MediaTypePtr;
+} MediaType;
 
 /*
  * Metric ISO sizes in mm.  See http://en.wikipedia.org/wiki/ISO_paper_sizes
@@ -384,7 +384,7 @@ static struct {
   bool drillcopper;
   bool legend;
 
-  LayerTypePtr outline_layer;
+  LayerType *outline_layer;
 
   double scale_factor;
 
diff --git a/src/insert.c b/src/insert.c
index 7e12874..a254998 100644
--- a/src/insert.c
+++ b/src/insert.c
@@ -57,9 +57,9 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *InsertPointIntoLine (LayerTypePtr, LineTypePtr);
-static void *InsertPointIntoPolygon (LayerTypePtr, PolygonTypePtr);
-static void *InsertPointIntoRat (RatTypePtr);
+static void *InsertPointIntoLine (LayerType *, LineType *);
+static void *InsertPointIntoPolygon (LayerType *, PolygonType *);
+static void *InsertPointIntoRat (RatType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -87,9 +87,9 @@ static ObjectFunctionType InsertFunctions = {
  * inserts a point into a rat-line
  */
 static void *
-InsertPointIntoRat (RatTypePtr Rat)
+InsertPointIntoRat (RatType *Rat)
 {
-  LineTypePtr newone;
+  LineType *newone;
 
   newone = CreateDrawnLineOnLayer (CURRENT, Rat->Point1.X, Rat->Point1.Y,
 				InsertX, InsertY, Settings.LineThickness,
@@ -116,9 +116,9 @@ InsertPointIntoRat (RatTypePtr Rat)
  * inserts a point into a line
  */
 static void *
-InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
+InsertPointIntoLine (LayerType *Layer, LineType *Line)
 {
-  LineTypePtr line;
+  LineType *line;
   Coord X, Y;
 
   if (((Line->Point1.X == InsertX) && (Line->Point1.Y == InsertY)) ||
@@ -129,12 +129,12 @@ InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
   AddObjectToMoveUndoList (LINEPOINT_TYPE, Layer, Line, &Line->Point2,
 			   InsertX - X, InsertY - Y);
   EraseLine (Line);
-  r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+  r_delete_entry (Layer->line_tree, (BoxType *) Line);
   RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
   Line->Point2.X = InsertX;
   Line->Point2.Y = InsertY;
   SetLineBoundingBox (Line);
-  r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+  r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
   ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
   DrawLine (Layer, Line);
   /* we must create after playing with Line since creation may
@@ -158,7 +158,7 @@ InsertPointIntoLine (LayerTypePtr Layer, LineTypePtr Line)
  * inserts a point into a polygon
  */
 static void *
-InsertPointIntoPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+InsertPointIntoPolygon (LayerType *Layer, PolygonType *Polygon)
 {
   PointType save;
   Cardinal n;
@@ -179,7 +179,7 @@ InsertPointIntoPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
    * second, shift the points up to make room for the new point
    */
   ErasePolygon (Polygon);
-  r_delete_entry (Layer->polygon_tree, (BoxTypePtr) Polygon);
+  r_delete_entry (Layer->polygon_tree, (BoxType *) Polygon);
   save = *CreateNewPointInPolygon (Polygon, InsertX, InsertY);
   for (n = Polygon->PointN - 1; n > InsertAt; n--)
     Polygon->Points[n] = Polygon->Points[n - 1];
@@ -233,13 +233,13 @@ InsertPointIntoObject (int Type, void *Ptr1, void *Ptr2, Cardinal * Ptr3,
 /* ---------------------------------------------------------------------------
  *  adjusts the insert point to make 45 degree lines as necessary
  */
-PointTypePtr
+PointType *
 AdjustInsertPoint (void)
 {
   static PointType InsertedPoint;
   double m;
   Coord x, y, m1, m2;
-  LineTypePtr line = (LineTypePtr) Crosshair.AttachedObject.Ptr2;
+  LineType *line = (LineType *) Crosshair.AttachedObject.Ptr2;
 
   if (Crosshair.AttachedObject.State == STATE_FIRST)
     return NULL;
diff --git a/src/insert.h b/src/insert.h
index 2793edf..31fc6dc 100644
--- a/src/insert.h
+++ b/src/insert.h
@@ -39,6 +39,6 @@
  */
 void *InsertPointIntoObject (int, void *, void *, Cardinal *, Coord,
 			     Coord, bool, bool);
-PointTypePtr AdjustInsertPoint (void);
+PointType * AdjustInsertPoint (void);
 
 #endif
diff --git a/src/intersect.c b/src/intersect.c
index 33b359d..59aa064 100644
--- a/src/intersect.c
+++ b/src/intersect.c
@@ -85,7 +85,7 @@ LocationList;
  * Create a sorted list of unique y coords from a BoxList.
  */
 static LocationList
-createSortedYList (BoxListTypePtr boxlist)
+createSortedYList (BoxListType *boxlist)
 {
   LocationList yCoords;
   Coord last;
@@ -195,7 +195,7 @@ deleteSegment (SegmentTree * st, int n, Coord Y1, Coord Y2)
  * Runs in O(N ln N) time.
  */
 double
-ComputeIntersectionArea (BoxListTypePtr boxlist)
+ComputeIntersectionArea (BoxListType *boxlist)
 {
   Cardinal i;
   double area = 0.0;
@@ -212,9 +212,9 @@ ComputeIntersectionArea (BoxListTypePtr boxlist)
  * O(N ln N) time.
  */
 double
-ComputeUnionArea (BoxListTypePtr boxlist)
+ComputeUnionArea (BoxListType *boxlist)
 {
-  BoxTypePtr *rectLeft, *rectRight;
+  BoxType **rectLeft, **rectRight;
   Cardinal i, j;
   LocationList yCoords;
   SegmentTree segtree;
@@ -229,8 +229,8 @@ ComputeUnionArea (BoxListTypePtr boxlist)
   segtree = createSegmentTree (yCoords.p, yCoords.size);
   free (yCoords.p);
   /* create sorted list of left and right X coordinates of rectangles */
-  rectLeft = (BoxTypePtr *)calloc (boxlist->BoxN, sizeof (*rectLeft));
-  rectRight = (BoxTypePtr *)calloc (boxlist->BoxN, sizeof (*rectRight));
+  rectLeft = (BoxType **)calloc (boxlist->BoxN, sizeof (*rectLeft));
+  rectRight = (BoxType **)calloc (boxlist->BoxN, sizeof (*rectRight));
   for (i = 0; i < boxlist->BoxN; i++)
     {
       assert (boxlist->Box[i].X1 <= boxlist->Box[i].X2);
@@ -249,7 +249,7 @@ ComputeUnionArea (BoxListTypePtr boxlist)
       if (i == boxlist->BoxN || rectRight[j]->X2 < rectLeft[i]->X1)
         {
           /* right edge of rectangle */
-          BoxTypePtr b = rectRight[j++];
+          BoxType *b = rectRight[j++];
           /* check lastX */
           if (b->X2 != lastX)
             {
@@ -263,7 +263,7 @@ ComputeUnionArea (BoxListTypePtr boxlist)
       else
         {
           /* left edge of rectangle */
-          BoxTypePtr b = rectLeft[i++];
+          BoxType *b = rectLeft[i++];
           /* check lastX */
           if (b->X1 != lastX)
             {
@@ -283,13 +283,15 @@ ComputeUnionArea (BoxListTypePtr boxlist)
 static int
 compareleft (const void *ptr1, const void *ptr2)
 {
-  BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2;
+  BoxType **b1 = (BoxType **) ptr1;
+  BoxType **b2 = (BoxType **) ptr2;
   return (*b1)->X1 - (*b2)->X1;
 }
 static int
 compareright (const void *ptr1, const void *ptr2)
 {
-  BoxTypePtr *b1 = (BoxTypePtr *) ptr1, *b2 = (BoxTypePtr *) ptr2;
+  BoxType **b1 = (BoxType **) ptr1;
+  BoxType **b2 = (BoxType **) ptr2;
   return (*b1)->X2 - (*b2)->X2;
 }
 static int
diff --git a/src/intersect.h b/src/intersect.h
index 7ed758e..f3e3205 100644
--- a/src/intersect.h
+++ b/src/intersect.h
@@ -37,7 +37,7 @@
 
 #include "global.h"
 
-double ComputeIntersectionArea (BoxListTypePtr boxlist);	/* will sort boxlist */
-double ComputeUnionArea (BoxListTypePtr boxlist);
+double ComputeIntersectionArea (BoxListType *boxlist);	/* will sort boxlist */
+double ComputeUnionArea (BoxListType *boxlist);
 
 #endif
diff --git a/src/line.c b/src/line.c
index 6846b2d..8898238 100644
--- a/src/line.c
+++ b/src/line.c
@@ -46,7 +46,7 @@
 #include <dmalloc.h>
 #endif
 
-static double drc_lines (PointTypePtr end, bool way);
+static double drc_lines (PointType *end, bool way);
 
 /* ---------------------------------------------------------------------------
  * Adjust the attached line to 45 degrees if necessary
@@ -54,7 +54,7 @@ static double drc_lines (PointTypePtr end, bool way);
 void
 AdjustAttachedLine (void)
 {
-  AttachedLineTypePtr line = &Crosshair.AttachedLine;
+  AttachedLineType *line = &Crosshair.AttachedLine;
 
   /* I need at least one point */
   if (line->State == STATE_FIRST)
@@ -89,7 +89,7 @@ AdjustAttachedLine (void)
  *           4
  */
 void
-FortyFiveLine (AttachedLineTypePtr Line)
+FortyFiveLine (AttachedLineType *Line)
 {
   Coord dx, dy, min;
   unsigned direction = 0;
@@ -167,7 +167,7 @@ void
 AdjustTwoLine (bool way)
 {
   Coord dx, dy;
-  AttachedLineTypePtr line = &Crosshair.AttachedLine;
+  AttachedLineType *line = &Crosshair.AttachedLine;
 
   if (Crosshair.AttachedLine.State == STATE_FIRST)
     return;
@@ -220,7 +220,7 @@ AdjustTwoLine (bool way)
 
 struct drc_info
 {
-  LineTypePtr line;
+  LineType *line;
   bool solder;
   jmp_buf env;
 };
@@ -228,7 +228,7 @@ struct drc_info
 static int
 drcVia_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr via = (PinTypePtr) b;
+  PinType *via = (PinType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, via) && PinLineIntersect (via, i->line))
@@ -239,7 +239,7 @@ drcVia_callback (const BoxType * b, void *cl)
 static int
 drcPad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (TEST_FLAG (ONSOLDERFLAG, pad) == i->solder &&
@@ -251,7 +251,7 @@ drcPad_callback (const BoxType * b, void *cl)
 static int
 drcLine_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, line) && LineLineIntersect (line, i->line))
@@ -262,7 +262,7 @@ drcLine_callback (const BoxType * b, void *cl)
 static int
 drcArc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct drc_info *i = (struct drc_info *) cl;
 
   if (!TEST_FLAG (FOUNDFLAG, arc) && LineArcIntersect (i->line, arc))
@@ -281,7 +281,7 @@ drcArc_callback (const BoxType * b, void *cl)
  */
 
 static double
-drc_lines (PointTypePtr end, bool way)
+drc_lines (PointType *end, bool way)
 {
   double f, s, f2, s2, len, best;
   Coord dx, dy, temp, last, length;
diff --git a/src/line.h b/src/line.h
index 8a5e4d2..8552cae 100644
--- a/src/line.h
+++ b/src/line.h
@@ -38,6 +38,6 @@
  */
 void AdjustAttachedLine (void);
 void AdjustTwoLine (bool);
-void FortyFiveLine (AttachedLineTypePtr);
+void FortyFiveLine (AttachedLineType *);
 void EnforceLineDRC (void);
 #endif
diff --git a/src/macro.h b/src/macro.h
index 59c53ba..715f0c9 100644
--- a/src/macro.h
+++ b/src/macro.h
@@ -91,7 +91,7 @@
 /* ---------------------------------------------------------------------------
  * returns the object ID
  */
-#define	OBJECT_ID(p)		(((AnyObjectTypePtr) p)->ID)
+#define	OBJECT_ID(p)		(((AnyObjectType *) p)->ID)
 
 /* ---------------------------------------------------------------------------
  * access macro for current buffer
@@ -170,7 +170,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define STYLE_LOOP(top)  do {                                       \
         Cardinal n;                                                 \
-        RouteStyleTypePtr style;                                    \
+        RouteStyleType *style;                                      \
         for (n = 0; n < NUM_STYLES; n++)                            \
         {                                                           \
                 style = &(top)->RouteStyle[n]
@@ -185,28 +185,28 @@ extern int mem_any_set (unsigned char *, int);
 
 #define DRILL_LOOP(top) do             {               \
         Cardinal        n;                                      \
-        DrillTypePtr    drill;                                  \
+        DrillType *drill;                                       \
         for (n = 0; (top)->DrillN > 0 && n < (top)->DrillN; n++)                        \
         {                                                       \
                 drill = &(top)->Drill[n]
 
 #define NETLIST_LOOP(top) do   {                         \
         Cardinal        n;                                      \
-        NetListTypePtr   netlist;                               \
+        NetListType *netlist;                                   \
         for (n = (top)->NetListN-1; n != -1; n--)               \
         {                                                       \
                 netlist = &(top)->NetList[n]
 
 #define NET_LOOP(top) do   {                             \
         Cardinal        n;                                      \
-        NetTypePtr   net;                                       \
+        NetType *net;                                           \
         for (n = (top)->NetN-1; n != -1; n--)                   \
         {                                                       \
                 net = &(top)->Net[n]
 
 #define CONNECTION_LOOP(net) do {                         \
         Cardinal        n;                                      \
-        ConnectionTypePtr       connection;                     \
+        ConnectionType *connection;                             \
         for (n = (net)->ConnectionN-1; n != -1; n--)            \
         {                                                       \
                 connection = & (net)->Connection[n]
@@ -229,7 +229,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ELEMENTTEXT_LOOP(element) do { 	\
 	Cardinal	n;				\
-	TextTypePtr	text;				\
+	TextType *text;					\
 	for (n = MAX_ELEMENTNAMES-1; n != -1; n--)	\
 	{						\
 		text = &(element)->Name[n]
@@ -308,7 +308,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	POLYGONPOINT_LOOP(polygon) do	{	\
 	Cardinal			n;		\
-	PointTypePtr	point;				\
+	PointType *point;				\
 	for (n = (polygon)->PointN-1; n != -1; n--)	\
 	{						\
 		point = &(polygon)->Points[n]
@@ -325,49 +325,49 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ALLLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		LINE_LOOP(layer)
 
 #define ALLARC_LOOP(top) do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l =0; l < max_copper_layer + 2; l++, layer++)		\
 	{ \
 		ARC_LOOP(layer)
 
 #define	ALLPOLYGON_LOOP(top)	do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		POLYGON_LOOP(layer)
 
 #define	COPPERLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer; l++, layer++)	\
 	{ \
 		LINE_LOOP(layer)
 
 #define COPPERARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l =0; l < max_copper_layer; l++, layer++)		\
 	{ \
 		ARC_LOOP(layer)
 
 #define	COPPERPOLYGON_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer; l++, layer++)	\
 	{ \
 		POLYGON_LOOP(layer)
 
 #define	SILKLINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -375,7 +375,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define SILKARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -383,7 +383,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	SILKPOLYGON_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	layer += max_copper_layer;			\
 	for (l = 0; l < 2; l++, layer++)		\
 	{ \
@@ -391,14 +391,14 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	ALLTEXT_LOOP(top)	do {		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		TEXT_LOOP(layer)
 
 #define	VISIBLELINE_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -406,7 +406,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLEARC_LOOP(top) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -414,7 +414,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLETEXT_LOOP(board) do	{		\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (board)->Data->Layer;		\
+	LayerType *layer = (board)->Data->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
                 TEXT_LOOP(layer);                                      \
@@ -422,7 +422,7 @@ extern int mem_any_set (unsigned char *, int);
 
 #define	VISIBLEPOLYGON_LOOP(top) do	{	\
 	Cardinal		l;			\
-	LayerTypePtr	layer = (top)->Layer;		\
+	LayerType *layer = (top)->Layer;		\
 	for (l = 0; l < max_copper_layer + 2; l++, layer++)	\
 	{ \
 		if (layer->On)				\
@@ -437,25 +437,25 @@ extern int mem_any_set (unsigned char *, int);
 
 #define MENU_LOOP(top)	do {	\
 	Cardinal	l;			\
-	LibraryMenuTypePtr menu;		\
+	LibraryMenuType *menu;			\
 	for (l = (top)->MenuN-1; l != -1; l--)	\
 	{					\
 		menu = &(top)->Menu[l]
 
 #define ENTRY_LOOP(top) do	{	\
 	Cardinal	n;			\
-	LibraryEntryTypePtr entry;		\
+	LibraryEntryType *entry;		\
 	for (n = (top)->EntryN-1; n != -1; n--)	\
 	{					\
 		entry = &(top)->Entry[n]
 
 #define GROUP_LOOP(data, group) do { 	\
 	Cardinal entry; \
-        for (entry = 0; entry < ((PCBTypePtr)(data->pcb))->LayerGroups.Number[(group)]; entry++) \
+        for (entry = 0; entry < ((PCBType *)(data->pcb))->LayerGroups.Number[(group)]; entry++) \
         { \
-		LayerTypePtr layer;		\
+		LayerType *layer;		\
 		Cardinal number; 		\
-		number = ((PCBTypePtr)(data->pcb))->LayerGroups.Entries[(group)][entry]; \
+		number = ((PCBType *)(data->pcb))->LayerGroups.Entries[(group)][entry]; \
 		if (number >= max_copper_layer)	\
 		  continue;			\
 		layer = &data->Layer[number];
@@ -464,7 +464,7 @@ extern int mem_any_set (unsigned char *, int);
         Cardinal n; \
 	for (n = 0; n < ml; n++) \
 	{ \
-	   LayerTypePtr layer = (&data->Layer[(n)]);
+	   LayerType *layer = (&data->Layer[(n)]);
 
 
 #endif
diff --git a/src/mirror.c b/src/mirror.c
index 54c53cb..1adeda9 100644
--- a/src/mirror.c
+++ b/src/mirror.c
@@ -57,7 +57,7 @@
  * an additional offset is passed
  */
 void
-MirrorElementCoordinates (DataTypePtr Data, ElementTypePtr Element,
+MirrorElementCoordinates (DataType *Data, ElementType *Element,
 			  Coord yoff)
 {
   r_delete_element (Data, Element);
diff --git a/src/mirror.h b/src/mirror.h
index 50f648a..97ea0bb 100644
--- a/src/mirror.h
+++ b/src/mirror.h
@@ -40,6 +40,6 @@
 #define	MIRROR_TYPES	(TEXT_TYPE | ELEMENTNAME_TYPE)
 
 
-void MirrorElementCoordinates (DataTypePtr, ElementTypePtr, Coord);
+void MirrorElementCoordinates (DataType *, ElementType *, Coord);
 
 #endif
diff --git a/src/misc.c b/src/misc.c
index 13ce8f6..f675079 100644
--- a/src/misc.c
+++ b/src/misc.c
@@ -213,7 +213,7 @@ GetValueEx (const char *val, const char *units, bool * absolute, UnitList extra_
  * sets the bounding box of a point (which is silly)
  */
 void
-SetPointBoundingBox (PointTypePtr Pnt)
+SetPointBoundingBox (PointType *Pnt)
 {
   Pnt->X2 = Pnt->X + 1;
   Pnt->Y2 = Pnt->Y + 1;
@@ -223,7 +223,7 @@ SetPointBoundingBox (PointTypePtr Pnt)
  * sets the bounding box of a pin or via
  */
 void
-SetPinBoundingBox (PinTypePtr Pin)
+SetPinBoundingBox (PinType *Pin)
 {
   Coord width;
 
@@ -246,7 +246,7 @@ SetPinBoundingBox (PinTypePtr Pin)
  * sets the bounding box of a pad
  */
 void
-SetPadBoundingBox (PadTypePtr Pad)
+SetPadBoundingBox (PadType *Pad)
 {
   Coord width;
   Coord deltax;
@@ -299,7 +299,7 @@ SetPadBoundingBox (PadTypePtr Pad)
  * sets the bounding box of a line
  */
 void
-SetLineBoundingBox (LineTypePtr Line)
+SetLineBoundingBox (LineType *Line)
 {
   Coord width = (Line->Thickness + Line->Clearance + 1) / 2;
 
@@ -319,7 +319,7 @@ SetLineBoundingBox (LineTypePtr Line)
  * sets the bounding box of a polygons
  */
 void
-SetPolygonBoundingBox (PolygonTypePtr Polygon)
+SetPolygonBoundingBox (PolygonType *Polygon)
 {
   Polygon->BoundingBox.X1 = Polygon->BoundingBox.Y1 = MAX_COORD;
   Polygon->BoundingBox.X2 = Polygon->BoundingBox.Y2 = 0;
@@ -339,10 +339,10 @@ SetPolygonBoundingBox (PolygonTypePtr Polygon)
  * sets the bounding box of an elements
  */
 void
-SetElementBoundingBox (DataTypePtr Data, ElementTypePtr Element,
-                       FontTypePtr Font)
+SetElementBoundingBox (DataType *Data, ElementType *Element,
+                       FontType *Font)
 {
-  BoxTypePtr box, vbox;
+  BoxType *box, *vbox;
 
   if (Data && Data->element_tree)
     r_delete_entry (Data->element_tree, (BoxType *) Element);
@@ -488,9 +488,9 @@ SetElementBoundingBox (DataTypePtr Data, ElementTypePtr Element,
  * creates the bounding box of a text object
  */
 void
-SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
+SetTextBoundingBox (FontType *FontPtr, TextType *Text)
 {
-  SymbolTypePtr symbol = FontPtr->Symbol;
+  SymbolType *symbol = FontPtr->Symbol;
   unsigned char *s = (unsigned char *) Text->TextString;
   int i;
   int space;
@@ -518,7 +518,7 @@ SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
     {
       if (*s <= MAX_FONTPOSITION && symbol[*s].Valid)
         {
-          LineTypePtr line = symbol[*s].Line;
+          LineType *line = symbol[*s].Line;
           for (i = 0; i < symbol[*s].LineN; line++, i++)
             {
               /* Clamp the width of text lines at the minimum thickness.
@@ -610,7 +610,7 @@ SetTextBoundingBox (FontTypePtr FontPtr, TextTypePtr Text)
  * returns true if data area is empty
  */
 bool
-IsDataEmpty (DataTypePtr Data)
+IsDataEmpty (DataType *Data)
 {
   bool hasNoObjects;
   Cardinal i;
@@ -636,7 +636,7 @@ FlagIsDataEmpty (int parm)
 /* FLAG(DataNonEmpty,FlagIsDataEmpty,1) */
 
 bool
-IsLayerEmpty (LayerTypePtr layer)
+IsLayerEmpty (LayerType *layer)
 {
   return (layer->LineN == 0
 	  && layer->TextN == 0
@@ -686,7 +686,7 @@ typedef struct
 static int
 hole_counting_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   HoleCountStruct *hcs = (HoleCountStruct *) cl;
   if (TEST_FLAG (HOLEFLAG, pin))
     hcs->nunplated++;
@@ -717,8 +717,8 @@ CountHoles (int *plated, int *unplated, const BoxType *within_area)
  * gets minimum and maximum coordinates
  * returns NULL if layout is empty
  */
-BoxTypePtr
-GetDataBoundingBox (DataTypePtr Data)
+BoxType *
+GetDataBoundingBox (DataType *Data)
 {
   static BoxType box;
   /* FIX ME: use r_search to do this much faster */
@@ -743,7 +743,7 @@ GetDataBoundingBox (DataTypePtr Data)
     box.X2 = MAX (box.X2, element->BoundingBox.X2);
     box.Y2 = MAX (box.Y2, element->BoundingBox.Y2);
     {
-      TextTypePtr text = &NAMEONPCB_TEXT (element);
+      TextType *text = &NAMEONPCB_TEXT (element);
       box.X1 = MIN (box.X1, text->BoundingBox.X1);
       box.Y1 = MIN (box.Y1, text->BoundingBox.Y1);
       box.X2 = MAX (box.X2, text->BoundingBox.X2);
@@ -810,11 +810,11 @@ CenterDisplay (Coord X, Coord Y)
  * 
  */
 void
-SetFontInfo (FontTypePtr Ptr)
+SetFontInfo (FontType *Ptr)
 {
   Cardinal i, j;
-  SymbolTypePtr symbol;
-  LineTypePtr line;
+  SymbolType *symbol;
+  LineType *line;
   Coord totalminy = MAX_COORD;
 
   /* calculate cell with and height (is at least DEFAULT_CELLSIZE)
@@ -915,7 +915,7 @@ make_route_string (RouteStyleType rs[], int n_styles)
  * e.g. Signal,20,40,20,10:Power,40,60,28,10:...
  */
 int
-ParseRouteString (char *s, RouteStyleTypePtr routeStyle, const char *default_unit)
+ParseRouteString (char *s, RouteStyleType *routeStyle, const char *default_unit)
 {
   int i, style;
   char Name[256];
@@ -985,7 +985,7 @@ error:
  * comma separated layer numbers (1,2,b:4,6,8,t)
  */
 int
-ParseGroupString (char *s, LayerGroupTypePtr LayerGroup, int LayerN)
+ParseGroupString (char *s, LayerGroupType *LayerGroup, int LayerN)
 {
   int group, member, layer;
   bool c_set = false,        /* flags for the two special layers to */
@@ -1204,7 +1204,7 @@ ExpandFilename (char *Dirname, char *Filename)
  * returns the layer number for the passed pointer
  */
 int
-GetLayerNumber (DataTypePtr Data, LayerTypePtr Layer)
+GetLayerNumber (DataType *Data, LayerType *Layer)
 {
   int i;
 
@@ -1407,7 +1407,7 @@ GetGroupOfLayer (int Layer)
  * returns the layergroup number for the passed pointer
  */
 int
-GetLayerGroupNumberByPointer (LayerTypePtr Layer)
+GetLayerGroupNumberByPointer (LayerType *Layer)
 {
   return (GetLayerGroupNumberByNumber (GetLayerNumber (PCB->Data, Layer)));
 }
@@ -1435,7 +1435,7 @@ GetLayerGroupNumberByNumber (Cardinal Layer)
  * returns a pointer to an objects bounding box;
  * data is valid until the routine is called again
  */
-BoxTypePtr
+BoxType *
 GetObjectBoundingBox (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   switch (Type)
@@ -1464,7 +1464,7 @@ GetObjectBoundingBox (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
  * computes the bounding box of an arc
  */
 void
-SetArcBoundingBox (ArcTypePtr Arc)
+SetArcBoundingBox (ArcType *Arc)
 {
   double ca1, ca2, sa1, sa2;
   double minx, maxx, miny, maxy;
@@ -1651,7 +1651,7 @@ GetWorkingDirectory (char *path)
  * some special characters are quoted
  */
 void
-CreateQuotedString (DynamicStringTypePtr DS, char *S)
+CreateQuotedString (DynamicStringType *DS, char *S)
 {
   DSClearString (DS);
   DSAddCharacter (DS, '"');
@@ -1664,8 +1664,8 @@ CreateQuotedString (DynamicStringTypePtr DS, char *S)
   DSAddCharacter (DS, '"');
 }
 
-BoxTypePtr
-GetArcEnds (ArcTypePtr Arc)
+BoxType *
+GetArcEnds (ArcType *Arc)
 {
   static BoxType box;
   box.X1 = Arc->X - Arc->Width * cos (Arc->StartAngle * M180);
@@ -1678,7 +1678,7 @@ GetArcEnds (ArcTypePtr Arc)
 
 /* doesn't this belong in change.c ?? */
 void
-ChangeArcAngles (LayerTypePtr Layer, ArcTypePtr a,
+ChangeArcAngles (LayerType *Layer, ArcType *a,
                  Angle new_sa, Angle new_da)
 {
   if (new_da >= 360)
@@ -1687,12 +1687,12 @@ ChangeArcAngles (LayerTypePtr Layer, ArcTypePtr a,
       new_sa = 0;
     }
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, a);
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) a);
+  r_delete_entry (Layer->arc_tree, (BoxType *) a);
   AddObjectToChangeAnglesUndoList (ARC_TYPE, a, a, a);
   a->StartAngle = new_sa;
   a->Delta = new_da;
   SetArcBoundingBox (a);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) a, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) a, 0);
   ClearFromPolygon (PCB->Data, ARC_TYPE, Layer, a);
 }
 
@@ -1728,7 +1728,7 @@ BumpName (char *Name)
  * this can alter the contents of the input string
  */
 char *
-UniqueElementName (DataTypePtr Data, char *Name)
+UniqueElementName (DataType *Data, char *Name)
 {
   bool unique = true;
   /* null strings are ok */
@@ -1762,37 +1762,37 @@ GetGridLockCoordinates (int type, void *ptr1,
   switch (type)
     {
     case VIA_TYPE:
-      *x = ((PinTypePtr) ptr2)->X;
-      *y = ((PinTypePtr) ptr2)->Y;
+      *x = ((PinType *) ptr2)->X;
+      *y = ((PinType *) ptr2)->Y;
       break;
     case LINE_TYPE:
-      *x = ((LineTypePtr) ptr2)->Point1.X;
-      *y = ((LineTypePtr) ptr2)->Point1.Y;
+      *x = ((LineType *) ptr2)->Point1.X;
+      *y = ((LineType *) ptr2)->Point1.Y;
       break;
     case TEXT_TYPE:
     case ELEMENTNAME_TYPE:
-      *x = ((TextTypePtr) ptr2)->X;
-      *y = ((TextTypePtr) ptr2)->Y;
+      *x = ((TextType *) ptr2)->X;
+      *y = ((TextType *) ptr2)->Y;
       break;
     case ELEMENT_TYPE:
-      *x = ((ElementTypePtr) ptr2)->MarkX;
-      *y = ((ElementTypePtr) ptr2)->MarkY;
+      *x = ((ElementType *) ptr2)->MarkX;
+      *y = ((ElementType *) ptr2)->MarkY;
       break;
     case POLYGON_TYPE:
-      *x = ((PolygonTypePtr) ptr2)->Points[0].X;
-      *y = ((PolygonTypePtr) ptr2)->Points[0].Y;
+      *x = ((PolygonType *) ptr2)->Points[0].X;
+      *y = ((PolygonType *) ptr2)->Points[0].Y;
       break;
 
     case LINEPOINT_TYPE:
     case POLYGONPOINT_TYPE:
-      *x = ((PointTypePtr) ptr3)->X;
-      *y = ((PointTypePtr) ptr3)->Y;
+      *x = ((PointType *) ptr3)->X;
+      *y = ((PointType *) ptr3)->Y;
       break;
     case ARC_TYPE:
       {
-        BoxTypePtr box;
+        BoxType *box;
 
-        box = GetArcEnds ((ArcTypePtr) ptr2);
+        box = GetArcEnds ((ArcType *) ptr2);
         *x = box->X1;
         *y = box->Y1;
         break;
@@ -1803,7 +1803,7 @@ GetGridLockCoordinates (int type, void *ptr1,
 void
 AttachForCopy (Coord PlaceX, Coord PlaceY)
 {
-  BoxTypePtr box;
+  BoxType *box;
   Coord mx = 0, my = 0;
 
   Crosshair.AttachedObject.RubberbandN = 0;
@@ -1979,7 +1979,7 @@ MoveLayerToGroup (int layer, int group)
 }
 
 char *
-LayerGroupsToString (LayerGroupTypePtr lg)
+LayerGroupsToString (LayerGroupType *lg)
 {
 #if MAX_LAYER < 9998
   /* Allows for layer numbers 0..9999 */
diff --git a/src/misc.h b/src/misc.h
index 2f34cfe..9ce0905 100644
--- a/src/misc.h
+++ b/src/misc.h
@@ -45,49 +45,49 @@ typedef struct {
 double Distance (double x1, double y1, double x2, double y2);
 Angle  NormalizeAngle (Angle a);
 
-void r_delete_element (DataTypePtr, ElementTypePtr);
-void SetLineBoundingBox (LineTypePtr);
-void SetArcBoundingBox (ArcTypePtr);
-void SetPointBoundingBox (PointTypePtr);
-void SetPinBoundingBox (PinTypePtr);
-void SetPadBoundingBox (PadTypePtr);
-void SetPolygonBoundingBox (PolygonTypePtr);
-void SetElementBoundingBox (DataTypePtr, ElementTypePtr, FontTypePtr);
-bool IsDataEmpty (DataTypePtr);
-bool IsLayerEmpty (LayerTypePtr);
+void r_delete_element (DataType *, ElementType *);
+void SetLineBoundingBox (LineType *);
+void SetArcBoundingBox (ArcType *);
+void SetPointBoundingBox (PointType *);
+void SetPinBoundingBox (PinType *);
+void SetPadBoundingBox (PadType *);
+void SetPolygonBoundingBox (PolygonType *);
+void SetElementBoundingBox (DataType *, ElementType *, FontType *);
+bool IsDataEmpty (DataType *);
+bool IsLayerEmpty (LayerType *);
 bool IsLayerNumEmpty (int);
 bool IsLayerGroupEmpty (int);
 bool IsPasteEmpty (int);
 void CountHoles (int *, int *, const BoxType *);
-BoxTypePtr GetDataBoundingBox (DataTypePtr);
+BoxType * GetDataBoundingBox (DataType *);
 void CenterDisplay (Coord, Coord);
-void SetFontInfo (FontTypePtr);
+void SetFontInfo (FontType *);
 char *make_route_string (RouteStyleType rs[], int n_styles);
-int ParseGroupString (char *, LayerGroupTypePtr, int /* LayerN */);
-int ParseRouteString (char *, RouteStyleTypePtr, const char *);
+int ParseGroupString (char *, LayerGroupType *, int /* LayerN */);
+int ParseRouteString (char *, RouteStyleType *, const char *);
 void QuitApplication (void);
 char *EvaluateFilename (char *, char *, char *, char *);
 char *ExpandFilename (char *, char *);
-void SetTextBoundingBox (FontTypePtr, TextTypePtr);
+void SetTextBoundingBox (FontType *, TextType *);
 
 void SaveOutputWindow (void);
-int GetLayerNumber (DataTypePtr, LayerTypePtr);
-int GetLayerGroupNumberByPointer (LayerTypePtr);
+int GetLayerNumber (DataType *, LayerType *);
+int GetLayerGroupNumberByPointer (LayerType *);
 int GetLayerGroupNumberByNumber (Cardinal);
 int GetGroupOfLayer (int);
 int ChangeGroupVisibility (int, bool, bool);
 void LayerStringToLayerStack (char *);
 
 
-BoxTypePtr GetObjectBoundingBox (int, void *, void *, void *);
+BoxType * GetObjectBoundingBox (int, void *, void *, void *);
 void ResetStackAndVisibility (void);
 void SaveStackAndVisibility (void);
 void RestoreStackAndVisibility (void);
 char *GetWorkingDirectory (char *);
-void CreateQuotedString (DynamicStringTypePtr, char *);
-BoxTypePtr GetArcEnds (ArcTypePtr);
-void ChangeArcAngles (LayerTypePtr, ArcTypePtr, Angle, Angle);
-char *UniqueElementName (DataTypePtr, char *);
+void CreateQuotedString (DynamicStringType *, char *);
+BoxType * GetArcEnds (ArcType *);
+void ChangeArcAngles (LayerType *, ArcType *, Angle, Angle);
+char *UniqueElementName (DataType *, char *);
 void AttachForCopy (Coord, Coord);
 double GetValue (const char *, const char *, bool *);
 double GetValueEx (const char *, const char *, bool *, UnitList, const char *);
@@ -124,7 +124,7 @@ FlagType MaskFlags (FlagType, unsigned int);
 /* Returns group actually moved to (i.e. either group or previous) */
 int MoveLayerToGroup (int layer, int group);
 /* returns pointer to private buffer */
-char *LayerGroupsToString (LayerGroupTypePtr);
+char *LayerGroupsToString (LayerGroupType *);
 /* Make the current layer groups the default.  */
 void MakeLayerGroupsDefault ();
 
diff --git a/src/move.c b/src/move.c
index f1971d5..8f7045d 100644
--- a/src/move.c
+++ b/src/move.c
@@ -59,26 +59,26 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *MoveElementName (ElementTypePtr);
-static void *MoveElement (ElementTypePtr);
-static void *MoveVia (PinTypePtr);
-static void *MoveLine (LayerTypePtr, LineTypePtr);
-static void *MoveArc (LayerTypePtr, ArcTypePtr);
-static void *MoveText (LayerTypePtr, TextTypePtr);
-static void *MovePolygon (LayerTypePtr, PolygonTypePtr);
-static void *MoveLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
-static void *MovePolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *MoveLineToLayer (LayerTypePtr, LineTypePtr);
-static void *MoveArcToLayer (LayerTypePtr, ArcTypePtr);
-static void *MoveRatToLayer (RatTypePtr);
-static void *MoveTextToLayer (LayerTypePtr, TextTypePtr);
-static void *MovePolygonToLayer (LayerTypePtr, PolygonTypePtr);
+static void *MoveElementName (ElementType *);
+static void *MoveElement (ElementType *);
+static void *MoveVia (PinType *);
+static void *MoveLine (LayerType *, LineType *);
+static void *MoveArc (LayerType *, ArcType *);
+static void *MoveText (LayerType *, TextType *);
+static void *MovePolygon (LayerType *, PolygonType *);
+static void *MoveLinePoint (LayerType *, LineType *, PointType *);
+static void *MovePolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *MoveLineToLayer (LayerType *, LineType *);
+static void *MoveArcToLayer (LayerType *, ArcType *);
+static void *MoveRatToLayer (RatType *);
+static void *MoveTextToLayer (LayerType *, TextType *);
+static void *MovePolygonToLayer (LayerType *, PolygonType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
  */
 static Coord DeltaX, DeltaY;	/* used by local routines as offset */
-static LayerTypePtr Dest;
+static LayerType *Dest;
 static bool MoreToCome;
 static ObjectFunctionType MoveFunctions = {
   MoveLine,
@@ -105,7 +105,7 @@ MoveLineToLayer,
  * moves a element by +-X and +-Y
  */
 void
-MoveElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+MoveElementLowLevel (DataType *Data, ElementType *Element,
 		     Coord DX, Coord DY)
 {
   if (Data)
@@ -170,7 +170,7 @@ MoveElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
  * moves all names of an element to a new position
  */
 static void *
-MoveElementName (ElementTypePtr Element)
+MoveElementName (ElementType *Element)
 {
   if (PCB->ElementOn && (FRONT (Element) || PCB->InvisibleObjectsOn))
     {
@@ -206,7 +206,7 @@ MoveElementName (ElementTypePtr Element)
  * moves an element
  */
 static void *
-MoveElement (ElementTypePtr Element)
+MoveElement (ElementType *Element)
 {
   bool didDraw = false;
 
@@ -238,7 +238,7 @@ MoveElement (ElementTypePtr Element)
  * moves a via
  */
 static void *
-MoveVia (PinTypePtr Via)
+MoveVia (PinType *Via)
 {
   r_delete_entry (PCB->Data->via_tree, (BoxType *)Via);
   RestoreToPolygon (PCB->Data, VIA_TYPE, Via, Via);
@@ -259,7 +259,7 @@ MoveVia (PinTypePtr Via)
  * moves a line
  */
 static void *
-MoveLine (LayerTypePtr Layer, LineTypePtr Line)
+MoveLine (LayerType *Layer, LineType *Line)
 {
   if (Layer->On)
     EraseLine (Line);
@@ -280,7 +280,7 @@ MoveLine (LayerTypePtr Layer, LineTypePtr Line)
  * moves an arc
  */
 static void *
-MoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
+MoveArc (LayerType *Layer, ArcType *Arc)
 {
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
   r_delete_entry (Layer->arc_tree, (BoxType *)Arc);
@@ -304,7 +304,7 @@ MoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * moves a text object
  */
 static void *
-MoveText (LayerTypePtr Layer, TextTypePtr Text)
+MoveText (LayerType *Layer, TextType *Text)
 {
   RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
   r_delete_entry (Layer->text_tree, (BoxType *)Text);
@@ -326,7 +326,7 @@ MoveText (LayerTypePtr Layer, TextTypePtr Text)
  * low level routine to move a polygon
  */
 void
-MovePolygonLowLevel (PolygonTypePtr Polygon, Coord DeltaX, Coord DeltaY)
+MovePolygonLowLevel (PolygonType *Polygon, Coord DeltaX, Coord DeltaY)
 {
   POLYGONPOINT_LOOP (Polygon);
   {
@@ -340,7 +340,7 @@ MovePolygonLowLevel (PolygonTypePtr Polygon, Coord DeltaX, Coord DeltaY)
  * moves a polygon
  */
 static void *
-MovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+MovePolygon (LayerType *Layer, PolygonType *Polygon)
 {
   if (Layer->On)
     {
@@ -362,7 +362,7 @@ MovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * moves one end of a line
  */
 static void *
-MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+MoveLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   if (Layer)
     {
@@ -384,14 +384,14 @@ MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
   else				/* must be a rat */
     {
       if (PCB->RatOn)
-	EraseRat ((RatTypePtr) Line);
+	EraseRat ((RatType *) Line);
       r_delete_entry (PCB->Data->rat_tree, &Line->BoundingBox);
       MOVE (Point->X, Point->Y, DeltaX, DeltaY);
       SetLineBoundingBox (Line);
       r_insert_entry (PCB->Data->rat_tree, &Line->BoundingBox, 0);
       if (PCB->RatOn)
 	{
-	  DrawRat ((RatTypePtr) Line);
+	  DrawRat ((RatType *) Line);
 	  Draw ();
 	}
       return (Line);
@@ -402,8 +402,8 @@ MoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * moves a polygon-point
  */
 static void *
-MovePolygonPoint (LayerTypePtr Layer, PolygonTypePtr Polygon,
-		  PointTypePtr Point)
+MovePolygonPoint (LayerType *Layer, PolygonType *Polygon,
+		  PointType *Point)
 {
   if (Layer->On)
     {
@@ -470,7 +470,7 @@ MoveArcToLayerLowLevel (LayerType *Source, ArcType *arc,
 static void *
 MoveArcToLayer (LayerType *Layer, ArcType *Arc)
 {
-  ArcTypePtr newone;
+  ArcType *newone;
 
   if (TEST_FLAG (LOCKFLAG, Arc))
     {
@@ -488,7 +488,7 @@ MoveArcToLayer (LayerType *Layer, ArcType *Arc)
   RestoreToPolygon (PCB->Data, ARC_TYPE, Layer, Arc);
   if (Layer->On)
     EraseArc (Arc);
-  newone = (ArcTypePtr)MoveArcToLayerLowLevel (Layer, Arc, Dest);
+  newone = (ArcType *)MoveArcToLayerLowLevel (Layer, Arc, Dest);
   ClearFromPolygon (PCB->Data, ARC_TYPE, Dest, Arc);
   if (Dest->On)
     DrawArc (Dest, newone);
@@ -502,7 +502,7 @@ MoveArcToLayer (LayerType *Layer, ArcType *Arc)
 static void *
 MoveRatToLayer (RatType *Rat)
 {
-  LineTypePtr newone;
+  LineType *newone;
   //Coord X1 = Rat->Point1.X, Y1 = Rat->Point1.Y;
   //Coord X1 = Rat->Point1.X, Y1 = Rat->Point1.Y;
   // if VIAFLAG
@@ -541,7 +541,7 @@ static int
 moveline_callback (const BoxType * b, void *cl)
 {
   struct via_info *i = (struct via_info *) cl;
-  PinTypePtr via;
+  PinType *via;
 
   if ((via =
        CreateNewVia (PCB->Data, i->X, i->Y,
@@ -560,7 +560,7 @@ MoveLineToLayer (LayerType *Layer, LineType *Line)
 {
   struct via_info info;
   BoxType sb;
-  LineTypePtr newone;
+  LineType *newone;
   void *ptr1, *ptr2, *ptr3;
 
   if (TEST_FLAG (LOCKFLAG, Line))
@@ -580,7 +580,7 @@ MoveLineToLayer (LayerType *Layer, LineType *Line)
   if (Layer->On)
     EraseLine (Line);
   RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
-  newone = (LineTypePtr)MoveLineToLayerLowLevel (Layer, Line, Dest);
+  newone = (LineType *)MoveLineToLayerLowLevel (Layer, Line, Dest);
   Line = NULL;
   ClearFromPolygon (PCB->Data, LINE_TYPE, Dest, newone);
   if (Dest->On)
@@ -705,14 +705,14 @@ struct mptlc
 {
   Cardinal snum, dnum;
   int type;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 } mptlc;
 
 int
 mptl_pin_callback (const BoxType *b, void *cl)
 {
   struct mptlc *d = (struct mptlc *) cl;
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   if (!TEST_THERM (d->snum, pin) || !
 	IsPointInPolygon (pin->X, pin->Y, pin->Thickness + pin->Clearance + 2,
 			  d->polygon))
@@ -732,7 +732,7 @@ mptl_pin_callback (const BoxType *b, void *cl)
 static void *
 MovePolygonToLayer (LayerType *Layer, PolygonType *Polygon)
 {
-  PolygonTypePtr newone;
+  PolygonType *newone;
   struct mptlc d;
 
   if (TEST_FLAG (LOCKFLAG, Polygon))
@@ -787,7 +787,7 @@ void *
 MoveObjectAndRubberband (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			 Coord DX, Coord DY)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   void *ptr2;
 
   /* setup offset */
@@ -827,7 +827,7 @@ MoveObjectAndRubberband (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
  */
 void *
 MoveObjectToLayer (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
-		   LayerTypePtr Target, bool enmasse)
+		   LayerType *Target, bool enmasse)
 {
   void *result;
 
@@ -844,7 +844,7 @@ MoveObjectToLayer (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
  * positions
  */
 bool
-MoveSelectedObjectsToLayer (LayerTypePtr Target)
+MoveSelectedObjectsToLayer (LayerType *Target)
 {
   bool changed;
 
@@ -977,7 +977,7 @@ MoveLayer (int old_index, int new_index)
 
   if (old_index == -1)
     {
-      LayerTypePtr lp;
+      LayerType *lp;
       if (max_copper_layer == MAX_LAYER)
 	{
 	  Message ("No room for new layers\n");
diff --git a/src/move.h b/src/move.h
index 801a5cc..f91602e 100644
--- a/src/move.h
+++ b/src/move.h
@@ -94,13 +94,13 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-void MovePolygonLowLevel (PolygonTypePtr, Coord, Coord);
-void MoveElementLowLevel (DataTypePtr, ElementTypePtr, Coord, Coord);
+void MovePolygonLowLevel (PolygonType *, Coord, Coord);
+void MoveElementLowLevel (DataType *, ElementType *, Coord, Coord);
 void *MoveObject (int, void *, void *, void *, Coord, Coord);
-void *MoveObjectToLayer (int, void *, void *, void *, LayerTypePtr, bool);
+void *MoveObjectToLayer (int, void *, void *, void *, LayerType *, bool);
 void *MoveObjectAndRubberband (int, void *, void *, void *,
 			       Coord, Coord);
-bool MoveSelectedObjectsToLayer (LayerTypePtr);
+bool MoveSelectedObjectsToLayer (LayerType *);
 
 /* index is 0..MAX_LAYER-1.  If old_index is -1, a new layer is
    inserted at that index.  If new_index is -1, the specified layer is
diff --git a/src/mtspace.c b/src/mtspace.c
index 8bb3a8c..3eba55a 100644
--- a/src/mtspace.c
+++ b/src/mtspace.c
@@ -101,7 +101,7 @@ mtspace_create_box (const BoxType * box, Coord keepaway)
   assert (box_is_good (box));
   mtsb = (mtspacebox_t *)malloc (sizeof (*mtsb));
   /* the box was sent to us pre-bloated by the keepaway amount */
-  *((BoxTypePtr) & mtsb->box) = *box;
+  *((BoxType *) & mtsb->box) = *box;
   mtsb->keepaway = keepaway;
   assert (box_is_good (&mtsb->box));
   return mtsb;
@@ -347,7 +347,7 @@ qloop (struct query_closure *qc, rtree_t * tree, heap_or_vector res, bool is_vec
 #endif
   while (!(qc->desired ? heap_is_empty (qc->checking.h) : vector_is_empty (qc->checking.v)))
     {
-      cbox = qc->desired ? (BoxTypePtr)heap_remove_smallest (qc->checking.h) : (BoxTypePtr)vector_remove_last (qc->checking.v);
+      cbox = qc->desired ? (BoxType *)heap_remove_smallest (qc->checking.h) : (BoxType *)vector_remove_last (qc->checking.v);
       if (setjmp (qc->env) == 0)
 	{
 	  assert (box_is_good (cbox));
diff --git a/src/mymem.c b/src/mymem.c
index c79e068..3de31f6 100644
--- a/src/mymem.c
+++ b/src/mymem.c
@@ -50,7 +50,7 @@
 /* ---------------------------------------------------------------------------
  * local prototypes
  */
-static void DSRealloc (DynamicStringTypePtr, size_t);
+static void DSRealloc (DynamicStringType *, size_t);
 
 
 /* This API is quite new, provide a version here */
@@ -66,17 +66,17 @@ g_list_free_full (GList *list, GDestroyNotify free_func)
 /* ---------------------------------------------------------------------------
  * get next slot for a rubberband connection, allocates memory if necessary
  */
-RubberbandTypePtr
+RubberbandType *
 GetRubberbandMemory (void)
 {
-  RubberbandTypePtr ptr = Crosshair.AttachedObject.Rubberband;
+  RubberbandType *ptr = Crosshair.AttachedObject.Rubberband;
 
   /* realloc new memory if necessary and clear it */
   if (Crosshair.AttachedObject.RubberbandN >=
       Crosshair.AttachedObject.RubberbandMax)
     {
       Crosshair.AttachedObject.RubberbandMax += STEP_RUBBERBAND;
-      ptr = (RubberbandTypePtr)realloc (ptr, Crosshair.AttachedObject.RubberbandMax *
+      ptr = (RubberbandType *)realloc (ptr, Crosshair.AttachedObject.RubberbandMax *
                           sizeof (RubberbandType));
       Crosshair.AttachedObject.Rubberband = ptr;
       memset (ptr + Crosshair.AttachedObject.RubberbandN, 0,
@@ -86,7 +86,7 @@ GetRubberbandMemory (void)
 }
 
 void **
-GetPointerMemory (PointerListTypePtr list)
+GetPointerMemory (PointerListType *list)
 {
   void **ptr = list->Ptr;
 
@@ -103,7 +103,7 @@ GetPointerMemory (PointerListTypePtr list)
 }
 
 void
-FreePointerListMemory (PointerListTypePtr list)
+FreePointerListMemory (PointerListType *list)
 {
   free (list->Ptr);
   memset (list, 0, sizeof (PointerListType));
@@ -112,16 +112,16 @@ FreePointerListMemory (PointerListTypePtr list)
 /* ---------------------------------------------------------------------------
  * get next slot for a box, allocates memory if necessary
  */
-BoxTypePtr
-GetBoxMemory (BoxListTypePtr Boxes)
+BoxType *
+GetBoxMemory (BoxListType *Boxes)
 {
-  BoxTypePtr box = Boxes->Box;
+  BoxType *box = Boxes->Box;
 
   /* realloc new memory if necessary and clear it */
   if (Boxes->BoxN >= Boxes->BoxMax)
     {
       Boxes->BoxMax = STEP_POINT + (2 * Boxes->BoxMax);
-      box = (BoxTypePtr)realloc (box, Boxes->BoxMax * sizeof (BoxType));
+      box = (BoxType *)realloc (box, Boxes->BoxMax * sizeof (BoxType));
       Boxes->Box = box;
       memset (box + Boxes->BoxN, 0,
 	      (Boxes->BoxMax - Boxes->BoxN) * sizeof (BoxType));
@@ -133,16 +133,16 @@ GetBoxMemory (BoxListTypePtr Boxes)
 /* ---------------------------------------------------------------------------
  * get next slot for a connection, allocates memory if necessary
  */
-ConnectionTypePtr
-GetConnectionMemory (NetTypePtr Net)
+ConnectionType *
+GetConnectionMemory (NetType *Net)
 {
-  ConnectionTypePtr con = Net->Connection;
+  ConnectionType *con = Net->Connection;
 
   /* realloc new memory if necessary and clear it */
   if (Net->ConnectionN >= Net->ConnectionMax)
     {
       Net->ConnectionMax += STEP_POINT;
-      con = (ConnectionTypePtr)realloc (con, Net->ConnectionMax * sizeof (ConnectionType));
+      con = (ConnectionType *)realloc (con, Net->ConnectionMax * sizeof (ConnectionType));
       Net->Connection = con;
       memset (con + Net->ConnectionN, 0,
 	      STEP_POINT * sizeof (ConnectionType));
@@ -153,16 +153,16 @@ GetConnectionMemory (NetTypePtr Net)
 /* ---------------------------------------------------------------------------
  * get next slot for a subnet, allocates memory if necessary
  */
-NetTypePtr
-GetNetMemory (NetListTypePtr Netlist)
+NetType *
+GetNetMemory (NetListType *Netlist)
 {
-  NetTypePtr net = Netlist->Net;
+  NetType *net = Netlist->Net;
 
   /* realloc new memory if necessary and clear it */
   if (Netlist->NetN >= Netlist->NetMax)
     {
       Netlist->NetMax += STEP_POINT;
-      net = (NetTypePtr)realloc (net, Netlist->NetMax * sizeof (NetType));
+      net = (NetType *)realloc (net, Netlist->NetMax * sizeof (NetType));
       Netlist->Net = net;
       memset (net + Netlist->NetN, 0, STEP_POINT * sizeof (NetType));
     }
@@ -172,16 +172,16 @@ GetNetMemory (NetListTypePtr Netlist)
 /* ---------------------------------------------------------------------------
  * get next slot for a net list, allocates memory if necessary
  */
-NetListTypePtr
-GetNetListMemory (NetListListTypePtr Netlistlist)
+NetListType *
+GetNetListMemory (NetListListType *Netlistlist)
 {
-  NetListTypePtr netlist = Netlistlist->NetList;
+  NetListType *netlist = Netlistlist->NetList;
 
   /* realloc new memory if necessary and clear it */
   if (Netlistlist->NetListN >= Netlistlist->NetListMax)
     {
       Netlistlist->NetListMax += STEP_POINT;
-      netlist = (NetListTypePtr)realloc (netlist,
+      netlist = (NetListType *)realloc (netlist,
                          Netlistlist->NetListMax * sizeof (NetListType));
       Netlistlist->NetList = netlist;
       memset (netlist + Netlistlist->NetListN, 0,
@@ -297,7 +297,7 @@ FreeLine (LineType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for an arc, allocates memory if necessary
  */
-ArcTypePtr
+ArcType *
 GetArcMemory (LayerType *layer)
 {
   ArcType *new_obj;
@@ -318,7 +318,7 @@ FreeArc (ArcType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for a text object, allocates memory if necessary
  */
-TextTypePtr
+TextType *
 GetTextMemory (LayerType *layer)
 {
   TextType *new_obj;
@@ -361,16 +361,16 @@ FreePolygon (PolygonType *data)
  * gets the next slot for a point in a polygon struct, allocates memory
  * if necessary
  */
-PointTypePtr
-GetPointMemoryInPolygon (PolygonTypePtr Polygon)
+PointType *
+GetPointMemoryInPolygon (PolygonType *Polygon)
 {
-  PointTypePtr points = Polygon->Points;
+  PointType *points = Polygon->Points;
 
   /* realloc new memory if necessary and clear it */
   if (Polygon->PointN >= Polygon->PointMax)
     {
       Polygon->PointMax += STEP_POLYGONPOINT;
-      points = (PointTypePtr)realloc (points, Polygon->PointMax * sizeof (PointType));
+      points = (PointType *)realloc (points, Polygon->PointMax * sizeof (PointType));
       Polygon->Points = points;
       memset (points + Polygon->PointN, 0,
 	      STEP_POLYGONPOINT * sizeof (PointType));
@@ -383,7 +383,7 @@ GetPointMemoryInPolygon (PolygonTypePtr Polygon)
  * if necessary
  */
 Cardinal *
-GetHoleIndexMemoryInPolygon (PolygonTypePtr Polygon)
+GetHoleIndexMemoryInPolygon (PolygonType *Polygon)
 {
   Cardinal *holeindex = Polygon->HoleIndex;
 
@@ -423,16 +423,16 @@ FreeElement (ElementType *data)
 /* ---------------------------------------------------------------------------
  * get next slot for a library menu, allocates memory if necessary
  */
-LibraryMenuTypePtr
-GetLibraryMenuMemory (LibraryTypePtr lib)
+LibraryMenuType *
+GetLibraryMenuMemory (LibraryType *lib)
 {
-  LibraryMenuTypePtr menu = lib->Menu;
+  LibraryMenuType *menu = lib->Menu;
 
   /* realloc new memory if necessary and clear it */
   if (lib->MenuN >= lib->MenuMax)
     {
       lib->MenuMax += STEP_LIBRARYMENU;
-      menu = (LibraryMenuTypePtr)realloc (menu, lib->MenuMax * sizeof (LibraryMenuType));
+      menu = (LibraryMenuType *)realloc (menu, lib->MenuMax * sizeof (LibraryMenuType));
       lib->Menu = menu;
       memset (menu + lib->MenuN, 0,
 	      STEP_LIBRARYMENU * sizeof (LibraryMenuType));
@@ -443,16 +443,16 @@ GetLibraryMenuMemory (LibraryTypePtr lib)
 /* ---------------------------------------------------------------------------
  * get next slot for a library entry, allocates memory if necessary
  */
-LibraryEntryTypePtr
-GetLibraryEntryMemory (LibraryMenuTypePtr Menu)
+LibraryEntryType *
+GetLibraryEntryMemory (LibraryMenuType *Menu)
 {
-  LibraryEntryTypePtr entry = Menu->Entry;
+  LibraryEntryType *entry = Menu->Entry;
 
   /* realloc new memory if necessary and clear it */
   if (Menu->EntryN >= Menu->EntryMax)
     {
       Menu->EntryMax += STEP_LIBRARYENTRY;
-      entry = (LibraryEntryTypePtr)realloc (entry, Menu->EntryMax * sizeof (LibraryEntryType));
+      entry = (LibraryEntryType *)realloc (entry, Menu->EntryMax * sizeof (LibraryEntryType));
       Menu->Entry = entry;
       memset (entry + Menu->EntryN, 0,
 	      STEP_LIBRARYENTRY * sizeof (LibraryEntryType));
@@ -463,10 +463,10 @@ GetLibraryEntryMemory (LibraryMenuTypePtr Menu)
 /* ---------------------------------------------------------------------------
  * get next slot for a DrillElement, allocates memory if necessary
  */
-ElementTypeHandle
-GetDrillElementMemory (DrillTypePtr Drill)
+ElementType **
+GetDrillElementMemory (DrillType *Drill)
 {
-  ElementTypePtr *element;
+  ElementType **element;
 
   element = Drill->Element;
 
@@ -474,11 +474,11 @@ GetDrillElementMemory (DrillTypePtr Drill)
   if (Drill->ElementN >= Drill->ElementMax)
     {
       Drill->ElementMax += STEP_ELEMENT;
-      element = (ElementTypePtr *)realloc (element,
-                         Drill->ElementMax * sizeof (ElementTypePtr));
+      element = (ElementType **)realloc (element,
+                         Drill->ElementMax * sizeof (ElementType *));
       Drill->Element = element;
       memset (element + Drill->ElementN, 0,
-	      STEP_ELEMENT * sizeof (ElementTypePtr));
+	      STEP_ELEMENT * sizeof (ElementType *));
     }
   return (element + Drill->ElementN++);
 }
@@ -486,10 +486,10 @@ GetDrillElementMemory (DrillTypePtr Drill)
 /* ---------------------------------------------------------------------------
  * get next slot for a DrillPoint, allocates memory if necessary
  */
-PinTypeHandle
-GetDrillPinMemory (DrillTypePtr Drill)
+PinType **
+GetDrillPinMemory (DrillType *Drill)
 {
-  PinTypePtr *pin;
+  PinType **pin;
 
   pin = Drill->Pin;
 
@@ -497,9 +497,9 @@ GetDrillPinMemory (DrillTypePtr Drill)
   if (Drill->PinN >= Drill->PinMax)
     {
       Drill->PinMax += STEP_POINT;
-      pin = (PinTypePtr *)realloc (pin, Drill->PinMax * sizeof (PinTypePtr));
+      pin = (PinType **)realloc (pin, Drill->PinMax * sizeof (PinType *));
       Drill->Pin = pin;
-      memset (pin + Drill->PinN, 0, STEP_POINT * sizeof (PinTypePtr));
+      memset (pin + Drill->PinN, 0, STEP_POINT * sizeof (PinType *));
     }
   return (pin + Drill->PinN++);
 }
@@ -507,16 +507,16 @@ GetDrillPinMemory (DrillTypePtr Drill)
 /* ---------------------------------------------------------------------------
  * get next slot for a Drill, allocates memory if necessary
  */
-DrillTypePtr
-GetDrillInfoDrillMemory (DrillInfoTypePtr DrillInfo)
+DrillType *
+GetDrillInfoDrillMemory (DrillInfoType *DrillInfo)
 {
-  DrillTypePtr drill = DrillInfo->Drill;
+  DrillType *drill = DrillInfo->Drill;
 
   /* realloc new memory if necessary and clear it */
   if (DrillInfo->DrillN >= DrillInfo->DrillMax)
     {
       DrillInfo->DrillMax += STEP_DRILL;
-      drill = (DrillTypePtr)realloc (drill, DrillInfo->DrillMax * sizeof (DrillType));
+      drill = (DrillType *)realloc (drill, DrillInfo->DrillMax * sizeof (DrillType));
       DrillInfo->Drill = drill;
       memset (drill + DrillInfo->DrillN, 0, STEP_DRILL * sizeof (DrillType));
     }
@@ -546,7 +546,7 @@ FreePolygonMemory (PolygonType *polygon)
  * frees memory used by a box list
  */
 void
-FreeBoxListMemory (BoxListTypePtr Boxlist)
+FreeBoxListMemory (BoxListType *Boxlist)
 {
   if (Boxlist)
     {
@@ -559,7 +559,7 @@ FreeBoxListMemory (BoxListTypePtr Boxlist)
  * frees memory used by a net 
  */
 void
-FreeNetListMemory (NetListTypePtr Netlist)
+FreeNetListMemory (NetListType *Netlist)
 {
   if (Netlist)
     {
@@ -577,7 +577,7 @@ FreeNetListMemory (NetListTypePtr Netlist)
  * frees memory used by a net list
  */
 void
-FreeNetListListMemory (NetListListTypePtr Netlistlist)
+FreeNetListListMemory (NetListListType *Netlistlist)
 {
   if (Netlistlist)
     {
@@ -595,7 +595,7 @@ FreeNetListListMemory (NetListListTypePtr Netlistlist)
  * frees memory used by a subnet 
  */
 void
-FreeNetMemory (NetTypePtr Net)
+FreeNetMemory (NetType *Net)
 {
   if (Net)
     {
@@ -607,7 +607,7 @@ FreeNetMemory (NetTypePtr Net)
  * frees memory used by an attribute list
  */
 static void
-FreeAttributeListMemory (AttributeListTypePtr list)
+FreeAttributeListMemory (AttributeListType *list)
 {
   int i;
 
@@ -689,7 +689,7 @@ FreePCBMemory (PCBType *pcb)
 void
 FreeDataMemory (DataType *data)
 {
-  LayerTypePtr layer;
+  LayerType *layer;
   int i;
 
   if (data == NULL)
@@ -765,7 +765,7 @@ FreeDataMemory (DataType *data)
  * releases the memory that's allocated by the library
  */
 void
-FreeLibraryMemory (LibraryTypePtr lib)
+FreeLibraryMemory (LibraryType *lib)
 {
   MENU_LOOP (lib);
   {
@@ -789,7 +789,7 @@ FreeLibraryMemory (LibraryTypePtr lib)
  * reallocates memory for a dynamic length string if necessary
  */
 static void
-DSRealloc (DynamicStringTypePtr Ptr, size_t Length)
+DSRealloc (DynamicStringType *Ptr, size_t Length)
 {
   int input_null = (Ptr->Data == NULL);
   if (input_null || Length >= Ptr->MaxLength)
@@ -805,7 +805,7 @@ DSRealloc (DynamicStringTypePtr Ptr, size_t Length)
  * adds one character to a dynamic string
  */
 void
-DSAddCharacter (DynamicStringTypePtr Ptr, char Char)
+DSAddCharacter (DynamicStringType *Ptr, char Char)
 {
   size_t position = Ptr->Data ? strlen (Ptr->Data) : 0;
 
@@ -818,7 +818,7 @@ DSAddCharacter (DynamicStringTypePtr Ptr, char Char)
  * add a string to a dynamic string
  */
 void
-DSAddString (DynamicStringTypePtr Ptr, const char *S)
+DSAddString (DynamicStringType *Ptr, const char *S)
 {
   size_t position = Ptr->Data ? strlen (Ptr->Data) : 0;
 
@@ -833,7 +833,7 @@ DSAddString (DynamicStringTypePtr Ptr, const char *S)
  * clears a dynamic string
  */
 void
-DSClearString (DynamicStringTypePtr Ptr)
+DSClearString (DynamicStringType *Ptr)
 {
   if (Ptr->Data)
     Ptr->Data[0] = '\0';
diff --git a/src/mymem.h b/src/mymem.h
index 88c5628..71c0a84 100644
--- a/src/mymem.h
+++ b/src/mymem.h
@@ -64,41 +64,41 @@ typedef struct
   char *Data;
 } DynamicStringType, *DynamicStringTypePtr;
 
-RubberbandTypePtr GetRubberbandMemory (void);
-PinTypePtr GetPinMemory (ElementTypePtr);
-PadTypePtr GetPadMemory (ElementTypePtr);
-PinTypePtr GetViaMemory (DataTypePtr);
-LineTypePtr GetLineMemory (LayerTypePtr);
-ArcTypePtr GetArcMemory (LayerTypePtr);
-RatTypePtr GetRatMemory (DataTypePtr);
-TextTypePtr GetTextMemory (LayerTypePtr);
-PolygonTypePtr GetPolygonMemory (LayerTypePtr);
-PointTypePtr GetPointMemoryInPolygon (PolygonTypePtr);
-Cardinal *GetHoleIndexMemoryInPolygon (PolygonTypePtr);
-ElementTypePtr GetElementMemory (DataTypePtr);
-BoxTypePtr GetBoxMemory (BoxListTypePtr);
-ConnectionTypePtr GetConnectionMemory (NetTypePtr);
-NetTypePtr GetNetMemory (NetListTypePtr);
-NetListTypePtr GetNetListMemory (NetListListTypePtr);
-LibraryMenuTypePtr GetLibraryMenuMemory (LibraryTypePtr);
-LibraryEntryTypePtr GetLibraryEntryMemory (LibraryMenuTypePtr);
-ElementTypeHandle GetDrillElementMemory (DrillTypePtr);
-PinTypeHandle GetDrillPinMemory (DrillTypePtr);
-DrillTypePtr GetDrillInfoDrillMemory (DrillInfoTypePtr);
-void **GetPointerMemory (PointerListTypePtr);
-void FreePolygonMemory (PolygonTypePtr);
-void FreeElementMemory (ElementTypePtr);
-void FreePCBMemory (PCBTypePtr);
-void FreeBoxListMemory (BoxListTypePtr);
-void FreeNetListListMemory (NetListListTypePtr);
-void FreeNetListMemory (NetListTypePtr);
-void FreeNetMemory (NetTypePtr);
-void FreeDataMemory (DataTypePtr);
-void FreeLibraryMemory (LibraryTypePtr);
-void FreePointerListMemory (PointerListTypePtr);
-void DSAddCharacter (DynamicStringTypePtr, char);
-void DSAddString (DynamicStringTypePtr, const char *);
-void DSClearString (DynamicStringTypePtr);
+RubberbandType * GetRubberbandMemory (void);
+PinType * GetPinMemory (ElementType *);
+PadType * GetPadMemory (ElementType *);
+PinType * GetViaMemory (DataType *);
+LineType * GetLineMemory (LayerType *);
+ArcType * GetArcMemory (LayerType *);
+RatType * GetRatMemory (DataType *);
+TextType * GetTextMemory (LayerType *);
+PolygonType * GetPolygonMemory (LayerType *);
+PointType * GetPointMemoryInPolygon (PolygonType *);
+Cardinal *GetHoleIndexMemoryInPolygon (PolygonType *);
+ElementType * GetElementMemory (DataType *);
+BoxType * GetBoxMemory (BoxListType *);
+ConnectionType * GetConnectionMemory (NetType *);
+NetType * GetNetMemory (NetListType *);
+NetListType * GetNetListMemory (NetListListType *);
+LibraryMenuType * GetLibraryMenuMemory (LibraryType *);
+LibraryEntryType * GetLibraryEntryMemory (LibraryMenuType *);
+ElementType **GetDrillElementMemory (DrillType *);
+PinType ** GetDrillPinMemory (DrillType *);
+DrillType * GetDrillInfoDrillMemory (DrillInfoType *);
+void **GetPointerMemory (PointerListType *);
+void FreePolygonMemory (PolygonType *);
+void FreeElementMemory (ElementType *);
+void FreePCBMemory (PCBType *);
+void FreeBoxListMemory (BoxListType *);
+void FreeNetListListMemory (NetListListType *);
+void FreeNetListMemory (NetListType *);
+void FreeNetMemory (NetType *);
+void FreeDataMemory (DataType *);
+void FreeLibraryMemory (LibraryType *);
+void FreePointerListMemory (PointerListType *);
+void DSAddCharacter (DynamicStringType *, char);
+void DSAddString (DynamicStringType *, const char *);
+void DSClearString (DynamicStringType *);
 char *StripWhiteSpaceAndDup (const char *);
 
 #ifdef NEED_STRDUP
diff --git a/src/netlist.c b/src/netlist.c
index f467f52..d47f7d2 100644
--- a/src/netlist.c
+++ b/src/netlist.c
@@ -99,7 +99,7 @@ NetlistChanged (int force_unfreeze)
     }
 }
 
-LibraryMenuTypePtr
+LibraryMenuType *
 netnode_to_netname (char *nodename)
 {
   int i, j;
@@ -118,7 +118,7 @@ netnode_to_netname (char *nodename)
   return 0;
 }
 
-LibraryMenuTypePtr
+LibraryMenuType *
 netname_to_netname (char *netname)
 {
   int i;
diff --git a/src/parse_l.h b/src/parse_l.h
index dfeed70..d11b0c8 100644
--- a/src/parse_l.h
+++ b/src/parse_l.h
@@ -32,9 +32,9 @@
 
 #include "global.h"
 
-int ParsePCB (PCBTypePtr, char *);
-int ParseElementFile (DataTypePtr, char *);
-int ParseLibraryEntry (DataTypePtr, char *);
-int ParseFont (FontTypePtr, char *);
+int ParsePCB (PCBType *, char *);
+int ParseElementFile (DataType *, char *);
+int ParseLibraryEntry (DataType *, char *);
+int ParseFont (FontType *, char *);
 
 #endif
diff --git a/src/parse_l.l b/src/parse_l.l
index c0ec6a7..882fd2c 100644
--- a/src/parse_l.l
+++ b/src/parse_l.l
@@ -69,10 +69,10 @@
 #endif
 
 char			*yyfilename;	/* in this file */
-PCBTypePtr		yyPCB;			/* used by parser */
-DataTypePtr		yyData;
-ElementTypePtr		yyElement;
-FontTypePtr		yyFont;
+PCBType			*yyPCB;		/* used by parser */
+DataType		*yyData;
+ElementType		*yyElement;
+FontType		*yyFont;
 
 static int parse_number (void);
 
@@ -293,7 +293,8 @@ static int Parse(char *Executable, char *Path, char *Filename, char *Parameter)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single element file
  */
-int ParseElementFile(DataTypePtr Ptr, char *Filename)
+int
+ParseElementFile (DataType *Ptr, char *Filename)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -305,7 +306,8 @@ int ParseElementFile(DataTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a single library entry
  */
-int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
+int
+ParseLibraryEntry (DataType *Ptr, char *Template)
 {
 	yyPCB = NULL;
 	yyData = Ptr;
@@ -318,7 +320,8 @@ int ParseLibraryEntry(DataTypePtr Ptr, char *Template)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a complete board
  */
-int ParsePCB(PCBTypePtr Ptr, char *Filename)
+int
+ParsePCB (PCBType *Ptr, char *Filename)
 {
 	yyPCB = Ptr;
 	yyData = NULL;
@@ -330,7 +333,8 @@ int ParsePCB(PCBTypePtr Ptr, char *Filename)
 /* ---------------------------------------------------------------------------
  * initializes LEX and calls parser for a font
  */
-int ParseFont(FontTypePtr Ptr, char *Filename)
+int
+ParseFont (FontType *Ptr, char *Filename)
 {
 	int r = 0;
 	char *path, *p;
diff --git a/src/parse_y.y b/src/parse_y.y
index adc2387..2ae9f6c 100644
--- a/src/parse_y.y
+++ b/src/parse_y.y
@@ -59,24 +59,24 @@
 # include <dmalloc.h> /* see http://dmalloc.com */
 #endif
 
-static	LayerTypePtr	Layer;
-static	PolygonTypePtr	Polygon;
-static	SymbolTypePtr	Symbol;
+static	LayerType	*Layer;
+static	PolygonType	*Polygon;
+static	SymbolType	*Symbol;
 static	int		pin_num;
-static	LibraryMenuTypePtr	Menu;
+static	LibraryMenuType	*Menu;
 static	bool			LayerFlag[MAX_LAYER + 2];
 
-extern	char			*yytext;		/* defined by LEX */
-extern	PCBTypePtr		yyPCB;
-extern	DataTypePtr		yyData;
-extern	ElementTypePtr	yyElement;
-extern	FontTypePtr		yyFont;
-extern	int				yylineno;		/* linenumber */
-extern	char			*yyfilename;	/* in this file */
+extern	char		*yytext;		/* defined by LEX */
+extern	PCBType		*yyPCB;
+extern	DataType	*yyData;
+extern	ElementType	*yyElement;
+extern	FontType	*yyFont;
+extern	int		yylineno;		/* linenumber */
+extern	char		*yyfilename;	/* in this file */
 
 static char *layer_group_string; 
 
-static AttributeListTypePtr attr_list; 
+static AttributeListType *attr_list; 
 
 int yyerror(const char *s);
 int yylex();
@@ -191,7 +191,7 @@ parsepcb
 		  pcbdata
 		  pcbnetlist
 			{
-			  PCBTypePtr pcb_save = PCB;
+			  PCBType *pcb_save = PCB;
 
 			  if (layer_group_string == NULL)
 			    layer_group_string = Settings.Groups;
@@ -1062,7 +1062,7 @@ text_newformat
 			{
 				if ($8 & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(($8 & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay ,yyFont, OU ($3), OU ($4), $5, $6, $7,
@@ -1087,7 +1087,7 @@ text_hi_format
 				 */
 				if ($8.f & ONSILKFLAG)
 				{
-					LayerTypePtr lay = &yyData->Layer[yyData->LayerN +
+					LayerType *lay = &yyData->Layer[yyData->LayerN +
 						(($8.f & ONSOLDERFLAG) ? SOLDER_LAYER : COMPONENT_LAYER)];
 
 					CreateNewText(lay, yyFont, NU ($3), NU ($4), $5, $6, $7, $8);
diff --git a/src/polygon.c b/src/polygon.c
index 1114e33..2d3e9e4 100644
--- a/src/polygon.c
+++ b/src/polygon.c
@@ -122,7 +122,7 @@ polygon_init (void)
 }
 
 Cardinal
-polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point)
+polygon_point_idx (PolygonType *polygon, PointType *point)
 {
   assert (point >= polygon->Points);
   assert (point <= polygon->Points + polygon->PointN);
@@ -131,7 +131,7 @@ polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point)
 
 /* Find contour number: 0 for outer, 1 for first hole etc.. */
 Cardinal
-polygon_point_contour (PolygonTypePtr polygon, Cardinal point)
+polygon_point_contour (PolygonType *polygon, Cardinal point)
 {
   Cardinal i;
   Cardinal contour = 0;
@@ -143,7 +143,7 @@ polygon_point_contour (PolygonTypePtr polygon, Cardinal point)
 }
 
 Cardinal
-next_contour_point (PolygonTypePtr polygon, Cardinal point)
+next_contour_point (PolygonType *polygon, Cardinal point)
 {
   Cardinal contour;
   Cardinal this_contour_start;
@@ -165,7 +165,7 @@ next_contour_point (PolygonTypePtr polygon, Cardinal point)
 }
 
 Cardinal
-prev_contour_point (PolygonTypePtr polygon, Cardinal point)
+prev_contour_point (PolygonType *polygon, Cardinal point)
 {
   Cardinal contour;
   Cardinal prev_contour_end;
@@ -794,7 +794,7 @@ SubtractPin (DataType * d, PinType * pin, LayerType * l, PolygonType * p)
   i = GetLayerNumber (d, l);
   if (TEST_THERM (i, pin))
     {
-      np = ThermPoly ((PCBTypePtr) (d->pcb), pin, i);
+      np = ThermPoly ((PCBType *) (d->pcb), pin, i);
       if (!np)
         return 0;
     }
@@ -880,7 +880,7 @@ struct cpInfo
 };
 
 static void
-subtract_accumulated (struct cpInfo *info, PolygonTypePtr polygon)
+subtract_accumulated (struct cpInfo *info, PolygonType *polygon)
 {
   if (info->accumulate == NULL)
     return;
@@ -892,9 +892,9 @@ subtract_accumulated (struct cpInfo *info, PolygonTypePtr polygon)
 static int
 pin_sub_callback (const BoxType * b, void *cl)
 {
-  PinTypePtr pin = (PinTypePtr) b;
+  PinType *pin = (PinType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   POLYAREA *np;
   POLYAREA *merged;
   Cardinal i;
@@ -909,7 +909,7 @@ pin_sub_callback (const BoxType * b, void *cl)
   i = GetLayerNumber (info->data, info->layer);
   if (TEST_THERM (i, pin))
     {
-      np = ThermPoly ((PCBTypePtr) (info->data->pcb), pin, i);
+      np = ThermPoly ((PCBType *) (info->data->pcb), pin, i);
       if (!np)
         return 1;
     }
@@ -934,9 +934,9 @@ pin_sub_callback (const BoxType * b, void *cl)
 static int
 arc_sub_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -952,9 +952,9 @@ arc_sub_callback (const BoxType * b, void *cl)
 static int
 pad_sub_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -974,9 +974,9 @@ pad_sub_callback (const BoxType * b, void *cl)
 static int
 line_sub_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   POLYAREA *np;
   POLYAREA *merged;
 
@@ -1003,9 +1003,9 @@ line_sub_callback (const BoxType * b, void *cl)
 static int
 text_sub_callback (const BoxType * b, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) b;
+  TextType *text = (TextType *) b;
   struct cpInfo *info = (struct cpInfo *) cl;
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
 
   /* don't subtract the object that was put back! */
   if (b == info->other)
@@ -1019,7 +1019,7 @@ text_sub_callback (const BoxType * b, void *cl)
 }
 
 static int
-Group (DataTypePtr Data, Cardinal layer)
+Group (DataType *Data, Cardinal layer)
 {
   Cardinal i, j;
   for (i = 0; i < max_group; i++)
@@ -1030,7 +1030,7 @@ Group (DataTypePtr Data, Cardinal layer)
 }
 
 static int
-clearPoly (DataTypePtr Data, LayerTypePtr Layer, PolygonType * polygon,
+clearPoly (DataType *Data, LayerType *Layer, PolygonType * polygon,
            const BoxType * here, Coord expand)
 {
   int r = 0;
@@ -1209,7 +1209,7 @@ UnsubtractPad (PadType * pad, LayerType * l, PolygonType * p)
 static bool inhibit = false;
 
 int
-InitClip (DataTypePtr Data, LayerTypePtr layer, PolygonType * p)
+InitClip (DataType *Data, LayerType *layer, PolygonType * p)
 {
   if (inhibit)
     return 0;
@@ -1233,9 +1233,9 @@ InitClip (DataTypePtr Data, LayerTypePtr layer, PolygonType * p)
  * returns true if any points are removed
  */
 bool
-RemoveExcessPolygonPoints (LayerTypePtr Layer, PolygonTypePtr Polygon)
+RemoveExcessPolygonPoints (LayerType *Layer, PolygonType *Polygon)
 {
-  PointTypePtr p;
+  PointType *p;
   Cardinal n, prev, next;
   LineType line;
   bool changed = false;
@@ -1267,10 +1267,10 @@ RemoveExcessPolygonPoints (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * coordinates
  */
 Cardinal
-GetLowestDistancePolygonPoint (PolygonTypePtr Polygon, Coord X, Coord Y)
+GetLowestDistancePolygonPoint (PolygonType *Polygon, Coord X, Coord Y)
 {
   double mindistance = (double) MAX_COORD * MAX_COORD;
-  PointTypePtr ptr1, ptr2;
+  PointType *ptr1, *ptr2;
   Cardinal n, result = 0;
 
   /* we calculate the distance to each segment and choose the
@@ -1338,7 +1338,7 @@ GoToPreviousPoint (void)
       /* back-up one point */
     default:
       {
-        PointTypePtr points = Crosshair.AttachedPolygon.Points;
+        PointType *points = Crosshair.AttachedPolygon.Points;
         Cardinal n = Crosshair.AttachedPolygon.PointN - 2;
 
         Crosshair.AttachedPolygon.PointN--;
@@ -1392,7 +1392,7 @@ ClosePolygon (void)
 void
 CopyAttachedPolygonToLayer (void)
 {
-  PolygonTypePtr polygon;
+  PolygonType *polygon;
   int saveID;
 
   /* move data to layer and clear attached struct */
@@ -1455,14 +1455,14 @@ struct plow_info
 {
   int type;
   void *ptr1, *ptr2;
-  LayerTypePtr layer;
-  DataTypePtr data;
-  int (*callback) (DataTypePtr, LayerTypePtr, PolygonTypePtr, int, void *,
+  LayerType *layer;
+  DataType *data;
+  int (*callback) (DataType *, LayerType *, PolygonType *, int, void *,
                    void *);
 };
 
 static int
-subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
+subtract_plow (DataType *Data, LayerType *Layer, PolygonType *Polygon,
                int type, void *ptr1, void *ptr2)
 {
   if (!Polygon->Clipped)
@@ -1471,23 +1471,23 @@ subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
     {
     case PIN_TYPE:
     case VIA_TYPE:
-      SubtractPin (Data, (PinTypePtr) ptr2, Layer, Polygon);
+      SubtractPin (Data, (PinType *) ptr2, Layer, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case LINE_TYPE:
-      SubtractLine ((LineTypePtr) ptr2, Polygon);
+      SubtractLine ((LineType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case ARC_TYPE:
-      SubtractArc ((ArcTypePtr) ptr2, Polygon);
+      SubtractArc ((ArcType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case PAD_TYPE:
-      SubtractPad ((PadTypePtr) ptr2, Polygon);
+      SubtractPad ((PadType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     case TEXT_TYPE:
-      SubtractText ((TextTypePtr) ptr2, Polygon);
+      SubtractText ((TextType *) ptr2, Polygon);
       Polygon->NoHolesValid = 0;
       return 1;
     }
@@ -1495,26 +1495,26 @@ subtract_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
 }
 
 static int
-add_plow (DataTypePtr Data, LayerTypePtr Layer, PolygonTypePtr Polygon,
+add_plow (DataType *Data, LayerType *Layer, PolygonType *Polygon,
           int type, void *ptr1, void *ptr2)
 {
   switch (type)
     {
     case PIN_TYPE:
     case VIA_TYPE:
-      UnsubtractPin ((PinTypePtr) ptr2, Layer, Polygon);
+      UnsubtractPin ((PinType *) ptr2, Layer, Polygon);
       return 1;
     case LINE_TYPE:
-      UnsubtractLine ((LineTypePtr) ptr2, Layer, Polygon);
+      UnsubtractLine ((LineType *) ptr2, Layer, Polygon);
       return 1;
     case ARC_TYPE:
-      UnsubtractArc ((ArcTypePtr) ptr2, Layer, Polygon);
+      UnsubtractArc ((ArcType *) ptr2, Layer, Polygon);
       return 1;
     case PAD_TYPE:
-      UnsubtractPad ((PadTypePtr) ptr2, Layer, Polygon);
+      UnsubtractPad ((PadType *) ptr2, Layer, Polygon);
       return 1;
     case TEXT_TYPE:
-      UnsubtractText ((TextTypePtr) ptr2, Layer, Polygon);
+      UnsubtractText ((TextType *) ptr2, Layer, Polygon);
       return 1;
     }
   return 0;
@@ -1524,7 +1524,7 @@ static int
 plow_callback (const BoxType * b, void *cl)
 {
   struct plow_info *plow = (struct plow_info *) cl;
-  PolygonTypePtr polygon = (PolygonTypePtr) b;
+  PolygonType *polygon = (PolygonType *) b;
 
   if (TEST_FLAG (CLEARPOLYFLAG, polygon))
     return plow->callback (plow->data, plow->layer, polygon, plow->type,
@@ -1534,11 +1534,11 @@ plow_callback (const BoxType * b, void *cl)
 
 int
 PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
-              int (*call_back) (DataTypePtr data, LayerTypePtr lay,
-                                PolygonTypePtr poly, int type, void *ptr1,
+              int (*call_back) (DataType *data, LayerType *lay,
+                                PolygonType *poly, int type, void *ptr1,
                                 void *ptr2))
 {
-  BoxType sb = ((PinTypePtr) ptr2)->BoundingBox;
+  BoxType sb = ((PinType *) ptr2)->BoundingBox;
   int r = 0;
   struct plow_info info;
 
@@ -1564,7 +1564,7 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
       else
         {
           GROUP_LOOP (Data, GetLayerGroupNumberByNumber (GetLayerNumber (Data,
-                                                                         ((LayerTypePtr) ptr1))));
+                                                                         ((LayerType *) ptr1))));
           {
             info.layer = layer;
             r +=
@@ -1577,13 +1577,13 @@ PlowsPolygon (DataType * Data, int type, void *ptr1, void *ptr2,
     case ARC_TYPE:
     case TEXT_TYPE:
       /* the cast works equally well for lines and arcs */
-      if (!TEST_FLAG (CLEARLINEFLAG, (LineTypePtr) ptr2))
+      if (!TEST_FLAG (CLEARLINEFLAG, (LineType *) ptr2))
         return 0;
       /* silk doesn't plow */
-      if (GetLayerNumber (Data, (LayerTypePtr)ptr1) >= max_copper_layer)
+      if (GetLayerNumber (Data, (LayerType *)ptr1) >= max_copper_layer)
         return 0;
       GROUP_LOOP (Data, GetLayerGroupNumberByNumber (GetLayerNumber (Data,
-                                                                     ((LayerTypePtr) ptr1))));
+                                                                     ((LayerType *) ptr1))));
       {
         info.layer = layer;
         r += r_search (layer->polygon_tree, &sb, NULL, plow_callback, &info);
@@ -1630,7 +1630,7 @@ RestoreToPolygon (DataType * Data, int type, void *ptr1, void *ptr2)
     return;
 
   if (type == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+    InitClip (PCB->Data, (LayerType *) ptr1, (PolygonType *) ptr2);
   else
     PlowsPolygon (Data, type, ptr1, ptr2, add_plow);
 }
@@ -1642,13 +1642,13 @@ ClearFromPolygon (DataType * Data, int type, void *ptr1, void *ptr2)
     return;
 
   if (type == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr) ptr1, (PolygonTypePtr) ptr2);
+    InitClip (PCB->Data, (LayerType *) ptr1, (PolygonType *) ptr2);
   else
     PlowsPolygon (Data, type, ptr1, ptr2, subtract_plow);
 }
 
 bool
-isects (POLYAREA * a, PolygonTypePtr p, bool fr)
+isects (POLYAREA * a, PolygonType *p, bool fr)
 {
   POLYAREA *x;
   bool ans;
@@ -1662,7 +1662,7 @@ isects (POLYAREA * a, PolygonTypePtr p, bool fr)
 
 
 bool
-IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonTypePtr p)
+IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonType *p)
 {
   POLYAREA *c;
   Vector v;
@@ -1679,7 +1679,7 @@ IsPointInPolygon (Coord X, Coord Y, Coord r, PolygonTypePtr p)
 
 
 bool
-IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonTypePtr p)
+IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonType *p)
 {
   Vector v;
   v[0] = X;
@@ -1688,7 +1688,7 @@ IsPointInPolygonIgnoreHoles (Coord X, Coord Y, PolygonTypePtr p)
 }
 
 bool
-IsRectangleInPolygon (Coord X1, Coord Y1, Coord X2, Coord Y2, PolygonTypePtr p)
+IsRectangleInPolygon (Coord X1, Coord Y1, Coord X2, Coord Y2, PolygonType *p)
 {
   POLYAREA *s;
   if (!
@@ -1753,7 +1753,7 @@ r_NoHolesPolygonDicer (POLYAREA * pa,
 }
 
 void
-NoHolesPolygonDicer (PolygonTypePtr p, const BoxType * clip,
+NoHolesPolygonDicer (PolygonType *p, const BoxType * clip,
                      void (*emit) (PLINE *, void *), void *user_data)
 {
   POLYAREA *main_contour, *cur, *next;
@@ -1785,7 +1785,7 @@ NoHolesPolygonDicer (PolygonTypePtr p, const BoxType * clip,
 
 /* make a polygon split into multiple parts into multiple polygons */
 bool
-MorphPolygon (LayerTypePtr layer, PolygonTypePtr poly)
+MorphPolygon (LayerType *layer, PolygonType *poly)
 {
   POLYAREA *p, *start;
   bool many = false;
@@ -1814,7 +1814,7 @@ MorphPolygon (LayerTypePtr layer, PolygonTypePtr poly)
   do
     {
       VNODE *v;
-      PolygonTypePtr newone;
+      PolygonType *newone;
 
       if (p->contours->area > PCB->IsleArea)
         {
diff --git a/src/polygon.h b/src/polygon.h
index e5d1ace..c217653 100644
--- a/src/polygon.h
+++ b/src/polygon.h
@@ -49,13 +49,13 @@
 /* Prototypes */
 
 void polygon_init (void);
-Cardinal polygon_point_idx (PolygonTypePtr polygon, PointTypePtr point);
-Cardinal polygon_point_contour (PolygonTypePtr polygon, Cardinal point);
-Cardinal prev_contour_point (PolygonTypePtr polygon, Cardinal point);
-Cardinal next_contour_point (PolygonTypePtr polygon, Cardinal point);
-Cardinal GetLowestDistancePolygonPoint (PolygonTypePtr,
+Cardinal polygon_point_idx (PolygonType * polygon, PointType * point);
+Cardinal polygon_point_contour (PolygonType * polygon, Cardinal point);
+Cardinal prev_contour_point (PolygonType * polygon, Cardinal point);
+Cardinal next_contour_point (PolygonType * polygon, Cardinal point);
+Cardinal GetLowestDistancePolygonPoint (PolygonType *,
 					Coord, Coord);
-bool RemoveExcessPolygonPoints (LayerTypePtr, PolygonTypePtr);
+bool RemoveExcessPolygonPoints (LayerType *, PolygonType *);
 void GoToPreviousPoint (void);
 void ClosePolygon (void);
 void CopyAttachedPolygonToLayer (void);
@@ -63,7 +63,7 @@ int PolygonHoles (PolygonType *ptr, const BoxType *range,
 		  int (*callback) (PLINE *, void *user_data),
                   void *user_data);
 int PlowsPolygon (DataType *, int, void *, void *,
-		  int (*callback) (DataTypePtr, LayerTypePtr, PolygonTypePtr, int, void *, void *));
+		  int (*callback) (DataType *, LayerType *, PolygonType *, int, void *, void *));
 void ComputeNoHoles (PolygonType *poly);
 POLYAREA * ContourToPoly (PLINE *);
 POLYAREA * PolygonToPoly (PolygonType *);
@@ -79,11 +79,11 @@ int InitClip(DataType *d, LayerType *l, PolygonType *p);
 void RestoreToPolygon(DataType *, int, void *, void *);
 void ClearFromPolygon(DataType *, int, void *, void *);
 
-bool IsPointInPolygon (Coord, Coord, Coord, PolygonTypePtr);
-bool IsPointInPolygonIgnoreHoles (Coord, Coord, PolygonTypePtr);
-bool IsRectangleInPolygon (Coord, Coord, Coord, Coord, PolygonTypePtr);
-bool isects (POLYAREA *, PolygonTypePtr, bool);
-bool MorphPolygon (LayerTypePtr, PolygonTypePtr);
+bool IsPointInPolygon (Coord, Coord, Coord, PolygonType *);
+bool IsPointInPolygonIgnoreHoles (Coord, Coord, PolygonType *);
+bool IsRectangleInPolygon (Coord, Coord, Coord, Coord, PolygonType *);
+bool isects (POLYAREA *, PolygonType *, bool);
+bool MorphPolygon (LayerType *, PolygonType *);
 void NoHolesPolygonDicer (PolygonType *p, const BoxType *clip,
                           void (*emit) (PLINE *, void *), void *user_data);
 void PolyToPolygonsOnLayer (DataType *, LayerType *, POLYAREA *, FlagType);
diff --git a/src/polygon1.c b/src/polygon1.c
index 9da353e..667e26d 100644
--- a/src/polygon1.c
+++ b/src/polygon1.c
@@ -1182,7 +1182,7 @@ InsCntr (jmp_buf * e, PLINE * c, POLYAREA ** dst)
     }
   newp->contours = c;
   newp->contour_tree = r_create_tree (NULL, 0, 0);
-  r_insert_entry (newp->contour_tree, (BoxTypePtr) c, 0);
+  r_insert_entry (newp->contour_tree, (BoxType *) c, 0);
   c->next = NULL;
 }				/* InsCntr */
 
@@ -1434,7 +1434,7 @@ InsertHoles (jmp_buf * e, POLYAREA * dest, PLINE ** src)
 	  /* link at front of hole list */
 	  curh->next = container->next;
 	  container->next = curh;
-	  r_insert_entry (pa_info->pa->contour_tree, (BoxTypePtr) curh, 0);
+	  r_insert_entry (pa_info->pa->contour_tree, (BoxType *) curh, 0);
 
 	}
     }
@@ -2771,7 +2771,7 @@ poly_Copy1 (POLYAREA * dst, const POLYAREA * src)
     {
       if (!poly_CopyContour (last, cur))
 	return FALSE;
-      r_insert_entry (dst->contour_tree, (BoxTypePtr) * last, 0);
+      r_insert_entry (dst->contour_tree, (BoxType *) * last, 0);
       last = &(*last)->next;
     }
   return TRUE;
@@ -2831,7 +2831,7 @@ poly_InclContour (POLYAREA * p, PLINE * c)
       p->contours->next = c;
       c->next = tmp;
     }
-  r_insert_entry (p->contour_tree, (BoxTypePtr) c, 0);
+  r_insert_entry (p->contour_tree, (BoxType *) c, 0);
   return TRUE;
 }
 
diff --git a/src/print.c b/src/print.c
index 6d984a6..972d13e 100644
--- a/src/print.c
+++ b/src/print.c
@@ -94,7 +94,7 @@ text_at (hidGC gc, int x, int y, int align, char *fmt, ...)
   int w = 0, i;
   TextType t;
   va_list a;
-  FontTypePtr font = &PCB->Font;
+  FontType *font = &PCB->Font;
   va_start (a, fmt);
   vsprintf (tmp, fmt, a);
   va_end (a);
@@ -190,12 +190,12 @@ drill_sym (hidGC gc, int idx, int x, int y)
 }
 
 static int
-count_drill_lines (DrillInfoTypePtr AllDrills)
+count_drill_lines (DrillInfoType *AllDrills)
 {
   int n, ds = 0;
   for (n = AllDrills->DrillN - 1; n >= 0; n--)
     {
-      DrillTypePtr drill = &(AllDrills->Drill[n]);
+      DrillType *drill = &(AllDrills->Drill[n]);
       if (drill->PinCount + drill->ViaCount > drill->UnplatedCount)
 	ds++;
       if (drill->UnplatedCount)
@@ -208,7 +208,7 @@ count_drill_lines (DrillInfoTypePtr AllDrills)
 int
 PrintFab_overhang (void)
 {
-  DrillInfoTypePtr AllDrills = GetDrillInfo (PCB->Data);
+  DrillInfoType *AllDrills = GetDrillInfo (PCB->Data);
   int ds = count_drill_lines (AllDrills);
   if (ds < 4)
     ds = 4;
@@ -218,7 +218,7 @@ PrintFab_overhang (void)
 void
 PrintFab (hidGC gc)
 {
-  DrillInfoTypePtr AllDrills;
+  DrillInfoType *AllDrills;
   int i, n, yoff, total_drills = 0, ds = 0;
   time_t currenttime;
   char utcTime[64];
@@ -244,7 +244,7 @@ PrintFab (hidGC gc)
   for (n = AllDrills->DrillN - 1; n >= 0; n--)
     {
       int plated_sym = -1, unplated_sym = -1;
-      DrillTypePtr drill = &(AllDrills->Drill[n]);
+      DrillType *drill = &(AllDrills->Drill[n]);
       if (drill->PinCount + drill->ViaCount > drill->UnplatedCount)
 	plated_sym = --ds;
       if (drill->UnplatedCount)
@@ -330,7 +330,7 @@ PrintFab (hidGC gc)
     }
   else
     {
-      LayerTypePtr layer = LAYER_PTR (i);
+      LayerType *layer = LAYER_PTR (i);
       gui->set_line_width (gc, MIL_TO_COORD(10));
       LINE_LOOP (layer);
       {
diff --git a/src/puller.c b/src/puller.c
index 90f082a..7c9f0f9 100644
--- a/src/puller.c
+++ b/src/puller.c
@@ -84,8 +84,8 @@ static jmp_buf abort_buf;
 #define sqr(x) (1.0*(x)*(x))
 
 static int multi, line_exact, arc_exact;
-static LineTypePtr the_line;
-static ArcTypePtr the_arc;
+static LineType *the_line;
+static ArcType *the_arc;
 static double arc_dist;
 
 /* We canonicalize the arc and line such that the point to be moved is
@@ -104,7 +104,7 @@ within (int x1, int y1, int x2, int y2, int r)
 }
 
 static int
-arc_endpoint_is (ArcTypePtr a, int angle, int x, int y)
+arc_endpoint_is (ArcType *a, int angle, int x, int y)
 {
   int ax = a->X, ay = a->Y;
 
@@ -305,8 +305,8 @@ dist_lsp (int x1, int y1, int x2, int y2, int px, int py)
 static int
 line_callback (const BoxType * b, void *cl)
 {
-  /* LayerTypePtr layer = (LayerTypePtr)cl; */
-  LineTypePtr l = (LineTypePtr) b;
+  /* LayerType *layer = (LayerType *)cl; */
+  LineType *l = (LineType *) b;
   double d1, d2, t;
 #if TRACE1
   pcb_printf ("line %#mD .. %#mD\n",
@@ -335,8 +335,8 @@ line_callback (const BoxType * b, void *cl)
 static int
 arc_callback (const BoxType * b, void *cl)
 {
-  /* LayerTypePtr layer = (LayerTypePtr) cl; */
-  ArcTypePtr a = (ArcTypePtr) b;
+  /* LayerType *layer = (LayerType *) cl; */
+  ArcType *a = (ArcType *) b;
 
 #if TRACE1
   pcb_printf ("arc a %#mD r %#mS sa %ld d %ld\n", a->X, a->Y, a->Width,
@@ -634,7 +634,7 @@ static int current_is_component, current_is_solder;
 #if TRACE1
 static void trace_paths ();
 #endif
-static void mark_line_for_deletion (LineTypePtr);
+static void mark_line_for_deletion (LineType *);
 
 #define LINE2EXTRA(l)    ((Extra *)g_hash_table_lookup (lines, l))
 #define ARC2EXTRA(a)     ((Extra *)g_hash_table_lookup (arcs, a))
@@ -686,7 +686,7 @@ clear_found ()
 #endif
 
 static void
-fix_arc_extra (ArcTypePtr a, Extra *e)
+fix_arc_extra (ArcType *a, Extra *e)
 {
 #if TRACE1
   printf("new arc angles %ld %ld\n", a->StartAngle, a->Delta);
@@ -712,7 +712,7 @@ typedef struct {
 static int
 find_pair_line_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
 #if TRACE1
   Extra *e = LINE2EXTRA (line);
 #endif
@@ -752,7 +752,7 @@ find_pair_line_callback (const BoxType * b, void *cl)
 static int
 find_pair_arc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   Extra *e = ARC2EXTRA (arc);
   FindPairCallbackStruct *fpcs = (FindPairCallbackStruct *) cl;
 
@@ -802,7 +802,7 @@ find_pairs_1 (void *me, Extra **e, int x, int y)
 }
 
 static int
-check_point_in_pin (PinTypePtr pin, int x, int y, End *e)
+check_point_in_pin (PinType *pin, int x, int y, End *e)
 {
   int inside_p;
   int t = (pin->Thickness+1)/2;
@@ -826,8 +826,8 @@ check_point_in_pin (PinTypePtr pin, int x, int y, End *e)
 static int
 find_pair_pinline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
-  PinTypePtr pin = (PinTypePtr) cl;
+  LineType *line = (LineType *) b;
+  PinType *pin = (PinType *) cl;
   Extra *e = LINE2EXTRA (line);
   int hits;
 
@@ -864,8 +864,8 @@ find_pair_pinline_callback (const BoxType * b, void *cl)
 static int
 find_pair_pinarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
-  PinTypePtr pin = (PinTypePtr) cl;
+  ArcType *arc = (ArcType *) b;
+  PinType *pin = (PinType *) cl;
   Extra *e = ARC2EXTRA (arc);
   int hits;
 
@@ -875,7 +875,7 @@ find_pair_pinarc_callback (const BoxType * b, void *cl)
 }
 
 static int
-check_point_in_pad (PadTypePtr pad, int x, int y, End *e)
+check_point_in_pad (PadType *pad, int x, int y, End *e)
 {
   int inside_p;
   int t;
@@ -932,8 +932,8 @@ check_point_in_pad (PadTypePtr pad, int x, int y, End *e)
 static int
 find_pair_padline_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
-  PadTypePtr pad = (PadTypePtr) cl;
+  LineType *line = (LineType *) b;
+  PadType *pad = (PadType *) cl;
   Extra *e = LINE2EXTRA (line);
   int hits;
   double t;
@@ -1003,8 +1003,8 @@ find_pair_padline_callback (const BoxType * b, void *cl)
 static int
 find_pair_padarc_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
-  PadTypePtr pad = (PadTypePtr) cl;
+  ArcType *arc = (ArcType *) b;
+  PadType *pad = (PadType *) cl;
   Extra *e = ARC2EXTRA (arc);
   int hits;
 
@@ -1254,7 +1254,7 @@ print_extra (Extra *e, Extra *prev)
 	 
   if (EXTRA_IS_LINE (e))
     {
-      LineTypePtr line = EXTRA2LINE (e);
+      LineType *line = EXTRA2LINE (e);
       pcb_printf(" %p L %#mD-%#mD", line, line->Point1.X, line->Point1.Y, line->Point2.X, line->Point2.Y);
       printf("  %s %p %s %p\n",
 	     e->start.is_pad ? "pad" : "pin", e->start.pin,
@@ -1262,7 +1262,7 @@ print_extra (Extra *e, Extra *prev)
     }
   else if (EXTRA_IS_ARC (e))
     {
-      ArcTypePtr arc = EXTRA2ARC (e);
+      ArcType *arc = EXTRA2ARC (e);
       pcb_printf(" %p A %#mD-%#mD", arc, e->start.x, e->start.y, e->end.x, e->end.y);
       pcb_printf(" at %#mD ang %ld,%ld\n", arc->X, arc->Y, arc->StartAngle, arc->Delta);
     }
@@ -1323,7 +1323,7 @@ trace_paths ()
 #endif
 
 static void
-reverse_line (LineTypePtr line)
+reverse_line (LineType *line)
 {
   Extra *e = LINE2EXTRA (line);
   int x, y;
@@ -1351,7 +1351,7 @@ reverse_line (LineTypePtr line)
 }
 
 static void
-reverse_arc (ArcTypePtr arc)
+reverse_arc (ArcType *arc)
 {
   Extra *e = ARC2EXTRA (arc);
   End etmp;
@@ -1370,7 +1370,7 @@ reverse_arc (ArcTypePtr arc)
 }
 
 static void
-expand_box (BoxTypePtr b, int x, int y, int t)
+expand_box (BoxType *b, int x, int y, int t)
 {
   b->X1 = MIN (b->X1, x-t);
   b->X2 = MAX (b->X2, x+t);
@@ -1383,10 +1383,10 @@ expand_box (BoxTypePtr b, int x, int y, int t)
    working on. */
 
 /* what we're working with */
-static ArcTypePtr start_arc;
-static LineTypePtr start_line;
-static LineTypePtr end_line;
-static ArcTypePtr end_arc;
+static ArcType *start_arc;
+static LineType *start_line;
+static LineType *end_line;
+static ArcType *end_arc;
 static Extra *start_extra, *end_extra;
 static Extra *sarc_extra, *earc_extra;
 static void *start_pinpad, *end_pinpad;
@@ -1677,7 +1677,7 @@ gp_point_2 (int x, int y, int t, End *e, int esa, int eda, const char *func)
 static int
 gp_line_cb (const BoxType *b, void *cb)
 {
-  const LineTypePtr l = (LineTypePtr) b;
+  const LineType *l = (LineType *) b;
   Extra *e = LINE2EXTRA(l);
   if (l == start_line || l == end_line)
     return 0;
@@ -1699,7 +1699,7 @@ gp_line_cb (const BoxType *b, void *cb)
 static int
 gp_arc_cb (const BoxType *b, void *cb)
 {
-  const ArcTypePtr a = (ArcTypePtr) b;
+  const ArcType *a = (ArcType *) b;
   Extra *e = ARC2EXTRA(a);
   if (a == start_arc || a == end_arc)
     return 0;
@@ -1726,7 +1726,7 @@ gp_arc_cb (const BoxType *b, void *cb)
 static int
 gp_text_cb (const BoxType *b, void *cb)
 {
-  const TextTypePtr t = (TextTypePtr) b;
+  const TextType *t = (TextType *) b;
   /* FIXME: drop in the actual text-line endpoints later. */
   gp_point (t->BoundingBox.X1, t->BoundingBox.Y1, 0, 0);
   gp_point (t->BoundingBox.X1, t->BoundingBox.Y2, 0, 0);
@@ -1739,7 +1739,7 @@ static int
 gp_poly_cb (const BoxType *b, void *cb)
 {
   int i;
-  const PolygonTypePtr p = (PolygonTypePtr) b;
+  const PolygonType *p = (PolygonType *) b;
   for (i=0; i<p->PointN; i++)
     gp_point (p->Points[i].X, p->Points[i].Y, 0, 0);
   return 0;
@@ -1748,7 +1748,7 @@ gp_poly_cb (const BoxType *b, void *cb)
 static int
 gp_pin_cb (const BoxType *b, void *cb)
 {
-  const PinTypePtr p = (PinTypePtr) b;
+  const PinType *p = (PinType *) b;
   int t2 = (p->Thickness+1)/2;
 
   if (p == start_pinpad || p == end_pinpad)
@@ -1773,7 +1773,7 @@ gp_pin_cb (const BoxType *b, void *cb)
 static int
 gp_pad_cb (const BoxType *b, void *cb)
 {
-  const PadTypePtr p = (PadTypePtr) b;
+  const PadType *p = (PadType *) b;
   int t2 = (p->Thickness+1)/2;
 
   if (p == start_pinpad || p == end_pinpad)
@@ -1823,14 +1823,14 @@ gp_pad_cb (const BoxType *b, void *cb)
   return 0;
 }
 
-static LineTypePtr
-create_line (LineTypePtr sample, int x1, int y1, int x2, int y2)
+static LineType *
+create_line (LineType *sample, int x1, int y1, int x2, int y2)
 {
 #if TRACE1
   Extra *e;
   pcb_printf("create_line from %#mD to %#mD\n", x1, y1, x2, y2);
 #endif
-  LineTypePtr line = CreateNewLineOnLayer (CURRENT, x1, y1, x2, y2,
+  LineType *line = CreateNewLineOnLayer (CURRENT, x1, y1, x2, y2,
 					   sample->Thickness, sample->Clearance, sample->Flags);
   AddObjectToCreateUndoList (LINE_TYPE, CURRENT, line, line);
 
@@ -1844,11 +1844,11 @@ create_line (LineTypePtr sample, int x1, int y1, int x2, int y2)
   return line;
 }
 
-static ArcTypePtr
-create_arc (LineTypePtr sample, int x, int y, int r, int sa, int da)
+static ArcType *
+create_arc (LineType *sample, int x, int y, int r, int sa, int da)
 {
   Extra *e;
-  ArcTypePtr arc;
+  ArcType *arc;
 
   if (r % 100 == 1)
     r--;
@@ -1938,7 +1938,7 @@ unlink_extras (Extra *e)
 }
 
 static void
-mark_line_for_deletion (LineTypePtr l)
+mark_line_for_deletion (LineType *l)
 {
   Extra *e = LINE2EXTRA(l);
   if (e->deleted)
@@ -1968,7 +1968,7 @@ mark_line_for_deletion (LineTypePtr l)
 }
 
 static void
-mark_arc_for_deletion (ArcTypePtr a)
+mark_arc_for_deletion (ArcType *a)
 {
   Extra *e = ARC2EXTRA(a);
   e->deleted = 1;
@@ -1993,14 +1993,14 @@ mark_arc_for_deletion (ArcTypePtr a)
 */
 
 static void
-maybe_pull_1 (LineTypePtr line)
+maybe_pull_1 (LineType *line)
 {
   BoxType box;
   /* Line half-thicknesses, including line space */
   int ex, ey;
-  LineTypePtr new_line;
+  LineType *new_line;
   Extra *new_lextra;
-  ArcTypePtr new_arc;
+  ArcType *new_arc;
   Extra *new_aextra;
   double abs_angle;
 
@@ -2463,7 +2463,7 @@ maybe_pull_1 (LineTypePtr line)
 
 /* Given a line with a end_next, attempt to pull both ends.  */
 static void
-maybe_pull (LineTypePtr line, Extra *e)
+maybe_pull (LineType *line, Extra *e)
 {
 #if TRACE0
   printf("maybe_pull: ");
diff --git a/src/rats.c b/src/rats.c
index fc6948f..e7221fa 100644
--- a/src/rats.c
+++ b/src/rats.c
@@ -67,10 +67,10 @@
  */
 static bool FindPad (char *, char *, ConnectionType *, bool);
 static bool ParseConnection (char *, char *, char *);
-static bool DrawShortestRats (NetListTypePtr, void (*)(register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr));
-static bool GatherSubnets (NetListTypePtr, bool, bool);
-static bool CheckShorts (LibraryMenuTypePtr);
-static void TransferNet (NetListTypePtr, NetTypePtr, NetTypePtr);
+static bool DrawShortestRats (NetListType *, void (*)(register ConnectionType *, register ConnectionType *, register RouteStyleType *));
+static bool GatherSubnets (NetListType *, bool, bool);
+static bool CheckShorts (LibraryMenuType *);
+static void TransferNet (NetListType *, NetType *, NetType *);
 
 /* ---------------------------------------------------------------------------
  * some local identifiers
@@ -117,7 +117,7 @@ ParseConnection (char *InString, char *ElementName, char *PinNum)
 static bool
 FindPad (char *ElementName, char *PinNum, ConnectionType * conn, bool Same)
 {
-  ElementTypePtr element;
+  ElementType *element;
   GList *i;
 
   if ((element = SearchElementByName (PCB->Data, ElementName)) == NULL)
@@ -212,13 +212,13 @@ SeekPad (LibraryEntryType * entry, ConnectionType * conn, bool Same)
  * Read the library-netlist build a true Netlist structure
  */
 
-NetListTypePtr
-ProcNetlist (LibraryTypePtr net_menu)
+NetListType *
+ProcNetlist (LibraryType *net_menu)
 {
-  ConnectionTypePtr connection;
+  ConnectionType *connection;
   ConnectionType LastPoint;
-  NetTypePtr net;
-  static NetListTypePtr Wantlist = NULL;
+  NetType *net;
+  static NetListType *Wantlist = NULL;
 
   if (!net_menu->MenuN)
     return (NULL);
@@ -230,7 +230,7 @@ ProcNetlist (LibraryTypePtr net_menu)
   SLayer = GetLayerGroupNumberByNumber (solder_silk_layer);
   CLayer = GetLayerGroupNumberByNumber (component_silk_layer);
 
-  Wantlist = (NetListTypePtr)calloc (1, sizeof (NetListType));
+  Wantlist = (NetListType *)calloc (1, sizeof (NetListType));
   if (Wantlist)
     {
       ALLPIN_LOOP (PCB->Data);
@@ -271,13 +271,13 @@ ProcNetlist (LibraryTypePtr net_menu)
 	{
 	  if (SeekPad (entry, &LastPoint, false))
 	    {
-	      if (TEST_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2))
+	      if (TEST_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2))
 		Message (_
 			 ("Error! Element %s pin %s appears multiple times in the netlist file.\n"),
-			 NAMEONPCB_NAME ((ElementTypePtr) LastPoint.ptr1),
+			 NAMEONPCB_NAME ((ElementType *) LastPoint.ptr1),
 			 (LastPoint.type ==
-			  PIN_TYPE) ? ((PinTypePtr) LastPoint.ptr2)->
-			 Number : ((PadTypePtr) LastPoint.ptr2)->Number);
+			  PIN_TYPE) ? ((PinType *) LastPoint.ptr2)->
+			 Number : ((PadType *) LastPoint.ptr2)->Number);
 	      else
 		{
 		  connection = GetConnectionMemory (net);
@@ -285,11 +285,11 @@ ProcNetlist (LibraryTypePtr net_menu)
 		  /* indicate expect net */
 		  connection->menu = menu;
 		  /* mark as visited */
-		  SET_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2);
+		  SET_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2);
 		  if (LastPoint.type == PIN_TYPE)
-		    ((PinTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		    ((PinType *) LastPoint.ptr2)->Spare = (void *) menu;
 		  else
-		    ((PadTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		    ((PadType *) LastPoint.ptr2)->Spare = (void *) menu;
 		}
 	    }
 	  else
@@ -302,11 +302,11 @@ ProcNetlist (LibraryTypePtr net_menu)
 	      /* indicate expect net */
 	      connection->menu = menu;
 	      /* mark as visited */
-	      SET_FLAG (DRCFLAG, (PinTypePtr) LastPoint.ptr2);
+	      SET_FLAG (DRCFLAG, (PinType *) LastPoint.ptr2);
 	      if (LastPoint.type == PIN_TYPE)
-		((PinTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		((PinType *) LastPoint.ptr2)->Spare = (void *) menu;
 	      else
-		((PadTypePtr) LastPoint.ptr2)->Spare = (void *) menu;
+		((PadType *) LastPoint.ptr2)->Spare = (void *) menu;
 	    }
 	}
 	END_LOOP;
@@ -332,9 +332,9 @@ ProcNetlist (LibraryTypePtr net_menu)
  * and then remove the first net from its netlist
  */
 static void
-TransferNet (NetListTypePtr Netl, NetTypePtr SourceNet, NetTypePtr DestNet)
+TransferNet (NetListType *Netl, NetType *SourceNet, NetType *DestNet)
 {
-  ConnectionTypePtr conn;
+  ConnectionType *conn;
 
   /* It would be worth checking if SourceNet is NULL here to avoid a segfault. Seb James. */
   CONNECTION_LOOP (SourceNet);
@@ -353,10 +353,10 @@ TransferNet (NetListTypePtr Netl, NetTypePtr SourceNet, NetTypePtr DestNet)
 }
 
 static bool
-CheckShorts (LibraryMenuTypePtr theNet)
+CheckShorts (LibraryMenuType *theNet)
 {
   bool newone, warn = false;
-  PointerListTypePtr generic = (PointerListTypePtr)calloc (1, sizeof (PointerListType));
+  PointerListType *generic = (PointerListType *)calloc (1, sizeof (PointerListType));
   /* the first connection was starting point so
    * the menu is always non-null
    */
@@ -393,7 +393,7 @@ CheckShorts (LibraryMenuTypePtr theNet)
 	    *menu = pin->Spare;
 	    Message (_("Warning! Net \"%s\" is shorted to net \"%s\"\n"),
 		     &theNet->Name[2],
-		     &((LibraryMenuTypePtr) (pin->Spare))->Name[2]);
+		     &((LibraryMenuType *) (pin->Spare))->Name[2]);
 	    SET_FLAG (WARNFLAG, pin);
 	  }
       }
@@ -429,7 +429,7 @@ CheckShorts (LibraryMenuTypePtr theNet)
 	    *menu = pad->Spare;
 	    Message (_("Warning! Net \"%s\" is shorted to net \"%s\"\n"),
 		     &theNet->Name[2],
-		     &((LibraryMenuTypePtr) (pad->Spare))->Name[2]);
+		     &((LibraryMenuType *) (pad->Spare))->Name[2]);
 	    SET_FLAG (WARNFLAG, pad);
 	  }
       }
@@ -448,10 +448,10 @@ CheckShorts (LibraryMenuTypePtr theNet)
  * afterwards there can be many fewer nets with multiple connections each
  */
 static bool
-GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
+GatherSubnets (NetListType *Netl, bool NoWarn, bool AndRats)
 {
-  NetTypePtr a, b;
-  ConnectionTypePtr conn;
+  NetType *a, *b;
+  ConnectionType *conn;
   Cardinal m, n;
   bool Warned = false;
 
@@ -464,14 +464,14 @@ GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
 		   AndRats);
       /* now anybody connected to the first point has DRCFLAG set */
       /* so move those to this subnet */
-      CLEAR_FLAG (DRCFLAG, (PinTypePtr) a->Connection[0].ptr2);
+      CLEAR_FLAG (DRCFLAG, (PinType *) a->Connection[0].ptr2);
       for (n = m + 1; n < Netl->NetN; n++)
 	{
 	  b = &Netl->Net[n];
 	  /* There can be only one connection in net b */
-	  if (TEST_FLAG (DRCFLAG, (PinTypePtr) b->Connection[0].ptr2))
+	  if (TEST_FLAG (DRCFLAG, (PinType *) b->Connection[0].ptr2))
 	    {
-	      CLEAR_FLAG (DRCFLAG, (PinTypePtr) b->Connection[0].ptr2);
+	      CLEAR_FLAG (DRCFLAG, (PinType *) b->Connection[0].ptr2);
 	      TransferNet (Netl, b, a);
 	      /* back up since new subnet is now at old index */
 	      n--;
@@ -554,16 +554,16 @@ GatherSubnets (NetListTypePtr Netl, bool NoWarn, bool AndRats)
  */
 
 static bool
-DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr))
+DrawShortestRats (NetListType *Netl, void (*funcp) (register ConnectionType *, register ConnectionType *, register RouteStyleType *))
 {
-  RatTypePtr line;
+  RatType *line;
   register float distance, temp;
-  register ConnectionTypePtr conn1, conn2, firstpoint, secondpoint;
-  PolygonTypePtr polygon;
+  register ConnectionType *conn1, *conn2, *firstpoint, *secondpoint;
+  PolygonType *polygon;
   bool changed = false;
   bool havepoints;
   Cardinal n, m, j;
-  NetTypePtr next, subnet, theSubnet = NULL;
+  NetType *next, *subnet, *theSubnet = NULL;
 
   /* This is just a sanity check, to make sure we're passed
    * *something*.
@@ -635,7 +635,7 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
 		   * via in the Net to make that connection.
 		   */
 		  if (conn1->type == POLYGON_TYPE &&
-		      (polygon = (PolygonTypePtr)conn1->ptr2) &&
+		      (polygon = (PolygonType *)conn1->ptr2) &&
 		      !(distance == 0 &&
 		        firstpoint && firstpoint->type == VIA_TYPE) &&
 		      IsPointInPolygonIgnoreHoles (conn2->X, conn2->Y, polygon))
@@ -647,7 +647,7 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
 		      havepoints = true;
 		    }
 		  else if (conn2->type == POLYGON_TYPE &&
-		      (polygon = (PolygonTypePtr)conn2->ptr2) &&
+		      (polygon = (PolygonType *)conn2->ptr2) &&
 		      !(distance == 0 &&
 		        firstpoint && firstpoint->type == VIA_TYPE) &&
 		      IsPointInPolygonIgnoreHoles (conn1->X, conn1->Y, polygon))
@@ -723,11 +723,11 @@ DrawShortestRats (NetListTypePtr Netl, void (*funcp) (register ConnectionTypePtr
  *  if SelectedOnly is true, it will only draw rats to selected pins and pads
  */
 bool
-AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr))
+AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionType *, register ConnectionType *, register RouteStyleType *))
 {
-  NetListTypePtr Nets, Wantlist;
-  NetTypePtr lonesome;
-  ConnectionTypePtr onepin;
+  NetListType *Nets, *Wantlist;
+  NetType *lonesome;
+  ConnectionType *onepin;
   bool changed, Warned = false;
 
   /* the netlist library has the text form
@@ -745,7 +745,7 @@ AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, regist
   /* initialize finding engine */
   InitConnectionLookup ();
   SaveFindFlag (DRCFLAG);
-  Nets = (NetListTypePtr)calloc (1, sizeof (NetListType));
+  Nets = (NetListType *)calloc (1, sizeof (NetListType));
   /* now we build another netlist (Nets) for each
    * net in Wantlist that shows how it actually looks now,
    * then fill in any missing connections with rat lines.
@@ -763,7 +763,7 @@ AddAllRats (bool SelectedOnly, void (*funcp) (register ConnectionTypePtr, regist
     CONNECTION_LOOP (net);
     {
       if (!SelectedOnly
-	  || TEST_FLAG (SELECTEDFLAG, (PinTypePtr) connection->ptr2))
+	  || TEST_FLAG (SELECTEDFLAG, (PinType *) connection->ptr2))
 	{
 	  lonesome = GetNetMemory (Nets);
 	  onepin = GetConnectionMemory (lonesome);
@@ -820,9 +820,9 @@ NetListListType
 CollectSubnets (bool SelectedOnly)
 {
   NetListListType result = { 0, 0, NULL };
-  NetListTypePtr Nets, Wantlist;
-  NetTypePtr lonesome;
-  ConnectionTypePtr onepin;
+  NetListType *Nets, *Wantlist;
+  NetType *lonesome;
+  ConnectionType *onepin;
 
   /* the netlist library has the text form
    * ProcNetlist fills in the Netlist
@@ -856,7 +856,7 @@ CollectSubnets (bool SelectedOnly)
     CONNECTION_LOOP (net);
     {
       if (!SelectedOnly
-	  || TEST_FLAG (SELECTEDFLAG, (PinTypePtr) connection->ptr2))
+	  || TEST_FLAG (SELECTEDFLAG, (PinType *) connection->ptr2))
 	{
 	  lonesome = GetNetMemory (Nets);
 	  onepin = GetConnectionMemory (lonesome);
@@ -897,7 +897,7 @@ rat_used (char *name)
   /* These next two functions moved from the original netlist.c as part of the
      |  gui code separation for the Gtk port.
    */
-RatTypePtr
+RatType *
 AddNet (void)
 {
   static int ratDrawn = 0;
@@ -906,8 +906,8 @@ AddNet (void)
   char ratname[20];
   int found;
   void *ptr1, *ptr2, *ptr3;
-  LibraryMenuTypePtr menu;
-  LibraryEntryTypePtr entry;
+  LibraryMenuType *menu;
+  LibraryEntryType *entry;
 
   if (Crosshair.AttachedLine.Point1.X == Crosshair.AttachedLine.Point2.X
       && Crosshair.AttachedLine.Point1.Y == Crosshair.AttachedLine.Point2.Y)
@@ -921,15 +921,15 @@ AddNet (void)
       Message (_("No pad/pin under rat line\n"));
       return (NULL);
     }
-  if (NAMEONPCB_NAME ((ElementTypePtr) ptr1) == NULL
-      || *NAMEONPCB_NAME ((ElementTypePtr) ptr1) == 0)
+  if (NAMEONPCB_NAME ((ElementType *) ptr1) == NULL
+      || *NAMEONPCB_NAME ((ElementType *) ptr1) == 0)
     {
       Message (_("You must name the starting element first\n"));
       return (NULL);
     }
 
   /* will work for pins to since the FLAG is common */
-  group1 = (TEST_FLAG (ONSOLDERFLAG, (PadTypePtr) ptr2) ?
+  group1 = (TEST_FLAG (ONSOLDERFLAG, (PadType *) ptr2) ?
 	    GetLayerGroupNumberByNumber (solder_silk_layer) :
 	    GetLayerGroupNumberByNumber (component_silk_layer));
   strcpy (name1, ConnectionName (found, ptr1, ptr2));
@@ -941,13 +941,13 @@ AddNet (void)
       Message (_("No pad/pin under rat line\n"));
       return (NULL);
     }
-  if (NAMEONPCB_NAME ((ElementTypePtr) ptr1) == NULL
-      || *NAMEONPCB_NAME ((ElementTypePtr) ptr1) == 0)
+  if (NAMEONPCB_NAME ((ElementType *) ptr1) == NULL
+      || *NAMEONPCB_NAME ((ElementType *) ptr1) == 0)
     {
       Message (_("You must name the ending element first\n"));
       return (NULL);
     }
-  group2 = (TEST_FLAG (ONSOLDERFLAG, (PadTypePtr) ptr2) ?
+  group2 = (TEST_FLAG (ONSOLDERFLAG, (PadType *) ptr2) ?
 	    GetLayerGroupNumberByNumber (solder_silk_layer) :
 	    GetLayerGroupNumberByNumber (component_silk_layer));
   name2 = ConnectionName (found, ptr1, ptr2);
@@ -1015,15 +1015,15 @@ ConnectionName (int type, void *ptr1, void *ptr2)
   switch (type)
     {
     case PIN_TYPE:
-      num = ((PinTypePtr) ptr2)->Number;
+      num = ((PinType *) ptr2)->Number;
       break;
     case PAD_TYPE:
-      num = ((PadTypePtr) ptr2)->Number;
+      num = ((PadType *) ptr2)->Number;
       break;
     default:
       return (NULL);
     }
-  strcpy (name, UNKNOWN (NAMEONPCB_NAME ((ElementTypePtr) ptr1)));
+  strcpy (name, UNKNOWN (NAMEONPCB_NAME ((ElementType *) ptr1)));
   strcat (name, "-");
   strcat (name, UNKNOWN (num));
   return (name);
diff --git a/src/rats.h b/src/rats.h
index 16e5338..dc7479b 100644
--- a/src/rats.h
+++ b/src/rats.h
@@ -35,16 +35,16 @@
 #include "global.h"
 
 /* This one is actually in netlist.h, but it's used by rats.c */
-LibraryMenuTypePtr netnode_to_netname (char *nodename);
-LibraryMenuTypePtr netname_to_netname (char *netname);
+LibraryMenuType * netnode_to_netname (char *nodename);
+LibraryMenuType * netname_to_netname (char *netname);
 
-RatTypePtr AddNet (void);
+RatType * AddNet (void);
 char *ConnectionName (int, void *, void *);
 
-bool AddAllRats (bool, void (*)(register ConnectionTypePtr, register ConnectionTypePtr, register RouteStyleTypePtr));
-bool SeekPad (LibraryEntryTypePtr, ConnectionTypePtr, bool);
+bool AddAllRats (bool, void (*)(register ConnectionType *, register ConnectionType *, register RouteStyleType *));
+bool SeekPad (LibraryEntryType *, ConnectionType *, bool);
 
-NetListTypePtr ProcNetlist (LibraryTypePtr);
+NetListType * ProcNetlist (LibraryType *);
 NetListListType CollectSubnets (bool);
 
 #endif
diff --git a/src/remove.c b/src/remove.c
index d38805f..39af48f 100644
--- a/src/remove.c
+++ b/src/remove.c
@@ -59,19 +59,19 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *DestroyVia (PinTypePtr);
-static void *DestroyRat (RatTypePtr);
-static void *DestroyLine (LayerTypePtr, LineTypePtr);
-static void *DestroyArc (LayerTypePtr, ArcTypePtr);
-static void *DestroyText (LayerTypePtr, TextTypePtr);
-static void *DestroyPolygon (LayerTypePtr, PolygonTypePtr);
-static void *DestroyElement (ElementTypePtr);
-static void *RemoveVia (PinTypePtr);
-static void *RemoveRat (RatTypePtr);
-static void *DestroyPolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *RemovePolygonContour (LayerTypePtr, PolygonTypePtr, Cardinal);
-static void *RemovePolygonPoint (LayerTypePtr, PolygonTypePtr, PointTypePtr);
-static void *RemoveLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
+static void *DestroyVia (PinType *);
+static void *DestroyRat (RatType *);
+static void *DestroyLine (LayerType *, LineType *);
+static void *DestroyArc (LayerType *, ArcType *);
+static void *DestroyText (LayerType *, TextType *);
+static void *DestroyPolygon (LayerType *, PolygonType *);
+static void *DestroyElement (ElementType *);
+static void *RemoveVia (PinType *);
+static void *RemoveRat (RatType *);
+static void *DestroyPolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *RemovePolygonContour (LayerType *, PolygonType *, Cardinal);
+static void *RemovePolygonPoint (LayerType *, PolygonType *, PointType *);
+static void *RemoveLinePoint (LayerType *, LineType *, PointType *);
 
 /* ---------------------------------------------------------------------------
  * some local types
@@ -104,14 +104,14 @@ static ObjectFunctionType DestroyFunctions = {
   DestroyArc,
   DestroyRat
 };
-static DataTypePtr DestroyTarget;
+static DataType *DestroyTarget;
 static bool Bulk = false;
 
 /* ---------------------------------------------------------------------------
  * remove PCB
  */
 void
-RemovePCB (PCBTypePtr Ptr)
+RemovePCB (PCBType *Ptr)
 {
   ClearUndoList (true);
   FreePCBMemory (Ptr);
@@ -122,9 +122,9 @@ RemovePCB (PCBTypePtr Ptr)
  * destroys a via
  */
 static void *
-DestroyVia (PinTypePtr Via)
+DestroyVia (PinType *Via)
 {
-  r_delete_entry (DestroyTarget->via_tree, (BoxTypePtr) Via);
+  r_delete_entry (DestroyTarget->via_tree, (BoxType *) Via);
   free (Via->Name);
 
   DestroyTarget->Via = g_list_remove (DestroyTarget->Via, Via);
@@ -139,9 +139,9 @@ DestroyVia (PinTypePtr Via)
  * destroys a line from a layer 
  */
 static void *
-DestroyLine (LayerTypePtr Layer, LineTypePtr Line)
+DestroyLine (LayerType *Layer, LineType *Line)
 {
-  r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+  r_delete_entry (Layer->line_tree, (BoxType *) Line);
   free (Line->Number);
 
   Layer->Line = g_list_remove (Layer->Line, Line);
@@ -156,9 +156,9 @@ DestroyLine (LayerTypePtr Layer, LineTypePtr Line)
  * destroys an arc from a layer 
  */
 static void *
-DestroyArc (LayerTypePtr Layer, ArcTypePtr Arc)
+DestroyArc (LayerType *Layer, ArcType *Arc)
 {
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+  r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
 
   Layer->Arc = g_list_remove (Layer->Arc, Arc);
   Layer->ArcN --;
@@ -172,9 +172,9 @@ DestroyArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * destroys a polygon from a layer
  */
 static void *
-DestroyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+DestroyPolygon (LayerType *Layer, PolygonType *Polygon)
 {
-  r_delete_entry (Layer->polygon_tree, (BoxTypePtr) Polygon);
+  r_delete_entry (Layer->polygon_tree, (BoxType *) Polygon);
   FreePolygonMemory (Polygon);
 
   Layer->Polygon = g_list_remove (Layer->Polygon, Polygon);
@@ -189,8 +189,8 @@ DestroyPolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * removes a polygon-point from a polygon and destroys the data
  */
 static void *
-DestroyPolygonPoint (LayerTypePtr Layer,
-		     PolygonTypePtr Polygon, PointTypePtr Point)
+DestroyPolygonPoint (LayerType *Layer,
+		     PolygonType *Polygon, PointType *Point)
 {
   Cardinal point_idx;
   Cardinal i;
@@ -229,10 +229,10 @@ DestroyPolygonPoint (LayerTypePtr Layer,
  * destroys a text from a layer
  */
 static void *
-DestroyText (LayerTypePtr Layer, TextTypePtr Text)
+DestroyText (LayerType *Layer, TextType *Text)
 {
   free (Text->TextString);
-  r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+  r_delete_entry (Layer->text_tree, (BoxType *) Text);
 
   Layer->Text = g_list_remove (Layer->Text, Text);
   Layer->TextN --;
@@ -246,7 +246,7 @@ DestroyText (LayerTypePtr Layer, TextTypePtr Text)
  * destroys a element
  */
 static void *
-DestroyElement (ElementTypePtr Element)
+DestroyElement (ElementType *Element)
 {
   if (DestroyTarget->element_tree)
     r_delete_entry (DestroyTarget->element_tree, (BoxType *) Element);
@@ -286,7 +286,7 @@ DestroyElement (ElementTypePtr Element)
  * destroys a rat
  */
 static void *
-DestroyRat (RatTypePtr Rat)
+DestroyRat (RatType *Rat)
 {
   if (DestroyTarget->rat_tree)
     r_delete_entry (DestroyTarget->rat_tree, &Rat->BoundingBox);
@@ -304,7 +304,7 @@ DestroyRat (RatTypePtr Rat)
  * removes a via
  */
 static void *
-RemoveVia (PinTypePtr Via)
+RemoveVia (PinType *Via)
 {
   /* erase from screen and memory */
   if (PCB->ViaOn)
@@ -321,7 +321,7 @@ RemoveVia (PinTypePtr Via)
  * removes a rat
  */
 static void *
-RemoveRat (RatTypePtr Rat)
+RemoveRat (RatType *Rat)
 {
   /* erase from screen and memory */
   if (PCB->RatOn)
@@ -337,8 +337,8 @@ RemoveRat (RatTypePtr Rat)
 struct rlp_info
 {
   jmp_buf env;
-  LineTypePtr line;
-  PointTypePtr point;
+  LineType *line;
+  PointType *point;
 };
 static int
 remove_point (const BoxType * b, void *cl)
@@ -369,7 +369,7 @@ remove_point (const BoxType * b, void *cl)
  * removes a line point, or a line if the selected point is the end
  */
 static void *
-RemoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+RemoveLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   PointType other;
   struct rlp_info info;
@@ -394,7 +394,7 @@ RemoveLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * removes a line from a layer 
  */
 void *
-RemoveLine (LayerTypePtr Layer, LineTypePtr Line)
+RemoveLine (LayerType *Layer, LineType *Line)
 {
   /* erase from screen */
   if (Layer->On)
@@ -411,7 +411,7 @@ RemoveLine (LayerTypePtr Layer, LineTypePtr Line)
  * removes an arc from a layer 
  */
 void *
-RemoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
+RemoveArc (LayerType *Layer, ArcType *Arc)
 {
   /* erase from screen */
   if (Layer->On)
@@ -428,7 +428,7 @@ RemoveArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * removes a text from a layer
  */
 void *
-RemoveText (LayerTypePtr Layer, TextTypePtr Text)
+RemoveText (LayerType *Layer, TextType *Text)
 {
   /* erase from screen */
   if (Layer->On)
@@ -445,7 +445,7 @@ RemoveText (LayerTypePtr Layer, TextTypePtr Text)
  * removes a polygon from a layer
  */
 void *
-RemovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
+RemovePolygon (LayerType *Layer, PolygonType *Polygon)
 {
   /* erase from screen */
   if (Layer->On)
@@ -463,8 +463,8 @@ RemovePolygon (LayerTypePtr Layer, PolygonTypePtr Polygon)
  * If removing the outer contour, it removes the whole polygon.
  */
 static void *
-RemovePolygonContour (LayerTypePtr Layer,
-                      PolygonTypePtr Polygon,
+RemovePolygonContour (LayerType *Layer,
+                      PolygonType *Polygon,
                       Cardinal contour)
 {
   Cardinal contour_start, contour_end, contour_points;
@@ -513,8 +513,8 @@ RemovePolygonContour (LayerTypePtr Layer,
  * removes a polygon-point from a polygon
  */
 static void *
-RemovePolygonPoint (LayerTypePtr Layer,
-		    PolygonTypePtr Polygon, PointTypePtr Point)
+RemovePolygonPoint (LayerType *Layer,
+		    PolygonType *Polygon, PointType *Point)
 {
   Cardinal point_idx;
   Cardinal i;
@@ -567,7 +567,7 @@ RemovePolygonPoint (LayerTypePtr Layer,
  * removes an element
  */
 void *
-RemoveElement (ElementTypePtr Element)
+RemoveElement (ElementType *Element)
 {
   /* erase from screen */
   if ((PCB->ElementOn || PCB->PinOn) &&
@@ -644,7 +644,7 @@ DeleteRats (bool selected)
  * allocated memory is destroyed assumed to already be erased
  */
 void *
-DestroyObject (DataTypePtr Target, int Type, void *Ptr1,
+DestroyObject (DataType *Target, int Type, void *Ptr1,
 	       void *Ptr2, void *Ptr3)
 {
   DestroyTarget = Target;
diff --git a/src/remove.h b/src/remove.h
index 9066428..f1f4596 100644
--- a/src/remove.h
+++ b/src/remove.h
@@ -39,16 +39,16 @@
 	(VIA_TYPE | LINEPOINT_TYPE | LINE_TYPE | TEXT_TYPE | ELEMENT_TYPE |	\
 	POLYGONPOINT_TYPE | POLYGON_TYPE | RATLINE_TYPE | ARC_TYPE)
 
-void *RemoveLine (LayerTypePtr, LineTypePtr);
-void *RemoveArc (LayerTypePtr, ArcTypePtr);
-void *RemovePolygon (LayerTypePtr, PolygonTypePtr);
-void *RemoveText (LayerTypePtr, TextTypePtr);
-void *RemoveElement (ElementTypePtr);
+void *RemoveLine (LayerType *, LineType *);
+void *RemoveArc (LayerType *, ArcType *);
+void *RemovePolygon (LayerType *, PolygonType *);
+void *RemoveText (LayerType *, TextType *);
+void *RemoveElement (ElementType *);
 void ClearRemoveList (void);
-void RemovePCB (PCBTypePtr);
+void RemovePCB (PCBType *);
 bool RemoveSelected (void);
 bool DeleteRats (bool);
 void *RemoveObject (int, void *, void *, void *);
-void *DestroyObject (DataTypePtr, int, void *, void *, void *);
+void *DestroyObject (DataType *, int, void *, void *, void *);
 
 #endif
diff --git a/src/report.c b/src/report.c
index d461bd2..64db36a 100644
--- a/src/report.c
+++ b/src/report.c
@@ -70,7 +70,7 @@
 static int
 ReportDrills (int argc, char **argv, Coord x, Coord y)
 {
-  DrillInfoTypePtr AllDrills;
+  DrillInfoType *AllDrills;
   Cardinal n;
   char *stringlist, *thestring;
   int total_drills = 0;
@@ -145,7 +145,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
     {
     case VIA_TYPE:
       {
-	PinTypePtr via;
+	PinType *via;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -153,7 +153,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	via = (PinTypePtr) ptr2;
+	via = (PinType *) ptr2;
 	if (TEST_FLAG (HOLEFLAG, via))
 	  pcb_sprintf (&report[0], "%m+VIA ID# %ld; Flags:%s\n"
 		   "(X,Y) = %$mD.\n"
@@ -184,8 +184,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       }
     case PIN_TYPE:
       {
-	PinTypePtr Pin;
-	ElementTypePtr element;
+	PinType *Pin;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -193,8 +193,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	Pin = (PinTypePtr) ptr2;
-	element = (ElementTypePtr) ptr1;
+	Pin = (PinType *) ptr2;
+	element = (ElementType *) ptr1;
 
 	PIN_LOOP (element);
 	{
@@ -235,16 +235,16 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       }
     case LINE_TYPE:
       {
-	LineTypePtr line;
+	LineType *line;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->line_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	line = (LineTypePtr) ptr2;
+	line = (LineType *) ptr2;
 	pcb_sprintf (&report[0], "%m+LINE ID# %ld;  Flags:%s\n"
 		 "FirstPoint(X,Y)  = %$mD, ID = %ld.\n"
 		 "SecondPoint(X,Y) = %$mD, ID = %ld.\n"
@@ -256,14 +256,14 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 line->Point1.X, line->Point1.Y, line->Point1.ID,
 		 line->Point2.X, line->Point2.Y, line->Point2.ID,
 		 line->Thickness, line->Clearance / 2,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
 		 UNKNOWN (line->Number),
 		 TEST_FLAG (LOCKFLAG, line) ? "It is LOCKED.\n" : "");
 	break;
       }
     case RATLINE_TYPE:
       {
-	RatTypePtr line;
+	RatType *line;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -271,7 +271,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	line = (RatTypePtr) ptr2;
+	line = (RatType *) ptr2;
 	pcb_sprintf (&report[0], "%m+RAT-LINE ID# %ld;  Flags:%s\n"
 		 "FirstPoint(X,Y)  = %$mD; ID = %ld; "
 		 "connects to layer group %d.\n"
@@ -286,17 +286,17 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       }
     case ARC_TYPE:
       {
-	ArcTypePtr Arc;
-	BoxTypePtr box;
+	ArcType *Arc;
+	BoxType *box;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->arc_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	Arc = (ArcTypePtr) ptr2;
+	Arc = (ArcType *) ptr2;
 	box = GetArcEnds (Arc);
 
 	pcb_sprintf (&report[0], "%m+ARC ID# %ld;  Flags:%s\n"
@@ -315,22 +315,22 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 Arc->BoundingBox.X2, Arc->BoundingBox.Y2,
 		 box->X1, box->Y1,
 		 box->X2, box->Y2,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
 		 TEST_FLAG (LOCKFLAG, Arc) ? "It is LOCKED.\n" : "");
 	break;
       }
     case POLYGON_TYPE:
       {
-	PolygonTypePtr Polygon;
+	PolygonType *Polygon;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
-	    LayerTypePtr layer = (LayerTypePtr) ptr1;
+	    LayerType *layer = (LayerType *) ptr1;
 	    __r_dump_tree (layer->polygon_tree->root, 0);
 	    return 0;
 	  }
 #endif
-	Polygon = (PolygonTypePtr) ptr2;
+	Polygon = (PolygonType *) ptr2;
 
 	pcb_sprintf (&report[0], "%m+POLYGON ID# %ld;  Flags:%s\n"
 		 "Its bounding box is %$mD %$mD.\n"
@@ -343,15 +343,15 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 		 Polygon->BoundingBox.X2, Polygon->BoundingBox.Y2,
 		 Polygon->PointN, Polygon->PointMax - Polygon->PointN,
 		 Polygon->HoleIndexN,
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1),
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1),
 		 TEST_FLAG (LOCKFLAG, Polygon) ? "It is LOCKED.\n" : "");
 	break;
       }
     case PAD_TYPE:
       {
 	Coord len;
-	PadTypePtr Pad;
-	ElementTypePtr element;
+	PadType *Pad;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -359,8 +359,8 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	Pad = (PadTypePtr) ptr2;
-	element = (ElementTypePtr) ptr1;
+	Pad = (PadType *) ptr2;
+	element = (ElementType *) ptr1;
 
 	PAD_LOOP (element);
 	{
@@ -399,7 +399,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
       }
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element;
+	ElementType *element;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -407,7 +407,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	element = (ElementTypePtr) ptr2;
+	element = (ElementType *) ptr2;
 	pcb_sprintf (&report[0], "%m+ELEMENT ID# %ld;  Flags:%s\n"
 		 "BoundingBox %$mD %$mD.\n"
 		 "Descriptive Name \"%s\".\n"
@@ -435,7 +435,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 #ifndef NDEBUG
       if (gui->shift_is_pressed ())
 	{
-	  LayerTypePtr layer = (LayerTypePtr) ptr1;
+	  LayerType *layer = (LayerType *) ptr1;
 	  __r_dump_tree (layer->text_tree->root, 0);
 	  return 0;
 	}
@@ -443,7 +443,7 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
     case ELEMENTNAME_TYPE:
       {
 	char laynum[32];
-	TextTypePtr text;
+	TextType *text;
 #ifndef NDEBUG
 	if (gui->shift_is_pressed ())
 	  {
@@ -451,11 +451,11 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
 	    return 0;
 	  }
 #endif
-	text = (TextTypePtr) ptr2;
+	text = (TextType *) ptr2;
 
 	if (type == TEXT_TYPE)
 	  sprintf (laynum, "It is on layer %d.",
-		   GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1));
+		   GetLayerNumber (PCB->Data, (LayerType *) ptr1));
 	pcb_sprintf (&report[0], "%m+TEXT ID# %ld;  Flags:%s\n"
 		 "Located at (X,Y) = %$mD.\n"
 		 "Characters are %$mS tall.\n"
@@ -475,13 +475,13 @@ ReportDialog (int argc, char **argv, Coord x, Coord y)
     case LINEPOINT_TYPE:
     case POLYGONPOINT_TYPE:
       {
-	PointTypePtr point = (PointTypePtr) ptr2;
+	PointType *point = (PointType *) ptr2;
 	pcb_sprintf (&report[0], "%m+POINT ID# %ld.\n"
 		 "Located at (X,Y) = %$mD.\n"
 		 "It belongs to a %s on layer %d.\n", USER_UNITMASK, point->ID,
 		 point->X, point->Y,
 		 (type == LINEPOINT_TYPE) ? "line" : "polygon",
-		 GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1));
+		 GetLayerNumber (PCB->Data, (LayerType *) ptr1));
 	break;
       }
     case NO_TYPE:
diff --git a/src/rotate.c b/src/rotate.c
index 99f379d..fb23ba1 100644
--- a/src/rotate.c
+++ b/src/rotate.c
@@ -57,11 +57,11 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void *RotateText (LayerTypePtr, TextTypePtr);
-static void *RotateArc (LayerTypePtr, ArcTypePtr);
-static void *RotateElement (ElementTypePtr);
-static void *RotateElementName (ElementTypePtr);
-static void *RotateLinePoint (LayerTypePtr, LineTypePtr, PointTypePtr);
+static void *RotateText (LayerType *, TextType *);
+static void *RotateArc (LayerType *, ArcType *);
+static void *RotateElement (ElementType *);
+static void *RotateElementName (ElementType *);
+static void *RotateLinePoint (LayerType *, LineType *, PointType *);
 
 /* ----------------------------------------------------------------------
  * some local identifiers
@@ -87,7 +87,7 @@ static ObjectFunctionType RotateFunctions = {
  * rotates a point in 90 degree steps
  */
 void
-RotatePointLowLevel (PointTypePtr Point, Coord X, Coord Y, unsigned Number)
+RotatePointLowLevel (PointType *Point, Coord X, Coord Y, unsigned Number)
 {
   ROTATE (Point->X, Point->Y, X, Y, Number);
 }
@@ -96,7 +96,7 @@ RotatePointLowLevel (PointTypePtr Point, Coord X, Coord Y, unsigned Number)
  * rotates a line in 90 degree steps
  */
 void
-RotateLineLowLevel (LineTypePtr Line, Coord X, Coord Y, unsigned Number)
+RotateLineLowLevel (LineType *Line, Coord X, Coord Y, unsigned Number)
 {
   ROTATE (Line->Point1.X, Line->Point1.Y, X, Y, Number);
   ROTATE (Line->Point2.X, Line->Point2.Y, X, Y, Number);
@@ -131,7 +131,7 @@ RotateLineLowLevel (LineTypePtr Line, Coord X, Coord Y, unsigned Number)
  * is done by the drawing routines
  */
 void
-RotateTextLowLevel (TextTypePtr Text, Coord X, Coord Y, unsigned Number)
+RotateTextLowLevel (TextType *Text, Coord X, Coord Y, unsigned Number)
 {
   BYTE number;
 
@@ -150,7 +150,7 @@ RotateTextLowLevel (TextTypePtr Text, Coord X, Coord Y, unsigned Number)
  * rotates a polygon in 90 degree steps
  */
 void
-RotatePolygonLowLevel (PolygonTypePtr Polygon, Coord X, Coord Y, unsigned Number)
+RotatePolygonLowLevel (PolygonType *Polygon, Coord X, Coord Y, unsigned Number)
 {
   POLYGONPOINT_LOOP (Polygon);
   {
@@ -164,13 +164,13 @@ RotatePolygonLowLevel (PolygonTypePtr Polygon, Coord X, Coord Y, unsigned Number
  * rotates a text object and redraws it
  */
 static void *
-RotateText (LayerTypePtr Layer, TextTypePtr Text)
+RotateText (LayerType *Layer, TextType *Text)
 {
   EraseText (Layer, Text);
   RestoreToPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
-  r_delete_entry (Layer->text_tree, (BoxTypePtr) Text);
+  r_delete_entry (Layer->text_tree, (BoxType *) Text);
   RotateTextLowLevel (Text, CenterX, CenterY, Number);
-  r_insert_entry (Layer->text_tree, (BoxTypePtr) Text, 0);
+  r_insert_entry (Layer->text_tree, (BoxType *) Text, 0);
   ClearFromPolygon (PCB->Data, TEXT_TYPE, Layer, Text);
   DrawText (Layer, Text);
   Draw ();
@@ -181,7 +181,7 @@ RotateText (LayerTypePtr Layer, TextTypePtr Text)
  * rotates an arc
  */
 void
-RotateArcLowLevel (ArcTypePtr Arc, Coord X, Coord Y, unsigned Number)
+RotateArcLowLevel (ArcType *Arc, Coord X, Coord Y, unsigned Number)
 {
   Coord save;
 
@@ -205,7 +205,7 @@ RotateArcLowLevel (ArcTypePtr Arc, Coord X, Coord Y, unsigned Number)
  * rotate an element in 90 degree steps
  */
 void
-RotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
+RotateElementLowLevel (DataType *Data, ElementType *Element,
 		       Coord X, Coord Y, unsigned Number)
 {
   /* solder side objects need a different orientation */
@@ -258,28 +258,28 @@ RotateElementLowLevel (DataTypePtr Data, ElementTypePtr Element,
  * rotates a line's point
  */
 static void *
-RotateLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
+RotateLinePoint (LayerType *Layer, LineType *Line, PointType *Point)
 {
   EraseLine (Line);
   if (Layer)
     {
       RestoreToPolygon (PCB->Data, LINE_TYPE, Layer, Line);
-      r_delete_entry (Layer->line_tree, (BoxTypePtr) Line);
+      r_delete_entry (Layer->line_tree, (BoxType *) Line);
     }
   else
-    r_delete_entry (PCB->Data->rat_tree, (BoxTypePtr) Line);
+    r_delete_entry (PCB->Data->rat_tree, (BoxType *) Line);
   RotatePointLowLevel (Point, CenterX, CenterY, Number);
   SetLineBoundingBox (Line);
   if (Layer)
     {
-      r_insert_entry (Layer->line_tree, (BoxTypePtr) Line, 0);
+      r_insert_entry (Layer->line_tree, (BoxType *) Line, 0);
       ClearFromPolygon (PCB->Data, LINE_TYPE, Layer, Line);
       DrawLine (Layer, Line);
     }
   else
     {
-      r_insert_entry (PCB->Data->rat_tree, (BoxTypePtr) Line, 0);
-      DrawRat ((RatTypePtr) Line);
+      r_insert_entry (PCB->Data->rat_tree, (BoxType *) Line, 0);
+      DrawRat ((RatType *) Line);
     }
   Draw ();
   return (Line);
@@ -289,12 +289,12 @@ RotateLinePoint (LayerTypePtr Layer, LineTypePtr Line, PointTypePtr Point)
  * rotates an arc
  */
 static void *
-RotateArc (LayerTypePtr Layer, ArcTypePtr Arc)
+RotateArc (LayerType *Layer, ArcType *Arc)
 {
   EraseArc (Arc);
-  r_delete_entry (Layer->arc_tree, (BoxTypePtr) Arc);
+  r_delete_entry (Layer->arc_tree, (BoxType *) Arc);
   RotateArcLowLevel (Arc, CenterX, CenterY, Number);
-  r_insert_entry (Layer->arc_tree, (BoxTypePtr) Arc, 0);
+  r_insert_entry (Layer->arc_tree, (BoxType *) Arc, 0);
   DrawArc (Layer, Arc);
   Draw ();
   return (Arc);
@@ -304,7 +304,7 @@ RotateArc (LayerTypePtr Layer, ArcTypePtr Arc)
  * rotates an element
  */
 static void *
-RotateElement (ElementTypePtr Element)
+RotateElement (ElementType *Element)
 {
   EraseElement (Element);
   RotateElementLowLevel (PCB->Data, Element, CenterX, CenterY, Number);
@@ -317,7 +317,7 @@ RotateElement (ElementTypePtr Element)
  * rotates the name of an element
  */
 static void *
-RotateElementName (ElementTypePtr Element)
+RotateElementName (ElementType *Element)
 {
   EraseElementName (Element);
   ELEMENTTEXT_LOOP (Element);
@@ -336,7 +336,7 @@ RotateElementName (ElementTypePtr Element)
  * rotates a box in 90 degree steps 
  */
 void
-RotateBoxLowLevel (BoxTypePtr Box, Coord X, Coord Y, unsigned Number)
+RotateBoxLowLevel (BoxType *Box, Coord X, Coord Y, unsigned Number)
 {
   Coord x1 = Box->X1, y1 = Box->Y1, x2 = Box->X2, y2 = Box->Y2;
 
@@ -356,7 +356,7 @@ void *
 RotateObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 	      Coord X, Coord Y, unsigned Steps)
 {
-  RubberbandTypePtr ptr;
+  RubberbandType *ptr;
   void *ptr2;
   bool changed = false;
 
@@ -392,7 +392,7 @@ RotateObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
       else
 	{
 	  r_insert_entry (PCB->Data->rat_tree, (BoxType *) ptr->Line, 0);
-	  DrawRat ((RatTypePtr) ptr->Line);
+	  DrawRat ((RatType *) ptr->Line);
 	}
       Crosshair.AttachedObject.RubberbandN--;
       ptr++;
@@ -417,7 +417,7 @@ RotateScreenObject (Coord X, Coord Y, unsigned Steps)
   if ((type = SearchScreen (X, Y, ROTATE_TYPES, &ptr1, &ptr2,
 			    &ptr3)) != NO_TYPE)
     {
-      if (TEST_FLAG (LOCKFLAG, (ArcTypePtr) ptr2))
+      if (TEST_FLAG (LOCKFLAG, (ArcType *) ptr2))
 	{
 	  Message (_("Sorry, the object is locked\n"));
 	  return;
diff --git a/src/rotate.h b/src/rotate.h
index 2ac060e..85a9361 100644
--- a/src/rotate.h
+++ b/src/rotate.h
@@ -54,17 +54,17 @@
 #define	ROTATE_VIA_LOWLEVEL(v,x0,y0,n)	ROTATE((v)->X,(v)->Y,(x0),(y0),(n))
 #define	ROTATE_PIN_LOWLEVEL(p,x0,y0,n)	ROTATE((p)->X,(p)->Y,(x0),(y0),(n))
 #define	ROTATE_PAD_LOWLEVEL(p,x0,y0,n)	\
-	RotateLineLowLevel(((LineTypePtr) (p)),(x0),(y0),(n))
+	RotateLineLowLevel(((LineType *) (p)),(x0),(y0),(n))
 
 #define	ROTATE_TYPES	(ELEMENT_TYPE | TEXT_TYPE | ELEMENTNAME_TYPE | ARC_TYPE)
 
 
-void RotateLineLowLevel (LineTypePtr, Coord, Coord, unsigned);
-void RotateArcLowLevel (ArcTypePtr, Coord, Coord, unsigned);
-void RotateBoxLowLevel (BoxTypePtr, Coord, Coord, unsigned);
-void RotateTextLowLevel (TextTypePtr, Coord, Coord, unsigned);
-void RotatePolygonLowLevel (PolygonTypePtr, Coord, Coord, unsigned);
-void RotateElementLowLevel (DataTypePtr, ElementTypePtr, Coord, Coord, unsigned);
+void RotateLineLowLevel (LineType *, Coord, Coord, unsigned);
+void RotateArcLowLevel (ArcType *, Coord, Coord, unsigned);
+void RotateBoxLowLevel (BoxType *, Coord, Coord, unsigned);
+void RotateTextLowLevel (TextType *, Coord, Coord, unsigned);
+void RotatePolygonLowLevel (PolygonType *, Coord, Coord, unsigned);
+void RotateElementLowLevel (DataType *, ElementType *, Coord, Coord, unsigned);
 void *RotateObject (int, void *, void *, void *, Coord, Coord,
 		    unsigned);
 void RotateScreenObject (Coord, Coord, unsigned);
diff --git a/src/rubberband.c b/src/rubberband.c
index f5f7442..cd2c4f6 100644
--- a/src/rubberband.c
+++ b/src/rubberband.c
@@ -60,30 +60,30 @@
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static void CheckPadForRubberbandConnection (PadTypePtr);
-static void CheckPinForRubberbandConnection (PinTypePtr);
-static void CheckLinePointForRubberbandConnection (LayerTypePtr,
-						   LineTypePtr,
-						   PointTypePtr,
+static void CheckPadForRubberbandConnection (PadType *);
+static void CheckPinForRubberbandConnection (PinType *);
+static void CheckLinePointForRubberbandConnection (LayerType *,
+						   LineType *,
+						   PointType *,
 						   bool);
-static void CheckPolygonForRubberbandConnection (LayerTypePtr,
-						 PolygonTypePtr);
-static void CheckLinePointForRat (LayerTypePtr, PointTypePtr);
+static void CheckPolygonForRubberbandConnection (LayerType *,
+						 PolygonType *);
+static void CheckLinePointForRat (LayerType *, PointType *);
 static int rubber_callback (const BoxType * b, void *cl);
 
 struct rubber_info
 {
   Coord radius;
   Coord X, Y;
-  LineTypePtr line;
+  LineType *line;
   BoxType box;
-  LayerTypePtr layer;
+  LayerType *layer;
 };
 
 static int
 rubber_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct rubber_info *i = (struct rubber_info *) cl;
   double x, y, rad, dist1, dist2;
   Coord t;
@@ -219,7 +219,7 @@ rubber_callback (const BoxType * b, void *cl)
  * the line is added to the 'rubberband' list
  */
 static void
-CheckPadForRubberbandConnection (PadTypePtr Pad)
+CheckPadForRubberbandConnection (PadType *Pad)
 {
   Coord half = Pad->Thickness / 2;
   Cardinal i, group;
@@ -252,60 +252,60 @@ struct rinfo
 {
   int type;
   Cardinal group;
-  PinTypePtr pin;
-  PadTypePtr pad;
-  PointTypePtr point;
+  PinType *pin;
+  PadType *pad;
+  PointType *point;
 };
 
 static int
 rat_callback (const BoxType * box, void *cl)
 {
-  RatTypePtr rat = (RatTypePtr) box;
+  RatType *rat = (RatType *) box;
   struct rinfo *i = (struct rinfo *) cl;
 
   switch (i->type)
     {
     case PIN_TYPE:
       if (rat->Point1.X == i->pin->X && rat->Point1.Y == i->pin->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else if (rat->Point2.X == i->pin->X && rat->Point2.Y == i->pin->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     case PAD_TYPE:
       if (rat->Point1.X == i->pad->Point1.X &&
 	  rat->Point1.Y == i->pad->Point1.Y && rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == i->pad->Point1.X &&
 	    rat->Point2.Y == i->pad->Point1.Y && rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       else
 	if (rat->Point1.X == i->pad->Point2.X &&
 	    rat->Point1.Y == i->pad->Point2.Y && rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == i->pad->Point2.X &&
 	    rat->Point2.Y == i->pad->Point2.Y && rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       else
 	if (rat->Point1.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
 	    rat->Point1.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2 &&
 	    rat->group1 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->Point2.X == (i->pad->Point1.X + i->pad->Point2.X) / 2 &&
 	    rat->Point2.Y == (i->pad->Point1.Y + i->pad->Point2.Y) / 2 &&
 	    rat->group2 == i->group)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     case LINEPOINT_TYPE:
       if (rat->group1 == i->group &&
 	  rat->Point1.X == i->point->X && rat->Point1.Y == i->point->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point1);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point1);
       else
 	if (rat->group2 == i->group &&
 	    rat->Point2.X == i->point->X && rat->Point2.Y == i->point->Y)
-	CreateNewRubberbandEntry (NULL, (LineTypePtr) rat, &rat->Point2);
+	CreateNewRubberbandEntry (NULL, (LineType *) rat, &rat->Point2);
       break;
     default:
       Message ("hace: bad rubber-rat lookup callback\n");
@@ -314,7 +314,7 @@ rat_callback (const BoxType * box, void *cl)
 }
 
 static void
-CheckPadForRat (PadTypePtr Pad)
+CheckPadForRat (PadType *Pad)
 {
   struct rinfo info;
   Cardinal i;
@@ -329,7 +329,7 @@ CheckPadForRat (PadTypePtr Pad)
 }
 
 static void
-CheckPinForRat (PinTypePtr Pin)
+CheckPinForRat (PinType *Pin)
 {
   struct rinfo info;
 
@@ -340,7 +340,7 @@ CheckPinForRat (PinTypePtr Pin)
 }
 
 static void
-CheckLinePointForRat (LayerTypePtr Layer, PointTypePtr Point)
+CheckLinePointForRat (LayerType *Layer, PointType *Point)
 {
   struct rinfo info;
   info.group = GetLayerGroupNumberByPointer (Layer);
@@ -360,7 +360,7 @@ CheckLinePointForRat (LayerTypePtr Layer, PointTypePtr Point)
  * of failures that are immediately recognized
  */
 static void
-CheckPinForRubberbandConnection (PinTypePtr Pin)
+CheckPinForRubberbandConnection (PinType *Pin)
 {
   struct rubber_info info;
   Cardinal n;
@@ -394,9 +394,9 @@ CheckPinForRubberbandConnection (PinTypePtr Pin)
  * the scanned line is added to the 'rubberband' list
  */
 static void
-CheckLinePointForRubberbandConnection (LayerTypePtr Layer,
-				       LineTypePtr Line,
-				       PointTypePtr LinePoint,
+CheckLinePointForRubberbandConnection (LayerType *Layer,
+				       LineType *Line,
+				       PointType *LinePoint,
 				       bool Exact)
 {
   Cardinal group;
@@ -431,8 +431,8 @@ CheckLinePointForRubberbandConnection (LayerTypePtr Layer,
  * the scanned line is added to the 'rubberband' list
  */
 static void
-CheckPolygonForRubberbandConnection (LayerTypePtr Layer,
-				     PolygonTypePtr Polygon)
+CheckPolygonForRubberbandConnection (LayerType *Layer,
+				     PolygonType *Polygon)
 {
   Cardinal group;
 
@@ -485,7 +485,7 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) Ptr1;
+	ElementType *element = (ElementType *) Ptr1;
 
 	/* square pins are handled as if they are round. Speed
 	 * and readability is more important then the few %
@@ -506,8 +506,8 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 
     case LINE_TYPE:
       {
-	LayerTypePtr layer = (LayerTypePtr) Ptr1;
-	LineTypePtr line = (LineTypePtr) Ptr2;
+	LayerType *layer = (LayerType *) Ptr1;
+	LineType *line = (LineType *) Ptr2;
 	if (GetLayerNumber (PCB->Data, layer) < max_copper_layer)
 	  {
 	    CheckLinePointForRubberbandConnection (layer, line,
@@ -519,20 +519,20 @@ LookupRubberbandLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
       }
 
     case LINEPOINT_TYPE:
-      if (GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1) < max_copper_layer)
-	CheckLinePointForRubberbandConnection ((LayerTypePtr) Ptr1,
-					       (LineTypePtr) Ptr2,
-					       (PointTypePtr) Ptr3, true);
+      if (GetLayerNumber (PCB->Data, (LayerType *) Ptr1) < max_copper_layer)
+	CheckLinePointForRubberbandConnection ((LayerType *) Ptr1,
+					       (LineType *) Ptr2,
+					       (PointType *) Ptr3, true);
       break;
 
     case VIA_TYPE:
-      CheckPinForRubberbandConnection ((PinTypePtr) Ptr1);
+      CheckPinForRubberbandConnection ((PinType *) Ptr1);
       break;
 
     case POLYGON_TYPE:
-      if (GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1) < max_copper_layer)
-	CheckPolygonForRubberbandConnection ((LayerTypePtr) Ptr1,
-					     (PolygonTypePtr) Ptr2);
+      if (GetLayerNumber (PCB->Data, (LayerType *) Ptr1) < max_copper_layer)
+	CheckPolygonForRubberbandConnection ((LayerType *) Ptr1,
+					     (PolygonType *) Ptr2);
       break;
     }
 }
@@ -544,7 +544,7 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
     {
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) Ptr1;
+	ElementType *element = (ElementType *) Ptr1;
 
 	PIN_LOOP (element);
 	{
@@ -561,8 +561,8 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 
     case LINE_TYPE:
       {
-	LayerTypePtr layer = (LayerTypePtr) Ptr1;
-	LineTypePtr line = (LineTypePtr) Ptr2;
+	LayerType *layer = (LayerType *) Ptr1;
+	LineType *line = (LineType *) Ptr2;
 
 	CheckLinePointForRat (layer, &line->Point1);
 	CheckLinePointForRat (layer, &line->Point2);
@@ -570,11 +570,11 @@ LookupRatLines (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
       }
 
     case LINEPOINT_TYPE:
-      CheckLinePointForRat ((LayerTypePtr) Ptr1, (PointTypePtr) Ptr3);
+      CheckLinePointForRat ((LayerType *) Ptr1, (PointType *) Ptr3);
       break;
 
     case VIA_TYPE:
-      CheckPinForRat ((PinTypePtr) Ptr1);
+      CheckPinForRat ((PinType *) Ptr1);
       break;
     }
 }
diff --git a/src/search.c b/src/search.c
index 29271f0..5f4ea5e 100644
--- a/src/search.c
+++ b/src/search.c
@@ -58,37 +58,37 @@
 static double PosX, PosY;		/* search position for subroutines */
 static Coord SearchRadius;
 static BoxType SearchBox;
-static LayerTypePtr SearchLayer;
+static LayerType *SearchLayer;
 
 /* ---------------------------------------------------------------------------
  * some local prototypes.  The first parameter includes LOCKED_TYPE if we
  * want to include locked types in the search.
  */
-static bool SearchLineByLocation (int, LayerTypePtr *, LineTypePtr *,
-				     LineTypePtr *);
-static bool SearchArcByLocation (int, LayerTypePtr *, ArcTypePtr *,
-				    ArcTypePtr *);
-static bool SearchRatLineByLocation (int, RatTypePtr *, RatTypePtr *,
-					RatTypePtr *);
-static bool SearchTextByLocation (int, LayerTypePtr *, TextTypePtr *,
-				     TextTypePtr *);
-static bool SearchPolygonByLocation (int, LayerTypePtr *, PolygonTypePtr *,
-					PolygonTypePtr *);
-static bool SearchPinByLocation (int, ElementTypePtr *, PinTypePtr *,
-				    PinTypePtr *);
-static bool SearchPadByLocation (int, ElementTypePtr *, PadTypePtr *,
-				    PadTypePtr *, bool);
-static bool SearchViaByLocation (int, PinTypePtr *, PinTypePtr *,
-				    PinTypePtr *);
-static bool SearchElementNameByLocation (int, ElementTypePtr *,
-					    TextTypePtr *, TextTypePtr *,
+static bool SearchLineByLocation (int, LayerType **, LineType **,
+				     LineType **);
+static bool SearchArcByLocation (int, LayerType **, ArcType **,
+				    ArcType **);
+static bool SearchRatLineByLocation (int, RatType **, RatType **,
+					RatType **);
+static bool SearchTextByLocation (int, LayerType **, TextType **,
+				     TextType **);
+static bool SearchPolygonByLocation (int, LayerType **, PolygonType **,
+					PolygonType **);
+static bool SearchPinByLocation (int, ElementType **, PinType **,
+				    PinType **);
+static bool SearchPadByLocation (int, ElementType **, PadType **,
+				    PadType **, bool);
+static bool SearchViaByLocation (int, PinType **, PinType **,
+				    PinType **);
+static bool SearchElementNameByLocation (int, ElementType **,
+					    TextType **, TextType **,
 					    bool);
-static bool SearchLinePointByLocation (int, LayerTypePtr *, LineTypePtr *,
-					  PointTypePtr *);
-static bool SearchPointByLocation (int, LayerTypePtr *, PolygonTypePtr *,
-				      PointTypePtr *);
-static bool SearchElementByLocation (int, ElementTypePtr *,
-					ElementTypePtr *, ElementTypePtr *,
+static bool SearchLinePointByLocation (int, LayerType **, LineType **,
+					  PointType **);
+static bool SearchPointByLocation (int, LayerType **, PolygonType **,
+				      PointType **);
+static bool SearchElementByLocation (int, ElementType **,
+					ElementType **, ElementType **,
 					bool);
 
 /* ---------------------------------------------------------------------------
@@ -109,7 +109,7 @@ static int
 pinorvia_callback (const BoxType * box, void *cl)
 {
   struct ans_info *i = (struct ans_info *) cl;
-  PinTypePtr pin = (PinTypePtr) box;
+  PinType *pin = (PinType *) box;
   AnyObjectType *ptr1 = pin->Element ? pin->Element : pin;
 
   if (TEST_FLAG (i->locked, ptr1))
@@ -124,8 +124,8 @@ pinorvia_callback (const BoxType * box, void *cl)
 }
 
 static bool
-SearchViaByLocation (int locked, PinTypePtr * Via, PinTypePtr * Dummy1,
-		     PinTypePtr * Dummy2)
+SearchViaByLocation (int locked, PinType ** Via, PinType ** Dummy1,
+		     PinType ** Dummy2)
 {
   struct ans_info info;
 
@@ -152,8 +152,8 @@ SearchViaByLocation (int locked, PinTypePtr * Via, PinTypePtr * Dummy1,
  * starts with the newest element
  */
 static bool
-SearchPinByLocation (int locked, ElementTypePtr * Element, PinTypePtr * Pin,
-		     PinTypePtr * Dummy)
+SearchPinByLocation (int locked, ElementType ** Element, PinType ** Pin,
+		     PinType ** Dummy)
 {
   struct ans_info info;
 
@@ -176,7 +176,7 @@ SearchPinByLocation (int locked, ElementTypePtr * Element, PinTypePtr * Pin,
 static int
 pad_callback (const BoxType * b, void *cl)
 {
-  PadTypePtr pad = (PadTypePtr) b;
+  PadType *pad = (PadType *) b;
   struct ans_info *i = (struct ans_info *) cl;
   AnyObjectType *ptr1 = pad->Element;
   double sq_dist;
@@ -209,8 +209,8 @@ pad_callback (const BoxType * b, void *cl)
  * starts with the newest element
  */
 static bool
-SearchPadByLocation (int locked, ElementTypePtr * Element, PadTypePtr * Pad,
-		     PadTypePtr * Dummy, bool BackToo)
+SearchPadByLocation (int locked, ElementType ** Element, PadType ** Pad,
+		     PadType ** Dummy, bool BackToo)
 {
   struct ans_info info;
 
@@ -233,8 +233,8 @@ SearchPadByLocation (int locked, ElementTypePtr * Element, PadTypePtr * Pad,
 
 struct line_info
 {
-  LineTypePtr *Line;
-  PointTypePtr *Point;
+  LineType **Line;
+  PointType **Point;
   double least;
   jmp_buf env;
   int locked;
@@ -244,28 +244,28 @@ static int
 line_callback (const BoxType * box, void *cl)
 {
   struct line_info *i = (struct line_info *) cl;
-  LineTypePtr l = (LineTypePtr) box;
+  LineType *l = (LineType *) box;
 
   if (TEST_FLAG (i->locked, l))
     return 0;
 
-  if (!IsPointInPad (PosX, PosY, SearchRadius, (PadTypePtr)l))
+  if (!IsPointInPad (PosX, PosY, SearchRadius, (PadType *)l))
     return 0;
   *i->Line = l;
-  *i->Point = (PointTypePtr) l;
+  *i->Point = (PointType *) l;
   longjmp (i->env, 1);
   return 1;			/* never reached */
 }
 
 
 static bool
-SearchLineByLocation (int locked, LayerTypePtr * Layer, LineTypePtr * Line,
-		      LineTypePtr * Dummy)
+SearchLineByLocation (int locked, LayerType ** Layer, LineType ** Line,
+		      LineType ** Dummy)
 {
   struct line_info info;
 
   info.Line = Line;
-  info.Point = (PointTypePtr *) Dummy;
+  info.Point = (PointType **) Dummy;
   info.locked = (locked & LOCKED_TYPE) ? 0 : LOCKFLAG;
 
   *Layer = SearchLayer;
@@ -281,7 +281,7 @@ SearchLineByLocation (int locked, LayerTypePtr * Layer, LineTypePtr * Line,
 static int
 rat_callback (const BoxType * box, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) box;
+  LineType *line = (LineType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, line))
@@ -302,8 +302,8 @@ rat_callback (const BoxType * box, void *cl)
  * searches rat lines if they are visible
  */
 static bool
-SearchRatLineByLocation (int locked, RatTypePtr * Line, RatTypePtr * Dummy1,
-			 RatTypePtr * Dummy2)
+SearchRatLineByLocation (int locked, RatType ** Line, RatType ** Dummy1,
+			 RatType ** Dummy2)
 {
   struct ans_info info;
 
@@ -325,8 +325,8 @@ SearchRatLineByLocation (int locked, RatTypePtr * Line, RatTypePtr * Dummy1,
  */
 struct arc_info
 {
-  ArcTypePtr *Arc, *Dummy;
-  PointTypePtr *Point;
+  ArcType **Arc, **Dummy;
+  PointType **Point;
   double least;
   jmp_buf env;
   int locked;
@@ -336,7 +336,7 @@ static int
 arc_callback (const BoxType * box, void *cl)
 {
   struct arc_info *i = (struct arc_info *) cl;
-  ArcTypePtr a = (ArcTypePtr) box;
+  ArcType *a = (ArcType *) box;
 
   if (TEST_FLAG (i->locked, a))
     return 0;
@@ -351,8 +351,8 @@ arc_callback (const BoxType * box, void *cl)
 
 
 static bool
-SearchArcByLocation (int locked, LayerTypePtr * Layer, ArcTypePtr * Arc,
-		     ArcTypePtr * Dummy)
+SearchArcByLocation (int locked, LayerType ** Layer, ArcType ** Arc,
+		     ArcType ** Dummy)
 {
   struct arc_info info;
 
@@ -372,7 +372,7 @@ SearchArcByLocation (int locked, LayerTypePtr * Layer, ArcTypePtr * Arc,
 static int
 text_callback (const BoxType * box, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) box;
+  TextType *text = (TextType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, text))
@@ -390,8 +390,8 @@ text_callback (const BoxType * box, void *cl)
  * searches text on the SearchLayer
  */
 static bool
-SearchTextByLocation (int locked, LayerTypePtr * Layer, TextTypePtr * Text,
-		      TextTypePtr * Dummy)
+SearchTextByLocation (int locked, LayerType ** Layer, TextType ** Text,
+		      TextType ** Dummy)
 {
   struct ans_info info;
 
@@ -412,7 +412,7 @@ SearchTextByLocation (int locked, LayerTypePtr * Layer, TextTypePtr * Text,
 static int
 polygon_callback (const BoxType * box, void *cl)
 {
-  PolygonTypePtr polygon = (PolygonTypePtr) box;
+  PolygonType *polygon = (PolygonType *) box;
   struct ans_info *i = (struct ans_info *) cl;
 
   if (TEST_FLAG (i->locked, polygon))
@@ -431,8 +431,8 @@ polygon_callback (const BoxType * box, void *cl)
  * searches a polygon on the SearchLayer 
  */
 static bool
-SearchPolygonByLocation (int locked, LayerTypePtr * Layer,
-			 PolygonTypePtr * Polygon, PolygonTypePtr * Dummy)
+SearchPolygonByLocation (int locked, LayerType ** Layer,
+			 PolygonType ** Polygon, PolygonType ** Dummy)
 {
   struct ans_info info;
 
@@ -453,7 +453,7 @@ SearchPolygonByLocation (int locked, LayerTypePtr * Layer,
 static int
 linepoint_callback (const BoxType * b, void *cl)
 {
-  LineTypePtr line = (LineTypePtr) b;
+  LineType *line = (LineType *) b;
   struct line_info *i = (struct line_info *) cl;
   int ret_val = 0;
   double d;
@@ -486,8 +486,8 @@ linepoint_callback (const BoxType * b, void *cl)
  * searches a line-point on all the search layer
  */
 static bool
-SearchLinePointByLocation (int locked, LayerTypePtr * Layer,
-			   LineTypePtr * Line, PointTypePtr * Point)
+SearchLinePointByLocation (int locked, LayerType ** Layer,
+			   LineType ** Line, PointType ** Point)
 {
   struct line_info info;
   *Layer = SearchLayer;
@@ -505,7 +505,7 @@ SearchLinePointByLocation (int locked, LayerTypePtr * Layer,
 static int
 arcpoint_callback (const BoxType * b, void *cl)
 {
-  ArcTypePtr arc = (ArcTypePtr) b;
+  ArcType *arc = (ArcType *) b;
   struct arc_info *i = (struct arc_info *) cl;
   int ret_val = 0;
   double d;
@@ -557,8 +557,8 @@ SearchArcPointByLocation (int locked, LayerType **Layer,
  * in layerstack order
  */
 static bool
-SearchPointByLocation (int locked, LayerTypePtr * Layer,
-		       PolygonTypePtr * Polygon, PointTypePtr * Point)
+SearchPointByLocation (int locked, LayerType ** Layer,
+		       PolygonType ** Polygon, PointType ** Point)
 {
   double d, least;
   bool found = false;
@@ -589,9 +589,9 @@ SearchPointByLocation (int locked, LayerTypePtr * Layer,
 static int
 name_callback (const BoxType * box, void *cl)
 {
-  TextTypePtr text = (TextTypePtr) box;
+  TextType *text = (TextType *) box;
   struct ans_info *i = (struct ans_info *) cl;
-  ElementTypePtr element = (ElementTypePtr) text->Element;
+  ElementType *element = (ElementType *) text->Element;
   double newarea;
 
   if (TEST_FLAG (i->locked, text))
@@ -619,8 +619,8 @@ name_callback (const BoxType * box, void *cl)
  * the search starts with the last element and goes back to the beginning
  */
 static bool
-SearchElementNameByLocation (int locked, ElementTypePtr * Element,
-			     TextTypePtr * Text, TextTypePtr * Dummy,
+SearchElementNameByLocation (int locked, ElementType ** Element,
+			     TextType ** Text, TextType ** Dummy,
 			     bool BackToo)
 {
   struct ans_info info;
@@ -644,7 +644,7 @@ SearchElementNameByLocation (int locked, ElementTypePtr * Element,
 static int
 element_callback (const BoxType * box, void *cl)
 {
-  ElementTypePtr element = (ElementTypePtr) box;
+  ElementType *element = (ElementType *) box;
   struct ans_info *i = (struct ans_info *) cl;
   double newarea;
 
@@ -674,8 +674,8 @@ element_callback (const BoxType * box, void *cl)
  */
 static bool
 SearchElementByLocation (int locked,
-			 ElementTypePtr * Element,
-			 ElementTypePtr * Dummy1, ElementTypePtr * Dummy2,
+			 ElementType ** Element,
+			 ElementType ** Dummy1, ElementType ** Dummy2,
 			 bool BackToo)
 {
   struct ans_info info;
@@ -701,7 +701,7 @@ SearchElementByLocation (int locked,
  * checks if a point is on a pin
  */
 bool
-IsPointOnPin (Coord X, Coord Y, Coord Radius, PinTypePtr pin)
+IsPointOnPin (Coord X, Coord Y, Coord Radius, PinType *pin)
 {
   Coord t = PIN_SIZE (pin) / 2;
   if (TEST_FLAG (SQUAREFLAG, pin))
@@ -724,7 +724,7 @@ IsPointOnPin (Coord X, Coord Y, Coord Radius, PinTypePtr pin)
  * checks if a rat-line end is on a PV
  */
 bool
-IsPointOnLineEnd (Coord X, Coord Y, RatTypePtr Line)
+IsPointOnLineEnd (Coord X, Coord Y, RatType *Line)
 {
   if (((X == Line->Point1.X) && (Y == Line->Point1.Y)) ||
       ((X == Line->Point2.X) && (Y == Line->Point2.Y)))
@@ -765,7 +765,7 @@ IsPointOnLineEnd (Coord X, Coord Y, RatTypePtr Line)
  * by pythagorean theorem.
  */
 bool
-IsPointOnLine (Coord X, Coord Y, Coord Radius, LineTypePtr Line)
+IsPointOnLine (Coord X, Coord Y, Coord Radius, LineType *Line)
 {
   double D1, D2, L;
 
@@ -792,7 +792,7 @@ IsPointOnLine (Coord X, Coord Y, Coord Radius, LineTypePtr Line)
  * checks if a line crosses a rectangle
  */
 bool
-IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineTypePtr Line)
+IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineType *Line)
 {
   LineType line;
 
@@ -837,7 +837,7 @@ IsLineInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, LineTypePtr Line)
 }
 
 static int /*checks if a point (of null radius) is in a slanted rectangle*/
-IsPointInQuadrangle(PointType p[4], PointTypePtr l)
+IsPointInQuadrangle(PointType p[4], PointType *l)
 {
   Coord dx, dy, x, y;
   double prod0, prod1;
@@ -868,7 +868,7 @@ IsPointInQuadrangle(PointType p[4], PointTypePtr l)
  * Note: actually this quadrangle is a slanted rectangle
  */
 bool
-IsLineInQuadrangle (PointType p[4], LineTypePtr Line)
+IsLineInQuadrangle (PointType p[4], LineType *Line)
 {
   LineType line;
 
@@ -909,7 +909,7 @@ IsLineInQuadrangle (PointType p[4], LineTypePtr Line)
  * checks if an arc crosses a square
  */
 bool
-IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcTypePtr Arc)
+IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcType *Arc)
 {
   LineType line;
 
@@ -953,7 +953,7 @@ IsArcInRectangle (Coord X1, Coord Y1, Coord X2, Coord Y2, ArcTypePtr Arc)
  * Written to enable arbitrary pad directions; for rounded pads, too.
  */
 bool
-IsPointInPad (Coord X, Coord Y, Coord Radius, PadTypePtr Pad)
+IsPointInPad (Coord X, Coord Y, Coord Radius, PadType *Pad)
 {
   double r, Sin, Cos;
   Coord x; 
@@ -1027,7 +1027,7 @@ IsPointInPad (Coord X, Coord Y, Coord Radius, PadTypePtr Pad)
 }
 
 bool
-IsPointInBox (Coord X, Coord Y, BoxTypePtr box, Coord Radius)
+IsPointInBox (Coord X, Coord Y, BoxType *box, Coord Radius)
 {
   Coord width, height, range;
 
@@ -1076,7 +1076,7 @@ IsPointInBox (Coord X, Coord Y, BoxTypePtr box, Coord Radius)
  *       the radius.
  */
 bool
-IsPointOnArc (Coord X, Coord Y, Coord Radius, ArcTypePtr Arc)
+IsPointOnArc (Coord X, Coord Y, Coord Radius, ArcType *Arc)
 {
   /* Calculate angle of point from arc center */
   double p_dist = Distance (X, Y, Arc->X, Arc->Y);
@@ -1189,47 +1189,47 @@ SearchObjectByLocation (unsigned Type,
 
   if (Type & RATLINE_TYPE && PCB->RatOn &&
       SearchRatLineByLocation (locked,
-			       (RatTypePtr *) Result1,
-			       (RatTypePtr *) Result2,
-			       (RatTypePtr *) Result3))
+			       (RatType **) Result1,
+			       (RatType **) Result2,
+			       (RatType **) Result3))
     return (RATLINE_TYPE);
 
   if (Type & VIA_TYPE &&
       SearchViaByLocation (locked,
-			   (PinTypePtr *) Result1,
-			   (PinTypePtr *) Result2, (PinTypePtr *) Result3))
+			   (PinType **) Result1,
+			   (PinType **) Result2, (PinType **) Result3))
     return (VIA_TYPE);
 
   if (Type & PIN_TYPE &&
       SearchPinByLocation (locked,
-			   (ElementTypePtr *) pr1,
-			   (PinTypePtr *) pr2, (PinTypePtr *) pr3))
+			   (ElementType **) pr1,
+			   (PinType **) pr2, (PinType **) pr3))
     HigherAvail = PIN_TYPE;
 
   if (!HigherAvail && Type & PAD_TYPE &&
       SearchPadByLocation (locked,
-			   (ElementTypePtr *) pr1,
-			   (PadTypePtr *) pr2, (PadTypePtr *) pr3, false))
+			   (ElementType **) pr1,
+			   (PadType **) pr2, (PadType **) pr3, false))
     HigherAvail = PAD_TYPE;
 
   if (!HigherAvail && Type & ELEMENTNAME_TYPE &&
       SearchElementNameByLocation (locked,
-				   (ElementTypePtr *) pr1,
-				   (TextTypePtr *) pr2, (TextTypePtr *) pr3,
+				   (ElementType **) pr1,
+				   (TextType **) pr2, (TextType **) pr3,
 				   false))
     {
-      BoxTypePtr box = &((TextTypePtr) r2)->BoundingBox;
+      BoxType *box = &((TextType *) r2)->BoundingBox;
       HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1);
       HigherAvail = ELEMENTNAME_TYPE;
     }
 
   if (!HigherAvail && Type & ELEMENT_TYPE &&
       SearchElementByLocation (locked,
-			       (ElementTypePtr *) pr1,
-			       (ElementTypePtr *) pr2,
-			       (ElementTypePtr *) pr3, false))
+			       (ElementType **) pr1,
+			       (ElementType **) pr2,
+			       (ElementType **) pr3, false))
     {
-      BoxTypePtr box = &((ElementTypePtr) r1)->BoundingBox;
+      BoxType *box = &((ElementType *) r1)->BoundingBox;
       HigherBound = (double) (box->X2 - box->X1) * (double) (box->Y2 - box->Y1);
       HigherAvail = ELEMENT_TYPE;
     }
@@ -1251,58 +1251,58 @@ SearchObjectByLocation (unsigned Type,
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
 	      Type & POLYGONPOINT_TYPE &&
 	      SearchPointByLocation (locked,
-				     (LayerTypePtr *) Result1,
-				     (PolygonTypePtr *) Result2,
-				     (PointTypePtr *) Result3))
+				     (LayerType **) Result1,
+				     (PolygonType **) Result2,
+				     (PointType **) Result3))
 	    return (POLYGONPOINT_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
 	      Type & LINEPOINT_TYPE &&
 	      SearchLinePointByLocation (locked,
-					 (LayerTypePtr *) Result1,
-					 (LineTypePtr *) Result2,
-					 (PointTypePtr *) Result3))
+					 (LayerType **) Result1,
+					 (LineType **) Result2,
+					 (PointType **) Result3))
 	    return (LINEPOINT_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & LINE_TYPE
 	      && SearchLineByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (LineTypePtr *) Result2,
-				       (LineTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (LineType **) Result2,
+				       (LineType **) Result3))
 	    return (LINE_TYPE);
 
 	    if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 &&
 	      Type & ARCPOINT_TYPE &&
 	      SearchArcPointByLocation (locked,
-					(LayerTypePtr *) Result1,
-					(ArcTypePtr *) Result2,
-					(PointTypePtr *) Result3))
+					(LayerType **) Result1,
+					(ArcType **) Result2,
+					(PointType **) Result3))
 	    return (ARCPOINT_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & ARC_TYPE &&
 	      SearchArcByLocation (locked,
-				   (LayerTypePtr *) Result1,
-				   (ArcTypePtr *) Result2,
-				   (ArcTypePtr *) Result3))
+				   (LayerType **) Result1,
+				   (ArcType **) Result2,
+				   (ArcType **) Result3))
 	    return (ARC_TYPE);
 
 	  if ((HigherAvail & (PIN_TYPE | PAD_TYPE)) == 0 && Type & TEXT_TYPE
 	      && SearchTextByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (TextTypePtr *) Result2,
-				       (TextTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (TextType **) Result2,
+				       (TextType **) Result3))
 	    return (TEXT_TYPE);
 
 	  if (Type & POLYGON_TYPE &&
 	      SearchPolygonByLocation (locked,
-				       (LayerTypePtr *) Result1,
-				       (PolygonTypePtr *) Result2,
-				       (PolygonTypePtr *) Result3))
+				       (LayerType **) Result1,
+				       (PolygonType **) Result2,
+				       (PolygonType **) Result3))
 	    {
 	      if (HigherAvail)
 		{
-		  BoxTypePtr box =
-		    &(*(PolygonTypePtr *) Result2)->BoundingBox;
+		  BoxType *box =
+		    &(*(PolygonType **) Result2)->BoundingBox;
 		  double area =
 		    (double) (box->X2 - box->X1) * (double) (box->X2 - box->X1);
 		  if (HigherBound < area)
@@ -1354,23 +1354,23 @@ SearchObjectByLocation (unsigned Type,
 
   if (Type & PAD_TYPE &&
       SearchPadByLocation (locked,
-			   (ElementTypePtr *) Result1,
-			   (PadTypePtr *) Result2, (PadTypePtr *) Result3,
+			   (ElementType **) Result1,
+			   (PadType **) Result2, (PadType **) Result3,
 			   true))
     return (PAD_TYPE);
 
   if (Type & ELEMENTNAME_TYPE &&
       SearchElementNameByLocation (locked,
-				   (ElementTypePtr *) Result1,
-				   (TextTypePtr *) Result2,
-				   (TextTypePtr *) Result3, true))
+				   (ElementType **) Result1,
+				   (TextType **) Result2,
+				   (TextType **) Result3, true))
     return (ELEMENTNAME_TYPE);
 
   if (Type & ELEMENT_TYPE &&
       SearchElementByLocation (locked,
-			       (ElementTypePtr *) Result1,
-			       (ElementTypePtr *) Result2,
-			       (ElementTypePtr *) Result3, true))
+			       (ElementType **) Result1,
+			       (ElementType **) Result2,
+			       (ElementType **) Result3, true))
     return (ELEMENT_TYPE);
 
   return (NO_TYPE);
@@ -1385,7 +1385,7 @@ SearchObjectByLocation (unsigned Type,
  * A type value is returned too which is NO_TYPE if no objects has been found.
  */
 int
-SearchObjectByID (DataTypePtr Base,
+SearchObjectByID (DataType *Base,
 		  void **Result1, void **Result2, void **Result3, int ID,
 		  int type)
 {
@@ -1586,10 +1586,10 @@ SearchObjectByID (DataTypePtr Base,
  * searches for an element by its board name.
  * The function returns a pointer to the element, NULL if not found
  */
-ElementTypePtr
-SearchElementByName (DataTypePtr Base, char *Name)
+ElementType *
+SearchElementByName (DataType *Base, char *Name)
 {
-  ElementTypePtr result = NULL;
+  ElementType *result = NULL;
 
   ELEMENT_LOOP (Base);
   {
diff --git a/src/search.h b/src/search.h
index 30553dd..bdf460e 100644
--- a/src/search.h
+++ b/src/search.h
@@ -49,7 +49,7 @@
 	(POINT_IN_BOX((l)->Point1.X,(l)->Point1.Y,(b)) &&	\
 	POINT_IN_BOX((l)->Point2.X,(l)->Point2.Y,(b)))
 
-#define	PAD_IN_BOX(p,b)	LINE_IN_BOX((LineTypePtr)(p),(b))
+#define	PAD_IN_BOX(p,b)	LINE_IN_BOX((LineType *)(p),(b))
 
 #define	BOX_IN_BOX(b1,b)	\
 	((b1)->X1 >= (b)->X1 && (b1)->X2 <= (b)->X2 &&	\
@@ -70,19 +70,19 @@
 /* ---------------------------------------------------------------------------
  * prototypes
  */
-bool IsPointOnLine (Coord, Coord, Coord, LineTypePtr);
-bool IsPointOnPin (Coord, Coord, Coord, PinTypePtr);
-bool IsPointOnArc (Coord, Coord, Coord, ArcTypePtr);
-bool IsPointOnLineEnd (Coord, Coord, RatTypePtr);
-bool IsLineInRectangle (Coord, Coord, Coord, Coord, LineTypePtr);
-bool IsLineInQuadrangle (PointType p[4], LineTypePtr Line);
-bool IsArcInRectangle (Coord, Coord, Coord, Coord, ArcTypePtr);
-bool IsPointInPad (Coord, Coord, Coord, PadTypePtr);
-bool IsPointInBox (Coord, Coord, BoxTypePtr, Coord);
+bool IsPointOnLine (Coord, Coord, Coord, LineType *);
+bool IsPointOnPin (Coord, Coord, Coord, PinType *);
+bool IsPointOnArc (Coord, Coord, Coord, ArcType *);
+bool IsPointOnLineEnd (Coord, Coord, RatType *);
+bool IsLineInRectangle (Coord, Coord, Coord, Coord, LineType *);
+bool IsLineInQuadrangle (PointType p[4], LineType * Line);
+bool IsArcInRectangle (Coord, Coord, Coord, Coord, ArcType *);
+bool IsPointInPad (Coord, Coord, Coord, PadType *);
+bool IsPointInBox (Coord, Coord, BoxType *, Coord);
 int SearchObjectByLocation (unsigned, void **, void **, void **, Coord, Coord, Coord);
 int SearchScreen (Coord, Coord, int, void **, void **, void **);
 int SearchScreenGridSlop (Coord, Coord, int, void **, void **, void **);
-int SearchObjectByID (DataTypePtr, void **, void **, void **, int, int);
-ElementTypePtr SearchElementByName (DataTypePtr, char *);
+int SearchObjectByID (DataType *, void **, void **, void **, int, int);
+ElementType * SearchElementByName (DataType *, char *);
 
 #endif
diff --git a/src/select.c b/src/select.c
index 31ea28d..4cdc008 100644
--- a/src/select.c
+++ b/src/select.c
@@ -65,28 +65,28 @@ bool
 SelectObject (void)
 {
   void *ptr1, *ptr2, *ptr3;
-  LayerTypePtr layer;
+  LayerType *layer;
   int type;
 
   bool changed = true;
 
   type = SearchScreen (Crosshair.X, Crosshair.Y, SELECT_TYPES,
 		       &ptr1, &ptr2, &ptr3);
-  if (type == NO_TYPE || TEST_FLAG (LOCKFLAG, (PinTypePtr) ptr2))
+  if (type == NO_TYPE || TEST_FLAG (LOCKFLAG, (PinType *) ptr2))
     return (false);
   switch (type)
     {
     case VIA_TYPE:
       AddObjectToFlagUndoList (VIA_TYPE, ptr1, ptr1, ptr1);
-      TOGGLE_FLAG (SELECTEDFLAG, (PinTypePtr) ptr1);
-      DrawVia ((PinTypePtr) ptr1);
+      TOGGLE_FLAG (SELECTEDFLAG, (PinType *) ptr1);
+      DrawVia ((PinType *) ptr1);
       break;
 
     case LINE_TYPE:
       {
-	LineType *line = (LineTypePtr) ptr2;
+	LineType *line = (LineType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (LINE_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, line);
 	DrawLine (layer, line);
@@ -95,7 +95,7 @@ SelectObject (void)
 
     case RATLINE_TYPE:
       {
-	RatTypePtr rat = (RatTypePtr) ptr2;
+	RatType *rat = (RatType *) ptr2;
 
 	AddObjectToFlagUndoList (RATLINE_TYPE, ptr1, ptr1, ptr1);
 	TOGGLE_FLAG (SELECTEDFLAG, rat);
@@ -105,9 +105,9 @@ SelectObject (void)
 
     case ARC_TYPE:
       {
-	ArcType *arc = (ArcTypePtr) ptr2;
+	ArcType *arc = (ArcType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (ARC_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, arc);
 	DrawArc (layer, arc);
@@ -116,9 +116,9 @@ SelectObject (void)
 
     case TEXT_TYPE:
       {
-	TextType *text = (TextTypePtr) ptr2;
+	TextType *text = (TextType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (TEXT_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, text);
 	DrawText (layer, text);
@@ -127,9 +127,9 @@ SelectObject (void)
 
     case POLYGON_TYPE:
       {
-	PolygonType *poly = (PolygonTypePtr) ptr2;
+	PolygonType *poly = (PolygonType *) ptr2;
 
-	layer = (LayerTypePtr) ptr1;
+	layer = (LayerType *) ptr1;
 	AddObjectToFlagUndoList (POLYGON_TYPE, ptr1, ptr2, ptr2);
 	TOGGLE_FLAG (SELECTEDFLAG, poly);
 	DrawPolygon (layer, poly);
@@ -139,19 +139,19 @@ SelectObject (void)
 
     case PIN_TYPE:
       AddObjectToFlagUndoList (PIN_TYPE, ptr1, ptr2, ptr2);
-      TOGGLE_FLAG (SELECTEDFLAG, (PinTypePtr) ptr2);
-      DrawPin ((PinTypePtr) ptr2);
+      TOGGLE_FLAG (SELECTEDFLAG, (PinType *) ptr2);
+      DrawPin ((PinType *) ptr2);
       break;
 
     case PAD_TYPE:
       AddObjectToFlagUndoList (PAD_TYPE, ptr1, ptr2, ptr2);
-      TOGGLE_FLAG (SELECTEDFLAG, (PadTypePtr) ptr2);
-      DrawPad ((PadTypePtr) ptr2);
+      TOGGLE_FLAG (SELECTEDFLAG, (PadType *) ptr2);
+      DrawPad ((PadType *) ptr2);
       break;
 
     case ELEMENTNAME_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) ptr1;
+	ElementType *element = (ElementType *) ptr1;
 
 	/* select all names of the element */
 	ELEMENTTEXT_LOOP (element);
@@ -166,7 +166,7 @@ SelectObject (void)
 
     case ELEMENT_TYPE:
       {
-	ElementTypePtr element = (ElementTypePtr) ptr1;
+	ElementType *element = (ElementType *) ptr1;
 
 	/* select all pins and names of the element */
 	PIN_LOOP (element);
@@ -213,14 +213,14 @@ SelectObject (void)
  * returns true if the state of any object has changed
  */
 bool
-SelectBlock (BoxTypePtr Box, bool Flag)
+SelectBlock (BoxType *Box, bool Flag)
 {
   bool changed = false;
 
   if (PCB->RatOn || !Flag)
     RAT_LOOP (PCB->Data);
   {
-    if (LINE_IN_BOX ((LineTypePtr) line, Box) &&
+    if (LINE_IN_BOX ((LineType *) line, Box) &&
 	!TEST_FLAG (LOCKFLAG, line) && TEST_FLAG (SELECTEDFLAG, line) != Flag)
       {
 	AddObjectToFlagUndoList (RATLINE_TYPE, line, line, line);
@@ -438,71 +438,71 @@ SelectBlock (BoxTypePtr Box, bool Flag)
  * performs several operations on the passed object
  */
 void *
-ObjectOperation (ObjectFunctionTypePtr F,
+ObjectOperation (ObjectFunctionType *F,
 		 int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   switch (Type)
     {
     case LINE_TYPE:
       if (F->Line)
-	return (F->Line ((LayerTypePtr) Ptr1, (LineTypePtr) Ptr2));
+	return (F->Line ((LayerType *) Ptr1, (LineType *) Ptr2));
       break;
 
     case ARC_TYPE:
       if (F->Arc)
-	return (F->Arc ((LayerTypePtr) Ptr1, (ArcTypePtr) Ptr2));
+	return (F->Arc ((LayerType *) Ptr1, (ArcType *) Ptr2));
       break;
 
     case LINEPOINT_TYPE:
       if (F->LinePoint)
-	return (F->LinePoint ((LayerTypePtr) Ptr1, (LineTypePtr) Ptr2,
-			      (PointTypePtr) Ptr3));
+	return (F->LinePoint ((LayerType *) Ptr1, (LineType *) Ptr2,
+			      (PointType *) Ptr3));
       break;
 
     case TEXT_TYPE:
       if (F->Text)
-	return (F->Text ((LayerTypePtr) Ptr1, (TextTypePtr) Ptr2));
+	return (F->Text ((LayerType *) Ptr1, (TextType *) Ptr2));
       break;
 
     case POLYGON_TYPE:
       if (F->Polygon)
-	return (F->Polygon ((LayerTypePtr) Ptr1, (PolygonTypePtr) Ptr2));
+	return (F->Polygon ((LayerType *) Ptr1, (PolygonType *) Ptr2));
       break;
 
     case POLYGONPOINT_TYPE:
       if (F->Point)
-	return (F->Point ((LayerTypePtr) Ptr1, (PolygonTypePtr) Ptr2,
-			  (PointTypePtr) Ptr3));
+	return (F->Point ((LayerType *) Ptr1, (PolygonType *) Ptr2,
+			  (PointType *) Ptr3));
       break;
 
     case VIA_TYPE:
       if (F->Via)
-	return (F->Via ((PinTypePtr) Ptr1));
+	return (F->Via ((PinType *) Ptr1));
       break;
 
     case ELEMENT_TYPE:
       if (F->Element)
-	return (F->Element ((ElementTypePtr) Ptr1));
+	return (F->Element ((ElementType *) Ptr1));
       break;
 
     case PIN_TYPE:
       if (F->Pin)
-	return (F->Pin ((ElementTypePtr) Ptr1, (PinTypePtr) Ptr2));
+	return (F->Pin ((ElementType *) Ptr1, (PinType *) Ptr2));
       break;
 
     case PAD_TYPE:
       if (F->Pad)
-	return (F->Pad ((ElementTypePtr) Ptr1, (PadTypePtr) Ptr2));
+	return (F->Pad ((ElementType *) Ptr1, (PadType *) Ptr2));
       break;
 
     case ELEMENTNAME_TYPE:
       if (F->ElementName)
-	return (F->ElementName ((ElementTypePtr) Ptr1));
+	return (F->ElementName ((ElementType *) Ptr1));
       break;
 
     case RATLINE_TYPE:
       if (F->Rat)
-	return (F->Rat ((RatTypePtr) Ptr1));
+	return (F->Rat ((RatType *) Ptr1));
       break;
     }
   return (NULL);
@@ -515,7 +515,7 @@ ObjectOperation (ObjectFunctionTypePtr F,
  * returns true if anything has changed
  */
 bool
-SelectedOperation (ObjectFunctionTypePtr F, bool Reset, int type)
+SelectedOperation (ObjectFunctionType *F, bool Reset, int type)
 {
   bool changed = false;
 
diff --git a/src/select.h b/src/select.h
index 6d91278..3e0369f 100644
--- a/src/select.h
+++ b/src/select.h
@@ -37,9 +37,9 @@
 	 PIN_TYPE | PAD_TYPE | ELEMENTNAME_TYPE | RATLINE_TYPE | ARC_TYPE)
 
 bool SelectObject (void);
-bool SelectBlock (BoxTypePtr, bool);
-bool SelectedOperation (ObjectFunctionTypePtr, bool, int);
-void *ObjectOperation (ObjectFunctionTypePtr, int, void *, void *, void *);
+bool SelectBlock (BoxType *, bool);
+bool SelectedOperation (ObjectFunctionType *, bool, int);
+void *ObjectOperation (ObjectFunctionType *, int, void *, void *, void *);
 bool SelectConnection (bool);
 
 #if defined(HAVE_REGCOMP) || defined(HAVE_RE_COMP)
diff --git a/src/thermal.c b/src/thermal.c
index d2cfa95..2f91d7d 100644
--- a/src/thermal.c
+++ b/src/thermal.c
@@ -73,7 +73,7 @@
 #include <dmalloc.h>
 #endif
 
-static PCBTypePtr pcb;
+static PCBType *pcb;
 
 struct cent
 {
@@ -122,7 +122,7 @@ diag_line (Coord X, Coord Y, Coord l, Coord w, bool rt)
 }
 
 static POLYAREA *
-square_therm (PinTypePtr pin, Cardinal style)
+square_therm (PinType *pin, Cardinal style)
 {
   POLYAREA *p, *p2;
   PLINE *c;
@@ -356,7 +356,7 @@ square_therm (PinTypePtr pin, Cardinal style)
 }
 
 static POLYAREA *
-oct_therm (PinTypePtr pin, Cardinal style)
+oct_therm (PinType *pin, Cardinal style)
 {
   POLYAREA *p, *p2, *m;
   Coord t = 0.5 * pcb->ThermScale * pin->Clearance;
@@ -402,7 +402,7 @@ oct_therm (PinTypePtr pin, Cardinal style)
  *
  */
 POLYAREA *
-ThermPoly (PCBTypePtr p, PinTypePtr pin, Cardinal laynum)
+ThermPoly (PCBType *p, PinType *pin, Cardinal laynum)
 {
   ArcType a;
   POLYAREA *pa, *arc;
diff --git a/src/thermal.h b/src/thermal.h
index b252f4f..c476420 100644
--- a/src/thermal.h
+++ b/src/thermal.h
@@ -40,6 +40,6 @@
 #include "global.h"
 #include "mymem.h"
 
-POLYAREA * ThermPoly (PCBTypePtr, PinTypePtr, Cardinal);
+POLYAREA * ThermPoly (PCBType *, PinType *, Cardinal);
 
 #endif
diff --git a/src/toporouter.c b/src/toporouter.c
index d31c788..0a83569 100644
--- a/src/toporouter.c
+++ b/src/toporouter.c
@@ -5168,7 +5168,7 @@ gdouble
 export_pcb_drawline(guint layer, guint x0, guint y0, guint x1, guint y1, guint thickness, guint keepaway) 
 {
   gdouble d = 0.;
-  LineTypePtr line;
+  LineType *line;
   line = CreateDrawnLineOnLayer( LAYER_PTR(layer), x0, y0, x1, y1, 
       thickness, keepaway, 
       MakeFlags (AUTOFLAG | (TEST_FLAG (CLEARNEWFLAG, PCB) ? CLEARLINEFLAG : 0)));
@@ -5198,7 +5198,7 @@ export_pcb_drawarc(guint layer, toporouter_arc_t *a, guint thickness, guint keep
 {
   gdouble sa, da, theta;
   gdouble d = 0.;
-  ArcTypePtr arc;
+  ArcType *arc;
   gint wind;
 
   wind = coord_wind(a->x0, a->y0, a->x1, a->y1, vx(a->centre), vy(a->centre));
@@ -7665,8 +7665,8 @@ escape (int argc, char **argv, Coord x, Coord y)
   ALLPAD_LOOP(PCB->Data);
   {
     if( TEST_FLAG(SELECTEDFLAG, pad) ) {
-      PinTypePtr via;
-      LineTypePtr line;
+      PinType *via;
+      LineType *line;
 
       PadType *pad0 = element->Pad->data;
       PadType *pad1 = g_list_next (element->Pad)->data;
diff --git a/src/undo.c b/src/undo.c
index c3fc57e..ca41c74 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -81,14 +81,12 @@ static bool added_undo_between_increment_and_restore = false;
 typedef struct			/* information about a change command */
 {
   char *Name;
-}
-ChangeNameType, *ChangeNameTypePtr;
+} ChangeNameType;
 
 typedef struct			/* information about a move command */
 {
   Coord DX, DY;		/* movement vector */
-}
-MoveType, *MoveTypePtr;
+} MoveType;
 
 typedef struct			/* information about removed polygon points */
 {
@@ -96,42 +94,36 @@ typedef struct			/* information about removed polygon points */
   int ID;
   Cardinal Index;		/* index in a polygons array of points */
   bool last_in_contour;		/* Whether the point was the last in its contour */
-}
-RemovedPointType, *RemovedPointTypePtr;
+} RemovedPointType;
 
 typedef struct			/* information about rotation */
 {
   Coord CenterX, CenterY;	/* center of rotation */
   Cardinal Steps;		/* number of steps */
-}
-RotateType, *RotateTypePtr;
+} RotateType;
 
 typedef struct			/* information about moves between layers */
 {
   Cardinal OriginalLayer;	/* the index of the original layer */
-}
-MoveToLayerType, *MoveToLayerTypePtr;
+} MoveToLayerType;
 
 typedef struct			/* information about layer changes */
 {
   int old_index;
   int new_index;
-}
-LayerChangeType, *LayerChangeTypePtr;
+} LayerChangeType;
 
 typedef struct			/* information about poly clear/restore */
 {
   bool Clear;		/* true was clear, false was restore */
-  LayerTypePtr Layer;
-}
-ClearPolyType, *ClearPolyTypePtr;
+  LayerType *Layer;
+} ClearPolyType;
 
 typedef struct			/* information about netlist lib changes */
 {
-  LibraryTypePtr old;
-  LibraryTypePtr lib;
-}
-NetlistChangeType, *NetlistChangeTypePtr;
+  LibraryType *old;
+  LibraryType *lib;
+} NetlistChangeType;
 
 typedef struct			/* holds information about an operation */
 {
@@ -154,14 +146,13 @@ typedef struct			/* holds information about an operation */
     long int CopyID;
   }
   Data;
-}
-UndoListType, *UndoListTypePtr;
+} UndoListType;
 
 /* ---------------------------------------------------------------------------
  * some local variables
  */
-static DataTypePtr RemoveList = NULL;	/* list of removed objects */
-static UndoListTypePtr UndoList = NULL;	/* list of operations */
+static DataType *RemoveList = NULL;	/* list of removed objects */
+static UndoListType *UndoList = NULL;	/* list of operations */
 static int Serial = 1,		/* serial number */
   SavedSerial;
 static size_t UndoN, RedoN,	/* number of entries */
@@ -174,35 +165,35 @@ static bool andDraw = true;
 /* ---------------------------------------------------------------------------
  * some local prototypes
  */
-static UndoListTypePtr GetUndoSlot (int, int, int);
+static UndoListType *GetUndoSlot (int, int, int);
 static void DrawRecoveredObject (int, void *, void *, void *);
-static bool UndoRotate (UndoListTypePtr);
-static bool UndoChangeName (UndoListTypePtr);
-static bool UndoCopyOrCreate (UndoListTypePtr);
-static bool UndoMove (UndoListTypePtr);
-static bool UndoRemove (UndoListTypePtr);
-static bool UndoRemovePoint (UndoListTypePtr);
-static bool UndoInsertPoint (UndoListTypePtr);
-static bool UndoRemoveContour (UndoListTypePtr);
-static bool UndoInsertContour (UndoListTypePtr);
-static bool UndoMoveToLayer (UndoListTypePtr);
-static bool UndoFlag (UndoListTypePtr);
-static bool UndoMirror (UndoListTypePtr);
-static bool UndoChangeSize (UndoListTypePtr);
-static bool UndoChange2ndSize (UndoListTypePtr);
-static bool UndoChangeAngles (UndoListTypePtr);
-static bool UndoChangeClearSize (UndoListTypePtr);
-static bool UndoChangeMaskSize (UndoListTypePtr);
-static bool UndoClearPoly (UndoListTypePtr);
-static int PerformUndo (UndoListTypePtr);
+static bool UndoRotate (UndoListType *);
+static bool UndoChangeName (UndoListType *);
+static bool UndoCopyOrCreate (UndoListType *);
+static bool UndoMove (UndoListType *);
+static bool UndoRemove (UndoListType *);
+static bool UndoRemovePoint (UndoListType *);
+static bool UndoInsertPoint (UndoListType *);
+static bool UndoRemoveContour (UndoListType *);
+static bool UndoInsertContour (UndoListType *);
+static bool UndoMoveToLayer (UndoListType *);
+static bool UndoFlag (UndoListType *);
+static bool UndoMirror (UndoListType *);
+static bool UndoChangeSize (UndoListType *);
+static bool UndoChange2ndSize (UndoListType *);
+static bool UndoChangeAngles (UndoListType *);
+static bool UndoChangeClearSize (UndoListType *);
+static bool UndoChangeMaskSize (UndoListType *);
+static bool UndoClearPoly (UndoListType *);
+static int PerformUndo (UndoListType *);
 
 /* ---------------------------------------------------------------------------
  * adds a command plus some data to the undo list
  */
-static UndoListTypePtr
+static UndoListType *
 GetUndoSlot (int CommandType, int ID, int Kind)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   void *ptr1, *ptr2, *ptr3;
   int type;
   static size_t limit = UNDO_WARNING_SIZE;
@@ -220,7 +211,7 @@ GetUndoSlot (int CommandType, int ID, int Kind)
 
       UndoMax += STEP_UNDOLIST;
       size = UndoMax * sizeof (UndoListType);
-      UndoList = (UndoListTypePtr) realloc (UndoList, size);
+      UndoList = (UndoListType *) realloc (UndoList, size);
       memset (&UndoList[UndoN], 0, STEP_REMOVELIST * sizeof (UndoListType));
 
       /* ask user to flush the table because of it's size */
@@ -273,9 +264,9 @@ DrawRecoveredObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
   if (Type & (LINE_TYPE | TEXT_TYPE | POLYGON_TYPE | ARC_TYPE))
     {
-      LayerTypePtr layer;
+      LayerType *layer;
 
-      layer = LAYER_PTR (GetLayerNumber (RemoveList, (LayerTypePtr) Ptr1));
+      layer = LAYER_PTR (GetLayerNumber (RemoveList, (LayerType *) Ptr1));
       DrawObject (Type, (void *) layer, Ptr2);
     }
   else
@@ -287,7 +278,7 @@ DrawRecoveredObject (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
  * returns true if anything has been recovered
  */
 static bool
-UndoRotate (UndoListTypePtr Entry)
+UndoRotate (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -311,7 +302,7 @@ UndoRotate (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoClearPoly (UndoListTypePtr Entry)
+UndoClearPoly (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -335,7 +326,7 @@ UndoClearPoly (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoChangeName (UndoListTypePtr Entry)
+UndoChangeName (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -357,7 +348,7 @@ UndoChangeName (UndoListTypePtr Entry)
  * recovers an object from a 2ndSize change operation
  */
 static bool
-UndoChange2ndSize (UndoListTypePtr Entry)
+UndoChange2ndSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -368,10 +359,10 @@ UndoChange2ndSize (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = ((PinTypePtr) ptr2)->DrillingHole;
+      swap = ((PinType *) ptr2)->DrillingHole;
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->DrillingHole = Entry->Data.Size;
+      ((PinType *) ptr2)->DrillingHole = Entry->Data.Size;
       Entry->Data.Size = swap;
       DrawObject (type, ptr1, ptr2);
       return (true);
@@ -383,7 +374,7 @@ UndoChange2ndSize (UndoListTypePtr Entry)
  * recovers an object from a ChangeAngles change operation
  */
 static bool
-UndoChangeAngles (UndoListTypePtr Entry)
+UndoChangeAngles (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -394,9 +385,9 @@ UndoChangeAngles (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type == ARC_TYPE)
     {
-      LayerTypePtr Layer = (LayerTypePtr) ptr1;
-      ArcTypePtr a = (ArcTypePtr) ptr2;
-      r_delete_entry (Layer->arc_tree, (BoxTypePtr) a);
+      LayerType *Layer = (LayerType *) ptr1;
+      ArcType *a = (ArcType *) ptr2;
+      r_delete_entry (Layer->arc_tree, (BoxType *) a);
       old_sa = a->StartAngle;
       old_da = a->Delta;
       if (andDraw)
@@ -404,7 +395,7 @@ UndoChangeAngles (UndoListTypePtr Entry)
       a->StartAngle = Entry->Data.Move.DX;
       a->Delta = Entry->Data.Move.DY;
       SetArcBoundingBox (a);
-      r_insert_entry (Layer->arc_tree, (BoxTypePtr) a, 0);
+      r_insert_entry (Layer->arc_tree, (BoxType *) a, 0);
       Entry->Data.Move.DX = old_sa;
       Entry->Data.Move.DY = old_da;;
       DrawObject (type, ptr1, a);
@@ -417,7 +408,7 @@ UndoChangeAngles (UndoListTypePtr Entry)
  * recovers an object from a clearance size change operation
  */
 static bool
-UndoChangeClearSize (UndoListTypePtr Entry)
+UndoChangeClearSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -428,11 +419,11 @@ UndoChangeClearSize (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = ((PinTypePtr) ptr2)->Clearance;
+      swap = ((PinType *) ptr2)->Clearance;
       RestoreToPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->Clearance = Entry->Data.Size;
+      ((PinType *) ptr2)->Clearance = Entry->Data.Size;
       ClearFromPolygon (PCB->Data, type, ptr1, ptr2);
       Entry->Data.Size = swap;
       if (andDraw)
@@ -446,7 +437,7 @@ UndoChangeClearSize (UndoListTypePtr Entry)
  * recovers an object from a mask size change operation
  */
 static bool
-UndoChangeMaskSize (UndoListTypePtr Entry)
+UndoChangeMaskSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -459,13 +450,13 @@ UndoChangeMaskSize (UndoListTypePtr Entry)
     {
       swap =
 	(type ==
-	 PAD_TYPE ? ((PadTypePtr) ptr2)->Mask : ((PinTypePtr) ptr2)->Mask);
+	 PAD_TYPE ? ((PadType *) ptr2)->Mask : ((PinType *) ptr2)->Mask);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
       if (type == PAD_TYPE)
-	((PadTypePtr) ptr2)->Mask = Entry->Data.Size;
+	((PadType *) ptr2)->Mask = Entry->Data.Size;
       else
-	((PinTypePtr) ptr2)->Mask = Entry->Data.Size;
+	((PinType *) ptr2)->Mask = Entry->Data.Size;
       Entry->Data.Size = swap;
       if (andDraw)
 	DrawObject (type, ptr1, ptr2);
@@ -479,7 +470,7 @@ UndoChangeMaskSize (UndoListTypePtr Entry)
  * recovers an object from a Size change operation
  */
 static bool
-UndoChangeSize (UndoListTypePtr Entry)
+UndoChangeSize (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -492,11 +483,11 @@ UndoChangeSize (UndoListTypePtr Entry)
     {
       /* Wow! can any object be treated as a pin type for size change?? */
       /* pins, vias, lines, and arcs can. Text can't but it has it's own mechanism */
-      swap = ((PinTypePtr) ptr2)->Thickness;
+      swap = ((PinType *) ptr2)->Thickness;
       RestoreToPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
 	EraseObject (type, ptr1, ptr2);
-      ((PinTypePtr) ptr2)->Thickness = Entry->Data.Size;
+      ((PinType *) ptr2)->Thickness = Entry->Data.Size;
       Entry->Data.Size = swap;
       ClearFromPolygon (PCB->Data, type, ptr1, ptr2);
       if (andDraw)
@@ -510,7 +501,7 @@ UndoChangeSize (UndoListTypePtr Entry)
  * recovers an object from a FLAG change operation
  */
 static bool
-UndoFlag (UndoListTypePtr Entry)
+UndoFlag (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -523,7 +514,7 @@ UndoFlag (UndoListTypePtr Entry)
   if (type != NO_TYPE)
     {
       FlagType f1, f2;
-      PinTypePtr pin = (PinTypePtr) ptr2;
+      PinType *pin = (PinType *) ptr2;
 
       swap = pin->Flags;
 
@@ -557,7 +548,7 @@ UndoFlag (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMirror (UndoListTypePtr Entry)
+UndoMirror (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -567,7 +558,7 @@ UndoMirror (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type == ELEMENT_TYPE)
     {
-      ElementTypePtr element = (ElementTypePtr) ptr3;
+      ElementType *element = (ElementType *) ptr3;
       if (andDraw)
 	EraseElement (element);
       MirrorElementCoordinates (PCB->Data, element, Entry->Data.Move.DY);
@@ -584,7 +575,7 @@ UndoMirror (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoCopyOrCreate (UndoListTypePtr Entry)
+UndoCopyOrCreate (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -611,7 +602,7 @@ UndoCopyOrCreate (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMove (UndoListTypePtr Entry)
+UndoMove (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -635,7 +626,7 @@ UndoMove (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoRemove (UndoListTypePtr Entry)
+UndoRemove (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type;
@@ -660,7 +651,7 @@ UndoRemove (UndoListTypePtr Entry)
  * returns true if anything has been recovered
  */
 static bool
-UndoMoveToLayer (UndoListTypePtr Entry)
+UndoMoveToLayer (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   int type, swap;
@@ -670,7 +661,7 @@ UndoMoveToLayer (UndoListTypePtr Entry)
     SearchObjectByID (PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind);
   if (type != NO_TYPE)
     {
-      swap = GetLayerNumber (PCB->Data, (LayerTypePtr) ptr1);
+      swap = GetLayerNumber (PCB->Data, (LayerType *) ptr1);
       MoveObjectToLayer (type, ptr1, ptr2, ptr3,
 			 LAYER_PTR (Entry->Data.
 				    MoveToLayer.OriginalLayer), true);
@@ -685,10 +676,10 @@ UndoMoveToLayer (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoRemovePoint (UndoListTypePtr Entry)
+UndoRemovePoint (UndoListType *Entry)
 {
-  LayerTypePtr layer;
-  PolygonTypePtr polygon;
+  LayerType *layer;
+  PolygonType *polygon;
   void *ptr3;
   int type;
 
@@ -730,11 +721,11 @@ UndoRemovePoint (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoInsertPoint (UndoListTypePtr Entry)
+UndoInsertPoint (UndoListType *Entry)
 {
-  LayerTypePtr layer;
-  PolygonTypePtr polygon;
-  PointTypePtr pnt;
+  LayerType *layer;
+  PolygonType *polygon;
+  PointType *pnt;
   int type;
   Cardinal point_idx;
   Cardinal hole;
@@ -783,7 +774,7 @@ UndoInsertPoint (UndoListTypePtr Entry)
 }
 
 static bool
-UndoSwapCopiedObject (UndoListTypePtr Entry)
+UndoSwapCopiedObject (UndoListType *Entry)
 {
   void *ptr1, *ptr2, *ptr3;
   void *ptr1b, *ptr2b, *ptr3b;
@@ -818,7 +809,7 @@ UndoSwapCopiedObject (UndoListTypePtr Entry)
 
   obj = (AnyObjectType *)MoveObjectToBuffer (PCB->Data, RemoveList, type, ptr1, ptr2, ptr3);
   if (Entry->Kind == POLYGON_TYPE)
-    InitClip (PCB->Data, (LayerTypePtr)ptr1b, (PolygonType *)obj);
+    InitClip (PCB->Data, (LayerType *)ptr1b, (PolygonType *)obj);
   return (true);
 }
 
@@ -827,7 +818,7 @@ UndoSwapCopiedObject (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoRemoveContour (UndoListTypePtr Entry)
+UndoRemoveContour (UndoListType *Entry)
 {
   assert (Entry->Kind == POLYGON_TYPE);
   return UndoSwapCopiedObject (Entry);
@@ -838,7 +829,7 @@ UndoRemoveContour (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoInsertContour (UndoListTypePtr Entry)
+UndoInsertContour (UndoListType *Entry)
 {
   assert (Entry->Kind == POLYGON_TYPE);
   return UndoSwapCopiedObject (Entry);
@@ -849,9 +840,9 @@ UndoInsertContour (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoLayerChange (UndoListTypePtr Entry)
+UndoLayerChange (UndoListType *Entry)
 {
-  LayerChangeTypePtr l = &Entry->Data.LayerChange;
+  LayerChangeType *l = &Entry->Data.LayerChange;
   int tmp;
 
   tmp = l->new_index;
@@ -869,11 +860,11 @@ UndoLayerChange (UndoListTypePtr Entry)
  * returns true on success
  */
 static bool
-UndoNetlistChange (UndoListTypePtr Entry)
+UndoNetlistChange (UndoListType *Entry)
 {
-  NetlistChangeTypePtr l = & Entry->Data.NetlistChange;
+  NetlistChangeType *l = & Entry->Data.NetlistChange;
   unsigned int i, j;
-  LibraryTypePtr lib, saved;
+  LibraryType *lib, *saved;
 
   lib = l->lib;
   saved = l->old;
@@ -931,7 +922,7 @@ UndoNetlistChange (UndoListTypePtr Entry)
 int
 Undo (bool draw)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   int Types = 0;
   int unique;
   bool error_undoing = false;
@@ -1002,7 +993,7 @@ Undo (bool draw)
 }
 
 static int
-PerformUndo (UndoListTypePtr ptr)
+PerformUndo (UndoListType *ptr)
 {
   switch (ptr->Type)
     {
@@ -1117,7 +1108,7 @@ PerformUndo (UndoListTypePtr ptr)
 int
 Redo (bool draw)
 {
-  UndoListTypePtr ptr;
+  UndoListType *ptr;
   int Types = 0;
   bool error_undoing = false;
 
@@ -1223,7 +1214,7 @@ IncrementUndoSerialNumber (void)
 void
 ClearUndoList (bool Force)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (UndoN
       && (Force || gui->confirm_dialog ("OK to clear 'undo' buffer?", 0)))
@@ -1258,13 +1249,13 @@ void
 AddObjectToClearPolyUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			      bool clear)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_CLEAR, OBJECT_ID (Ptr3), Type);
       undo->Data.ClearPoly.Clear = clear;
-      undo->Data.ClearPoly.Layer = (LayerTypePtr) Ptr1;
+      undo->Data.ClearPoly.Layer = (LayerType *) Ptr1;
     }
 }
 
@@ -1275,7 +1266,7 @@ void
 AddObjectToMirrorUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			   Coord yoff)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1292,7 +1283,7 @@ AddObjectToRotateUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			   Coord CenterX, Coord CenterY,
 			   BYTE Steps)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1327,8 +1318,8 @@ void
 AddObjectToRemovePointUndoList (int Type,
 				void *Ptr1, void *Ptr2, Cardinal index)
 {
-  UndoListTypePtr undo;
-  PolygonTypePtr polygon = (PolygonTypePtr) Ptr2;
+  UndoListType *undo;
+  PolygonType *polygon = (PolygonType *) Ptr2;
   Cardinal hole;
   bool last_in_contour = false;
 
@@ -1378,7 +1369,7 @@ AddObjectToInsertPointUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 static void
 CopyObjectToUndoList (int undo_type, int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
   AnyObjectType *copy;
 
   if (Locked)
@@ -1421,7 +1412,7 @@ void
 AddObjectToMoveUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			 Coord DX, Coord DY)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1438,7 +1429,7 @@ void
 AddObjectToChangeNameUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 			       char *OldName)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1453,13 +1444,13 @@ AddObjectToChangeNameUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3,
 void
 AddObjectToMoveToLayerUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_MOVETOLAYER, OBJECT_ID (Ptr3), Type);
       undo->Data.MoveToLayer.OriginalLayer =
-	GetLayerNumber (PCB->Data, (LayerTypePtr) Ptr1);
+	GetLayerNumber (PCB->Data, (LayerType *) Ptr1);
     }
 }
 
@@ -1480,12 +1471,12 @@ AddObjectToCreateUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddObjectToFlagUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_FLAG, OBJECT_ID (Ptr2), Type);
-      undo->Data.Flags = ((PinTypePtr) Ptr2)->Flags;
+      undo->Data.Flags = ((PinType *) Ptr2)->Flags;
     }
 }
 
@@ -1495,7 +1486,7 @@ AddObjectToFlagUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1504,22 +1495,22 @@ AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((PinType *) ptr2)->Thickness;
 	  break;
 	case LINE_TYPE:
 	case ELEMENTLINE_TYPE:
-	  undo->Data.Size = ((LineTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((LineType *) ptr2)->Thickness;
 	  break;
 	case TEXT_TYPE:
 	case ELEMENTNAME_TYPE:
-	  undo->Data.Size = ((TextTypePtr) ptr2)->Scale;
+	  undo->Data.Size = ((TextType *) ptr2)->Scale;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((PadType *) ptr2)->Thickness;
 	  break;
 	case ARC_TYPE:
 	case ELEMENTARC_TYPE:
-	  undo->Data.Size = ((ArcTypePtr) ptr2)->Thickness;
+	  undo->Data.Size = ((ArcType *) ptr2)->Thickness;
 	  break;
 	}
     }
@@ -1531,7 +1522,7 @@ AddObjectToSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1540,16 +1531,16 @@ AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((PinType *) ptr2)->Clearance;
 	  break;
 	case LINE_TYPE:
-	  undo->Data.Size = ((LineTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((LineType *) ptr2)->Clearance;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((PadType *) ptr2)->Clearance;
 	  break;
 	case ARC_TYPE:
-	  undo->Data.Size = ((ArcTypePtr) ptr2)->Clearance;
+	  undo->Data.Size = ((ArcType *) ptr2)->Clearance;
 	  break;
 	}
     }
@@ -1561,7 +1552,7 @@ AddObjectToClearSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1570,10 +1561,10 @@ AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 	{
 	case PIN_TYPE:
 	case VIA_TYPE:
-	  undo->Data.Size = ((PinTypePtr) ptr2)->Mask;
+	  undo->Data.Size = ((PinType *) ptr2)->Mask;
 	  break;
 	case PAD_TYPE:
-	  undo->Data.Size = ((PadTypePtr) ptr2)->Mask;
+	  undo->Data.Size = ((PadType *) ptr2)->Mask;
 	  break;
 	}
     }
@@ -1585,13 +1576,13 @@ AddObjectToMaskSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectTo2ndSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
       undo = GetUndoSlot (UNDO_CHANGE2NDSIZE, OBJECT_ID (ptr2), Type);
       if (Type == PIN_TYPE || Type == VIA_TYPE)
-	undo->Data.Size = ((PinTypePtr) ptr2)->DrillingHole;
+	undo->Data.Size = ((PinType *) ptr2)->DrillingHole;
     }
 }
 
@@ -1602,8 +1593,8 @@ AddObjectTo2ndSizeUndoList (int Type, void *ptr1, void *ptr2, void *ptr3)
 void
 AddObjectToChangeAnglesUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 {
-  UndoListTypePtr undo;
-  ArcTypePtr a = (ArcTypePtr) Ptr3;
+  UndoListType *undo;
+  ArcType *a = (ArcType *) Ptr3;
 
   if (!Locked)
     {
@@ -1619,7 +1610,7 @@ AddObjectToChangeAnglesUndoList (int Type, void *Ptr1, void *Ptr2, void *Ptr3)
 void
 AddLayerChangeToUndoList (int old_index, int new_index)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
 
   if (!Locked)
     {
@@ -1633,11 +1624,11 @@ AddLayerChangeToUndoList (int old_index, int new_index)
  * adds a netlist change to the undo list
  */
 void
-AddNetlistLibToUndoList (LibraryTypePtr lib)
+AddNetlistLibToUndoList (LibraryType *lib)
 {
-  UndoListTypePtr undo;
+  UndoListType *undo;
   unsigned int i, j;
-  LibraryTypePtr old;
+  LibraryType *old;
   
   if (!Locked)
     {
@@ -1646,11 +1637,11 @@ AddNetlistLibToUndoList (LibraryTypePtr lib)
       undo->Data.NetlistChange.lib = lib;
 
       /* and what the old data is that we'll need to restore */
-      undo->Data.NetlistChange.old = (LibraryTypePtr)malloc (sizeof (LibraryType));
+      undo->Data.NetlistChange.old = (LibraryType *)malloc (sizeof (LibraryType));
       old = undo->Data.NetlistChange.old;
       old->MenuN = lib->MenuN;
       old->MenuMax = lib->MenuMax;
-      old->Menu = (LibraryMenuTypePtr)malloc (old->MenuMax * sizeof (LibraryMenuType));
+      old->Menu = (LibraryMenuType *)malloc (old->MenuMax * sizeof (LibraryMenuType));
       if (old->Menu == NULL)
 	{
 	  fprintf (stderr, "malloc() failed in %s\n", __FUNCTION__);
@@ -1674,7 +1665,7 @@ AddNetlistLibToUndoList (LibraryTypePtr lib)
 
       
 	  old->Menu[i].Entry = 
-	    (LibraryEntryTypePtr)malloc (old->Menu[i].EntryMax * sizeof (LibraryEntryType));
+	    (LibraryEntryType *)malloc (old->Menu[i].EntryMax * sizeof (LibraryEntryType));
 	  if (old->Menu[i].Entry == NULL)
 	    {
 	      fprintf (stderr, "malloc() failed in %s\n", __FUNCTION__);
diff --git a/src/undo.h b/src/undo.h
index 2ec6442..f415c3c 100644
--- a/src/undo.h
+++ b/src/undo.h
@@ -64,7 +64,7 @@ void AddObjectToMaskSizeUndoList (int, void *, void *, void *);
 void AddObjectToChangeAnglesUndoList (int, void *, void *, void *);
 void AddObjectToClearPolyUndoList (int, void *, void *, void *, bool);
 void AddLayerChangeToUndoList (int, int);
-void AddNetlistLibToUndoList (LibraryTypePtr);
+void AddNetlistLibToUndoList (LibraryType *);
 void LockUndo (void);
 void UnlockUndo (void);
 bool Undoing (void);
diff --git a/src/vendor.c b/src/vendor.c
index f7b89f7..fbed9f0 100644
--- a/src/vendor.c
+++ b/src/vendor.c
@@ -811,7 +811,7 @@ process_skips (Resource * res)
 }
 
 bool
-vendorIsElementMappable (ElementTypePtr element)
+vendorIsElementMappable (ElementType *element)
 {
   int i;
   int noskip;
diff --git a/src/vendor.h b/src/vendor.h
index 9706448..26e3dc5 100644
--- a/src/vendor.h
+++ b/src/vendor.h
@@ -24,6 +24,6 @@
 #define PCB_VENDOR_H
 
 int vendorDrillMap (int);
-bool vendorIsElementMappable (ElementTypePtr);
+bool vendorIsElementMappable (ElementType *);
 
 #endif /* __VENDOR_H__ */




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