From a3d2b0c1626a000f87bc07947539b889f7640d8a Mon Sep 17 00:00:00 2001 From: Stefan Frederik Date: Fri, 1 Jan 2021 21:43:08 +0100 Subject: [PATCH] optimized bus_hilight_lookup() in case of non bussed nets (avoid expandlabel) --- src/hilight.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/hilight.c b/src/hilight.c index aa17578e..d92b6c36 100644 --- a/src/hilight.c +++ b/src/hilight.c @@ -264,12 +264,11 @@ struct hilight_hashentry *bus_hilight_lookup(const char *token, int value, int w int mult; if(token==NULL) return NULL; - if( token[0] == '#') { - my_strdup(140, &string, token); - } - else { - my_strdup(141, &string, expandlabel(token,&mult)); + if( token[0] == '#' || !strpbrk(token, "*[],.:")) { + ptr1=hilight_lookup(token, value, what); + return ptr1; } + my_strdup(141, &string, expandlabel(token,&mult)); if(string==NULL) { return NULL; }