(symbol (symbol-name identifier))
(string identifier)))
(escaped (make-string (length unescaped))))
- (dotimes (i (length unescaped))
- (setf (char escaped i)
- (cond ((equal (char unescaped i) #\-)
- #\_)
- ;; ...
- (t
- (char unescaped i)))))
- escaped))
+ (substitute #\_ #\- unescaped)))
(defmacro without-interrupts (&body body)
- #+lispworks `(mp:without-preemption ,@body)
#+allegro `(mp:without-scheduling ,@body)
+ #+clisp `(progn ,@body)
#+cmu `(system:without-interrupts ,@body)
- #+sbcl `(sb-sys::without-interrupts ,@body)
- #+openmcl `(ccl:without-interrupts ,@body))
+ #+lispworks `(mp:without-preemption ,@body)
+ #+openmcl `(ccl:without-interrupts ,@body)
+ #+sbcl `(sb-sys::without-interrupts ,@body))
(defun make-process-lock (name)
#+allegro (mp:make-process-lock :name name)
(incf dpos))))))
+(defun getenv (var)
+ "Return the value of the environment variable."
+ #+allegro (sys::getenv (string var))
+ #+clisp (ext:getenv (string var))
+ #+(or cmu scl)
+ (cdr (assoc (string var) ext:*environment-list* :test #'equalp
+ :key #'string))
+ #+lispworks (lw:environment-variable (string var))
+ #+mcl (ccl::getenv var)
+ #+sbcl (sb-ext:posix-getenv var))
+
(eval-when (:compile-toplevel :load-toplevel :execute)
(when (char= #\a (schar (symbol-name '#:a) 0))
(pushnew :clsql-lowercase-reader *features*)))
;; Default CommonSQL behavior is to upcase strings
(string-upcase str)))
-
(defun ensure-keyword (name)
"Returns keyword for a name"
(etypecase name
(eval-when (:compile-toplevel :load-toplevel :execute)
(setq cl:*features* (delete :clsql-lowercase-reader cl:*features*)))
+