On Wed, 2009-06-10 at 19:04 +0000, Kai-Martin Knaak wrote: > On Tue, 26 May 2009 02:14:58 +0100, Peter Clifton wrote: > > > What version of gschem is it based on? > > > > My cairo branch, + some local stuff. It should apply to git HEAD though > > (untested). > > > > I tried to apply the patch to your cairo branch (git checkout -b > cairo_experiment origin/cairo_experiment). However, I get incompatible > pointer type errors: > > gcc -DLOCALEDIR=\"/usr/local/share/locale\" -DHAVE_CONFIG_H -I. -I.. -I/ > usr/local/include -I../intl -I../include -I/usr/local/include -I/usr/ > include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/gtk-2.0 -I/ > usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -D_REENTRANT -I/usr/ > include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/ > include/cairo -I/usr/include/pango-1.0 -I/usr/include/pixman-1 -I/usr/ > include/freetype2 -I/usr/include/directfb -I/usr/include/libpng12 -I/usr/ > include/glib-2.0 -I/usr/lib/glib-2.0/include -pthread -I/usr/include/ > glib-2.0 -I/usr/lib/glib-2.0/include -Wall -g -O2 -MT o_move.o -MD - > MP -MF .deps/o_move.Tpo -c -o o_move.o o_move.c > o_move.c: In function ‘o_move_check_endpoint’: > o_move.c:511: warning: passing argument 1 of ‘s_page_append’ from > incompatible pointer type > o_move.c:511: warning: passing argument 2 of ‘s_page_append’ from > incompatible pointer type > o_move.c:511: error: too few arguments to function ‘s_page_append’ > make[2]: *** [o_move.o] Error 1 > make[2]: Leaving directory `/usr/local/geda-src/pcjc2/gschem/src' > make[1]: *** [install-recursive] Error 1 > make[1]: Leaving directory `/usr/local/geda-src/pcjc2/gschem' > make: *** [gschem_install] Error 2 > > Anything I can do about this?
New patch against latest code is attached. Basically just add a "toplevel" as the first parameter to s_page_append() -- Peter Clifton Electrical Engineering Division, Engineering Department, University of Cambridge, 9, JJ Thomson Avenue, Cambridge CB3 0FA Tel: +44 (0)7729 980173 - (No signal in the lab!)
>From 9c542c0c3f64bf5de10db32043bda506f4657d67 Mon Sep 17 00:00:00 2001 From: Peter Clifton <[email protected]> Date: Sun, 24 May 2009 13:12:06 +0100 Subject: [PATCH] Rubberband pin to pin connections by adding nets --- gschem/src/o_move.c | 15 +++++++++++++++ 1 files changed, 15 insertions(+), 0 deletions(-) diff --git a/gschem/src/o_move.c b/gschem/src/o_move.c index 76eca40..6e8fcd2 100644 --- a/gschem/src/o_move.c +++ b/gschem/src/o_move.c @@ -502,6 +502,21 @@ void o_move_check_endpoint(GSCHEM_TOPLEVEL *w_current, OBJECT * object) c_current->other_whichone == -1)) continue; + if (c_current->other_object->type == OBJ_PIN) { + OBJECT *new_net; + /* other object is a pin, insert a net */ + new_net = o_net_new (toplevel, OBJ_NET, NET_COLOR, + c_current->x, c_current->y, + c_current->x, c_current->y); + s_page_append (toplevel->page_current, new_net); + s_tile_add_object (toplevel, new_net); + s_conn_update_object (toplevel, new_net); + /* This new net object is only picked up for stretching later, + * somewhat of a kludge. If the move operation is cancelled, these + * new 0 length nets are removed by the "undo" operation invoked. + */ + } + /* Only attempt to stretch nets and buses */ if (c_current->other_object->type != OBJ_NET && c_current->other_object->type != OBJ_BUS) -- 1.6.0.4
_______________________________________________ geda-user mailing list [email protected] http://www.seul.org/cgi-bin/mailman/listinfo/geda-user

