Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4783) +++ trunk/src/action_helper.c (revision 4784) @@ -1017,7 +1017,7 @@ pcb_point_t *points = Crosshair.AttachedPolygon.Points; pcb_cardinal_t n = Crosshair.AttachedPolygon.PointN; POLYAREA *original, *new_hole, *result; - FlagType Flags; + pcb_flag_t Flags; /* do update of position; use the 'PCB_MODE_LINE' mechanism */ NotifyLine(); Index: trunk/src/flag.c =================================================================== --- trunk/src/flag.c (revision 4783) +++ trunk/src/flag.c (revision 4784) @@ -29,10 +29,10 @@ #include "config.h" #include "flag.h" -/* This just fills in a FlagType with current flags. */ -FlagType MakeFlags(unsigned int flags) +/* This just fills in a pcb_flag_t with current flags. */ +pcb_flag_t MakeFlags(unsigned int flags) { - FlagType rv; + pcb_flag_t rv; memset(&rv, 0, sizeof(rv)); rv.f = flags; return rv; @@ -39,9 +39,9 @@ } /* This converts old flag bits (from saved PCB files) to new format. */ -FlagType OldFlags(unsigned int flags) +pcb_flag_t OldFlags(unsigned int flags) { - FlagType rv; + pcb_flag_t rv; int i, f; memset(&rv, 0, sizeof(rv)); /* If we move flag bits around, this is where we map old bits to them. */ @@ -56,13 +56,13 @@ return rv; } -FlagType AddFlags(FlagType flag, unsigned int flags) +pcb_flag_t AddFlags(pcb_flag_t flag, unsigned int flags) { flag.f |= flags; return flag; } -FlagType MaskFlags(FlagType flag, unsigned int flags) +pcb_flag_t MaskFlags(pcb_flag_t flag, unsigned int flags) { flag.f &= ~flags; return flag; @@ -76,7 +76,7 @@ return 0; } -void EraseFlags(FlagType * f) +void EraseFlags(pcb_flag_t * f) { unknown_flag_t *u, *next; for (u = f->unknowns; u != NULL; u = next) { Index: trunk/src/flag.h =================================================================== --- trunk/src/flag.h (revision 4783) +++ trunk/src/flag.h (revision 4784) @@ -32,8 +32,8 @@ /* Nobody should know about the internals of this except the macros in macros.h that access it. This structure must be simple-assignable for now. */ -typedef struct unknown_flag_s unknown_flag_t; -struct unknown_flag_s { +typedef struct pcb_unknown_flag_s unknown_flag_t; +struct pcb_unknown_flag_s { char *str; unknown_flag_t *next; }; @@ -44,9 +44,9 @@ unsigned char q; /* square geometry flag */ unsigned char int_conn_grp; unknown_flag_t *unknowns; -} FlagType, *FlagTypePtr; +} pcb_flag_t; -extern FlagType no_flags; +extern pcb_flag_t no_flags; /* --------------------------------------------------------------------------- * object flags @@ -92,15 +92,15 @@ PCB_FLAG_MINCUT = 0x20000, /* used by the mincut short find code */ PCB_FLAG_ONPOINT = 0x40000 /*!< crosshair is on line point or arc point */ /* PCB_FLAG_NOCOPY = (PCB_FLAG_FOUND | CONNECTEDFLAG | PCB_FLAG_ONPOINT)*/ -} pcb_flag_t; +} pcb_flag_values_t; /* For passing modified flags to other functions. */ -FlagType MakeFlags(unsigned int); -FlagType OldFlags(unsigned int); -FlagType AddFlags(FlagType, unsigned int); -FlagType MaskFlags(FlagType, unsigned int); -void EraseFlags(FlagType *f); +pcb_flag_t MakeFlags(unsigned int); +pcb_flag_t OldFlags(unsigned int); +pcb_flag_t AddFlags(pcb_flag_t, unsigned int); +pcb_flag_t MaskFlags(pcb_flag_t, unsigned int); +void EraseFlags(pcb_flag_t *f); #define NoFlags() MakeFlags(0) /* --------------------------------------------------------------------------- @@ -128,7 +128,7 @@ } \ } while(0) -#define FLAGS_EQUAL(F1,F2) (memcmp (&F1, &F2, sizeof(FlagType)) == 0) +#define FLAGS_EQUAL(F1,F2) (memcmp (&F1, &F2, sizeof(pcb_flag_t)) == 0) #define THERMFLAG(L) (0xf << (4 *((L) % 2))) Index: trunk/src/flag_str.c =================================================================== --- trunk/src/flag_str.c (revision 4783) +++ trunk/src/flag_str.c (revision 4784) @@ -38,7 +38,7 @@ /* Because all the macros expect it, that's why. */ typedef struct { - FlagType Flags; + pcb_flag_t Flags; } FlagHolder; /* Be careful to list more specific flags first, followed by general @@ -51,7 +51,7 @@ */ #define N(x) x, sizeof(x)-1 -FlagBitsType pcb_object_flagbits[] = { +pcb_flag_bits_t pcb_object_flagbits[] = { {PCB_FLAG_PIN, N("pin"), PCB_TYPEMASK_ALL}, {PCB_FLAG_VIA, N("via"), PCB_TYPEMASK_ALL}, {PCB_FLAG_FOUND, N("found"), PCB_TYPEMASK_ALL}, @@ -316,10 +316,10 @@ return 0; } -static FlagType empty_flags; +static pcb_flag_t empty_flags; -FlagType -common_string_to_flags(const char *flagstring, int (*error) (const char *msg), FlagBitsType * flagbits, int n_flagbits) +pcb_flag_t +common_string_to_flags(const char *flagstring, int (*error) (const char *msg), pcb_flag_bits_t * flagbits, int n_flagbits) { const char *fp, *ep; int flen; @@ -404,7 +404,7 @@ return rv.Flags; } -FlagType string_to_flags(const char *flagstring, int (*error) (const char *msg)) +pcb_flag_t string_to_flags(const char *flagstring, int (*error) (const char *msg)) { return common_string_to_flags(flagstring, error, pcb_object_flagbits, ENTRIES(pcb_object_flagbits)); } @@ -421,7 +421,7 @@ * forcibly set when vias are parsed. */ -char *common_flags_to_string(FlagType flags, int object_type, FlagBitsType * flagbits, int n_flagbits) +char *common_flags_to_string(pcb_flag_t flags, int object_type, pcb_flag_bits_t * flagbits, int n_flagbits) { int len; int i; @@ -535,7 +535,7 @@ return buf; } -char *flags_to_string(FlagType flags, int object_type) +char *flags_to_string(pcb_flag_t flags, int object_type) { return common_flags_to_string(flags, object_type, pcb_object_flagbits, ENTRIES(pcb_object_flagbits)); } Index: trunk/src/flag_str.h =================================================================== --- trunk/src/flag_str.h (revision 4783) +++ trunk/src/flag_str.h (revision 4784) @@ -42,10 +42,10 @@ of these. */ int object_types; -} FlagBitsType; +} pcb_flag_bits_t; /* All flags natively known by the core */ -extern FlagBitsType pcb_object_flagbits[]; +extern pcb_flag_bits_t pcb_object_flagbits[]; extern const int pcb_object_flagbits_len; /* The purpose of this interface is to make the file format able to @@ -55,22 +55,22 @@ /* When passed a string, parse it and return an appropriate set of flags. Errors cause error() to be called with a suitable message; if error is NULL, errors are ignored. */ -FlagType string_to_flags(const char *flagstring, int (*error) (const char *msg)); +pcb_flag_t string_to_flags(const char *flagstring, int (*error) (const char *msg)); /* Given a set of flags for a given object type, return a string which can be output to a file. The returned pointer must not be freed. */ -char *flags_to_string(FlagType flags, int object_type); +char *flags_to_string(pcb_flag_t flags, int object_type); /* Same as above, but for pcb flags. */ -FlagType string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)); -char *pcbflags_to_string(FlagType flags); +pcb_flag_t string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)); +char *pcbflags_to_string(pcb_flag_t flags); void uninit_strflags_buf(void); void uninit_strflags_layerlist(void); /* io_pcb() needs this for historic reasons */ -FlagType common_string_to_flags(const char *flagstring, int (*error) (const char *msg), FlagBitsType * flagbits, int n_flagbits); -char *common_flags_to_string(FlagType flags, int object_type, FlagBitsType * flagbits, int n_flagbits); +pcb_flag_t common_string_to_flags(const char *flagstring, int (*error) (const char *msg), pcb_flag_bits_t * flagbits, int n_flagbits); +char *common_flags_to_string(pcb_flag_t flags, int object_type, pcb_flag_bits_t * flagbits, int n_flagbits); #endif Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4783) +++ trunk/src/obj_arc.c (revision 4784) @@ -172,7 +172,7 @@ /* creates a new arc on a layer */ -pcb_arc_t *CreateNewArcOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, FlagType Flags) +pcb_arc_t *CreateNewArcOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, pcb_flag_t Flags) { pcb_arc_t *Arc; Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 4783) +++ trunk/src/obj_arc.h (revision 4784) @@ -52,7 +52,7 @@ void ChangeArcAngles(pcb_layer_t *Layer, pcb_arc_t *a, Angle new_sa, Angle new_da); void ChangeArcRadii(pcb_layer_t *Layer, pcb_arc_t *a, Coord new_width, Coord new_height); void *RemoveArc(pcb_layer_t *Layer, pcb_arc_t *Arc); -pcb_arc_t *CreateNewArcOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, FlagType Flags); +pcb_arc_t *CreateNewArcOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, pcb_flag_t Flags); /* Add objects without creating them or making any "sanity modifications" to them */ void pcb_add_arc_on_layer(pcb_layer_t *Layer, pcb_arc_t *Arc); Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 4783) +++ trunk/src/obj_common.h (revision 4784) @@ -77,7 +77,7 @@ #define ANYOBJECTFIELDS \ pcb_box_t BoundingBox; \ long int ID; \ - FlagType Flags; \ + pcb_flag_t Flags; \ pcb_attribute_list_t Attributes /* struct LibraryEntryType *net */ Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4783) +++ trunk/src/obj_elem.c (revision 4784) @@ -196,7 +196,7 @@ END_LOOP; PIN_LOOP(element); { - FlagType f = NoFlags(); + pcb_flag_t f = NoFlags(); AddFlags(f, PCB_FLAG_VIA); if (TEST_FLAG(PCB_FLAG_HOLE, pin)) AddFlags(f, PCB_FLAG_HOLE); @@ -563,9 +563,9 @@ /* creates an new element; memory is allocated if needed */ pcb_element_t *CreateNewElement(pcb_data_t *Data, pcb_element_t *Element, - pcb_font_t *PCBFont, FlagType Flags, char *Description, char *NameOnPCB, + pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, Coord TextX, Coord TextY, pcb_uint8_t Direction, - int TextScale, FlagType TextFlags, pcb_bool uniqueName) + int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName) { #ifdef DEBUG printf("Entered CreateNewElement.....\n"); @@ -646,7 +646,7 @@ /* creates a new textobject as part of an element copies the values to the appropriate text object */ void AddTextToElement(pcb_text_t *Text, pcb_font_t *PCBFont, Coord X, Coord Y, - unsigned Direction, char *TextString, int Scale, FlagType Flags) + unsigned Direction, char *TextString, int Scale, pcb_flag_t Flags) { free(Text->TextString); Text->TextString = (TextString && *TextString) ? pcb_strdup(TextString) : NULL; Index: trunk/src/obj_elem.h =================================================================== --- trunk/src/obj_elem.h (revision 4783) +++ trunk/src/obj_elem.h (revision 4784) @@ -77,9 +77,9 @@ void MirrorElementCoordinates(pcb_data_t *Data, pcb_element_t *Element, Coord yoff); pcb_element_t *CreateNewElement(pcb_data_t *Data, pcb_element_t *Element, - pcb_font_t *PCBFont, FlagType Flags, char *Description, char *NameOnPCB, + pcb_font_t *PCBFont, pcb_flag_t Flags, char *Description, char *NameOnPCB, char *Value, Coord TextX, Coord TextY, pcb_uint8_t Direction, - int TextScale, FlagType TextFlags, pcb_bool uniqueName); + int TextScale, pcb_flag_t TextFlags, pcb_bool uniqueName); pcb_arc_t *CreateNewArcInElement(pcb_element_t *Element, Coord X, Coord Y, Coord Width, Coord Height, Angle angle, Angle delta, Coord Thickness); @@ -87,7 +87,7 @@ pcb_line_t *CreateNewLineInElement(pcb_element_t *Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness); void AddTextToElement(pcb_text_t *Text, pcb_font_t *PCBFont, Coord X, Coord Y, - unsigned Direction, char *TextString, int Scale, FlagType Flags); + unsigned Direction, char *TextString, int Scale, pcb_flag_t Flags); /* Change the specified text on an element, either on the board (give Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 4783) +++ trunk/src/obj_line.c (revision 4784) @@ -73,7 +73,7 @@ struct line_info { Coord X1, X2, Y1, Y2; Coord Thickness; - FlagType Flags; + pcb_flag_t Flags; pcb_line_t test, *ans; jmp_buf env; }; @@ -146,7 +146,7 @@ /* creates a new line on a layer and checks for overlap and extension */ -pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, FlagType Flags) +pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, pcb_flag_t Flags) { struct line_info info; pcb_box_t search; @@ -191,7 +191,7 @@ return CreateNewLineOnLayer(Layer, X1, Y1, X2, Y2, Thickness, Clearance, Flags); } -pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, FlagType Flags) +pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, pcb_flag_t Flags) { pcb_line_t *Line; Index: trunk/src/obj_line.h =================================================================== --- trunk/src/obj_line.h (revision 4783) +++ trunk/src/obj_line.h (revision 4784) @@ -49,8 +49,8 @@ pcb_line_t *GetLineMemory(pcb_layer_t * layer); void RemoveFreeLine(pcb_line_t * data); -pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, FlagType Flags); -pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, FlagType Flags); +pcb_line_t *CreateDrawnLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, pcb_flag_t Flags); +pcb_line_t *CreateNewLineOnLayer(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, pcb_flag_t Flags); /* Add objects without creating them or making any "sanity modifications" to them */ void pcb_add_line_on_layer(pcb_layer_t *Layer, pcb_line_t *Line); Index: trunk/src/obj_pad.c =================================================================== --- trunk/src/obj_pad.c (revision 4783) +++ trunk/src/obj_pad.c (revision 4784) @@ -66,7 +66,7 @@ /*** utility ***/ /* creates a new pad in an element */ -pcb_pad_t *CreateNewPad(pcb_element_t *Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, Coord Mask, char *Name, char *Number, FlagType Flags) +pcb_pad_t *CreateNewPad(pcb_element_t *Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, Coord Mask, char *Name, char *Number, pcb_flag_t Flags) { pcb_pad_t *pad = GetPadMemory(Element); Index: trunk/src/obj_pad.h =================================================================== --- trunk/src/obj_pad.h (revision 4783) +++ trunk/src/obj_pad.h (revision 4784) @@ -44,7 +44,7 @@ pcb_pad_t *GetPadMemory(pcb_element_t * element); void RemoveFreePad(pcb_pad_t * data); -pcb_pad_t *CreateNewPad(pcb_element_t *Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, Coord Mask, char *Name, char *Number, FlagType Flags); +pcb_pad_t *CreateNewPad(pcb_element_t *Element, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness, Coord Clearance, Coord Mask, char *Name, char *Number, pcb_flag_t Flags); void SetPadBoundingBox(pcb_pad_t *Pad); pcb_bool ChangePaste(pcb_pad_t *Pad); Index: trunk/src/obj_pinvia.c =================================================================== --- trunk/src/obj_pinvia.c (revision 4783) +++ trunk/src/obj_pinvia.c (revision 4784) @@ -85,7 +85,7 @@ /*** utility ***/ /* creates a new via */ -pcb_pin_t *CreateNewVia(pcb_data_t *Data, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, const char *Name, FlagType Flags) +pcb_pin_t *CreateNewVia(pcb_data_t *Data, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, const char *Name, pcb_flag_t Flags) { pcb_pin_t *Via; @@ -138,7 +138,7 @@ } /* creates a new pin in an element */ -pcb_pin_t *CreateNewPin(pcb_element_t *Element, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, char *Name, char *Number, FlagType Flags) +pcb_pin_t *CreateNewPin(pcb_element_t *Element, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, char *Name, char *Number, pcb_flag_t Flags) { pcb_pin_t *pin = GetPinMemory(Element); Index: trunk/src/obj_pinvia.h =================================================================== --- trunk/src/obj_pinvia.h (revision 4783) +++ trunk/src/obj_pinvia.h (revision 4784) @@ -47,8 +47,8 @@ pcb_pin_t *GetPinMemory(pcb_element_t * element); void RemoveFreePin(pcb_pin_t * data); -pcb_pin_t *CreateNewVia(pcb_data_t *Data, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, const char *Name, FlagType Flags); -pcb_pin_t *CreateNewPin(pcb_element_t *Element, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, char *Name, char *Number, FlagType Flags); +pcb_pin_t *CreateNewVia(pcb_data_t *Data, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, const char *Name, pcb_flag_t Flags); +pcb_pin_t *CreateNewPin(pcb_element_t *Element, Coord X, Coord Y, Coord Thickness, Coord Clearance, Coord Mask, Coord DrillingHole, char *Name, char *Number, pcb_flag_t Flags); void pcb_add_via(pcb_data_t *Data, pcb_pin_t *Via); void SetPinBoundingBox(pcb_pin_t *Pin); pcb_bool ChangeHole(pcb_pin_t *Via); Index: trunk/src/obj_poly.c =================================================================== --- trunk/src/obj_poly.c (revision 4783) +++ trunk/src/obj_poly.c (revision 4784) @@ -148,7 +148,7 @@ } /* creates a new polygon from the old formats rectangle data */ -pcb_polygon_t *CreateNewPolygonFromRectangle(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, FlagType Flags) +pcb_polygon_t *CreateNewPolygonFromRectangle(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_flag_t Flags) { pcb_polygon_t *polygon = CreateNewPolygon(Layer, Flags); if (!polygon) @@ -172,7 +172,7 @@ } /* creates a new polygon on a layer */ -pcb_polygon_t *CreateNewPolygon(pcb_layer_t *Layer, FlagType Flags) +pcb_polygon_t *CreateNewPolygon(pcb_layer_t *Layer, pcb_flag_t Flags) { pcb_polygon_t *polygon = GetPolygonMemory(Layer); Index: trunk/src/obj_poly.h =================================================================== --- trunk/src/obj_poly.h (revision 4783) +++ trunk/src/obj_poly.h (revision 4784) @@ -55,8 +55,8 @@ void FreePolygonMemory(pcb_polygon_t * polygon); void SetPolygonBoundingBox(pcb_polygon_t *Polygon); -pcb_polygon_t *CreateNewPolygonFromRectangle(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, FlagType Flags); -pcb_polygon_t *CreateNewPolygon(pcb_layer_t *Layer, FlagType Flags); +pcb_polygon_t *CreateNewPolygonFromRectangle(pcb_layer_t *Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_flag_t Flags); +pcb_polygon_t *CreateNewPolygon(pcb_layer_t *Layer, pcb_flag_t Flags); pcb_point_t *CreateNewPointInPolygon(pcb_polygon_t *Polygon, Coord X, Coord Y); pcb_polygon_t *CreateNewHoleInPolygon(pcb_polygon_t * Polygon); void *RemovePolygon(pcb_layer_t *Layer, pcb_polygon_t *Polygon); Index: trunk/src/obj_rat.c =================================================================== --- trunk/src/obj_rat.c (revision 4783) +++ trunk/src/obj_rat.c (revision 4784) @@ -69,7 +69,7 @@ /*** utility ***/ /* creates a new rat-line */ -pcb_rat_t *CreateNewRat(pcb_data_t *Data, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_cardinal_t group1, pcb_cardinal_t group2, Coord Thickness, FlagType Flags) +pcb_rat_t *CreateNewRat(pcb_data_t *Data, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_cardinal_t group1, pcb_cardinal_t group2, Coord Thickness, pcb_flag_t Flags) { pcb_rat_t *Line = GetRatMemory(Data); Index: trunk/src/obj_rat.h =================================================================== --- trunk/src/obj_rat.h (revision 4783) +++ trunk/src/obj_rat.h (revision 4784) @@ -41,7 +41,7 @@ pcb_rat_t *GetRatMemory(pcb_data_t *data); void RemoveFreeRat(pcb_rat_t *data); -pcb_rat_t *CreateNewRat(pcb_data_t *Data, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_cardinal_t group1, pcb_cardinal_t group2, Coord Thickness, FlagType Flags); +pcb_rat_t *CreateNewRat(pcb_data_t *Data, Coord X1, Coord Y1, Coord X2, Coord Y2, pcb_cardinal_t group1, pcb_cardinal_t group2, Coord Thickness, pcb_flag_t Flags); pcb_bool DeleteRats(pcb_bool selected); #endif Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 4783) +++ trunk/src/obj_text.c (revision 4784) @@ -67,7 +67,7 @@ /*** utility ***/ /* creates a new text on a layer */ -pcb_text_t *CreateNewText(pcb_layer_t *Layer, pcb_font_t *PCBFont, Coord X, Coord Y, unsigned Direction, int Scale, char *TextString, FlagType Flags) +pcb_text_t *CreateNewText(pcb_layer_t *Layer, pcb_font_t *PCBFont, Coord X, Coord Y, unsigned Direction, int Scale, char *TextString, pcb_flag_t Flags) { pcb_text_t *text; Index: trunk/src/obj_text.h =================================================================== --- trunk/src/obj_text.h (revision 4783) +++ trunk/src/obj_text.h (revision 4784) @@ -45,7 +45,7 @@ pcb_text_t *GetTextMemory(pcb_layer_t * layer); void RemoveFreeText(pcb_text_t * data); -pcb_text_t *CreateNewText(pcb_layer_t *Layer, pcb_font_t *PCBFont, Coord X, Coord Y, unsigned Direction, int Scale, char *TextString, FlagType Flags); +pcb_text_t *CreateNewText(pcb_layer_t *Layer, pcb_font_t *PCBFont, Coord X, Coord Y, unsigned Direction, int Scale, char *TextString, pcb_flag_t Flags); /* Add objects without creating them or making any "sanity modifications" to them */ void pcb_add_text_on_layer(pcb_layer_t *Layer, pcb_text_t *text, pcb_font_t *PCBFont); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4783) +++ trunk/src/polygon.c (revision 4784) @@ -1689,7 +1689,7 @@ { POLYAREA *p, *start; pcb_bool many = pcb_false; - FlagType flags; + pcb_flag_t flags; if (!poly->Clipped || TEST_FLAG(PCB_FLAG_LOCK, poly)) return pcb_false; @@ -1798,7 +1798,7 @@ /* Convert a POLYAREA (and all linked POLYAREA) to * raw PCB polygons on the given layer. */ -void PolyToPolygonsOnLayer(pcb_data_t * Destination, pcb_layer_t * Layer, POLYAREA * Input, FlagType Flags) +void PolyToPolygonsOnLayer(pcb_data_t * Destination, pcb_layer_t * Layer, POLYAREA * Input, pcb_flag_t Flags) { pcb_polygon_t *Polygon; POLYAREA *pa; Index: trunk/src/polygon.h =================================================================== --- trunk/src/polygon.h (revision 4783) +++ trunk/src/polygon.h (revision 4784) @@ -85,7 +85,7 @@ pcb_bool isects(POLYAREA *, pcb_polygon_t *, pcb_bool); pcb_bool MorphPolygon(pcb_layer_t *, pcb_polygon_t *); void NoHolesPolygonDicer(pcb_polygon_t * p, const pcb_box_t * clip, void (*emit) (PLINE *, void *), void *user_data); -void PolyToPolygonsOnLayer(pcb_data_t *, pcb_layer_t *, POLYAREA *, FlagType); +void PolyToPolygonsOnLayer(pcb_data_t *, pcb_layer_t *, POLYAREA *, pcb_flag_t); void square_pin_factors(int style, double *xm, double *ym); Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4783) +++ trunk/src/undo.c (revision 4784) @@ -128,7 +128,7 @@ RemovedPointType RemovedPoint; RotateType Rotate; MoveToLayer MoveToLayer; - FlagType Flags; + pcb_flag_t Flags; Coord Size; LayerChangeType LayerChange; ClearPolyType ClearPoly; @@ -511,13 +511,13 @@ { void *ptr1, *ptr1e, *ptr2, *ptr3; int type; - FlagType swap; + pcb_flag_t swap; int must_redraw; /* lookup entry by ID */ type = SearchObjectByID(PCB->Data, &ptr1, &ptr2, &ptr3, Entry->ID, Entry->Kind); if (type != PCB_TYPE_NONE) { - FlagType f1, f2; + pcb_flag_t f1, f2; pcb_pin_t *pin = (pcb_pin_t *) ptr2; if ((type == PCB_TYPE_ELEMENT) || (type == PCB_TYPE_ELEMENT_NAME)) Index: trunk/src_plugins/djopt/djopt.c =================================================================== --- trunk/src_plugins/djopt/djopt.c (revision 4783) +++ trunk/src_plugins/djopt/djopt.c (revision 4784) @@ -444,7 +444,7 @@ dprintf("add_line_to_corner %#mD\n", c->x, c->y); } -static pcb_line_t *create_pcb_line(int layer, int x1, int y1, int x2, int y2, int thick, int clear, FlagType flags) +static pcb_line_t *create_pcb_line(int layer, int x1, int y1, int x2, int y2, int thick, int clear, pcb_flag_t flags) { char *from, *to; pcb_line_t *nl; Index: trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c =================================================================== --- trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4783) +++ trunk/src_plugins/gpmi/pcb-gpmi/gpmi_plugin/gpmi_pkg/layout/create.c (revision 4784) @@ -48,10 +48,10 @@ {0, 0, 0} }; -static FlagType get_flags(int in) +static pcb_flag_t get_flags(int in) { flag_tr_t *f; - static FlagType out; + static pcb_flag_t out; out.f = 0; memset(out.t, 0, sizeof(out.t)); Index: trunk/src_plugins/hid_lesstif/menu.c =================================================================== --- trunk/src_plugins/hid_lesstif/menu.c (revision 4783) +++ trunk/src_plugins/hid_lesstif/menu.c (revision 4784) @@ -485,9 +485,9 @@ const char *flagname; int oldval; char *xres; -} WidgetFlagType; +} Widgetpcb_flag_t; -static WidgetFlagType *wflags = 0; +static Widgetpcb_flag_t *wflags = 0; static int n_wflags = 0; static int max_wflags = 0; @@ -495,7 +495,7 @@ { if (n_wflags >= max_wflags) { max_wflags += 20; - wflags = (WidgetFlagType *) realloc(wflags, max_wflags * sizeof(WidgetFlagType)); + wflags = (Widgetpcb_flag_t *) realloc(wflags, max_wflags * sizeof(Widgetpcb_flag_t)); } wflags[n_wflags].w = w; wflags[n_wflags].flagname = name; Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 4783) +++ trunk/src_plugins/io_kicad/read.c (revision 4784) @@ -177,7 +177,7 @@ int mirrored = 0; double glyphWidth = 1.27; /* a reasonable approximation of pcb glyph width, ~= 5000 centimils */ unsigned direction = 0; /* default is horizontal */ - FlagType Flags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t Flags = MakeFlags(0); /* start with something bland here */ int PCBLayer = 0; /* sane default value */ if (subtree->str != NULL) { @@ -349,7 +349,7 @@ char *end; double val; Coord X1, Y1, X2, Y2, Thickness, Clearance; /* not sure what to do with mask */ - FlagType Flags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t Flags = MakeFlags(0); /* start with something bland here */ int PCBLayer = 0; /* sane default value */ Clearance = Thickness = PCB_MM_TO_COORD(0.250); /* start with sane defaults */ @@ -472,7 +472,7 @@ Coord centreX, centreY, endX, endY, width, height, Thickness, Clearance; Angle startAngle = 0.0; Angle delta = 360.0; /* these defaults allow a gr_circle to be parsed, which does not specify (angle XXX) */ - FlagType Flags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t Flags = MakeFlags(0); /* start with something bland here */ int PCBLayer = 0; /* sane default value */ Clearance = Thickness = PCB_MM_TO_COORD(0.250); /* start with sane defaults */ @@ -627,7 +627,7 @@ char *end, *name; /* not using via name for now */ double val; Coord X, Y, Thickness, Clearance, Mask, Drill; /* not sure what to do with mask */ - FlagType Flags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t Flags = MakeFlags(0); /* start with something bland here */ /* int PCBLayer = 0; not used for now; no blind or buried vias currently in pcb-rnd */ Clearance = Mask = PCB_MM_TO_COORD(0.250); /* start with something bland here */ @@ -721,7 +721,7 @@ char *end; double val; Coord X1, Y1, X2, Y2, Thickness, Clearance; - FlagType Flags = MakeFlags(PCB_FLAG_CLEARLINE); /* we try clearline flag here */ + pcb_flag_t Flags = MakeFlags(PCB_FLAG_CLEARLINE); /* we try clearline flag here */ int PCBLayer = 0; /* sane default value */ Clearance = PCB_MM_TO_COORD(0.250); /* start with something bland here */ @@ -1001,8 +1001,8 @@ char * moduleName, * moduleRefdes, * moduleValue, * pinName; pcb_element_t *newModule; - FlagType Flags = MakeFlags(0); /* start with something bland here */ - FlagType TextFlags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t Flags = MakeFlags(0); /* start with something bland here */ + pcb_flag_t TextFlags = MakeFlags(0); /* start with something bland here */ Clearance = PCB_MM_TO_COORD(0.250); /* start with something bland here */ moduleName = moduleRefdes = moduleValue = NULL; @@ -1280,7 +1280,7 @@ &st->PCB->Font, Flags, moduleName, moduleRefdes, moduleValue, moduleX, moduleY, direction, - refdesScaling, TextFlags, pcb_false); /*FlagType TextFlags, pcb_bool uniqueName) */ + refdesScaling, TextFlags, pcb_false); /*pcb_flag_t TextFlags, pcb_bool uniqueName) */ MoveObject(PCB_TYPE_ELEMENT_NAME, newModule, &newModule->Name[NAME_INDEX()], &newModule->Name[NAME_INDEX()], X, Y); } } @@ -1823,7 +1823,7 @@ unsigned long required; pcb_polygon_t *polygon = NULL; - FlagType flags = MakeFlags(PCB_FLAG_CLEARPOLY); + pcb_flag_t flags = MakeFlags(PCB_FLAG_CLEARPOLY); char *end; double val; Coord X, Y; Index: trunk/src_plugins/io_lihata/common.h =================================================================== --- trunk/src_plugins/io_lihata/common.h (revision 4783) +++ trunk/src_plugins/io_lihata/common.h (revision 4784) @@ -1,6 +1,6 @@ /* Because all the macros expect it, that's why. */ typedef struct { - FlagType Flags; + pcb_flag_t Flags; } io_lihata_flag_holder; /* Convert between thermal style index and textual representation */ Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4783) +++ trunk/src_plugins/io_lihata/read.c (revision 4784) @@ -278,7 +278,7 @@ lht_dom_iterator_t it; io_lihata_flag_holder fh; lht_node_t *thr = pt->array[i]; - FlagType *f = thr->user_data; + pcb_flag_t *f = thr->user_data; memset(&fh, 0, sizeof(fh)); fh.Flags = *f; @@ -301,7 +301,7 @@ /* NOTE: in case of objects with thermal, f must point to the object's flags because termals will be filled in at the end, in a 2nd pass and we need to store the f pointer. */ -static int parse_flags(FlagType *f, lht_node_t *fn, int object_type) +static int parse_flags(pcb_flag_t *f, lht_node_t *fn, int object_type) { io_lihata_flag_holder fh; Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 4783) +++ trunk/src_plugins/io_lihata/write.c (revision 4784) @@ -148,7 +148,7 @@ return ln; } -static lht_node_t *build_flags(FlagType *f, int object_type) +static lht_node_t *build_flags(pcb_flag_t *f, int object_type) { int n, layer, added = 0, thrm = 0; lht_node_t *hsh, *txt, *lst; Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 4783) +++ trunk/src_plugins/io_pcb/file.c (revision 4784) @@ -168,11 +168,11 @@ */ } -static void conf_update_pcb_flag(FlagType *dest, const char *hash_path, int binflag) +static void conf_update_pcb_flag(pcb_flag_t *dest, const char *hash_path, int binflag) { conf_native_t *n = conf_get_field(hash_path); struct { - FlagType Flags; + pcb_flag_t Flags; } *tmp = (void *)dest; if ((n == NULL) || (n->type != CFN_BOOLEAN) || (n->used < 0) || (!n->val.boolean[0])) @@ -189,7 +189,7 @@ static void WritePCBDataHeader(FILE * FP) { int group; - FlagType pcb_flags; + pcb_flag_t pcb_flags; memset(&pcb_flags, 0, sizeof(pcb_flags)); Index: trunk/src_plugins/io_pcb/flags.c =================================================================== --- trunk/src_plugins/io_pcb/flags.c (revision 4783) +++ trunk/src_plugins/io_pcb/flags.c (revision 4784) @@ -31,7 +31,7 @@ #include "macro.h" #define N(x) x, sizeof(x)-1 -static FlagBitsType pcb_flagbits[] = { +static pcb_flag_bits_t pcb_flagbits[] = { {SHOWNUMBERFLAG, N("shownumber"), 1}, {LOCALREFFLAG, N("localref"), 1}, {CHECKPLANESFLAG, N("checkplanes"), 1}, @@ -58,12 +58,12 @@ }; #undef N -char *pcbflags_to_string(FlagType flags) +char *pcbflags_to_string(pcb_flag_t flags) { return common_flags_to_string(flags, PCB_TYPEMASK_ALL, pcb_flagbits, ENTRIES(pcb_flagbits)); } -FlagType string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)) +pcb_flag_t string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)) { return common_string_to_flags(flagstring, error, pcb_flagbits, ENTRIES(pcb_flagbits)); } Index: trunk/src_plugins/io_pcb/flags.h =================================================================== --- trunk/src_plugins/io_pcb/flags.h (revision 4783) +++ trunk/src_plugins/io_pcb/flags.h (revision 4784) @@ -26,8 +26,8 @@ #include "flag.h" -char *pcbflags_to_string(FlagType flags); -FlagType string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)); +char *pcbflags_to_string(pcb_flag_t flags); +pcb_flag_t string_to_pcbflags(const char *flagstring, int (*error) (const char *msg)); /* --------------------------------------------------------------------------- * PCB flags - kept only for file format compatibility reasons; these bits Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 4783) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 4784) @@ -712,7 +712,7 @@ pcb_element_t * yyElement; pcb_font_t * yyFont; conf_role_t yy_settings_dest; -FlagType yy_pcb_flags; +pcb_flag_t yy_pcb_flags; static int parse_number (void); Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 4783) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 4784) @@ -78,7 +78,7 @@ pcb_element_t * yyElement; pcb_font_t * yyFont; conf_role_t yy_settings_dest; -FlagType yy_pcb_flags; +pcb_flag_t yy_pcb_flags; static int parse_number (void); Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4783) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4784) @@ -135,7 +135,7 @@ extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; -extern FlagType yy_pcb_flags; +extern pcb_flag_t yy_pcb_flags; static char *layer_group_string; @@ -260,7 +260,7 @@ int integer; double number; char *string; - FlagType flagtype; + pcb_flag_t flagtype; PLMeasure measure; #line 267 "parse_y.c" /* yacc.c:355 */ Index: trunk/src_plugins/io_pcb/parse_y.h =================================================================== --- trunk/src_plugins/io_pcb/parse_y.h (revision 4783) +++ trunk/src_plugins/io_pcb/parse_y.h (revision 4784) @@ -106,7 +106,7 @@ int integer; double number; char *string; - FlagType flagtype; + pcb_flag_t flagtype; PLMeasure measure; #line 113 "parse_y.h" /* yacc.c:1909 */ Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4783) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4784) @@ -72,7 +72,7 @@ extern int pcb_lineno; /* linenumber */ extern char *yyfilename; /* in this file */ extern conf_role_t yy_settings_dest; -extern FlagType yy_pcb_flags; +extern pcb_flag_t yy_pcb_flags; static char *layer_group_string; @@ -111,7 +111,7 @@ int integer; double number; char *string; - FlagType flagtype; + pcb_flag_t flagtype; PLMeasure measure; } Index: trunk/src_plugins/jostle/jostle.c =================================================================== --- trunk/src_plugins/jostle/jostle.c (revision 4783) +++ trunk/src_plugins/jostle/jostle.c (revision 4784) @@ -269,7 +269,7 @@ /*! * Wrapper for CreateNewLineOnLayer that takes vectors and deals with Undo */ -static pcb_line_t *CreateVectorLineOnLayer(pcb_layer_t * layer, Vector a, Vector b, int thickness, int clearance, FlagType flags) +static pcb_line_t *CreateVectorLineOnLayer(pcb_layer_t * layer, Vector a, Vector b, int thickness, int clearance, pcb_flag_t flags) { pcb_line_t *line; Index: trunk/tests/strflags/tester.c =================================================================== --- trunk/tests/strflags/tester.c (revision 4783) +++ trunk/tests/strflags/tester.c (revision 4784) @@ -35,7 +35,7 @@ #include "flags.c" #include "compat_misc.c" -static void dump_flag(FlagType * f) +static void dump_flag(pcb_flag_t * f) { int l; printf("F:%08x T:[", f->f); @@ -81,7 +81,7 @@ while (count < 1000000) { FlagHolder fh; char *str; - FlagType new_flags; + pcb_flag_t new_flags; int i; int otype; @@ -121,7 +121,7 @@ while (count < 1000000) { FlagHolder fh; char *str; - FlagType new_flags; + pcb_flag_t new_flags; int i; int otype;