[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: gaf.git: branch: master updated (1.5.2-20090328-2-gab617ca)
The branch, master has been updated
via ab617ca6c2cf704e932a6179601942cf6b949761 (commit)
via 8bec9babf2fbb3dfb03eebce7169bf39d8796a6e (commit)
from ab590ab70cddfe6a0954d56a31c0ebd1f0bc7691 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
=========
Summary
=========
utils/examples/tragesym/test1.src | 5 ++-
utils/scripts/tragesym | 41 +++++++++++++++++++-----------------
2 files changed, 25 insertions(+), 21 deletions(-)
=================
Commit Messages
=================
commit ab617ca6c2cf704e932a6179601942cf6b949761
Author: Werner Hoch <werner.ho@xxxxxx>
Commit: Werner Hoch <werner.ho@xxxxxx>
tragesym: accept unknown attributes
tragesym exited on unknown attributes. These unknown attributes are
now accepted and a warning message is printed.
Original request from Miles Gazic <m.gazic@xxxxxxxxxxxxxxxx>
:100755 100755 3847bb5... 7175ffa... M utils/scripts/tragesym
commit 8bec9babf2fbb3dfb03eebce7169bf39d8796a6e
Author: Werner Hoch <werner.ho@xxxxxx>
Commit: Werner Hoch <werner.ho@xxxxxx>
tragesym: accept empty attributes in the src file
tragesym crashed if a src file had an empty attribute "key=".
Just ignore empty attributes and print a warning.
Bug reported by Perry Hargrave <perry.hargrave@xxxxxxxxx> on the
geda-bug mailing list.
:100644 100644 87e2478... 9bc2b36... M utils/examples/tragesym/test1.src
:100755 100755 823d208... 3847bb5... M utils/scripts/tragesym
=========
Changes
=========
commit ab617ca6c2cf704e932a6179601942cf6b949761
Author: Werner Hoch <werner.ho@xxxxxx>
Commit: Werner Hoch <werner.ho@xxxxxx>
tragesym: accept unknown attributes
tragesym exited on unknown attributes. These unknown attributes are
now accepted and a warning message is printed.
Original request from Miles Gazic <m.gazic@xxxxxxxxxxxxxxxx>
diff --git a/utils/scripts/tragesym b/utils/scripts/tragesym
index 3847bb5..7175ffa 100755
--- a/utils/scripts/tragesym
+++ b/utils/scripts/tragesym
@@ -27,7 +27,7 @@
import getopt, os.path, re, string, sys
##################### GLOBALS ############################################
-VERSION="0.0.14"
+VERSION="0.0.15"
CHARHIGH=26
preset_options = {"wordswap":"yes",
@@ -220,12 +220,6 @@ def readsrc(filename):
sys.exit()
return options, geda_attr, pins
-def checkattr(attr):
- for attr,value in attr.items():
- attr,nr=attr
- if attr not in official_attr:
- print 'Warning: The attribute "%s=%s" is not official' %(attr, value)
-
def splitspecial(str):
"""
@@ -540,6 +534,14 @@ def writesym(filename,options,attr,pins):
texty=texty+200
i = i + 1
+ ## unknown attributes
+ for (name, number),value in attr.items():
+ if name not in official_attr:
+ f.write("T %i" %textx + " %i"% texty + " 5 10 0 0 0 0 1\n")
+ f.write(name + "=" + value + "\n")
+ texty=texty+200
+ print 'Warning: The attribute "%s=%s" is not official' %(name, value)
+
nets={}
for pin in pins:
if pin.style == "none":
@@ -609,7 +611,5 @@ if options["generate_pinseq"] == "yes":
for pin in pins:
pin.check()
-checkattr(attr)
-
writesym(file_out,options,attr,pins)
commit 8bec9babf2fbb3dfb03eebce7169bf39d8796a6e
Author: Werner Hoch <werner.ho@xxxxxx>
Commit: Werner Hoch <werner.ho@xxxxxx>
tragesym: accept empty attributes in the src file
tragesym crashed if a src file had an empty attribute "key=".
Just ignore empty attributes and print a warning.
Bug reported by Perry Hargrave <perry.hargrave@xxxxxxxxx> on the
geda-bug mailing list.
diff --git a/utils/examples/tragesym/test1.src b/utils/examples/tragesym/test1.src
index 87e2478..9bc2b36 100644
--- a/utils/examples/tragesym/test1.src
+++ b/utils/examples/tragesym/test1.src
@@ -21,8 +21,9 @@ description=pin sorting test, pin sequence test
documentation=http://url_to_the_datasheet.com/datasheet.pdf
author=Werner Hoch <werner.ho(AT)gmx.de>
numslots=4
-use-license=unlimited
-dist-license=GPL
+use-license
+dist-license=
+special-attribute=unknown
slot=1
slotdef=1:1,2,3
slotdef=2:4,5,6
diff --git a/utils/scripts/tragesym b/utils/scripts/tragesym
index 823d208..3847bb5 100755
--- a/utils/scripts/tragesym
+++ b/utils/scripts/tragesym
@@ -38,7 +38,7 @@ preset_options = {"wordswap":"yes",
"pinwidthvertikal":"400",
"pinwidthvertical":"400",
"pinwidthhorizontal":"400"}
-allowed_attr = ["version", "name", "device", "refdes", "footprint", "numslots",
+official_attr = ["version", "name", "device", "refdes", "footprint", "numslots",
"slot", "slotdef","description", "comment", "author",
"documentation","value","dist-license", "use-license"]
single_attr_warning = ["device", "footprint", "author", "documentation",
@@ -203,10 +203,14 @@ def readsrc(filename):
options[string.strip(element[0])]=string.strip(element[1])
elif section=="geda_attr":
element=split_tab_equal(line,1)
- nr=1
- while geda_attr.has_key((element[0],nr)):
- nr=nr+1
- geda_attr[(string.strip(element[0]),nr)]=string.strip(element[1])
+ if len(element) < 2 or len(element[1].strip()) == 0:
+ print 'Warning: Empty attribute "%s" in the geda_attr section' % element[0]
+ print ' The incomplete attribute will be dropped'
+ else:
+ nr=1
+ while geda_attr.has_key((element[0],nr)):
+ nr=nr+1
+ geda_attr[(string.strip(element[0]),nr)]=string.strip(element[1])
elif section=="pins":
element=string.split(line,"\t")
if len(element) > 2:
@@ -219,9 +223,8 @@ def readsrc(filename):
def checkattr(attr):
for attr,value in attr.items():
attr,nr=attr
- if attr not in allowed_attr:
- print "this attribute is not allowed: ", attr, value
- sys.exit()
+ if attr not in official_attr:
+ print 'Warning: The attribute "%s=%s" is not official' %(attr, value)
def splitspecial(str):
@@ -358,7 +361,7 @@ def writesym(filename,options,attr,pins):
continue
if pin.style=="spacer":
if o_sort == "yes":
- print "warning: spacers are not supported when sorting labels"
+ print "Warning: spacers are not supported when sorting labels"
continue
elif pin.pos == "l": #left pin
plefty=plefty - o_vdist #where to draw the _next_ pin
@@ -504,13 +507,13 @@ def writesym(filename,options,attr,pins):
f.write("T %i"% urefx +" %i"% urefy +" 8 10 1 1 0 6 1\n")
f.write("refdes=" + attr[("refdes",1)] + "\n")
else:
- print "warning: refdes attribut missing"
+ print "Warning: refdes attribut missing"
if attr.has_key(("name",1)):
f.write("T %i" %namex + " %i"% namey + " 9 10 1 0 0 0 1\n")
f.write(attr[("name",1)] + "\n")
else:
- print "warning: name attribut missing"
+ print "Warning: name attribut missing"
## attributes with same format and warnings
for a in single_attr_warning:
@@ -519,7 +522,7 @@ def writesym(filename,options,attr,pins):
f.write(a + "=" + attr[(a,1)] + "\n")
texty=texty+200
else:
- print "warning: " + a + " attribut missing"
+ print "Warning: " + a + " attribut missing"
## attributes without warning
for a in single_attr:
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs