#3 correction to my-getenv

closed-wont-fix
None
5
2005-06-15
2005-06-15
Anonymous
No

;; 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))

Discussion

  • Edi Weitz

    Edi Weitz - 2005-06-15

    Logged In: YES
    user_id=192106

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

     
  • Edi Weitz

    Edi Weitz - 2005-06-15
    • labels: 398401 -->
    • assigned_to: nobody --> nhabedi
    • status: open --> closed-wont-fix
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks