On Tue, 2010-09-07 at 06:56 +0000, Ineiev wrote: > On 9/6/10, Peter Clifton <pc...@cam.ac.uk> wrote: > ... > > confusing "non-copper" with "skip-drc" is > > probably a bad idea. > ... > > Thank you, your suggestion is really reasonable. > > I renamed the attribute to PCB::non-copper > and corrected the variable name and comments accordingly; > probably it does not make the patch perfect, > but I have no better idea at the moment.
DJ, Dan, ... Shall we / I push this? I think it looks good overall. I might have put the attribute string "PCB::non-copper" in a #define somewhere, but if the string is canonical, I guess it doesn't hurt to place it explicitly in the code. I'm slightly weary of the lack of immediate synchronisation between the attribute being present and the (LayerType*)->non_copper flag, but I can live with it ;) This means that the ->non_copper flag is only known to be valid after a call to reassign_non_copper_flags(), which is a static function only available inside find.c. This effectively means the flag is ONLY useful inside find.c at the moment. I've was (a while back) working on a hook based attribute change notification system for gschem, and perhaps in future, similar might be applied to map attribute changes to other data-structure flags immediately. OR.. we could eventually optimise the attribute lookup code to be "really fast", so as to avoid the need to keep a separate flag in the layer data-structure. (Assuming "lookup_attrib" is too slow to use at the moment??) For a future patch: It would be nice to move some the attribute lookup helper function out of action.c, if attributes are to form a bigger role in PCB's future, perhaps more functions will be created, and can live away from the already bloated (and seemingly unrelated) action.c -- 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@moria.seul.org http://www.seul.org/cgi-bin/mailman/listinfo/geda-user