delorie.com/archives/browse.cgi   search  
Mail Archives: geda-user/2022/07/26/04:09:25

X-Authentication-Warning: delorie.com: mail set sender to geda-user-bounces using -f
X-Recipient: geda-user AT delorie DOT com
X-Original-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=gmail.com; s=20210112;
h=from:references:user-agent:to:subject:date:in-reply-to:message-id
:mime-version;
bh=iQHmXFuZjbmnHbwnjyvwn4BbGnaaTlvMm545nDHpU7c=;
b=SwxrV4kWhBH2oYpnDXG1hddofbpguQEGgAbRDvK8QgZTacm/sXyRi13NKbkqz6/N0r
Al3oRAectsYlkuEe7F8vFxpiaHKgin7TRU4L4IokkRJI7a+MF72Y1Ovm13PnoTnfcaaA
NjR4emWPLUVIp0mpG+7aGg5eOBj6YxD+PEcvtTApGTc88jcdiQ1OyGRo6MS/QxS7uaZV
ldZ08gFNh9s9TTyUo94QnlGWb2Q+Qzk1Gis6NAZxG2otlP68kjGbWhOKuAxaNm7xAVy9
dwqqAp96OiymGV78JQimhYVPl2swPBfON9CKBI8U+CI8V6x2tsF4/3ZRumbriV33t9Fg
rO3Q==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20210112;
h=x-gm-message-state:from:references:user-agent:to:subject:date
:in-reply-to:message-id:mime-version;
bh=iQHmXFuZjbmnHbwnjyvwn4BbGnaaTlvMm545nDHpU7c=;
b=Tz0aw5MGfbSQmXe34sh0utfOO0f68jzQl4VdkG8URhrCR8Qo6BJW+PlHJTUm2N+tu5
wkfOtbP2ALs5eh2BOMnvmuW8DO2rIG532+U7Prm5tla6k2cYXOn9QyEX6EtOu+L5Wc3k
ThVCk2oEd+Kc6chstyx/Q7M49U3GM+HG0CIUPhhQlIR18IPo6wYLkX+O72RlprGr3kcb
a6+Rlbgpw5YGHGTK8xaS+E2QR/lgQ0R3bDylRXRgU1sTyOpIZkv6wRAfTbiBkgYo3jKl
c76iF+0ru9vV+w0sL7QTf+bwsTJPVSxANWJk8KMkaozsh/PEhxRYLZhpj8Io6oM/TZe6
X0Pg==
X-Gm-Message-State: AJIora/C4F6KP/NAUKEXakroCC1GapgTxAFFeqyyuoS1jJTtnvmQTX3I
jXfMNeM8Iaojl56R1v2gtT2pYhkbvz8=
X-Google-Smtp-Source: AGRyM1ufwUkGvcx8dh/1470qLro0wY45sjQ80Lx1PK/XWuBiXG0oWTztzOw3NDRfoxK+t1+VbMBjKg==
X-Received: by 2002:a05:6512:930:b0:48a:a0b9:8dfc with SMTP id f16-20020a056512093000b0048aa0b98dfcmr675927lft.45.1658822874451;
Tue, 26 Jul 2022 01:07:54 -0700 (PDT)
From: "vzh (vzhbanov AT gmail DOT com) [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com>
X-Google-Original-From: vzh <vzh AT lepton>
References: <20220725164851 DOT B70A680FBE4D AT turkos DOT aspodata DOT se>
User-agent: mu4e 1.6.10; emacs 28.1
To: geda-user AT delorie DOT com
Subject: Re: [geda-user] Defaults for net attribute
Date: Tue, 26 Jul 2022 10:51:21 +0300
In-reply-to: <20220725164851.B70A680FBE4D@turkos.aspodata.se>
Message-ID: <87r1288ffq.fsf@lepton.mail-host-address-is-not-set>
MIME-Version: 1.0
Reply-To: geda-user AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: geda-user AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

Hi Karl!

"karl AT aspodata DOT se [via geda-user AT delorie DOT com]" <geda-user AT delorie DOT com> writes:

>  Hello, the net symbols I have have a e.g. net=+5V:1
> attribute which is visible so it is easily to change.
> It would be nice to be able to drop the ":1" part of
> the attribute:
> . there is only one pin
> . without it I could have the rest in a larger font
> . it is plain ugly and might confuse beginners
>
> So I'm loocking in the code to find where it is parsed.
> Unforturnately gschem doesn't work here so I'm loockin
> into lepton.
>
>  Theese two files seems to be related:
> liblepton/scheme/netlist/net.scm
> liblepton/scheme/symbol/check/net-attrib.scm
>
> In the first of the two I find (line 89-106):
>
> ============
> (define (check-net-attrib net)
>   (let* ((value (attrib-value net))
>          (colon-position (string-index value #\:)))
>     (if colon-position
>         (let ((name (string-take value colon-position))
>               (pinnumbers (string-split (string-drop value
>                                                      (1+ colon-position))
>                                         #\,)))
>           (check-duplicates/one-net
>            (map (lambda (pinnumber) (make-net-map net pinnumber name))
>                 (filter (cut check-net-attrib-pinnumber net <>) pinnumbers))))
>         (begin
>           (blame-object net
>                         'error
>                         (format #f
>                                 (G_ "Invalid net attribute: net=~A")
>                                 value))
>           '()))))
> ============
>
> I can guess what it is about, but there too much I'm unused to in guile,
> it looks I have change the "(begin (blame-object" and move the 
> "(check-duplicates/one-net" to outside the "(if".
>
> Is there any suggestion how to change this ?

Thank you, as always, for your inquiring question!  You seem to have
found quite a little chunk of unused code in Lepton :-)

Git-grepping on the function name has told this to me.  I threw away
several related functions and `make distclean` still worked as expected.
(OK, I'll look into this a bit later.)

Returning to the issue, I think the check-net-maps() function is what
you would have to amend to make things work as you wish.

BTW, some time ago when we discussed something like this in Lepton I
proposed to add special power symbols.  They could have, say, two top
level (floating) attributes: symbol=power and, e.g., netname=something.
(There is a dedicated page in the Lepton info manual on this.)


HTH,
  Vladimir

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019