Index: trunk/src/Makefile.dep =================================================================== --- trunk/src/Makefile.dep (revision 4549) +++ trunk/src/Makefile.dep (revision 4550) @@ -14,7 +14,7 @@ ../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 \ - hid_actions.h dolists.h + obj_all.h obj_arc.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 \ @@ -69,7 +69,7 @@ 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 ptrlist.h + layer.h compat_nls.h obj_all.h obj_arc.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 \ @@ -92,7 +92,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 hid_actions.h dolists.h + undo.h plugins.h obj_all.h obj_arc.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 @@ -130,8 +130,8 @@ ../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 \ conf.h error.h dolists.h -../src_plugins/diag/diag_conf.o: ../src_plugins/diag/diag_conf.c conf.h \ - ../config.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ +../src_plugins/diag/diag_conf.o: ../src_plugins/diag/diag_conf.c \ + ../config.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ @@ -211,8 +211,8 @@ ../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 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 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 \ @@ -267,14 +267,14 @@ compat_misc.h layer.h hid_attrib.h hid_flags.h hid_helper.h hid.h \ hid_init.h plugins.h ../src_plugins/export_gcode/curve.o: ../src_plugins/export_gcode/curve.c \ - ../src_plugins/export_gcode/potracelib.h \ + ../config.h ../src_plugins/export_gcode/potracelib.h \ ../src_plugins/export_gcode/lists.h ../src_plugins/export_gcode/curve.h \ - ../src_plugins/export_gcode/auxiliary.h ../config.h + ../src_plugins/export_gcode/auxiliary.h ../src_plugins/export_gcode/decompose.o: \ - ../src_plugins/export_gcode/decompose.c \ + ../src_plugins/export_gcode/decompose.c ../config.h \ ../src_plugins/export_gcode/potracelib.h \ ../src_plugins/export_gcode/curve.h \ - ../src_plugins/export_gcode/auxiliary.h ../config.h \ + ../src_plugins/export_gcode/auxiliary.h \ ../src_plugins/export_gcode/lists.h ../src_plugins/export_gcode/bitmap.h \ ../src_plugins/export_gcode/decompose.h ../src_plugins/export_gcode/gcode.o: ../src_plugins/export_gcode/gcode.c \ @@ -605,7 +605,7 @@ globalconst.h global_typedefs.h pcb_bool.h unit.h polyarea.h plugins.h \ compat_misc.h ../src_plugins/fp_wget/wget_common.o: \ - ../src_plugins/fp_wget/wget_common.c \ + ../src_plugins/fp_wget/wget_common.c ../config.h \ ../src_plugins/fp_wget/wget_common.h ../src_plugins/hid_batch/batch.o: ../src_plugins/hid_batch/batch.c \ ../config.h board.h const.h macro.h global_typedefs.h pcb_bool.h unit.h \ @@ -623,10 +623,10 @@ ../src_3rd/genvector/gds_char.h plugins.h compat_misc.h \ hid_draw_helpers.h hid_nogui.h hid_actions.h hid_init.h dolists.h ../src_plugins/hid_gtk/ghid-cell-renderer-visibility.o: \ - ../src_plugins/hid_gtk/ghid-cell-renderer-visibility.c \ - ../src_plugins/hid_gtk/gtkhid.h conf_hid.h conf.h ../config.h \ - global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ - ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ + ../src_plugins/hid_gtk/ghid-cell-renderer-visibility.c ../config.h \ + ../src_plugins/hid_gtk/gtkhid.h conf_hid.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ @@ -651,10 +651,10 @@ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h compat_nls.h \ ../src_plugins/hid_gtk/ghid-cell-renderer-visibility.h ../src_plugins/hid_gtk/ghid-coord-entry.o: \ - ../src_plugins/hid_gtk/ghid-coord-entry.c \ - ../src_plugins/hid_gtk/gtkhid.h conf_hid.h conf.h ../config.h \ - global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ - ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ + ../src_plugins/hid_gtk/ghid-coord-entry.c ../config.h \ + ../src_plugins/hid_gtk/gtkhid.h conf_hid.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ @@ -678,10 +678,10 @@ ../src_plugins/hid_gtk/ghid-propedit.h conf_core.h event.h compat_misc.h \ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h pcb-printf.h compat_nls.h ../src_plugins/hid_gtk/ghid-layer-selector.o: \ - ../src_plugins/hid_gtk/ghid-layer-selector.c \ - ../src_plugins/hid_gtk/gtkhid.h conf_hid.h conf.h ../config.h \ - global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ - ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ + ../src_plugins/hid_gtk/ghid-layer-selector.c ../config.h \ + ../src_plugins/hid_gtk/gtkhid.h conf_hid.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ @@ -710,7 +710,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/liblihata/genht/ht_inlines.h \ - ../src_plugins/hid_gtk/gtkhid.h conf_hid.h conf.h ../config.h \ + ../config.h ../src_plugins/hid_gtk/gtkhid.h conf_hid.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ @@ -734,9 +734,9 @@ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h pcb-printf.h misc_util.h \ error.h ../src_plugins/hid_gtk/gschem_accel_label.h ../src_plugins/hid_gtk/ghid-propedit.o: \ - ../src_plugins/hid_gtk/ghid-propedit.c ../src_plugins/hid_gtk/gui.h \ - ../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_plugins/hid_gtk/ghid-propedit.c ../config.h \ + ../src_plugins/hid_gtk/gui.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 \ ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h polyarea.h \ layer.h list_line.h ../src_3rd/genlist/gentdlist_impl.h \ @@ -790,7 +790,7 @@ set.h ../src_plugins/hid_gtk/ghid-search.o: \ ../src_plugins/hid_gtk/ghid-search.c ../src_3rd/genlist/gendlist.h \ - ../src_plugins/hid_gtk/gui.h ../config.h board.h const.h macro.h \ + ../config.h ../src_plugins/hid_gtk/gui.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 attrib.h flag.h \ @@ -818,13 +818,13 @@ hid_actions.h compat_nls.h misc_util.h \ ../src_plugins/hid_gtk/ghid-search-tab.h ../src_plugins/hid_gtk/gschem_accel_label.o: \ - ../src_plugins/hid_gtk/gschem_accel_label.c \ + ../src_plugins/hid_gtk/gschem_accel_label.c ../config.h \ ../src_plugins/hid_gtk/gschem_accel_label.h compat_nls.h ../src_plugins/hid_gtk/gtk_conf_list.o: \ - ../src_plugins/hid_gtk/gtk_conf_list.c \ - ../src_plugins/hid_gtk/gtk_conf_list.h conf.h ../config.h \ - global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ - ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ + ../src_plugins/hid_gtk/gtk_conf_list.c ../config.h \ + ../src_plugins/hid_gtk/gtk_conf_list.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/parser.h ../src_3rd/liblihata/genht/htsp.h \ @@ -1031,7 +1031,8 @@ ../src_plugins/hid_gtk/ghid-propedit.h event.h compat_misc.h \ ../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 + ../src_plugins/hid_gtk/gui-drc-window.h hid_actions.h compat_nls.h \ + obj_all.h obj_arc.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 \ @@ -1170,7 +1171,8 @@ ../src_plugins/hid_gtk/ghid-propedit.h event.h compat_misc.h \ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h create.h draw.h error.h \ find.h mymem.h rats.h netlist.h route_style.h remove.h search.h rats.h \ - misc_util.h select.h operation.h set.h undo.h hid_actions.h compat_nls.h + misc_util.h select.h operation.h set.h undo.h hid_actions.h compat_nls.h \ + obj_all.h obj_arc.h ../src_plugins/hid_gtk/gui-output-events.o: \ ../src_plugins/hid_gtk/gui-output-events.c ../config.h conf_core.h \ conf.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ @@ -1226,7 +1228,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 + move.h rotate.h obj_all.h obj_arc.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 \ @@ -1318,9 +1320,9 @@ ../src_plugins/hid_gtk/hid_gtk_conf.h conf.h ../src_plugins/hid_gtk/menu_lht.o: ../src_plugins/hid_gtk/menu_lht.c ../src_plugins/hid_gtk/win_place.o: ../src_plugins/hid_gtk/win_place.c \ - ../src_plugins/hid_gtk/win_place.h ../src_plugins/hid_gtk/gui.h \ - ../config.h board.h const.h macro.h global_typedefs.h pcb_bool.h unit.h \ - vtroutestyle.h ../src_3rd/genvector/genvector_impl.h \ + ../config.h ../src_plugins/hid_gtk/win_place.h \ + ../src_plugins/hid_gtk/gui.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 \ ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h polyarea.h \ layer.h list_line.h ../src_3rd/genlist/gentdlist_impl.h \ @@ -1449,8 +1451,8 @@ ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h hid.h error.h drc.h buffer.h \ find.h rats.h netlist.h library.h route_style.h vtroutestyle.h select.h \ - operation.h undo.h remove.h crosshair.h draw.h hid.h hid_actions.h \ - ../src_plugins/hid_lesstif/lesstif.h hid_cfg_input.h \ + operation.h undo.h remove.h crosshair.h draw.h obj_all.h obj_arc.h hid.h \ + hid_actions.h ../src_plugins/hid_lesstif/lesstif.h hid_cfg_input.h \ ../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/liblihata/genht/htip.h \ @@ -1499,7 +1501,7 @@ hid_nogui.h hid_actions.h hid_init.h hid_attrib.h hid_helper.h plugins.h \ dolists.h ../src_plugins/import_edif/edif.o: ../src_plugins/import_edif/edif.c \ - math_helper.h board.h ../config.h const.h macro.h global_typedefs.h \ + ../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 \ ../src_3rd/genvector/genvector_undef.h global_objs.h \ ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h polyarea.h \ @@ -1612,11 +1614,12 @@ create.h polygon.h rtree.h math_helper.h misc.h mymem.h misc_util.h \ conf_core.h move.h macro.h ../src_plugins/io_kicad/uniq_name.o: ../src_plugins/io_kicad/uniq_name.c \ - ../src_3rd/liblihata/genht/hash.h ../src_plugins/io_kicad/uniq_name.h \ - ../src_3rd/liblihata/genht/htsp.h ../src_3rd/liblihata/genht/ht.h \ - ../src_3rd/liblihata/genht/ht_inlines.h compat_misc.h ../config.h -../src_plugins/io_kicad/write.o: ../src_plugins/io_kicad/write.c board.h \ - ../config.h const.h macro.h global_typedefs.h pcb_bool.h unit.h \ + ../src_3rd/liblihata/genht/hash.h ../config.h \ + ../src_plugins/io_kicad/uniq_name.h ../src_3rd/liblihata/genht/htsp.h \ + ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ + compat_misc.h +../src_plugins/io_kicad/write.o: ../src_plugins/io_kicad/write.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 \ ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h polyarea.h \ @@ -1634,7 +1637,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 ../src_plugins/io_kicad/write.h layer.h \ - const.h netlist.h route_style.h misc.h mymem.h + const.h netlist.h route_style.h misc.h mymem.h obj_all.h obj_arc.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 \ @@ -1654,7 +1657,7 @@ list_text.h list_poly.h list_rat.h layer.h crosshair.h rubberband.h \ vtonpoint.h hid.h error.h drc.h buffer.h ../src_plugins/io_kicad_legacy/write.o: \ - ../src_plugins/io_kicad_legacy/write.c board.h ../config.h const.h \ + ../src_plugins/io_kicad_legacy/write.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 \ @@ -1673,7 +1676,8 @@ 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 ../src_plugins/io_kicad_legacy/write.h \ - layer.h const.h netlist.h route_style.h misc.h mymem.h + layer.h const.h netlist.h route_style.h misc.h mymem.h obj_all.h \ + obj_arc.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 \ @@ -1720,7 +1724,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 + conf_core.h obj_all.h obj_arc.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 \ @@ -1744,13 +1748,13 @@ ../src_3rd/liblhtpers/lhtpers.h ../src_plugins/io_lihata/io_lihata.h \ conf.h ../src_plugins/io_lihata/lht_conf.h ../src_plugins/io_lihata/write_style.o: \ - ../src_plugins/io_lihata/write_style.c \ + ../src_plugins/io_lihata/write_style.c ../config.h \ ../src_plugins/io_lihata/write_style.h ../src_3rd/liblhtpers/lhtpers.h \ ../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/liblihata/genht/ht_inlines.h -../src_plugins/io_pcb/attribs.o: ../src_plugins/io_pcb/attribs.c conf.h \ - ../config.h global_typedefs.h pcb_bool.h unit.h pcb-printf.h \ +../src_plugins/io_pcb/attribs.o: ../src_plugins/io_pcb/attribs.c \ + ../config.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 \ ../src_3rd/genvector/genvector_undef.h ../src_3rd/liblihata/lihata.h \ ../src_3rd/liblihata/dom.h ../src_3rd/liblihata/lihata.h \ @@ -1786,8 +1790,8 @@ compat_fs.h paths.h rats_patch.h hid_actions.h hid_flags.h \ ../src_plugins/io_pcb/flags.h global_objs.h \ ../src_plugins/io_pcb/attribs.h route_style.h -../src_plugins/io_pcb/flags.o: ../src_plugins/io_pcb/flags.c flag_str.h \ - global_objs.h ../src_3rd/genlist/gendlist.h ../config.h attrib.h flag.h \ +../src_plugins/io_pcb/flags.o: ../src_plugins/io_pcb/flags.c ../config.h \ + flag_str.h global_objs.h ../src_3rd/genlist/gendlist.h attrib.h flag.h \ globalconst.h global_typedefs.h pcb_bool.h unit.h polyarea.h \ ../src_plugins/io_pcb/flags.h global_objs.h const.h macro.h ../src_plugins/io_pcb/io_pcb.o: ../src_plugins/io_pcb/io_pcb.c \ @@ -1927,9 +1931,9 @@ ../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 \ - find.h misc.h mymem.h mymem.h polygon.h rtree.h math_helper.h rats.h \ - netlist.h route_style.h vtroutestyle.h search.h rats.h misc_util.h set.h \ - undo.h plugins.h compat_misc.h ../src_plugins/mincut/pcb-mincut/graph.h \ + find.h misc.h mymem.h mymem.h polygon.h rtree.h math_helper.h search.h \ + rats.h netlist.h route_style.h vtroutestyle.h misc_util.h set.h undo.h \ + plugins.h compat_misc.h rats.h ../src_plugins/mincut/pcb-mincut/graph.h \ ../src_plugins/mincut/pcb-mincut/../../../config.h \ ../src_plugins/mincut/pcb-mincut/solve.h \ ../src_plugins/mincut/pcb-mincut/graph.h conf.h \ @@ -1986,7 +1990,7 @@ rtree.h draw.h set.h polygon.h rtree.h math_helper.h misc.h mymem.h \ plugins.h hid_actions.h dolists.h ../src_plugins/propedit/propedit.o: ../src_plugins/propedit/propedit.c \ - plugins.h ../src_plugins/propedit/props.h global_typedefs.h ../config.h \ + plugins.h ../config.h ../src_plugins/propedit/props.h global_typedefs.h \ pcb_bool.h unit.h ../src_3rd/liblihata/genht/htsp.h \ ../src_3rd/liblihata/genht/ht.h ../src_3rd/liblihata/genht/ht_inlines.h \ ../src_3rd/liblihata/genht/ht.h ../src_plugins/propedit/propsel.h \ @@ -1995,7 +1999,7 @@ ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h error.h dolists.h ../src_plugins/propedit/props.o: ../src_plugins/propedit/props.c \ - ../src_plugins/propedit/props.h global_typedefs.h ../config.h pcb_bool.h \ + ../config.h ../src_plugins/propedit/props.h global_typedefs.h pcb_bool.h \ unit.h ../src_3rd/liblihata/genht/htsp.h ../src_3rd/liblihata/genht/ht.h \ ../src_3rd/liblihata/genht/ht_inlines.h ../src_3rd/liblihata/genht/ht.h \ ../src_plugins/propedit/propsel.h compat_misc.h pcb-printf.h \ @@ -2004,7 +2008,7 @@ global_typedefs.h attrib.h ../src_3rd/liblihata/genht/hash.h \ ../src_3rd/liblihata/genht/ht.c ../src_plugins/propedit/propsel.o: ../src_plugins/propedit/propsel.c \ - const.h data.h globalconst.h ../config.h global_typedefs.h pcb_bool.h \ + ../config.h const.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 \ ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \ @@ -2038,7 +2042,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 \ - dolists.h + obj_all.h obj_arc.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 \ @@ -2208,7 +2212,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 ../src_3rd/genregex/regex_sei.h \ + layer.h obj_all.h obj_arc.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 \ @@ -2282,8 +2286,8 @@ hid.h error.h drc.h buffer.h hid.h misc.h mymem.h create.h rtree.h \ undo.h plugins.h hid_actions.h dolists.h ../src_plugins/toporouter/toporouter.o: \ - ../src_plugins/toporouter/toporouter.c \ - ../src_plugins/toporouter/toporouter.h data.h globalconst.h ../config.h \ + ../src_plugins/toporouter/toporouter.c ../config.h \ + ../src_plugins/toporouter/toporouter.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 ../src_3rd/genlist/gentdlist_impl.h \ @@ -2452,7 +2456,8 @@ insert.h line.h misc.h mymem.h move.h polygon.h rtree.h math_helper.h \ remove.h rotate.h search.h rats.h netlist.h route_style.h misc_util.h \ select.h operation.h set.h undo.h stub_stroke.h funchash_core.h \ - funchash.h funchash_core_list.h hid_actions.h compat_misc.h compat_nls.h + funchash.h funchash_core_list.h hid_actions.h compat_misc.h compat_nls.h \ + obj_all.h obj_arc.h attrib.o: attrib.c ../config.h compat_misc.h attrib.h board.o: board.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 \ @@ -2488,7 +2493,7 @@ drc.h plug_io.h mirror.h misc.h mymem.h misc_util.h polygon.h rtree.h \ math_helper.h rotate.h remove.h select.h operation.h set.h \ funchash_core.h funchash.h funchash_core_list.h compat_misc.h \ - compat_nls.h + compat_nls.h obj_all.h obj_arc.h build_run.o: build_run.c ../config.h ../src_3rd/genvector/gds_char.h \ ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h conf_core.h conf.h \ @@ -2504,7 +2509,7 @@ list_line.h list_arc.h list_text.h list_poly.h library.h rats_patch.h \ vtonpoint.h build_run.h hid_init.h hid.h error.h drc.h plug_io.h \ compat_misc.h -buildin.o: buildin.c ../config.h plugins.h buildin.h +buildin.o: buildin.c plugins.h buildin.h change.o: change.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 \ @@ -2522,7 +2527,7 @@ 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 misc.h \ mymem.h mirror.h polygon.h rtree.h math_helper.h select.h operation.h \ - undo.h hid_actions.h compat_nls.h + undo.h hid_actions.h compat_nls.h obj_all.h obj_arc.h change_act.o: change_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 \ @@ -2619,7 +2624,7 @@ ../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 misc.h \ mymem.h move.h polygon.h rtree.h math_helper.h select.h operation.h \ - undo.h compat_misc.h + undo.h compat_misc.h obj_all.h obj_arc.h create.o: create.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 \ @@ -2638,7 +2643,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 + paths.h compat_misc.h compat_nls.h obj_all.h obj_arc.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 \ @@ -2657,7 +2662,7 @@ ../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 + compat_misc.h compat_nls.h obj_all.h obj_arc.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 \ @@ -2669,7 +2674,8 @@ 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 \ - hid.h error.h drc.h buffer.h mymem.h rtree.h list_common.h + hid.h error.h drc.h buffer.h mymem.h rtree.h list_common.h obj_all.h \ + obj_arc.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 \ @@ -2687,7 +2693,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 + draw_fab.h obj_all.h obj_arc.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 \ @@ -2700,7 +2706,8 @@ 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 \ - hid.h error.h drc.h buffer.h draw.h drill.h draw_fab.h + hid.h error.h drc.h buffer.h draw.h drill.h draw_fab.h obj_all.h \ + obj_arc.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 \ @@ -2767,9 +2774,9 @@ layer.h crosshair.h rubberband.h vtonpoint.h hid.h error.h drc.h \ 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 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 + 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 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 \ @@ -3083,7 +3090,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 + math_helper.h obj_all.h obj_arc.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 \ @@ -3101,7 +3108,7 @@ 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 + rotate.h set.h undo.h compat_misc.h obj_all.h obj_arc.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 \ @@ -3121,7 +3128,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 + compat_misc.h compat_nls.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 \ @@ -3134,7 +3141,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 + library.h list_common.h obj_all.h obj_arc.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 \ @@ -3176,6 +3183,19 @@ global_typedefs.h pcb_bool.h unit.h polyarea.h \ ../src_3rd/genlist/gentdlist_impl.h ../src_3rd/genlist/gendlist.h \ ../src_3rd/genlist/gentdlist_undef.h ../src_3rd/genlist/gentdlist_impl.c +obj_arc.o: obj_arc.c ../config.h global_objs.h \ + ../src_3rd/genlist/gendlist.h attrib.h flag.h globalconst.h \ + global_typedefs.h pcb_bool.h unit.h polyarea.h global_element.h \ + list_pin.h ../src_3rd/genlist/gentdlist_impl.h \ + ../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/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 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 \ @@ -3195,7 +3215,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 + create.h compat_misc.h compat_nls.h obj_all.h obj_arc.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 \ @@ -3280,7 +3300,7 @@ ../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 + compat_nls.h obj_all.h obj_arc.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 \ @@ -3374,7 +3394,7 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h rats.h netlist.h route_style.h draw.h \ misc.h mymem.h move.h polygon.h rtree.h math_helper.h remove.h select.h \ - operation.h undo.h + operation.h undo.h obj_all.h obj_arc.h remove_act.o: remove_act.c const.h ../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 \ @@ -3406,7 +3426,7 @@ ../src_3rd/liblihata/lihata.h ../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_nls.h + ../src_3rd/genvector/vtp0.h list_conf.h compat_nls.h obj_all.h obj_arc.h route_style.o: route_style.c ../config.h pcb-printf.h \ ../src_3rd/genvector/gds_char.h ../src_3rd/genvector/genvector_impl.h \ ../src_3rd/genvector/genvector_undef.h unit.h route_style.h \ @@ -3451,7 +3471,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 find.h polygon.h rtree.h search.h rats.h \ - netlist.h route_style.h + netlist.h route_style.h obj_all.h obj_arc.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 \ @@ -3469,8 +3489,9 @@ ../src_3rd/liblihata/genht/hash.h list_rat.h crosshair.h rubberband.h \ hid.h error.h drc.h buffer.h draw.h search.h rats.h netlist.h \ route_style.h misc_util.h select.h operation.h undo.h misc.h mymem.h \ - find.h compat_misc.h compat_nls.h ../src_3rd/genregex/regex_sei.h \ - ../src_3rd/genregex/regex_templ.h ../src_3rd/genregex/regex.h + find.h compat_misc.h compat_nls.h obj_all.h obj_arc.h \ + ../src_3rd/genregex/regex_sei.h ../src_3rd/genregex/regex_templ.h \ + ../src_3rd/genregex/regex.h select_act.o: select_act.c ../config.h math_helper.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 \ @@ -3540,7 +3561,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 + compat_misc.h compat_nls.h obj_all.h obj_arc.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 \ @@ -3559,7 +3580,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 + mymem.h obj_all.h obj_arc.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/Makefile.in =================================================================== --- trunk/src/Makefile.in (revision 4549) +++ trunk/src/Makefile.in (revision 4550) @@ -92,6 +92,7 @@ netlist_act.o object_act.o obj_any.o + obj_arc.o paths.o pcb-printf.o plugins.o Index: trunk/src/action_helper.c =================================================================== --- trunk/src/action_helper.c (revision 4549) +++ trunk/src/action_helper.c (revision 4550) @@ -55,6 +55,7 @@ #include "hid_actions.h" #include "compat_misc.h" #include "compat_nls.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- */ Index: trunk/src/buffer.c =================================================================== --- trunk/src/buffer.c (revision 4549) +++ trunk/src/buffer.c (revision 4550) @@ -48,6 +48,7 @@ #include "funchash_core.h" #include "compat_misc.h" #include "compat_nls.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes @@ -54,7 +55,6 @@ */ static void *AddViaToBuffer(PinTypePtr); static void *AddLineToBuffer(LayerTypePtr, LineTypePtr); -static void *AddArcToBuffer(LayerTypePtr, ArcTypePtr); static void *AddRatToBuffer(RatTypePtr); static void *AddTextToBuffer(LayerTypePtr, TextTypePtr); static void *AddPolygonToBuffer(LayerTypePtr, PolygonTypePtr); @@ -61,7 +61,6 @@ static void *AddElementToBuffer(ElementTypePtr); static void *MoveViaToBuffer(PinTypePtr); static void *MoveLineToBuffer(LayerTypePtr, LineTypePtr); -static void *MoveArcToBuffer(LayerTypePtr, ArcTypePtr); static void *MoveRatToBuffer(RatTypePtr); static void *MoveTextToBuffer(LayerTypePtr, TextTypePtr); static void *MovePolygonToBuffer(LayerTypePtr, PolygonTypePtr); @@ -71,7 +70,9 @@ /* --------------------------------------------------------------------------- * some local identifiers */ -static DataTypePtr Dest, Source; +#warning TODO: revise these +int pcb_buffer_extraflg = 0; +DataTypePtr pcb_buffer_dest, pcb_buffer_src; static ObjectFunctionType AddBufferFunctions = { AddLineToBuffer, @@ -91,7 +92,6 @@ MoveTextToBuffer, MovePolygonToBuffer, MoveViaToBuffer, MoveElementToBuffer, NULL, NULL, NULL, NULL, NULL, MoveArcToBuffer, MoveRatToBuffer}; -static int ExtraFlag = 0; /* --------------------------------------------------------------------------- * copies a via to paste buffer @@ -98,8 +98,8 @@ */ static void *AddViaToBuffer(PinTypePtr Via) { - return (CreateNewVia(Dest, Via->X, Via->Y, Via->Thickness, Via->Clearance, - Via->Mask, Via->DrillingHole, Via->Name, MaskFlags(Via->Flags, PCB_FLAG_FOUND | ExtraFlag))); + return (CreateNewVia(pcb_buffer_dest, Via->X, Via->Y, Via->Thickness, Via->Clearance, + Via->Mask, Via->DrillingHole, Via->Name, MaskFlags(Via->Flags, PCB_FLAG_FOUND | pcb_buffer_extraflg))); } /* --------------------------------------------------------------------------- @@ -107,9 +107,9 @@ */ static void *AddRatToBuffer(RatTypePtr Rat) { - return (CreateNewRat(Dest, Rat->Point1.X, Rat->Point1.Y, + return (CreateNewRat(pcb_buffer_dest, Rat->Point1.X, Rat->Point1.Y, Rat->Point2.X, Rat->Point2.Y, Rat->group1, - Rat->group2, Rat->Thickness, MaskFlags(Rat->Flags, PCB_FLAG_FOUND | ExtraFlag))); + Rat->group2, Rat->Thickness, MaskFlags(Rat->Flags, PCB_FLAG_FOUND | pcb_buffer_extraflg))); } /* --------------------------------------------------------------------------- @@ -118,11 +118,11 @@ static void *AddLineToBuffer(LayerTypePtr Layer, LineTypePtr Line) { LineTypePtr line; - LayerTypePtr layer = &Dest->Layer[GetLayerNumber(Source, Layer)]; + LayerTypePtr layer = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, Layer)]; line = CreateNewLineOnLayer(layer, Line->Point1.X, Line->Point1.Y, Line->Point2.X, Line->Point2.Y, - Line->Thickness, Line->Clearance, MaskFlags(Line->Flags, PCB_FLAG_FOUND | ExtraFlag)); + Line->Thickness, Line->Clearance, MaskFlags(Line->Flags, PCB_FLAG_FOUND | pcb_buffer_extraflg)); if (line && Line->Number) line->Number = pcb_strdup(Line->Number); return (line); @@ -129,26 +129,14 @@ } /* --------------------------------------------------------------------------- - * copies an arc to buffer - */ -static void *AddArcToBuffer(LayerTypePtr Layer, ArcTypePtr Arc) -{ - LayerTypePtr layer = &Dest->Layer[GetLayerNumber(Source, Layer)]; - - return (CreateNewArcOnLayer(layer, Arc->X, Arc->Y, - Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta, - Arc->Thickness, Arc->Clearance, MaskFlags(Arc->Flags, PCB_FLAG_FOUND | ExtraFlag))); -} - -/* --------------------------------------------------------------------------- * copies a text to buffer */ static void *AddTextToBuffer(LayerTypePtr Layer, TextTypePtr Text) { - LayerTypePtr layer = &Dest->Layer[GetLayerNumber(Source, Layer)]; + LayerTypePtr layer = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, Layer)]; return (CreateNewText(layer, &PCB->Font, Text->X, Text->Y, - Text->Direction, Text->Scale, Text->TextString, MaskFlags(Text->Flags, ExtraFlag))); + Text->Direction, Text->Scale, Text->TextString, MaskFlags(Text->Flags, pcb_buffer_extraflg))); } /* --------------------------------------------------------------------------- @@ -156,7 +144,7 @@ */ static void *AddPolygonToBuffer(LayerTypePtr Layer, PolygonTypePtr Polygon) { - LayerTypePtr layer = &Dest->Layer[GetLayerNumber(Source, Layer)]; + LayerTypePtr layer = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, Layer)]; PolygonTypePtr polygon; polygon = CreateNewPolygon(layer, Polygon->Flags); @@ -170,7 +158,7 @@ layer->polygon_tree = r_create_tree(NULL, 0, 0); r_insert_entry(layer->polygon_tree, (BoxType *) polygon, 0); - CLEAR_FLAG(PCB_FLAG_FOUND | ExtraFlag, polygon); + CLEAR_FLAG(PCB_FLAG_FOUND | pcb_buffer_extraflg, polygon); return (polygon); } @@ -181,23 +169,23 @@ { ElementTypePtr element; - element = GetElementMemory(Dest); - CopyElementLowLevel(Dest, element, Element, pcb_false, 0, 0); - CLEAR_FLAG(ExtraFlag, element); - if (ExtraFlag) { + element = GetElementMemory(pcb_buffer_dest); + CopyElementLowLevel(pcb_buffer_dest, element, Element, pcb_false, 0, 0); + CLEAR_FLAG(pcb_buffer_extraflg, element); + if (pcb_buffer_extraflg) { ELEMENTTEXT_LOOP(element); { - CLEAR_FLAG(ExtraFlag, text); + CLEAR_FLAG(pcb_buffer_extraflg, text); } END_LOOP; PIN_LOOP(element); { - CLEAR_FLAG(PCB_FLAG_FOUND | ExtraFlag, pin); + CLEAR_FLAG(PCB_FLAG_FOUND | pcb_buffer_extraflg, pin); } END_LOOP; PAD_LOOP(element); { - CLEAR_FLAG(PCB_FLAG_FOUND | ExtraFlag, pad); + CLEAR_FLAG(PCB_FLAG_FOUND | pcb_buffer_extraflg, pad); } END_LOOP; } @@ -209,18 +197,18 @@ */ static void *MoveViaToBuffer(PinType * via) { - RestoreToPolygon(Source, PCB_TYPE_VIA, via, via); + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_VIA, via, via); - r_delete_entry(Source->via_tree, (BoxType *) via); + r_delete_entry(pcb_buffer_src->via_tree, (BoxType *) via); pinlist_remove(via); - pinlist_append(&Dest->Via, via); + pinlist_append(&pcb_buffer_dest->Via, via); CLEAR_FLAG(PCB_FLAG_WARN | PCB_FLAG_FOUND, via); - if (!Dest->via_tree) - Dest->via_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Dest->via_tree, (BoxType *) via, 0); - ClearFromPolygon(Dest, PCB_TYPE_VIA, via, via); + if (!pcb_buffer_dest->via_tree) + pcb_buffer_dest->via_tree = r_create_tree(NULL, 0, 0); + r_insert_entry(pcb_buffer_dest->via_tree, (BoxType *) via, 0); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_VIA, via, via); return via; } @@ -229,16 +217,16 @@ */ static void *MoveRatToBuffer(RatType * rat) { - r_delete_entry(Source->rat_tree, (BoxType *) rat); + r_delete_entry(pcb_buffer_src->rat_tree, (BoxType *) rat); ratlist_remove(rat); - ratlist_append(&Dest->Rat, rat); + ratlist_append(&pcb_buffer_dest->Rat, rat); CLEAR_FLAG(PCB_FLAG_FOUND, rat); - if (!Dest->rat_tree) - Dest->rat_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(Dest->rat_tree, (BoxType *) rat, 0); + if (!pcb_buffer_dest->rat_tree) + pcb_buffer_dest->rat_tree = r_create_tree(NULL, 0, 0); + r_insert_entry(pcb_buffer_dest->rat_tree, (BoxType *) rat, 0); return rat; } @@ -247,9 +235,9 @@ */ static void *MoveLineToBuffer(LayerType * layer, LineType * line) { - LayerTypePtr lay = &Dest->Layer[GetLayerNumber(Source, layer)]; + LayerTypePtr lay = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, layer)]; - RestoreToPolygon(Source, PCB_TYPE_LINE, layer, line); + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_LINE, layer, line); r_delete_entry(layer->line_tree, (BoxType *) line); linelist_remove(line); @@ -260,41 +248,19 @@ if (!lay->line_tree) lay->line_tree = r_create_tree(NULL, 0, 0); r_insert_entry(lay->line_tree, (BoxType *) line, 0); - ClearFromPolygon(Dest, PCB_TYPE_LINE, lay, line); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_LINE, lay, line); return (line); } /* --------------------------------------------------------------------------- - * moves an arc to buffer - */ -static void *MoveArcToBuffer(LayerType * layer, ArcType * arc) -{ - LayerType *lay = &Dest->Layer[GetLayerNumber(Source, layer)]; - - RestoreToPolygon(Source, PCB_TYPE_ARC, layer, arc); - r_delete_entry(layer->arc_tree, (BoxType *) arc); - - arclist_remove(arc); - arclist_append(&lay->Arc, arc); - - CLEAR_FLAG(PCB_FLAG_FOUND, arc); - - if (!lay->arc_tree) - lay->arc_tree = r_create_tree(NULL, 0, 0); - r_insert_entry(lay->arc_tree, (BoxType *) arc, 0); - ClearFromPolygon(Dest, PCB_TYPE_ARC, lay, arc); - return (arc); -} - -/* --------------------------------------------------------------------------- * moves a text to buffer without allocating memory for the name */ static void *MoveTextToBuffer(LayerType * layer, TextType * text) { - LayerType *lay = &Dest->Layer[GetLayerNumber(Source, layer)]; + LayerType *lay = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, layer)]; r_delete_entry(layer->text_tree, (BoxType *) text); - RestoreToPolygon(Source, PCB_TYPE_TEXT, layer, text); + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_TEXT, layer, text); textlist_remove(text); textlist_append(&lay->Text, text); @@ -302,7 +268,7 @@ if (!lay->text_tree) lay->text_tree = r_create_tree(NULL, 0, 0); r_insert_entry(lay->text_tree, (BoxType *) text, 0); - ClearFromPolygon(Dest, PCB_TYPE_TEXT, lay, text); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_TEXT, lay, text); return (text); } @@ -311,7 +277,7 @@ */ static void *MovePolygonToBuffer(LayerType * layer, PolygonType * polygon) { - LayerType *lay = &Dest->Layer[GetLayerNumber(Source, layer)]; + LayerType *lay = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, layer)]; r_delete_entry(layer->polygon_tree, (BoxType *) polygon); @@ -335,35 +301,35 @@ * Delete the element from the source (remove it from trees, * restore to polygons) */ - r_delete_element(Source, element); + r_delete_element(pcb_buffer_src, element); elementlist_remove(element); - elementlist_append(&Dest->Element, element); + elementlist_append(&pcb_buffer_dest->Element, element); PIN_LOOP(element); { - RestoreToPolygon(Source, PCB_TYPE_PIN, element, pin); + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_PIN, element, pin); CLEAR_FLAG(PCB_FLAG_WARN | PCB_FLAG_FOUND, pin); } END_LOOP; PAD_LOOP(element); { - RestoreToPolygon(Source, PCB_TYPE_PAD, element, pad); + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_PAD, element, pad); CLEAR_FLAG(PCB_FLAG_WARN | PCB_FLAG_FOUND, pad); } END_LOOP; - SetElementBoundingBox(Dest, element, &PCB->Font); + SetElementBoundingBox(pcb_buffer_dest, element, &PCB->Font); /* * Now clear the from the polygons in the destination */ PIN_LOOP(element); { - ClearFromPolygon(Dest, PCB_TYPE_PIN, element, pin); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_PIN, element, pin); } END_LOOP; PAD_LOOP(element); { - ClearFromPolygon(Dest, PCB_TYPE_PAD, element, pad); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_PAD, element, pad); } END_LOOP; @@ -402,10 +368,10 @@ * may change the 'valid' area for the cursor */ if (!LeaveSelected) - ExtraFlag = PCB_FLAG_SELECTED; + pcb_buffer_extraflg = PCB_FLAG_SELECTED; notify_crosshair_change(pcb_false); - Source = PCB->Data; - Dest = Buffer->Data; + pcb_buffer_src = PCB->Data; + pcb_buffer_dest = Buffer->Data; SelectedOperation(&AddBufferFunctions, pcb_false, PCB_TYPEMASK_ALL); /* set origin to passed or current position */ @@ -418,7 +384,7 @@ Buffer->Y = Crosshair.Y; } notify_crosshair_change(pcb_true); - ExtraFlag = 0; + pcb_buffer_extraflg = 0; } /* --------------------------------------------------------------------------- @@ -1220,8 +1186,8 @@ void *MoveObjectToBuffer(DataTypePtr Destination, DataTypePtr Src, int Type, void *Ptr1, void *Ptr2, void *Ptr3) { /* setup local identifiers used by move operations */ - Dest = Destination; - Source = Src; + pcb_buffer_dest = Destination; + pcb_buffer_src = Src; return (ObjectOperation(&MoveBufferFunctions, Type, Ptr1, Ptr2, Ptr3)); } @@ -1231,8 +1197,8 @@ void *CopyObjectToBuffer(DataTypePtr Destination, DataTypePtr Src, int Type, void *Ptr1, void *Ptr2, void *Ptr3) { /* setup local identifiers used by Add operations */ - Dest = Destination; - Source = Src; + pcb_buffer_dest = Destination; + pcb_buffer_src = Src; return (ObjectOperation(&AddBufferFunctions, Type, Ptr1, Ptr2, Ptr3)); } Index: trunk/src/change.c =================================================================== --- trunk/src/change.c (revision 4549) +++ trunk/src/change.c (revision 4550) @@ -43,6 +43,7 @@ #include "undo.h" #include "hid_actions.h" #include "compat_nls.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes Index: trunk/src/copy.c =================================================================== --- trunk/src/copy.c (revision 4549) +++ trunk/src/copy.c (revision 4550) @@ -42,6 +42,7 @@ #include "select.h" #include "undo.h" #include "compat_misc.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes Index: trunk/src/create.c =================================================================== --- trunk/src/create.c (revision 4549) +++ trunk/src/create.c (revision 4550) @@ -46,6 +46,7 @@ #include "paths.h" #include "compat_misc.h" #include "compat_nls.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local identifiers Index: trunk/src/crosshair.c =================================================================== --- trunk/src/crosshair.c (revision 4549) +++ trunk/src/crosshair.c (revision 4550) @@ -42,6 +42,7 @@ #include "hid_actions.h" #include "compat_misc.h" #include "compat_nls.h" +#include "obj_all.h" typedef struct { int x, y; Index: trunk/src/data.c =================================================================== --- trunk/src/data.c (revision 4549) +++ trunk/src/data.c (revision 4550) @@ -33,6 +33,7 @@ #include "mymem.h" #include "rtree.h" #include "list_common.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some shared identifiers Index: trunk/src/draw.c =================================================================== --- trunk/src/draw.c (revision 4549) +++ trunk/src/draw.c (revision 4550) @@ -39,6 +39,7 @@ #include "rotate.h" #include "rtree.h" #include "draw_fab.h" +#include "obj_all.h" #undef NDEBUG #include Index: trunk/src/draw_fab.c =================================================================== --- trunk/src/draw_fab.c (revision 4549) +++ trunk/src/draw_fab.c (revision 4550) @@ -35,6 +35,7 @@ #include "draw.h" #include "drill.h" #include "draw_fab.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * prints a FAB drawing. Index: trunk/src/find.c =================================================================== --- trunk/src/find.c (revision 4549) +++ trunk/src/find.c (revision 4550) @@ -78,6 +78,8 @@ #include "compat_misc.h" #include "layer.h" +#include "obj_all.h" + #undef DEBUG /* --------------------------------------------------------------------------- Index: trunk/src/find_clear.c =================================================================== --- trunk/src/find_clear.c (revision 4549) +++ trunk/src/find_clear.c (revision 4550) @@ -25,6 +25,7 @@ /*! * \brief Resets all used flags of pins and vias. */ + pcb_bool ClearFlagOnPinsViasAndPads(pcb_bool AndDraw, int flag) { pcb_bool change = pcb_false; Index: trunk/src/macro.h =================================================================== --- trunk/src/macro.h (revision 4549) +++ trunk/src/macro.h (revision 4550) @@ -141,11 +141,6 @@ gdl_iterator_t __it__; \ padlist_foreach(&(element)->Pad, &__it__, pad) { -#define ARC_LOOP(element) do { \ - ArcType *arc; \ - gdl_iterator_t __it__; \ - linelist_foreach(&(element)->Arc, &__it__, arc) { - #define ELEMENTLINE_LOOP(element) do { \ LineType *line; \ gdl_iterator_t __it__; \ Index: trunk/src/mirror.c =================================================================== --- trunk/src/mirror.c (revision 4549) +++ trunk/src/mirror.c (revision 4550) @@ -40,6 +40,7 @@ #include "mirror.h" #include "misc.h" #include "polygon.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * mirrors the coordinates of an element Index: trunk/src/misc.c =================================================================== --- trunk/src/misc.c (revision 4549) +++ trunk/src/misc.c (revision 4550) @@ -52,6 +52,7 @@ #include "set.h" #include "undo.h" #include "compat_misc.h" +#include "obj_all.h" /* forward declarations */ static char *BumpName(char *); @@ -678,113 +679,6 @@ } } -/* --------------------------------------------------------------------------- - * computes the bounding box of an arc - */ -void SetArcBoundingBox(ArcTypePtr Arc) -{ - double ca1, ca2, sa1, sa2; - double minx, maxx, miny, maxy; - Angle ang1, ang2; - Coord width; - - /* first put angles into standard form: - * ang1 < ang2, both angles between 0 and 720 */ - Arc->Delta = PCB_CLAMP(Arc->Delta, -360, 360); - - if (Arc->Delta > 0) { - ang1 = NormalizeAngle(Arc->StartAngle); - ang2 = NormalizeAngle(Arc->StartAngle + Arc->Delta); - } - else { - ang1 = NormalizeAngle(Arc->StartAngle + Arc->Delta); - ang2 = NormalizeAngle(Arc->StartAngle); - } - if (ang1 > ang2) - ang2 += 360; - /* Make sure full circles aren't treated as zero-length arcs */ - if (Arc->Delta == 360 || Arc->Delta == -360) - ang2 = ang1 + 360; - - /* calculate sines, cosines */ - sa1 = sin(PCB_M180 * ang1); - ca1 = cos(PCB_M180 * ang1); - sa2 = sin(PCB_M180 * ang2); - ca2 = cos(PCB_M180 * ang2); - - minx = MIN(ca1, ca2); - maxx = MAX(ca1, ca2); - miny = MIN(sa1, sa2); - maxy = MAX(sa1, sa2); - - /* Check for extreme angles */ - if ((ang1 <= 0 && ang2 >= 0) || (ang1 <= 360 && ang2 >= 360)) - maxx = 1; - if ((ang1 <= 90 && ang2 >= 90) || (ang1 <= 450 && ang2 >= 450)) - maxy = 1; - if ((ang1 <= 180 && ang2 >= 180) || (ang1 <= 540 && ang2 >= 540)) - minx = -1; - if ((ang1 <= 270 && ang2 >= 270) || (ang1 <= 630 && ang2 >= 630)) - miny = -1; - - /* Finally, calculate bounds, converting sane geometry into pcb geometry */ - Arc->BoundingBox.X1 = Arc->X - Arc->Width * maxx; - Arc->BoundingBox.X2 = Arc->X - Arc->Width * minx; - Arc->BoundingBox.Y1 = Arc->Y + Arc->Height * miny; - Arc->BoundingBox.Y2 = Arc->Y + Arc->Height * maxy; - - width = (Arc->Thickness + Arc->Clearance) / 2; - - /* Adjust for our discrete polygon approximation */ - width = (double) width *MAX(POLY_CIRC_RADIUS_ADJ, (1.0 + POLY_ARC_MAX_DEVIATION)) + 0.5; - - Arc->BoundingBox.X1 -= width; - Arc->BoundingBox.X2 += width; - Arc->BoundingBox.Y1 -= width; - Arc->BoundingBox.Y2 += width; - close_box(&Arc->BoundingBox); -} - -BoxTypePtr GetArcEnds(ArcTypePtr Arc) -{ - static BoxType box; - box.X1 = Arc->X - Arc->Width * cos(Arc->StartAngle * PCB_M180); - box.Y1 = Arc->Y + Arc->Height * sin(Arc->StartAngle * PCB_M180); - box.X2 = Arc->X - Arc->Width * cos((Arc->StartAngle + Arc->Delta) * PCB_M180); - box.Y2 = Arc->Y + Arc->Height * sin((Arc->StartAngle + Arc->Delta) * PCB_M180); - return &box; -} - -/* doesn't these belong in change.c ?? */ -void ChangeArcAngles(LayerTypePtr Layer, ArcTypePtr a, Angle new_sa, Angle new_da) -{ - if (new_da >= 360) { - new_da = 360; - new_sa = 0; - } - RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); - AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, a, a, a); - a->StartAngle = new_sa; - a->Delta = new_da; - SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); - ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); -} - - -void ChangeArcRadii(LayerTypePtr Layer, ArcTypePtr a, Coord new_width, Coord new_height) -{ - RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); - r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); - AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, a, a, a); - a->Width = new_width; - a->Height = new_height; - SetArcBoundingBox(a); - r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); - ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); -} - static char *BumpName(char *Name) { int num; Index: trunk/src/misc.h =================================================================== --- trunk/src/misc.h (revision 4549) +++ trunk/src/misc.h (revision 4550) @@ -36,7 +36,6 @@ void r_delete_element(DataTypePtr, ElementTypePtr); void SetLineBoundingBox(LineTypePtr); -void SetArcBoundingBox(ArcTypePtr); void SetPointBoundingBox(PointTypePtr); void SetPinBoundingBox(PinTypePtr); void SetPadBoundingBox(PadTypePtr); @@ -50,9 +49,6 @@ BoxTypePtr GetObjectBoundingBox(int, void *, void *, void *); -BoxTypePtr GetArcEnds(ArcTypePtr); -void ChangeArcAngles(LayerTypePtr, ArcTypePtr, Angle, Angle); -void ChangeArcRadii(LayerTypePtr, ArcTypePtr, Coord, Coord); char *UniqueElementName(DataTypePtr, char *); void AttachForCopy(Coord, Coord); Index: trunk/src/move.c =================================================================== --- trunk/src/move.c (revision 4549) +++ trunk/src/move.c (revision 4550) @@ -50,6 +50,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "layer.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes Index: trunk/src/mymem.c =================================================================== --- trunk/src/mymem.c (revision 4549) +++ trunk/src/mymem.c (revision 4550) @@ -37,6 +37,7 @@ #include "rtree.h" #include "rats_patch.h" #include "list_common.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * local prototypes @@ -145,25 +146,6 @@ } /* --------------------------------------------------------------------------- - * get next slot for an arc, allocates memory if necessary - */ -ArcTypePtr GetArcMemory(LayerType * layer) -{ - ArcType *new_obj; - - new_obj = calloc(sizeof(ArcType), 1); - arclist_append(&layer->Arc, new_obj); - - return new_obj; -} - -void RemoveFreeArc(ArcType * data) -{ - arclist_remove(data); - free(data); -} - -/* --------------------------------------------------------------------------- * get next slot for a text object, allocates memory if necessary */ TextTypePtr GetTextMemory(LayerType * layer) @@ -349,10 +331,3 @@ return line; } -ArcType *GetElementArcMemory(ElementType *Element) -{ - ArcType *arc = calloc(sizeof(ArcType), 1); - - arclist_append(&Element->Arc, arc); - return arc; -} Index: trunk/src/mymem.h =================================================================== --- trunk/src/mymem.h (revision 4549) +++ trunk/src/mymem.h (revision 4550) @@ -55,7 +55,6 @@ PadTypePtr GetPadMemory(ElementTypePtr); PinTypePtr GetViaMemory(DataTypePtr); LineTypePtr GetLineMemory(LayerTypePtr); -ArcTypePtr GetArcMemory(LayerTypePtr); RatTypePtr GetRatMemory(DataTypePtr); TextTypePtr GetTextMemory(LayerTypePtr); PolygonTypePtr GetPolygonMemory(LayerTypePtr); @@ -67,7 +66,6 @@ char *StripWhiteSpaceAndDup(const char *); -void RemoveFreeArc(ArcType * data); void RemoveFreeLine(LineType * data); void RemoveFreeText(TextType * data); void RemoveFreePolygon(PolygonType * data); @@ -79,7 +77,6 @@ /* Allocate element-objects */ LineType *GetElementLineMemory(ElementType *Element); -ArcType *GetElementArcMemory(ElementType *Element); #ifndef HAVE_LIBDMALLOC #define malloc(x) calloc(1,(x)) Index: trunk/src/obj_all.h =================================================================== --- trunk/src/obj_all.h (nonexistent) +++ trunk/src/obj_all.h (revision 4550) @@ -0,0 +1 @@ +#include "obj_arc.h" Index: trunk/src/obj_arc.c =================================================================== --- trunk/src/obj_arc.c (nonexistent) +++ trunk/src/obj_arc.c (revision 4550) @@ -0,0 +1,209 @@ +/* + * COPYRIGHT + * + * PCB, interactive printed circuit board design + * Copyright (C) 1994,1995,1996 Thomas Nau + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Contact addresses for paper mail and Email: + * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany + * Thomas.Nau@rz.uni-ulm.de + * + */ + +/* Drawing primitive: (elliptical) arc */ + +#include "config.h" +#include "global_objs.h" +#include "global_element.h" +#include "buffer.h" +#include "board.h" +#include "data.h" +#include "rtree.h" +#include "polygon.h" +#include "box.h" +#include "undo.h" + +#include "create.h" + +extern DataTypePtr pcb_buffer_dest, pcb_buffer_src; +extern int pcb_buffer_extraflg; + +ArcTypePtr GetArcMemory(LayerType * layer) +{ + ArcType *new_obj; + + new_obj = calloc(sizeof(ArcType), 1); + arclist_append(&layer->Arc, new_obj); + + return new_obj; +} + +ArcType *GetElementArcMemory(ElementType *Element) +{ + ArcType *arc = calloc(sizeof(ArcType), 1); + + arclist_append(&Element->Arc, arc); + return arc; +} + + + +/* computes the bounding box of an arc */ +void SetArcBoundingBox(ArcTypePtr Arc) +{ + double ca1, ca2, sa1, sa2; + double minx, maxx, miny, maxy; + Angle ang1, ang2; + Coord width; + + /* first put angles into standard form: + * ang1 < ang2, both angles between 0 and 720 */ + Arc->Delta = PCB_CLAMP(Arc->Delta, -360, 360); + + if (Arc->Delta > 0) { + ang1 = NormalizeAngle(Arc->StartAngle); + ang2 = NormalizeAngle(Arc->StartAngle + Arc->Delta); + } + else { + ang1 = NormalizeAngle(Arc->StartAngle + Arc->Delta); + ang2 = NormalizeAngle(Arc->StartAngle); + } + if (ang1 > ang2) + ang2 += 360; + /* Make sure full circles aren't treated as zero-length arcs */ + if (Arc->Delta == 360 || Arc->Delta == -360) + ang2 = ang1 + 360; + + /* calculate sines, cosines */ + sa1 = sin(PCB_M180 * ang1); + ca1 = cos(PCB_M180 * ang1); + sa2 = sin(PCB_M180 * ang2); + ca2 = cos(PCB_M180 * ang2); + + minx = MIN(ca1, ca2); + maxx = MAX(ca1, ca2); + miny = MIN(sa1, sa2); + maxy = MAX(sa1, sa2); + + /* Check for extreme angles */ + if ((ang1 <= 0 && ang2 >= 0) || (ang1 <= 360 && ang2 >= 360)) + maxx = 1; + if ((ang1 <= 90 && ang2 >= 90) || (ang1 <= 450 && ang2 >= 450)) + maxy = 1; + if ((ang1 <= 180 && ang2 >= 180) || (ang1 <= 540 && ang2 >= 540)) + minx = -1; + if ((ang1 <= 270 && ang2 >= 270) || (ang1 <= 630 && ang2 >= 630)) + miny = -1; + + /* Finally, calculate bounds, converting sane geometry into pcb geometry */ + Arc->BoundingBox.X1 = Arc->X - Arc->Width * maxx; + Arc->BoundingBox.X2 = Arc->X - Arc->Width * minx; + Arc->BoundingBox.Y1 = Arc->Y + Arc->Height * miny; + Arc->BoundingBox.Y2 = Arc->Y + Arc->Height * maxy; + + width = (Arc->Thickness + Arc->Clearance) / 2; + + /* Adjust for our discrete polygon approximation */ + width = (double) width *MAX(POLY_CIRC_RADIUS_ADJ, (1.0 + POLY_ARC_MAX_DEVIATION)) + 0.5; + + Arc->BoundingBox.X1 -= width; + Arc->BoundingBox.X2 += width; + Arc->BoundingBox.Y1 -= width; + Arc->BoundingBox.Y2 += width; + close_box(&Arc->BoundingBox); +} + +BoxTypePtr GetArcEnds(ArcTypePtr Arc) +{ + static BoxType box; + box.X1 = Arc->X - Arc->Width * cos(Arc->StartAngle * PCB_M180); + box.Y1 = Arc->Y + Arc->Height * sin(Arc->StartAngle * PCB_M180); + box.X2 = Arc->X - Arc->Width * cos((Arc->StartAngle + Arc->Delta) * PCB_M180); + box.Y2 = Arc->Y + Arc->Height * sin((Arc->StartAngle + Arc->Delta) * PCB_M180); + return &box; +} + +/* doesn't these belong in change.c ?? */ +void ChangeArcAngles(LayerTypePtr Layer, ArcTypePtr a, Angle new_sa, Angle new_da) +{ + if (new_da >= 360) { + new_da = 360; + new_sa = 0; + } + RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); + r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + AddObjectToChangeAnglesUndoList(PCB_TYPE_ARC, a, a, a); + a->StartAngle = new_sa; + a->Delta = new_da; + SetArcBoundingBox(a); + r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); +} + + +void ChangeArcRadii(LayerTypePtr Layer, ArcTypePtr a, Coord new_width, Coord new_height) +{ + RestoreToPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); + r_delete_entry(Layer->arc_tree, (BoxTypePtr) a); + AddObjectToChangeRadiiUndoList(PCB_TYPE_ARC, a, a, a); + a->Width = new_width; + a->Height = new_height; + SetArcBoundingBox(a); + r_insert_entry(Layer->arc_tree, (BoxTypePtr) a, 0); + ClearFromPolygon(PCB->Data, PCB_TYPE_ARC, Layer, a); +} + + + + + +void RemoveFreeArc(ArcType * data) +{ + arclist_remove(data); + free(data); +} + +/* copies an arc to buffer */ +void *AddArcToBuffer(LayerTypePtr Layer, ArcTypePtr Arc) +{ + LayerTypePtr layer = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, Layer)]; + + return (CreateNewArcOnLayer(layer, Arc->X, Arc->Y, + Arc->Width, Arc->Height, Arc->StartAngle, Arc->Delta, + Arc->Thickness, Arc->Clearance, MaskFlags(Arc->Flags, PCB_FLAG_FOUND | pcb_buffer_extraflg))); +} + +/* moves an arc to buffer */ +void *MoveArcToBuffer(LayerType * layer, ArcType * arc) +{ + LayerType *lay = &pcb_buffer_dest->Layer[GetLayerNumber(pcb_buffer_src, layer)]; + + RestoreToPolygon(pcb_buffer_src, PCB_TYPE_ARC, layer, arc); + r_delete_entry(layer->arc_tree, (BoxType *) arc); + + arclist_remove(arc); + arclist_append(&lay->Arc, arc); + + CLEAR_FLAG(PCB_FLAG_FOUND, arc); + + if (!lay->arc_tree) + lay->arc_tree = r_create_tree(NULL, 0, 0); + r_insert_entry(lay->arc_tree, (BoxType *) arc, 0); + ClearFromPolygon(pcb_buffer_dest, PCB_TYPE_ARC, lay, arc); + return (arc); +} + Index: trunk/src/obj_arc.h =================================================================== --- trunk/src/obj_arc.h (nonexistent) +++ trunk/src/obj_arc.h (revision 4550) @@ -0,0 +1,51 @@ +/* + * COPYRIGHT + * + * PCB, interactive printed circuit board design + * Copyright (C) 1994,1995,1996 Thomas Nau + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 2 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program; if not, write to the Free Software + * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + * + * Contact addresses for paper mail and Email: + * Thomas Nau, Schlehenweg 15, 88471 Baustetten, Germany + * Thomas.Nau@rz.uni-ulm.de + * + */ + +/* Drawing primitive: (elliptical) arc */ + +#include "global_typedefs.h" + +/*** Memory ***/ +ArcTypePtr GetArcMemory(LayerTypePtr); +ArcType *GetElementArcMemory(ElementType *Element); +void RemoveFreeArc(ArcType *data); + +/*** Utility ***/ +void SetArcBoundingBox(ArcTypePtr Arc); +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); + + +/*** Operations ***/ +void *AddArcToBuffer(LayerTypePtr Layer, ArcTypePtr Arc); +void *MoveArcToBuffer(LayerType *layer, ArcType *arc); + + +#define ARC_LOOP(element) do { \ + ArcType *arc; \ + gdl_iterator_t __it__; \ + linelist_foreach(&(element)->Arc, &__it__, arc) { Index: trunk/src/object_act.c =================================================================== --- trunk/src/object_act.c (revision 4549) +++ trunk/src/object_act.c (revision 4550) @@ -51,6 +51,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "layer.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- */ Index: trunk/src/polygon.c =================================================================== --- trunk/src/polygon.c (revision 4549) +++ trunk/src/polygon.c (revision 4550) @@ -94,6 +94,7 @@ #include "misc.h" #include "layer.h" #include "compat_nls.h" +#include "obj_all.h" #define ROUND(x) ((long)(((x) >= 0 ? (x) + 0.5 : (x) - 0.5))) Index: trunk/src/remove.c =================================================================== --- trunk/src/remove.c (revision 4549) +++ trunk/src/remove.c (revision 4550) @@ -43,6 +43,7 @@ #include "rtree.h" #include "select.h" #include "undo.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes Index: trunk/src/rotate.c =================================================================== --- trunk/src/rotate.c (revision 4549) +++ trunk/src/rotate.c (revision 4550) @@ -47,6 +47,7 @@ #include "undo.h" #include "conf_core.h" #include "compat_nls.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local prototypes Index: trunk/src/search.c =================================================================== --- trunk/src/search.c (revision 4549) +++ trunk/src/search.c (revision 4550) @@ -43,6 +43,7 @@ #include "rtree.h" #include "search.h" #include "layer.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- * some local identifiers Index: trunk/src/select.c =================================================================== --- trunk/src/select.c (revision 4549) +++ trunk/src/select.c (revision 4550) @@ -44,6 +44,7 @@ #include "layer.h" #include "compat_misc.h" #include "compat_nls.h" +#include "obj_all.h" #include Index: trunk/src/undo.c =================================================================== --- trunk/src/undo.c (revision 4549) +++ trunk/src/undo.c (revision 4550) @@ -69,6 +69,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "netlist.h" +#include "obj_all.h" static pcb_bool between_increment_and_restore = pcb_false; static pcb_bool added_undo_between_increment_and_restore = pcb_false; Index: trunk/src/undo_act.c =================================================================== --- trunk/src/undo_act.c (revision 4549) +++ trunk/src/undo_act.c (revision 4550) @@ -41,6 +41,7 @@ #include "draw.h" #include "misc.h" #include "layer.h" +#include "obj_all.h" /* --------------------------------------------------------------------------- */ Index: trunk/src_plugins/autocrop/autocrop.c =================================================================== --- trunk/src_plugins/autocrop/autocrop.c (revision 4549) +++ trunk/src_plugins/autocrop/autocrop.c (revision 4550) @@ -59,6 +59,7 @@ #include "set.h" #include "polygon.h" #include "plugins.h" +#include "obj_all.h" #include "hid_actions.h" static void *MyMoveViaLowLevel(DataType * Data, PinType * Via, Coord dx, Coord dy) Index: trunk/src_plugins/autoroute/autoroute.c =================================================================== --- trunk/src_plugins/autoroute/autoroute.c (revision 4549) +++ trunk/src_plugins/autoroute/autoroute.c (revision 4550) @@ -79,6 +79,7 @@ #include "set.h" #include "layer.h" #include "compat_nls.h" +#include "obj_all.h" #warning TODO: remove this in favor of vtptr #include "ptrlist.h" Index: trunk/src_plugins/boardflip/boardflip.c =================================================================== --- trunk/src_plugins/boardflip/boardflip.c (revision 4549) +++ trunk/src_plugins/boardflip/boardflip.c (revision 4550) @@ -38,6 +38,7 @@ #include "rtree.h" #include "undo.h" #include "plugins.h" +#include "obj_all.h" #include "hid_actions.h" Index: trunk/src_plugins/export_bboard/bboard.c =================================================================== --- trunk/src_plugins/export_bboard/bboard.c (revision 4549) +++ trunk/src_plugins/export_bboard/bboard.c (revision 4550) @@ -48,6 +48,7 @@ #include "plugins.h" #include "compat_misc.h" #include "misc_util.h" +#include "obj_all.h" #include "hid.h" #include "hid_attrib.h" Index: trunk/src_plugins/hid_gtk/gui-drc-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4549) +++ trunk/src_plugins/hid_gtk/gui-drc-window.c (revision 4550) @@ -39,6 +39,7 @@ #include "gui-drc-window.h" #include "hid_actions.h" #include "compat_nls.h" +#include "obj_all.h" #define VIOLATION_PIXMAP_PIXEL_SIZE 100 #define VIOLATION_PIXMAP_PIXEL_BORDER 5 Index: trunk/src_plugins/hid_gtk/gui-netlist-window.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4549) +++ trunk/src_plugins/hid_gtk/gui-netlist-window.c (revision 4550) @@ -52,6 +52,7 @@ #include "undo.h" #include "hid_actions.h" #include "compat_nls.h" +#include "obj_all.h" #include "gui.h" Index: trunk/src_plugins/hid_gtk/gui-pinout-preview.c =================================================================== --- trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4549) +++ trunk/src_plugins/hid_gtk/gui-pinout-preview.c (revision 4550) @@ -38,6 +38,7 @@ #include "mymem.h" #include "move.h" #include "rotate.h" +#include "obj_all.h" #include "gui-pinout-preview.h" /* Just define a sensible scale, lets say (for example), 100 pixel per 150 mil */ Index: trunk/src_plugins/hid_lesstif/netlist.c =================================================================== --- trunk/src_plugins/hid_lesstif/netlist.c (revision 4549) +++ trunk/src_plugins/hid_lesstif/netlist.c (revision 4550) @@ -17,6 +17,7 @@ #include "remove.h" #include "crosshair.h" #include "draw.h" +#include "obj_all.h" #include "hid.h" #include "hid_actions.h" Index: trunk/src_plugins/io_kicad/write.c =================================================================== --- trunk/src_plugins/io_kicad/write.c (revision 4549) +++ trunk/src_plugins/io_kicad/write.c (revision 4550) @@ -36,6 +36,7 @@ #include "const.h" #include "netlist.h" #include "misc.h" +#include "obj_all.h" #define F2S(OBJ, TYPE) flags_to_string ((OBJ)->Flags, TYPE) Index: trunk/src_plugins/io_kicad_legacy/write.c =================================================================== --- trunk/src_plugins/io_kicad_legacy/write.c (revision 4549) +++ trunk/src_plugins/io_kicad_legacy/write.c (revision 4550) @@ -36,6 +36,7 @@ #include "const.h" #include "netlist.h" #include "misc.h" +#include "obj_all.h" #define F2S(OBJ, TYPE) flags_to_string ((OBJ)->Flags, TYPE) Index: trunk/src_plugins/io_lihata/read.c =================================================================== --- trunk/src_plugins/io_lihata/read.c (revision 4549) +++ trunk/src_plugins/io_lihata/read.c (revision 4550) @@ -45,6 +45,7 @@ #include "common.h" #include "polygon.h" #include "conf_core.h" +#include "obj_all.h" #warning TODO: put these in a gloal load-context-struct vtptr_t post_ids, post_thermal; Index: trunk/src_plugins/puller/puller.c =================================================================== --- trunk/src_plugins/puller/puller.c (revision 4549) +++ trunk/src_plugins/puller/puller.c (revision 4550) @@ -68,6 +68,7 @@ #include "plugins.h" #include "hid_actions.h" #include "misc_util.h" +#include "obj_all.h" #define abort1() fprintf(stderr, "abort at line %d\n", __LINE__), abort() Index: trunk/src_plugins/report/report.c =================================================================== --- trunk/src_plugins/report/report.c (revision 4549) +++ trunk/src_plugins/report/report.c (revision 4550) @@ -58,6 +58,7 @@ #include "compat_misc.h" #include "compat_nls.h" #include "layer.h" +#include "obj_all.h" #include