Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 3396) +++ trunk/src/action_helper.c (revision 3397) @@ -150,7 +150,7 @@ int defer_needs_update = 0; -static Cardinal polyIndex = 0; +static pcb_cardinal_t polyIndex = 0; pcb_bool saved_mode = pcb_false; /* --------------------------------------------------------------------------- @@ -862,7 +862,7 @@ case PCB_MODE_POLYGON: { PointTypePtr points = Crosshair.AttachedPolygon.Points; - Cardinal n = Crosshair.AttachedPolygon.PointN; + pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; /* do update of position; use the 'PCB_MODE_LINE' mechanism */ NotifyLine(); @@ -928,7 +928,7 @@ case STATE_SECOND: { PointTypePtr points = Crosshair.AttachedPolygon.Points; - Cardinal n = Crosshair.AttachedPolygon.PointN; + pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; POLYAREA *original, *new_hole, *result; FlagType Flags; Index: trunk/src/action_helper.h =================================================================== --- trunk/src/action_helper.h (revision 3396) +++ trunk/src/action_helper.h (revision 3397) @@ -59,7 +59,7 @@ typedef struct { Coord X, Y; - Cardinal Buffer; + pcb_cardinal_t Buffer; pcb_bool Click; pcb_bool Moving; /* selected type clicked on */ int Hit; /* move type clicked on */ Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 3396) +++ trunk/src/buffer.c (revision 3397) @@ -529,7 +529,7 @@ pcb_bool SmashBufferElement(BufferTypePtr Buffer) { ElementTypePtr element; - Cardinal group; + pcb_cardinal_t group; LayerTypePtr clayer, slayer; if (elementlist_length(&Buffer->Data->Element) != 1) { @@ -631,8 +631,8 @@ pcb_bool ConvertBufferToElement(BufferTypePtr Buffer) { ElementTypePtr Element; - Cardinal group; - Cardinal pin_n = 1; + pcb_cardinal_t group; + pcb_cardinal_t pin_n = 1; pcb_bool hasParts = pcb_false, crooked = pcb_false; int onsolder; pcb_bool warned = pcb_false; @@ -1104,7 +1104,7 @@ static void SwapBuffer(BufferTypePtr Buffer) { int j, k; - Cardinal sgroup, cgroup; + pcb_cardinal_t sgroup, cgroup; LayerType swap; ELEMENT_LOOP(Buffer->Data); @@ -1182,8 +1182,8 @@ if (PCB->LayerGroups.Number[cgroup] == PCB->LayerGroups.Number[sgroup]) { for (j = k = 0; j < PCB->LayerGroups.Number[sgroup]; j++) { int t1, t2; - Cardinal cnumber = PCB->LayerGroups.Entries[cgroup][k]; - Cardinal snumber = PCB->LayerGroups.Entries[sgroup][j]; + pcb_cardinal_t cnumber = PCB->LayerGroups.Entries[cgroup][k]; + pcb_cardinal_t snumber = PCB->LayerGroups.Entries[sgroup][j]; if (snumber >= max_copper_layer) continue; Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 3396) +++ trunk/src/copy.c (revision 3397) @@ -82,8 +82,8 @@ */ PolygonTypePtr CopyPolygonLowLevel(PolygonTypePtr Dest, PolygonTypePtr Src) { - Cardinal hole = 0; - Cardinal n; + pcb_cardinal_t hole = 0; + pcb_cardinal_t n; for (n = 0; n < Src->PointN; n++) { if (hole < Src->HoleIndexN && n == Src->HoleIndex[hole]) { @@ -280,7 +280,7 @@ */ pcb_bool CopyPastebufferToLayout(Coord X, Coord Y) { - Cardinal i; + pcb_cardinal_t i; pcb_bool changed = pcb_false; #ifdef DEBUG Index: trunk/src/create.c =================================================================== --- trunk/src/create.c (revision 3396) +++ trunk/src/create.c (revision 3397) @@ -435,7 +435,7 @@ */ RatTypePtr CreateNewRat(DataTypePtr Data, Coord X1, Coord Y1, - Coord X2, Coord Y2, Cardinal group1, Cardinal group2, Coord Thickness, FlagType Flags) + Coord X2, Coord Y2, pcb_cardinal_t group1, pcb_cardinal_t group2, Coord Thickness, FlagType Flags) { RatTypePtr Line = GetRatMemory(Data); @@ -608,7 +608,7 @@ */ PolygonType *CreateNewHoleInPolygon(PolygonType * Polygon) { - Cardinal *holeindex = GetHoleIndexMemoryInPolygon(Polygon); + pcb_cardinal_t *holeindex = GetHoleIndexMemoryInPolygon(Polygon); *holeindex = Polygon->PointN; return Polygon; } Index: trunk/src/create.h =================================================================== --- trunk/src/create.h (revision 3396) +++ trunk/src/create.h (revision 3397) @@ -46,7 +46,7 @@ PinTypePtr CreateNewVia(DataTypePtr, Coord, Coord, Coord, Coord, Coord, Coord, const 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); +RatTypePtr CreateNewRat(DataTypePtr, Coord, Coord, Coord, Coord, pcb_cardinal_t, pcb_cardinal_t, 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); Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 3396) +++ trunk/src/crosshair.c (revision 3397) @@ -107,9 +107,9 @@ */ static void XORPolygon(PolygonTypePtr polygon, Coord dx, Coord dy, int dash_last) { - Cardinal i; + pcb_cardinal_t i; for (i = 0; i < polygon->PointN; i++) { - Cardinal next = next_contour_point(polygon, i); + pcb_cardinal_t next = next_contour_point(polygon, i); if (next == 0) { /* last line: sometimes the implicit closing line */ if (i == 1) /* corner case: don't draw two lines on top of each other - with XOR it looks bad */ @@ -279,7 +279,7 @@ */ static void XORDrawBuffer(BufferTypePtr Buffer) { - Cardinal i; + pcb_cardinal_t i; Coord x, y; /* set offset */ @@ -360,7 +360,7 @@ static void XORDrawMoveOrCopyObject(void) { RubberbandTypePtr ptr; - Cardinal i; + pcb_cardinal_t i; Coord dx = Crosshair.X - Crosshair.AttachedObject.X, dy = Crosshair.Y - Crosshair.AttachedObject.Y; switch (Crosshair.AttachedObject.Type) { @@ -416,7 +416,7 @@ { PolygonTypePtr polygon; PointTypePtr point; - Cardinal point_idx, prev, next; + pcb_cardinal_t point_idx, prev, next; polygon = (PolygonTypePtr) Crosshair.AttachedObject.Ptr2; point = (PointTypePtr) Crosshair.AttachedObject.Ptr3; @@ -1048,8 +1048,8 @@ (conf_core.editor.mode == PCB_MODE_LINE || (conf_core.editor.mode == PCB_MODE_MOVE && Crosshair.AttachedObject.Type == PCB_TYPE_LINE_POINT))) { PadTypePtr pad = (PadTypePtr) ptr2; LayerType *desired_layer; - Cardinal desired_group; - Cardinal SLayer, CLayer; + pcb_cardinal_t desired_group; + pcb_cardinal_t SLayer, CLayer; int found_our_layer = pcb_false; desired_layer = CURRENT; Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 3396) +++ trunk/src/draw.c (revision 3397) @@ -1094,7 +1094,7 @@ int layernum; LayerTypePtr Layer; int n_entries = PCB->LayerGroups.Number[group]; - Cardinal *layers = PCB->LayerGroups.Entries[group]; + pcb_cardinal_t *layers = PCB->LayerGroups.Entries[group]; for (i = n_entries - 1; i >= 0; i--) { layernum = layers[i]; @@ -1172,7 +1172,7 @@ { Coord x = 0; unsigned char *string = (unsigned char *) Text->TextString; - Cardinal n; + pcb_cardinal_t n; FontTypePtr font = &PCB->Font; while (string && *string) { Index: trunk/src/drill.c =================================================================== --- trunk/src/drill.c (revision 3396) +++ trunk/src/drill.c (revision 3397) @@ -38,7 +38,7 @@ static void FillDrill(DrillTypePtr Drill, ElementTypePtr Element, PinTypePtr Pin) { - Cardinal n; + pcb_cardinal_t n; ElementTypeHandle ptr; PinTypeHandle pin; Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 3396) +++ trunk/src/find.c (revision 3397) @@ -118,7 +118,7 @@ */ typedef struct { void **Data; /* pointer to index data */ - Cardinal Location, /* currently used position */ + pcb_cardinal_t Location, /* currently used position */ DrawLocation, Number, /* number of objects in list */ Size; } ListType, *ListTypePtr; @@ -141,8 +141,8 @@ static pcb_bool User = pcb_false; /* user action causing this */ static pcb_bool drc = pcb_false; /* whether to stop if finding something not found */ static pcb_bool IsBad = pcb_false; -static Cardinal drcerr_count; /* count of drc errors */ -static Cardinal TotalP, TotalV, NumberOfPads[2]; +static pcb_cardinal_t drcerr_count; /* count of drc errors */ +static pcb_cardinal_t TotalP, TotalV, NumberOfPads[2]; static ListType LineList[MAX_LAYER], /* list of objects to */ PolygonList[MAX_LAYER], ArcList[MAX_LAYER], PadList[2], RatList, PVList; @@ -153,11 +153,11 @@ static pcb_bool LookupLOConnectionsToLOList(pcb_bool); static pcb_bool LookupPVConnectionsToLOList(pcb_bool); static pcb_bool LookupPVConnectionsToPVList(void); -static pcb_bool LookupLOConnectionsToLine(LineTypePtr, Cardinal, pcb_bool); -static pcb_bool LookupLOConnectionsToPad(PadTypePtr, Cardinal); -static pcb_bool LookupLOConnectionsToPolygon(PolygonTypePtr, Cardinal); -static pcb_bool LookupLOConnectionsToArc(ArcTypePtr, Cardinal); -static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr, Cardinal); +static pcb_bool LookupLOConnectionsToLine(LineTypePtr, pcb_cardinal_t, pcb_bool); +static pcb_bool LookupLOConnectionsToPad(PadTypePtr, pcb_cardinal_t); +static pcb_bool LookupLOConnectionsToPolygon(PolygonTypePtr, pcb_cardinal_t); +static pcb_bool LookupLOConnectionsToArc(ArcTypePtr, pcb_cardinal_t); +static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr, pcb_cardinal_t); static pcb_bool IsRatPointOnLineEnd(PointTypePtr, LineTypePtr); static pcb_bool ArcArcIntersect(ArcTypePtr, ArcTypePtr); static pcb_bool PrintElementConnections(ElementTypePtr, FILE *, pcb_bool); @@ -166,7 +166,7 @@ static void PrintElementNameList(ElementTypePtr, FILE *); static void PrintConnectionElementName(ElementTypePtr, FILE *); static void PrintConnectionListEntry(char *, ElementTypePtr, pcb_bool, FILE *); -static void PrintPadConnections(Cardinal, FILE *, pcb_bool); +static void PrintPadConnections(pcb_cardinal_t, FILE *, pcb_bool); static void PrintPinConnections(FILE *, pcb_bool); static void DumpList(void); static pcb_bool ListStart(int, void *, void *, void *); Index: trunk/src/find_deadcode.c =================================================================== --- trunk/src/find_deadcode.c (revision 3396) +++ trunk/src/find_deadcode.c (revision 3397) @@ -80,9 +80,9 @@ return (pcb_false); } -static pcb_bool LOTouchesLine(LineTypePtr Line, Cardinal LayerGroup) +static pcb_bool LOTouchesLine(LineTypePtr Line, pcb_cardinal_t LayerGroup) { - Cardinal entry; + pcb_cardinal_t entry; struct lo_info info; @@ -93,7 +93,7 @@ /* loop over all layers of the group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer = PCB->LayerGroups.Entries[LayerGroup][entry]; + pcb_cardinal_t layer = PCB->LayerGroups.Entries[LayerGroup][entry]; /* handle normal layers */ if (layer < max_copper_layer) { @@ -135,7 +135,7 @@ * doesn't include rat-lines in the search */ -pcb_bool lineClear(LineTypePtr line, Cardinal group) +pcb_bool lineClear(LineTypePtr line, pcb_cardinal_t group) { if (LOTouchesLine(line, group)) return (pcb_false); Index: trunk/src/find_debug.c =================================================================== --- trunk/src/find_debug.c (revision 3396) +++ trunk/src/find_debug.c (revision 3397) @@ -77,9 +77,9 @@ * prints all found connections of a pads to file FP * the connections are stacked in 'PadList' */ -static void PrintPadConnections(Cardinal Layer, FILE * FP, pcb_bool IsFirst) +static void PrintPadConnections(pcb_cardinal_t Layer, FILE * FP, pcb_bool IsFirst) { - Cardinal i; + pcb_cardinal_t i; PadTypePtr ptr; if (!PadList[Layer].Number) @@ -112,7 +112,7 @@ */ static void PrintPinConnections(FILE * FP, pcb_bool IsFirst) { - Cardinal i; + pcb_cardinal_t i; PinTypePtr pv; if (!PVList.Number) Index: trunk/src/find_lookup.c =================================================================== --- trunk/src/find_lookup.c (revision 3396) +++ trunk/src/find_lookup.c (revision 3397) @@ -61,7 +61,7 @@ return pcb_false; } -static pcb_bool ADD_PAD_TO_LIST(Cardinal L, PadTypePtr Pad, int from_type, void *from_ptr, found_conn_type_t type) +static pcb_bool ADD_PAD_TO_LIST(pcb_cardinal_t L, PadTypePtr Pad, int from_type, void *from_ptr, found_conn_type_t type) { /*fprintf(stderr, "ADD_PAD_TO_LIST cardinal %d %p %d\n", L, Pad, from_type);*/ if (User) @@ -79,7 +79,7 @@ return pcb_false; } -static pcb_bool ADD_LINE_TO_LIST(Cardinal L, LineTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) +static pcb_bool ADD_LINE_TO_LIST(pcb_cardinal_t L, LineTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) { if (User) AddObjectToFlagUndoList(PCB_TYPE_LINE, LAYER_PTR(L), (Ptr), (Ptr)); @@ -96,7 +96,7 @@ return pcb_false; } -static pcb_bool ADD_ARC_TO_LIST(Cardinal L, ArcTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) +static pcb_bool ADD_ARC_TO_LIST(pcb_cardinal_t L, ArcTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) { if (User) AddObjectToFlagUndoList(PCB_TYPE_ARC, LAYER_PTR(L), (Ptr), (Ptr)); @@ -130,7 +130,7 @@ return pcb_false; } -static pcb_bool ADD_POLYGON_TO_LIST(Cardinal L, PolygonTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) +static pcb_bool ADD_POLYGON_TO_LIST(pcb_cardinal_t L, PolygonTypePtr Ptr, int from_type, void *from_ptr, found_conn_type_t type) { if (User) AddObjectToFlagUndoList(PCB_TYPE_POLYGON, LAYER_PTR(L), (Ptr), (Ptr)); @@ -165,7 +165,7 @@ */ void FreeLayoutLookupMemory(void) { - Cardinal i; + pcb_cardinal_t i; for (i = 0; i < max_copper_layer; i++) { free(LineList[i].Data); @@ -196,7 +196,7 @@ */ void InitComponentLookup(void) { - Cardinal i; + pcb_cardinal_t i; /* initialize pad data; start by counting the total number * on each of the two possible layers @@ -230,7 +230,7 @@ */ void InitLayoutLookup(void) { - Cardinal i; + pcb_cardinal_t i; /* initialize line arc and polygon data */ for (i = 0; i < max_copper_layer; i++) { @@ -284,7 +284,7 @@ } struct pv_info { - Cardinal layer; + pcb_cardinal_t layer; PinType pv; jmp_buf env; }; @@ -378,7 +378,7 @@ */ static pcb_bool LookupLOConnectionsToPVList(pcb_bool AndRats) { - Cardinal layer; + pcb_cardinal_t layer; struct pv_info info; /* loop over all PVs currently on list */ @@ -432,7 +432,7 @@ static pcb_bool LookupLOConnectionsToLOList(pcb_bool AndRats) { pcb_bool done; - Cardinal i, group, layer, ratposition, + pcb_cardinal_t i, group, layer, ratposition, lineposition[MAX_LAYER], polyposition[MAX_LAYER], arcposition[MAX_LAYER], padposition[2]; /* copy the current LO list positions; the original data is changed @@ -452,7 +452,7 @@ * more new connections in the layergroup were found */ do { - Cardinal *position; + pcb_cardinal_t *position; if (AndRats) { position = &ratposition; @@ -467,7 +467,7 @@ } /* loop over all layergroups */ for (group = 0; group < max_group; group++) { - Cardinal entry; + pcb_cardinal_t entry; for (entry = 0; entry < PCB->LayerGroups.Number[group]; entry++) { layer = PCB->LayerGroups.Entries[group][entry]; @@ -551,7 +551,7 @@ */ static pcb_bool LookupPVConnectionsToPVList(void) { - Cardinal save_place; + pcb_cardinal_t save_place; struct pv_info info; @@ -596,7 +596,7 @@ } struct lo_info { - Cardinal layer; + pcb_cardinal_t layer; LineType line; PadType pad; ArcType arc; @@ -705,7 +705,7 @@ */ static pcb_bool LookupPVConnectionsToLOList(pcb_bool AndRats) { - Cardinal layer; + pcb_cardinal_t layer; struct lo_info info; /* loop over all layers */ @@ -866,9 +866,9 @@ * the notation that is used is: * Xij means Xj at arc i */ -static pcb_bool LookupLOConnectionsToArc(ArcTypePtr Arc, Cardinal LayerGroup) +static pcb_bool LookupLOConnectionsToArc(ArcTypePtr Arc, pcb_cardinal_t LayerGroup) { - Cardinal entry; + pcb_cardinal_t entry; struct lo_info info; info.arc = *Arc; @@ -875,7 +875,7 @@ EXPAND_BOUNDS(&info.arc); /* loop over all layers of the group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; @@ -978,9 +978,9 @@ * the notation that is used is: * Xij means Xj at line i */ -static pcb_bool LookupLOConnectionsToLine(LineTypePtr Line, Cardinal LayerGroup, pcb_bool PolysTo) +static pcb_bool LookupLOConnectionsToLine(LineTypePtr Line, pcb_cardinal_t LayerGroup, pcb_bool PolysTo) { - Cardinal entry; + pcb_cardinal_t entry; struct lo_info info; info.line = *Line; @@ -994,7 +994,7 @@ /* loop over all layers of the group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; @@ -1037,7 +1037,7 @@ struct rat_info { - Cardinal layer; + pcb_cardinal_t layer; PointTypePtr Point; jmp_buf env; }; @@ -1093,18 +1093,18 @@ * the notation that is used is: * Xij means Xj at line i */ -static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr Point, Cardinal LayerGroup) +static pcb_bool LookupLOConnectionsToRatEnd(PointTypePtr Point, pcb_cardinal_t LayerGroup) { - Cardinal entry; + pcb_cardinal_t entry; struct rat_info info; info.Point = Point; /* loop over all layers of this group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; - /* handle normal layers + /* handle normal layers rats don't ever touch arcs by definition */ @@ -1210,9 +1210,9 @@ * searches all LOs that are connected to the given pad on the given * layergroup. All found connections are added to the list */ -static pcb_bool LookupLOConnectionsToPad(PadTypePtr Pad, Cardinal LayerGroup) +static pcb_bool LookupLOConnectionsToPad(PadTypePtr Pad, pcb_cardinal_t LayerGroup) { - Cardinal entry; + pcb_cardinal_t entry; struct lo_info info; int ic; pcb_bool retv = pcb_false; @@ -1227,7 +1227,7 @@ /*fprintf(stderr, "lg===\n");*/ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; /*fprintf(stderr, "lg: %d\n", layer);*/ if (layer == COMPONENT_LAYER) @@ -1271,7 +1271,7 @@ /* loop over all layers of the group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; /* handle normal layers */ @@ -1367,9 +1367,9 @@ * looks up LOs that are connected to the given polygon * on the given layergroup. All found connections are added to the list */ -static pcb_bool LookupLOConnectionsToPolygon(PolygonTypePtr Polygon, Cardinal LayerGroup) +static pcb_bool LookupLOConnectionsToPolygon(PolygonTypePtr Polygon, pcb_cardinal_t LayerGroup) { - Cardinal entry; + pcb_cardinal_t entry; struct lo_info info; if (!Polygon->Clipped) @@ -1384,7 +1384,7 @@ return pcb_true; /* loop over all layers of the group */ for (entry = 0; entry < PCB->LayerGroups.Number[LayerGroup]; entry++) { - Cardinal layer; + pcb_cardinal_t layer; layer = PCB->LayerGroups.Entries[LayerGroup][entry]; Index: trunk/src/find_misc.c =================================================================== --- trunk/src/find_misc.c (revision 3396) +++ trunk/src/find_misc.c (revision 3397) @@ -56,7 +56,7 @@ /* --------------------------------------------------------------------------- - * loops till no more connections are found + * loops till no more connections are found */ static pcb_bool DoIt(pcb_bool AndRats, pcb_bool AndDraw) { @@ -84,11 +84,11 @@ static void DrawNewConnections(void) { int i; - Cardinal position; + pcb_cardinal_t position; /* decrement 'i' to keep layerstack order */ for (i = max_copper_layer - 1; i != -1; i--) { - Cardinal layer = LayerStack[i]; + pcb_cardinal_t layer = LayerStack[i]; if (PCB->Data->Layer[layer].On) { /* draw all new lines */ @@ -407,7 +407,7 @@ */ static void DumpList(void) { - Cardinal i; + pcb_cardinal_t i; for (i = 0; i < 2; i++) { PadList[i].Number = 0; Index: trunk/src/find_print.c =================================================================== --- trunk/src/find_print.c (revision 3396) +++ trunk/src/find_print.c (revision 3397) @@ -35,7 +35,7 @@ static pcb_bool PrintAndSelectUnusedPinsAndPadsOfElement(ElementTypePtr Element, FILE * FP) { pcb_bool first = pcb_true; - Cardinal number; + pcb_cardinal_t number; /* check all pins in element */ @@ -132,7 +132,7 @@ */ static pcb_bool PrepareNextLoop(FILE * FP) { - Cardinal layer; + pcb_cardinal_t layer; /* reset found LOs for the next pin */ for (layer = 0; layer < max_copper_layer; layer++) { @@ -186,7 +186,7 @@ /* check all pads in element */ PAD_LOOP(Element); { - Cardinal layer; + pcb_cardinal_t layer; /* pad might have been checked before, add to list if not */ if (TEST_FLAG(TheFlag, pad)) { PrintConnectionListEntry((char *) EMPTY(pad->Name), NULL, pcb_true, FP); Index: trunk/src/global.h =================================================================== --- trunk/src/global.h (revision 3396) +++ trunk/src/global.h (revision 3397) @@ -144,7 +144,7 @@ * on/off together. */ typedef struct { - Cardinal Number[MAX_LAYER], /* number of entries per groups */ + pcb_cardinal_t Number[MAX_LAYER], /* number of entries per groups */ Entries[MAX_LAYER][MAX_LAYER + 2]; } LayerGroupType, *LayerGroupTypePtr; @@ -194,7 +194,7 @@ typedef struct { /* holds drill information */ Coord DrillSize; /* this drill's diameter */ - Cardinal ElementN, /* the number of elements using this drill size */ + pcb_cardinal_t ElementN, /* the number of elements using this drill size */ ElementMax, /* max number of elements from malloc() */ PinCount, /* number of pins drilled this size */ ViaCount, /* number of vias drilled this size */ @@ -206,7 +206,7 @@ } DrillType, *DrillTypePtr; typedef struct { /* holds a range of Drill Infos */ - Cardinal DrillN, /* number of drill sizes */ + pcb_cardinal_t DrillN, /* number of drill sizes */ DrillMax; /* max number from malloc() */ DrillTypePtr Drill; /* plated holes */ } DrillInfoType, *DrillInfoTypePtr; @@ -243,7 +243,7 @@ char *Name, /* name of the menu entry */ *directory, /* Directory name library elements are from */ *Style; /* routing style */ - Cardinal EntryN, /* number of objects */ + pcb_cardinal_t EntryN, /* number of objects */ EntryMax; /* number of reserved memory locations */ LibraryEntryTypePtr Entry; /* the entries */ char flag; /* used by the netlist window to enable/disable nets */ @@ -252,8 +252,8 @@ }; typedef struct { - Cardinal MenuN; /* number of objects */ - Cardinal MenuMax; /* number of reserved memory locations */ + pcb_cardinal_t MenuN; /* number of objects */ + pcb_cardinal_t MenuMax; /* number of reserved memory locations */ LibraryMenuTypePtr Menu; /* the entries */ } LibraryType, *LibraryTypePtr; @@ -353,7 +353,7 @@ void *Ptr1, /* three pointers to data, see */ *Ptr2, /* search.c */ *Ptr3; - Cardinal RubberbandN, /* number of lines in array */ + pcb_cardinal_t RubberbandN, /* number of lines in array */ RubberbandMax; RubberbandTypePtr Rubberband; } AttachedObjectType, *AttachedObjectTypePtr; @@ -416,12 +416,12 @@ Coord X, Y; /* coordinate of connection */ long int type; /* type of object in ptr1 - 3 */ void *ptr1, *ptr2; /* the object of the connection */ - Cardinal group; /* the layer group of the connection */ + pcb_cardinal_t group; /* the layer group of the connection */ LibraryMenuType *menu; /* the netmenu this *SHOULD* belong too */ } ConnectionType, *ConnectionTypePtr; typedef struct { /* holds a net of connections */ - Cardinal ConnectionN, /* the number of connections contained */ + pcb_cardinal_t ConnectionN, /* the number of connections contained */ ConnectionMax; /* max connections from malloc */ ConnectionTypePtr Connection; RouteStyleTypePtr Style; @@ -428,25 +428,25 @@ } NetType, *NetTypePtr; typedef struct { /* holds a list of nets */ - Cardinal NetN, /* the number of subnets contained */ + pcb_cardinal_t NetN, /* the number of subnets contained */ NetMax; /* max subnets from malloc */ NetTypePtr Net; } NetListType, *NetListTypePtr; typedef struct { /* holds a list of net lists */ - Cardinal NetListN, /* the number of net lists contained */ + pcb_cardinal_t NetListN, /* the number of net lists contained */ NetListMax; /* max net lists from malloc */ NetListTypePtr NetList; } NetListListType, *NetListListTypePtr; typedef struct { /* holds a generic list of pointers */ - Cardinal PtrN, /* the number of pointers contained */ + pcb_cardinal_t PtrN, /* the number of pointers contained */ PtrMax; /* max subnets from malloc */ void **Ptr; } PointerListType, *PointerListTypePtr; typedef struct { - Cardinal BoxN, /* the number of boxes contained */ + pcb_cardinal_t BoxN, /* the number of boxes contained */ BoxMax; /* max boxes from malloc */ BoxTypePtr Box; Index: trunk/src/global_objs.h =================================================================== --- trunk/src/global_objs.h (revision 3396) +++ trunk/src/global_objs.h (revision 3397) @@ -98,15 +98,15 @@ struct polygon_st { /* holds information about a polygon */ ANYOBJECTFIELDS; - Cardinal PointN, /* number of points in polygon */ + pcb_cardinal_t PointN, /* number of points in polygon */ PointMax; /* max number from malloc() */ 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 */ - Cardinal *HoleIndex; /* Index of hole data within the Points array */ - Cardinal HoleIndexN; /* number of holes in polygon */ - Cardinal HoleIndexMax; /* max number from malloc() */ + pcb_cardinal_t *HoleIndex; /* Index of hole data within the Points array */ + pcb_cardinal_t HoleIndexN; /* number of holes in polygon */ + pcb_cardinal_t HoleIndexMax; /* max number from malloc() */ gdl_elem_t link; /* a text is in a list of a layer */ }; @@ -121,7 +121,7 @@ typedef struct rat_st { /* a rat-line */ ANYLINEFIELDS; - Cardinal group1, group2; /* the layer group each point is on */ + pcb_cardinal_t group1, group2; /* the layer group each point is on */ gdl_elem_t link; /* an arc is in a list on a design */ } RatType, *RatTypePtr; @@ -156,7 +156,7 @@ typedef struct symbol_st { /* a single symbol */ LineTypePtr Line; pcb_bool Valid; - Cardinal LineN, /* number of lines */ + pcb_cardinal_t LineN, /* number of lines */ LineMax; Coord Width, Height, /* size of cell */ Delta; /* distance to next symbol */ Index: trunk/src/global_typedefs.h =================================================================== --- trunk/src/global_typedefs.h (revision 3396) +++ trunk/src/global_typedefs.h (revision 3397) @@ -33,9 +33,10 @@ typedef struct AttributeListType AttributeListType, *AttributeListTypePtr; typedef struct rats_patch_line_s rats_patch_line_t; +typedef unsigned int pcb_cardinal_t; + #ifndef XtSpecificationRelease #ifndef _XtIntrinsic_h -typedef unsigned int Cardinal; typedef short Position; #endif /*typedef unsigned int Pixel;*/ Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 3396) +++ trunk/src/insert.c (revision 3397) @@ -57,7 +57,7 @@ * some local identifiers */ static Coord InsertX, InsertY; /* used by local routines as offset */ -static Cardinal InsertAt; +static pcb_cardinal_t InsertAt; static pcb_bool InsertLast; static pcb_bool Forcible; static ObjectFunctionType InsertFunctions = { @@ -142,7 +142,7 @@ static void *InsertPointIntoPolygon(LayerTypePtr Layer, PolygonTypePtr Polygon) { PointType save; - Cardinal n; + pcb_cardinal_t n; LineType line; if (!Forcible) { @@ -186,7 +186,7 @@ /* --------------------------------------------------------------------------- * inserts point into objects */ -void *InsertPointIntoObject(int Type, void *Ptr1, void *Ptr2, Cardinal * Ptr3, Coord DX, Coord DY, pcb_bool Force, pcb_bool insert_last) +void *InsertPointIntoObject(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t * Ptr3, Coord DX, Coord DY, pcb_bool Force, pcb_bool insert_last) { void *ptr; Index: trunk/src/insert.h =================================================================== --- trunk/src/insert.h (revision 3396) +++ trunk/src/insert.h (revision 3397) @@ -36,7 +36,7 @@ /* --------------------------------------------------------------------------- * prototypes */ -void *InsertPointIntoObject(int, void *, void *, Cardinal *, Coord, Coord, pcb_bool, pcb_bool); +void *InsertPointIntoObject(int, void *, void *, pcb_cardinal_t *, Coord, Coord, pcb_bool, pcb_bool); PointTypePtr AdjustInsertPoint(void); #endif Index: trunk/src/intersect.c =================================================================== --- trunk/src/intersect.c (revision 3396) +++ trunk/src/intersect.c (revision 3397) @@ -163,7 +163,7 @@ */ double ComputeIntersectionArea(BoxListTypePtr boxlist) { - Cardinal i; + pcb_cardinal_t i; double area = 0.0; /* first get the aggregate area. */ for (i = 0; i < boxlist->BoxN; i++) @@ -179,7 +179,7 @@ double ComputeUnionArea(BoxListTypePtr boxlist) { BoxTypePtr *rectLeft, *rectRight; - Cardinal i, j; + pcb_cardinal_t i, j; LocationList yCoords; SegmentTree segtree; Coord lastX; Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 3396) +++ trunk/src/layer.c (revision 3397) @@ -351,7 +351,7 @@ /* --------------------------------------------------------------------------- * returns the layergroup number for the passed layernumber */ -int GetLayerGroupNumberByNumber(Cardinal Layer) +int GetLayerGroupNumberByNumber(pcb_cardinal_t Layer) { int group, entry; @@ -373,7 +373,7 @@ void ResetStackAndVisibility(void) { int comp_group; - Cardinal i; + pcb_cardinal_t i; for (i = 0; i < max_copper_layer + 2; i++) { if (i < max_copper_layer) @@ -396,7 +396,7 @@ */ void SaveStackAndVisibility(void) { - Cardinal i; + pcb_cardinal_t i; static pcb_bool run = pcb_false; if (run == pcb_false) { @@ -427,7 +427,7 @@ */ void RestoreStackAndVisibility(void) { - Cardinal i; + pcb_cardinal_t i; if (SavedStack.cnt == 0) { fprintf(stderr, "RestoreStackAndVisibility() layerstack has not" " been saved. cnt = %d\n", SavedStack.cnt); Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 3396) +++ trunk/src/layer.h (revision 3397) @@ -41,7 +41,7 @@ int GetLayerNumber(DataTypePtr, LayerTypePtr); int GetLayerGroupNumberByPointer(LayerTypePtr); -int GetLayerGroupNumberByNumber(Cardinal); +int GetLayerGroupNumberByNumber(pcb_cardinal_t); int GetGroupOfLayer(int); int ChangeGroupVisibility(int, pcb_bool, pcb_bool); void LayerStringToLayerStack(const char *); Index: trunk/src/line.c =================================================================== --- trunk/src/line.c (revision 3396) +++ trunk/src/line.c (revision 3397) @@ -258,7 +258,7 @@ Coord dx, dy, temp, last, length; Coord temp2, last2, length2; LineType line1, line2; - Cardinal group, comp; + pcb_cardinal_t group, comp; struct drc_info info; pcb_bool two_lines, x_is_long, blocker; PointType ans; @@ -418,7 +418,7 @@ PointType r45, rs; pcb_bool shift; double r1, r2; - int refraction = conf_core.editor.line_refraction; + int refraction = conf_core.editor.line_refraction; /* Silence a bogus compiler warning by storing this in a variable */ int layer_idx = INDEXOFCURRENT; Index: trunk/src/macro.h =================================================================== --- trunk/src/macro.h (revision 3396) +++ trunk/src/macro.h (revision 3397) @@ -163,7 +163,7 @@ pinlist_foreach(&(top)->Via, &__it__, via) { #define DRILL_LOOP(top) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ DrillTypePtr drill; \ for (n = 0; (top)->DrillN > 0 && n < (top)->DrillN; n++) \ { \ @@ -170,7 +170,7 @@ drill = &(top)->Drill[n] #define NETLIST_LOOP(top) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ NetListTypePtr netlist; \ for (n = (top)->NetListN-1; n != -1; n--) \ { \ @@ -177,7 +177,7 @@ netlist = &(top)->NetList[n] #define NET_LOOP(top) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ NetTypePtr net; \ for (n = (top)->NetN-1; n != -1; n--) \ { \ @@ -184,7 +184,7 @@ net = &(top)->Net[n] #define CONNECTION_LOOP(net) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ ConnectionTypePtr connection; \ for (n = (net)->ConnectionN-1; n != -1; n--) \ { \ @@ -201,7 +201,7 @@ ratlist_foreach(&(top)->Rat, &__it__, line) { #define ELEMENTTEXT_LOOP(element) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ TextTypePtr text; \ for (n = MAX_ELEMENTNAMES-1; n != -1; n--) \ { \ @@ -208,7 +208,7 @@ text = &(element)->Name[n] #define ELEMENTNAME_LOOP(element) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ char *textstring; \ for (n = MAX_ELEMENTNAMES-1; n != -1; n--) \ { \ @@ -255,7 +255,7 @@ linelist_foreach(&(layer)->Polygon, &__it__, polygon) { #define POLYGONPOINT_LOOP(polygon) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ PointTypePtr point; \ for (n = (polygon)->PointN-1; n != -1; n--) \ { \ @@ -272,7 +272,7 @@ PAD_LOOP(element) #define ALLLINE_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -279,7 +279,7 @@ LINE_LOOP(layer) #define ALLARC_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l =0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -286,7 +286,7 @@ ARC_LOOP(layer) #define ALLPOLYGON_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -293,7 +293,7 @@ POLYGON_LOOP(layer) #define COPPERLINE_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer; l++, layer++) \ { \ @@ -300,7 +300,7 @@ LINE_LOOP(layer) #define COPPERARC_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l =0; l < max_copper_layer; l++, layer++) \ { \ @@ -307,7 +307,7 @@ ARC_LOOP(layer) #define COPPERPOLYGON_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer; l++, layer++) \ { \ @@ -314,7 +314,7 @@ POLYGON_LOOP(layer) #define SILKLINE_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ layer += max_copper_layer; \ for (l = 0; l < 2; l++, layer++) \ @@ -322,7 +322,7 @@ LINE_LOOP(layer) #define SILKARC_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ layer += max_copper_layer; \ for (l = 0; l < 2; l++, layer++) \ @@ -330,7 +330,7 @@ ARC_LOOP(layer) #define SILKPOLYGON_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ layer += max_copper_layer; \ for (l = 0; l < 2; l++, layer++) \ @@ -338,7 +338,7 @@ POLYGON_LOOP(layer) #define ALLTEXT_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -345,7 +345,7 @@ TEXT_LOOP(layer) #define VISIBLELINE_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -353,7 +353,7 @@ LINE_LOOP(layer) #define VISIBLEARC_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -361,7 +361,7 @@ ARC_LOOP(layer) #define VISIBLETEXT_LOOP(board) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (board)->Data->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -369,7 +369,7 @@ if (TEXT_IS_VISIBLE((board), layer, text)) #define VISIBLEPOLYGON_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LayerTypePtr layer = (top)->Layer; \ for (l = 0; l < max_copper_layer + 2; l++, layer++) \ { \ @@ -377,7 +377,7 @@ POLYGON_LOOP(layer) #define POINTER_LOOP(top) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ void **ptr; \ for (n = (top)->PtrN-1; n != -1; n--) \ { \ @@ -384,7 +384,7 @@ ptr = &(top)->Ptr[n] #define MENU_LOOP(top) do { \ - Cardinal l; \ + pcb_cardinal_t l; \ LibraryMenuTypePtr menu; \ for (l = (top)->MenuN-1; l != -1; l--) \ { \ @@ -391,7 +391,7 @@ menu = &(top)->Menu[l] #define ENTRY_LOOP(top) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ LibraryEntryTypePtr entry; \ for (n = (top)->EntryN-1; n != -1; n--) \ { \ @@ -398,11 +398,11 @@ entry = &(top)->Entry[n] #define GROUP_LOOP(data, group) do { \ - Cardinal entry; \ + pcb_cardinal_t entry; \ for (entry = 0; entry < ((PCBTypePtr)(data->pcb))->LayerGroups.Number[(group)]; entry++) \ { \ LayerTypePtr layer; \ - Cardinal number; \ + pcb_cardinal_t number; \ number = ((PCBTypePtr)(data->pcb))->LayerGroups.Entries[(group)][entry]; \ if (number >= max_copper_layer) \ continue; \ @@ -409,7 +409,7 @@ layer = &data->Layer[number]; #define LAYER_LOOP(data, ml) do { \ - Cardinal n; \ + pcb_cardinal_t n; \ for (n = 0; n < ml; n++) \ { \ LayerTypePtr layer = (&data->Layer[(n)]); Index: trunk/src/misc.c =================================================================== --- trunk/src/misc.c (revision 3396) +++ trunk/src/misc.c (revision 3397) @@ -447,7 +447,7 @@ pcb_bool IsDataEmpty(DataTypePtr Data) { pcb_bool hasNoObjects; - Cardinal i; + pcb_cardinal_t i; hasNoObjects = (pinlist_length(&Data->Via) == 0); hasNoObjects &= (elementlist_length(&Data->Element) == 0); @@ -611,7 +611,7 @@ */ void SetFontInfo(FontTypePtr Ptr) { - Cardinal i, j; + pcb_cardinal_t i, j; SymbolTypePtr symbol; LineTypePtr line; Coord totalminy = MAX_COORD; Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 3396) +++ trunk/src/move.c (revision 3397) @@ -624,7 +624,7 @@ } struct mptlc { - Cardinal snum, dnum; + pcb_cardinal_t snum, dnum; int type; PolygonTypePtr polygon; } mptlc; Index: trunk/src/mymem.c =================================================================== --- trunk/src/mymem.c (revision 3396) +++ trunk/src/mymem.c (revision 3397) @@ -328,14 +328,14 @@ * gets the next slot for a point in a polygon struct, allocates memory * if necessary */ -Cardinal *GetHoleIndexMemoryInPolygon(PolygonTypePtr Polygon) +pcb_cardinal_t *GetHoleIndexMemoryInPolygon(PolygonTypePtr Polygon) { - Cardinal *holeindex = Polygon->HoleIndex; + pcb_cardinal_t *holeindex = Polygon->HoleIndex; /* realloc new memory if necessary and clear it */ if (Polygon->HoleIndexN >= Polygon->HoleIndexMax) { Polygon->HoleIndexMax += STEP_POLYGONHOLEINDEX; - holeindex = (Cardinal *) realloc(holeindex, Polygon->HoleIndexMax * sizeof(int)); + holeindex = (pcb_cardinal_t *) realloc(holeindex, Polygon->HoleIndexMax * sizeof(int)); Polygon->HoleIndex = holeindex; memset(holeindex + Polygon->HoleIndexN, 0, STEP_POLYGONHOLEINDEX * sizeof(int)); } Index: trunk/src/mymem.h =================================================================== --- trunk/src/mymem.h (revision 3396) +++ trunk/src/mymem.h (revision 3397) @@ -65,7 +65,7 @@ TextTypePtr GetTextMemory(LayerTypePtr); PolygonTypePtr GetPolygonMemory(LayerTypePtr); PointTypePtr GetPointMemoryInPolygon(PolygonTypePtr); -Cardinal *GetHoleIndexMemoryInPolygon(PolygonTypePtr); +pcb_cardinal_t *GetHoleIndexMemoryInPolygon(PolygonTypePtr); ElementTypePtr GetElementMemory(DataTypePtr); BoxTypePtr GetBoxMemory(BoxListTypePtr); ConnectionTypePtr GetConnectionMemory(NetTypePtr); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 3396) +++ trunk/src/polygon.c (revision 3397) @@ -114,7 +114,7 @@ rotate_circle_seg[3] = cos_ang; } -Cardinal polygon_point_idx(PolygonTypePtr polygon, PointTypePtr point) +pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, PointTypePtr point) { assert(point >= polygon->Points); assert(point <= polygon->Points + polygon->PointN); @@ -122,10 +122,10 @@ } /* Find contour number: 0 for outer, 1 for first hole etc.. */ -Cardinal polygon_point_contour(PolygonTypePtr polygon, Cardinal point) +pcb_cardinal_t polygon_point_contour(PolygonTypePtr polygon, pcb_cardinal_t point) { - Cardinal i; - Cardinal contour = 0; + pcb_cardinal_t i; + pcb_cardinal_t contour = 0; for (i = 0; i < polygon->HoleIndexN; i++) if (point >= polygon->HoleIndex[i]) @@ -133,11 +133,11 @@ return contour; } -Cardinal next_contour_point(PolygonTypePtr polygon, Cardinal point) +pcb_cardinal_t next_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point) { - Cardinal contour; - Cardinal this_contour_start; - Cardinal next_contour_start; + pcb_cardinal_t contour; + pcb_cardinal_t this_contour_start; + pcb_cardinal_t next_contour_start; contour = polygon_point_contour(polygon, point); @@ -151,11 +151,11 @@ return point; } -Cardinal prev_contour_point(PolygonTypePtr polygon, Cardinal point) +pcb_cardinal_t prev_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point) { - Cardinal contour; - Cardinal prev_contour_end; - Cardinal this_contour_end; + pcb_cardinal_t contour; + pcb_cardinal_t prev_contour_end; + pcb_cardinal_t this_contour_end; contour = polygon_point_contour(polygon, point); @@ -251,7 +251,7 @@ { PLINE *contour = NULL; POLYAREA *np = NULL; - Cardinal n; + pcb_cardinal_t n; Vector v; int hole = 0; @@ -763,7 +763,7 @@ } /* return the clearance polygon for a pin */ -static POLYAREA *pin_clearance_poly(Cardinal layernum, PCBTypePtr pcb, PinType * pin) +static POLYAREA *pin_clearance_poly(pcb_cardinal_t layernum, PCBTypePtr pcb, PinType * pin) { POLYAREA *np; if (TEST_THERM(layernum, pin)) @@ -777,7 +777,7 @@ static int SubtractPin(DataType * d, PinType * pin, LayerType * l, PolygonType * p) { POLYAREA *np; - Cardinal i; + pcb_cardinal_t i; if (pin->Clearance == 0) return 0; @@ -874,7 +874,7 @@ PolygonTypePtr polygon; POLYAREA *np; POLYAREA *merged; - Cardinal i; + pcb_cardinal_t i; /* don't subtract the object that was put back! */ if (b == info->other) @@ -988,9 +988,9 @@ return R_DIR_FOUND_CONTINUE; } -static int Group(DataTypePtr Data, Cardinal layer) +static int Group(DataTypePtr Data, pcb_cardinal_t layer) { - Cardinal i, j; + pcb_cardinal_t i, j; for (i = 0; i < max_group; i++) for (j = 0; j < ((PCBType *) (Data->pcb))->LayerGroups.Number[i]; j++) if (layer == ((PCBType *) (Data->pcb))->LayerGroups.Entries[i][j]) @@ -1003,7 +1003,7 @@ int r = 0, seen; BoxType region; struct cpInfo info; - Cardinal group; + pcb_cardinal_t group; if (!TEST_FLAG(PCB_FLAG_CLEARPOLY, polygon) || GetLayerNumber(Data, Layer) >= max_copper_layer) @@ -1197,7 +1197,7 @@ pcb_bool RemoveExcessPolygonPoints(LayerTypePtr Layer, PolygonTypePtr Polygon) { PointTypePtr p; - Cardinal n, prev, next; + pcb_cardinal_t n, prev, next; LineType line; pcb_bool changed = pcb_false; @@ -1225,11 +1225,11 @@ * point of the segment with the lowest distance to the passed * coordinates */ -Cardinal GetLowestDistancePolygonPoint(PolygonTypePtr Polygon, Coord X, Coord Y) +pcb_cardinal_t GetLowestDistancePolygonPoint(PolygonTypePtr Polygon, Coord X, Coord Y) { double mindistance = (double) MAX_COORD * MAX_COORD; PointTypePtr ptr1, ptr2; - Cardinal n, result = 0; + pcb_cardinal_t n, result = 0; /* we calculate the distance to each segment and choose the * shortest distance. If the closest approach between the @@ -1288,7 +1288,7 @@ default: { PointTypePtr points = Crosshair.AttachedPolygon.Points; - Cardinal n = Crosshair.AttachedPolygon.PointN - 2; + pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN - 2; Crosshair.AttachedPolygon.PointN--; Crosshair.AttachedLine.Point1.X = points[n].X; @@ -1303,7 +1303,7 @@ */ void ClosePolygon(void) { - Cardinal n = Crosshair.AttachedPolygon.PointN; + pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; /* check number of points */ if (n >= 3) { @@ -1510,7 +1510,7 @@ break; case PCB_TYPE_PAD: { - Cardinal group = GetLayerGroupNumberByNumber(TEST_FLAG(PCB_FLAG_ONSOLDER, (PadType *) ptr2) ? + pcb_cardinal_t group = GetLayerGroupNumberByNumber(TEST_FLAG(PCB_FLAG_ONSOLDER, (PadType *) ptr2) ? solder_silk_layer : component_silk_layer); GROUP_LOOP(Data, group); { @@ -1764,7 +1764,7 @@ void debug_polygon(PolygonType * p) { - Cardinal i; + pcb_cardinal_t i; POLYAREA *pa; fprintf(stderr, "POLYGON %p %d pts\n", (void *)p, p->PointN); for (i = 0; i < p->PointN; i++) Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 3396) +++ trunk/src/polygon.h (revision 3397) @@ -49,11 +49,11 @@ /* 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, Coord, Coord); +pcb_cardinal_t polygon_point_idx(PolygonTypePtr polygon, PointTypePtr point); +pcb_cardinal_t polygon_point_contour(PolygonTypePtr polygon, pcb_cardinal_t point); +pcb_cardinal_t prev_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point); +pcb_cardinal_t next_contour_point(PolygonTypePtr polygon, pcb_cardinal_t point); +pcb_cardinal_t GetLowestDistancePolygonPoint(PolygonTypePtr, Coord, Coord); pcb_bool RemoveExcessPolygonPoints(LayerTypePtr, PolygonTypePtr); void GoToPreviousPoint(void); void ClosePolygon(void); Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 3396) +++ trunk/src/rats.c (revision 3397) @@ -65,7 +65,7 @@ * some local identifiers */ static pcb_bool badnet = pcb_false; -static Cardinal SLayer, CLayer; /* layer group holding solder/component side */ +static pcb_cardinal_t SLayer, CLayer; /* layer group holding solder/component side */ /* --------------------------------------------------------------------------- * parse a connection description from a string @@ -391,7 +391,7 @@ { NetTypePtr a, b; ConnectionTypePtr conn; - Cardinal m, n; + pcb_cardinal_t m, n; pcb_bool Warned = pcb_false; for (m = 0; Netl->NetN > 0 && m < Netl->NetN; m++) { @@ -494,7 +494,7 @@ PolygonTypePtr polygon; pcb_bool changed = pcb_false; pcb_bool havepoints; - Cardinal n, m, j; + pcb_cardinal_t n, m, j; NetTypePtr next, subnet, theSubnet = NULL; /* This is just a sanity check, to make sure we're passed @@ -805,7 +805,7 @@ { static int ratDrawn = 0; char name1[256], *name2; - Cardinal group1, group2; + pcb_cardinal_t group1, group2; char ratname[20]; int found; void *ptr1, *ptr2, *ptr3; Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 3396) +++ trunk/src/remove.c (revision 3397) @@ -55,7 +55,7 @@ static void *RemoveVia(PinTypePtr); static void *RemoveRat(RatTypePtr); static void *DestroyPolygonPoint(LayerTypePtr, PolygonTypePtr, PointTypePtr); -static void *RemovePolygonContour(LayerTypePtr, PolygonTypePtr, Cardinal); +static void *RemovePolygonContour(LayerTypePtr, PolygonTypePtr, pcb_cardinal_t); static void *RemovePolygonPoint(LayerTypePtr, PolygonTypePtr, PointTypePtr); static void *RemoveLinePoint(LayerTypePtr, LineTypePtr, PointTypePtr); @@ -159,10 +159,10 @@ */ static void *DestroyPolygonPoint(LayerTypePtr Layer, PolygonTypePtr Polygon, PointTypePtr Point) { - Cardinal point_idx; - Cardinal i; - Cardinal contour; - Cardinal contour_start, contour_end, contour_points; + pcb_cardinal_t point_idx; + pcb_cardinal_t i; + pcb_cardinal_t contour; + pcb_cardinal_t contour_start, contour_end, contour_points; point_idx = polygon_point_idx(Polygon, Point); contour = polygon_point_contour(Polygon, point_idx); @@ -392,10 +392,10 @@ * removes a contour from a polygon. * If removing the outer contour, it removes the whole polygon. */ -static void *RemovePolygonContour(LayerTypePtr Layer, PolygonTypePtr Polygon, Cardinal contour) +static void *RemovePolygonContour(LayerTypePtr Layer, PolygonTypePtr Polygon, pcb_cardinal_t contour) { - Cardinal contour_start, contour_end, contour_points; - Cardinal i; + pcb_cardinal_t contour_start, contour_end, contour_points; + pcb_cardinal_t i; if (contour == 0) return RemovePolygon(Layer, Polygon); @@ -438,10 +438,10 @@ */ static void *RemovePolygonPoint(LayerTypePtr Layer, PolygonTypePtr Polygon, PointTypePtr Point) { - Cardinal point_idx; - Cardinal i; - Cardinal contour; - Cardinal contour_start, contour_end, contour_points; + pcb_cardinal_t point_idx; + pcb_cardinal_t i; + pcb_cardinal_t contour; + pcb_cardinal_t contour_start, contour_end, contour_points; point_idx = polygon_point_idx(Polygon, Point); contour = polygon_point_contour(Polygon, point_idx); Index: trunk/src/rubberband.c =================================================================== --- trunk/src/rubberband.c (revision 3396) +++ trunk/src/rubberband.c (revision 3397) @@ -181,7 +181,7 @@ static void CheckPadForRubberbandConnection(PadTypePtr Pad) { Coord half = Pad->Thickness / 2; - Cardinal i, group; + pcb_cardinal_t i, group; struct rubber_info info; info.box.X1 = MIN(Pad->Point1.X, Pad->Point2.X) - half; @@ -207,7 +207,7 @@ struct rinfo { int type; - Cardinal group; + pcb_cardinal_t group; PinTypePtr pin; PadTypePtr pad; PointTypePtr point; @@ -258,7 +258,7 @@ static void CheckPadForRat(PadTypePtr Pad) { struct rinfo info; - Cardinal i; + pcb_cardinal_t i; i = TEST_FLAG(PCB_FLAG_ONSOLDER, Pad) ? solder_silk_layer : component_silk_layer; info.group = GetLayerGroupNumberByNumber(i); @@ -298,7 +298,7 @@ static void CheckPinForRubberbandConnection(PinTypePtr Pin) { struct rubber_info info; - Cardinal n; + pcb_cardinal_t n; Coord t = Pin->Thickness / 2; info.box.X1 = Pin->X - t; @@ -327,7 +327,7 @@ */ static void CheckLinePointForRubberbandConnection(LayerTypePtr Layer, LineTypePtr Line, PointTypePtr LinePoint, pcb_bool Exact) { - Cardinal group; + pcb_cardinal_t group; struct rubber_info info; Coord t = Line->Thickness / 2; @@ -359,7 +359,7 @@ */ static void CheckPolygonForRubberbandConnection(LayerTypePtr Layer, PolygonTypePtr Polygon) { - Cardinal group; + pcb_cardinal_t group; /* lookup layergroup and check all visible lines in this group */ group = GetLayerGroupNumberByPointer(Layer); Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 3396) +++ trunk/src/select.c (revision 3397) @@ -923,7 +923,7 @@ MENU_LOOP(&(PCB->NetlistLib[NETLIST_EDITED])); { - Cardinal i; + pcb_cardinal_t i; LibraryEntryType *entry; ConnectionType conn; Index: trunk/src/thermal.c =================================================================== --- trunk/src/thermal.c (revision 3396) +++ trunk/src/thermal.c (revision 3397) @@ -82,7 +82,7 @@ return ContourToPoly(c); } -static POLYAREA *square_therm(PinTypePtr pin, Cardinal style) +static POLYAREA *square_therm(PinTypePtr pin, pcb_cardinal_t style) { POLYAREA *p, *p2; PLINE *c; @@ -309,7 +309,7 @@ } } -static POLYAREA *oct_therm(PinTypePtr pin, Cardinal style) +static POLYAREA *oct_therm(PinTypePtr pin, pcb_cardinal_t style) { POLYAREA *p, *p2, *m; Coord t = 0.5 * pcb->ThermScale * pin->Clearance; @@ -353,11 +353,11 @@ * Usually this is 4 disjoint regions. * */ -POLYAREA *ThermPoly(PCBTypePtr p, PinTypePtr pin, Cardinal laynum) +POLYAREA *ThermPoly(PCBTypePtr p, PinTypePtr pin, pcb_cardinal_t laynum) { ArcType a; POLYAREA *pa, *arc; - Cardinal style = GET_THERM(laynum, pin); + pcb_cardinal_t style = GET_THERM(laynum, pin); if (style == 3) return NULL; /* solid connection no clearance */ Index: trunk/src/thermal.h =================================================================== --- trunk/src/thermal.h (revision 3396) +++ trunk/src/thermal.h (revision 3397) @@ -40,6 +40,6 @@ #include "global.h" #include "mymem.h" -POLYAREA *ThermPoly(PCBTypePtr, PinTypePtr, Cardinal); +POLYAREA *ThermPoly(PCBTypePtr, PinTypePtr, pcb_cardinal_t); #endif Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 3396) +++ trunk/src/undo.c (revision 3397) @@ -84,17 +84,17 @@ typedef struct { /* information about removed polygon points */ Coord X, Y; /* data */ int ID; - Cardinal Index; /* index in a polygons array of points */ + pcb_cardinal_t Index; /* index in a polygons array of points */ pcb_bool last_in_contour; /* Whether the point was the last in its contour */ } RemovedPointType, *RemovedPointTypePtr; typedef struct { /* information about rotation */ Coord CenterX, CenterY; /* center of rotation */ - Cardinal Steps; /* number of steps */ + pcb_cardinal_t Steps; /* number of steps */ } RotateType, *RotateTypePtr; typedef struct { /* information about moves between layers */ - Cardinal OriginalLayer; /* the index of the original layer */ + pcb_cardinal_t OriginalLayer; /* the index of the original layer */ } MoveToLayerType, *MoveToLayerTypePtr; typedef struct { /* information about layer changes */ @@ -665,8 +665,8 @@ PolygonTypePtr polygon; PointTypePtr pnt; int type; - Cardinal point_idx; - Cardinal hole; + pcb_cardinal_t point_idx; + pcb_cardinal_t hole; pcb_bool last_in_contour = pcb_false; assert(Entry->Kind == PCB_TYPE_POLYGON_POINT); @@ -1190,11 +1190,11 @@ /* --------------------------------------------------------------------------- * adds an object to the list of removed polygon/... points */ -void AddObjectToRemovePointUndoList(int Type, void *Ptr1, void *Ptr2, Cardinal index) +void AddObjectToRemovePointUndoList(int Type, void *Ptr1, void *Ptr2, pcb_cardinal_t index) { UndoListTypePtr undo; PolygonTypePtr polygon = (PolygonTypePtr) Ptr2; - Cardinal hole; + pcb_cardinal_t hole; pcb_bool last_in_contour = pcb_false; if (!Locked) { Index: trunk/src/undo.h =================================================================== --- trunk/src/undo.h (revision 3396) +++ trunk/src/undo.h (revision 3397) @@ -43,7 +43,7 @@ void RestoreUndoSerialNumber(void); void ClearUndoList(pcb_bool); void MoveObjectToRemoveUndoList(int, void *, void *, void *); -void AddObjectToRemovePointUndoList(int, void *, void *, Cardinal); +void AddObjectToRemovePointUndoList(int, void *, void *, pcb_cardinal_t); void AddObjectToInsertPointUndoList(int, void *, void *, void *); void AddObjectToRemoveContourUndoList(int, LayerType *, PolygonType *); void AddObjectToInsertContourUndoList(int, LayerType *, PolygonType *); Index: trunk/src_plugins/autoplace/autoplace.c =================================================================== --- trunk/src_plugins/autoplace/autoplace.c (revision 3396) +++ trunk/src_plugins/autoplace/autoplace.c (revision 3397) @@ -116,7 +116,7 @@ typedef struct { ElementTypePtr *element; - Cardinal elementN; + pcb_cardinal_t elementN; } ElementPtrListType; enum ewhich { SHIFT, ROTATE, EXCHANGE }; @@ -139,8 +139,8 @@ */ static void UpdateXY(NetListTypePtr Nets) { - Cardinal SLayer, CLayer; - Cardinal i, j; + pcb_cardinal_t SLayer, CLayer; + pcb_cardinal_t i, j; /* find layer groups of the component side and solder side */ SLayer = GetLayerGroupNumberByNumber(solder_silk_layer); CLayer = GetLayerGroupNumberByNumber(component_silk_layer); @@ -190,7 +190,7 @@ /* makes a line on the solder layer surrounding all boxes in blist */ static void showboxes(BoxListTypePtr blist) { - Cardinal i; + pcb_cardinal_t i; LayerTypePtr SLayer = &(PCB->Data->Layer[solder_silk_layer]); for (i = 0; i < blist->BoxN; i++) { CreateNewLineOnLayer(SLayer, blist->Box[i].X1, blist->Box[i].Y1, blist->Box[i].X2, blist->Box[i].Y1, 1, 1, 0); @@ -298,10 +298,10 @@ double delta3 = 0; /* out of bounds penalty */ double delta4 = 0; /* alignment bonus */ double delta5 = 0; /* total area penalty */ - Cardinal i, j; + pcb_cardinal_t i, j; Coord minx, maxx, miny, maxy; pcb_bool allpads, allsameside; - Cardinal thegroup; + pcb_cardinal_t thegroup; BoxListType bounds = { 0, 0, NULL }; /* save bounding rectangles here */ BoxListType solderside = { 0, 0, NULL }; /* solder side component bounds */ BoxListType componentside = { 0, 0, NULL }; /* component side bounds */ Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 3396) +++ trunk/src_plugins/autoroute/autoroute.c (revision 3397) @@ -375,7 +375,7 @@ /* --------------------------------------------------------------------------- * some local prototypes */ -static routebox_t *CreateExpansionArea(const BoxType * area, Cardinal group, +static routebox_t *CreateExpansionArea(const BoxType * area, pcb_cardinal_t group, routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * edge); static cost_t edge_cost(const edge_t * e, const cost_t too_big); @@ -386,7 +386,7 @@ static void add_or_destroy_edge(struct routeone_state *s, edge_t * e); static void -RD_DrawThermal(routedata_t * rd, Coord X, Coord Y, Cardinal group, Cardinal layer, routebox_t * subnet, pcb_bool is_bad); +RD_DrawThermal(routedata_t * rd, Coord X, Coord Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, pcb_bool is_bad); static void ResetSubnet(routebox_t * net); #ifdef ROUTE_DEBUG static int showboxen = -2; @@ -398,7 +398,7 @@ * some local identifiers */ /* group number of groups that hold surface mount pads */ -static Cardinal front, back; +static pcb_cardinal_t front, back; static pcb_bool usedGroup[MAX_LAYER]; static int x_cost[MAX_LAYER], y_cost[MAX_LAYER]; static pcb_bool is_layer_group_active[MAX_LAYER]; @@ -700,7 +700,7 @@ static routebox_t *AddIrregularObstacle(PointerListType layergroupboxes[], Coord X1, Coord Y1, - Coord X2, Coord Y2, Cardinal layergroup, void *parent, RouteStyleType * style) + Coord X2, Coord Y2, pcb_cardinal_t layergroup, void *parent, RouteStyleType * style) { routebox_t **rbpp; Coord keep = style->Clearance; @@ -724,7 +724,7 @@ return *rbpp; } -static routebox_t *AddPolygon(PointerListType layergroupboxes[], Cardinal layer, PolygonTypePtr polygon, RouteStyleType * style) +static routebox_t *AddPolygon(PointerListType layergroupboxes[], pcb_cardinal_t layer, PolygonTypePtr polygon, RouteStyleType * style) { int is_not_rectangle = 1; int layergroup = GetLayerGroupNumberByNumber(layer); @@ -755,7 +755,7 @@ return rb; } -static void AddText(PointerListType layergroupboxes[], Cardinal layergroup, TextTypePtr text, RouteStyleType * style) +static void AddText(PointerListType layergroupboxes[], pcb_cardinal_t layergroup, TextTypePtr text, RouteStyleType * style) { AddIrregularObstacle(layergroupboxes, text->BoundingBox.X1, text->BoundingBox.Y1, @@ -762,7 +762,7 @@ text->BoundingBox.X2, text->BoundingBox.Y2, layergroup, text, style); } -static routebox_t *AddArc(PointerListType layergroupboxes[], Cardinal layergroup, ArcTypePtr arc, RouteStyleType * style) +static routebox_t *AddArc(PointerListType layergroupboxes[], pcb_cardinal_t layergroup, ArcTypePtr arc, RouteStyleType * style) { return AddIrregularObstacle(layergroupboxes, arc->BoundingBox.X1, arc->BoundingBox.Y1, @@ -793,7 +793,7 @@ return R_DIR_NOT_FOUND; } -static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, Coord X, Coord Y, Cardinal layergroup) +static routebox_t *FindRouteBoxOnLayerGroup(routedata_t * rd, Coord X, Coord Y, pcb_cardinal_t layergroup) { struct rb_info info; info.winner = NULL; @@ -1201,7 +1201,7 @@ END_LOOP; } -static inline cost_t cost_to_point_on_layer(const CheapPointType * p1, const CheapPointType * p2, Cardinal point_layer) +static inline cost_t cost_to_point_on_layer(const CheapPointType * p1, const CheapPointType * p2, pcb_cardinal_t point_layer) { cost_t x_dist = p1->X - p2->X, y_dist = p1->Y - p2->Y, r; x_dist *= x_cost[point_layer]; @@ -1213,7 +1213,7 @@ return r; } -static cost_t cost_to_point(const CheapPointType * p1, Cardinal point_layer1, const CheapPointType * p2, Cardinal point_layer2) +static cost_t cost_to_point(const CheapPointType * p1, pcb_cardinal_t point_layer1, const CheapPointType * p2, pcb_cardinal_t point_layer2) { cost_t r = cost_to_point_on_layer(p1, p2, point_layer1); /* apply via cost penalty if layers differ */ @@ -1225,7 +1225,7 @@ /* return the minimum *cost* from a point to a box on any layer. * It's safe to return a smaller than minimum cost */ -static cost_t cost_to_layerless_box(const CheapPointType * p, Cardinal point_layer, const BoxType * b) +static cost_t cost_to_layerless_box(const CheapPointType * p, pcb_cardinal_t point_layer, const BoxType * b) { CheapPointType p2 = closest_point_in_box(p, b); register cost_t c1, c2; @@ -1271,7 +1271,7 @@ * via costs if the route box is on a different layer. * assume routbox is bloated unless it is an expansion area */ -static cost_t cost_to_routebox(const CheapPointType * p, Cardinal point_layer, const routebox_t * rb) +static cost_t cost_to_routebox(const CheapPointType * p, pcb_cardinal_t point_layer, const routebox_t * rb) { register cost_t trial = 0; CheapPointType p2 = closest_point_in_routebox(p, rb); @@ -1465,7 +1465,7 @@ * a target (any target) */ struct mincost_target_closure { const CheapPointType *CostPoint; - Cardinal CostPointLayer; + pcb_cardinal_t CostPointLayer; routebox_t *nearest; cost_t nearest_cost; }; @@ -1502,7 +1502,7 @@ /* target_guess is our guess at what the nearest target is, or NULL if we * just plum don't have a clue. */ static routebox_t *mincost_target_to_point(const CheapPointType * CostPoint, - Cardinal CostPointLayer, rtree_t * targets, routebox_t * target_guess) + pcb_cardinal_t CostPointLayer, rtree_t * targets, routebox_t * target_guess) { struct mincost_target_closure mtc; assert(target_guess == NULL || target_guess->flags.target); /* this is a target, right? */ @@ -1586,7 +1586,7 @@ } /* create via edge, using previous edge to fill in defaults. */ -static edge_t *CreateViaEdge(const BoxType * area, Cardinal group, +static edge_t *CreateViaEdge(const BoxType * area, pcb_cardinal_t group, routebox_t * parent, edge_t * previous_edge, conflict_t to_site_conflict, conflict_t through_site_conflict, rtree_t * targets) { @@ -1796,7 +1796,7 @@ * immediately preceding expansion area, for backtracing. 'lastarea' is * the last expansion area created, we string these together in a loop * so we can remove them all easily at the end. */ -static routebox_t *CreateExpansionArea(const BoxType * area, Cardinal group, +static routebox_t *CreateExpansionArea(const BoxType * area, pcb_cardinal_t group, routebox_t * parent, pcb_bool relax_edge_requirements, edge_t * src_edge) { routebox_t *rb = (routebox_t *) malloc(sizeof(*rb)); @@ -2824,7 +2824,7 @@ * Route-tracing code: once we've got a path of expansion boxes, trace * a line through them to actually create the connection. */ -static void RD_DrawThermal(routedata_t * rd, Coord X, Coord Y, Cardinal group, Cardinal layer, routebox_t * subnet, pcb_bool is_bad) +static void RD_DrawThermal(routedata_t * rd, Coord X, Coord Y, pcb_cardinal_t group, pcb_cardinal_t layer, routebox_t * subnet, pcb_bool is_bad) { routebox_t *rb; rb = (routebox_t *) malloc(sizeof(*rb)); @@ -2903,7 +2903,7 @@ static void RD_DrawLine(routedata_t * rd, Coord X1, Coord Y1, Coord X2, - Coord Y2, Coord halfthick, Cardinal group, routebox_t * subnet, pcb_bool is_bad, pcb_bool is_45) + Coord Y2, Coord halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool is_45) { /* we hold the line in a queue to concatenate segments that * ajoin one another. That reduces the number of things in @@ -2912,7 +2912,7 @@ */ static Coord qX1 = -1, qY1, qX2, qY2; static Coord qhthick; - static Cardinal qgroup; + static pcb_cardinal_t qgroup; static pcb_bool qis_45, qis_bad; static routebox_t *qsn; @@ -3009,7 +3009,7 @@ RD_DrawManhattanLine(routedata_t * rd, const BoxType * box1, const BoxType * box2, CheapPointType start, CheapPointType end, - Coord halfthick, Cardinal group, routebox_t * subnet, pcb_bool is_bad, pcb_bool last_was_x) + Coord halfthick, pcb_cardinal_t group, routebox_t * subnet, pcb_bool is_bad, pcb_bool last_was_x) { CheapPointType knee = start; if (end.X == start.X) { Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 3396) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/search.c (revision 3397) @@ -128,7 +128,7 @@ static int layout_search_flag(const char *search_ID, multiple layout_object_mask_t obj_types, int flag) { - Cardinal l, n; + pcb_cardinal_t l, n; layout_search_t *s = new_search(search_ID); LayerType *layer = PCB->Data->Layer; Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 3396) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 3397) @@ -77,8 +77,8 @@ /*fputs("io_kicad_legacy_write_pcb()", FP);*/ - Cardinal i; - Cardinal j; + pcb_cardinal_t i; + pcb_cardinal_t j; Coord LayoutXOffset; Coord LayoutYOffset; @@ -236,7 +236,7 @@ return 0; } -int write_kicad_legacy_layout_tracks(FILE * FP, Cardinal number, +int write_kicad_legacy_layout_tracks(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord xOffset, Coord yOffset) { gdl_iterator_t it; Index: trunk/src_plugins/io_kicad_legacy/write.h =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.h (revision 3396) +++ trunk/src_plugins/io_kicad_legacy/write.h (revision 3397) @@ -35,6 +35,5 @@ int write_kicad_legacy_module_header(FILE * FP); int write_kicad_legacy_layout_header(FILE * FP); int write_kicad_legacy_layout_vias(FILE * FP, DataTypePtr Data, Coord MaxWidth, Coord MaxHeight); -int write_kicad_legacy_layout_tracks(FILE * FP, Cardinal number, LayerTypePtr layer, +int write_kicad_legacy_layout_tracks(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord MaxWidth, Coord MaxHeight); - Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 3396) +++ trunk/src_plugins/io_lihata/read.c (revision 3397) @@ -317,7 +317,7 @@ { PolygonType *poly = GetPolygonMemory(ly); lht_node_t *geo; - Cardinal n, c; + pcb_cardinal_t n, c; parse_id(&poly->ID, obj, 8); parse_attributes(&poly->Attributes, lht_dom_hash_get(obj, "attributes")); @@ -338,11 +338,11 @@ poly->PointMax = poly->PointN; poly->Points = malloc(sizeof(PointType) * poly->PointMax); poly->HoleIndexMax = poly->HoleIndexN = c-1; - poly->HoleIndex = malloc(sizeof(Cardinal) * poly->HoleIndexMax); + poly->HoleIndex = malloc(sizeof(pcb_cardinal_t) * poly->HoleIndexMax); /* convert points and build hole index */ for(c = 0, cnt = lht_dom_first(&it, geo); cnt != NULL; c++, cnt = lht_dom_next(&it)) { - Cardinal r; + pcb_cardinal_t r; if (cnt->type != LHT_TABLE) continue; if (c > 0) Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 3396) +++ trunk/src_plugins/io_lihata/write.c (revision 3397) @@ -236,7 +236,7 @@ { char buff[128]; lht_node_t *obj, *tbl, *geo; - Cardinal n, hole = 0; + pcb_cardinal_t n, hole = 0; sprintf(buff, "polygon.%ld", poly->ID); obj = lht_dom_node_alloc(LHT_HASH, buff); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 3396) +++ trunk/src_plugins/io_pcb/file.c (revision 3397) @@ -76,7 +76,7 @@ static void WritePCBFontData(FILE *); static void WriteViaData(FILE *, DataTypePtr); static void WritePCBRatData(FILE *); -static void WriteLayerData(FILE *, Cardinal, LayerTypePtr); +static void WriteLayerData(FILE *, pcb_cardinal_t, LayerTypePtr); /* --------------------------------------------------------------------------- * Flag helper functions @@ -271,7 +271,7 @@ */ static void WritePCBFontData(FILE * FP) { - Cardinal i, j; + pcb_cardinal_t i, j; LineTypePtr line; FontTypePtr font; @@ -439,7 +439,7 @@ /* --------------------------------------------------------------------------- * writes layer data */ -static void WriteLayerData(FILE * FP, Cardinal Number, LayerTypePtr layer) +static void WriteLayerData(FILE * FP, pcb_cardinal_t Number, LayerTypePtr layer) { gdl_iterator_t it; LineType *line; @@ -471,7 +471,7 @@ } textlist_foreach(&layer->Polygon, &it, polygon) { int p, i = 0; - Cardinal hole = 0; + pcb_cardinal_t hole = 0; fprintf(FP, "\tPolygon(%s)\n\t(", F2S(polygon, PCB_TYPE_POLYGON)); for (p = 0; p < polygon->PointN; p++) { PointTypePtr point = &polygon->Points[p]; @@ -504,7 +504,7 @@ */ int io_pcb_WriteBuffer(plug_io_t *ctx, FILE * FP, BufferType *buff) { - Cardinal i; + pcb_cardinal_t i; pcb_printf_slot[0] = ((io_pcb_ctx_t *)(ctx->plugin_data))->write_coord_fmt; WriteViaData(FP, buff->Data); @@ -519,7 +519,7 @@ */ int io_pcb_WritePCB(plug_io_t *ctx, FILE * FP) { - Cardinal i; + pcb_cardinal_t i; pcb_printf_slot[0] = ((io_pcb_ctx_t *)(ctx->plugin_data))->write_coord_fmt; WritePCBInfoHeader(FP); Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 3396) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 3397) @@ -7,8 +7,8 @@ #define FLEX_SCANNER #define YY_FLEX_MAJOR_VERSION 2 -#define YY_FLEX_MINOR_VERSION 5 -#define YY_FLEX_SUBMINOR_VERSION 35 +#define YY_FLEX_MINOR_VERSION 6 +#define YY_FLEX_SUBMINOR_VERSION 1 #if YY_FLEX_SUBMINOR_VERSION > 0 #define FLEX_BETA #endif @@ -87,25 +87,13 @@ #endif /* ! FLEXINT_H */ -#ifdef __cplusplus +/* TODO: this is always defined, so inline it */ +#define yyconst const -/* The "const" storage-class-modifier is valid. */ -#define YY_USE_CONST - -#else /* ! __cplusplus */ - -/* C99 requires __STDC__ to be defined as 1. */ -#if defined (__STDC__) - -#define YY_USE_CONST - -#endif /* defined (__STDC__) */ -#endif /* ! __cplusplus */ - -#ifdef YY_USE_CONST -#define yyconst const +#if defined(__GNUC__) && __GNUC__ >= 3 +#define yynoreturn __attribute__((__noreturn__)) #else -#define yyconst +#define yynoreturn #endif /* Returned upon end-of-file. */ @@ -161,6 +149,11 @@ typedef struct yy_buffer_state *YY_BUFFER_STATE; #endif +#ifndef YY_TYPEDEF_YY_SIZE_T +#define YY_TYPEDEF_YY_SIZE_T +typedef size_t yy_size_t; +#endif + extern int yyleng; extern FILE *yyin, *yyout; @@ -183,6 +176,13 @@ if ( yytext[yyl] == '\n' )\ --yylineno;\ }while(0) + #define YY_LINENO_REWIND_TO(dst) \ + do {\ + const char *p;\ + for ( p = yy_cp-1; p >= (dst); --p)\ + if ( *p == '\n' )\ + --yylineno;\ + }while(0) /* Return all but the first "n" matched characters back to the input stream. */ #define yyless(n) \ @@ -200,11 +200,6 @@ #define unput(c) yyunput( c, (yytext_ptr) ) -#ifndef YY_TYPEDEF_YY_SIZE_T -#define YY_TYPEDEF_YY_SIZE_T -typedef size_t yy_size_t; -#endif - #ifndef YY_STRUCT_YY_BUFFER_STATE #define YY_STRUCT_YY_BUFFER_STATE struct yy_buffer_state @@ -217,7 +212,7 @@ /* Size of input buffer in bytes, not including room for EOB * characters. */ - yy_size_t yy_buf_size; + int yy_buf_size; /* Number of characters read into yy_ch_buf, not including EOB * characters. @@ -273,7 +268,7 @@ /* Stack of input buffers. */ static size_t yy_buffer_stack_top = 0; /**< index of top of stack. */ static size_t yy_buffer_stack_max = 0; /**< capacity of stack. */ -static YY_BUFFER_STATE * yy_buffer_stack = 0; /**< Stack as an array. */ +static YY_BUFFER_STATE * yy_buffer_stack = NULL; /**< Stack as an array. */ /* We provide macros for accessing buffer states in case in the * future we want to put the buffer states in a more general @@ -296,7 +291,7 @@ int yyleng; /* Points to current character in buffer. */ -static char *yy_c_buf_p = (char *) 0; +static char *yy_c_buf_p = NULL; static int yy_init = 0; /* whether we need to initialize */ static int yy_start = 0; /* start state number */ @@ -355,7 +350,7 @@ typedef unsigned char YY_CHAR; -FILE *yyin = (FILE *) 0, *yyout = (FILE *) 0; +FILE *yyin = NULL, *yyout = NULL; typedef int yy_state_type; @@ -364,12 +359,15 @@ int yylineno = 1; extern char *yytext; +#ifdef yytext_ptr +#undef yytext_ptr +#endif #define yytext_ptr yytext static yy_state_type yy_get_previous_state (void ); static yy_state_type yy_try_NUL_trans (yy_state_type current_state ); static int yy_get_next_buffer (void ); -static void yy_fatal_error (yyconst char msg[] ); +static void yynoreturn yy_fatal_error (yyconst char* msg ); /* Done after the current pattern has been matched and before the * corresponding action - sets up yytext. @@ -376,7 +374,7 @@ */ #define YY_DO_BEFORE_ACTION \ (yytext_ptr) = yy_bp; \ - yyleng = (size_t) (yy_cp - yy_bp); \ + yyleng = (int) (yy_cp - yy_bp); \ (yy_hold_char) = *yy_cp; \ *yy_cp = '\0'; \ (yy_c_buf_p) = yy_cp; @@ -419,7 +417,7 @@ 0 } ; -static yyconst flex_int32_t yy_ec[256] = +static yyconst YY_CHAR yy_ec[256] = { 0, 1, 1, 1, 1, 1, 1, 1, 1, 2, 3, 1, 1, 4, 1, 1, 1, 1, 1, 1, 1, @@ -451,7 +449,7 @@ 1, 1, 1, 1, 1 } ; -static yyconst flex_int32_t yy_meta[51] = +static yyconst YY_CHAR yy_meta[51] = { 0, 1, 1, 2, 3, 1, 1, 1, 1, 1, 4, 4, 4, 4, 4, 4, 4, 4, 1, 1, 1, @@ -460,7 +458,7 @@ 1, 1, 1, 1, 1, 1, 1, 1, 1, 1 } ; -static yyconst flex_int16_t yy_base[226] = +static yyconst flex_uint16_t yy_base[226] = { 0, 0, 0, 256, 257, 253, 257, 257, 46, 0, 0, 42, 45, 46, 13, 16, 230, 213, 23, 207, 208, @@ -518,7 +516,7 @@ 0, 221, 221, 221, 221 } ; -static yyconst flex_int16_t yy_nxt[308] = +static yyconst flex_uint16_t yy_nxt[308] = { 0, 4, 5, 6, 7, 8, 9, 10, 11, 4, 12, 13, 14, 4, 15, 16, 17, 18, 19, 20, 21, @@ -717,7 +715,7 @@ */ static int Parse(FILE *Pipe, const char *Executable, const char *Path, const char *Filename, const char *Parse_parameter); -#line 721 "lex.yy.c" +#line 719 "lex.yy.c" #define INITIAL 0 @@ -750,19 +748,19 @@ FILE *yyget_in (void ); -void yyset_in (FILE * in_str ); +void yyset_in (FILE * _in_str ); FILE *yyget_out (void ); -void yyset_out (FILE * out_str ); +void yyset_out (FILE * _out_str ); -int yyget_leng (void ); + int yyget_leng (void ); char *yyget_text (void ); int yyget_lineno (void ); -void yyset_lineno (int line_number ); +void yyset_lineno (int _line_number ); /* Macros after this point can all be overridden by user definitions in * section 1. @@ -776,8 +774,12 @@ #endif #endif +#ifndef YY_NO_UNPUT + static void yyunput (int c,char *buf_ptr ); +#endif + #ifndef yytext_ptr static void yy_flex_strncpy (char *,yyconst char *,int ); #endif @@ -811,7 +813,7 @@ /* This used to be an fputs(), but since the string might contain NUL's, * we now use fwrite(). */ -#define ECHO do { if (fwrite( yytext, yyleng, 1, yyout )) {} } while (0) +#define ECHO do { if (fwrite( yytext, (size_t) yyleng, 1, yyout )) {} } while (0) #endif /* Gets input and stuffs it into "buf". number of characters read, or YY_NULL, @@ -835,7 +837,7 @@ else \ { \ errno=0; \ - while ( (result = fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ + while ( (result = (int) fread(buf, 1, max_size, yyin))==0 && ferror(yyin)) \ { \ if( errno != EINTR) \ { \ @@ -890,7 +892,7 @@ /* Code executed at the end of each rule. */ #ifndef YY_BREAK -#define YY_BREAK break; +#define YY_BREAK /*LINTED*/break; #endif #define YY_RULE_SETUP \ @@ -900,15 +902,10 @@ */ YY_DECL { - register yy_state_type yy_current_state; - register char *yy_cp, *yy_bp; - register int yy_act; + yy_state_type yy_current_state; + char *yy_cp, *yy_bp; + int yy_act; -#line 113 "../../src_plugins/io_pcb/parse_l.l" - - -#line 911 "lex.yy.c" - if ( !(yy_init) ) { (yy_init) = 1; @@ -935,7 +932,13 @@ yy_load_buffer_state( ); } - while ( 1 ) /* loops until end-of-file is reached */ + { +#line 113 "../../src_plugins/io_pcb/parse_l.l" + + +#line 940 "lex.yy.c" + + while ( /*CONSTCOND*/1 ) /* loops until end-of-file is reached */ { yy_cp = (yy_c_buf_p); @@ -951,7 +954,7 @@ yy_match: do { - register YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)]; + YY_CHAR yy_c = yy_ec[YY_SC_TO_UI(*yy_cp)] ; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -963,7 +966,7 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; ++yy_cp; } while ( yy_base[yy_current_state] != 257 ); @@ -981,7 +984,7 @@ if ( yy_act != YY_END_OF_BUFFER && yy_rule_can_match_eol[yy_act] ) { - int yyl; + yy_size_t yyl; for ( yyl = 0; yyl < yyleng; ++yyl ) if ( yytext[yyl] == '\n' ) @@ -1318,7 +1321,7 @@ #line 215 "../../src_plugins/io_pcb/parse_l.l" ECHO; YY_BREAK -#line 1322 "lex.yy.c" +#line 1325 "lex.yy.c" case YY_STATE_EOF(INITIAL): yyterminate(); @@ -1449,6 +1452,7 @@ "fatal flex scanner internal error--no action found" ); } /* end of action switch */ } /* end of scanning one token */ + } /* end of user's declarations */ } /* end of yylex */ /* yy_get_next_buffer - try to read in a new buffer @@ -1460,9 +1464,9 @@ */ static int yy_get_next_buffer (void) { - register char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; - register char *source = (yytext_ptr); - register int number_to_move, i; + char *dest = YY_CURRENT_BUFFER_LVALUE->yy_ch_buf; + char *source = (yytext_ptr); + yy_size_t number_to_move, i; int ret_val; if ( (yy_c_buf_p) > &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[(yy_n_chars) + 1] ) @@ -1491,7 +1495,7 @@ /* Try to read more data. */ /* First move last chars to start of buffer. */ - number_to_move = (int) ((yy_c_buf_p) - (yytext_ptr)) - 1; + number_to_move = (yy_size_t) ((yy_c_buf_p) - (yytext_ptr)) - 1; for ( i = 0; i < number_to_move; ++i ) *(dest++) = *(source++); @@ -1511,7 +1515,7 @@ { /* Not enough room in the buffer - grow it. */ /* just a shorter name for the current buffer */ - YY_BUFFER_STATE b = YY_CURRENT_BUFFER; + YY_BUFFER_STATE b = YY_CURRENT_BUFFER_LVALUE; int yy_c_buf_p_offset = (int) ((yy_c_buf_p) - b->yy_ch_buf); @@ -1531,7 +1535,7 @@ } else /* Can't grow it, we don't own it. */ - b->yy_ch_buf = 0; + b->yy_ch_buf = NULL; if ( ! b->yy_ch_buf ) YY_FATAL_ERROR( @@ -1549,7 +1553,7 @@ /* Read in more data. */ YY_INPUT( (&YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]), - (yy_n_chars), (size_t) num_to_read ); + (yy_n_chars), num_to_read ); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = (yy_n_chars); } @@ -1573,9 +1577,9 @@ else ret_val = EOB_ACT_CONTINUE_SCAN; - if ((yy_size_t) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { + if ((int) ((yy_n_chars) + number_to_move) > YY_CURRENT_BUFFER_LVALUE->yy_buf_size) { /* Extend the array by 50%, plus the number we really need. */ - yy_size_t new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); + int new_size = (yy_n_chars) + number_to_move + ((yy_n_chars) >> 1); YY_CURRENT_BUFFER_LVALUE->yy_ch_buf = (char *) yyrealloc((void *) YY_CURRENT_BUFFER_LVALUE->yy_ch_buf,new_size ); if ( ! YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_get_next_buffer()" ); @@ -1594,14 +1598,14 @@ static yy_state_type yy_get_previous_state (void) { - register yy_state_type yy_current_state; - register char *yy_cp; + yy_state_type yy_current_state; + char *yy_cp; yy_current_state = (yy_start); for ( yy_cp = (yytext_ptr) + YY_MORE_ADJ; yy_cp < (yy_c_buf_p); ++yy_cp ) { - register YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); + YY_CHAR yy_c = (*yy_cp ? yy_ec[YY_SC_TO_UI(*yy_cp)] : 1); if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1613,7 +1617,7 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; } return yy_current_state; @@ -1626,10 +1630,10 @@ */ static yy_state_type yy_try_NUL_trans (yy_state_type yy_current_state ) { - register int yy_is_jam; - register char *yy_cp = (yy_c_buf_p); + int yy_is_jam; + char *yy_cp = (yy_c_buf_p); - register YY_CHAR yy_c = 1; + YY_CHAR yy_c = 1; if ( yy_accept[yy_current_state] ) { (yy_last_accepting_state) = yy_current_state; @@ -1641,15 +1645,17 @@ if ( yy_current_state >= 222 ) yy_c = yy_meta[(unsigned int) yy_c]; } - yy_current_state = yy_nxt[yy_base[yy_current_state] + (unsigned int) yy_c]; + yy_current_state = yy_nxt[yy_base[yy_current_state] + (flex_int16_t) yy_c]; yy_is_jam = (yy_current_state == 221); - return yy_is_jam ? 0 : yy_current_state; + return yy_is_jam ? 0 : yy_current_state; } - static void yyunput (int c, register char * yy_bp ) +#ifndef YY_NO_UNPUT + + static void yyunput (int c, char * yy_bp ) { - register char *yy_cp; + char *yy_cp; yy_cp = (yy_c_buf_p); @@ -1659,10 +1665,10 @@ if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) { /* need to shift things up to make room */ /* +2 for EOB chars. */ - register int number_to_move = (yy_n_chars) + 2; - register char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ + int number_to_move = (yy_n_chars) + 2; + char *dest = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[ YY_CURRENT_BUFFER_LVALUE->yy_buf_size + 2]; - register char *source = + char *source = &YY_CURRENT_BUFFER_LVALUE->yy_ch_buf[number_to_move]; while ( source > YY_CURRENT_BUFFER_LVALUE->yy_ch_buf ) @@ -1671,7 +1677,7 @@ yy_cp += (int) (dest - source); yy_bp += (int) (dest - source); YY_CURRENT_BUFFER_LVALUE->yy_n_chars = - (yy_n_chars) = YY_CURRENT_BUFFER_LVALUE->yy_buf_size; + (yy_n_chars) = (int) YY_CURRENT_BUFFER_LVALUE->yy_buf_size; if ( yy_cp < YY_CURRENT_BUFFER_LVALUE->yy_ch_buf + 2 ) YY_FATAL_ERROR( "flex scanner push-back overflow" ); @@ -1688,6 +1694,8 @@ (yy_c_buf_p) = yy_cp; } +#endif + #ifndef YY_NO_INPUT #ifdef __cplusplus static int yyinput (void) @@ -1736,7 +1744,7 @@ case EOB_ACT_END_OF_FILE: { if ( yywrap( ) ) - return EOF; + return 0; if ( ! (yy_did_buffer_switch_on_eof) ) YY_NEW_FILE; @@ -1842,7 +1850,7 @@ if ( ! b ) YY_FATAL_ERROR( "out of dynamic memory in yy_create_buffer()" ); - b->yy_buf_size = size; + b->yy_buf_size = (yy_size_t)size; /* yy_ch_buf has to be 2 characters longer than the size given because * we need to put in 2 end-of-buffer characters. @@ -1877,10 +1885,6 @@ yyfree((void *) b ); } -#ifndef __cplusplus -extern int isatty (int ); -#endif /* __cplusplus */ - /* Initializes or reinitializes a buffer. * This function is sometimes called more than once on the same buffer, * such as during a yyrestart() or at EOF. @@ -2001,7 +2005,7 @@ * scanner will even need a stack. We use 2 instead of 1 to avoid an * immediate realloc on the next call. */ - num_to_alloc = 1; + num_to_alloc = 1; /* After all that talk, this was set to 1 anyways... */ (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc (num_to_alloc * sizeof(struct yy_buffer_state*) ); @@ -2018,7 +2022,7 @@ if ((yy_buffer_stack_top) >= ((yy_buffer_stack_max)) - 1){ /* Increase the buffer to prepare for a possible push. */ - int grow_size = 8 /* arbitrary grow size */; + yy_size_t grow_size = 8 /* arbitrary grow size */; num_to_alloc = (yy_buffer_stack_max) + grow_size; (yy_buffer_stack) = (struct yy_buffer_state**)yyrealloc @@ -2048,7 +2052,7 @@ base[size-2] != YY_END_OF_BUFFER_CHAR || base[size-1] != YY_END_OF_BUFFER_CHAR ) /* They forgot to leave room for the EOB's. */ - return 0; + return NULL; b = (YY_BUFFER_STATE) yyalloc(sizeof( struct yy_buffer_state ) ); if ( ! b ) @@ -2057,7 +2061,7 @@ b->yy_buf_size = size - 2; /* "- 2" to take care of EOB's */ b->yy_buf_pos = b->yy_ch_buf = base; b->yy_is_our_buffer = 0; - b->yy_input_file = 0; + b->yy_input_file = NULL; b->yy_n_chars = b->yy_buf_size; b->yy_is_interactive = 0; b->yy_at_bol = 1; @@ -2080,7 +2084,7 @@ YY_BUFFER_STATE yy_scan_string (yyconst char * yystr ) { - return yy_scan_bytes(yystr,strlen(yystr) ); + return yy_scan_bytes(yystr,(int) strlen(yystr) ); } /** Setup the input buffer state to scan the given bytes. The next call to yylex() will @@ -2095,10 +2099,10 @@ YY_BUFFER_STATE b; char *buf; yy_size_t n; - int i; + yy_size_t i; /* Get memory for full buffer, including space for trailing EOB's. */ - n = _yybytes_len + 2; + n = (yy_size_t) _yybytes_len + 2; buf = (char *) yyalloc(n ); if ( ! buf ) YY_FATAL_ERROR( "out of dynamic memory in yy_scan_bytes()" ); @@ -2124,9 +2128,9 @@ #define YY_EXIT_FAILURE 2 #endif -static void yy_fatal_error (yyconst char* msg ) +static void yynoreturn yy_fatal_error (yyconst char* msg ) { - (void) fprintf( stderr, "%s\n", msg ); + (void) fprintf( stderr, "%s\n", msg ); exit( YY_EXIT_FAILURE ); } @@ -2192,29 +2196,29 @@ } /** Set the current line number. - * @param line_number + * @param _line_number line number * */ -void yyset_lineno (int line_number ) +void yyset_lineno (int _line_number ) { - yylineno = line_number; + yylineno = _line_number; } /** Set the input stream. This does not discard the current * input buffer. - * @param in_str A readable stream. + * @param _in_str A readable stream. * * @see yy_switch_to_buffer */ -void yyset_in (FILE * in_str ) +void yyset_in (FILE * _in_str ) { - yyin = in_str ; + yyin = _in_str ; } -void yyset_out (FILE * out_str ) +void yyset_out (FILE * _out_str ) { - yyout = out_str ; + yyout = _out_str ; } int yyget_debug (void) @@ -2222,9 +2226,9 @@ return yy_flex_debug; } -void yyset_debug (int bdebug ) +void yyset_debug (int _bdebug ) { - yy_flex_debug = bdebug ; + yy_flex_debug = _bdebug ; } static int yy_init_globals (void) @@ -2236,10 +2240,10 @@ /* We do not touch yylineno unless the option is enabled. */ yylineno = 1; - (yy_buffer_stack) = 0; + (yy_buffer_stack) = NULL; (yy_buffer_stack_top) = 0; (yy_buffer_stack_max) = 0; - (yy_c_buf_p) = (char *) 0; + (yy_c_buf_p) = NULL; (yy_init) = 0; (yy_start) = 0; @@ -2248,8 +2252,8 @@ yyin = stdin; yyout = stdout; #else - yyin = (FILE *) 0; - yyout = (FILE *) 0; + yyin = NULL; + yyout = NULL; #endif /* For future reference: Set errno on error, since we are called by @@ -2287,7 +2291,8 @@ #ifndef yytext_ptr static void yy_flex_strncpy (char* s1, yyconst char * s2, int n ) { - register int i; + + int i; for ( i = 0; i < n; ++i ) s1[i] = s2[i]; } @@ -2296,7 +2301,7 @@ #ifdef YY_NEED_STRLEN static int yy_flex_strlen (yyconst char * s ) { - register int n; + int n; for ( n = 0; s[n]; ++n ) ; @@ -2306,11 +2311,12 @@ void *yyalloc (yy_size_t size ) { - return (void *) malloc( size ); + return malloc(size); } void *yyrealloc (void * ptr, yy_size_t size ) { + /* The cast to (char *) in the following accommodates both * implementations that use char* generic pointers, and those * that use void* generic pointers. It works with the latter @@ -2318,12 +2324,12 @@ * any pointer type to void*, and deal with argument conversions * as though doing an assignment. */ - return (void *) realloc( (char *) ptr, size ); + return realloc(ptr, size); } void yyfree (void * ptr ) { - free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ + free( (char *) ptr ); /* see yyrealloc() for (char *) cast */ } #define YYTABLES_NAME "yytables" Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 3396) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 3397) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison implementation for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -44,7 +44,7 @@ #define YYBISON 1 /* Bison version. */ -#define YYBISON_VERSION "3.0.2" +#define YYBISON_VERSION "3.0.4" /* Skeleton name. */ #define YYSKELETON_NAME "yacc.c" @@ -252,7 +252,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 116 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:355 */ @@ -265,6 +265,8 @@ #line 267 "parse_y.tab.c" /* yacc.c:355 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif @@ -278,7 +280,7 @@ /* Copy the second part of user declarations. */ -#line 282 "parse_y.tab.c" /* yacc.c:358 */ +#line 284 "parse_y.tab.c" /* yacc.c:358 */ #ifdef short # undef short @@ -1780,7 +1782,7 @@ case 5: #line 146 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { YYABORT; } -#line 1784 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1786 "parse_y.tab.c" /* yacc.c:1646 */ break; case 6: @@ -1805,7 +1807,7 @@ yyPCB->NetlistPatches = yyPCB->NetlistPatchLast = NULL; layer_group_string = NULL; } -#line 1809 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1811 "parse_y.tab.c" /* yacc.c:1646 */ break; case 7: @@ -1832,7 +1834,7 @@ ENDALL_LOOP; PCB = pcb_save; } -#line 1836 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1838 "parse_y.tab.c" /* yacc.c:1646 */ break; case 8: @@ -1839,7 +1841,7 @@ #line 227 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { PreLoadElementPCB (); layer_group_string = NULL; } -#line 1843 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1845 "parse_y.tab.c" /* yacc.c:1646 */ break; case 9: @@ -1849,7 +1851,7 @@ yyData->LayerN = 2; PostLoadElementPCB (); } -#line 1853 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1855 "parse_y.tab.c" /* yacc.c:1646 */ break; case 10: @@ -1869,7 +1871,7 @@ LayerFlag[i] = pcb_false; yyData->LayerN = 0; } -#line 1873 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1875 "parse_y.tab.c" /* yacc.c:1646 */ break; case 14: @@ -1888,7 +1890,7 @@ free (yyFont->Symbol[i].Line); memset(yyFont->Symbol, 0, sizeof(yyFont->Symbol)); } -#line 1892 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1894 "parse_y.tab.c" /* yacc.c:1646 */ break; case 15: @@ -1897,7 +1899,7 @@ yyFont->Valid = pcb_true; SetFontInfo(yyFont); } -#line 1901 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1903 "parse_y.tab.c" /* yacc.c:1646 */ break; case 17: @@ -1908,7 +1910,7 @@ YYABORT; } } -#line 1912 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1914 "parse_y.tab.c" /* yacc.c:1646 */ break; case 18: @@ -1918,7 +1920,7 @@ yyPCB->MaxWidth = MAX_COORD; yyPCB->MaxHeight = MAX_COORD; } -#line 1922 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1924 "parse_y.tab.c" /* yacc.c:1646 */ break; case 19: @@ -1928,7 +1930,7 @@ yyPCB->MaxWidth = OU ((yyvsp[-2].measure)); yyPCB->MaxHeight = OU ((yyvsp[-1].measure)); } -#line 1932 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1934 "parse_y.tab.c" /* yacc.c:1646 */ break; case 20: @@ -1938,7 +1940,7 @@ yyPCB->MaxWidth = NU ((yyvsp[-2].measure)); yyPCB->MaxHeight = NU ((yyvsp[-1].measure)); } -#line 1942 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1944 "parse_y.tab.c" /* yacc.c:1646 */ break; case 24: @@ -1948,7 +1950,7 @@ yyPCB->GridOffsetX = OU ((yyvsp[-2].measure)); yyPCB->GridOffsetY = OU ((yyvsp[-1].measure)); } -#line 1952 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1954 "parse_y.tab.c" /* yacc.c:1646 */ break; case 25: @@ -1964,7 +1966,7 @@ conf_set(yy_settings_dest, "editor/draw_grid", -1, "false", POL_OVERWRITE); } } -#line 1968 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1970 "parse_y.tab.c" /* yacc.c:1646 */ break; case 26: @@ -1980,7 +1982,7 @@ conf_set(yy_settings_dest, "editor/draw_grid", -1, "false", POL_OVERWRITE); } } -#line 1984 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1986 "parse_y.tab.c" /* yacc.c:1646 */ break; case 27: @@ -1990,7 +1992,7 @@ yyPCB->CursorY = OU ((yyvsp[-2].measure)); yyPCB->Zoom = (yyvsp[-1].number)*2; } -#line 1994 "parse_y.tab.c" /* yacc.c:1646 */ +#line 1996 "parse_y.tab.c" /* yacc.c:1646 */ break; case 28: @@ -2000,7 +2002,7 @@ yyPCB->CursorY = NU ((yyvsp[-2].measure)); yyPCB->Zoom = (yyvsp[-1].number); } -#line 2004 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2006 "parse_y.tab.c" /* yacc.c:1646 */ break; case 31: @@ -2009,7 +2011,7 @@ /* Read in cmil^2 for now; in future this should be a noop. */ yyPCB->IsleArea = PCB_MIL_TO_COORD (PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100.0) / 100.0; } -#line 2013 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2015 "parse_y.tab.c" /* yacc.c:1646 */ break; case 33: @@ -2017,7 +2019,7 @@ { yyPCB->ThermScale = (yyvsp[-1].number); } -#line 2021 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2023 "parse_y.tab.c" /* yacc.c:1646 */ break; case 38: @@ -2028,7 +2030,7 @@ yyPCB->minWid = NU ((yyvsp[-1].measure)); yyPCB->minRing = NU ((yyvsp[-1].measure)); } -#line 2032 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2034 "parse_y.tab.c" /* yacc.c:1646 */ break; case 39: @@ -2040,7 +2042,7 @@ yyPCB->minSlk = NU ((yyvsp[-1].measure)); yyPCB->minRing = NU ((yyvsp[-2].measure)); } -#line 2044 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2046 "parse_y.tab.c" /* yacc.c:1646 */ break; case 40: @@ -2053,7 +2055,7 @@ yyPCB->minDrill = NU ((yyvsp[-2].measure)); yyPCB->minRing = NU ((yyvsp[-1].measure)); } -#line 2057 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2059 "parse_y.tab.c" /* yacc.c:1646 */ break; case 41: @@ -2061,7 +2063,7 @@ { yy_pcb_flags = MakeFlags ((yyvsp[-1].integer) & PCB_FLAGS); } -#line 2065 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2067 "parse_y.tab.c" /* yacc.c:1646 */ break; case 42: @@ -2070,7 +2072,7 @@ yy_pcb_flags = string_to_pcbflags ((yyvsp[-1].string), yyerror); free((yyvsp[-1].string)); } -#line 2074 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2076 "parse_y.tab.c" /* yacc.c:1646 */ break; case 44: @@ -2078,7 +2080,7 @@ { layer_group_string = (yyvsp[-1].string); } -#line 2082 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2084 "parse_y.tab.c" /* yacc.c:1646 */ break; case 46: @@ -2091,7 +2093,7 @@ } free((yyvsp[-1].string)); } -#line 2095 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2097 "parse_y.tab.c" /* yacc.c:1646 */ break; case 47: @@ -2104,13 +2106,13 @@ } free((yyvsp[-1].string)); } -#line 2108 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2110 "parse_y.tab.c" /* yacc.c:1646 */ break; case 54: #line 700 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyPCB->Attributes; } -#line 2114 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2116 "parse_y.tab.c" /* yacc.c:1646 */ break; case 58: @@ -2121,13 +2123,13 @@ */ yyElement = NULL; } -#line 2125 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2127 "parse_y.tab.c" /* yacc.c:1646 */ break; case 60: #line 711 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { YYABORT; } -#line 2131 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2133 "parse_y.tab.c" /* yacc.c:1646 */ break; case 66: @@ -2137,7 +2139,7 @@ NU ((yyvsp[-3].measure)), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-2].string)); } -#line 2141 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2143 "parse_y.tab.c" /* yacc.c:1646 */ break; case 67: @@ -2147,7 +2149,7 @@ OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2151 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2153 "parse_y.tab.c" /* yacc.c:1646 */ break; case 68: @@ -2157,7 +2159,7 @@ OU ((yyvsp[-5].measure)) + OU((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2161 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2163 "parse_y.tab.c" /* yacc.c:1646 */ break; case 69: @@ -2167,7 +2169,7 @@ OU((yyvsp[-4].measure)) + 2*MASKFRAME, OU ((yyvsp[-3].measure)), (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2171 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2173 "parse_y.tab.c" /* yacc.c:1646 */ break; case 70: @@ -2184,7 +2186,7 @@ OU((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2188 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2190 "parse_y.tab.c" /* yacc.c:1646 */ break; case 71: @@ -2193,7 +2195,7 @@ CreateNewRat(yyData, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), (yyvsp[-5].integer), (yyvsp[-2].integer), conf_core.appearance.rat_thickness, (yyvsp[-1].flagtype)); } -#line 2197 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2199 "parse_y.tab.c" /* yacc.c:1646 */ break; case 72: @@ -2202,7 +2204,7 @@ CreateNewRat(yyData, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), (yyvsp[-5].integer), (yyvsp[-2].integer), conf_core.appearance.rat_thickness, OldFlags((yyvsp[-1].integer))); } -#line 2206 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2208 "parse_y.tab.c" /* yacc.c:1646 */ break; case 73: @@ -2230,7 +2232,7 @@ if ((yyvsp[-2].string) != NULL) free((yyvsp[-2].string)); } -#line 2234 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2236 "parse_y.tab.c" /* yacc.c:1646 */ break; case 85: @@ -2239,13 +2241,13 @@ CreateNewPolygonFromRectangle(Layer, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-5].measure)) + OU ((yyvsp[-3].measure)), OU ((yyvsp[-4].measure)) + OU ((yyvsp[-2].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2243 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2245 "parse_y.tab.c" /* yacc.c:1646 */ break; case 89: #line 921 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & Layer->Attributes; } -#line 2249 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2251 "parse_y.tab.c" /* yacc.c:1646 */ break; case 92: @@ -2254,7 +2256,7 @@ CreateNewLineOnLayer(Layer, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), (yyvsp[-1].flagtype)); } -#line 2258 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2260 "parse_y.tab.c" /* yacc.c:1646 */ break; case 93: @@ -2263,7 +2265,7 @@ CreateNewLineOnLayer(Layer, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2267 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2269 "parse_y.tab.c" /* yacc.c:1646 */ break; case 94: @@ -2274,7 +2276,7 @@ CreateNewLineOnLayer(Layer, OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), 200*GROUNDPLANEFRAME, OldFlags(IV ((yyvsp[-1].measure)))); } -#line 2278 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2280 "parse_y.tab.c" /* yacc.c:1646 */ break; case 95: @@ -2283,7 +2285,7 @@ CreateNewArcOnLayer(Layer, NU ((yyvsp[-9].measure)), NU ((yyvsp[-8].measure)), NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-1].flagtype)); } -#line 2287 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2289 "parse_y.tab.c" /* yacc.c:1646 */ break; case 96: @@ -2292,7 +2294,7 @@ CreateNewArcOnLayer(Layer, OU ((yyvsp[-9].measure)), OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OldFlags((yyvsp[-1].integer))); } -#line 2296 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2298 "parse_y.tab.c" /* yacc.c:1646 */ break; case 97: @@ -2301,7 +2303,7 @@ CreateNewArcOnLayer(Layer, OU ((yyvsp[-8].measure)), OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-6].measure)), IV ((yyvsp[-3].measure)), (yyvsp[-2].number), OU ((yyvsp[-4].measure)), 200*GROUNDPLANEFRAME, OldFlags((yyvsp[-1].integer))); } -#line 2305 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2307 "parse_y.tab.c" /* yacc.c:1646 */ break; case 98: @@ -2311,7 +2313,7 @@ CreateNewText(Layer,yyFont,OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), 100, (yyvsp[-2].string), OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2315 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2317 "parse_y.tab.c" /* yacc.c:1646 */ break; case 99: @@ -2330,7 +2332,7 @@ OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2334 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2336 "parse_y.tab.c" /* yacc.c:1646 */ break; case 100: @@ -2354,7 +2356,7 @@ CreateNewText(Layer, yyFont, NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), (yyvsp[-4].number), (yyvsp[-3].number), (yyvsp[-2].string), (yyvsp[-1].flagtype)); free ((yyvsp[-2].string)); } -#line 2358 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2360 "parse_y.tab.c" /* yacc.c:1646 */ break; case 101: @@ -2362,13 +2364,13 @@ { Polygon = CreateNewPolygon(Layer, (yyvsp[-2].flagtype)); } -#line 2366 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2368 "parse_y.tab.c" /* yacc.c:1646 */ break; case 102: #line 1156 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { - Cardinal contour, contour_start, contour_end; + pcb_cardinal_t contour, contour_start, contour_end; pcb_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) @@ -2398,7 +2400,7 @@ r_insert_entry (Layer->polygon_tree, (BoxType *) Polygon, 0); } } -#line 2402 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2404 "parse_y.tab.c" /* yacc.c:1646 */ break; case 105: @@ -2406,7 +2408,7 @@ { CreateNewHoleInPolygon (Polygon); } -#line 2410 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2412 "parse_y.tab.c" /* yacc.c:1646 */ break; case 109: @@ -2414,7 +2416,7 @@ { CreateNewPointInPolygon(Polygon, OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2418 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2420 "parse_y.tab.c" /* yacc.c:1646 */ break; case 110: @@ -2422,7 +2424,7 @@ { CreateNewPointInPolygon(Polygon, NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2426 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2428 "parse_y.tab.c" /* yacc.c:1646 */ break; case 116: @@ -2434,7 +2436,7 @@ free ((yyvsp[-5].string)); pin_num = 1; } -#line 2438 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2440 "parse_y.tab.c" /* yacc.c:1646 */ break; case 117: @@ -2442,7 +2444,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2446 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2448 "parse_y.tab.c" /* yacc.c:1646 */ break; case 118: @@ -2454,7 +2456,7 @@ free ((yyvsp[-7].string)); pin_num = 1; } -#line 2458 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2460 "parse_y.tab.c" /* yacc.c:1646 */ break; case 119: @@ -2462,7 +2464,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2466 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2468 "parse_y.tab.c" /* yacc.c:1646 */ break; case 120: @@ -2475,7 +2477,7 @@ free ((yyvsp[-7].string)); pin_num = 1; } -#line 2479 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2481 "parse_y.tab.c" /* yacc.c:1646 */ break; case 121: @@ -2483,7 +2485,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2487 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2489 "parse_y.tab.c" /* yacc.c:1646 */ break; case 122: @@ -2498,7 +2500,7 @@ free ((yyvsp[-10].string)); free ((yyvsp[-9].string)); } -#line 2502 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2504 "parse_y.tab.c" /* yacc.c:1646 */ break; case 123: @@ -2506,7 +2508,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2510 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2512 "parse_y.tab.c" /* yacc.c:1646 */ break; case 124: @@ -2521,7 +2523,7 @@ free ((yyvsp[-10].string)); free ((yyvsp[-9].string)); } -#line 2525 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2527 "parse_y.tab.c" /* yacc.c:1646 */ break; case 125: @@ -2529,7 +2531,7 @@ { SetElementBoundingBox(yyData, yyElement, yyFont); } -#line 2533 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2535 "parse_y.tab.c" /* yacc.c:1646 */ break; case 133: @@ -2537,7 +2539,7 @@ { CreateNewLineInElement(yyElement, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2541 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2543 "parse_y.tab.c" /* yacc.c:1646 */ break; case 134: @@ -2545,7 +2547,7 @@ { CreateNewLineInElement(yyElement, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2549 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2551 "parse_y.tab.c" /* yacc.c:1646 */ break; case 135: @@ -2553,7 +2555,7 @@ { CreateNewArcInElement(yyElement, NU ((yyvsp[-7].measure)), NU ((yyvsp[-6].measure)), NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-1].measure))); } -#line 2557 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2559 "parse_y.tab.c" /* yacc.c:1646 */ break; case 136: @@ -2561,7 +2563,7 @@ { CreateNewArcInElement(yyElement, OU ((yyvsp[-7].measure)), OU ((yyvsp[-6].measure)), OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-1].measure))); } -#line 2565 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2567 "parse_y.tab.c" /* yacc.c:1646 */ break; case 137: @@ -2570,7 +2572,7 @@ yyElement->MarkX = NU ((yyvsp[-2].measure)); yyElement->MarkY = NU ((yyvsp[-1].measure)); } -#line 2574 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2576 "parse_y.tab.c" /* yacc.c:1646 */ break; case 138: @@ -2579,13 +2581,13 @@ yyElement->MarkX = OU ((yyvsp[-2].measure)); yyElement->MarkY = OU ((yyvsp[-1].measure)); } -#line 2583 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2585 "parse_y.tab.c" /* yacc.c:1646 */ break; case 139: #line 1483 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyElement->Attributes; } -#line 2589 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2591 "parse_y.tab.c" /* yacc.c:1646 */ break; case 147: @@ -2595,7 +2597,7 @@ NU ((yyvsp[-4].measure)) + yyElement->MarkY, NU ((yyvsp[-3].measure)) + yyElement->MarkX, NU ((yyvsp[-2].measure)) + yyElement->MarkY, NU ((yyvsp[-1].measure))); } -#line 2599 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2601 "parse_y.tab.c" /* yacc.c:1646 */ break; case 148: @@ -2605,7 +2607,7 @@ OU ((yyvsp[-4].measure)) + yyElement->MarkY, OU ((yyvsp[-3].measure)) + yyElement->MarkX, OU ((yyvsp[-2].measure)) + yyElement->MarkY, OU ((yyvsp[-1].measure))); } -#line 2609 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2611 "parse_y.tab.c" /* yacc.c:1646 */ break; case 149: @@ -2614,7 +2616,7 @@ CreateNewArcInElement(yyElement, NU ((yyvsp[-7].measure)) + yyElement->MarkX, NU ((yyvsp[-6].measure)) + yyElement->MarkY, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), NU ((yyvsp[-1].measure))); } -#line 2618 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2620 "parse_y.tab.c" /* yacc.c:1646 */ break; case 150: @@ -2623,13 +2625,13 @@ CreateNewArcInElement(yyElement, OU ((yyvsp[-7].measure)) + yyElement->MarkX, OU ((yyvsp[-6].measure)) + yyElement->MarkY, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), (yyvsp[-3].number), (yyvsp[-2].number), OU ((yyvsp[-1].measure))); } -#line 2627 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2629 "parse_y.tab.c" /* yacc.c:1646 */ break; case 151: #line 1520 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { attr_list = & yyElement->Attributes; } -#line 2633 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2635 "parse_y.tab.c" /* yacc.c:1646 */ break; case 153: @@ -2641,7 +2643,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2645 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2647 "parse_y.tab.c" /* yacc.c:1646 */ break; case 154: @@ -2653,7 +2655,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2657 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2659 "parse_y.tab.c" /* yacc.c:1646 */ break; case 155: @@ -2664,7 +2666,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2668 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2670 "parse_y.tab.c" /* yacc.c:1646 */ break; case 156: @@ -2678,7 +2680,7 @@ free ((yyvsp[-2].string)); } -#line 2682 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2684 "parse_y.tab.c" /* yacc.c:1646 */ break; case 157: @@ -2697,7 +2699,7 @@ OU ((yyvsp[-3].measure)) + 2*MASKFRAME, hole, (yyvsp[-2].string), p_number, OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2701 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2703 "parse_y.tab.c" /* yacc.c:1646 */ break; case 158: @@ -2711,7 +2713,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2715 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2717 "parse_y.tab.c" /* yacc.c:1646 */ break; case 159: @@ -2724,7 +2726,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2728 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2730 "parse_y.tab.c" /* yacc.c:1646 */ break; case 160: @@ -2735,7 +2737,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2739 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2741 "parse_y.tab.c" /* yacc.c:1646 */ break; case 161: @@ -2748,19 +2750,19 @@ OU ((yyvsp[-3].measure)) + 2*MASKFRAME, (yyvsp[-2].string),p_number, OldFlags((yyvsp[-1].integer))); free ((yyvsp[-2].string)); } -#line 2752 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2754 "parse_y.tab.c" /* yacc.c:1646 */ break; case 162: #line 1715 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.flagtype) = OldFlags((yyvsp[0].integer)); } -#line 2758 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2760 "parse_y.tab.c" /* yacc.c:1646 */ break; case 163: #line 1716 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.flagtype) = string_to_flags ((yyvsp[0].string), yyerror); free((yyvsp[0].string)); } -#line 2764 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2766 "parse_y.tab.c" /* yacc.c:1646 */ break; case 167: @@ -2780,7 +2782,7 @@ Symbol->Valid = pcb_true; Symbol->Delta = NU ((yyvsp[-2].measure)); } -#line 2784 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2786 "parse_y.tab.c" /* yacc.c:1646 */ break; case 168: @@ -2800,7 +2802,7 @@ Symbol->Valid = pcb_true; Symbol->Delta = OU ((yyvsp[-2].measure)); } -#line 2804 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2806 "parse_y.tab.c" /* yacc.c:1646 */ break; case 174: @@ -2808,7 +2810,7 @@ { CreateNewLineInSymbol(Symbol, OU ((yyvsp[-5].measure)), OU ((yyvsp[-4].measure)), OU ((yyvsp[-3].measure)), OU ((yyvsp[-2].measure)), OU ((yyvsp[-1].measure))); } -#line 2812 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2814 "parse_y.tab.c" /* yacc.c:1646 */ break; case 175: @@ -2816,7 +2818,7 @@ { CreateNewLineInSymbol(Symbol, NU ((yyvsp[-5].measure)), NU ((yyvsp[-4].measure)), NU ((yyvsp[-3].measure)), NU ((yyvsp[-2].measure)), NU ((yyvsp[-1].measure))); } -#line 2820 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2822 "parse_y.tab.c" /* yacc.c:1646 */ break; case 183: @@ -2826,7 +2828,7 @@ free ((yyvsp[-3].string)); free ((yyvsp[-2].string)); } -#line 2830 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2832 "parse_y.tab.c" /* yacc.c:1646 */ break; case 189: @@ -2835,25 +2837,25 @@ CreateNewConnection(Menu, (yyvsp[-1].string)); free ((yyvsp[-1].string)); } -#line 2839 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2841 "parse_y.tab.c" /* yacc.c:1646 */ break; case 197: #line 1953 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_ADD_CONN, (yyvsp[-2].string), (yyvsp[-1].string), NULL); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2845 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2847 "parse_y.tab.c" /* yacc.c:1646 */ break; case 198: #line 1954 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_DEL_CONN, (yyvsp[-2].string), (yyvsp[-1].string), NULL); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2851 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2853 "parse_y.tab.c" /* yacc.c:1646 */ break; case 199: #line 1955 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { rats_patch_append(yyPCB, RATP_CHANGE_ATTRIB, (yyvsp[-3].string), (yyvsp[-2].string), (yyvsp[-1].string)); free((yyvsp[-3].string)); free((yyvsp[-2].string)); free((yyvsp[-1].string)); } -#line 2857 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2859 "parse_y.tab.c" /* yacc.c:1646 */ break; case 200: @@ -2863,95 +2865,95 @@ free ((yyvsp[-2].string)); free ((yyvsp[-1].string)); } -#line 2867 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2869 "parse_y.tab.c" /* yacc.c:1646 */ break; case 201: #line 1990 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.string) = (yyvsp[0].string); } -#line 2873 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2875 "parse_y.tab.c" /* yacc.c:1646 */ break; case 202: #line 1991 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.string) = 0; } -#line 2879 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2881 "parse_y.tab.c" /* yacc.c:1646 */ break; case 203: #line 1995 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[0].number); } -#line 2885 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2887 "parse_y.tab.c" /* yacc.c:1646 */ break; case 204: #line 1996 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { (yyval.number) = (yyvsp[0].integer); } -#line 2891 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2893 "parse_y.tab.c" /* yacc.c:1646 */ break; case 205: #line 2001 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { do_measure(&(yyval.measure), (yyvsp[0].number), PCB_MIL_TO_COORD ((yyvsp[0].number)) / 100.0, 0); } -#line 2897 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2899 "parse_y.tab.c" /* yacc.c:1646 */ break; case 206: #line 2002 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100000.0); } -#line 2903 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2905 "parse_y.tab.c" /* yacc.c:1646 */ break; case 207: #line 2003 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number)) / 100.0); } -#line 2909 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2911 "parse_y.tab.c" /* yacc.c:1646 */ break; case 208: #line 2004 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MIL_TO_COORD ((yyvsp[-1].number))); } -#line 2915 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2917 "parse_y.tab.c" /* yacc.c:1646 */ break; case 209: #line 2005 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_INCH_TO_COORD ((yyvsp[-1].number))); } -#line 2921 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2923 "parse_y.tab.c" /* yacc.c:1646 */ break; case 210: #line 2006 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) / 1000000.0); } -#line 2927 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2929 "parse_y.tab.c" /* yacc.c:1646 */ break; case 211: #line 2007 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) / 1000.0); } -#line 2933 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2935 "parse_y.tab.c" /* yacc.c:1646 */ break; case 212: #line 2008 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number))); } -#line 2939 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2941 "parse_y.tab.c" /* yacc.c:1646 */ break; case 213: #line 2009 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) * 1000.0); } -#line 2945 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2947 "parse_y.tab.c" /* yacc.c:1646 */ break; case 214: #line 2010 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1646 */ { M ((yyval.measure), (yyvsp[-1].number), PCB_MM_TO_COORD ((yyvsp[-1].number)) * 1000000.0); } -#line 2951 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2953 "parse_y.tab.c" /* yacc.c:1646 */ break; -#line 2955 "parse_y.tab.c" /* yacc.c:1646 */ +#line 2957 "parse_y.tab.c" /* yacc.c:1646 */ default: break; } /* User semantic actions sometimes alter yychar, and that requires Index: trunk/src_plugins/io_pcb/parse_y.h =================================================================== --- trunk/src_plugins/io_pcb/parse_y.h (revision 3396) +++ trunk/src_plugins/io_pcb/parse_y.h (revision 3397) @@ -1,8 +1,8 @@ -/* A Bison parser, made by GNU Bison 3.0.2. */ +/* A Bison parser, made by GNU Bison 3.0.4. */ /* Bison interface for Yacc-like parsers in C - Copyright (C) 1984, 1989-1990, 2000-2013 Free Software Foundation, Inc. + Copyright (C) 1984, 1989-1990, 2000-2015 Free Software Foundation, Inc. This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -98,7 +98,7 @@ /* Value type. */ #if ! defined YYSTYPE && ! defined YYSTYPE_IS_DECLARED -typedef union YYSTYPE YYSTYPE; + union YYSTYPE { #line 116 "../../src_plugins/io_pcb/parse_y.y" /* yacc.c:1909 */ @@ -111,6 +111,8 @@ #line 113 "parse_y.tab.h" /* yacc.c:1909 */ }; + +typedef union YYSTYPE YYSTYPE; # define YYSTYPE_IS_TRIVIAL 1 # define YYSTYPE_IS_DECLARED 1 #endif Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 3396) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 3397) @@ -1154,7 +1154,7 @@ polygonpoints polygonholes ')' { - Cardinal contour, contour_start, contour_end; + pcb_cardinal_t contour, contour_start, contour_end; pcb_bool bad_contour_found = pcb_false; /* ignore junk */ for (contour = 0; contour <= Polygon->HoleIndexN; contour++) Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 3396) +++ trunk/src_plugins/report/report.c (revision 3397) @@ -64,7 +64,7 @@ static int ReportDrills(int argc, const char **argv, Coord x, Coord y) { DrillInfoTypePtr AllDrills; - Cardinal n; + pcb_cardinal_t n; char *stringlist, *thestring; int total_drills = 0;