Index: trunk/doc-rnd/hacking/renames =================================================================== --- trunk/doc-rnd/hacking/renames (revision 5009) +++ trunk/doc-rnd/hacking/renames (revision 5010) @@ -836,3 +836,10 @@ SearchScreenGridSlop -> pcb_search_grid_slop SearchObjectByID -> pcb_search_obj_by_id SearchElementByName -> pcb_search_elem_by_name +SelectObject -> pcb_select_object +SelectBlock -> pcb_select_block +ListBlock -> pcb_list_block +ObjectOperation -> pcb_object_operation +SelectedOperation -> pcb_selected_operation +SelectConnection -> pcb_select_connection +SelectObjectByName -> pcb_select_object_by_name Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 5009) +++ trunk/src/action_helper.c (revision 5010) @@ -332,7 +332,7 @@ box.X2 = Note.X - SLOP * pixel_slop; box.Y1 = Note.Y + SLOP * pixel_slop; box.Y2 = Note.Y - SLOP * pixel_slop; - Crosshair.drags = ListBlock(&box, &Crosshair.drags_len); + Crosshair.drags = pcb_list_block(&box, &Crosshair.drags_len); Crosshair.drags_current = 0; AttachForCopy(Note.X, Note.Y); } @@ -347,7 +347,7 @@ box.X2 = MAX_COORD; box.Y2 = MAX_COORD; /* unselect first if shift key not down */ - if (!gui->shift_is_pressed() && SelectBlock(&box, pcb_false)) + if (!gui->shift_is_pressed() && pcb_select_block(&box, pcb_false)) SetChangedFlag(pcb_true); pcb_notify_block(); Crosshair.AttachedBox.Point1.X = Note.X; @@ -373,7 +373,7 @@ SaveUndoSerialNumber(); /* unselect first if shift key not down */ if (!gui->shift_is_pressed()) { - if (SelectBlock(&box, pcb_false)) + if (pcb_select_block(&box, pcb_false)) SetChangedFlag(pcb_true); if (Note.Moving) { Note.Moving = 0; @@ -384,7 +384,7 @@ /* Restore the SN so that if we select something the deselect/select combo gets the same SN. */ RestoreUndoSerialNumber(); - if (SelectObject()) + if (pcb_select_object()) SetChangedFlag(pcb_true); else IncrementUndoSerialNumber(); /* We didn't select anything new, so, the deselection should get its own SN. */ @@ -410,7 +410,7 @@ box.Y2 = Crosshair.AttachedBox.Point2.Y; RestoreUndoSerialNumber(); - if (SelectBlock(&box, pcb_true)) + if (pcb_select_block(&box, pcb_true)) SetChangedFlag(pcb_true); else if (Bumped) IncrementUndoSerialNumber(); Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 5009) +++ trunk/src/buffer.c (revision 5010) @@ -123,7 +123,7 @@ pcb_notify_crosshair_change(pcb_false); ctx.buffer.src = PCB->Data; ctx.buffer.dst = Buffer->Data; - SelectedOperation(&AddBufferFunctions, &ctx, pcb_false, PCB_TYPEMASK_ALL); + pcb_selected_operation(&AddBufferFunctions, &ctx, pcb_false, PCB_TYPEMASK_ALL); /* set origin to passed or current position */ if (X || Y) { @@ -597,7 +597,7 @@ ctx.buffer.pcb = PCB; ctx.buffer.dst = Destination; ctx.buffer.src = Src; - return (ObjectOperation(&MoveBufferFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); + return (pcb_object_operation(&MoveBufferFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); } /* ---------------------------------------------------------------------- @@ -610,7 +610,7 @@ ctx.buffer.pcb = PCB; ctx.buffer.dst = Destination; ctx.buffer.src = Src; - return (ObjectOperation(&AddBufferFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); + return (pcb_object_operation(&AddBufferFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); } /* --------------------------------------------------------------------------- Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 5009) +++ trunk/src/change.c (revision 5010) @@ -360,7 +360,7 @@ ctx.chgtherm.pcb = PCB; ctx.chgtherm.style = therm_style; - change = SelectedOperation(&ChangeThermalFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeThermalFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -382,7 +382,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = SelectedOperation(&ChangeSizeFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeSizeFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -405,9 +405,9 @@ ctx.chgsize.delta = Difference; if (conf_core.editor.show_mask) - change = SelectedOperation(&ChangeMaskSizeFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeMaskSizeFunctions, &ctx, pcb_false, types); else - change = SelectedOperation(&ChangeClearSizeFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeClearSizeFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -429,7 +429,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = SelectedOperation(&Change2ndSizeFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&Change2ndSizeFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -448,7 +448,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ChangeJoinFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeJoinFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -467,7 +467,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&SetJoinFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&SetJoinFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -486,7 +486,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ClrJoinFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ClrJoinFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -505,7 +505,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ChangeNonetlistFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeNonetlistFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -525,7 +525,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&SetNonetlistFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&SetNonetlistFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -544,7 +544,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ClrNonetlistFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ClrNonetlistFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -564,7 +564,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ChangeSquareFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeSquareFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -586,7 +586,7 @@ ctx.chgangle.absolute = (fixIt) ? Difference : 0; ctx.chgangle.delta = Difference; - change = SelectedOperation(&ChangeAngleFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeAngleFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -608,7 +608,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = SelectedOperation(&ChangeRadiusFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeRadiusFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -628,7 +628,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&SetSquareFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&SetSquareFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -647,7 +647,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ClrSquareFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ClrSquareFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -666,7 +666,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ChangeOctagonFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ChangeOctagonFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -685,7 +685,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&SetOctagonFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&SetOctagonFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -704,7 +704,7 @@ ctx.chgsize.pcb = PCB; - change = SelectedOperation(&ClrOctagonFunctions, &ctx, pcb_false, types); + change = pcb_selected_operation(&ClrOctagonFunctions, &ctx, pcb_false, types); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -770,7 +770,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = (ObjectOperation(&ChangeSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -792,7 +792,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = (ObjectOperation(&Change1stSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&Change1stSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -814,7 +814,7 @@ ctx.chgsize.absolute = (fixIt) ? r : 0; ctx.chgsize.delta = r; - change = (ObjectOperation(&ChangeRadiusFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeRadiusFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -836,7 +836,7 @@ ctx.chgangle.absolute = (fixIt) ? a : 0; ctx.chgangle.delta = a; - change = (ObjectOperation(&ChangeAngleFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeAngleFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -860,9 +860,9 @@ ctx.chgsize.delta = Difference; if (conf_core.editor.show_mask) - change = (ObjectOperation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); else - change = (ObjectOperation(&ChangeClearSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeClearSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -883,7 +883,7 @@ ctx.chgtherm.pcb = PCB; ctx.chgtherm.style = therm_type; - change = (ObjectOperation(&ChangeThermalFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeThermalFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -905,7 +905,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = (ObjectOperation(&Change2ndSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&Change2ndSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); if (incundo) @@ -928,7 +928,7 @@ ctx.chgsize.absolute = (fixIt) ? Difference : 0; ctx.chgsize.delta = Difference; - change = (ObjectOperation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); + change = (pcb_object_operation(&ChangeMaskSizeFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL); if (change) { pcb_draw(); IncrementUndoSerialNumber(); @@ -951,7 +951,7 @@ ctx.chgname.pcb = PCB; ctx.chgname.new_name = Name; - result = ObjectOperation(&ChangeNameFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + result = pcb_object_operation(&ChangeNameFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); pcb_draw(); return (result); } @@ -971,7 +971,7 @@ ctx.chgname.pcb = PCB; ctx.chgname.new_name = Name; - result = ObjectOperation(&ChangePinnumFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + result = pcb_object_operation(&ChangePinnumFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); pcb_draw(); return (result); } @@ -986,7 +986,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ChangeJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ChangeJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1004,7 +1004,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&SetJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&SetJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1022,7 +1022,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ClrJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ClrJoinFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1040,7 +1040,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ChangeNonetlistFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ChangeNonetlistFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1059,7 +1059,7 @@ ctx.chgsize.pcb = PCB; ctx.chgsize.absolute = style; - if (ObjectOperation(&ChangeSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ChangeSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1077,7 +1077,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&SetSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&SetSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1095,7 +1095,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ClrSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ClrSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1113,7 +1113,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ChangeOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ChangeOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1131,7 +1131,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&SetOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&SetOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); @@ -1149,7 +1149,7 @@ ctx.chgsize.pcb = PCB; - if (ObjectOperation(&ClrOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { + if (pcb_object_operation(&ClrOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { pcb_draw(); IncrementUndoSerialNumber(); return (pcb_true); Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 5009) +++ trunk/src/copy.c (revision 5010) @@ -72,7 +72,7 @@ ctx.copy.DeltaY = DY; /* the subroutines add the objects to the undo-list */ - ptr = ObjectOperation(&CopyFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr = pcb_object_operation(&CopyFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); IncrementUndoSerialNumber(); return (ptr); } Index: trunk/src/insert.c =================================================================== --- trunk/src/insert.c (revision 5009) +++ trunk/src/insert.c (revision 5010) @@ -74,7 +74,7 @@ ctx.insert.forcible = Force; /* the operation insert the points to the undo-list */ - ptr = ObjectOperation(&InsertFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr = pcb_object_operation(&InsertFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); if (ptr != NULL) IncrementUndoSerialNumber(); return (ptr); Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 5009) +++ trunk/src/move.c (revision 5010) @@ -76,7 +76,7 @@ ctx.move.dx = DX; ctx.move.dy = DY; AddObjectToMoveUndoList(Type, Ptr1, Ptr2, Ptr3, DX, DY); - result = ObjectOperation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + result = pcb_object_operation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); return (result); } @@ -118,7 +118,7 @@ } AddObjectToMoveUndoList(Type, Ptr1, Ptr2, Ptr3, DX, DY); - ptr2 = ObjectOperation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr2 = pcb_object_operation(&MoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); IncrementUndoSerialNumber(); pcb_draw_inhibit_dec(); @@ -140,7 +140,7 @@ ctx.move.dst_layer = Target; ctx.move.more_to_come = enmasse; - result = ObjectOperation(&MoveToLayerFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + result = pcb_object_operation(&MoveToLayerFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); IncrementUndoSerialNumber(); return (result); } @@ -158,7 +158,7 @@ ctx.move.dst_layer = Target; ctx.move.more_to_come = pcb_true; - changed = SelectedOperation(&MoveToLayerFunctions, &ctx, pcb_true, PCB_TYPEMASK_ALL); + changed = pcb_selected_operation(&MoveToLayerFunctions, &ctx, pcb_true, PCB_TYPEMASK_ALL); /* passing pcb_true to above operation causes Undoserial to auto-increment */ return (changed); } Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 5009) +++ trunk/src/remove.c (revision 5010) @@ -81,7 +81,7 @@ ctx.remove.bulk = pcb_true; ctx.remove.destroy_target = NULL; - if (SelectedOperation(&RemoveFunctions, &ctx, pcb_false, PCB_TYPEMASK_ALL)) { + if (pcb_selected_operation(&RemoveFunctions, &ctx, pcb_false, PCB_TYPEMASK_ALL)) { IncrementUndoSerialNumber(); pcb_draw(); return (pcb_true); @@ -102,7 +102,7 @@ ctx.remove.bulk = pcb_false; ctx.remove.destroy_target = NULL; - ptr = ObjectOperation(&RemoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr = pcb_object_operation(&RemoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); return (ptr); } @@ -118,5 +118,5 @@ ctx.remove.bulk = pcb_false; ctx.remove.destroy_target = Target; - return (ObjectOperation(&DestroyFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); + return (pcb_object_operation(&DestroyFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3)); } Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 5009) +++ trunk/src/rotate.c (revision 5010) @@ -120,7 +120,7 @@ ptr++; } AddObjectToRotateUndoList(Type, Ptr1, Ptr2, Ptr3, ctx.rotate.center_x, ctx.rotate.center_y, ctx.rotate.number); - ptr2 = ObjectOperation(&RotateFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr2 = pcb_object_operation(&RotateFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); changed |= (ptr2 != NULL); if (changed) { pcb_draw(); Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 5009) +++ trunk/src/select.c (revision 5010) @@ -107,7 +107,7 @@ * toggles the selection of any kind of object * the different types are defined by search.h */ -pcb_bool SelectObject(void) +pcb_bool pcb_select_object(void) { void *ptr1, *ptr2, *ptr3; pcb_layer_t *layer; @@ -466,7 +466,7 @@ * Flag determines if the block is to be selected or unselected * returns pcb_true if the state of any object has changed */ -pcb_bool SelectBlock(pcb_box_t *Box, pcb_bool Flag) +pcb_bool pcb_select_block(pcb_box_t *Box, pcb_bool Flag) { /* do not list, set flag */ return (ListBlock_(Box, Flag, NULL) == NULL) ? pcb_false : pcb_true; @@ -475,7 +475,7 @@ /* ---------------------------------------------------------------------- * List all visible objects within the passed box */ -long int *ListBlock(pcb_box_t *Box, int *len) +long int *pcb_list_block(pcb_box_t *Box, int *len) { return ListBlock_(Box, 1, len); } @@ -484,7 +484,7 @@ * performs several operations on the passed object */ #warning TODO: maybe move this to operation.c -void *ObjectOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3) +void *pcb_object_operation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3) { switch (Type) { case PCB_TYPE_LINE: @@ -556,7 +556,7 @@ * resets the selected flag if requested * returns pcb_true if anything has changed */ -pcb_bool SelectedOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type) +pcb_bool pcb_selected_operation(pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type) { pcb_bool changed = pcb_false; @@ -724,7 +724,7 @@ * * text objects and elements cannot be selected by this routine */ -pcb_bool SelectConnection(pcb_bool Flag) +pcb_bool pcb_select_connection(pcb_bool Flag) { pcb_bool changed = pcb_false; @@ -831,7 +831,7 @@ return 0; } -pcb_bool SelectObjectByName(int Type, const char *name_pattern, pcb_bool Flag, pcb_search_method_t method) +pcb_bool pcb_select_object_by_name(int Type, const char *name_pattern, pcb_bool Flag, pcb_search_method_t method) { pcb_bool changed = pcb_false; const char **pat = NULL; @@ -993,7 +993,7 @@ } END_LOOP; - changed = SelectConnection(Flag) || changed; + changed = pcb_select_connection(Flag) || changed; changed = pcb_reset_conns(pcb_false) || changed; pcb_conn_lookup_uninit(); } Index: trunk/src/select.h =================================================================== --- trunk/src/select.h (revision 5009) +++ trunk/src/select.h (revision 5010) @@ -36,14 +36,14 @@ (PCB_TYPE_VIA | PCB_TYPE_LINE | PCB_TYPE_TEXT | PCB_TYPE_POLYGON | PCB_TYPE_ELEMENT | \ PCB_TYPE_PIN | PCB_TYPE_PAD | PCB_TYPE_ELEMENT_NAME | PCB_TYPE_RATLINE | PCB_TYPE_ARC) -pcb_bool SelectObject(void); -pcb_bool SelectBlock(pcb_box_t *, pcb_bool); -long int *ListBlock(pcb_box_t *Box, int *len); +pcb_bool pcb_select_object(void); +pcb_bool pcb_select_block(pcb_box_t *, pcb_bool); +long int *pcb_list_block(pcb_box_t *Box, int *len); -void *ObjectOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3); -pcb_bool SelectedOperation(pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type); +void *pcb_object_operation(pcb_opfunc_t *F, pcb_opctx_t *ctx, int Type, void *Ptr1, void *Ptr2, void *Ptr3); +pcb_bool pcb_selected_operation(pcb_opfunc_t *F, pcb_opctx_t *ctx, pcb_bool Reset, int type); -pcb_bool SelectConnection(pcb_bool); +pcb_bool pcb_select_connection(pcb_bool); typedef enum { @@ -51,7 +51,7 @@ SM_LIST = 1 } pcb_search_method_t; -pcb_bool SelectObjectByName(int, const char *, pcb_bool, pcb_search_method_t); +pcb_bool pcb_select_object_by_name(int, const char *, pcb_bool, pcb_search_method_t); /* New API */ Index: trunk/src/select_act.c =================================================================== --- trunk/src/select_act.c (revision 5009) +++ trunk/src/select_act.c (revision 5010) @@ -159,7 +159,7 @@ pcb_search_method_t method = SM_REGEX; if (pattern || (pattern = gui_get_pat(&method)) != NULL) { - if (SelectObjectByName(type, pattern, pcb_true, method)) + if (pcb_select_object_by_name(type, pattern, pcb_true, method)) SetChangedFlag(pcb_true); if (PCB_ACTION_ARG(1) == NULL) free((char*)pattern); @@ -170,7 +170,7 @@ /* select a single object */ case F_ToggleObject: case F_Object: - if (SelectObject()) + if (pcb_select_object()) SetChangedFlag(pcb_true); break; @@ -185,7 +185,7 @@ box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); pcb_notify_crosshair_change(pcb_false); pcb_notify_block(); - if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_true)) { + if (Crosshair.AttachedBox.State == STATE_THIRD && pcb_select_block(&box, pcb_true)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; } @@ -202,7 +202,7 @@ box.Y1 = -MAX_COORD; box.X2 = MAX_COORD; box.Y2 = MAX_COORD; - if (SelectBlock(&box, pcb_true)) + if (pcb_select_block(&box, pcb_true)) SetChangedFlag(pcb_true); break; } @@ -209,7 +209,7 @@ /* all found connections */ case F_Connection: - if (SelectConnection(pcb_true)) { + if (pcb_select_connection(pcb_true)) { pcb_draw(); IncrementUndoSerialNumber(); SetChangedFlag(pcb_true); @@ -318,7 +318,7 @@ pcb_search_method_t method = SM_REGEX; if (pattern || (pattern = gui_get_pat(&method)) != NULL) { - if (SelectObjectByName(type, pattern, pcb_false, method)) + if (pcb_select_object_by_name(type, pattern, pcb_false, method)) SetChangedFlag(pcb_true); if (PCB_ACTION_ARG(1) == NULL) free((char*)pattern); @@ -337,7 +337,7 @@ box.Y2 = MAX(Crosshair.AttachedBox.Point1.Y, Crosshair.AttachedBox.Point2.Y); pcb_notify_crosshair_change(pcb_false); pcb_notify_block(); - if (Crosshair.AttachedBox.State == STATE_THIRD && SelectBlock(&box, pcb_false)) { + if (Crosshair.AttachedBox.State == STATE_THIRD && pcb_select_block(&box, pcb_false)) { SetChangedFlag(pcb_true); Crosshair.AttachedBox.State = STATE_FIRST; } @@ -354,7 +354,7 @@ box.Y1 = -MAX_COORD; box.X2 = MAX_COORD; box.Y2 = MAX_COORD; - if (SelectBlock(&box, pcb_false)) + if (pcb_select_block(&box, pcb_false)) SetChangedFlag(pcb_true); break; } @@ -361,7 +361,7 @@ /* all found connections */ case F_Connection: - if (SelectConnection(pcb_false)) { + if (pcb_select_connection(pcb_false)) { pcb_draw(); IncrementUndoSerialNumber(); SetChangedFlag(pcb_true); Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 5009) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 5010) @@ -507,7 +507,7 @@ if (pcb_rat_seek_pad(entry, &conn, pcb_false)) pcb_rat_find_hook(conn.type, conn.ptr1, conn.ptr2, conn.ptr2, pcb_true, pcb_true); - SelectConnection(select_flag); + pcb_select_connection(select_flag); pcb_reset_conns(pcb_false); pcb_conn_lookup_uninit(); IncrementUndoSerialNumber(); Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 5009) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 5010) @@ -122,7 +122,7 @@ if (pcb_rat_seek_pad(entry, &conn, pcb_false)) pcb_rat_find_hook(conn.type, conn.ptr1, conn.ptr2, conn.ptr2, pcb_true, pcb_true); - SelectConnection(select_flag); + pcb_select_connection(select_flag); pcb_reset_conns(pcb_false); pcb_conn_lookup_uninit(); IncrementUndoSerialNumber();