Index: obj_padstack.h =================================================================== --- obj_padstack.h (.../obj_padstack.h) (revision 12594) +++ obj_padstack.h (.../obj_pstk.h) (revision 12595) @@ -26,11 +26,11 @@ #include "obj_common.h" /* The actual padstack is just a reference to a padstack proto within the same data */ -struct pcb_padstack_s { +struct pcb_pstk_s { #define thermal thermal_dont_use PCB_ANYOBJECTFIELDS; #undef thermal - pcb_cardinal_t proto; /* reference to a pcb_padstack_proto_t within pcb_data_t */ + pcb_cardinal_t proto; /* reference to a pcb_pstk_proto_t within pcb_data_t */ int protoi; /* index of the transformed proto; -1 means invalid; local cache, not saved */ pcb_coord_t x, y; pcb_coord_t Clearance; @@ -53,10 +53,10 @@ #define PCB_PADSTACK_INVALID ((pcb_cardinal_t)(-1)) #include "obj_common.h" -#include "obj_padstack_shape.h" +#include "obj_pstk_shape.h" #include "vtpadstack_t.h" -typedef struct pcb_padstack_proto_s { +typedef struct pcb_pstk_proto_s { unsigned in_use:1; /* 1 if the slot is in use */ unsigned hplated:1; /* if > 0, whether the hole is plated */ @@ -68,78 +68,78 @@ /* local cache - not saved */ unsigned long hash; /* optimization: linear search compare speeded up: go into detailed match only if hash matches */ pcb_data_t *parent; -} pcb_padstack_proto_t; +} pcb_pstk_proto_t; -pcb_padstack_t *pcb_padstack_alloc(pcb_data_t *data); -void pcb_padstack_free(pcb_padstack_t *ps); -pcb_padstack_t *pcb_padstack_new(pcb_data_t *data, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags); -void pcb_padstack_add(pcb_data_t *data, pcb_padstack_t *ps); -void pcb_padstack_bbox(pcb_padstack_t *ps); +pcb_pstk_t *pcb_pstk_alloc(pcb_data_t *data); +void pcb_pstk_free(pcb_pstk_t *ps); +pcb_pstk_t *pcb_pstk_new(pcb_data_t *data, pcb_cardinal_t proto, pcb_coord_t x, pcb_coord_t y, pcb_coord_t clearance, pcb_flag_t Flags); +void pcb_pstk_add(pcb_data_t *data, pcb_pstk_t *ps); +void pcb_pstk_bbox(pcb_pstk_t *ps); -void pcb_padstack_set_thermal(pcb_padstack_t *ps, unsigned long lid, unsigned char shape); -unsigned char *pcb_padstack_get_thermal(pcb_padstack_t *ps, unsigned long lid, pcb_bool_t alloc); +void pcb_pstk_set_thermal(pcb_pstk_t *ps, unsigned long lid, unsigned char shape); +unsigned char *pcb_pstk_get_thermal(pcb_pstk_t *ps, unsigned long lid, pcb_bool_t alloc); -pcb_padstack_t *pcb_padstack_by_id(pcb_data_t *base, long int ID); +pcb_pstk_t *pcb_pstk_by_id(pcb_data_t *base, long int ID); /* Undoably change the instance parameters of a padstack ref */ -int pcb_padstack_change_instance(pcb_padstack_t *ps, pcb_cardinal_t *proto, const pcb_coord_t *clearance, double *rot, int *xmirror); +int pcb_pstk_change_instance(pcb_pstk_t *ps, pcb_cardinal_t *proto, const pcb_coord_t *clearance, double *rot, int *xmirror); /*** proto ***/ /* allocate and return the next available group ID */ -unsigned long pcb_padstack_alloc_group(pcb_data_t *data); +unsigned long pcb_pstk_alloc_group(pcb_data_t *data); /* Convert selection or current buffer to padstack; returns PCB_PADSTACK_INVALID on error; looks for existing matching protos to avoid adding redundant entries */ -pcb_cardinal_t pcb_padstack_conv_selection(pcb_board_t *pcb, int quiet, pcb_coord_t ox, pcb_coord_t oy); -pcb_cardinal_t pcb_padstack_conv_buffer(int quiet); +pcb_cardinal_t pcb_pstk_conv_selection(pcb_board_t *pcb, int quiet, pcb_coord_t ox, pcb_coord_t oy); +pcb_cardinal_t pcb_pstk_conv_buffer(int quiet); /* free fields of a proto (not freeing the proto itself, not removing it from lists */ -void pcb_padstack_proto_free_fields(pcb_padstack_proto_t *dst); +void pcb_pstk_proto_free_fields(pcb_pstk_proto_t *dst); /* allocate the point array of a poly shape (single allocation for x and y) */ -void pcb_padstack_shape_alloc_poly(pcb_padstack_poly_t *poly, int len); +void pcb_pstk_shape_alloc_poly(pcb_pstk_poly_t *poly, int len); /* geometry for select.c and search.c */ -int pcb_padstack_near_box(pcb_padstack_t *ps, pcb_box_t *box); -int pcb_is_point_in_padstack(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, pcb_padstack_t *ps); +int pcb_pstk_near_box(pcb_pstk_t *ps, pcb_box_t *box); +int pcb_is_point_in_pstk(pcb_coord_t x, pcb_coord_t y, pcb_coord_t radius, pcb_pstk_t *ps); /* Check if padstack has the proper clearance against polygon; returns 0 if everything's fine */ -int pcb_padstack_drc_check_clearance(pcb_padstack_t *ps, pcb_poly_t *polygon, pcb_coord_t min_clr); +int pcb_pstk_drc_check_clearance(pcb_pstk_t *ps, pcb_poly_t *polygon, pcb_coord_t min_clr); /* Check all possible local drc errors regarding to pad stacks - errors that depend only on the padstack, not on other objects. Return 0 if everything was fine */ -int pcb_padstack_drc_check_and_warn(pcb_padstack_t *ps); +int pcb_pstk_drc_check_and_warn(pcb_pstk_t *ps); /* Generate poly->pa (which should be NULL at the time of call) */ -void pcb_padstack_shape_update_pa(pcb_padstack_poly_t *poly); +void pcb_pstk_shape_update_pa(pcb_pstk_poly_t *poly); /* Insert proto into the cache of data; if it's already in, return the existing ID, else dup it and insert it. */ -pcb_cardinal_t pcb_padstack_proto_insert_dup(pcb_data_t *data, const pcb_padstack_proto_t *proto, int quiet); +pcb_cardinal_t pcb_pstk_proto_insert_dup(pcb_data_t *data, const pcb_pstk_proto_t *proto, int quiet); /* Change the non-NULL hole properties of a padstack proto; undoable. Returns 0 on success. */ -int pcb_padstack_proto_change_hole(pcb_padstack_proto_t *proto, const int *hplated, const pcb_coord_t *hdia, const int *htop, const int *hbottom); +int pcb_pstk_proto_change_hole(pcb_pstk_proto_t *proto, const int *hplated, const pcb_coord_t *hdia, const int *htop, const int *hbottom); /* Find or create a new transformed version of an existing proto */ -pcb_padstack_tshape_t *pcb_padstack_make_tshape(pcb_data_t *data, pcb_padstack_proto_t *proto, double rot, int xmirror, int *out_protoi); +pcb_pstk_tshape_t *pcb_pstk_make_tshape(pcb_data_t *data, pcb_pstk_proto_t *proto, double rot, int xmirror, int *out_protoi); /* Dee p copy a prototype */ -void pcb_padstack_proto_copy(pcb_padstack_proto_t *dst, const pcb_padstack_proto_t *src); +void pcb_pstk_proto_copy(pcb_pstk_proto_t *dst, const pcb_pstk_proto_t *src); /*** hash ***/ -unsigned int pcb_padstack_hash(const pcb_padstack_proto_t *p); -int pcb_padstack_eq(const pcb_padstack_proto_t *p1, const pcb_padstack_proto_t *p2); +unsigned int pcb_pstk_hash(const pcb_pstk_proto_t *p); +int pcb_pstk_eq(const pcb_pstk_proto_t *p1, const pcb_pstk_proto_t *p2); /*** loops ***/ #define PCB_PADSTACK_LOOP(top) do { \ - pcb_padstack_t *padstack; \ + pcb_pstk_t *padstack; \ gdl_iterator_t __it__; \ padstacklist_foreach(&(top)->padstack, &__it__, padstack) {