Index: trunk/src/board.c =================================================================== --- trunk/src/board.c (revision 4753) +++ trunk/src/board.c (revision 4754) @@ -33,12 +33,12 @@ #include "paths.h" #include "rtree.h" -PCBType *PCB; +pcb_board_t *PCB; /* --------------------------------------------------------------------------- * free memory used by PCB */ -void FreePCBMemory(PCBType * pcb) +void FreePCBMemory(pcb_board_t * pcb) { int i; @@ -59,19 +59,19 @@ vtroutestyle_uninit(&pcb->RouteStyle); FreeAttributeListMemory(&pcb->Attributes); /* clear struct */ - memset(pcb, 0, sizeof(PCBType)); + memset(pcb, 0, sizeof(pcb_board_t)); } /* creates a new PCB */ -PCBTypePtr CreateNewPCB_(pcb_bool SetDefaultNames) +pcb_board_t *CreateNewPCB_(pcb_bool SetDefaultNames) { - PCBTypePtr ptr, save; + pcb_board_t *ptr, *save; int i; /* allocate memory, switch all layers on and copy resources */ - ptr = (PCBTypePtr) calloc(1, sizeof(PCBType)); + ptr = calloc(1, sizeof(pcb_board_t)); ptr->Data = CreateNewBuffer(); - ptr->Data->pcb = (PCBTypePtr) ptr; + ptr->Data->pcb = ptr; ptr->ThermStyle = 4; ptr->IsleArea = 2.e8; @@ -109,9 +109,9 @@ return (ptr); } -PCBTypePtr CreateNewPCB(void) +pcb_board_t *CreateNewPCB(void) { - PCBTypePtr old, nw; + pcb_board_t *old, *nw; int dpcb; old = PCB; @@ -143,7 +143,7 @@ /* This post-processing step adds the top and bottom silk layers to a * pre-existing PCB. */ -int CreateNewPCBPost(PCBTypePtr pcb, int use_defaults) +int CreateNewPCBPost(pcb_board_t *pcb, int use_defaults) { /* copy default settings */ pcb_colors_from_settings(pcb); @@ -156,7 +156,7 @@ * use this to set PCB colors so the config can reassign PCB colors. */ #warning TODO: indeed, remove this and all the board *color fields -void pcb_colors_from_settings(PCBTypePtr ptr) +void pcb_colors_from_settings(pcb_board_t *ptr) { int i; Index: trunk/src/board.h =================================================================== --- trunk/src/board.h (revision 4753) +++ trunk/src/board.h (revision 4754) @@ -55,7 +55,7 @@ #include "rats_patch.h" #include "font.h" - /* The PCBType struct holds information about board layout most of which is + /* The pcb_board_t struct holds information about board layout most of which is | saved with the layout. A new PCB layout struct is first initialized | with values from the user configurable Settings struct and then reset | to the saved layout values when a layout is loaded. @@ -109,17 +109,17 @@ unsigned netlist_needs_update:1; }; -void FreePCBMemory(PCBTypePtr); +void FreePCBMemory(pcb_board_t *); -extern PCBType *PCB; /* the board being edited */ +extern pcb_board_t *PCB; /* the board being edited */ -PCBTypePtr CreateNewPCB_(pcb_bool SetDefaultNames); -PCBTypePtr CreateNewPCB(void); +pcb_board_t *CreateNewPCB_(pcb_bool SetDefaultNames); +pcb_board_t *CreateNewPCB(void); /* Called after PCB->Data->LayerN is set. Returns non-zero on error */ -int CreateNewPCBPost(PCBTypePtr pcb, int use_defaults); +int CreateNewPCBPost(pcb_board_t *pcb, int use_defaults); -void pcb_colors_from_settings(PCBTypePtr); +void pcb_colors_from_settings(pcb_board_t *); void CountHoles(int *plated, int *unplated, const BoxType * within_area); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4753) +++ trunk/src/buffer.c (revision 4754) @@ -195,7 +195,7 @@ */ pcb_bool LoadLayoutToBuffer(BufferTypePtr Buffer, const char *Filename, const char *fmt) { - PCBTypePtr newPCB = CreateNewPCB(); + pcb_board_t *newPCB = CreateNewPCB(); /* new data isn't added to the undo list */ if (!ParsePCB(newPCB, Filename, fmt, CFR_invalid)) { @@ -340,7 +340,7 @@ { DataTypePtr data; data = (DataTypePtr) calloc(1, sizeof(DataType)); - data->pcb = (PCBTypePtr) PCB; + data->pcb = (pcb_board_t *) PCB; return data; } Index: trunk/src/buffer.h =================================================================== --- trunk/src/buffer.h (revision 4753) +++ trunk/src/buffer.h (revision 4754) @@ -34,7 +34,7 @@ struct pcb_buffer_s { /* information about the paste buffer */ Coord X, Y; /* offset */ BoxType BoundingBox; - DataTypePtr Data; /* data; not all members of PCBType */ + DataTypePtr Data; /* data; not all members of pcb_board_t */ /* are used */ }; Index: trunk/src/data.h =================================================================== --- trunk/src/data.h (revision 4753) +++ trunk/src/data.h (revision 4754) @@ -46,7 +46,7 @@ /**/ rtree_t *via_tree, *element_tree, *pin_tree, *pad_tree, *name_tree[3], /* for element names */ *rat_tree; - PCBType *pcb; + pcb_board_t *pcb; LayerType Layer[MAX_LAYER + 2]; /* add 2 silkscreen layers */ plug_io_t *loader; ratlist_t Rat; @@ -88,22 +88,22 @@ */ /* layer object callbacks */ -typedef int (*pcb_layer_cb_t)(void *ctx, PCBType *pcb, LayerType *layer, int enter); -typedef void (*pcb_line_cb_t)(void *ctx, PCBType *pcb, LayerType *layer, LineType *line); -typedef void (*pcb_arc_cb_t)(void *ctx, PCBType *pcb, LayerType *layer, ArcType *arc); -typedef void (*pcb_text_cb_t)(void *ctx, PCBType *pcb, LayerType *layer, TextType *text); -typedef void (*pcb_poly_cb_t)(void *ctx, PCBType *pcb, LayerType *layer, PolygonType *poly); +typedef int (*pcb_layer_cb_t)(void *ctx, pcb_board_t *pcb, LayerType *layer, int enter); +typedef void (*pcb_line_cb_t)(void *ctx, pcb_board_t *pcb, LayerType *layer, LineType *line); +typedef void (*pcb_arc_cb_t)(void *ctx, pcb_board_t *pcb, LayerType *layer, ArcType *arc); +typedef void (*pcb_text_cb_t)(void *ctx, pcb_board_t *pcb, LayerType *layer, TextType *text); +typedef void (*pcb_poly_cb_t)(void *ctx, pcb_board_t *pcb, LayerType *layer, PolygonType *poly); /* element callbacks */ -typedef int (*pcb_element_cb_t)(void *ctx, PCBType *pcb, ElementType *element, int enter); -typedef void (*pcb_eline_cb_t)(void *ctx, PCBType *pcb, ElementType *element, LineType *line); -typedef void (*pcb_earc_cb_t)(void *ctx, PCBType *pcb, ElementType *element, ArcType *arc); -typedef void (*pcb_etext_cb_t)(void *ctx, PCBType *pcb, ElementType *element, TextType *text); -typedef void (*pcb_epin_cb_t)(void *ctx, PCBType *pcb, ElementType *element, PinType *pin); -typedef void (*pcb_epad_cb_t)(void *ctx, PCBType *pcb, ElementType *element, PadType *pad); +typedef int (*pcb_element_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, int enter); +typedef void (*pcb_eline_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, LineType *line); +typedef void (*pcb_earc_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, ArcType *arc); +typedef void (*pcb_etext_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, TextType *text); +typedef void (*pcb_epin_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, PinType *pin); +typedef void (*pcb_epad_cb_t)(void *ctx, pcb_board_t *pcb, ElementType *element, PadType *pad); /* via callbacks */ -typedef void (*pcb_via_cb_t)(void *ctx, PCBType *pcb, PinType *via); +typedef void (*pcb_via_cb_t)(void *ctx, pcb_board_t *pcb, PinType *via); /* Loop over all layer objects on each layer. Layer is the outer loop. */ void pcb_loop_layers(void *ctx, pcb_layer_cb_t lacb, pcb_line_cb_t lcb, pcb_arc_cb_t acb, pcb_text_cb_t tcb, pcb_poly_cb_t pocb); Index: trunk/src/font.c =================================================================== --- trunk/src/font.c (revision 4753) +++ trunk/src/font.c (revision 4754) @@ -43,7 +43,7 @@ /* parses a file with font information and installs it into the provided PCB * checks directories given as colon separated list by resource fontPath * if the fonts filename doesn't contain a directory component */ -void CreateDefaultFont(PCBTypePtr pcb) +void CreateDefaultFont(pcb_board_t *pcb) { int res = -1; pcb_io_err_inhibit_inc(); Index: trunk/src/font.h =================================================================== --- trunk/src/font.h (revision 4753) +++ trunk/src/font.h (revision 4754) @@ -48,7 +48,7 @@ pcb_bool Valid; }; -void CreateDefaultFont(PCBTypePtr pcb); +void CreateDefaultFont(pcb_board_t *pcb); void SetFontInfo(FontTypePtr Ptr); LineTypePtr CreateNewLineInSymbol(SymbolTypePtr Symbol, Coord X1, Coord Y1, Coord X2, Coord Y2, Coord Thickness); Index: trunk/src/global_typedefs.h =================================================================== --- trunk/src/global_typedefs.h (revision 4753) +++ trunk/src/global_typedefs.h (revision 4754) @@ -24,7 +24,7 @@ #define GLOBAL_TYPEDEFS_H #include "config.h" -typedef struct pcb_board_s PCBType, *PCBTypePtr; +typedef struct pcb_board_s pcb_board_t; typedef struct pcb_data_s DataType, *DataTypePtr; typedef struct pcb_layer_group_s LayerGroupType, *LayerGroupTypePtr; typedef struct pcb_layer_s LayerType, *LayerTypePtr; Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 4753) +++ trunk/src/layer.h (revision 4754) @@ -129,11 +129,11 @@ #define GROUP_LOOP(data, group) do { \ pcb_cardinal_t entry; \ - for (entry = 0; entry < ((PCBTypePtr)(data->pcb))->LayerGroups.Number[(group)]; entry++) \ + for (entry = 0; entry < ((pcb_board_t *)(data->pcb))->LayerGroups.Number[(group)]; entry++) \ { \ LayerTypePtr layer; \ pcb_cardinal_t number; \ - number = ((PCBTypePtr)(data->pcb))->LayerGroups.Entries[(group)][entry]; \ + number = ((pcb_board_t *)(data->pcb))->LayerGroups.Entries[(group)][entry]; \ if (number >= max_copper_layer) \ continue; \ layer = &data->Layer[number]; Index: trunk/src/netlist.c =================================================================== --- trunk/src/netlist.c (revision 4753) +++ trunk/src/netlist.c (revision 4754) @@ -189,7 +189,7 @@ net->Style = pcb_strdup_null((char *) style); } -LibraryMenuTypePtr pcb_netlist_find_net4pinname(PCBTypePtr pcb, const char *pin) +LibraryMenuTypePtr pcb_netlist_find_net4pinname(pcb_board_t *pcb, const char *pin) { int n; @@ -205,7 +205,7 @@ return NULL; } -static LibraryMenuTypePtr pcb_netlist_find_net4pin_any(PCBTypePtr pcb, const char *ename, const char *pname) +static LibraryMenuTypePtr pcb_netlist_find_net4pin_any(pcb_board_t *pcb, const char *ename, const char *pname) { char pinname[256]; int len; @@ -220,7 +220,7 @@ return pcb_netlist_find_net4pinname(pcb, pinname); } -LibraryMenuTypePtr pcb_netlist_find_net4pin(PCBTypePtr pcb, const PinType *pin) +LibraryMenuTypePtr pcb_netlist_find_net4pin(pcb_board_t *pcb, const PinType *pin) { const ElementType *e = pin->Element; @@ -231,7 +231,7 @@ } -LibraryMenuTypePtr pcb_netlist_find_net4pad(PCBTypePtr pcb, const PadType *pad) +LibraryMenuTypePtr pcb_netlist_find_net4pad(pcb_board_t *pcb, const PadType *pad) { const ElementType *e = pad->Element; @@ -241,7 +241,7 @@ return pcb_netlist_find_net4pin_any(pcb, e->Name[NAMEONPCB_INDEX].TextString, pad->Number); } -pcb_cardinal_t pcb_netlist_net_idx(PCBTypePtr pcb, LibraryMenuType *net) +pcb_cardinal_t pcb_netlist_net_idx(pcb_board_t *pcb, LibraryMenuType *net) { LibraryMenuType *first = &pcb->NetlistLib[NETLIST_EDITED].Menu[0]; LibraryMenuType *last = &pcb->NetlistLib[NETLIST_EDITED].Menu[pcb->NetlistLib[NETLIST_EDITED].MenuN-1]; Index: trunk/src/netlist.h =================================================================== --- trunk/src/netlist.h (revision 4753) +++ trunk/src/netlist.h (revision 4754) @@ -66,11 +66,11 @@ /* Return the net entry for a pin name (slow search). The pin name is like "U101-5", so element's refdes, dash, pin number */ -LibraryMenuTypePtr pcb_netlist_find_net4pinname(PCBTypePtr pcb, const char *pinname); +LibraryMenuTypePtr pcb_netlist_find_net4pinname(pcb_board_t *pcb, const char *pinname); /* Same as pcb_netlist_find_net4pinname but with pin pointer */ -LibraryMenuTypePtr pcb_netlist_find_net4pin(PCBTypePtr pcb, const PinType *pin); -LibraryMenuTypePtr pcb_netlist_find_net4pad(PCBTypePtr pcb, const PadType *pad); +LibraryMenuTypePtr pcb_netlist_find_net4pin(pcb_board_t *pcb, const PinType *pin); +LibraryMenuTypePtr pcb_netlist_find_net4pad(pcb_board_t *pcb, const PadType *pad); /* Evaluate to const char * name of the network; lmt is (LibraryMenuType *) */ @@ -83,7 +83,7 @@ /* Return the index of the net or PCB_NETLIST_INVALID_INDEX if the net is not on the netlist. NOTE: indices returned are valid only until the first netlist change! */ -pcb_cardinal_t pcb_netlist_net_idx(PCBTypePtr pcb, LibraryMenuType *net); +pcb_cardinal_t pcb_netlist_net_idx(pcb_board_t *pcb, LibraryMenuType *net); #define PCB_NETLIST_INVALID_INDEX ((pcb_cardinal_t)(-1)) Index: trunk/src/obj_elem.c =================================================================== --- trunk/src/obj_elem.c (revision 4753) +++ trunk/src/obj_elem.c (revision 4754) @@ -481,7 +481,7 @@ } /* changes the layout-name of an element */ -char *ChangeElementText(PCBType * pcb, DataType * data, ElementTypePtr Element, int which, char *new_name) +char *ChangeElementText(pcb_board_t * pcb, DataType * data, ElementTypePtr Element, int which, char *new_name) { char *old = Element->Name[which].TextString; Index: trunk/src/obj_elem.h =================================================================== --- trunk/src/obj_elem.h (revision 4753) +++ trunk/src/obj_elem.h (revision 4754) @@ -93,7 +93,7 @@ /* Change the specified text on an element, either on the board (give PCB, PCB->Data) or in a buffer (give NULL, Buffer->Data). The old string is returned, and must be properly freed by the caller. */ -char *ChangeElementText(PCBType * pcb, DataType * data, ElementTypePtr Element, int which, char *new_name); +char *ChangeElementText(pcb_board_t * pcb, DataType * data, ElementTypePtr Element, int which, char *new_name); /* --------------------------------------------------------------------------- Index: trunk/src/obj_pinvia_therm.c =================================================================== --- trunk/src/obj_pinvia_therm.c (revision 4753) +++ trunk/src/obj_pinvia_therm.c (revision 4754) @@ -38,7 +38,7 @@ #include "polygon.h" #include "obj_pinvia_therm.h" -static PCBTypePtr pcb; +static pcb_board_t *pcb; struct cent { Coord x, y; @@ -353,7 +353,7 @@ * Usually this is 4 disjoint regions. * */ -POLYAREA *ThermPoly(PCBTypePtr p, PinTypePtr pin, pcb_cardinal_t laynum) +POLYAREA *ThermPoly(pcb_board_t *p, PinTypePtr pin, pcb_cardinal_t laynum) { ArcType a; POLYAREA *pa, *arc; Index: trunk/src/obj_pinvia_therm.h =================================================================== --- trunk/src/obj_pinvia_therm.h (revision 4753) +++ trunk/src/obj_pinvia_therm.h (revision 4754) @@ -39,6 +39,6 @@ #include #include "config.h" -POLYAREA *ThermPoly(PCBTypePtr, PinTypePtr, pcb_cardinal_t); +POLYAREA *ThermPoly(pcb_board_t *, PinTypePtr, pcb_cardinal_t); #endif Index: trunk/src/operation.h =================================================================== --- trunk/src/operation.h (revision 4753) +++ trunk/src/operation.h (revision 4754) @@ -35,13 +35,13 @@ hold temporary states of a multi-call operation too. */ typedef struct { - PCBType *pcb; + pcb_board_t *pcb; int extraflg; DataType *dst, *src; } pcb_opctx_buffer_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ Coord delta; /* change of size */ Coord absolute; /* Absolute size */ @@ -48,28 +48,28 @@ } pcb_opctx_chgsize_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; int is_primary; /* whether the primary parameter should be changed */ Angle delta, absolute; /* same as above, but for angles */ } pcb_opctx_chgangle_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; char *new_name; } pcb_opctx_chgname_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; int style; } pcb_opctx_chgtherm_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; Coord DeltaX, DeltaY; /* movement vector */ } pcb_opctx_copy_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; Coord x, y; pcb_cardinal_t idx; /* poly point idx */ pcb_bool last; @@ -77,7 +77,7 @@ } pcb_opctx_insert_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; Coord dx, dy; /* used by local routines as offset */ LayerTypePtr dst_layer; pcb_bool more_to_come; @@ -84,13 +84,13 @@ } pcb_opctx_move_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; DataTypePtr destroy_target; pcb_bool bulk; /* don't draw if part of a bulk operation */ } pcb_opctx_remove_t; typedef struct { - PCBType *pcb; + pcb_board_t *pcb; Coord center_x, center_y; /* center of rotation */ unsigned number; /* number of rotations */ } pcb_opctx_rotate_t; Index: trunk/src/plug_io.c =================================================================== --- trunk/src/plug_io.c (revision 4753) +++ trunk/src/plug_io.c (revision 4754) @@ -103,7 +103,7 @@ } } -int ParsePCB(PCBTypePtr Ptr, const char *Filename, const char *fmt, int load_settings) +int ParsePCB(pcb_board_t *Ptr, const char *Filename, const char *fmt, int load_settings) { int res = -1; @@ -289,8 +289,8 @@ { const char *unit_suffix; char *new_filename; - PCBTypePtr newPCB = CreateNewPCB_(pcb_false); - PCBTypePtr oldPCB; + pcb_board_t *newPCB = CreateNewPCB_(pcb_false); + pcb_board_t *oldPCB; conf_role_t settings_dest; #ifdef DEBUG double elapsed; Index: trunk/src/plug_io.h =================================================================== --- trunk/src/plug_io.h (revision 4753) +++ trunk/src/plug_io.h (revision 4754) @@ -59,7 +59,7 @@ Conf subtree at settings_dest is replaced by settings loaded from the file unless it's CFR_invalid. Return 0 on success. */ - int (*parse_pcb)(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest); + int (*parse_pcb)(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); /* Attempt to load an element from Filename to Ptr. Return 0 on success. */ int (*parse_element)(plug_io_t *ctx, DataTypePtr Ptr, const char *name); @@ -91,7 +91,7 @@ /********** hook wrappers **********/ -int ParsePCB(PCBTypePtr Ptr, const char *Filename, const char *fmt, int load_settings); +int ParsePCB(pcb_board_t *Ptr, const char *Filename, const char *fmt, int load_settings); int ParseElement(DataTypePtr Ptr, const char *name); int ParseFont(FontTypePtr Ptr, char *Filename); int WriteBuffer(FILE *f, BufferType *buff, const char *fmt); Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4753) +++ trunk/src/polygon.c (revision 4754) @@ -763,7 +763,7 @@ } /* return the clearance polygon for a pin */ -static POLYAREA *pin_clearance_poly(pcb_cardinal_t layernum, PCBTypePtr pcb, PinType * pin) +static POLYAREA *pin_clearance_poly(pcb_cardinal_t layernum, pcb_board_t *pcb, PinType * pin) { POLYAREA *np; if (TEST_THERM(layernum, pin)) @@ -885,7 +885,7 @@ return R_DIR_NOT_FOUND; i = GetLayerNumber(info->data, info->layer); if (TEST_THERM(i, pin)) { - np = ThermPoly((PCBTypePtr) (info->data->pcb), pin, i); + np = ThermPoly((pcb_board_t *) (info->data->pcb), pin, i); if (!np) return R_DIR_FOUND_CONTINUE; } @@ -992,8 +992,8 @@ { 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]) + for (j = 0; j < ((pcb_board_t *) (Data->pcb))->LayerGroups.Number[i]; j++) + if (layer == ((pcb_board_t *) (Data->pcb))->LayerGroups.Entries[i][j]) return i; return i; } Index: trunk/src/rats_patch.c =================================================================== --- trunk/src/rats_patch.c (revision 4753) +++ trunk/src/rats_patch.c (revision 4754) @@ -34,7 +34,7 @@ #include "compat_misc.h" #include "compat_nls.h" -static void rats_patch_remove(PCBTypePtr pcb, rats_patch_line_t * n, int do_free); +static void rats_patch_remove(pcb_board_t *pcb, rats_patch_line_t * n, int do_free); const char *pcb_netlist_names[NUM_NETLISTS] = { "input", @@ -41,7 +41,7 @@ "edited" }; -void rats_patch_append(PCBTypePtr pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2) +void rats_patch_append(pcb_board_t *pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2) { rats_patch_line_t *n; @@ -76,7 +76,7 @@ free(n->arg2.attrib_val); } -void rats_patch_destroy(PCBTypePtr pcb) +void rats_patch_destroy(pcb_board_t *pcb) { rats_patch_line_t *n, *next; @@ -87,7 +87,7 @@ } } -void rats_patch_append_optimize(PCBTypePtr pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2) +void rats_patch_append_optimize(pcb_board_t *pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2) { rats_patch_op_t seek_op; rats_patch_line_t *n; @@ -128,7 +128,7 @@ } /* Unlink n from the list; if do_free is non-zero, also free fields and n */ -static void rats_patch_remove(PCBTypePtr pcb, rats_patch_line_t * n, int do_free) +static void rats_patch_remove(pcb_board_t *pcb, rats_patch_line_t * n, int do_free) { /* if we are the first or last... */ if (n == pcb->NetlistPatches) @@ -198,7 +198,7 @@ } -int rats_patch_apply_conn(PCBTypePtr pcb, rats_patch_line_t * patch, int del) +int rats_patch_apply_conn(pcb_board_t *pcb, rats_patch_line_t * patch, int del) { int n; @@ -242,7 +242,7 @@ } -int rats_patch_apply(PCBTypePtr pcb, rats_patch_line_t * patch) +int rats_patch_apply(pcb_board_t *pcb, rats_patch_line_t * patch) { switch (patch->op) { case RATP_ADD_CONN: @@ -256,7 +256,7 @@ return 0; } -void rats_patch_make_edited(PCBTypePtr pcb) +void rats_patch_make_edited(pcb_board_t *pcb) { rats_patch_line_t *n; @@ -266,7 +266,7 @@ rats_patch_apply(pcb, n); } -static LibraryMenuTypePtr rats_patch_find_net(PCBTypePtr pcb, const char *netname, int listidx) +static LibraryMenuTypePtr rats_patch_find_net(pcb_board_t *pcb, const char *netname, int listidx) { int n; @@ -278,7 +278,7 @@ return NULL; } -int rats_patch_export(PCBType *pcb, rats_patch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx) +int rats_patch_export(pcb_board_t *pcb, rats_patch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx) { rats_patch_line_t *n; @@ -356,7 +356,7 @@ } } -int rats_patch_fexport(PCBTypePtr pcb, FILE *f, int fmt_pcb) +int rats_patch_fexport(pcb_board_t *pcb, FILE *f, int fmt_pcb) { fexport_t ctx; if (fmt_pcb) { Index: trunk/src/rats_patch.h =================================================================== --- trunk/src/rats_patch.h (revision 4753) +++ trunk/src/rats_patch.h (revision 4754) @@ -55,20 +55,20 @@ const char *pcb_netlist_names[NUM_NETLISTS]; /* Allocate and append a patch line to the patch list */ -void rats_patch_append(PCBTypePtr pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2); +void rats_patch_append(pcb_board_t *pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2); /* Free the patch list and all memory claimed by patch list items */ -void rats_patch_destroy(PCBTypePtr pcb); +void rats_patch_destroy(pcb_board_t *pcb); /* Same as rats_patch_append() but also optimize previous entries so that redundant entries are removed */ -void rats_patch_append_optimize(PCBTypePtr pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2); +void rats_patch_append_optimize(pcb_board_t *pcb, rats_patch_op_t op, const char *id, const char *a1, const char *a2); /* Create [NETLIST_EDITED] from [NETLIST_INPUT] applying the patch */ -void rats_patch_make_edited(PCBTypePtr pcb); +void rats_patch_make_edited(pcb_board_t *pcb); /* apply a single patch record on [NETLIST_EDITED]; returns non-zero on failure */ -int rats_patch_apply(PCBTypePtr pcb, rats_patch_line_t * patch); +int rats_patch_apply(pcb_board_t *pcb, rats_patch_line_t * patch); /**** exporter ****/ @@ -75,7 +75,7 @@ /* Special text exporter: save all patch lines as an ordered list of text lines if fmt is non-zero, generate pcb savefile compatible lines, else generate a back annotation patch */ -int rats_patch_fexport(PCBTypePtr pcb, FILE * f, int fmt_pcb); +int rats_patch_fexport(pcb_board_t *pcb, FILE * f, int fmt_pcb); /* Generic, callback based exporter: */ @@ -92,6 +92,6 @@ /* Call cb() for each item to output; PCB_PTRE_INFO* is calculated/called only if need_info_lines is true; the pcb pointer is used for looking up connections */ -int rats_patch_export(PCBType *pcb, rats_patch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx); +int rats_patch_export(pcb_board_t *pcb, rats_patch_line_t *pat, pcb_bool need_info_lines, void (*cb)(void *ctx, pcb_rats_patch_export_ev_t ev, const char *netn, const char *key, const char *val), void *ctx); #endif Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 4753) +++ trunk/src/remove.c (revision 4754) @@ -72,7 +72,7 @@ /* --------------------------------------------------------------------------- * remove PCB */ -void RemovePCB(PCBTypePtr Ptr) +void RemovePCB(pcb_board_t *Ptr) { ClearUndoList(pcb_true); FreePCBMemory(Ptr); Index: trunk/src/remove.h =================================================================== --- trunk/src/remove.h (revision 4753) +++ trunk/src/remove.h (revision 4754) @@ -38,7 +38,7 @@ (PCB_TYPE_VIA | PCB_TYPE_LINE_POINT | PCB_TYPE_LINE | PCB_TYPE_TEXT | PCB_TYPE_ELEMENT | \ PCB_TYPE_POLYGON_POINT | PCB_TYPE_POLYGON | PCB_TYPE_RATLINE | PCB_TYPE_ARC) -void RemovePCB(PCBTypePtr); +void RemovePCB(pcb_board_t *); pcb_bool RemoveSelected(void); void *RemoveObject(int, void *, void *, void *); void *DestroyObject(DataTypePtr, int, void *, void *, void *); Index: trunk/src_plugins/hid_gtk/ghid-propedit.c =================================================================== --- trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4753) +++ trunk/src_plugins/hid_gtk/ghid-propedit.c (revision 4754) @@ -290,12 +290,12 @@ return FALSE; } -static PCBType preview_pcb; +static pcb_board_t preview_pcb; static GtkWidget *preview_init(ghid_propedit_dialog_t *dlg) { GtkWidget *area = gtk_drawing_area_new(); - PCBType *old_pcb; + pcb_board_t *old_pcb; int n, zoom1, fx, fy; Coord cx, cy; Index: trunk/src_plugins/import_edif/edif.c =================================================================== --- trunk/src_plugins/import_edif/edif.c (revision 4753) +++ trunk/src_plugins/import_edif/edif.c (revision 4754) @@ -99,7 +99,6 @@ #include -#include "config.h" #include "math_helper.h" #include "board.h" #include "data.h" Index: trunk/src_plugins/io_kicad/read.c =================================================================== --- trunk/src_plugins/io_kicad/read.c (revision 4753) +++ trunk/src_plugins/io_kicad/read.c (revision 4754) @@ -46,7 +46,7 @@ #include "obj_all.h" typedef struct { - PCBTypePtr PCB; + pcb_board_t *PCB; const char *Filename; conf_role_t settings_dest; gsxl_dom_t dom; @@ -2026,7 +2026,7 @@ return kicad_foreach_dispatch(st, st->dom.root->children, disp); } -int io_kicad_read_pcb(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest) +int io_kicad_read_pcb(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) { int c, readres = 0; read_state_t st; Index: trunk/src_plugins/io_kicad/read.h =================================================================== --- trunk/src_plugins/io_kicad/read.h (revision 4753) +++ trunk/src_plugins/io_kicad/read.h (revision 4754) @@ -29,4 +29,4 @@ #include #include "data.h" -int io_kicad_read_pcb(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest); +int io_kicad_read_pcb(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 4753) +++ trunk/src_plugins/io_kicad/write.c (revision 4754) @@ -997,7 +997,7 @@ * writes netlist data in kicad legacy format for use in a layout .brd file */ -int write_kicad_equipotential_netlists(FILE * FP, PCBTypePtr Layout, pcb_cardinal_t indentation) +int write_kicad_equipotential_netlists(FILE * FP, pcb_board_t *Layout, pcb_cardinal_t indentation) { int n; /* code mostly lifted from netlist.c */ int netNumber; @@ -1033,7 +1033,7 @@ /* --------------------------------------------------------------------------- * writes element data in kicad legacy format for use in a layout .brd file */ -int write_kicad_layout_elements(FILE * FP, PCBTypePtr Layout, DataTypePtr Data, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation) +int write_kicad_layout_elements(FILE * FP, pcb_board_t *Layout, DataTypePtr Data, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation) { gdl_iterator_t eit; Index: trunk/src_plugins/io_kicad/write.h =================================================================== --- trunk/src_plugins/io_kicad/write.h (revision 4753) +++ trunk/src_plugins/io_kicad/write.h (revision 4754) @@ -41,7 +41,7 @@ Coord xOffset, Coord yOffset, pcb_cardinal_t indentation); int write_kicad_layout_text(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation); -int write_kicad_equipotential_netlists(FILE * FP, PCBTypePtr Layout, pcb_cardinal_t indentation); -int write_kicad_layout_elements(FILE * FP, PCBTypePtr Layout, DataTypePtr Data, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation); +int write_kicad_equipotential_netlists(FILE * FP, pcb_board_t *Layout, pcb_cardinal_t indentation); +int write_kicad_layout_elements(FILE * FP, pcb_board_t *Layout, DataTypePtr Data, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation); int write_kicad_layout_polygons(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord xOffset, Coord yOffset, pcb_cardinal_t indentation); Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 4753) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 4754) @@ -957,7 +957,7 @@ * writes netlist data in kicad legacy format for use in a layout .brd file */ -int write_kicad_legacy_equipotential_netlists(FILE * FP, PCBTypePtr Layout) +int write_kicad_legacy_equipotential_netlists(FILE * FP, pcb_board_t *Layout) { int n; /* code mostly lifted from netlist.c */ int netNumber; @@ -988,7 +988,7 @@ /* --------------------------------------------------------------------------- * writes element data in kicad legacy format for use in a layout .brd file */ -int write_kicad_legacy_layout_elements(FILE * FP, PCBTypePtr Layout, DataTypePtr Data, Coord xOffset, Coord yOffset) +int write_kicad_legacy_layout_elements(FILE * FP, pcb_board_t *Layout, DataTypePtr Data, Coord xOffset, Coord yOffset) { gdl_iterator_t eit; Index: trunk/src_plugins/io_kicad_legacy/write.h =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.h (revision 4753) +++ trunk/src_plugins/io_kicad_legacy/write.h (revision 4754) @@ -41,7 +41,7 @@ Coord xOffset, Coord yOffset); int write_kicad_legacy_layout_text(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord xOffset, Coord yOffset); -int write_kicad_legacy_equipotential_netlists(FILE * FP, PCBTypePtr Layout); -int write_kicad_legacy_layout_elements(FILE * FP, PCBTypePtr Layout, DataTypePtr Data, Coord xOffset, Coord yOffset); +int write_kicad_legacy_equipotential_netlists(FILE * FP, pcb_board_t *Layout); +int write_kicad_legacy_layout_elements(FILE * FP, pcb_board_t *Layout, DataTypePtr Data, Coord xOffset, Coord yOffset); int write_kicad_legacy_layout_polygons(FILE * FP, pcb_cardinal_t number, LayerTypePtr layer, Coord xOffset, Coord yOffset); Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4753) +++ trunk/src_plugins/io_lihata/read.c (revision 4754) @@ -219,7 +219,7 @@ return -1; } -static int parse_meta(PCBType *pcb, lht_node_t *nd) +static int parse_meta(pcb_board_t *pcb, lht_node_t *nd) { lht_node_t *grp; @@ -529,7 +529,7 @@ return 0; } -static int parse_data_layer(PCBType *pcb, DataType *dt, lht_node_t *grp, int layer_id) +static int parse_data_layer(pcb_board_t *pcb, DataType *dt, lht_node_t *grp, int layer_id) { lht_node_t *n, *lst; lht_dom_iterator_t it; @@ -565,7 +565,7 @@ return 0; } -static int parse_data_layers(PCBType *pcb, DataType *dt, lht_node_t *grp) +static int parse_data_layers(pcb_board_t *pcb, DataType *dt, lht_node_t *grp) { int id; lht_node_t *n; @@ -648,7 +648,7 @@ } -static int parse_element(PCBType *pcb, DataType *dt, lht_node_t *obj) +static int parse_element(pcb_board_t *pcb, DataType *dt, lht_node_t *obj) { ElementType *elem = GetElementMemory(dt); lht_node_t *lst, *n; @@ -694,7 +694,7 @@ return 0; } -static int parse_data_objects(PCBType *pcb_for_font, DataType *dt, lht_node_t *grp) +static int parse_data_objects(pcb_board_t *pcb_for_font, DataType *dt, lht_node_t *grp) { lht_node_t *n; lht_dom_iterator_t it; @@ -714,7 +714,7 @@ return 0; } -static DataType *parse_data(PCBType *pcb, lht_node_t *nd) +static DataType *parse_data(pcb_board_t *pcb, lht_node_t *nd) { DataType *dt; lht_node_t *grp; @@ -882,7 +882,7 @@ return 0; } -static int parse_netlist_patch(PCBType *pcb, lht_node_t *patches) +static int parse_netlist_patch(pcb_board_t *pcb, lht_node_t *patches) { lht_node_t *np; @@ -922,7 +922,7 @@ return 0; } -static int parse_netlists(PCBType *pcb, lht_node_t *netlists) +static int parse_netlists(pcb_board_t *pcb, lht_node_t *netlists) { lht_node_t *sub; @@ -940,7 +940,7 @@ return 0; } -static int parse_board(PCBType *pcb, lht_node_t *nd) +static int parse_board(pcb_board_t *pcb, lht_node_t *nd) { lht_node_t *sub; @@ -992,7 +992,7 @@ return 0; } -int io_lihata_parse_pcb(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest) +int io_lihata_parse_pcb(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) { int res; char *errmsg; Index: trunk/src_plugins/io_lihata/read.h =================================================================== --- trunk/src_plugins/io_lihata/read.h (revision 4753) +++ trunk/src_plugins/io_lihata/read.h (revision 4754) @@ -20,6 +20,6 @@ * */ -int io_lihata_parse_pcb(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest); +int io_lihata_parse_pcb(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); Index: trunk/src_plugins/io_lihata/write.c =================================================================== --- trunk/src_plugins/io_lihata/write.c (revision 4753) +++ trunk/src_plugins/io_lihata/write.c (revision 4754) @@ -93,7 +93,7 @@ return field; } -static lht_node_t *build_board_meta(PCBType *pcb) +static lht_node_t *build_board_meta(pcb_board_t *pcb) { lht_node_t *meta, *grp; @@ -662,7 +662,7 @@ } /* Build a netlist patch so that we don't need to export a complete new set of "as built" netlist */ -static lht_node_t *build_net_patch(PCBType *pcb, rats_patch_line_t *pat, int *nonempty) +static lht_node_t *build_net_patch(pcb_board_t *pcb, rats_patch_line_t *pat, int *nonempty) { lht_node_t *pn; build_net_patch_t ctx; @@ -682,7 +682,7 @@ } -static lht_node_t *build_netlists(PCBType *pcb, LibraryType *netlists, rats_patch_line_t *pat, int num_netlists) +static lht_node_t *build_netlists(pcb_board_t *pcb, LibraryType *netlists, rats_patch_line_t *pat, int num_netlists) { lht_node_t *nls; int n, nonempty = 0; @@ -710,7 +710,7 @@ } -static lht_doc_t *build_board(PCBType *pcb) +static lht_doc_t *build_board(pcb_board_t *pcb) { lht_doc_t *brd = lht_dom_init(); Index: trunk/src_plugins/io_pcb/attribs.c =================================================================== --- trunk/src_plugins/io_pcb/attribs.c (revision 4753) +++ trunk/src_plugins/io_pcb/attribs.c (revision 4754) @@ -43,7 +43,7 @@ return 1; } -static void c2a(PCBType *pcb, lht_node_t *tree, const char *path1) +static void c2a(pcb_board_t *pcb, lht_node_t *tree, const char *path1) { lht_dom_iterator_t it; lht_node_t *n; @@ -92,7 +92,7 @@ } } -void io_pcb_attrib_c2a(PCBType *pcb) +void io_pcb_attrib_c2a(pcb_board_t *pcb) { lht_node_t *nmain = conf_lht_get_first(CFR_DESIGN); @@ -99,7 +99,7 @@ c2a(pcb, nmain, ""); } -void io_pcb_attrib_a2c(PCBType *pcb) +void io_pcb_attrib_a2c(pcb_board_t *pcb) { int n; Index: trunk/src_plugins/io_pcb/attribs.h =================================================================== --- trunk/src_plugins/io_pcb/attribs.h (revision 4753) +++ trunk/src_plugins/io_pcb/attribs.h (revision 4754) @@ -1,2 +1,2 @@ -void io_pcb_attrib_c2a(PCBType *pcb); -void io_pcb_attrib_a2c(PCBType *pcb); +void io_pcb_attrib_c2a(pcb_board_t *pcb); +void io_pcb_attrib_a2c(pcb_board_t *pcb); Index: trunk/src_plugins/io_pcb/file.c =================================================================== --- trunk/src_plugins/io_pcb/file.c (revision 4753) +++ trunk/src_plugins/io_pcb/file.c (revision 4754) @@ -540,7 +540,7 @@ * functions for loading elements-as-pcb */ -extern PCBTypePtr yyPCB; +extern pcb_board_t *yyPCB; extern DataTypePtr yyData; extern FontTypePtr yyFont; @@ -558,7 +558,7 @@ void PostLoadElementPCB() { - PCBTypePtr pcb_save = PCB; + pcb_board_t *pcb_save = PCB; ElementTypePtr e; if (!yyPCB) Index: trunk/src_plugins/io_pcb/parse_common.h =================================================================== --- trunk/src_plugins/io_pcb/parse_common.h (revision 4753) +++ trunk/src_plugins/io_pcb/parse_common.h (revision 4754) @@ -34,7 +34,7 @@ #include "config.h" #include "plug_io.h" -int io_pcb_ParsePCB(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest); +int io_pcb_ParsePCB(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest); int io_pcb_ParseElement(plug_io_t *ctx, DataTypePtr, const char *); int io_pcb_ParseFont(plug_io_t *ctx, FontTypePtr, const char *); Index: trunk/src_plugins/io_pcb/parse_l.c =================================================================== --- trunk/src_plugins/io_pcb/parse_l.c (revision 4753) +++ trunk/src_plugins/io_pcb/parse_l.c (revision 4754) @@ -707,7 +707,7 @@ #endif const char *yyfilename; /* in this file */ -PCBTypePtr yyPCB; /* used by parser */ +pcb_board_t * yyPCB; /* used by parser */ DataTypePtr yyData; ElementTypePtr yyElement; FontTypePtr yyFont; @@ -2501,7 +2501,7 @@ conf_set(target, path, arr_idx, new_val, pol); \ } while(0) \ -int io_pcb_ParsePCB(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest) +int io_pcb_ParsePCB(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) { int retval; yyPCB = Ptr; Index: trunk/src_plugins/io_pcb/parse_l.l =================================================================== --- trunk/src_plugins/io_pcb/parse_l.l (revision 4753) +++ trunk/src_plugins/io_pcb/parse_l.l (revision 4754) @@ -73,7 +73,7 @@ #endif const char *yyfilename; /* in this file */ -PCBTypePtr yyPCB; /* used by parser */ +pcb_board_t * yyPCB; /* used by parser */ DataTypePtr yyData; ElementTypePtr yyElement; FontTypePtr yyFont; @@ -360,7 +360,7 @@ conf_set(target, path, arr_idx, new_val, pol); \ } while(0) \ -int io_pcb_ParsePCB(plug_io_t *ctx, PCBTypePtr Ptr, const char *Filename, conf_role_t settings_dest) +int io_pcb_ParsePCB(plug_io_t *ctx, pcb_board_t *Ptr, const char *Filename, conf_role_t settings_dest) { int retval; yyPCB = Ptr; Index: trunk/src_plugins/io_pcb/parse_y.c =================================================================== --- trunk/src_plugins/io_pcb/parse_y.c (revision 4753) +++ trunk/src_plugins/io_pcb/parse_y.c (revision 4754) @@ -128,7 +128,7 @@ static pcb_bool LayerFlag[MAX_LAYER + 2]; extern char *yytext; /* defined by LEX */ -extern PCBTypePtr yyPCB; +extern pcb_board_t * yyPCB; extern DataTypePtr yyData; extern ElementTypePtr yyElement; extern FontTypePtr yyFont; @@ -1813,7 +1813,7 @@ case 7: #line 198 "parse_y.y" /* yacc.c:1646 */ { - PCBTypePtr pcb_save = PCB; + pcb_board_t *pcb_save = PCB; if ((yy_settings_dest != CFR_invalid) && (layer_group_string != NULL)) conf_set(yy_settings_dest, "design/groups", -1, layer_group_string, POL_OVERWRITE); CreateNewPCBPost (yyPCB, 0); Index: trunk/src_plugins/io_pcb/parse_y.y =================================================================== --- trunk/src_plugins/io_pcb/parse_y.y (revision 4753) +++ trunk/src_plugins/io_pcb/parse_y.y (revision 4754) @@ -65,7 +65,7 @@ static pcb_bool LayerFlag[MAX_LAYER + 2]; extern char *yytext; /* defined by LEX */ -extern PCBTypePtr yyPCB; +extern pcb_board_t * yyPCB; extern DataTypePtr yyData; extern ElementTypePtr yyElement; extern FontTypePtr yyFont; @@ -196,7 +196,7 @@ pcbnetlist pcbnetlistpatch { - PCBTypePtr pcb_save = PCB; + pcb_board_t *pcb_save = PCB; if ((yy_settings_dest != CFR_invalid) && (layer_group_string != NULL)) conf_set(yy_settings_dest, "design/groups", -1, layer_group_string, POL_OVERWRITE); CreateNewPCBPost (yyPCB, 0); Index: trunk/src_plugins/propedit/propsel.c =================================================================== --- trunk/src_plugins/propedit/propsel.c (revision 4753) +++ trunk/src_plugins/propedit/propsel.c (revision 4754) @@ -89,7 +89,7 @@ free(big); } -static void map_line_cb(void *ctx, PCBType *pcb, LayerType *layer, LineType *line) +static void map_line_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, LineType *line) { map_chk_skip(ctx, line); map_add_prop(ctx, "p/trace/thickness", Coord, line->Thickness); @@ -97,7 +97,7 @@ map_attr(ctx, &line->Attributes); } -static void map_arc_cb(void *ctx, PCBType *pcb, LayerType *layer, ArcType *arc) +static void map_arc_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, ArcType *arc) { map_chk_skip(ctx, arc); map_add_prop(ctx, "p/trace/thickness", Coord, arc->Thickness); @@ -109,7 +109,7 @@ map_attr(ctx, &arc->Attributes); } -static void map_text_cb(void *ctx, PCBType *pcb, LayerType *layer, TextType *text) +static void map_text_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, TextType *text) { map_chk_skip(ctx, text); map_add_prop(ctx, "p/text/scale", int, text->Scale); @@ -118,13 +118,13 @@ map_attr(ctx, &text->Attributes); } -static void map_poly_cb(void *ctx, PCBType *pcb, LayerType *layer, PolygonType *poly) +static void map_poly_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, PolygonType *poly) { map_chk_skip(ctx, poly); map_attr(ctx, &poly->Attributes); } -static void map_eline_cb(void *ctx, PCBType *pcb, ElementType *element, LineType *line) +static void map_eline_cb(void *ctx, pcb_board_t *pcb, ElementType *element, LineType *line) { map_chk_skip(ctx, line); map_line_cb(ctx, pcb, NULL, line); @@ -131,7 +131,7 @@ map_attr(ctx, &line->Attributes); } -static void map_earc_cb(void *ctx, PCBType *pcb, ElementType *element, ArcType *arc) +static void map_earc_cb(void *ctx, pcb_board_t *pcb, ElementType *element, ArcType *arc) { map_chk_skip(ctx, arc); map_arc_cb(ctx, pcb, NULL, arc); @@ -138,7 +138,7 @@ map_attr(ctx, &arc->Attributes); } -static void map_etext_cb(void *ctx, PCBType *pcb, ElementType *element, TextType *text) +static void map_etext_cb(void *ctx, pcb_board_t *pcb, ElementType *element, TextType *text) { map_chk_skip(ctx, text); map_text_cb(ctx, pcb, NULL, text); @@ -145,7 +145,7 @@ map_attr(ctx, &text->Attributes); } -static void map_epin_cb(void *ctx, PCBType *pcb, ElementType *element, PinType *pin) +static void map_epin_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PinType *pin) { map_chk_skip(ctx, pin); map_add_prop(ctx, "p/pin/thickness", Coord, pin->Thickness); @@ -155,7 +155,7 @@ map_attr(ctx, &pin->Attributes); } -static void map_epad_cb(void *ctx, PCBType *pcb, ElementType *element, PadType *pad) +static void map_epad_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PadType *pad) { map_chk_skip(ctx, pad); map_add_prop(ctx, "p/pad/mask", Coord, pad->Mask); @@ -164,7 +164,7 @@ -static void map_via_cb(void *ctx, PCBType *pcb, PinType *via) +static void map_via_cb(void *ctx, pcb_board_t *pcb, PinType *via) { map_chk_skip(ctx, via); map_add_prop(ctx, "p/via/thickness", Coord, via->Thickness); @@ -216,7 +216,7 @@ #define DONE { st->set_cnt++; RestoreUndoSerialNumber(); return; } -static void set_line_cb(void *ctx, PCBType *pcb, LayerType *layer, LineType *line) +static void set_line_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, LineType *line) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 8; @@ -235,7 +235,7 @@ ChangeObjectClearSize(PCB_TYPE_LINE, layer, line, NULL, st->c, st->c_absolute)) DONE; } -static void set_arc_cb(void *ctx, PCBType *pcb, LayerType *layer, ArcType *arc) +static void set_arc_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, ArcType *arc) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 8; @@ -268,7 +268,7 @@ ChangeObjectAngle(PCB_TYPE_ARC, layer, arc, NULL, 1, st->d, st->d_absolute)) DONE; } -static void set_text_cb_any(void *ctx, PCBType *pcb, int type, void *layer_or_element, TextType *text) +static void set_text_cb_any(void *ctx, pcb_board_t *pcb, int type, void *layer_or_element, TextType *text) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 7; @@ -305,13 +305,13 @@ } } -static void set_text_cb(void *ctx, PCBType *pcb, LayerType *layer, TextType *text) +static void set_text_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, TextType *text) { set_text_cb_any(ctx, pcb, PCB_TYPE_TEXT, layer, text); } -static void set_poly_cb(void *ctx, PCBType *pcb, LayerType *layer, PolygonType *poly) +static void set_poly_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, PolygonType *poly) { set_ctx_t *st = (set_ctx_t *)ctx; @@ -323,7 +323,7 @@ } } -static void set_eline_cb(void *ctx, PCBType *pcb, ElementType *element, LineType *line) +static void set_eline_cb(void *ctx, pcb_board_t *pcb, ElementType *element, LineType *line) { set_ctx_t *st = (set_ctx_t *)ctx; @@ -335,7 +335,7 @@ } } -static void set_earc_cb(void *ctx, PCBType *pcb, ElementType *element, ArcType *arc) +static void set_earc_cb(void *ctx, pcb_board_t *pcb, ElementType *element, ArcType *arc) { set_ctx_t *st = (set_ctx_t *)ctx; @@ -347,12 +347,12 @@ } } -static void set_etext_cb(void *ctx, PCBType *pcb, ElementType *element, TextType *text) +static void set_etext_cb(void *ctx, pcb_board_t *pcb, ElementType *element, TextType *text) { set_text_cb_any(ctx, pcb, PCB_TYPE_ELEMENT_NAME, element, text); } -static void set_epin_cb(void *ctx, PCBType *pcb, ElementType *element, PinType *pin) +static void set_epin_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PinType *pin) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 6; @@ -377,7 +377,7 @@ ChangeObject2ndSize(PCB_TYPE_PIN, pin->Element, pin, NULL, st->c, st->c_absolute, pcb_false)) DONE; } -static void set_epad_cb(void *ctx, PCBType *pcb, ElementType *element, PadType *pad) +static void set_epad_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PadType *pad) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 6; @@ -393,7 +393,7 @@ ChangeObjectMaskSize(PCB_TYPE_PAD, pad->Element, pad, NULL, st->c, st->c_absolute)) DONE; } -static void set_via_cb(void *ctx, PCBType *pcb, PinType *via) +static void set_via_cb(void *ctx, pcb_board_t *pcb, PinType *via) { set_ctx_t *st = (set_ctx_t *)ctx; const char *pn = st->name + 6; @@ -486,61 +486,61 @@ st->del_cnt++; } -static void del_line_cb(void *ctx, PCBType *pcb, LayerType *layer, LineType *line) +static void del_line_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, LineType *line) { map_chk_skip(ctx, line); del_attr(ctx, &line->Attributes); } -static void del_arc_cb(void *ctx, PCBType *pcb, LayerType *layer, ArcType *arc) +static void del_arc_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, ArcType *arc) { map_chk_skip(ctx, arc); del_attr(ctx, &arc->Attributes); } -static void del_text_cb(void *ctx, PCBType *pcb, LayerType *layer, TextType *text) +static void del_text_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, TextType *text) { map_chk_skip(ctx, text); del_attr(ctx, &text->Attributes); } -static void del_poly_cb(void *ctx, PCBType *pcb, LayerType *layer, PolygonType *poly) +static void del_poly_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, PolygonType *poly) { map_chk_skip(ctx, poly); del_attr(ctx, &poly->Attributes); } -static void del_eline_cb(void *ctx, PCBType *pcb, ElementType *element, LineType *line) +static void del_eline_cb(void *ctx, pcb_board_t *pcb, ElementType *element, LineType *line) { map_chk_skip(ctx, line); del_attr(ctx, &line->Attributes); } -static void del_earc_cb(void *ctx, PCBType *pcb, ElementType *element, ArcType *arc) +static void del_earc_cb(void *ctx, pcb_board_t *pcb, ElementType *element, ArcType *arc) { map_chk_skip(ctx, arc); del_attr(ctx, &arc->Attributes); } -static void del_etext_cb(void *ctx, PCBType *pcb, ElementType *element, TextType *text) +static void del_etext_cb(void *ctx, pcb_board_t *pcb, ElementType *element, TextType *text) { map_chk_skip(ctx, text); del_attr(ctx, &text->Attributes); } -static void del_epin_cb(void *ctx, PCBType *pcb, ElementType *element, PinType *pin) +static void del_epin_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PinType *pin) { map_chk_skip(ctx, pin); del_attr(ctx, &pin->Attributes); } -static void del_epad_cb(void *ctx, PCBType *pcb, ElementType *element, PadType *pad) +static void del_epad_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PadType *pad) { map_chk_skip(ctx, pad); del_attr(ctx, &pad->Attributes); } -static void del_via_cb(void *ctx, PCBType *pcb, PinType *via) +static void del_via_cb(void *ctx, pcb_board_t *pcb, PinType *via) { map_chk_skip(ctx, via); del_attr(ctx, &via->Attributes); Index: trunk/src_plugins/query/query_access.c =================================================================== --- trunk/src_plugins/query/query_access.c (revision 4753) +++ trunk/src_plugins/query/query_access.c (revision 4754) @@ -42,7 +42,7 @@ pcb_objlist_append(lst, o); \ } while(0) -static int list_layer_cb(void *ctx, PCBType *pcb, LayerType *layer, int enter) +static int list_layer_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, int enter) { if (enter) APPEND(ctx, PCB_OBJ_LAYER, layer, PCB_PARENT_DATA, pcb->Data); @@ -49,27 +49,27 @@ return 0; } -static void list_line_cb(void *ctx, PCBType *pcb, LayerType *layer, LineType *line) +static void list_line_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, LineType *line) { APPEND(ctx, PCB_OBJ_LINE, line, PCB_PARENT_LAYER, layer); } -static void list_arc_cb(void *ctx, PCBType *pcb, LayerType *layer, ArcType *arc) +static void list_arc_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, ArcType *arc) { APPEND(ctx, PCB_OBJ_ARC, arc, PCB_PARENT_LAYER, layer); } -static void list_text_cb(void *ctx, PCBType *pcb, LayerType *layer, TextType *text) +static void list_text_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, TextType *text) { APPEND(ctx, PCB_OBJ_TEXT, text, PCB_PARENT_LAYER, layer); } -static void list_poly_cb(void *ctx, PCBType *pcb, LayerType *layer, PolygonType *poly) +static void list_poly_cb(void *ctx, pcb_board_t *pcb, LayerType *layer, PolygonType *poly) { APPEND(ctx, PCB_OBJ_POLYGON, poly, PCB_PARENT_LAYER, layer); } -static int list_element_cb(void *ctx, PCBType *pcb, ElementType *element, int enter) +static int list_element_cb(void *ctx, pcb_board_t *pcb, ElementType *element, int enter) { if (enter) APPEND(ctx, PCB_OBJ_ELEMENT, element, PCB_PARENT_DATA, pcb->Data); @@ -76,32 +76,32 @@ return 0; } -static void list_eline_cb(void *ctx, PCBType *pcb, ElementType *element, LineType *line) +static void list_eline_cb(void *ctx, pcb_board_t *pcb, ElementType *element, LineType *line) { APPEND(ctx, PCB_OBJ_ELINE, line, PCB_PARENT_ELEMENT, element); } -static void list_earc_cb(void *ctx, PCBType *pcb, ElementType *element, ArcType *arc) +static void list_earc_cb(void *ctx, pcb_board_t *pcb, ElementType *element, ArcType *arc) { APPEND(ctx, PCB_OBJ_EARC, arc, PCB_PARENT_ELEMENT, element); } -static void list_etext_cb(void *ctx, PCBType *pcb, ElementType *element, TextType *text) +static void list_etext_cb(void *ctx, pcb_board_t *pcb, ElementType *element, TextType *text) { APPEND(ctx, PCB_OBJ_ETEXT, text, PCB_PARENT_ELEMENT, element); } -static void list_epin_cb(void *ctx, PCBType *pcb, ElementType *element, PinType *pin) +static void list_epin_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PinType *pin) { APPEND(ctx, PCB_OBJ_PIN, pin, PCB_PARENT_ELEMENT, element); } -static void list_epad_cb(void *ctx, PCBType *pcb, ElementType *element, PadType *pad) +static void list_epad_cb(void *ctx, pcb_board_t *pcb, ElementType *element, PadType *pad) { APPEND(ctx, PCB_OBJ_PAD, pad, PCB_PARENT_ELEMENT, element); } -static void list_via_cb(void *ctx, PCBType *pcb, PinType *via) +static void list_via_cb(void *ctx, pcb_board_t *pcb, PinType *via) { APPEND(ctx, PCB_OBJ_VIA, via, PCB_PARENT_DATA, pcb->Data); }