[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: gEDA-user: pcb: functions in hidnogui.c



On Sat, 2010-03-13 at 00:46 +0000, Kai-Martin Knaak wrote:
> As you might guess from the rant thread, I am still interested in getting 
> this particular patch applied. It significantly improves the usability 
> because it provides more versatile command line printing. With the 
> DISPLAY() action I can select whether to print refdes, or value with the 
> components. 
> 
> Peter Clifton reminded me, that one obstacle to the application is the 
> necessity to remove a CRASH statement in hidnogui.c. It should be 
> checked, that the removal does not have any undesired side effect.
> However, I can't judge what this function is supposed to do because there 
> is no clarifying comment and it's name is mentioned nowhere else in the 
> source. 
> 
> Can some developer enlighten me, where the procedure nogui_invalidate_lr
> gets called? 

gui->invalidate_lr is called from draw.c gui->invalidate_all() is called
from a number of places too, so it is important to ensure that doesn't
have a CRASH either.

grep -n -- "->invalidate" *.c
action.c:2568:	  gui->invalidate_all();
action.c:4463:	  gui->invalidate_all ();
action.c:6885:      gui->invalidate_all ();
draw.c:179:  gui->invalidate_all ();
draw.c:197:  gui->invalidate_lr (Block.X1, Block.X2, Block.Y1,
Block.Y2);
draw.c:236:  gui->invalidate_all ();
find.c:4405:  gui->invalidate_all ();
move.c:1052:  gui->invalidate_all ();
puller.c:536:  gui->invalidate_all ();

The reason you can't grep for the hidnogui variant directly is that
these function pointers are installed as a default by macros in
hid/common/hidnogui.c in a call to "apply_default_hid()". This is called
from the various HIDs _init() function.

Regards,

-- 
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!)
Tel: +44 (0)1223 748328 - (Shared lab phone, ask for me)



_______________________________________________
geda-user mailing list
geda-user@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-user