Index: trunk/src/libcschem/cnc_obj.h =================================================================== --- trunk/src/libcschem/cnc_obj.h (revision 1949) +++ trunk/src/libcschem/cnc_obj.h (revision 1950) @@ -155,6 +155,27 @@ parent's sheet. Returns 0 on success. */ int csch_cobj_insert(csch_sheet_t *sheet, csch_cgrp_t *parent, csch_chdr_t *obj, csch_oid_t oid); +/* Returns whether the group is atomic (group parts are not directly editable) */ +csch_inline int csch_grp_is_atomic(csch_sheet_t *sheet, csch_cgrp_t *grp) +{ + if ((grp == NULL) || (grp == &sheet->direct) || (grp == &sheet->indirect)) + return 0; + + switch(grp->role) { + case CSCH_ROLE_invalid: + case CSCH_ROLE_WIRE_NET: + return 0; + case CSCH_ROLE_empty: /* the user groupped it for this specific reason */ + case CSCH_ROLE_BUS_NET: + case CSCH_ROLE_BUS_TERMINAL: + case CSCH_ROLE_HUB_POINT: + case CSCH_ROLE_TERMINAL: + case CSCH_ROLE_SYMBOL: + return 1; + } + return 0; +} + /* Returns 1 if obj is locked for any reason (lock attribute, group-lock); this means obj should not be edited directly. */ csch_inline int csch_cobj_is_locked(csch_chdr_t *obj) Index: trunk/src/libcschem/concrete.c =================================================================== --- trunk/src/libcschem/concrete.c (revision 1949) +++ trunk/src/libcschem/concrete.c (revision 1950) @@ -135,26 +135,6 @@ return res; } -int csch_grp_is_atomic(csch_sheet_t *sheet, csch_cgrp_t *grp) -{ - if ((grp == NULL) || (grp == &sheet->direct) || (grp == &sheet->indirect)) - return 0; - - switch(grp->role) { - case CSCH_ROLE_invalid: - case CSCH_ROLE_WIRE_NET: - return 0; - case CSCH_ROLE_empty: /* the user groupped it for this specific reason */ - case CSCH_ROLE_BUS_NET: - case CSCH_ROLE_BUS_TERMINAL: - case CSCH_ROLE_HUB_POINT: - case CSCH_ROLE_TERMINAL: - case CSCH_ROLE_SYMBOL: - return 1; - } - return 0; -} - csch_comm_str_t csch_comm_str(csch_sheet_t *sheet, const char *str, int alloc) { csch_comm_str_t res; Index: trunk/src/libcschem/concrete.h =================================================================== --- trunk/src/libcschem/concrete.h (revision 1949) +++ trunk/src/libcschem/concrete.h (revision 1950) @@ -234,9 +234,6 @@ return ((obj != NULL) && ((obj->type == CSCH_CTYPE_GRP) || (obj->type == CSCH_CTYPE_GRP_REF))); } -/* Returns whether the group is atomic (group parts are not directly editable) */ -int csch_grp_is_atomic(csch_sheet_t *sheet, csch_cgrp_t *grp); - #define CSCH_ACT_SHEET ((csch_sheet_t *)argv[0].val.argv0.user_call_ctx) /* Call with new_val=1 after any sheet edit */ Index: trunk/src/libcschem/search.c =================================================================== --- trunk/src/libcschem/search.c (revision 1949) +++ trunk/src/libcschem/search.c (revision 1950) @@ -27,6 +27,7 @@ #include "config.h" #include "operation.h" #include "search.h" +#include "cnc_obj.h" typedef struct { csch_rtree_box_t *query; Index: trunk/src/sch-rnd/search.c =================================================================== --- trunk/src/sch-rnd/search.c (revision 1949) +++ trunk/src/sch-rnd/search.c (revision 1950) @@ -27,6 +27,7 @@ #include #include #include +#include #include "search.h" Index: trunk/src/sch-rnd/search.h =================================================================== --- trunk/src/sch-rnd/search.h (revision 1949) +++ trunk/src/sch-rnd/search.h (revision 1950) @@ -5,6 +5,7 @@ #include #include + #define CSCH_SLOP_ 5 #define csch_slop (CSCH_SLOP_ * P2C(rnd_pixel_slop)) Index: trunk/src/sch-rnd/select.c =================================================================== --- trunk/src/sch-rnd/select.c (revision 1949) +++ trunk/src/sch-rnd/select.c (revision 1950) @@ -29,7 +29,9 @@ #include #include #include +#include + #include "conf_core.h" #include "draw.h" #include "search.h"