Comment 2 for bug 901222

Revision history for this message
Peter TB Brett (peter-b) wrote :

Hi Luigi,

Thank you for submitting this Scheme function. In order to commit it, I would appreciate it if you would make the following changes:

* The license for gEDA/gaf is GPLv2+. Could you please relicense as GPLv2+ instead of GPLv3+?
* The line with "string-trim-right" is not necessary, and prevents you from using directory names that start or end with whitespace (you wouldn't believe some of the things I've seen Windows users do!)
* Please use "substring" instead of "string-copy". This makes it easier to read the code, because it explains what you are doing better. :-)
* We don't use per-file changelogs in gEDA/gaf -- we write useful commit messages for git instead. :-) If this is accepted, the changelog section will need to be removed.

As you are probably aware, we currently have a "component-library-search" function in libgeda, and this behaves in a very similar way. What do you think about putting this in as an improved replacement for "component-library-search", and make the "prefix" argument optional?

  (use-modules (ice-9 optargs))

  (define (component-library-search dirname #:optional prefix)
    <body ...> )

Thanks,

Peter