Hello Thi --

Thanks for the patch!  And welcome to the gEDA project (if you haven't
posted before)!

Before I stick the patch in CVS I thought I would ask:
What is the goal of this change?  It looks like a
condensation/clarification of existing code, but does it also change
any behaviors of gnet-PCB?     

Also, does ice-9 come with all guile installations?  I did some quick
Googling, and it looks like it does, but before we commit this change,
I would like to make sure that it doesn't introduce a new dependency.
OTOH, since ice-9 looks like it has a lot of useful stuff, perhaps
making it available for other netlisters would represent a useful
addition.  

Stuart


> 
> greetings gEDA hackers,
> 
> please find below a small patch to
> 
>   geda/devel/gnetlist/scheme/gnet-PCB.scm
> 
> in the factoring spirit (i.e., using available abstractions).  i
> hope it is tiny and meritous enough to be applied w/o paperwork.
> it can be made even tinier by moving the `use-modules' to some
> central place.
> 
> thi
> 
> _____________________________
> --- gnet-PCB.scm      3 Feb 2005 12:49:36 -0000       1.7
> +++ gnet-PCB.scm      3 Mar 2006 23:57:53 -0000
> @@ -22,10 +22,6 @@
>  
> +(use-modules (ice-9 format))
> +
>  (define (PCB:display-connections nets)
> -  (let ((k ""))
> -    (for-each (lambda (in-string)
> -                (set! k (string-append k in-string)))
> -              (map (lambda (net)
> -                     (string-append (car net) "-" (car (cdr net)) " "))
> -                   nets))
> -    (string-append k "\n")))
> +  (apply format #f "~:@{~A-~A ~}\n" nets))
>  
> 

Reply via email to