[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

gEDA-cvs: gaf.git: branch: master updated (1.7.0-20110116-95-g88777ca)



The branch, master has been updated
       via  88777ca6eeb4ec32debd5192422149a2515431f4 (commit)
       via  7fe9484b291373e0f47c201b793d0a9f994317b6 (commit)
      from  b410e0b5965e4d0fd95b032676e3f3b658ee2792 (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
=========

 NEWS                          |    2 +
 gnetlist/scheme/gnet-drc2.scm |   73 +++++++++++++++++++---------------------
 2 files changed, 37 insertions(+), 38 deletions(-)


=================
 Commit Messages
=================

commit 88777ca6eeb4ec32debd5192422149a2515431f4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Update NEWS.

:100644 100644 1e70a60... 86a3d57... M	NEWS

commit 7fe9484b291373e0f47c201b793d0a9f994317b6
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Make drc2 backend work with Guile 2.0.

:100644 100644 380f588... d3f2e98... M	gnetlist/scheme/gnet-drc2.scm

=========
 Changes
=========

commit 88777ca6eeb4ec32debd5192422149a2515431f4
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    Update NEWS.

diff --git a/NEWS b/NEWS
index 1e70a60..86a3d57 100644
--- a/NEWS
+++ b/NEWS
@@ -10,6 +10,8 @@ more information, please consult the `ChangeLog' file.
 Notable changes in gEDA/gaf 1.7.1
 =================================
 
+* gEDA is now compatible with Guile 2.0.
+
 * `gschem' allows objects to be moved by dragging without having to
   select them first.
 

commit 7fe9484b291373e0f47c201b793d0a9f994317b6
Author: Peter TB Brett <peter@xxxxxxxxxxxxx>
Commit: Peter TB Brett <peter@xxxxxxxxxxxxx>

    gnetlist: Make drc2 backend work with Guile 2.0.

diff --git a/gnetlist/scheme/gnet-drc2.scm b/gnetlist/scheme/gnet-drc2.scm
index 380f588..d3f2e98 100644
--- a/gnetlist/scheme/gnet-drc2.scm
+++ b/gnetlist/scheme/gnet-drc2.scm
@@ -168,6 +168,12 @@
 ;; -------------------------------------------------------------------------------
 
 (use-modules (srfi srfi-1))
+(use-modules (ice-9 syncase))
+
+(define-syntax define-undefined
+  (syntax-rules ()
+    ((_ name expr)
+     (define name (if (defined? (quote name)) name expr)))))
 
 ;;
 ;; Some internal definitions
@@ -191,36 +197,30 @@
 (define pintype-full-names (list "unknown" "input" "output" "input/output" "open collector" "open emitter" "passive" "totem-pole" "tristate" "clock" "power" "unconnected"))
 
 ; define if a specified pin can drive a net
-(if (defined? 'pintype-can-drive)
+(define-undefined pintype-can-drive
+;         unk in out io oc oe pas tp tri clk pwr undef
+  (list 1   0  1   1  1  1  1   1  1   0   1    0 ))
+
+(define (pintype-can-drive-valid? lst)
+  (define (int01? x)
+    (and (integer? x)
+         (or (= x 0)
+             (= x 1))))
+  (and (list? lst)
+       (= (length lst) (length pintype-names))
+       (every int01? lst)))
+
+(or (pintype-can-drive-valid? pintype-can-drive)
     (begin
-      (define is-integer-list?
-	(lambda (list)
-	  (if (not (null? list))
-	      (if (integer? (car list))
-		  (if (or (< (car list) 0)
-			  (> (car list) 1))
-		      #f
-		      (is-integer-list? (cdr list)))
-		  #f)
-	      #t)))
-      (if (or (not (list? pintype-can-drive))
-	      (not (= (length pintype-can-drive) (length pintype-names)))
-	      (not (is-integer-list? pintype-can-drive)))
-	  (begin
-	    (display "INTERNAL ERROR: List of pins which can drive a net bad specified. Using default value.")
-	    (newline)
-	    (define pintype-can-drive 1))))
-    (define pintype-can-drive 1))     ; Later is redefined if it's not a list.
-
-(if (not (list? pintype-can-drive))
-;                                  unk in out io oc oe pas tp tri clk pwr undef
-    (define pintype-can-drive (list 1   0  1   1  1  1  1   1  1   0   1    0 )))
+      (display "INTERNAL ERROR: List of pins which can drive a net bad specified. Using default value.")
+      (newline)
+      (set! pintype-can-drive 1)))
 
 ; DRC matrix
 ;
 ; #\e: error    #\w: warning   #\c: correct
-(if (not (defined? 'drc-matrix))
-    (define drc-matrix (list
+(define-undefined drc-matrix
+  (list
 ;  Order is important !
 ;             unknown in    out   io    oc    oe    pas   tp    tri   clk   pwr unconnected
 ;unknown
@@ -247,25 +247,22 @@
   '(            #\c   #\c   #\e   #\w   #\e   #\e   #\c   #\e   #\e   #\e   #\c  )
 ;unconnected
   '(            #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e   #\e )
-)))
+))
 
 ;; Number of errors and warnings found
 (define errors_number 0)
 (define warnings_number 0)
 
-(if (not (defined? 'action-unused-slots))
-    (define action-unused-slots #\w)
+(define-undefined action-unused-slots #\w)
+
+(if (or (not (char? action-unused-slots))
+        (not (or (char=? action-unused-slots #\w)
+                 (char=? action-unused-slots #\c)
+                 (char=? action-unused-slots #\e))))
     (begin
-      (if (or (not (char? action-unused-slots))
- 	      (not (or (char=? action-unused-slots #\w) (char=? action-unused-slots #\c)
-		       (char=? action-unused-slots #\e))))
-	  (begin
-	    (display "INTERNAL ERROR: Action when unused slots are found has a wrong value. Using default.")
-	    (newline)
-	    (define action-unused-slots #\w))
-	  )
-      )
-    )
+      (display "INTERNAL ERROR: Action when unused slots are found has a wrong value. Using default.")
+      (newline)
+      (set! action-unused-slots #\w)))
 
 ;-----------------------------------------------------------------------
 ;   DRC matrix functions




_______________________________________________
geda-cvs mailing list
geda-cvs@xxxxxxxxxxxxxx
http://www.seul.org/cgi-bin/mailman/listinfo/geda-cvs