Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5407) +++ trunk/doc-rnd/hacking/renames (revision 5408) @@ -1504,3 +1504,4 @@ ParseGroupString -> pcb_layer_parse_group_string GetLayerNumber -> pcb_layer_id GetGroupOfLayer -> pcb_layer_get_group +GetLayerGroupNumberByPointer -> pcb_layer_get_group_ Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 5407) +++ trunk/src/action_helper.c (revision 5408) @@ -801,8 +801,8 @@ /* place a via if vias are visible, the layer is in a new group since the last line and there isn't a pin already here */ - if (PCB->ViaOn && GetLayerGroupNumberByPointer(CURRENT) != - GetLayerGroupNumberByPointer(lastLayer) && + if (PCB->ViaOn && pcb_layer_get_group_(CURRENT) != + pcb_layer_get_group_(lastLayer) && pcb_search_obj_by_location(PCB_TYPEMASK_PIN, &ptr1, &ptr2, &ptr3, pcb_crosshair.AttachedLine.Point1.X, pcb_crosshair.AttachedLine.Point1.Y, Index: trunk/src/layer.c =================================================================== --- trunk/src/layer.c (revision 5407) +++ trunk/src/layer.c (revision 5408) @@ -383,7 +383,7 @@ /* --------------------------------------------------------------------------- * returns the layergroup number for the passed pointer */ -int GetLayerGroupNumberByPointer(pcb_layer_t *Layer) +int pcb_layer_get_group_(pcb_layer_t *Layer) { return (GetLayerGroupNumberByNumber(pcb_layer_id(PCB->Data, Layer))); } Index: trunk/src/layer.h =================================================================== --- trunk/src/layer.h (revision 5407) +++ trunk/src/layer.h (revision 5408) @@ -65,12 +65,9 @@ /* lookup the group to which a layer belongs to returns -1 if no group is found */ pcb_layergrp_id_t pcb_layer_get_group(pcb_layer_id_t Layer); +int pcb_layer_get_group_(pcb_layer_t *Layer); - - /************ OLD API - new code should not use these **************/ - -int GetLayerGroupNumberByPointer(pcb_layer_t *); int GetLayerGroupNumberByNumber(pcb_cardinal_t); Index: trunk/src/obj_line.c =================================================================== --- trunk/src/obj_line.c (revision 5407) +++ trunk/src/obj_line.c (revision 5408) @@ -538,8 +538,8 @@ DrawLine(ctx->move.dst_layer, newone); pcb_draw(); if (!PCB->ViaOn || ctx->move.more_to_come || - GetLayerGroupNumberByPointer(Layer) == - GetLayerGroupNumberByPointer(ctx->move.dst_layer) || TEST_SILK_LAYER(Layer) || TEST_SILK_LAYER(ctx->move.dst_layer)) + pcb_layer_get_group_(Layer) == + pcb_layer_get_group_(ctx->move.dst_layer) || TEST_SILK_LAYER(Layer) || TEST_SILK_LAYER(ctx->move.dst_layer)) return (newone); /* consider via at Point1 */ sb.X1 = newone->Point1.X - newone->Thickness / 2; Index: trunk/src/obj_text.c =================================================================== --- trunk/src/obj_text.c (revision 5407) +++ trunk/src/obj_text.c (revision 5408) @@ -361,7 +361,7 @@ textlist_remove(text); textlist_append(&Destination->Text, text); - if (GetLayerGroupNumberByNumber(pcb_solder_silk_layer) == GetLayerGroupNumberByPointer(Destination)) + if (GetLayerGroupNumberByNumber(pcb_solder_silk_layer) == pcb_layer_get_group_(Destination)) PCB_FLAG_SET(PCB_FLAG_ONSOLDER, text); else PCB_FLAG_CLEAR(PCB_FLAG_ONSOLDER, text); Index: trunk/src/rats.c =================================================================== --- trunk/src/rats.c (revision 5407) +++ trunk/src/rats.c (revision 5408) @@ -428,7 +428,7 @@ conn->type = PCB_TYPE_LINE; conn->ptr1 = layer; conn->ptr2 = line; - conn->group = GetLayerGroupNumberByPointer(layer); + conn->group = pcb_layer_get_group_(layer); conn->menu = NULL; /* agnostic view of where it belongs */ conn = pcb_rat_connection_alloc(a); conn->X = line->Point2.X; @@ -436,7 +436,7 @@ conn->type = PCB_TYPE_LINE; conn->ptr1 = layer; conn->ptr2 = line; - conn->group = GetLayerGroupNumberByPointer(layer); + conn->group = pcb_layer_get_group_(layer); conn->menu = NULL; } } @@ -452,7 +452,7 @@ conn->type = PCB_TYPE_POLYGON; conn->ptr1 = layer; conn->ptr2 = polygon; - conn->group = GetLayerGroupNumberByPointer(layer); + conn->group = pcb_layer_get_group_(layer); conn->menu = NULL; /* agnostic view of where it belongs */ } } Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 5407) +++ trunk/src_plugins/puller/puller.c (revision 5408) @@ -2282,9 +2282,9 @@ /* This canonicalizes all the lines, and cleans up near-misses. */ /* pcb_hid_actionl("djopt", "puller", 0); */ - current_is_solder = (GetLayerGroupNumberByPointer(CURRENT) + current_is_solder = (pcb_layer_get_group_(CURRENT) == GetLayerGroupNumberByNumber(pcb_solder_silk_layer)); - current_is_component = (GetLayerGroupNumberByPointer(CURRENT) + current_is_component = (pcb_layer_get_group_(CURRENT) == GetLayerGroupNumberByNumber(pcb_component_silk_layer)); lines = g_hash_table_new_full(NULL, NULL, NULL, (GDestroyNotify) FreeExtra); Index: trunk/src_plugins/rubberband_orig/rubberband.c =================================================================== --- trunk/src_plugins/rubberband_orig/rubberband.c (revision 5407) +++ trunk/src_plugins/rubberband_orig/rubberband.c (revision 5408) @@ -319,7 +319,7 @@ static void CheckLinePointForRat(rubber_ctx_t *rbnd, pcb_layer_t *Layer, pcb_point_t *Point) { struct rinfo info; - info.group = GetLayerGroupNumberByPointer(Layer); + info.group = pcb_layer_get_group_(Layer); info.point = Point; info.type = PCB_TYPE_LINE_POINT; info.rbnd = rbnd; @@ -384,7 +384,7 @@ info.X = LinePoint->X; info.Y = LinePoint->Y; - group = GetLayerGroupNumberByPointer(Layer); + group = pcb_layer_get_group_(Layer); GROUP_LOOP(PCB->Data, group); { /* check all visible lines of the group member */ @@ -420,7 +420,7 @@ info.X = ex; info.Y = ey; - group = GetLayerGroupNumberByPointer(Layer); + group = pcb_layer_get_group_(Layer); GROUP_LOOP(PCB->Data, group); { /* check all visible lines of the group member */ @@ -442,7 +442,7 @@ pcb_cardinal_t group; /* lookup layergroup and check all visible lines in this group */ - group = GetLayerGroupNumberByPointer(Layer); + group = pcb_layer_get_group_(Layer); GROUP_LOOP(PCB->Data, group); { if (layer->On) {