[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA: Default pinnumber for net attribute?
- To: geda-dev@seul.org
- Subject: gEDA: Default pinnumber for net attribute?
- From: Wojciech Kazubski <wk@ire.pw.edu.pl>
- Date: Sat, 27 Mar 2004 00:51:54 +0100
- Delivered-to: archiver@seul.org
- Delivered-to: geda-dev-outgoing@seul.org
- Delivered-to: geda-dev@seul.org
- Delivery-date: Fri, 26 Mar 2004 18:53:57 -0500
- In-reply-to: <3AE90D6A.7DE80B7D@home.com>
- References: <3AE9503D.5DB7371E@beam.demon.co.uk> <3AE90D6A.7DE80B7D@home.com>
- Reply-to: geda-dev@seul.org
- Sender: owner-geda-dev@seul.org
- User-agent: KMail/1.5.4
Hello!
As now all net= attributes must contain a pinnumber(s) after a semicolon, like
net=VCC:14
in the case of power connection it looks like
net=VCC:1
This is no problem if the power symbol is not editable, since the attribute is
made invisible and a separate text VCC is displayed.
But if I try to make the power symbol editable by making the value of the net=
attribute visible, a pinnumber also appears so the power is now labelled
VCC:1
this looks strange for some people, who are not familiar with gaf. It would be
better to have only VCC visible as a power label.
The appended patch makes 1 a default value of pinnumber in net, do
net=VCC
is equal to
net=VCC:1
There is one drawback, this patch removes an error message and a broken
netlist may be created without warning. It should be good to limit this
default to devices with only one pin, but I dont know how to make this.
Wojciech Kazubski
--- geda-gnetlist-20040111/src/s_netattrib.c.defnetnumber 2003-10-27 04:07:08.000000000 +0100
+++ geda-gnetlist-20040111/src/s_netattrib.c 2004-03-27 00:18:16.000000000 +0100
@@ -261,9 +261,13 @@
if (value) {
char_ptr = strchr(value, ':');
if (char_ptr == NULL) {
+/*
fprintf(stderr, "Got an invalid net= attrib [net=%s]\nMissing : in net= attrib\n",
value);
return (NULL);
+*/
+ strcat(value, ":1");
+ char_ptr = strchr(value, ':');
}
net_name = s_netattrib_extract_netname(value);
@@ -303,9 +307,13 @@
if (value) {
char_ptr = strchr(value, ':');
if (char_ptr == NULL) {
+/*
fprintf(stderr, "Got an invalid net= attrib [net=%s]\nMissing : in net= attrib\n",
value);
return (NULL);
+*/
+ strcat(value, ":1");
+ char_ptr = strchr(value, ':');
}
net_name = s_netattrib_extract_netname(value);