[ cl-cookbook-Patches-1221039 ] correction to my-getenv

"SourceForge.net" <[email protected]> Wed, 15 Jun 2005 04:04:11 -0700
Newsgroups gmane.lisp.cookbook
Message-ID <[email protected]>
Patches item #1221039, was opened at 2005-06-15 11:24
Message generated for change (Comment added) made by nhabedi
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=447474&aid=1221039&group_id=46815

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
>Category: None
Group: None
>Status: Closed
>Resolution: Wont Fix
Priority: 5
Submitted By: Nobody/Anonymous (nobody)
>Assigned to: Edi Weitz (nhabedi)
Summary: correction to my-getenv

Initial Comment:

;; to work with CMU, my-getenv should be better defined as :

(defun my-getenv (name &optional default)
            #+CMU (let ((x (assoc
                            (intern name "KEYWORD")
                            ext:*environment-list*
                            :test #'string=)))
                    (if x (cdr x) default))
            #-CMU
            (or
             #+Allegro (sys:getenv name)
             #+CLISP (ext:getenv name)
             #+(or KCL GCL) (si:getenv name)
             #+ECL (si:getenv name)
             #+SBCL (sb-unix::posix-getenv name)
             #+LISPWORKS (lispworks:environment-variable name)
             default))



----------------------------------------------------------------------

>Comment By: Edi Weitz (nhabedi)
Date: 2005-06-15 13:04

Message:
Logged In: YES 
user_id=192106

Why is that better?  It potentially creates a new keyword on
each call.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=447474&aid=1221039&group_id=46815


-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click