Index: change.c =================================================================== --- change.c (revision 15594) +++ change.c (revision 15595) @@ -126,19 +126,6 @@ NULL /* padstack */ }; -pcb_opfunc_t ChangeSquareFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_change_square, - NULL /* padstack */ -}; - static pcb_opfunc_t ChangeNonetlistFunctions = { NULL, NULL, @@ -165,19 +152,6 @@ NULL /* padstack */ }; -pcb_opfunc_t ChangeOctagonFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_change_octagon, - NULL /* padstack */ -}; - #warning padstack TODO: remove this code static pcb_opfunc_t ChangeMaskSizeFunctions = { NULL, @@ -192,19 +166,6 @@ NULL /* padstack */ }; -pcb_opfunc_t SetSquareFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_set_square, - NULL /* padstack */ -}; - static pcb_opfunc_t SetJoinFunctions = { pcb_lineop_set_join, pcb_textop_set_join, @@ -218,32 +179,6 @@ NULL /* padstack */ }; -pcb_opfunc_t SetOctagonFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_set_octagon, - NULL /* padstack */ -}; - -pcb_opfunc_t ClrSquareFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_clear_square, - NULL /* padstack */ -}; - static pcb_opfunc_t ClrJoinFunctions = { pcb_lineop_clear_join, pcb_textop_clear_join, @@ -257,19 +192,6 @@ NULL /* padstack */ }; -pcb_opfunc_t ClrOctagonFunctions = { - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - NULL, - pcb_subcop_clear_octagon, /* subc */ - NULL /* padstack */ -}; - static pcb_opfunc_t ChangeRadiusFunctions = { NULL, NULL, @@ -530,25 +452,6 @@ #endif /* ---------------------------------------------------------------------- - * changes the square-flag of all selected and visible pins or pads - * returns pcb_true if anything has changed - */ -pcb_bool pcb_chg_selected_square(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &ChangeSquareFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - -/* ---------------------------------------------------------------------- * changes the angle of all selected and visible object types * returns pcb_true if anything has changed */ @@ -593,101 +496,6 @@ } -/* ---------------------------------------------------------------------- - * sets the square-flag of all selected and visible pins or pads - * returns pcb_true if anything has changed - */ -pcb_bool pcb_set_selected_square(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &SetSquareFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - -/* ---------------------------------------------------------------------- - * clears the square-flag of all selected and visible pins or pads - * returns pcb_true if anything has changed - */ -pcb_bool pcb_clr_selected_square(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &ClrSquareFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - -/* ---------------------------------------------------------------------- - * changes the octagon-flag of all selected and visible padstacks - * returns pcb_true if anything has changed - */ -pcb_bool pcb_chg_selected_octagon(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &ChangeOctagonFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - -/* ---------------------------------------------------------------------- - * sets the octagon-flag of all selected and visible padstacks - * returns pcb_true if anything has changed - */ -pcb_bool pcb_set_selected_octagon(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &SetOctagonFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - -/* ---------------------------------------------------------------------- - * clears the octagon-flag of all selected and visible padstacks - * returns pcb_true if anything has changed - */ -pcb_bool pcb_clr_selected_octagon(int types) -{ - pcb_bool change = pcb_false; - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - change = pcb_selected_operation(PCB, PCB->Data, &ClrOctagonFunctions, &ctx, pcb_false, types); - if (change) { - pcb_draw(); - pcb_undo_inc_serial(); - } - return change; -} - #warning padstack TODO: remove this /* ---------------------------------------------------------------------- * changes the hole-flag of all selected and visible vias @@ -1008,115 +816,6 @@ } /* --------------------------------------------------------------------------- - * changes the square-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_chg_obj_square(int Type, void *Ptr1, void *Ptr2, void *Ptr3, int style) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - ctx.chgsize.value = style; - - if (pcb_object_operation(&ChangeSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- - * sets the square-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_set_obj_square(int Type, void *Ptr1, void *Ptr2, void *Ptr3) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - if (pcb_object_operation(&SetSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- - * clears the square-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_clr_obj_square(int Type, void *Ptr1, void *Ptr2, void *Ptr3) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - if (pcb_object_operation(&ClrSquareFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- - * changes the octagon-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_chg_obj_octagon(int Type, void *Ptr1, void *Ptr2, void *Ptr3) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - if (pcb_object_operation(&ChangeOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- - * sets the octagon-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_set_obj_octagon(int Type, void *Ptr1, void *Ptr2, void *Ptr3) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - if (pcb_object_operation(&SetOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- - * clears the octagon-flag of the passed object - * Returns pcb_true if anything is changed - */ -pcb_bool pcb_clr_obj_octagon(int Type, void *Ptr1, void *Ptr2, void *Ptr3) -{ - pcb_opctx_t ctx; - - ctx.chgsize.pcb = PCB; - - if (pcb_object_operation(&ClrOctagonFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3) != NULL) { - pcb_draw(); - pcb_undo_inc_serial(); - return pcb_true; - } - return pcb_false; -} - -/* --------------------------------------------------------------------------- * queries the user for a new object name and changes it * * The allocated memory isn't freed because the old string is used