Index: trunk/src/obj_common.h =================================================================== --- trunk/src/obj_common.h (revision 14748) +++ trunk/src/obj_common.h (revision 14749) @@ -198,20 +198,6 @@ dst = conf_core.appearance.color.invisible_objects; \ } while(0) -/* compare two fields and return 0 if they are equal */ -#define pcb_field_neq(s1, s2, f) ((s1)->f != (s2)->f) - -/* hash relative x and y within an element */ -#define pcb_hash_element_ox(e, c) ((e) == NULL ? pcb_hash_coord(c) : pcb_hash_coord(c - e->MarkX)) -#define pcb_hash_element_oy(e, c) ((e) == NULL ? pcb_hash_coord(c) : pcb_hash_coord(c - e->MarkY)) - -#define pcb_hash_str(s) ((s) == NULL ? 0 : strhash(s)) - -#define pcb_element_offs(e,ef, s,sf) ((e == NULL) ? (s)->sf : ((s)->sf) - ((e)->ef)) -#define pcb_element_neq_offsx(e1, x1, e2, x2, f) (pcb_element_offs(e1, MarkX, x1, f) != pcb_element_offs(e2, MarkX, x2, f)) -#define pcb_element_neq_offsy(e1, y1, e2, y2, f) (pcb_element_offs(e1, MarkY, y1, f) != pcb_element_offs(e2, MarkY, y2, f)) - - /* check if an object has clearance to polygon */ #define PCB_POLY_HAS_CLEARANCE(ply) \ (PCB_FLAG_TEST(PCB_FLAG_CLEARPOLYPOLY, (ply)) && ((ply)->Clearance != 0)) Index: trunk/src/obj_hash.h =================================================================== --- trunk/src/obj_hash.h (revision 14748) +++ trunk/src/obj_hash.h (revision 14749) @@ -69,3 +69,16 @@ l = floor(ang); return murmurhash(&l, sizeof(l)); } + +#define pcb_hash_str(s) ((s) == NULL ? 0 : strhash(s)) + +/* hash relative x and y within an element */ +#define pcb_hash_element_ox(e, c) ((e) == NULL ? pcb_hash_coord(c) : pcb_hash_coord(c - e->MarkX)) +#define pcb_hash_element_oy(e, c) ((e) == NULL ? pcb_hash_coord(c) : pcb_hash_coord(c - e->MarkY)) + +/* compare two fields and return 0 if they are equal */ +#define pcb_field_neq(s1, s2, f) ((s1)->f != (s2)->f) + +#define pcb_element_offs(e,ef, s,sf) ((e == NULL) ? (s)->sf : ((s)->sf) - ((e)->ef)) +#define pcb_element_neq_offsx(e1, x1, e2, x2, f) (pcb_element_offs(e1, MarkX, x1, f) != pcb_element_offs(e2, MarkX, x2, f)) +#define pcb_element_neq_offsy(e1, y1, e2, y2, f) (pcb_element_offs(e1, MarkY, y1, f) != pcb_element_offs(e2, MarkY, y2, f))