[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
gEDA-cvs: CVS update: gnet-gsch2pcb.scm.in
User: ahvezda
Date: 06/08/29 22:30:38
Modified: . gnet-gsch2pcb.scm.in
Log:
Applied Patch#1542726 to fix an arg params bug/limit in gnet-gsch2pcb.scm.in
Revision Changes Path
1.2 +11 -29 eda/geda/gaf/gnetlist/scheme/gnet-gsch2pcb.scm.in
(In the diff below, changes in quantity of whitespace are not shown.)
Index: gnet-gsch2pcb.scm.in
===================================================================
RCS file: /home/cvspsrv/cvsroot/eda/geda/gaf/gnetlist/scheme/gnet-gsch2pcb.scm.in,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -b -r1.1 -r1.2
--- gnet-gsch2pcb.scm.in 17 Aug 2005 02:54:04 -0000 1.1
+++ gnet-gsch2pcb.scm.in 30 Aug 2006 02:30:38 -0000 1.2
@@ -1,4 +1,4 @@
-;;; $Id: gnet-gsch2pcb.scm.in,v 1.1 2005/08/17 02:54:04 danmc Exp $
+;;; $Id: gnet-gsch2pcb.scm.in,v 1.2 2006/08/30 02:30:38 ahvezda Exp $
;;;
;;; gEDA - GNU Electronic Design Automation
@@ -85,6 +85,14 @@
(cons (car the-list) (split-to-list (cdr the-list)))
(list the-string))))
+;; Joins the elements of a list of strings into a single string,
+;; with each element prefixed by a given prefix string.
+(define (list-join-with-prefixes the-list prefix)
+ (if (null? the-list)
+ ""
+ (string-append prefix (car the-list)
+ (list-join-with-prefixes (cdr the-list) prefix))))
+
(define gsch2pcb:write-value-footprint
(lambda (pipe ls)
@@ -97,37 +105,11 @@
(display (string-append "PKG_" (car footprint)) pipe)
(display (string-append "(`" (car footprint)) pipe)
- (case (length footprint)
- ((1) #f)
- ((2) (display (string-append "-" (cadr footprint)) pipe))
- ((3) (display (string-append "-" (cadr footprint)
- "-" (caddr footprint)) pipe))
-;; Cases 4 & 5 are a kludge to help with spaces in file element names
-;; This makes up to 4 spaces possible and should be generalized
- ((4) (display (string-append "-" (cadr footprint)
- "-" (caddr footprint) "-"
- (caddr (cdr footprint))) pipe))
- ((5) (display (string-append "-" (cadr footprint)
- "-" (caddr footprint)
- "-" (caddr (cdr footprint))
- "-" (caddr (cdr (cdr footprint)) )) pipe)))
+ (display (list-join-with-prefixes (cdr footprint) "-") pipe)
(display (string-append "',`" refdes "',`") pipe)
(display value pipe)
- (case (length footprint)
- ((1) #f)
- ((2) (display (string-append "',`" (cadr footprint)) pipe))
- ((3) (display (string-append "',`" (cadr footprint)
- "',`" (caddr footprint)) pipe))
- ((4) (display (string-append "',`" (cadr footprint)
- "',`" (caddr footprint)
- "',`" (caddr (cdr footprint))) pipe))
- ((5) (display (string-append "," (cadr footprint)
- "',`" (caddr footprint)
- "',`" (caddr (cdr footprint))
- "',`" (caddr (cdr (cdr footprint)) )) pipe))
- (else (display
- (string-append "ERROR!, no footprint in device " refdes))))
+ (display (list-join-with-prefixes (cdr footprint) "',`") pipe)
(display "')" pipe)
(newline pipe)
(gsch2pcb:write-value-footprint pipe (cdr ls))) )))
_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs