Remove old CVS $Id$ keyword
[uffi.git] / src / corman / getenv-ccl.lisp
index fa328615ee0fa2ae22048670837a806821454e6f..966e0f7b0cb34bb5772ff576a8e524b3d065015b 100644 (file)
@@ -7,20 +7,13 @@
 ;;;; Programmer:    "Joe Marshall" <prunesquallor@attbi.com>
 ;;;; Date Started:  Feb 2002
 ;;;;
-`;;;; $Id: getenv-ccl.lisp,v 1.1 2002/10/01 17:05:29 kevin Exp $
-;;;;
-;;;; This file, part of UFFI, is Copyright (c) 2002 by Kevin M. Rosenberg
-;;;;
-;;;; UFFI users are granted the rights to distribute and use this software
-;;;; as governed by the terms of the Lisp Lesser GNU Public License
-;;;; (http://opensource.franz.com/preamble.html), also known as the LLGPL.
 ;;;; *************************************************************************
 
 (in-package :cl-user)
 
 (ct:defun-dll c-getenv ((lpname LPSTR)
-                       (lpbuffer LPSTR)
-                       (nsize LPDWORD))
+                        (lpbuffer LPSTR)
+                        (nsize LPDWORD))
   :library-name "kernel32.dll"
   :return-type DWORD
   :entry-name "GetEnvironmentVariableA"
@@ -34,7 +27,7 @@
     (let* ((needed-size (c-getenv cname buffer nsizebuf))
            (buffer1 (ct:malloc (1+ needed-size))))
       (setf (ct:cref lpdword nsizebuf 0) needed-size)
-      (prog1 (if (zerop (c-getenv cname buffer1 nsizebuf)) 
+      (prog1 (if (zerop (c-getenv cname buffer1 nsizebuf))
                  nil
                (ct:c-string-to-lisp-string buffer1))
         (ct:free buffer1)
@@ -58,7 +51,7 @@
         (t (error "HOST must be a string, list of strings, NIL or :unspecific"))))
 
 ;|
-(uffi:def-function ("getenv" c-getenv) 
+(uffi:def-function ("getenv" c-getenv)
     ((name :cstring))
   :returning :cstring)
 
   (check-type key string)
   (uffi:with-cstring (key-native key)
     (uffi:convert-from-cstring (c-getenv key-native))))
-    
+
 #examples-uffi
 (progn
   (flet ((print-results (str)
-          (format t "~&(getenv ~S) => ~S" str (my-getenv str))))
+           (format t "~&(getenv ~S) => ~S" str (my-getenv str))))
     (print-results "USER")
     (print-results "_FOO_")))
 
@@ -80,7 +73,7 @@
 (progn
   (util.test:test (my-getenv "_FOO_") nil :fail-info "Error retrieving non-existent getenv")
   (util.test:test (and (stringp (my-getenv "USER"))
-                      (< 0 (length (my-getenv "USER"))))
-                 t :fail-info "Error retrieving getenv")
+                       (< 0 (length (my-getenv "USER"))))
+                  t :fail-info "Error retrieving getenv")
 )