Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 4561) +++ trunk/src/Makefile.dep (revision 4562) @@ -14,7 +14,8 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h hid.h misc.h mymem.h create.h rtree.h \ undo.h move.h draw.h set.h polygon.h rtree.h math_helper.h plugins.h \ - obj_all.h obj_arc.h hid_actions.h dolists.h + obj_all.h obj_arc.h operation.h box.h move.h misc_util.h hid_actions.h \ + dolists.h ../src_plugins/autoplace/action.o: ../src_plugins/autoplace/action.c \ ../config.h ../src_plugins/autoplace/autoplace.h global_typedefs.h \ pcb_bool.h unit.h plugins.h set.h global_typedefs.h hid_actions.h hid.h \ @@ -29,7 +30,7 @@ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ list_arc.h list_text.h list_poly.h library.h rats_patch.h board.h \ vtonpoint.h ../src_plugins/autoplace/autoplace.h global_typedefs.h box.h \ - math_helper.h misc_util.h compat_misc.h compat_nls.h data.h \ + math_helper.h move.h misc_util.h compat_misc.h compat_nls.h data.h \ global_element.h list_pin.h list_pad.h list_element.h ht_element.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ @@ -65,15 +66,15 @@ layer.h crosshair.h rubberband.h vtonpoint.h hid.h error.h drc.h \ buffer.h macro.h ../src_plugins/autoroute/autoroute.h board.h const.h \ macro.h vtroutestyle.h library.h rats_patch.h board.h box.h \ - math_helper.h misc_util.h create.h draw.h error.h find.h heap.h rtree.h \ - misc.h mymem.h ../src_plugins/autoroute/mtspace.h \ + math_helper.h move.h misc_util.h create.h draw.h error.h find.h heap.h \ + rtree.h misc.h mymem.h ../src_plugins/autoroute/mtspace.h \ ../src_plugins/autoroute/vector.h mymem.h polygon.h rtree.h rats.h \ netlist.h route_style.h remove.h thermal.h undo.h pcb-printf.h set.h \ - layer.h compat_nls.h obj_all.h obj_arc.h ptrlist.h + layer.h compat_nls.h obj_all.h obj_arc.h operation.h ptrlist.h ../src_plugins/autoroute/mtspace.o: ../src_plugins/autoroute/mtspace.c \ ../config.h box.h math_helper.h global_typedefs.h pcb_bool.h unit.h \ global_objs.h ../src_3rd/genlist/gendlist.h attrib.h flag.h \ - globalconst.h polyarea.h macro.h misc_util.h heap.h rtree.h \ + globalconst.h polyarea.h macro.h move.h misc_util.h heap.h rtree.h \ ../src_plugins/autoroute/mtspace.h ../src_plugins/autoroute/vector.h ../src_plugins/autoroute/vector.o: ../src_plugins/autoroute/vector.c \ ../config.h math_helper.h ../src_plugins/autoroute/vector.h macro.h @@ -92,7 +93,7 @@ ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h hid.h misc.h mymem.h create.h rtree.h \ - undo.h plugins.h obj_all.h obj_arc.h hid_actions.h dolists.h + undo.h plugins.h obj_all.h obj_arc.h operation.h hid_actions.h dolists.h ../src_plugins/dbus/dbus-pcbmain.o: ../src_plugins/dbus/dbus-pcbmain.c \ ../config.h ../src_plugins/dbus/dbus-pcbmain.h hid.h error.h drc.h \ unit.h global_typedefs.h pcb_bool.h attrib.h @@ -176,7 +177,7 @@ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/genvector/vtp0.h list_conf.h \ - dolists.h + box.h math_helper.h move.h misc_util.h dolists.h ../src_plugins/djopt/djopt.o: ../src_plugins/djopt/djopt.c ../config.h \ conf_core.h conf.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ @@ -211,8 +212,9 @@ ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h misc.h mymem.h error.h buffer.h create.h \ - layer.h plugins.h compat_misc.h misc_util.h obj_all.h obj_arc.h hid.h \ - hid_attrib.h hid_nogui.h hid_draw_helpers.h hid_init.h hid_helper.h + layer.h plugins.h compat_misc.h misc_util.h obj_all.h obj_arc.h \ + operation.h hid.h hid_attrib.h hid_nogui.h hid_draw_helpers.h hid_init.h \ + hid_helper.h ../src_plugins/export_bom/bom.o: ../src_plugins/export_bom/bom.c \ ../config.h conf_core.h conf.h global_typedefs.h pcb_bool.h unit.h \ pcb-printf.h ../src_3rd/genvector/gds_char.h \ @@ -1032,7 +1034,7 @@ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h \ ../src_plugins/hid_gtk/win_place.h \ ../src_plugins/hid_gtk/gui-drc-window.h hid_actions.h compat_nls.h \ - obj_all.h obj_arc.h + obj_all.h obj_arc.h operation.h ../src_plugins/hid_gtk/gui-keyref-window.o: \ ../src_plugins/hid_gtk/gui-keyref-window.c ../config.h \ ../src_plugins/hid_gtk/gui.h board.h const.h macro.h global_typedefs.h \ @@ -1228,7 +1230,7 @@ ../src_plugins/hid_gtk/gui-pinout-preview.h \ ../src_plugins/hid_gtk/ghid-propedit.h event.h compat_misc.h \ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h copy.h draw.h mymem.h \ - move.h rotate.h obj_all.h obj_arc.h + move.h rotate.h obj_all.h obj_arc.h operation.h ../src_plugins/hid_gtk/gui-pinout-window.o: \ ../src_plugins/hid_gtk/gui-pinout-window.c ../config.h conf_core.h \ conf.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ @@ -1637,7 +1639,8 @@ ht_element.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h ../src_plugins/io_kicad/write.h layer.h \ - const.h netlist.h route_style.h misc.h mymem.h obj_all.h obj_arc.h + const.h netlist.h route_style.h misc.h mymem.h obj_all.h obj_arc.h \ + operation.h ../src_plugins/io_kicad_legacy/io_kicad_legacy.o: \ ../src_plugins/io_kicad_legacy/io_kicad_legacy.c ../config.h plugins.h \ plug_io.h library.h global_typedefs.h pcb_bool.h unit.h conf.h \ @@ -1677,7 +1680,7 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h ../src_plugins/io_kicad_legacy/write.h \ layer.h const.h netlist.h route_style.h misc.h mymem.h obj_all.h \ - obj_arc.h + obj_arc.h operation.h ../src_plugins/io_lihata/common.o: ../src_plugins/io_lihata/common.c \ ../config.h data.h globalconst.h global_typedefs.h pcb_bool.h unit.h \ global_objs.h ../src_3rd/genlist/gendlist.h attrib.h flag.h polyarea.h \ @@ -1724,7 +1727,7 @@ ../src_3rd/genvector/vtp0.h list_conf.h flag_str.h compat_misc.h macro.h \ error.h misc.h mymem.h misc_util.h layer.h create.h vtptr.h \ ../src_plugins/io_lihata/common.h polygon.h rtree.h math_helper.h \ - conf_core.h obj_all.h obj_arc.h + conf_core.h obj_all.h obj_arc.h operation.h ../src_plugins/io_lihata/write.o: ../src_plugins/io_lihata/write.c \ ../src_3rd/liblihata/tree.h ../src_3rd/liblihata/dom.h \ ../src_3rd/liblihata/lihata.h ../src_3rd/liblihata/parser.h \ @@ -2042,7 +2045,7 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h hid.h error.h \ drc.h buffer.h draw.h misc.h mymem.h move.h pcb-printf.h remove.h \ rtree.h flag_str.h undo.h layer.h plugins.h hid_actions.h misc_util.h \ - obj_all.h obj_arc.h dolists.h + obj_all.h obj_arc.h operation.h dolists.h ../src_plugins/query/basic_fnc.o: ../src_plugins/query/basic_fnc.c \ ../config.h data.h globalconst.h global_typedefs.h pcb_bool.h unit.h \ global_objs.h ../src_3rd/genlist/gendlist.h attrib.h flag.h polyarea.h \ @@ -2212,7 +2215,7 @@ misc.h mymem.h mymem.h rats.h rtree.h flag_str.h macro.h undo.h find.h \ draw.h pcb-printf.h plugins.h action_helper.h hid_actions.h misc_util.h \ ../src_plugins/report/report_conf.h conf.h compat_misc.h compat_nls.h \ - layer.h obj_all.h obj_arc.h ../src_3rd/genregex/regex_sei.h \ + layer.h obj_all.h obj_arc.h operation.h ../src_3rd/genregex/regex_sei.h \ ../src_3rd/genregex/regex_templ.h ../src_3rd/genregex/regex.h dolists.h \ ../src_plugins/report/report_conf_fields.h ../src_plugins/shand_cmd/command.o: ../src_plugins/shand_cmd/command.c \ @@ -2300,10 +2303,10 @@ ../src_3rd/genvector/genvector_undef.h hid.h error.h drc.h buffer.h \ macro.h ../src_plugins/toporouter/../autoroute/autoroute.h board.h \ const.h macro.h vtroutestyle.h library.h rats_patch.h board.h box.h \ - math_helper.h misc_util.h create.h draw.h error.h find.h heap.h rtree.h \ - misc.h mymem.h mymem.h polygon.h rtree.h rats.h netlist.h route_style.h \ - remove.h thermal.h undo.h ../src_3rd/gts/gts.h pcb-printf.h \ - ../src_3rd/genvector/gds_char.h compat_nls.h + math_helper.h move.h misc_util.h create.h draw.h error.h find.h heap.h \ + rtree.h misc.h mymem.h mymem.h polygon.h rtree.h rats.h netlist.h \ + route_style.h remove.h thermal.h undo.h ../src_3rd/gts/gts.h \ + pcb-printf.h ../src_3rd/genvector/gds_char.h compat_nls.h ../src_plugins/vendordrill/vendor.o: ../src_plugins/vendordrill/vendor.c \ ../config.h conf_core.h conf.h global_typedefs.h pcb_bool.h unit.h \ pcb-printf.h ../src_3rd/genvector/gds_char.h \ @@ -2473,7 +2476,7 @@ hid.h error.h drc.h buffer.h box.o: box.c ../config.h box.h math_helper.h global_typedefs.h pcb_bool.h \ unit.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h flag.h \ - globalconst.h polyarea.h macro.h misc_util.h + globalconst.h polyarea.h macro.h move.h misc_util.h buffer.o: buffer.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -2643,7 +2646,7 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h hid.h error.h \ drc.h buffer.h misc.h mymem.h rtree.h search.h rats.h netlist.h \ route_style.h misc_util.h undo.h plug_io.h stub_vendor.h hid_actions.h \ - paths.h compat_misc.h compat_nls.h obj_all.h obj_arc.h + paths.h compat_misc.h compat_nls.h obj_all.h obj_arc.h operation.h crosshair.o: crosshair.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -2656,13 +2659,13 @@ ../src_3rd/genlist/gendlist.h globalconst.h board.h const.h macro.h \ vtroutestyle.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h layer.h list_line.h list_arc.h list_text.h list_poly.h \ - library.h rats_patch.h vtonpoint.h box.h math_helper.h misc_util.h \ - crosshair.h rubberband.h hid.h error.h drc.h data.h global_element.h \ - list_pin.h list_pad.h list_element.h ht_element.h \ + library.h rats_patch.h vtonpoint.h box.h math_helper.h move.h \ + misc_util.h crosshair.h rubberband.h hid.h error.h drc.h data.h \ + global_element.h list_pin.h list_pad.h list_element.h ht_element.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/hash.h \ list_rat.h buffer.h draw.h line.h search.h rats.h netlist.h \ route_style.h polygon.h rtree.h misc.h mymem.h hid_actions.h \ - compat_misc.h compat_nls.h obj_all.h obj_arc.h + compat_misc.h compat_nls.h obj_all.h obj_arc.h operation.h data.o: data.c ../config.h board.h const.h macro.h global_typedefs.h \ pcb_bool.h unit.h vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h global_objs.h \ @@ -2675,7 +2678,7 @@ ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h mymem.h rtree.h list_common.h obj_all.h \ - obj_arc.h + obj_arc.h operation.h draw.o: draw.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -2693,7 +2696,7 @@ ht_element.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h draw.h misc.h mymem.h rotate.h rtree.h \ - draw_fab.h obj_all.h obj_arc.h + draw_fab.h obj_all.h obj_arc.h operation.h draw_fab.o: draw_fab.c ../config.h board.h const.h macro.h \ global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -2707,7 +2710,7 @@ ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h draw.h drill.h draw_fab.h obj_all.h \ - obj_arc.h + obj_arc.h operation.h drill.o: drill.c ../config.h data.h globalconst.h global_typedefs.h \ pcb_bool.h unit.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h global_element.h list_pin.h \ @@ -2775,8 +2778,9 @@ buffer.h draw.h find.h misc.h mymem.h rtree.h polygon.h search.h rats.h \ netlist.h library.h route_style.h vtroutestyle.h misc_util.h set.h \ undo.h plug_io.h hid_actions.h compat_misc.h obj_all.h obj_arc.h \ - find_geo.c macro.h find_lookup.c compat_nls.h board.h rats_patch.h \ - find_drc.c find_misc.c find_clear.c find_debug.c find_print.c + operation.h find_geo.c macro.h find_lookup.c compat_nls.h board.h \ + rats_patch.h find_drc.c find_misc.c find_clear.c find_debug.c \ + find_print.c find_act.o: find_act.c ../config.h board.h const.h macro.h \ global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -2959,7 +2963,7 @@ intersect.o: intersect.c ../config.h intersect.h global_typedefs.h \ pcb_bool.h unit.h box.h math_helper.h global_objs.h \ ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h polyarea.h \ - macro.h misc_util.h + macro.h move.h misc_util.h layer.o: layer.c ../config.h math_helper.h board.h const.h macro.h \ global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -3090,7 +3094,7 @@ ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h mirror.h misc.h mymem.h polygon.h rtree.h \ - math_helper.h obj_all.h obj_arc.h + math_helper.h obj_all.h obj_arc.h operation.h misc.o: misc.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -3103,12 +3107,12 @@ ../src_3rd/genlist/gendlist.h globalconst.h board.h const.h macro.h \ vtroutestyle.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h layer.h list_line.h list_arc.h list_text.h list_poly.h \ - library.h rats_patch.h vtonpoint.h box.h math_helper.h misc_util.h \ - crosshair.h rubberband.h hid.h error.h drc.h data.h global_element.h \ - list_pin.h list_pad.h list_element.h ht_element.h \ + library.h rats_patch.h vtonpoint.h box.h math_helper.h move.h \ + misc_util.h crosshair.h rubberband.h hid.h error.h drc.h data.h \ + global_element.h list_pin.h list_pad.h list_element.h ht_element.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/hash.h \ - list_rat.h buffer.h plug_io.h misc.h mymem.h move.h polygon.h rtree.h \ - rotate.h set.h undo.h compat_misc.h obj_all.h obj_arc.h + list_rat.h buffer.h plug_io.h misc.h mymem.h polygon.h rtree.h rotate.h \ + set.h undo.h compat_misc.h obj_all.h obj_arc.h operation.h misc_util.o: misc_util.c ../config.h misc_util.h pcb_bool.h unit.h move.o: move.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ @@ -3128,7 +3132,7 @@ list_rat.h crosshair.h hid.h error.h drc.h buffer.h draw.h misc.h \ mymem.h move.h polygon.h rtree.h math_helper.h search.h rats.h netlist.h \ route_style.h misc_util.h select.h operation.h undo.h hid_actions.h \ - compat_misc.h compat_nls.h obj_all.h obj_arc.h + compat_misc.h compat_nls.h box.h obj_all.h obj_arc.h mymem.o: mymem.c ../config.h data.h globalconst.h global_typedefs.h \ pcb_bool.h unit.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h global_element.h list_pin.h \ @@ -3141,7 +3145,7 @@ ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h error.h drc.h buffer.h \ mymem.h rtree.h rats_patch.h board.h const.h macro.h vtroutestyle.h \ - library.h list_common.h obj_all.h obj_arc.h + library.h list_common.h obj_all.h obj_arc.h operation.h netlist.o: netlist.c ../config.h board.h const.h macro.h \ global_typedefs.h pcb_bool.h unit.h vtroutestyle.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -3190,12 +3194,12 @@ ../src_3rd/genlist/gendlist.h ../src_3rd/genlist/gentdlist_undef.h \ list_pad.h list_line.h list_arc.h list_element.h ht_element.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ - ../src_3rd/liblihata/genht/hash.h buffer.h board.h const.h macro.h \ - vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \ + ../src_3rd/liblihata/genht/hash.h compat_nls.h buffer.h board.h const.h \ + macro.h vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h layer.h list_text.h list_poly.h \ library.h rats_patch.h vtonpoint.h data.h list_rat.h crosshair.h \ rubberband.h hid.h error.h drc.h rtree.h polygon.h math_helper.h box.h \ - misc_util.h undo.h create.h + move.h misc_util.h undo.h rotate.h obj_arc.h operation.h create.h draw.h object_act.o: object_act.c ../config.h conf_core.h conf.h \ global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ @@ -3215,7 +3219,7 @@ rats_patch.h action_helper.h change.h undo.h funchash_core.h funchash.h \ funchash_core_list.h search.h rats.h netlist.h route_style.h misc_util.h \ move.h draw.h mirror.h rotate.h set.h copy.h misc.h mymem.h remove.h \ - create.h compat_misc.h compat_nls.h obj_all.h obj_arc.h + create.h compat_misc.h compat_nls.h obj_all.h obj_arc.h operation.h paths.o: paths.c ../config.h paths.h error.h conf_core.h conf.h \ global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ @@ -3294,13 +3298,13 @@ ../src_3rd/genlist/gendlist.h globalconst.h board.h const.h macro.h \ vtroutestyle.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h layer.h list_line.h list_arc.h list_text.h list_poly.h \ - library.h rats_patch.h vtonpoint.h box.h math_helper.h misc_util.h \ - create.h rubberband.h data.h global_element.h list_pin.h list_pad.h \ - list_element.h ht_element.h ../src_3rd/liblihata/genht/ht.h \ + library.h rats_patch.h vtonpoint.h box.h math_helper.h move.h \ + misc_util.h create.h rubberband.h data.h global_element.h list_pin.h \ + list_pad.h list_element.h ht_element.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h hid.h error.h \ drc.h buffer.h draw.h polygon.h rtree.h remove.h search.h rats.h \ netlist.h route_style.h set.h thermal.h mymem.h undo.h misc.h \ - compat_nls.h obj_all.h obj_arc.h + compat_nls.h obj_all.h obj_arc.h operation.h polygon1.o: polygon1.c ../config.h rtree.h global_typedefs.h pcb_bool.h \ unit.h math_helper.h heap.h compat_cc.h pcb-printf.h \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ @@ -3466,12 +3470,12 @@ ../src_3rd/genlist/gendlist.h globalconst.h board.h const.h macro.h \ vtroutestyle.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h \ flag.h polyarea.h layer.h list_line.h list_arc.h list_text.h list_poly.h \ - library.h rats_patch.h vtonpoint.h box.h math_helper.h misc_util.h \ - data.h global_element.h list_pin.h list_pad.h list_element.h \ + library.h rats_patch.h vtonpoint.h box.h math_helper.h move.h \ + misc_util.h data.h global_element.h list_pin.h list_pad.h list_element.h \ ht_element.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h find.h polygon.h rtree.h search.h rats.h \ - netlist.h route_style.h obj_all.h obj_arc.h + netlist.h route_style.h obj_all.h obj_arc.h operation.h select.o: select.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -3561,7 +3565,7 @@ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/genvector/vtp0.h list_conf.h \ - compat_misc.h compat_nls.h obj_all.h obj_arc.h + compat_misc.h compat_nls.h obj_all.h obj_arc.h operation.h undo_act.o: undo_act.c ../config.h conf_core.h conf.h global_typedefs.h \ pcb_bool.h unit.h pcb-printf.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ @@ -3580,7 +3584,7 @@ hid.h error.h drc.h buffer.h action_helper.h funchash_core.h funchash.h \ funchash_core_list.h undo.h polygon.h rtree.h math_helper.h set.h \ search.h rats.h netlist.h route_style.h misc_util.h draw.h misc.h \ - mymem.h obj_all.h obj_arc.h + mymem.h obj_all.h obj_arc.h operation.h unit.o: unit.c ../config.h const.h compat_misc.h compat_nls.h unit.h vtlibrary.o: vtlibrary.c vtlibrary.h global_objs.h \ ../src_3rd/genlist/gendlist.h ../config.h attrib.h flag.h globalconst.h \ Index: trunk/src/box.h =================================================================== --- trunk/src/box.h (revision 4561) +++ trunk/src/box.h (revision 4562) @@ -40,6 +40,7 @@ #include "global_objs.h" #include "config.h" #include "macro.h" +#include "move.h" struct pcb_boxlist_s { pcb_cardinal_t BoxN, /* the number of boxes contained */ @@ -94,6 +95,13 @@ #define CENTER_Y(b) ((b).Y1 + ((b).Y2 - (b).Y1)/2) /* some useful box utilities. */ +#define MOVE_BOX_LOWLEVEL(b,dx,dy) \ + { \ + MOVE((b)->X1,(b)->Y1,(dx),(dy)) \ + MOVE((b)->X2,(b)->Y2,(dx),(dy)) \ + } + + typedef struct cheap_point { Coord X, Y; } CheapPointType; Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 4561) +++ trunk/src/copy.c (revision 4562) @@ -49,7 +49,6 @@ */ static void *CopyVia(pcb_opctx_t *ctx, PinTypePtr); static void *CopyLine(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr); -static void *CopyArc(pcb_opctx_t *ctx, LayerTypePtr, ArcTypePtr); static void *CopyText(pcb_opctx_t *ctx, LayerTypePtr, TextTypePtr); static void *CopyPolygon(pcb_opctx_t *ctx, LayerTypePtr, PolygonTypePtr); static void *CopyElement(pcb_opctx_t *ctx, ElementTypePtr); @@ -191,23 +190,6 @@ } /* --------------------------------------------------------------------------- - * copies an arc - */ -static void *CopyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) -{ - ArcTypePtr arc; - - arc = CreateNewArcOnLayer(Layer, Arc->X + ctx->copy.DeltaX, - Arc->Y + ctx->copy.DeltaY, Arc->Width, Arc->Height, Arc->StartAngle, - Arc->Delta, Arc->Thickness, Arc->Clearance, MaskFlags(Arc->Flags, PCB_FLAG_FOUND)); - if (!arc) - return (arc); - DrawArc(Layer, arc); - AddObjectToCreateUndoList(PCB_TYPE_ARC, Layer, arc, arc); - return (arc); -} - -/* --------------------------------------------------------------------------- * copies a text */ static void *CopyText(pcb_opctx_t *ctx, LayerTypePtr Layer, TextTypePtr Text) Index: trunk/src/create.c =================================================================== --- trunk/src/create.c (revision 4561) +++ trunk/src/create.c (revision 4562) @@ -53,7 +53,7 @@ */ /* current object ID; incremented after each creation of an object */ -static long int ID = 1; +long int ID = 1; pcb_bool pcb_create_be_lenient = pcb_false; @@ -464,49 +464,6 @@ } /* --------------------------------------------------------------------------- - * creates a new arc on a layer - */ -ArcTypePtr -CreateNewArcOnLayer(LayerTypePtr Layer, - Coord X1, Coord Y1, - Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, FlagType Flags) -{ - ArcTypePtr Arc; - - ARC_LOOP(Layer); - { - if (arc->X == X1 && arc->Y == Y1 && arc->Width == width && - NormalizeAngle(arc->StartAngle) == NormalizeAngle(sa) && arc->Delta == dir) - return (NULL); /* prevent stacked arcs */ - } - END_LOOP; - Arc = GetArcMemory(Layer); - if (!Arc) - return (Arc); - - Arc->ID = ID++; - Arc->Flags = Flags; - Arc->Thickness = Thickness; - Arc->Clearance = Clearance; - Arc->X = X1; - Arc->Y = Y1; - Arc->Width = width; - Arc->Height = height; - Arc->StartAngle = sa; - Arc->Delta = dir; - pcb_add_arc_on_layer(Layer, Arc); - return (Arc); -} - -void pcb_add_arc_on_layer(LayerType *Layer, ArcType *Arc) -{ - SetArcBoundingBox(Arc); - if (!Layer->arc_tree) - Layer->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); -} - -/* --------------------------------------------------------------------------- * creates a new polygon from the old formats rectangle data */ PolygonTypePtr CreateNewPolygonFromRectangle(LayerTypePtr Layer, Coord X1, Coord Y1, Coord X2, Coord Y2, FlagType Flags) Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 4561) +++ trunk/src/move.c (revision 4562) @@ -50,6 +50,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "layer.h" +#include "box.h" #include "obj_all.h" /* --------------------------------------------------------------------------- @@ -59,13 +60,11 @@ static void *MoveElement(pcb_opctx_t *ctx, ElementTypePtr); static void *MoveVia(pcb_opctx_t *ctx, PinTypePtr); static void *MoveLine(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr); -static void *MoveArc(pcb_opctx_t *ctx, LayerTypePtr, ArcTypePtr); static void *MoveText(pcb_opctx_t *ctx, LayerTypePtr, TextTypePtr); static void *MovePolygon(pcb_opctx_t *ctx, LayerTypePtr, PolygonTypePtr); static void *MoveLinePoint(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr, PointTypePtr); static void *MovePolygonPoint(pcb_opctx_t *ctx, LayerTypePtr, PolygonTypePtr, PointTypePtr); static void *MoveLineToLayer(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr); -static void *MoveArcToLayer(pcb_opctx_t *ctx, LayerTypePtr, ArcTypePtr); static void *MoveRatToLayer(pcb_opctx_t *ctx, RatTypePtr); static void *MoveTextToLayer(pcb_opctx_t *ctx, LayerTypePtr, TextTypePtr); static void *MovePolygonToLayer(pcb_opctx_t *ctx, LayerTypePtr, PolygonTypePtr); @@ -248,27 +247,6 @@ } /* --------------------------------------------------------------------------- - * moves an arc - */ -static void *MoveArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) -{ - RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - r_delete_entry(Layer->arc_tree, (BoxType *) Arc); - if (Layer->On) { - EraseArc(Arc); - MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); - DrawArc(Layer, Arc); - Draw(); - } - else { - MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); - } - r_insert_entry(Layer->arc_tree, (BoxType *) Arc, 0); - ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - return (Arc); -} - -/* --------------------------------------------------------------------------- * moves a text object */ static void *MoveText(pcb_opctx_t *ctx, LayerTypePtr Layer, TextTypePtr Text) @@ -394,52 +372,6 @@ } /* --------------------------------------------------------------------------- - * moves an arc between layers; lowlevel routines - */ -static void *MoveArcToLayerLowLevel(pcb_opctx_t *ctx, LayerType * Source, ArcType * arc, LayerType * Destination) -{ - r_delete_entry(Source->arc_tree, (BoxType *) arc); - - arclist_remove(arc); - arclist_append(&Destination->Arc, arc); - - if (!Destination->arc_tree) - Destination->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Destination->arc_tree, (BoxType *) arc, 0); - return arc; -} - - -/* --------------------------------------------------------------------------- - * moves an arc between layers - */ -static void *MoveArcToLayer(pcb_opctx_t *ctx, LayerType * Layer, ArcType * Arc) -{ - ArcTypePtr newone; - - if (TEST_FLAG(PCB_FLAG_LOCK, Arc)) { - Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); - return NULL; - } - if (ctx->move.dst_layer == Layer && Layer->On) { - DrawArc(Layer, Arc); - Draw(); - } - if (((long int) ctx->move.dst_layer == -1) || ctx->move.dst_layer == Layer) - return (Arc); - AddObjectToMoveToLayerUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); - RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); - if (Layer->On) - EraseArc(Arc); - newone = (ArcTypePtr) MoveArcToLayerLowLevel(ctx, Layer, Arc, ctx->move.dst_layer); - ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, ctx->move.dst_layer, Arc); - if (ctx->move.dst_layer->On) - DrawArc(ctx->move.dst_layer, newone); - Draw(); - return (newone); -} - -/* --------------------------------------------------------------------------- * moves a line between layers */ static void *MoveRatToLayer(pcb_opctx_t *ctx, RatType * Rat) Index: trunk/src/move.h =================================================================== --- trunk/src/move.h (revision 4561) +++ trunk/src/move.h (revision 4562) @@ -39,16 +39,13 @@ ((xs) += (deltax)); \ ((ys) += (deltay)); \ } -#define MOVE_BOX_LOWLEVEL(b,dx,dy) \ - { \ - MOVE((b)->X1,(b)->Y1,(dx),(dy)) \ - MOVE((b)->X2,(b)->Y2,(dx),(dy)) \ - } + #define MOVE_VIA_LOWLEVEL(v,dx,dy) \ { \ MOVE((v)->X,(v)->Y,(dx),(dy)) \ MOVE_BOX_LOWLEVEL(&((v)->BoundingBox),(dx),(dy)); \ } + #define MOVE_PIN_LOWLEVEL(p,dx,dy) \ { \ MOVE((p)->X,(p)->Y,(dx),(dy)) \ @@ -55,11 +52,6 @@ MOVE_BOX_LOWLEVEL(&((p)->BoundingBox),(dx),(dy)); \ } -#define MOVE_ARC_LOWLEVEL(a,dx,dy) \ - { \ - MOVE((a)->X,(a)->Y,(dx),(dy)) \ - MOVE_BOX_LOWLEVEL(&((a)->BoundingBox),(dx),(dy)); \ - } /* Rather than mode the line bounding box, we set it so the point bounding * boxes are updated too. */ Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (revision 4561) +++ trunk/src/obj_arc.c (revision 4562) @@ -29,6 +29,7 @@ #include "config.h" #include "global_objs.h" #include "global_element.h" +#include "compat_nls.h" #include "buffer.h" #include "board.h" #include "data.h" @@ -36,10 +37,15 @@ #include "polygon.h" #include "box.h" #include "undo.h" +#include "rotate.h" +#include "move.h" #include "obj_arc.h" - #include "create.h" +/* TODO: could be removed if draw.c could be split up */ +#include "draw.h" + + ArcTypePtr GetArcMemory(LayerType * layer) { ArcType *new_obj; @@ -166,7 +172,46 @@ } +/* creates a new arc on a layer */ +ArcType *CreateNewArcOnLayer(LayerTypePtr Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, FlagType Flags) +{ + ArcTypePtr Arc; + ARC_LOOP(Layer); + { + if (arc->X == X1 && arc->Y == Y1 && arc->Width == width && + NormalizeAngle(arc->StartAngle) == NormalizeAngle(sa) && arc->Delta == dir) + return (NULL); /* prevent stacked arcs */ + } + END_LOOP; + Arc = GetArcMemory(Layer); + if (!Arc) + return (Arc); + + Arc->ID = CreateIDGet(); + Arc->Flags = Flags; + Arc->Thickness = Thickness; + Arc->Clearance = Clearance; + Arc->X = X1; + Arc->Y = Y1; + Arc->Width = width; + Arc->Height = height; + Arc->StartAngle = sa; + Arc->Delta = dir; + pcb_add_arc_on_layer(Layer, Arc); + return (Arc); +} + +void pcb_add_arc_on_layer(LayerType *Layer, ArcType *Arc) +{ + SetArcBoundingBox(Arc); + if (!Layer->arc_tree) + Layer->arc_tree = r_create_tree(NULL, 0, 0); + r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); +} + + + void RemoveFreeArc(ArcType * data) { arclist_remove(data); @@ -367,3 +412,143 @@ return (NULL); return ChangeArcJoin(ctx, Layer, Arc); } + +/* copies an arc */ +void *CopyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) +{ + ArcTypePtr arc; + + arc = CreateNewArcOnLayer(Layer, Arc->X + ctx->copy.DeltaX, + Arc->Y + ctx->copy.DeltaY, Arc->Width, Arc->Height, Arc->StartAngle, + Arc->Delta, Arc->Thickness, Arc->Clearance, MaskFlags(Arc->Flags, PCB_FLAG_FOUND)); + if (!arc) + return (arc); + DrawArc(Layer, arc); + AddObjectToCreateUndoList(PCB_TYPE_ARC, Layer, arc, arc); + return (arc); +} + +/* moves an arc */ +void *MoveArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) +{ + RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); + r_delete_entry(Layer->arc_tree, (BoxType *) Arc); + if (Layer->On) { + EraseArc(Arc); + MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); + DrawArc(Layer, Arc); + Draw(); + } + else { + MOVE_ARC_LOWLEVEL(Arc, ctx->move.dx, ctx->move.dy); + } + r_insert_entry(Layer->arc_tree, (BoxType *) Arc, 0); + ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); + return (Arc); +} + +/* moves an arc between layers; lowlevel routines */ +void *MoveArcToLayerLowLevel(pcb_opctx_t *ctx, LayerType * Source, ArcType * arc, LayerType * Destination) +{ + r_delete_entry(Source->arc_tree, (BoxType *) arc); + + arclist_remove(arc); + arclist_append(&Destination->Arc, arc); + + if (!Destination->arc_tree) + Destination->arc_tree = r_create_tree(NULL, 0, 0); + r_insert_entry(Destination->arc_tree, (BoxType *) arc, 0); + return arc; +} + + +/* moves an arc between layers */ +void *MoveArcToLayer(pcb_opctx_t *ctx, LayerType * Layer, ArcType * Arc) +{ + ArcTypePtr newone; + + if (TEST_FLAG(PCB_FLAG_LOCK, Arc)) { + Message(PCB_MSG_DEFAULT, _("Sorry, the object is locked\n")); + return NULL; + } + if (ctx->move.dst_layer == Layer && Layer->On) { + DrawArc(Layer, Arc); + Draw(); + } + if (((long int) ctx->move.dst_layer == -1) || ctx->move.dst_layer == Layer) + return (Arc); + AddObjectToMoveToLayerUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); + RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, Arc); + if (Layer->On) + EraseArc(Arc); + newone = (ArcTypePtr) MoveArcToLayerLowLevel(ctx, Layer, Arc, ctx->move.dst_layer); + ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, ctx->move.dst_layer, Arc); + if (ctx->move.dst_layer->On) + DrawArc(ctx->move.dst_layer, newone); + Draw(); + return (newone); +} + +/* destroys an arc from a layer */ +void *DestroyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) +{ + r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + + RemoveFreeArc(Arc); + + return NULL; +} + +/* removes an arc from a layer */ +void *RemoveArc_op(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) +{ + /* erase from screen */ + if (Layer->On) { + EraseArc(Arc); + if (!ctx->remove.bulk) + Draw(); + } + MoveObjectToRemoveUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); + return NULL; +} + +void *RemoveArc(LayerTypePtr Layer, ArcTypePtr Arc) +{ + pcb_opctx_t ctx; + + ctx.remove.pcb = PCB; + ctx.remove.bulk = pcb_false; + ctx.remove.destroy_target = NULL; + + return RemoveArc_op(&ctx, Layer, Arc); +} + +/* rotates an arc */ +void RotateArcLowLevel(ArcTypePtr Arc, Coord X, Coord Y, unsigned Number) +{ + Coord save; + + /* add Number*90 degrees (i.e., Number quarter-turns) */ + Arc->StartAngle = NormalizeAngle(Arc->StartAngle + Number * 90); + ROTATE(Arc->X, Arc->Y, X, Y, Number); + + /* now change width and height */ + if (Number == 1 || Number == 3) { + save = Arc->Width; + Arc->Width = Arc->Height; + Arc->Height = save; + } + RotateBoxLowLevel(&Arc->BoundingBox, X, Y, Number); +} + +/* rotates an arc */ +void *RotateArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) +{ + EraseArc(Arc); + r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); + RotateArcLowLevel(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); + r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); + DrawArc(Layer, Arc); + Draw(); + return (Arc); +} Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (revision 4561) +++ trunk/src/obj_arc.h (revision 4562) @@ -39,8 +39,11 @@ BoxTypePtr GetArcEnds(ArcTypePtr Arc); void ChangeArcAngles(LayerTypePtr Layer, ArcTypePtr a, Angle new_sa, Angle new_da); void ChangeArcRadii(LayerTypePtr Layer, ArcTypePtr a, Coord new_width, Coord new_height); +void *RemoveArc(LayerTypePtr Layer, ArcTypePtr Arc); +ArcType *CreateNewArcOnLayer(LayerTypePtr Layer, Coord X1, Coord Y1, Coord width, Coord height, Angle sa, Angle dir, Coord Thickness, Coord Clearance, FlagType Flags); +void pcb_add_arc_on_layer(LayerType *Layer, ArcType *Arc); +void RotateArcLowLevel(ArcTypePtr Arc, Coord X, Coord Y, unsigned Number); - /*** Operations ***/ void *AddArcToBuffer(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); void *MoveArcToBuffer(pcb_opctx_t *ctx, LayerType *layer, ArcType *arc); @@ -51,7 +54,19 @@ void *ChangeArcJoin(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); void *SetArcJoin(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); void *ClrArcJoin(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +void *CopyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +void *MoveArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +void *MoveArcToLayerLowLevel(pcb_opctx_t *ctx, LayerType * Source, ArcType * arc, LayerType * Destination); +void *MoveArcToLayer(pcb_opctx_t *ctx, LayerType * Layer, ArcType * Arc); +void *DestroyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +void *RemoveArc_op(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +void *RotateArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); +#define MOVE_ARC_LOWLEVEL(a,dx,dy) \ + { \ + MOVE((a)->X,(a)->Y,(dx),(dy)) \ + MOVE_BOX_LOWLEVEL(&((a)->BoundingBox),(dx),(dy)); \ + } #define ARC_LOOP(element) do { \ ArcType *arc; \ Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 4561) +++ trunk/src/remove.c (revision 4562) @@ -51,7 +51,6 @@ static void *DestroyVia(pcb_opctx_t *ctx, PinTypePtr); static void *DestroyRat(pcb_opctx_t *ctx, RatTypePtr); static void *DestroyLine(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr); -static void *DestroyArc(pcb_opctx_t *ctx, LayerTypePtr, ArcTypePtr); static void *DestroyText(pcb_opctx_t *ctx, LayerTypePtr, TextTypePtr); static void *DestroyPolygon(pcb_opctx_t *ctx, LayerTypePtr, PolygonTypePtr); static void *DestroyElement(pcb_opctx_t *ctx, ElementTypePtr); @@ -64,7 +63,6 @@ static void *RemoveElement_op(pcb_opctx_t *ctx, ElementTypePtr Element); static void *RemoveLine_op(pcb_opctx_t *ctx, LayerTypePtr Layer, LineTypePtr Line); -static void *RemoveArc_op(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc); static void *RemoveText_op(pcb_opctx_t *ctx, LayerTypePtr Layer, TextTypePtr Text); static void *RemovePolygon_op(pcb_opctx_t *ctx, LayerTypePtr Layer, PolygonTypePtr Polygon); @@ -136,18 +134,6 @@ } /* --------------------------------------------------------------------------- - * destroys an arc from a layer - */ -static void *DestroyArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) -{ - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); - - RemoveFreeArc(Arc); - - return NULL; -} - -/* --------------------------------------------------------------------------- * destroys a polygon from a layer */ static void *DestroyPolygon(pcb_opctx_t *ctx, LayerTypePtr Layer, PolygonTypePtr Polygon) @@ -360,35 +346,7 @@ return RemoveLine_op(&ctx, Layer, Line); } - /* --------------------------------------------------------------------------- - * removes an arc from a layer - */ -static void *RemoveArc_op(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) -{ - /* erase from screen */ - if (Layer->On) { - EraseArc(Arc); - if (!ctx->remove.bulk) - Draw(); - } - MoveObjectToRemoveUndoList(PCB_TYPE_ARC, Layer, Arc, Arc); - return NULL; -} - -void *RemoveArc(LayerTypePtr Layer, ArcTypePtr Arc) -{ - pcb_opctx_t ctx; - - ctx.remove.pcb = PCB; - ctx.remove.bulk = pcb_false; - ctx.remove.destroy_target = NULL; - - return RemoveArc_op(&ctx, Layer, Arc); -} - - -/* --------------------------------------------------------------------------- * removes a text from a layer */ static void *RemoveText_op(pcb_opctx_t *ctx, LayerTypePtr Layer, TextTypePtr Text) @@ -588,12 +546,13 @@ void *RemoveObject(int Type, void *Ptr1, void *Ptr2, void *Ptr3) { pcb_opctx_t ctx; + void *ptr; ctx.remove.pcb = PCB; ctx.remove.bulk = pcb_false; ctx.remove.destroy_target = NULL; - void *ptr = ObjectOperation(&RemoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); + ptr = ObjectOperation(&RemoveFunctions, &ctx, Type, Ptr1, Ptr2, Ptr3); return (ptr); } Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4561) +++ trunk/src/rotate.c (revision 4562) @@ -53,7 +53,6 @@ * some local prototypes */ static void *RotateText(pcb_opctx_t *ctx, LayerTypePtr, TextTypePtr); -static void *RotateArc(pcb_opctx_t *ctx, LayerTypePtr, ArcTypePtr); static void *RotateElement(pcb_opctx_t *ctx, ElementTypePtr); static void *RotateElementName(pcb_opctx_t *ctx, ElementTypePtr); static void *RotateLinePoint(pcb_opctx_t *ctx, LayerTypePtr, LineTypePtr, PointTypePtr); @@ -162,26 +161,6 @@ } /* --------------------------------------------------------------------------- - * rotates an arc - */ -void RotateArcLowLevel(ArcTypePtr Arc, Coord X, Coord Y, unsigned Number) -{ - Coord save; - - /* add Number*90 degrees (i.e., Number quarter-turns) */ - Arc->StartAngle = NormalizeAngle(Arc->StartAngle + Number * 90); - ROTATE(Arc->X, Arc->Y, X, Y, Number); - - /* now change width and height */ - if (Number == 1 || Number == 3) { - save = Arc->Width; - Arc->Width = Arc->Height; - Arc->Height = save; - } - RotateBoxLowLevel(&Arc->BoundingBox, X, Y, Number); -} - -/* --------------------------------------------------------------------------- * rotate an element in 90 degree steps */ void RotateElementLowLevel(DataTypePtr Data, ElementTypePtr Element, Coord X, Coord Y, unsigned Number) @@ -260,20 +239,6 @@ } /* --------------------------------------------------------------------------- - * rotates an arc - */ -static void *RotateArc(pcb_opctx_t *ctx, LayerTypePtr Layer, ArcTypePtr Arc) -{ - EraseArc(Arc); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) Arc); - RotateArcLowLevel(Arc, ctx->rotate.center_x, ctx->rotate.center_y, ctx->rotate.number); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) Arc, 0); - DrawArc(Layer, Arc); - Draw(); - return (Arc); -} - -/* --------------------------------------------------------------------------- * rotates an element */ static void *RotateElement(pcb_opctx_t *ctx, ElementTypePtr Element) Index: trunk/src/rotate.h =================================================================== --- trunk/src/rotate.h (revision 4561) +++ trunk/src/rotate.h (revision 4562) @@ -92,7 +92,6 @@ void RotateLineLowLevel(LineTypePtr, Coord, Coord, unsigned); -void RotateArcLowLevel(ArcTypePtr, Coord, Coord, unsigned); void RotateBoxLowLevel(BoxTypePtr, Coord, Coord, unsigned); void RotateTextLowLevel(TextTypePtr, Coord, Coord, unsigned); void RotatePolygonLowLevel(PolygonTypePtr, Coord, Coord, unsigned); Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4561) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4562) @@ -60,6 +60,7 @@ #include "polygon.h" #include "plugins.h" #include "obj_all.h" +#include "box.h" #include "hid_actions.h" static void *MyMoveViaLowLevel(DataType * Data, PinType * Via, Coord dx, Coord dy) Index: trunk/src_plugins/distaligntext/distaligntext.c =================================================================== --- trunk/src_plugins/distaligntext/distaligntext.c (revision 4561) +++ trunk/src_plugins/distaligntext/distaligntext.c (revision 4562) @@ -39,6 +39,7 @@ #include "action_helper.h" #include "hid_actions.h" #include "conf_core.h" +#include "box.h" #define ARG(n) (argc > (n) ? argv[n] : 0)