[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: pcb.git: branch: master updated (24cc5981d799645300927af9251713bbc53a1f2e)
The branch, master has been updated
via 24cc5981d799645300927af9251713bbc53a1f2e (commit)
from 035204bb2289055e186270937fb38b9f7880d14b (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
=========
src/action.c | 10 +++++++++-
tools/gnet-pcbfwd.scm | 38 +++++++++++++++++++-------------------
2 files changed, 28 insertions(+), 20 deletions(-)
=================
Commit Messages
=================
commit 24cc5981d799645300927af9251713bbc53a1f2e
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Fix pcb forward annotation bugs
Finish rename of pcblf -> pcbfwd, handle pcb-has-no-name case.
:100644 100644 34df05e... be1631d... M src/action.c
:100644 100644 a15cd8a... 360859f... M tools/gnet-pcbfwd.scm
=========
Changes
=========
commit 24cc5981d799645300927af9251713bbc53a1f2e
Author: DJ Delorie <dj@xxxxxxxxxxx>
Commit: DJ Delorie <dj@xxxxxxxxxxx>
Fix pcb forward annotation bugs
Finish rename of pcblf -> pcbfwd, handle pcb-has-no-name case.
diff --git a/src/action.c b/src/action.c
index 34df05e..be1631d 100644
--- a/src/action.c
+++ b/src/action.c
@@ -7366,6 +7366,14 @@ ActionImport (int argc, char **argv, int x, int y)
char *schname;
char *dot, *slash, *bslash;
+ if (!pcbname)
+ {
+ Message ("Please save your PCB first, so that it has a\n"
+ "file name, or manually add an import::src0 attribute with\n"
+ "the name of the schematic to import from.");
+ return 1;
+ }
+
schname = (char *) malloc (strlen(pcbname) + 5);
strcpy (schname, pcbname);
dot = strchr (schname, '.');
@@ -7399,7 +7407,7 @@ ActionImport (int argc, char **argv, int x, int y)
cmd = (char **) malloc ((6 + nsources) * sizeof (char *));
cmd[0] = "gnetlist";
cmd[1] = "-g";
- cmd[2] = "pcblf";
+ cmd[2] = "pcbfwd";
cmd[3] = "-o";
cmd[4] = tmpfile;
for (i=0; i<nsources; i++)
diff --git a/tools/gnet-pcbfwd.scm b/tools/gnet-pcbfwd.scm
index a15cd8a..360859f 100644
--- a/tools/gnet-pcbfwd.scm
+++ b/tools/gnet-pcbfwd.scm
@@ -24,7 +24,7 @@
;; This is a list of attributes which are propogated to the pcb
;; elements. Note that refdes, value, and footprint need not be
;; listed here.
-(define pcblf:element-attrs
+(define pcbfwd:element-attrs
'("device"
"manufacturer"
"manufacturer_part_number"
@@ -32,33 +32,33 @@
"vendor_part_number"
))
-(define (pcblf:pinfmt pin)
+(define (pcbfwd:pinfmt pin)
(format #f "~a-~a" (car pin) (car (cdr pin)))
)
-(define (pcblf:each-pin net pins port)
+(define (pcbfwd:each-pin net pins port)
(if (not (null? pins))
(let ((pin (car pins)))
- (format port "Netlist(Add,~a,~a)~%" net (pcblf:pinfmt pin))
- (pcblf:each-pin net (cdr pins) port))))
+ (format port "Netlist(Add,~a,~a)~%" net (pcbfwd:pinfmt pin))
+ (pcbfwd:each-pin net (cdr pins) port))))
-(define (pcblf:each-net netnames port)
+(define (pcbfwd:each-net netnames port)
(if (not (null? netnames))
(let ((netname (car netnames)))
- (pcblf:each-pin netname (gnetlist:get-all-connections netname) port)
- (pcblf:each-net (cdr netnames) port))))
+ (pcbfwd:each-pin netname (gnetlist:get-all-connections netname) port)
+ (pcbfwd:each-net (cdr netnames) port))))
-(define (pcblf:each-attr refdes attrs port)
+(define (pcbfwd:each-attr refdes attrs port)
(if (not (null? attrs))
(let ((attr (car attrs)))
(format port "ElementSetAttr(~a,~a,~a)~%"
refdes
attr
(gnetlist:get-package-attribute refdes attr))
- (pcblf:each-attr refdes (cdr attrs) port))))
+ (pcbfwd:each-attr refdes (cdr attrs) port))))
;; write out the pins for a particular component
-(define pcblf:component_pins
+(define pcbfwd:component_pins
(lambda (port package pins)
(if (and (not (null? package)) (not (null? pins)))
(begin
@@ -83,13 +83,13 @@
(display label port)
(display ")\n" port)
)
- (pcblf:component_pins port package (cdr pins))
+ (pcbfwd:component_pins port package (cdr pins))
)
)
)
)
-(define (pcblf:each-element elements port)
+(define (pcbfwd:each-element elements port)
(if (not (null? elements))
(let* ((refdes (car elements))
(value (gnetlist:get-package-attribute refdes "value"))
@@ -97,19 +97,19 @@
)
(format port "ElementList(Need,~a,~a,~a)~%" refdes footprint value)
- (pcblf:each-attr refdes pcblf:element-attrs port)
- (pcblf:component_pins port refdes (gnetlist:get-pins refdes))
+ (pcbfwd:each-attr refdes pcbfwd:element-attrs port)
+ (pcbfwd:component_pins port refdes (gnetlist:get-pins refdes))
- (pcblf:each-element (cdr elements) port))))
+ (pcbfwd:each-element (cdr elements) port))))
-(define (pcblf output-filename)
+(define (pcbfwd output-filename)
(let ((port (open-output-file output-filename)))
(format port "Netlist(Freeze)\n")
(format port "Netlist(Clear)\n")
- (pcblf:each-net (gnetlist:get-all-unique-nets "dummy") port)
+ (pcbfwd:each-net (gnetlist:get-all-unique-nets "dummy") port)
(format port "Netlist(Sort)\n")
(format port "Netlist(Thaw)\n")
(format port "ElementList(Start)\n")
- (pcblf:each-element packages port)
+ (pcbfwd:each-element packages port)
(format port "ElementList(Done)\n")
(close-output-port port)))
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs