Update of /project/cl-syslog/cvsroot/cl-syslog In directory clnet:/tmp/cvs-serv21871
Modified Files: cl-syslog.asd cl-syslog.lisp Log Message: Migrated from UFFI to CFFI for portable FFI-support.
--- /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.asd 2003/11/22 23:35:59 1.3 +++ /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.asd 2006/11/28 19:46:09 1.4 @@ -1,4 +1,4 @@ -;;;; $Id: cl-syslog.asd,v 1.3 2003/11/22 23:35:59 eenge Exp $ +;;;; $Id: cl-syslog.asd,v 1.4 2006/11/28 19:46:09 lnostdal Exp $ ;;;; $Source: /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.asd,v $
;;;; See the LICENSE file for licensing information. @@ -18,9 +18,9 @@ :version "0.1.0" :licence "MIT" :description "Common Lisp syslog interface" - :depends-on (:uffi) + :depends-on (:cffi) :properties ((#:author-email . "cl-syslog-devel@common-lisp.net") - (#:date . "$Date: 2003/11/22 23:35:59 $") + (#:date . "$Date: 2006/11/28 19:46:09 $") ((#:albert #:output-dir) . "doc/api-doc/") ((#:albert #:formats) . ("docbook")) ((#:albert #:docbook #:template) . "book") --- /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.lisp 2003/11/22 23:34:52 1.2 +++ /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.lisp 2006/11/28 19:46:09 1.3 @@ -1,4 +1,4 @@ -;;;; $Id: cl-syslog.lisp,v 1.2 2003/11/22 23:34:52 eenge Exp $ +;;;; $Id: cl-syslog.lisp,v 1.3 2006/11/28 19:46:09 lnostdal Exp $ ;;;; $Source: /project/cl-syslog/cvsroot/cl-syslog/cl-syslog.lisp,v $
;;;; See the LICENSE file for licensing information. @@ -27,20 +27,16 @@ ;; Foreign function ;;
-(uffi:def-function "openlog" - ((ident :cstring) - (option :int) - (facility :int)) - :returning :void) - -(uffi:def-function "closelog" - () - :returning :void) - -(uffi:def-function "syslog" - ((priority :int) - (format :cstring)) - :returning :void) +(cffi:defcfun "openlog" :void + (ident :string) + (option :int) + (facility :int)) + +(cffi:defcfun "closelog" :void) + +(cffi:defcfun "syslog" :void + (priority :int) + (format :string))
;; ;; Utility @@ -65,9 +61,9 @@
(defun log (name facility priority text &optional (option 0)) "Print message to syslog. - 'option' can be any of the +log...+ constants" - (openlog name option (get-facility facility)) - (syslog (get-priority priority) text) - (closelog) + (cffi:with-foreign-string (cname name) + (openlog cname option (get-facility facility)) + (syslog (get-priority priority) text) + (closelog)) text)