Index: trunk/src/route_style.h =================================================================== --- trunk/src/route_style.h (revision 2607) +++ trunk/src/route_style.h (revision 2608) @@ -25,13 +25,6 @@ * */ -#define STYLE_LOOP(top) do { \ - Cardinal n; \ - RouteStyleTypePtr style; \ - for (n = 0; n < vtroutestyle_len(&(top)->RouteStyle); n++) \ - { \ - style = &(top)->RouteStyle.array[n] - /* Parse a single route string into one RouteStyleTypePtr slot. Returns 0 on success. */ int ParseRoutingString1(char **str, RouteStyleTypePtr routeStyle, const char *default_unit); Index: trunk/src_plugins/toporouter/toporouter.c =================================================================== --- trunk/src_plugins/toporouter/toporouter.c (revision 2607) +++ trunk/src_plugins/toporouter/toporouter.c (revision 2608) @@ -266,27 +266,21 @@ gdouble lookup_clearance(char *name) { - if (name) - STYLE_LOOP(PCB); - { -/* if(!strcmp(style->Name, name)) return style->Clearance + 1.; */ - if (!strcmp(style->Name, name)) - return style->Clearance; + if (name) { + int idx = pcb_route_style_lookup(&PCB->RouteStyle, 0, 0, 0, 0, menu->Style); + if (idx >= 0) + return PCB->RouteStyle.array[idx].Clearance; } - END_LOOP; -/* return Settings.Clearance + 1.; */ return Settings.Clearance; } gdouble lookup_thickness(char *name) { - if (name) - STYLE_LOOP(PCB); - { - if (!strcmp(style->Name, name)) - return style->Thick; + if (name) { + int idx = pcb_route_style_lookup(&PCB->RouteStyle, 0, 0, 0, 0, menu->Style); + if (idx >= 0) + return PCB->RouteStyle.array[idx].Thick; } - END_LOOP; return Settings.LineThickness; }