cells-cvs
Threads by month
- ----- 2025 -----
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2006 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2005 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2004 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2003 -----
- December
- November
January 2008
- 2 participants
- 40 discussions
Update of /project/cells/cvsroot/cells-gtk/cffi/src
In directory clnet:/tmp/cvs-serv9292/cffi/src
Added Files:
cffi-allegro.lisp cffi-clisp.lisp cffi-cmucl.lisp
cffi-corman.lisp cffi-ecl.lisp cffi-gcl.lisp
cffi-lispworks.lisp cffi-openmcl.lisp cffi-sbcl.lisp
cffi-scl.lisp early-types.lisp enum.lisp features.lisp
foreign-vars.lisp functions.lisp libraries.lisp package.lisp
strings.lisp types.lisp utils.lisp
Log Message:
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-allegro.lisp 2008/01/28 23:59:35 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-allegro.lisp 2008/01/28 23:59:35 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; cffi-allegro.lisp --- CFFI-SYS implementation for Allegro CL.
;;;
;;; Copyright (C) 2005-2006, Luis Oliveira <loliveira((a))common-lisp.net>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
;;;# Administrivia
(defpackage #:cffi-sys
(:use #:common-lisp #:cffi-utils)
(:export
#:canonicalize-symbol-name-case
#:pointerp
#:pointer-eq
#:null-pointer
#:null-pointer-p
#:inc-pointer
#:make-pointer
#:pointer-address
#:%foreign-alloc
#:foreign-free
#:with-foreign-pointer
#:%foreign-funcall
#:%foreign-funcall-pointer
#:%foreign-type-alignment
#:%foreign-type-size
#:%load-foreign-library
#:%close-foreign-library
#:%mem-ref
#:%mem-set
;#:make-shareable-byte-vector
;#:with-pointer-to-vector-data
#:foreign-symbol-pointer
#:defcfun-helper-forms
#:%defcallback
#:%callback
#:finalize
#:cancel-finalization))
(in-package #:cffi-sys)
;;;# Features
(eval-when (:compile-toplevel :load-toplevel :execute)
(mapc (lambda (feature) (pushnew feature *features*))
'(;; Backend mis-features.
cffi-features:no-long-long
;; OS/CPU features.
#+macosx cffi-features:darwin
#+unix cffi-features:unix
#+mswindows cffi-features:windows
#+powerpc cffi-features:ppc32
#+x86 cffi-features:x86
#+x86-64 cffi-features:x86-64
)))
;;; Symbol case.
(defun canonicalize-symbol-name-case (name)
(declare (string name))
(if (eq excl:*current-case-mode* :case-sensitive-lower)
(string-downcase name)
(string-upcase name)))
;;;# Basic Pointer Operations
(defun pointerp (ptr)
"Return true if PTR is a foreign pointer."
(integerp ptr))
(defun pointer-eq (ptr1 ptr2)
"Return true if PTR1 and PTR2 point to the same address."
(eql ptr1 ptr2))
(defun null-pointer ()
"Return a null pointer."
0)
(defun null-pointer-p (ptr)
"Return true if PTR is a null pointer."
(zerop ptr))
(defun inc-pointer (ptr offset)
"Return a pointer pointing OFFSET bytes past PTR."
(+ ptr offset))
(defun make-pointer (address)
"Return a pointer pointing to ADDRESS."
address)
(defun pointer-address (ptr)
"Return the address pointed to by PTR."
ptr)
;;;# Allocation
;;;
;;; Functions and macros for allocating foreign memory on the stack
;;; and on the heap. The main CFFI package defines macros that wrap
;;; FOREIGN-ALLOC and FOREIGN-FREE in UNWIND-PROTECT for the common usage
;;; when the memory has dynamic extent.
(defun %foreign-alloc (size)
"Allocate SIZE bytes on the heap and return a pointer."
(ff:allocate-fobject :char :c size))
(defun foreign-free (ptr)
"Free a PTR allocated by FOREIGN-ALLOC."
(ff:free-fobject ptr))
(defmacro with-foreign-pointer ((var size &optional size-var) &body body)
"Bind VAR to SIZE bytes of foreign memory during BODY. The
pointer in VAR is invalid beyond the dynamic extent of BODY, and
may be stack-allocated if supported by the implementation. If
SIZE-VAR is supplied, it will be bound to SIZE during BODY."
(unless size-var
(setf size-var (gensym "SIZE")))
`(let ((,size-var ,size))
(declare (ignorable ,size-var))
(ff:with-stack-fobject (,var :char :allocation :c :size ,size-var)
,@body)))
;;;# Shareable Vectors
;;;
;;; This interface is very experimental. WITH-POINTER-TO-VECTOR-DATA
;;; should be defined to perform a copy-in/copy-out if the Lisp
;;; implementation can't do this.
;(defun make-shareable-byte-vector (size)
; "Create a Lisp vector of SIZE bytes can passed to
;WITH-POINTER-TO-VECTOR-DATA."
; (make-array size :element-type '(unsigned-byte 8)))
;
;(defmacro with-pointer-to-vector-data ((ptr-var vector) &body body)
; "Bind PTR-VAR to a foreign pointer to the data in VECTOR."
; `(sb-sys:without-gcing
; (let ((,ptr-var (sb-sys:vector-sap ,vector)))
; ,@body)))
;;;# Dereferencing
(defun convert-foreign-type (type-keyword &optional (context :normal))
"Convert a CFFI type keyword to an Allegro type."
(ecase type-keyword
(:char :char)
(:unsigned-char :unsigned-char)
(:short :short)
(:unsigned-short :unsigned-short)
(:int :int)
(:unsigned-int :unsigned-int)
(:long :long)
(:unsigned-long :unsigned-long)
(:float :float)
(:double :double)
(:pointer (ecase context
(:normal '(* :void))
(:funcall :foreign-address)))
(:void :void)))
(defun %mem-ref (ptr type &optional (offset 0))
"Dereference an object of TYPE at OFFSET bytes from PTR."
(unless (zerop offset)
(setf ptr (inc-pointer ptr offset)))
(ff:fslot-value-typed (convert-foreign-type type) :c ptr))
;;; Compiler macro to open-code the call to FSLOT-VALUE-TYPED when the
;;; CFFI type is constant. Allegro does its own transformation on the
;;; call that results in efficient code.
(define-compiler-macro %mem-ref (&whole form ptr type &optional (off 0))
(if (constantp type)
(let ((ptr-form (if (eql off 0) ptr `(+ ,ptr ,off))))
`(ff:fslot-value-typed ',(convert-foreign-type (eval type))
:c ,ptr-form))
form))
(defun %mem-set (value ptr type &optional (offset 0))
"Set the object of TYPE at OFFSET bytes from PTR."
(unless (zerop offset)
(setf ptr (inc-pointer ptr offset)))
(setf (ff:fslot-value-typed (convert-foreign-type type) :c ptr) value))
;;; Compiler macro to open-code the call to (SETF FSLOT-VALUE-TYPED)
;;; when the CFFI type is constant. Allegro does its own
;;; transformation on the call that results in efficient code.
(define-compiler-macro %mem-set (&whole form val ptr type &optional (off 0))
(if (constantp type)
(once-only (val)
(let ((ptr-form (if (eql off 0) ptr `(+ ,ptr ,off))))
`(setf (ff:fslot-value-typed ',(convert-foreign-type (eval type))
:c ,ptr-form) ,val)))
form))
;;;# Calling Foreign Functions
(defun %foreign-type-size (type-keyword)
"Return the size in bytes of a foreign type."
(ff:sizeof-fobject (convert-foreign-type type-keyword)))
(defun %foreign-type-alignment (type-keyword)
"Returns the alignment in bytes of a foreign type."
#+(and powerpc macosx32)
(when (eq type-keyword :double)
(return-from %foreign-type-alignment 8))
;; No override necessary for the remaining types....
(ff::sized-ftype-prim-align
(ff::iforeign-type-sftype
(ff:get-foreign-type
(convert-foreign-type type-keyword)))))
(defun foreign-funcall-type-and-args (args)
"Returns a list of types, list of args and return type."
(let ((return-type :void))
(loop for (type arg) on args by #'cddr
if arg collect (convert-foreign-type type :funcall) into types
and collect arg into fargs
else do (setf return-type (convert-foreign-type type :funcall))
finally (return (values types fargs return-type)))))
(defun convert-to-lisp-type (type)
(if (equal '(* :void) type)
'integer
(ecase type
(:char 'signed-byte)
(:unsigned-char 'integer) ;'unsigned-byte)
((:short
:unsigned-short
:int
:unsigned-int
:long
:unsigned-long) 'integer)
(:float 'single-float)
(:double 'double-float)
(:foreign-address :foreign-address)
(:void 'null))))
(defun foreign-allegro-type (type)
(if (eq type :foreign-address)
nil
type))
(defun allegro-type-pair (type)
(list (foreign-allegro-type type)
(convert-to-lisp-type type)))
#+ignore
(defun note-named-foreign-function (symbol name types rettype)
"Give Allegro's compiler a hint to perform a direct call."
`(eval-when (:compile-toplevel :load-toplevel :execute)
(setf (get ',symbol 'system::direct-ff-call)
(list '(,name :language :c)
t ; callback
:c ; convention
;; return type '(:c-type lisp-type)
',(allegro-type-pair (convert-foreign-type rettype :funcall))
;; arg types '({(:c-type lisp-type)}*)
'(,@(loop for type in types
collect (allegro-type-pair
(convert-foreign-type type :funcall))))
nil ; arg-checking
ff::ep-flag-never-release))))
(defmacro %foreign-funcall (name &rest args)
(multiple-value-bind (types fargs rettype)
(foreign-funcall-type-and-args args)
`(system::ff-funcall
(load-time-value (excl::determine-foreign-address
'(,name :language :c)
ff::ep-flag-never-release
nil ; method-index
))
;; arg types {'(:c-type lisp-type) argN}*
,@(mapcan (lambda (type arg)
`(',(allegro-type-pair type) ,arg))
types fargs)
;; return type '(:c-type lisp-type)
',(allegro-type-pair rettype))))
(defun defcfun-helper-forms (name lisp-name rettype args types)
"Return 2 values for DEFCFUN. A prelude form and a caller form."
(let ((ff-name (intern (format nil "%cffi-foreign-function/~A" lisp-name))))
(values
`(ff:def-foreign-call (,ff-name ,name)
,(mapcar (lambda (ty)
(let ((allegro-type (convert-foreign-type ty)))
(list (gensym) allegro-type
(convert-to-lisp-type allegro-type))))
types)
:returning ,(allegro-type-pair
(convert-foreign-type rettype :funcall))
;; Don't use call-direct when there are no arguments.
,@(unless (null args) '(:call-direct t))
:arg-checking nil
:strings-convert nil)
`(,ff-name ,@args))))
;;; See doc/allegro-internals.txt for a clue about entry-vec.
(defmacro %foreign-funcall-pointer (ptr &rest args)
(multiple-value-bind (types fargs rettype)
(foreign-funcall-type-and-args args)
(with-unique-names (entry-vec)
`(let ((,entry-vec (excl::make-entry-vec-boa)))
(setf (aref ,entry-vec 1) ,ptr) ; set jump address
(system::ff-funcall
,entry-vec
;; arg types {'(:c-type lisp-type) argN}*
,@(mapcan (lambda (type arg)
`(',(allegro-type-pair type) ,arg))
types fargs)
;; return type '(:c-type lisp-type)
',(allegro-type-pair rettype))))))
;;;# Callbacks
;;; The *CALLBACKS* hash table contains information about a callback
;;; for the Allegro FFI. The key is the name of the CFFI callback,
;;; and the value is a cons, the car containing the symbol the
;;; callback was defined on in the CFFI-CALLBACKS package, the cdr
;;; being an Allegro FFI pointer (a fixnum) that can be passed to C
;;; functions.
;;;
;;; These pointers must be restored when a saved Lisp image is loaded.
;;; The RESTORE-CALLBACKS function is added to *RESTART-ACTIONS* to
;;; re-register the callbacks during Lisp startup.
(defvar *callbacks* (make-hash-table))
;;; Register a callback in the *CALLBACKS* hash table.
(defun register-callback (cffi-name callback-name)
(setf (gethash cffi-name *callbacks*)
(cons callback-name (ff:register-foreign-callable
callback-name :reuse t))))
;;; Restore the saved pointers in *CALLBACKS* when loading an image.
(defun restore-callbacks ()
(maphash (lambda (key value)
(register-callback key (car value)))
*callbacks*))
;;; Arrange for RESTORE-CALLBACKS to run when a saved image containing
;;; CFFI is restarted.
(eval-when (:load-toplevel :execute)
(pushnew 'restore-callbacks excl:*restart-actions*))
;;; Create a package to contain the symbols for callback functions.
(defpackage #:cffi-callbacks
(:use))
(defun intern-callback (name)
(intern (format nil "~A::~A" (package-name (symbol-package name))
(symbol-name name))
'#:cffi-callbacks))
(defmacro %defcallback (name rettype arg-names arg-types &body body)
(declare (ignore rettype))
(let ((cb-name (intern-callback name)))
`(progn
(ff:defun-foreign-callable ,cb-name
,(mapcar (lambda (sym type) (list sym (convert-foreign-type type)))
arg-names arg-types)
(declare (:convention :c))
,@body)
(register-callback ',name ',cb-name))))
;;; Return the saved Lisp callback pointer from *CALLBACKS* for the
;;; CFFI callback named NAME.
(defun %callback (name)
(or (cdr (gethash name *callbacks*))
(error "Undefined callback: ~S" name)))
;;;# Loading and Closing Foreign Libraries
(defun %load-foreign-library (name)
"Load the foreign library NAME."
;; ACL 8.0 honors the :FOREIGN option and always tries to foreign load
;; the argument. However, previous versions do not and will only
;; foreign load the argument if its type is a member of the
;; EXCL::*LOAD-FOREIGN-TYPES* list. Therefore, we bind that special
;; to a list containing whatever type NAME has.
(let ((excl::*load-foreign-types*
(list (pathname-type (parse-namestring name)))))
(ignore-errors #+(version>= 7) (load name :foreign t)
[40 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-clisp.lisp 2008/01/28 23:59:36 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-clisp.lisp 2008/01/28 23:59:36 1.1
[398 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-cmucl.lisp 2008/01/28 23:59:36 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-cmucl.lisp 2008/01/28 23:59:36 1.1
[763 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-corman.lisp 2008/01/28 23:59:36 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-corman.lisp 2008/01/28 23:59:36 1.1
[1123 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-ecl.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-ecl.lisp 2008/01/28 23:59:37 1.1
[1411 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-gcl.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-gcl.lisp 2008/01/28 23:59:37 1.1
[1724 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-lispworks.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-lispworks.lisp 2008/01/28 23:59:37 1.1
[2141 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-openmcl.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-openmcl.lisp 2008/01/28 23:59:37 1.1
[2470 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-sbcl.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-sbcl.lisp 2008/01/28 23:59:37 1.1
[2803 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/cffi-scl.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/cffi-scl.lisp 2008/01/28 23:59:37 1.1
[3152 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/early-types.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/early-types.lisp 2008/01/28 23:59:37 1.1
[3694 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/enum.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/enum.lisp 2008/01/28 23:59:37 1.1
[3898 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/features.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/features.lisp 2008/01/28 23:59:37 1.1
[3955 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/foreign-vars.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/foreign-vars.lisp 2008/01/28 23:59:37 1.1
[4039 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/functions.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/functions.lisp 2008/01/28 23:59:37 1.1
[4248 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/libraries.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/libraries.lisp 2008/01/28 23:59:37 1.1
[4503 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/package.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/package.lisp 2008/01/28 23:59:37 1.1
[4620 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/strings.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/strings.lisp 2008/01/28 23:59:37 1.1
[4760 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/types.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/types.lisp 2008/01/28 23:59:37 1.1
[5446 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/src/utils.lisp 2008/01/28 23:59:37 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/src/utils.lisp 2008/01/28 23:59:37 1.1
[5632 lines skipped]
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/scripts
In directory clnet:/tmp/cvs-serv9292/cffi/scripts
Added Files:
release.sh
Log Message:
--- /project/cells/cvsroot/cells-gtk/cffi/scripts/release.sh 2008/01/28 23:59:34 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/scripts/release.sh 2008/01/28 23:59:34 1.1
#! /bin/sh
#
# release.sh --- Create a signed tarball release for ASDF-INSTALL.
#
# Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy,
# modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
VERSION=${VERSION:=`date +"%Y%m%d"`}
TARBALL_NAME="cffi_$VERSION"
TARBALL="$TARBALL_NAME.tar.gz"
SIGNATURE="$TARBALL.asc"
RELEASE_DIR=${RELEASE_DIR:="/project/cffi/public_html/releases"}
echo "Creating distribution..."
darcs dist -d "$TARBALL_NAME"
echo "Signing tarball..."
gpg -b -a "$TARBALL_NAME.tar.gz"
echo "Copying tarball to web server..."
scp "$TARBALL" "$SIGNATURE" common-lisp.net:"$RELEASE_DIR"
echo "Uploaded $TARBALL and $SIGNATURE."
echo "Don't forget to update the link on the CLiki page!"
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/examples
In directory clnet:/tmp/cvs-serv9292/cffi/examples
Added Files:
examples.lisp gethostname.lisp gettimeofday.lisp
run-examples.lisp translator-test.lisp
Log Message:
--- /project/cells/cvsroot/cells-gtk/cffi/examples/examples.lisp 2008/01/28 23:59:27 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/examples/examples.lisp 2008/01/28 23:59:27 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; examples.lisp --- Simple test examples of CFFI.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(defpackage #:cffi-examples
(:use #:cl #:cffi)
(:export
#:run-examples
#:sqrtf
#:getenv))
(in-package #:cffi-examples)
;; A simple libc function.
(defcfun "sqrtf" :float
(n :float))
;; This definition uses the STRING type translator to automatically
;; convert Lisp strings to foreign strings and vice versa.
(defcfun "getenv" :string
(name :string))
;; Calling a varargs function.
(defun sprintf-test ()
"Test calling a varargs function."
(with-foreign-pointer-as-string (buf 255 buf-size)
(foreign-funcall
"snprintf" :pointer buf :int buf-size
:string "%d %f #x%x!" :int 666
:double (coerce pi 'double-float)
:unsigned-int #xcafebabe
:void)))
;; Defining an emerated type.
(defcenum test-enum
(:invalid 0)
(:positive 1)
(:negative -1))
;; Use the absolute value function to test keyword/enum translation.
(defcfun ("abs" c-abs) test-enum
(n test-enum))
(defun cffi-version ()
(asdf:component-version (asdf:find-system 'cffi)))
(defun run-examples ()
(format t "~&;;; CFFI version ~A on ~A ~A:~%"
(cffi-version) (lisp-implementation-type)
(lisp-implementation-version))
(format t "~&;; shell: ~A~%" (getenv "SHELL"))
(format t "~&;; sprintf test: ~A~%" (sprintf-test))
(format t "~&;; (c-abs :positive): ~A~%" (c-abs :positive))
(format t "~&;; (c-abs :negative): ~A~%" (c-abs :negative))
(force-output))
--- /project/cells/cvsroot/cells-gtk/cffi/examples/gethostname.lisp 2008/01/28 23:59:27 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/examples/gethostname.lisp 2008/01/28 23:59:27 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; gethostname.lisp --- A simple CFFI example.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
;;;# CFFI Example: gethostname binding
;;;
;;; This is a very simple CFFI example that illustrates calling a C
;;; function that fills in a user-supplied string buffer.
(defpackage #:cffi-example-gethostname
(:use #:common-lisp #:cffi)
(:export #:gethostname))
(in-package #:cffi-example-gethostname)
;;; Define the Lisp function %GETHOSTNAME to call the C 'gethostname'
;;; function, which will fill BUF with up to BUFSIZE characters of the
;;; system's hostname.
(defcfun ("gethostname" %gethostname) :int
(buf :pointer)
(bufsize :int))
;;; Define a Lispy interface to 'gethostname'. The utility macro
;;; WITH-FOREIGN-POINTER-AS-STRING is used to allocate a temporary
;;; buffer and return it as a Lisp string.
(defun gethostname ()
(with-foreign-pointer-as-string (buf 255 bufsize)
(%gethostname buf bufsize)))
--- /project/cells/cvsroot/cells-gtk/cffi/examples/gettimeofday.lisp 2008/01/28 23:59:27 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/examples/gettimeofday.lisp 2008/01/28 23:59:27 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; gettimeofday.lisp --- Example CFFI binding to gettimeofday(2)
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
;;;# CFFI Example: gettimeofday binding
;;;
;;; This example illustrates the use of foreign structures, typedefs,
;;; and using type translators to do checking of input and output
;;; arguments to a foreign function.
(defpackage #:cffi-example-gettimeofday
(:use #:common-lisp #:cffi #:cffi-utils)
(:export #:gettimeofday))
(in-package #:cffi-example-gettimeofday)
;;; Define the TIMEVAL structure used by 'gettimeofday'. This assumes
;;; that 'time_t' is a 'long' --- it would be nice if CFFI could
;;; provide a proper :TIME-T type to help make this portable.
(defcstruct timeval
(tv-sec :long)
(tv-usec :long))
;;; A NULL-POINTER is a foreign :POINTER that must always be NULL.
;;; Both a NULL pointer and NIL are legal values---any others will
;;; result in a runtime error.
(defctype null-pointer :pointer)
;;; This type translator is used to ensure that a NULL-POINTER has a
;;; null value. It also converts NIL to a null pointer.
(defmethod translate-to-foreign (value (name (eql 'null-pointer)))
(cond
((null value) (null-pointer))
((null-pointer-p value) value)
(t (error "~A is not a null pointer." value))))
;;; The SYSCALL-RESULT type is an integer type used for the return
;;; value of C functions that return -1 and set errno on errors.
;;; Someday when CFFI has a portable interface for dealing with
;;; 'errno', this error reporting can be more useful.
(defctype syscall-result :int)
;;; Type translator to check a SYSCALL-RESULT and signal a Lisp error
;;; if the value is negative.
(defmethod translate-from-foreign (value (name (eql 'syscall-result)))
(if (minusp value)
(error "System call failed with return value ~D." value)
value))
;;; Define the Lisp function %GETTIMEOFDAY to call the C function
;;; 'gettimeofday', passing a pointer to the TIMEVAL structure to fill
;;; in. The TZP parameter is deprecated and should be NULL --- we can
;;; enforce this by using our NULL-POINTER type defined above.
(defcfun ("gettimeofday" %gettimeofday) syscall-result
(tp :pointer)
(tzp null-pointer))
;;; Define a Lispy interface to 'gettimeofday' that returns the
;;; seconds and microseconds as multiple values.
(defun gettimeofday ()
(with-foreign-object (tv 'timeval)
(%gettimeofday tv nil)
(with-foreign-slots ((tv-sec tv-usec) tv timeval)
(values tv-sec tv-usec))))
--- /project/cells/cvsroot/cells-gtk/cffi/examples/run-examples.lisp 2008/01/28 23:59:27 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/examples/run-examples.lisp 2008/01/28 23:59:27 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; run-examples.lisp --- Simple script to run the examples.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(setf *load-verbose* nil *compile-verbose* nil)
#+(and (not asdf) (or sbcl openmcl))
(require "asdf")
#+clisp
(load "~/Downloads/asdf")
(asdf:operate 'asdf:load-op 'cffi-examples :verbose nil)
(cffi-examples:run-examples)
(force-output)
(quit)
--- /project/cells/cvsroot/cells-gtk/cffi/examples/translator-test.lisp 2008/01/28 23:59:27 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/examples/translator-test.lisp 2008/01/28 23:59:27 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; translator-test.lisp --- Testing type translators.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(defpackage #:cffi-translator-test
(:use #:common-lisp #:cffi #:cffi-utils))
(in-package #:cffi-translator-test)
;;;# Verbose Pointer Translator
;;;
;;; This is a silly type translator that doesn't actually do any
;;; translating, but it prints out a debug message when the pointer is
;;; converted to/from its foreign representation.
(defctype verbose-pointer :pointer)
(defmethod translate-to-foreign (value (name (eql 'verbose-pointer)))
(format *debug-io* "~&;; to foreign: VERBOSE-POINTER: ~S~%" value)
value)
(defmethod translate-from-foreign (value (name (eql 'verbose-pointer)))
(format *debug-io* "~&;; from foreign: VERBOSE-POINTER: ~S~%" value)
value)
;;;# Verbose String Translator
;;;
;;; A VERBOSE-STRING is a typedef for a VERBOSE-POINTER except the
;;; Lisp string is first converted to a C string. If things are
;;; working properly, both type translators should be called when
;;; converting a Lisp string to/from a C string.
;;;
;;; The translators should be called most-specific-first when
;;; translating to C, and most-specific-last when translating from C.
(defctype verbose-string verbose-pointer)
(defmethod translate-to-foreign ((s string) (name (eql 'verbose-string)))
(let ((value (foreign-string-alloc s)))
(format *debug-io* "~&;; to foreign: VERBOSE-STRING: ~S -> ~S~%" s value)
(values value t)))
(defmethod translate-to-foreign (value (name (eql 'verbose-string)))
(if (pointerp value)
(progn
(format *debug-io* "~&;; to foreign: VERBOSE-STRING: ~S -> ~:*~S~%" value)
(values value nil))
(error "Cannot convert ~S to a foreign string: it is not a Lisp ~
string or pointer." value)))
(defmethod translate-from-foreign (ptr (name (eql 'verbose-string)))
(let ((value (foreign-string-to-lisp ptr)))
(format *debug-io* "~&;; from foreign: VERBOSE-STRING: ~S -> ~S~%" ptr value)
value))
(defmethod free-translated-object (ptr (name (eql 'verbose-string)) free-p)
(when free-p
(foreign-string-free ptr)))
(defun test-verbose-string ()
(foreign-funcall "getenv" verbose-string "SHELL" verbose-string))
;;;# Testing Chained Parameters
(defctype inner-type :int)
(defctype middle-type inner-type)
(defctype outer-type middle-type)
(defmethod translate-to-foreign (value (name (eql 'inner-type)))
(values value 1))
(defmethod translate-to-foreign (value (name (eql 'middle-type)))
(values value 2))
(defmethod translate-to-foreign (value (name (eql 'outer-type)))
(values value 3))
(defmethod free-translated-object (value (name (eql 'inner-type)) param)
(format t "~&;; free inner-type ~A~%" param))
(defmethod free-translated-object (value (name (eql 'middle-type)) param)
(format t "~&;; free middle-type ~A~%" param))
(defmethod free-translated-object (value (name (eql 'outer-type)) param)
(format t "~&;; free outer-type ~A~%" param))
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi
In directory clnet:/tmp/cvs-serv9292/cffi
Added Files:
COPYRIGHT HEADER Makefile README TODO cffi-examples.asd
cffi-tests.asd cffi-uffi-compat.asd cffi.asd cffi.lpr
Log Message:
--- /project/cells/cvsroot/cells-gtk/cffi/COPYRIGHT 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/COPYRIGHT 2008/01/28 23:59:25 1.1
Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
DEALINGS IN THE SOFTWARE.
--- /project/cells/cvsroot/cells-gtk/cffi/HEADER 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/HEADER 2008/01/28 23:59:26 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; filename --- description
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
--- /project/cells/cvsroot/cells-gtk/cffi/Makefile 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/Makefile 2008/01/28 23:59:26 1.1
# -*- Mode: Makefile; tab-width: 3; indent-tabs-mode: t -*-
#
# Makefile --- Make targets for various tasks.
#
# Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy,
# modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# This way you can easily run the tests for different versions
# of each lisp with, e.g. ALLEGRO=/path/to/some/lisp make test-allegro
CMUCL ?= lisp
OPENMCL ?= openmcl
SBCL ?= sbcl
CLISP ?= clisp
ALLEGRO ?= acl
SCL ?= scl
shlibs:
@$(MAKE) -wC tests shlibs
clean:
@$(MAKE) -wC tests clean
find . -name ".fasls" | xargs rm -rf
find . \( -name "*.dfsl" -o -name "*.fasl" -o -name "*.fas" -o -name "*.lib" -o -name "*.x86f" -o -name "*.amd64f" -o -name "*.sparcf" -o -name "*.sparc64f" -o -name "*.hpf" -o -name "*.hp64f" -o -name "*.ppcf" -o -name "*.nfasl" -o -name "*.ufsl" -o -name "*.fsl" -o -name "*.lx64fsl" \) -exec rm {} \;
test-openmcl:
@-$(OPENMCL) --load tests/run-tests.lisp
test-sbcl:
@-$(SBCL) --noinform --load tests/run-tests.lisp
test-cmucl:
@-$(CMUCL) -load tests/run-tests.lisp
test-scl:
@-$(SCL) -load tests/run-tests.lisp
test-clisp:
@-$(CLISP) -q -x '(load "tests/run-tests.lisp")'
test-clisp-modern:
@-$(CLISP) -modern -q -x '(load "tests/run-tests.lisp")'
test-allegro:
@-$(ALLEGRO) -L tests/run-tests.lisp
test: test-openmcl test-sbcl test-cmucl test-clisp
# vim: ft=make ts=3 noet
--- /project/cells/cvsroot/cells-gtk/cffi/README 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/README 2008/01/28 23:59:26 1.1
CFFI, the Common Foreign Function Interface, purports to be a portable
foreign function interface, similar in spirit to UFFI.
Unlike UFFI, CFFI requires only a small set of low-level functionality
from the Lisp implementation, such as calling a foreign function by
name, allocating foreign memory, and dereferencing pointers.
More complex tasks like accessing foreign structures can be done in
portable "user space" code, making use of the low-level memory access
operations defined by the implementation-specific bits.
CFFI also aims to be more efficient than UFFI when possible. In
particular, UFFI's use of aliens in CMUCL and SBCL can be tricky to
get right. CFFI avoids this by using system area pointers directly
instead of alien objects. All foreign function definitions and uses
should compile without alien-value compiler notes in CMUCL/SBCL.
--- /project/cells/cvsroot/cells-gtk/cffi/TODO 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/TODO 2008/01/28 23:59:26 1.1
-*- Text -*-
This is a collection of TODO items and ideas in no particular order.
### Testing
-> Test uffi-compat with more UFFI libraries.
-> Write more FOREIGN-GLOBALS.SET.* tests.
-> Finish tests/random-tester.lisp
-> Write benchmarks comparing CFFI vs. native FFIs and also demonstrating
performance of each platform.
-> Write more STRUCT.ALIGNMENT.* tests (namely involving the :LONG-LONG
and :UNSIGNED-LONG-LONG types) and test them in more ABIs.
-> Run tests both interpreted (where it makes sense) and compiled.
-> Run tests with the different kinds of shared libraries available on
MacOS X.
### Ports
-> Finish GCL port.
-> As of 2006-06-27, CVS ECL fails 31 tests on linux/x86 and 35 tests
on darwin/ppc. Need to look into this.
-> Fix bugs in the Corman port.
-> Port to MCL.
### Features
-> Implement CFFI-SYS:%CLOSE-FOREIGN-LIBRARY for all supported Lisps and
implement a higher-level CFFI:CLOSE-FOREIGN-LIBRARY.
-> Implement a declarative interface for FOREIGN-FUNCALL-PTR, similar to
DEFCUN/FOREIGN-FUNCALL.
-> Figure out how to portably define types like: time_t, size_t, wchar_t,
etc... Likely to involve something like SB-GROVEL and possibly avoiding
this step on known platforms?
-> [Lost Idea] Something involving finalizers?
-> Implement the proposed interfaces (see doc/).
-> Add the ability to specify the calling convention to the interface.
-> Implement CFFI-SYS:ERRNO-VALUE (name?).
-> Extend FOREIGN-SLOT-VALUE and make it accept multiple "indices" for
directly accessing structs inside structs, arrays inside structs, etc...
-> Implement EXPLAIN-FOREIGN-SLOT-VALUE.
-> Implement :in/:out/:in-out for DEFCFUN (and FOREIGN-FUNCALL?).
-> Add support for multiple memory allocation schemes (like CLISP), namely
support for allocating with malloc() (so that it can be freed on the C
side)>
-> Extend DEFCVAR's symbol macro in order to handle memory (de)allocation
automatically (see CLISP).
-> Implement byte swapping routines (see /usr/include/linux/byteorder)
-> [Lost Idea] Implement UB8-REF?
-> [Lost Idea] Something about MEM-READ-C-STRING returning multiple value?
-> Implement an array type? Useful when we're working with ranks >= 2?
-> Implement bitfields. To read: get the word, LDB it. To write: get the
word, PDB it, put the word.
-> External encodings for the :STRING type. See:
<http://article.gmane.org/gmane.lisp.cffi.devel/292>
-> Define a lisp type for pointers in the backends. Eg: for clisp:
(deftype pointer-type (or ffi:foreign-address null))
Useful for type declarations.
-> Warn about :void in places where it doesn't make sense.
### Underspecified Semantics
-> (setf (mem-ref ptr <aggregate-type> offset) <value>)
-> Review the interface for coherence across Lisps with regard to
behaviour in "exceptional" situations. Eg: threads, dumping cores,
accessing foreign symbols that don't exist, etc...
-> On Lispworks a Lisp float is a double and therefore won't necessarily
fit in a C float. Figure out a way to handle this.
-> Allegro: callbacks' return values.
-> Lack of uniformity with regard to pointers. Allegro: 0 -> NULL.
CLISP/Lispworks: NIL -> NULL.
-> Some lisps will accept a lisp float being passed to :double
and a lisp double to :float. We should either coerce on lisps that
don't accept this or check-type on lisps that do. Probably the former
is better since on lispworks/x86 double == float.
-> What happens when the same library is loaded twice.
### Possible Optimizations
-> More compiler macros on some of the CFFI-SYS implementations.
-> Optimize UFFI-COMPAT when the vector stuff is implemented.
-> Being able to declare that some C int will always fit in a Lisp
fixnum. Allegro has a :fixnum ftype and CMUCL/SBCL can use
(unsigned-byte 29) others could perhaps behave like :int?
-> An option for defcfun to expand into a compiler macro which would
allow the macroexpansion-time translators to look at the forms
passed to the functions.
### Known Issues
-> CLISP FASL portability is broken. Fix this by placing LOAD-TIME-VALUE
forms in the right places and moving other calculations to load-time.
(eg: calculating struct size/alignment.) Ideally we'd only move them
to load-time when we actually care about fasl portability.
(defmacro maybe-load-time-value (form)
(if <we care about fasl portability>
`(load-time-value ,form)
form))
-> cffi-tests.asd's :c-test-lib component is causing the whole testsuite
to be recompiled everytime. Figure that out.
-> The (if (constantp foo) (do-something-with (eval foo)) ...) pattern
used in many places throughout the code is apparently not 100% safe.
-> On ECL platforms without DFFI we need to build a non-linked version
of libtest.
### Documentation
-> Fill the missing sections in the CFFI User Manual.
-> Update the CFFI-SYS Specification.
-> Generally improve the reference docs and examples.
### Other
-> Type-checking pointer interface.
--- /project/cells/cvsroot/cells-gtk/cffi/cffi-examples.asd 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/cffi-examples.asd 2008/01/28 23:59:26 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; cffi-examples.asd --- ASDF system definition for CFFI examples.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(defpackage #:cffi-examples-system
(:use #:cl #:asdf))
(in-package #:cffi-examples-system)
(defsystem cffi-examples
:description "CFFI Examples"
:author "James Bielman <jamesjb(a)jamesjb.com>"
:components
((:module examples
:components
((:file "examples")
(:file "gethostname")
(:file "gettimeofday"))))
:depends-on (cffi))
--- /project/cells/cvsroot/cells-gtk/cffi/cffi-tests.asd 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/cffi-tests.asd 2008/01/28 23:59:26 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; cffi-tests.asd --- ASDF system definition for CFFI unit tests.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(defpackage #:cffi-tests-system
(:use #:cl #:asdf))
(in-package #:cffi-tests-system)
(defvar *tests-dir* (append (pathname-directory *load-truename*) '("tests")))
(defclass c-test-lib (c-source-file)
())
(defmethod perform ((o load-op) (c c-test-lib))
nil)
(defmethod perform ((o load-source-op) (c c-test-lib))
nil)
(defmethod perform ((o compile-op) (c c-test-lib))
#-(or win32 mswindows)
(unless (zerop (run-shell-command
#-freebsd "cd ~A; make"
#+freebsd "cd ~A; gmake"
(namestring (make-pathname :name nil :type nil
:directory *tests-dir*))))
(error 'operation-error :component c :operation o)))
(defsystem cffi-tests
:description "Unit tests for CFFI."
:depends-on (cffi rt)
:components
((:module "tests"
:serial t
:components
((:c-test-lib "libtest")
(:file "package")
(:file "bindings")
(:file "funcall")
(:file "defcfun")
(:file "callbacks")
(:file "foreign-globals")
(:file "memory")
(:file "struct")
(:file "union")
(:file "enum")
(:file "misc-types")
(:file "misc")))))
(defun run-cffi-tests (&key (compiled nil))
(funcall (intern (symbol-name '#:run-cffi-tests) '#:cffi-tests)
:compiled compiled))
(defmethod perform ((o test-op) (c (eql (find-system :cffi-tests))))
(unless (and (run-cffi-tests :compiled nil)
(run-cffi-tests :compiled t))
(error "test-op failed.")))
;;; vim: ft=lisp et
--- /project/cells/cvsroot/cells-gtk/cffi/cffi-uffi-compat.asd 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/cffi-uffi-compat.asd 2008/01/28 23:59:26 1.1
;;;; -*- Mode: lisp; indent-tabs-mode: nil -*-
;;;
;;; cffi-uffi-compat.asd --- ASDF system definition for CFFI-UFFI-COMPAT.
;;;
;;; Copyright (C) 2005-2006, James Bielman <jamesjb(a)jamesjb.com>
;;;
;;; Permission is hereby granted, free of charge, to any person
;;; obtaining a copy of this software and associated documentation
;;; files (the "Software"), to deal in the Software without
;;; restriction, including without limitation the rights to use, copy,
;;; modify, merge, publish, distribute, sublicense, and/or sell copies
;;; of the Software, and to permit persons to whom the Software is
;;; furnished to do so, subject to the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
;;; HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
;;; WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
;;; OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
;;; DEALINGS IN THE SOFTWARE.
;;;
(defpackage #:cffi-uffi-compat-system
(:use #:cl #:asdf))
[12 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/cffi.asd 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/cffi.asd 2008/01/28 23:59:26 1.1
[80 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/cffi.lpr 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/cffi.lpr 2008/01/28 23:59:26 1.1
[178 lines skipped]
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/doc
In directory clnet:/tmp/cvs-serv9292/cffi/doc
Added Files:
Makefile allegro-internals.txt cffi-manual.texinfo
cffi-sys-spec.texinfo colorize-lisp-examples.lisp gendocs.sh
gendocs_template mem-vector.txt shareable-vectors.txt
style.css
Log Message:
--- /project/cells/cvsroot/cells-gtk/cffi/doc/Makefile 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/Makefile 2008/01/28 23:59:26 1.1
# -*- Mode: Makefile; tab-width: 3; indent-tabs-mode: t -*-
#
# Makefile --- Make targets for generating the documentation.
#
# Copyright (C) 2005-2006, Luis Oliveira <loliveira at common-lisp.net>
#
# Permission is hereby granted, free of charge, to any person
# obtaining a copy of this software and associated documentation
# files (the "Software"), to deal in the Software without
# restriction, including without limitation the rights to use, copy,
# modify, merge, publish, distribute, sublicense, and/or sell copies
# of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be
# included in all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
# HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
# WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
all: docs
docs:
sh gendocs.sh -o manual --html "--css-include=style.css" cffi-manual "CFFI User Manual"
sh gendocs.sh -o spec --html "--css-include=style.css" cffi-sys-spec "CFFI-SYS Interface Specification"
clean:
find . \( -name "*.info" -o -name "*.aux" -o -name "*.cp" -o -name "*.fn" -o -name "*.fns" -o -name "*.ky" -o -name "*.log" -o -name "*.pg" -o -name "*.toc" -o -name "*.tp" -o -name "*.vr" -o -name "*.dvi" -o -name "*.cps" -o -name "*.vrs" \) -exec rm {} \;
rm -rf manual spec
upload-docs:
rsync -av --delete -e ssh manual spec common-lisp.net:/project/cffi/public_html/
# scp -r manual spec common-lisp.net:/project/cffi/public_html/
# vim: ft=make ts=3 noet
--- /project/cells/cvsroot/cells-gtk/cffi/doc/allegro-internals.txt 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/allegro-internals.txt 2008/01/28 23:59:26 1.1
July 2005
These details were kindly provided by Duane Rettig of Franz.
Regarding the following snippet of the macro expansion of
FF:DEF-FOREIGN-CALL:
(SYSTEM::FF-FUNCALL
(LOAD-TIME-VALUE (EXCL::DETERMINE-FOREIGN-ADDRESS
'("foo" :LANGUAGE :C) 2 NIL))
'(:INT (INTEGER * *)) ARG1
'(:DOUBLE (DOUBLE-FLOAT * *)) ARG2
'(:INT (INTEGER * *)))
"
... in Allegro CL, if you define a foreign call FOO with C entry point
"foo" and with :call-direct t in the arguments, and if other things are
satisfied, then if a lisp function BAR is compiled which has a call to
FOO, that call will not go through ff-funcall (and thus a large amount
of argument manipulation and processing) but will instead set up its
arguments directly on the stack, and will then perform the "call" more
or less directly, through the "entry vec" (a small structure which
keeps track of a foreign entry's address and status)."
This is the code that generates what the compiler expects to see:
(setq call-direct-form
(if* call-direct
then `(setf (get ',lispname 'sys::direct-ff-call)
(list ',external-name
,callback
,convention
',returning
',arg-types
,arg-checking
,entry-vec-flags))
else `(remprop ',lispname 'sys::direct-ff-call)))
Thus generating something like:
(EVAL-WHEN (COMPILE LOAD EVAL)
(SETF (GET 'FOO 'SYSTEM::DIRECT-FF-CALL)
(LIST '("foo" :LANGUAGE :C) T :C
'(:INT (INTEGER * *))
'((:INT (INTEGER * *))
(:FLOAT (SINGLE-FLOAT * *)))
T
2 ; this magic value is explained later
)))
"
(defun determine-foreign-address (name &optional (flags 0) method-index)
;; return an entry-vec struct suitable for the foreign-call of name.
;;
;; name is either a string, which is taken without conversion, or
;; a list consisting of a string to convert or a conversion function
;; call.
;; flags is an integer representing the flags to place into the entry-vec.
;; method-index, if non-nil, is a word-index into a vtbl (virtual table).
;; If method-index is true, then the name must be a string uniquely
;; represented by the index and by the flags field.
Note that not all architectures implement the :method-index argument
to def-foreign-call, but your interface likely won't support it
anyway, so just leave it nil. As for the flags, they are constants
stored into the entry-vec returned by d-f-a and are given here:
(defconstant ep-flag-call-semidirect 1) ; Real address stored in alt-address slot
(defconstant ep-flag-never-release 2) ; Never release the heap
(defconstant ep-flag-always-release 4) ; Always release the heap
(defconstant ep-flag-release-when-ok 8) ; Release the heap unless without-interrupts
(defconstant ep-flag-tramp-calls #x70) ; Make calls through special trampolines
(defconstant ep-flag-tramp-shift 4)
(defconstant ep-flag-variable-address #x100) ; Entry-point contains address of C var
(defconstant ep-flag-strings-convert #x200) ; Convert strings automatically
(defconstant ep-flag-get-errno #x1000) ;; [rfe5060]: Get errno value after call
(defconstant ep-flag-get-last-error #x2000) ;; [rfe5060]: call GetLastError after call
;; Leave #x4000 and #x8000 open for expansion
Mostly, you'll give the value 2 (never release the heap), but if you
give 4 or 8, then d-f-a will automatically set the 1 bit as well,
which takes the call through a heap-release/reacquire process.
Some docs for entry-vec are:
;; -- entry vec --
;; An entry-vec is an entry-point descriptor, usually a pointer into
;; a shared-library. It is represented as a 5-element struct of type
;; foreign-vector. The reason for this represntation is
;; that it allows the entry point to be stored in a table, called
;; the .saved-entry-points. table, and to be used by a foreign
;; function. When the location of the foreign function to which the entry
;; point refers changes, it is simply a matter of changing the value in entry
;; point vector and the foreign call code sees it immediately. There is
;; even an address that can be put in the entry point vector that denotes
;; a missing foreign function, thus lookup can happen dynamically.
(defstruct (entry-vec
(:type (vector excl::foreign (*)))
(:constructor make-entry-vec-boa ()))
name ; entry point name
(address 0) ; jump address for foreign code
(handle 0) ; shared-lib handle
(flags 0) ; ep-* flags
(alt-address 0) ; sometimes holds the real func addr
)
[...]
"
Regarding the arguments to SYSTEM::FF-FUNCALL:
'(:int (integer * *)) argN
"The type-spec is as it is given in the def-foreign-call
syntax, with a C type optionally followed by a lisp type,
followed optionally by a user-conversion function name[...]"
Getting the alignment:
CL-USER(2): (ff:get-foreign-type :int)
#S(FOREIGN-FUNCTIONS::IFOREIGN-TYPE
:ATTRIBUTES NIL
:SFTYPE
#S(FOREIGN-FUNCTIONS::SIZED-FTYPE-PRIM
:KIND :INT
:WIDTH 4
:OFFSET 0
:ALIGN 4)
...)
--- /project/cells/cvsroot/cells-gtk/cffi/doc/cffi-manual.texinfo 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/cffi-manual.texinfo 2008/01/28 23:59:26 1.1
\input texinfo @c -*- Mode: Texinfo; Mode: auto-fill -*-
@c %**start of header
@setfilename cffi.info
@settitle CFFI User Manual
@exampleindent 2
@c @documentencoding utf-8
@ignore
Style notes:
* The reference section names and "See Also" list are roman, not
@code. This is to follow the format of CLHS.
* How it looks in HTML is the priority.
@end ignore
@c ============================= Macros =============================
@c The following macros are used throughout this manual.
@macro Function {args}
@defun \args\
@end defun
@end macro
@macro Macro {args}
@defmac \args\
@end defmac
@end macro
@macro Accessor {args}
@deffn {Accessor} \args\
@end deffn
@end macro
@macro GenericFunction {args}
@deffn {Generic Function} \args\
@end deffn
@end macro
@macro ForeignType {args}
@deftp {Foreign Type} \args\
@end deftp
@end macro
@macro Variable {args}
@defvr {Special Variable} \args\
@end defvr
@end macro
@macro Condition {args}
@deftp {Condition Type} \args\
@end deftp
@end macro
@macro cffi
@acronym{CFFI}
@end macro
@macro impnote {text}
@quotation
@strong{Implementor's note:} @emph{\text\}
@end quotation
@end macro
@c Info "requires" that x-refs end in a period or comma, or ) in the
@c case of @pxref. So the following implements that requirement for
@c the "See also" subheadings that permeate this manual, but only in
@c Info mode.
@ifinfo
@macro seealso {name}
@ref{\name\}.
@end macro
@end ifinfo
@ifnotinfo
@alias seealso = ref
@end ifnotinfo
@c Set ROMANCOMMENTS to get comments in roman font.
@ifset ROMANCOMMENTS
@alias lispcmt = r
@end ifset
@ifclear ROMANCOMMENTS
@alias lispcmt = asis
@end ifclear
@c ============================= Macros =============================
@c Show types, functions, and concepts in the same index.
@syncodeindex tp cp
@syncodeindex fn cp
@copying
Copyright @copyright{} 2005 James Bielman <jamesjb at jamesjb.com> @*
Copyright @copyright{} 2005, 2006 Lu@'{@dotless{i}}s Oliveira
<loliveira at common-lisp.net> @*
Copyright @copyright{} 2006 Stephen Compall <s11 at member.fsf.org>
@quotation
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the ``Software''), to deal in the Software without
restriction, including without limitation the rights to use, copy,
modify, merge, publish, distribute, sublicense, and/or sell copies
of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
@sc{The software is provided ``as is'', without warranty of any kind,
express or implied, including but not limited to the warranties of
merchantability, fitness for a particular purpose and noninfringement.
In no event shall the authors or copyright holders be liable for any
claim, damages or other liability, whether in an action of contract,
tort or otherwise, arising from, out of or in connection with the
software or the use or other dealings in the software.}
@end quotation
@end copying
@c %**end of header
@titlepage
@title CFFI User Manual
@c @subtitle Version X.X
@c @author James Bielman
@page
@vskip 0pt plus 1filll
@insertcopying
@end titlepage
@contents
@ifnottex
@node Top
@top cffi
@insertcopying
@end ifnottex
@menu
* Introduction:: What is CFFI?
* Implementation Support::
* Tutorial:: Interactive intro to using CFFI.
* Wrapper generators:: CFFI forms from munging C source code.
* Foreign Types::
* Pointers::
* Strings::
* Variables::
* Functions::
* Libraries::
* Callbacks::
* Finalizers::
* Limitations::
* Platform-specific features:: Details about the underlying system.
* Glossary:: List of CFFI-specific terms and meanings.
* Comprehensive Index::
@detailmenu
--- Dictionary ---
Foreign Types
* convert-from-foreign:: Outside interface to backward type translator.
* convert-to-foreign:: Outside interface to forward type translator.
* defbitfield:: Defines a bitfield.
* defcstruct:: Defines a C structure type.
* defcunion:: Defines a C union type.
* defctype:: Defines a foreign typedef.
* defcenum:: Defines a C enumeration.
@c * define-type-spec-parser:: <should be exported?>
* define-foreign-type:: Defines a foreign type specifier.
@c * explain-foreign-slot-value:: <unimplemented>
* foreign-bitfield-symbols:: Returns a list of symbols for a bitfield type.
* foreign-bitfield-value:: Calculates a value for a bitfield type.
* foreign-enum-keyword:: Finds a keyword in an enum type.
* foreign-enum-value:: Finds a value in an enum type.
* foreign-slot-names:: Returns a list of slot names in a foreign struct.
* foreign-slot-offset:: Returns the offset of a slot in a foreign struct.
* foreign-slot-pointer:: Returns a pointer to a slot in a foreign struct.
* foreign-slot-value:: Returns the value of a slot in a foreign struct.
* foreign-type-alignment:: Returns the alignment of a foreign type.
* foreign-type-size:: Returns the size of a foreign type.
* free-converted-object:: Outside interface to typed object deallocators.
* free-translated-object:: Free a type translated foreign object.
* translate-from-foreign:: Translate a foreign object to a Lisp object.
* translate-to-foreign:: Translate a Lisp object to a foreign object.
* with-foreign-object:: Allocates a foreign object with dynamic extent.
* with-foreign-slots:: Access the slots of a foreign structure.
Pointers
* foreign-free:: Deallocates memory.
* foreign-alloc:: Allocates memory.
* foreign-symbol-pointer:: Returns a pointer to a foreign symbol.
* inc-pointer:: Increments the address held by a pointer.
* make-pointer:: Returns a pointer to a given address.
* mem-aref:: Accesses the value of an index in an array.
* mem-ref:: Dereferences a pointer.
* null-pointer:: Returns a NULL pointer.
* null-pointer-p:: Tests a pointer for NULL value.
* pointerp:: Tests whether an object is a pointer or not.
* pointer-address:: Returns the address pointed to by a pointer.
* pointer-eq:: Tests if two pointers point to the same address.
* with-foreign-pointer:: Allocates memory with dynamic extent.
Strings
* foreign-string-alloc:: Converts a Lisp string to a foreign string.
* foreign-string-free:: Deallocates memory used by a foreign string.
* foreign-string-to-lisp:: Converts a foreign string to a Lisp string.
* lisp-string-to-foreign:: Copies a Lisp string into a foreign string.
* with-foreign-string:: Allocates a foreign string with dynamic extent.
* with-foreign-pointer-as-string:: Similar to CL's with-output-to-string.
Variables
* defcvar:: Defines a C global variable.
* get-var-pointer:: Returns a pointer to a defined global variable.
Functions
* defcfun:: Defines a foreign function.
* foreign-funcall:: Performs a call to a foreign function.
[5407 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/cffi-sys-spec.texinfo 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/cffi-sys-spec.texinfo 2008/01/28 23:59:26 1.1
[5718 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/colorize-lisp-examples.lisp 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/colorize-lisp-examples.lisp 2008/01/28 23:59:26 1.1
[6769 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/gendocs.sh 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/gendocs.sh 2008/01/28 23:59:26 1.1
[7079 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/gendocs_template 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/gendocs_template 2008/01/28 23:59:26 1.1
[7338 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/mem-vector.txt 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/mem-vector.txt 2008/01/28 23:59:26 1.1
[7413 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/shareable-vectors.txt 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/shareable-vectors.txt 2008/01/28 23:59:26 1.1
[7457 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cffi/doc/style.css 2008/01/28 23:59:26 NONE
+++ /project/cells/cvsroot/cells-gtk/cffi/doc/style.css 2008/01/28 23:59:26 1.1
[7505 lines skipped]
1
0
Update of /project/cells/cvsroot/cells-gtk
In directory clnet:/tmp/cvs-serv9292
Added Files:
INSTALL.TXT actions.lisp addon.lisp asdf.lisp buttons.lisp
callback.lisp cells-gtk.asd cells-gtk.lpr
cells3-porting-notes.lisp clisp.bat compat.lisp
conditions.lisp dialogs.lisp display.lisp drawing.lisp
entry.lisp gtk-app-save.lisp gtk-app-win32.lisp gtk-app.lisp
layout.lisp lisp.bat load.lisp menus.lisp packages.lisp
pod-notes.txt textview.lisp tree-view.lisp widgets.lisp
Log Message:
--- /project/cells/cvsroot/cells-gtk/INSTALL.TXT 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/INSTALL.TXT 2008/01/28 23:59:24 1.1
To compile and run:
STEP 0: WINDOWS USERS: Do the stuff marked "Windows Users" below.
STEP .5: CLISP Users edit the path in ./load.lisp (you'll see it).
STEP 1: EVERYONE: Start lisp, change to this directory and do (load "load")
STEP 2: EVERYONE: (test-gtk::gtk-demo)
STEP 3: ANYONE (optional) make libcellsgtk, (or get it from the cells-gtk site). To make:
3a) In ./root/gtk-ffi 'make'
3b) Move the library created to where it will be found (Linux see /etc/ld.so.conf).
3c) Uncomment the line (pushnew :libcellsgtk *features*) in ./root/gtk-ffi/gtk-ffi.asd
3d) Recompile the distribution (remove fasls and type (load "load") again.
TESTED ON:
Windows XP: (with gtk 2.4.10)
AllegroCL 6.2 Enterprise,
Lispworks 4.3 Personal
Windows 2000:
CLISP 2.38
Linux:
Lispworks 4.4 Pro,
CMUCL 19c,
CLISP 2.36
SBCL 0.9.9.1
NOT TESTED SINCE SWITCHING TO CFFI: (as of 2006-01-03):
AllegroCL
MACOSX
;;; -------- Windows Users ---------------
Get GTK and Install
http://gimp-win.sourceforge.net/stable.html (I used version 2.8.9)
Executing the setup.exe should add "C:\Program Files\Common Files\GTK\2.0\bin"
to your path. You can verify that it has:
Start>Settings>Control Panel>System>Advanced>Environment Variables>
(I had to reboot after this, but then I don't know anything about Win32).
Note: On windows under emacs with slime, the gtk window does not popup.
You must start the application from a dos prompt.
(Solutions to this problem welcome!, probably involves putting something
like a call to gtk-iteration-do into some slime loop through a hook.)
Known bugs:
On Windows: Clisp crashes if
[My Computer]-> [Properties]-> [Advanced]-> [Perfomance Settings]-> [Show windows contents while dragging]
is set and resize the window while viewing a listbox or treebox.
--- /project/cells/cvsroot/cells-gtk/actions.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/actions.lisp 2008/01/28 23:59:24 1.1
(in-package :cgtk)
(def-object action ()
((name :accessor name :initarg :name :initform nil)
(accel :accessor accel :initarg :accel :initform nil)
(visible :accessor visible :initarg :visible :initform (c-in t))
(sensitive :accessor sensitive :initarg :sensitive :initform (c-in t))
(label :accessor label :initarg :label :initform nil)
(tooltip :accessor tooltip :initarg :tooltip :initform nil)
(stock :accessor stock :initarg :stock :initform nil)
(stock-id :accessor stock-id :initform (c? (when (stock self)
(string-downcase (format nil "gtk-~a" (stock self)))))))
()
()
:new-args (c_1 (list (name self) nil nil (stock-id self))))
(def-c-output visible ((self action))
(gtk-ffi::gtk-object-set-property (id self) "visible" 'boolean new-value))
(def-c-output sensitive ((self action))
(gtk-ffi::gtk-object-set-property (id self) "sensitive" 'boolean new-value))
(def-c-output label ((self action))
(when new-value
(gtk-ffi::with-gtk-string (str new-value)
(gtk-ffi::gtk-object-set-property (id self) "label" 'c-pointer str))))
(def-c-output tooltip ((self action))
(when new-value
(gtk-ffi::with-gtk-string (str new-value)
(gtk-ffi::gtk-object-set-property (id self) "tooltip" 'c-pointer str))))
(def-object action-group ()
((name :accessor name :initarg :name :initform nil)
(visible :accessor visible :initarg :visible :initform (c-in t))
(sensitive :accessor sensitive :initarg :sensitive :initform (c-in t)))
()
()
:new-args (c_1 (list (name self))))
(def-c-output sensitive ((self action-group))
(gtk-ffi::gtk-action-group-set-sensitive (id self) new-value))
(def-c-output visible ((self action-group))
(gtk-ffi::gtk-action-group-set-visible (id self) new-value))
(def-c-output .kids ((self action-group))
(dolist (kid old-value)
(gtk-ffi::gtk-action-group-remove-action (id self) (id kid)))
(dolist (kid new-value)
(gtk-ffi::gtk-action-group-add-action-with-accel (id self) (id kid) (accel kid)))
#+clisp (call-next-method))
(def-object ui-manager ()
((action-groups :accessor action-groups :initform (c-in nil))
(add-tearoffs :accessor tearoffs :initarg :tearoffs :initform nil))
()
())
(def-c-output tearoffs ((self ui-manager))
(gtk-ffi::gtk-ui-manager-set-add-tearoffs (id self) new-value))
(defmethod add-action-group ((self ui-manager) (group action-group) &optional pos)
(let ((grp (to-be group)))
(trc nil "ADD-ACTION-GROUP" grp) (force-output)
(gtk-ffi::gtk-ui-manager-insert-action-group (id self) (id group) (or pos (length (action-groups self))))
(push grp (action-groups self))))
(defmodel test-actions (vbox)
()
(:default-initargs
:action-group (mk-action-group
:name "Group 1"
:kids (kids-list?
(mk-action
:name "Action 1" :stock :cdrom :label "Action 1" :accel "<Control>a")
(mk-action
:name "Action 2" :stock :network :label "Action 2" :accel "<Control>b")))
:kids (kids-list?
(mk-label :text "Actions test"))))
--- /project/cells/cvsroot/cells-gtk/addon.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/addon.lisp 2008/01/28 23:59:24 1.1
#|
Cells Gtk
Copyright (c) 2004 by Vasilis Margioulas <vasilism(a)sch.gr>
You have the right to distribute and use this software as governed by
the terms of the Lisp Lesser GNU Public License (LLGPL):
(http://opensource.franz.com/preamble.html)
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
Lisp Lesser GNU Public License for more details.
|#
(in-package :cgtk)
(def-widget calendar ()
((init :accessor init :initarg :init :initform nil))
()
(day-selected)
:on-day-selected (callback (widg signal data)
(setf (value self) (get-date self))))
(defmethod get-date ((self calendar))
(uffi:with-foreign-objects ((year :int)(month :int)(day :int))
(gtk-calendar-get-date (id self) year month day)
(encode-universal-time 0 0 0 (uffi:deref-pointer day :int)
(1+ (uffi:deref-pointer month :int)) (uffi:deref-pointer year :int))))
(defobserver init ((self calendar))
(when new-value
(multiple-value-bind (sec min hour day month year) (decode-universal-time new-value)
(declare (ignorable sec min hour))
(gtk-calendar-select-month (id self) (1- month) year)
(gtk-calendar-select-day (id self) day))
(setf (value self) new-value)))
(def-widget arrow ()
((type :accessor arrow-type :initarg :type :initform nil)
(type-id :accessor type-id
:initform (c? (case (arrow-type self)
(:up 0)
(:down 1)
(:left 2)
(:right 3)
(t 3))))
(shadow :accessor arrow-shadow :initarg :shadow :initform nil)
(shadow-id :accessor shadow-id
:initform (c? (case (arrow-shadow self)
(:none 0)
(:in 1)
(:out 2)
(:etched-in 3)
(:etched-out 4)
(t 2)))))
()
()
:new-args (c_1 (list (type-id self) (shadow-id self))))
(defobserver type ((self arrow))
(when new-value
(gtk-arrow-set (id self) (type-id self) (shadow-id self))))
(defobserver shadow ((self arrow))
(when new-value
(gtk-arrow-set (id self) (type-id self) (shadow-id self))))
--- /project/cells/cvsroot/cells-gtk/asdf.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/asdf.lisp 2008/01/28 23:59:24 1.1
;;; This is asdf: Another System Definition Facility. $Revision: 1.1 $
;;;
;;; Feedback, bug reports, and patches are all welcome: please mail to
;;; <cclan-list(a)lists.sf.net>. But note first that the canonical
;;; source for asdf is presently the cCLan CVS repository at
;;; <URL:http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/>
;;;
;;; If you obtained this copy from anywhere else, and you experience
;;; trouble using it, or find bugs, you may want to check at the
;;; location above for a more recent version (and for documentation
;;; and test files, if your copy came without them) before reporting
;;; bugs. There are usually two "supported" revisions - the CVS HEAD
;;; is the latest development version, whereas the revision tagged
;;; RELEASE may be slightly older but is considered `stable'
;;; Copyright (c) 2001-2003 Daniel Barlow and contributors
;;;
;;; Permission is hereby granted, free of charge, to any person obtaining
;;; a copy of this software and associated documentation files (the
;;; "Software"), to deal in the Software without restriction, including
;;; without limitation the rights to use, copy, modify, merge, publish,
;;; distribute, sublicense, and/or sell copies of the Software, and to
;;; permit persons to whom the Software is furnished to do so, subject to
;;; the following conditions:
;;;
;;; The above copyright notice and this permission notice shall be
;;; included in all copies or substantial portions of the Software.
;;;
;;; THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
;;; EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
;;; MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
;;; NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
;;; LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
;;; OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
;;; WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
;;; the problem with writing a defsystem replacement is bootstrapping:
;;; we can't use defsystem to compile it. Hence, all in one file
(defpackage #:asdf
(:export #:defsystem #:oos #:operate #:find-system #:run-shell-command
#:system-definition-pathname #:find-component ; miscellaneous
#:hyperdocumentation #:hyperdoc
#:compile-op #:load-op #:load-source-op #:test-system-version
#:test-op
#:operation ; operations
#:feature ; sort-of operation
#:version ; metaphorically sort-of an operation
#:input-files #:output-files #:perform ; operation methods
#:operation-done-p #:explain
#:component #:source-file
#:c-source-file #:cl-source-file #:java-source-file
#:static-file
#:doc-file
#:html-file
#:text-file
#:source-file-type
#:module ; components
#:system
#:unix-dso
#:module-components ; component accessors
#:component-pathname
#:component-relative-pathname
#:component-name
#:component-version
#:component-parent
#:component-property
#:component-system
#:component-depends-on
#:system-description
#:system-long-description
#:system-author
#:system-maintainer
#:system-license
#:operation-on-warnings
#:operation-on-failure
;#:*component-parent-pathname*
#:*system-definition-search-functions*
#:*central-registry* ; variables
#:*compile-file-warnings-behaviour*
#:*compile-file-failure-behaviour*
#:*asdf-revision*
#:operation-error #:compile-failed #:compile-warned #:compile-error
#:system-definition-error
#:missing-component
#:missing-dependency
#:circular-dependency ; errors
#:retry
#:accept ; restarts
)
(:use :cl))
#+nil
(error "The author of this file habitually uses #+nil to comment out forms. But don't worry, it was unlikely to work in the New Implementation of Lisp anyway")
(in-package #:asdf)
(defvar *asdf-revision* (let* ((v "$Revision: 1.1 $")
(colon (or (position #\: v) -1))
(dot (position #\. v)))
(and v colon dot
(list (parse-integer v :start (1+ colon)
:junk-allowed t)
(parse-integer v :start (1+ dot)
:junk-allowed t)))))
(defvar *compile-file-warnings-behaviour* :warn)
(defvar *compile-file-failure-behaviour* #+sbcl :error #-sbcl :warn)
(defvar *verbose-out* nil)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; utility stuff
(defmacro aif (test then &optional else)
`(let ((it ,test)) (if it ,then ,else)))
(defun pathname-sans-name+type (pathname)
"Returns a new pathname with same HOST, DEVICE, DIRECTORY as PATHNAME,
and NIL NAME and TYPE components"
(make-pathname :name nil :type nil :defaults pathname))
(define-modify-macro appendf (&rest args)
append "Append onto list")
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; classes, condiitons
(define-condition system-definition-error (error) ()
;; [this use of :report should be redundant, but unfortunately it's not.
;; cmucl's lisp::output-instance prefers the kernel:slot-class-print-function
;; over print-object; this is always conditions::%print-condition for
;; condition objects, which in turn does inheritance of :report options at
;; run-time. fortunately, inheritance means we only need this kludge here in
;; order to fix all conditions that build on it. -- rgr, 28-Jul-02.]
#+cmu (:report print-object))
(define-condition formatted-system-definition-error (system-definition-error)
((format-control :initarg :format-control :reader format-control)
(format-arguments :initarg :format-arguments :reader format-arguments))
(:report (lambda (c s)
(apply #'format s (format-control c) (format-arguments c)))))
(define-condition circular-dependency (system-definition-error)
((components :initarg :components :reader circular-dependency-components)))
(define-condition missing-component (system-definition-error)
((requires :initform "(unnamed)" :reader missing-requires :initarg :requires)
(version :initform nil :reader missing-version :initarg :version)
(parent :initform nil :reader missing-parent :initarg :parent)))
(define-condition missing-dependency (missing-component)
((required-by :initarg :required-by :reader missing-required-by)))
(define-condition operation-error (error)
((component :reader error-component :initarg :component)
(operation :reader error-operation :initarg :operation))
(:report (lambda (c s)
(format s "~@<erred while invoking ~A on ~A~@:>"
(error-operation c) (error-component c)))))
(define-condition compile-error (operation-error) ())
(define-condition compile-failed (compile-error) ())
(define-condition compile-warned (compile-error) ())
(defclass component ()
((name :accessor component-name :initarg :name :documentation
"Component name: designator for a string composed of portable pathname characters")
(version :accessor component-version :initarg :version)
(in-order-to :initform nil :initarg :in-order-to)
;;; XXX crap name
(do-first :initform nil :initarg :do-first)
;; methods defined using the "inline" style inside a defsystem form:
;; need to store them somewhere so we can delete them when the system
;; is re-evaluated
(inline-methods :accessor component-inline-methods :initform nil)
(parent :initarg :parent :initform nil :reader component-parent)
;; no direct accessor for pathname, we do this as a method to allow
[920 lines skipped]
--- /project/cells/cvsroot/cells-gtk/buttons.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/buttons.lisp 2008/01/28 23:59:24 1.1
[1023 lines skipped]
--- /project/cells/cvsroot/cells-gtk/callback.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/callback.lisp 2008/01/28 23:59:24 1.1
[1062 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cells-gtk.asd 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/cells-gtk.asd 2008/01/28 23:59:24 1.1
[1085 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cells-gtk.lpr 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/cells-gtk.lpr 2008/01/28 23:59:24 1.1
[1135 lines skipped]
--- /project/cells/cvsroot/cells-gtk/cells3-porting-notes.lisp 2008/01/28 23:59:24 NONE
+++ /project/cells/cvsroot/cells-gtk/cells3-porting-notes.lisp 2008/01/28 23:59:24 1.1
[1166 lines skipped]
--- /project/cells/cvsroot/cells-gtk/clisp.bat 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/clisp.bat 2008/01/28 23:59:25 1.1
[1168 lines skipped]
--- /project/cells/cvsroot/cells-gtk/compat.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/compat.lisp 2008/01/28 23:59:25 1.1
[1212 lines skipped]
--- /project/cells/cvsroot/cells-gtk/conditions.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/conditions.lisp 2008/01/28 23:59:25 1.1
[1250 lines skipped]
--- /project/cells/cvsroot/cells-gtk/dialogs.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/dialogs.lisp 2008/01/28 23:59:25 1.1
[1402 lines skipped]
--- /project/cells/cvsroot/cells-gtk/display.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/display.lisp 2008/01/28 23:59:25 1.1
[1557 lines skipped]
--- /project/cells/cvsroot/cells-gtk/drawing.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/drawing.lisp 2008/01/28 23:59:25 1.1
[1779 lines skipped]
--- /project/cells/cvsroot/cells-gtk/entry.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/entry.lisp 2008/01/28 23:59:25 1.1
[1932 lines skipped]
--- /project/cells/cvsroot/cells-gtk/gtk-app-save.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/gtk-app-save.lisp 2008/01/28 23:59:25 1.1
[2087 lines skipped]
--- /project/cells/cvsroot/cells-gtk/gtk-app-win32.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/gtk-app-win32.lisp 2008/01/28 23:59:25 1.1
[2252 lines skipped]
--- /project/cells/cvsroot/cells-gtk/gtk-app.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/gtk-app.lisp 2008/01/28 23:59:25 1.1
[2408 lines skipped]
--- /project/cells/cvsroot/cells-gtk/layout.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/layout.lisp 2008/01/28 23:59:25 1.1
[2705 lines skipped]
--- /project/cells/cvsroot/cells-gtk/lisp.bat 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/lisp.bat 2008/01/28 23:59:25 1.1
[2707 lines skipped]
--- /project/cells/cvsroot/cells-gtk/load.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/load.lisp 2008/01/28 23:59:25 1.1
[2754 lines skipped]
--- /project/cells/cvsroot/cells-gtk/menus.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/menus.lisp 2008/01/28 23:59:25 1.1
[3055 lines skipped]
--- /project/cells/cvsroot/cells-gtk/packages.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/packages.lisp 2008/01/28 23:59:25 1.1
[3131 lines skipped]
--- /project/cells/cvsroot/cells-gtk/pod-notes.txt 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/pod-notes.txt 2008/01/28 23:59:25 1.1
[3270 lines skipped]
--- /project/cells/cvsroot/cells-gtk/textview.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/textview.lisp 2008/01/28 23:59:25 1.1
[3430 lines skipped]
--- /project/cells/cvsroot/cells-gtk/tree-view.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/tree-view.lisp 2008/01/28 23:59:25 1.1
[3700 lines skipped]
--- /project/cells/cvsroot/cells-gtk/widgets.lisp 2008/01/28 23:59:25 NONE
+++ /project/cells/cvsroot/cells-gtk/widgets.lisp 2008/01/28 23:59:25 1.1
[4099 lines skipped]
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/uffi-compat
In directory clnet:/tmp/cvs-serv8901/uffi-compat
Log Message:
Directory /project/cells/cvsroot/cells-gtk/cffi/uffi-compat added to the repository
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/tests
In directory clnet:/tmp/cvs-serv8901/tests
Log Message:
Directory /project/cells/cvsroot/cells-gtk/cffi/tests added to the repository
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/src
In directory clnet:/tmp/cvs-serv8901/src
Log Message:
Directory /project/cells/cvsroot/cells-gtk/cffi/src added to the repository
1
0
Update of /project/cells/cvsroot/cells-gtk/cffi/scripts
In directory clnet:/tmp/cvs-serv8901/scripts
Log Message:
Directory /project/cells/cvsroot/cells-gtk/cffi/scripts added to the repository
1
0