Author: ksprotte Date: Mon Feb 11 09:06:27 2008 New Revision: 2470
Added: branches/trunk-reorg/thirdparty/uffi/ branches/trunk-reorg/thirdparty/uffi/AUTHORS branches/trunk-reorg/thirdparty/uffi/ChangeLog branches/trunk-reorg/thirdparty/uffi/INSTALL branches/trunk-reorg/thirdparty/uffi/LICENSE branches/trunk-reorg/thirdparty/uffi/Makefile branches/trunk-reorg/thirdparty/uffi/Makefile.common branches/trunk-reorg/thirdparty/uffi/NEWS branches/trunk-reorg/thirdparty/uffi/README branches/trunk-reorg/thirdparty/uffi/TODO branches/trunk-reorg/thirdparty/uffi/benchmarks/ branches/trunk-reorg/thirdparty/uffi/benchmarks/Makefile branches/trunk-reorg/thirdparty/uffi/benchmarks/allocation.lisp branches/trunk-reorg/thirdparty/uffi/debian/ branches/trunk-reorg/thirdparty/uffi/debian/README.Debian branches/trunk-reorg/thirdparty/uffi/debian/changelog branches/trunk-reorg/thirdparty/uffi/debian/cl-uffi.doc-base branches/trunk-reorg/thirdparty/uffi/debian/compat branches/trunk-reorg/thirdparty/uffi/debian/control branches/trunk-reorg/thirdparty/uffi/debian/copyright branches/trunk-reorg/thirdparty/uffi/debian/cvsbp-prepare.sh (contents, props changed) branches/trunk-reorg/thirdparty/uffi/debian/docs branches/trunk-reorg/thirdparty/uffi/debian/make-upstream.sh (contents, props changed) branches/trunk-reorg/thirdparty/uffi/debian/postinst branches/trunk-reorg/thirdparty/uffi/debian/preinst (contents, props changed) branches/trunk-reorg/thirdparty/uffi/debian/prerm branches/trunk-reorg/thirdparty/uffi/debian/rules (contents, props changed) branches/trunk-reorg/thirdparty/uffi/debian/upload.sh (contents, props changed) branches/trunk-reorg/thirdparty/uffi/debian/watch branches/trunk-reorg/thirdparty/uffi/doc/ branches/trunk-reorg/thirdparty/uffi/doc/COPYING.GFDL branches/trunk-reorg/thirdparty/uffi/doc/Makefile branches/trunk-reorg/thirdparty/uffi/doc/appendix.xml branches/trunk-reorg/thirdparty/uffi/doc/bookinfo.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-darwin.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-debian.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-mandrake.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse90.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse91.xml branches/trunk-reorg/thirdparty/uffi/doc/catalog-ubuntu.xml branches/trunk-reorg/thirdparty/uffi/doc/entities.inc branches/trunk-reorg/thirdparty/uffi/doc/fo.xsl branches/trunk-reorg/thirdparty/uffi/doc/glossary.xml branches/trunk-reorg/thirdparty/uffi/doc/html.tar.gz (contents, props changed) branches/trunk-reorg/thirdparty/uffi/doc/html.xsl branches/trunk-reorg/thirdparty/uffi/doc/html_chunk.xsl branches/trunk-reorg/thirdparty/uffi/doc/intro.xml branches/trunk-reorg/thirdparty/uffi/doc/notes.xml branches/trunk-reorg/thirdparty/uffi/doc/preface.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_aggregate.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_declare.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_func_libr.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_object.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_primitive.xml branches/trunk-reorg/thirdparty/uffi/doc/ref_string.xml branches/trunk-reorg/thirdparty/uffi/doc/schemas.xml branches/trunk-reorg/thirdparty/uffi/doc/uffi.pdf branches/trunk-reorg/thirdparty/uffi/doc/uffi.xml branches/trunk-reorg/thirdparty/uffi/doc/xinclude.mod branches/trunk-reorg/thirdparty/uffi/examples/ branches/trunk-reorg/thirdparty/uffi/examples/Makefile branches/trunk-reorg/thirdparty/uffi/examples/Makefile.msvc branches/trunk-reorg/thirdparty/uffi/examples/acl-compat-tester.lisp branches/trunk-reorg/thirdparty/uffi/examples/arrays.lisp branches/trunk-reorg/thirdparty/uffi/examples/atoifl.lisp branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.c branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.lisp branches/trunk-reorg/thirdparty/uffi/examples/compress.lisp branches/trunk-reorg/thirdparty/uffi/examples/file-socket.lisp branches/trunk-reorg/thirdparty/uffi/examples/getenv.lisp branches/trunk-reorg/thirdparty/uffi/examples/gethostname.lisp branches/trunk-reorg/thirdparty/uffi/examples/getshells.lisp branches/trunk-reorg/thirdparty/uffi/examples/gettime.lisp branches/trunk-reorg/thirdparty/uffi/examples/run-examples.lisp branches/trunk-reorg/thirdparty/uffi/examples/strtol.lisp branches/trunk-reorg/thirdparty/uffi/examples/test-examples.lisp branches/trunk-reorg/thirdparty/uffi/examples/union.lisp branches/trunk-reorg/thirdparty/uffi/src/ branches/trunk-reorg/thirdparty/uffi/src/Makefile branches/trunk-reorg/thirdparty/uffi/src/aggregates.lisp branches/trunk-reorg/thirdparty/uffi/src/corman/ branches/trunk-reorg/thirdparty/uffi/src/corman/corman-notes.txt branches/trunk-reorg/thirdparty/uffi/src/corman/getenv-ccl.lisp branches/trunk-reorg/thirdparty/uffi/src/functions.lisp branches/trunk-reorg/thirdparty/uffi/src/libraries.lisp branches/trunk-reorg/thirdparty/uffi/src/objects.lisp branches/trunk-reorg/thirdparty/uffi/src/os.lisp branches/trunk-reorg/thirdparty/uffi/src/package.lisp branches/trunk-reorg/thirdparty/uffi/src/primitives.lisp branches/trunk-reorg/thirdparty/uffi/src/readmacros-mcl.lisp branches/trunk-reorg/thirdparty/uffi/src/strings.lisp branches/trunk-reorg/thirdparty/uffi/tests/ branches/trunk-reorg/thirdparty/uffi/tests/Makefile branches/trunk-reorg/thirdparty/uffi/tests/Makefile.msvc branches/trunk-reorg/thirdparty/uffi/tests/arrays.lisp branches/trunk-reorg/thirdparty/uffi/tests/atoifl.lisp branches/trunk-reorg/thirdparty/uffi/tests/casts.lisp branches/trunk-reorg/thirdparty/uffi/tests/compress.lisp branches/trunk-reorg/thirdparty/uffi/tests/foreign-loader.lisp branches/trunk-reorg/thirdparty/uffi/tests/foreign-var.lisp branches/trunk-reorg/thirdparty/uffi/tests/getenv.lisp branches/trunk-reorg/thirdparty/uffi/tests/gethostname.lisp branches/trunk-reorg/thirdparty/uffi/tests/make.sh branches/trunk-reorg/thirdparty/uffi/tests/objects.lisp branches/trunk-reorg/thirdparty/uffi/tests/package.lisp branches/trunk-reorg/thirdparty/uffi/tests/rt.lisp branches/trunk-reorg/thirdparty/uffi/tests/strtol.lisp branches/trunk-reorg/thirdparty/uffi/tests/structs.lisp branches/trunk-reorg/thirdparty/uffi/tests/time.lisp branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test-lib.lisp branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test.c branches/trunk-reorg/thirdparty/uffi/tests/union.lisp branches/trunk-reorg/thirdparty/uffi/uffi-tests.asd branches/trunk-reorg/thirdparty/uffi/uffi.asd Log: added uffi to thirdparty
Added: branches/trunk-reorg/thirdparty/uffi/AUTHORS ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/AUTHORS Mon Feb 11 09:06:27 2008 @@ -0,0 +1,12 @@ +Kevin M. Rosenberg kevin@rosenberg.net + Primary author + +John Desoi desoi@mac.com + Contributed MCL & OpenMCL support + +Reini Urban rurban@x-ray.at + Contributed initial Corman support + +Edi Weitz edi@weitz.de + Contributed with-cast-pointer and def-foreign-var along with + documentation
Added: branches/trunk-reorg/thirdparty/uffi/ChangeLog ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/ChangeLog Mon Feb 11 09:06:27 2008 @@ -0,0 +1,354 @@ +2007-09-17 Kevin Rosenberg (kevin@rosenberg.net) + * doc/Makefile, doc/html.xsl: Change output encoding from + ISO-8859-1 to UTF-8 + +2007-07-22 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.6.0 (SPECIFICATION CHANGE) + * doc/ref_func_libr.xml: Change the specification of + load-foreign-library to better match the actual action of the + function. Rather than returning NIL for failure to load library, + signal an error. + * src/libraries.lisp: Rework load-foreign-library to ensure errors + are signaled on failure to load library. This was the case for + some implementations, change the other implementations to + match. (Inconsistency found due to Mark Wooding's remarks) + +2007-04-12 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.18 + * src/functions.lisp: Patch from Ian Eslick for Lispworks 5 + +2006-10-10 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.17 + * src/functions.lisp: Patch from Edi Weitz for Lispworks 5/Linux + +2006-09-02 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.16 + * src/libraries.lisp: Add cygwin support + +2006-08-13 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.15 + * src/{objects,strings}.lisp: Add support for Lispworks 5 + thanks to patches from Bill Atkins + +2006-07-04 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.14 + * src/{objects,strings}.lisp: Apply patch from Edi Weitz + +2006-05-17 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.13 + * src/libraries.lisp: Revert buggy patch from Yaroslav Kavenchuk. + +2006-05-17 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.12 + * src/libraries.lisp: Patch from Yaroslav Kavenchuk to set + default drive letters on MS Windows. + +2006-05-11 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.11: Export new macro DEF-POINTER-VAR based on patch from + James Bielman to support defining variables on platforms which + support saving objects, such as openmcl + +2006-04-17 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.10: Commit patch from Gary King for openmcl's + feature list change + +2005-11-14 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.7 + * src/strings.lisp: Add with-foreign-strings by James Biel + +2005-11-14 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.6 + * src/os.lisp: Remove getenv setter + +2005-11-07 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.5 + * src/os.lisp: Add support for getenv getter and setter + +2005-09-17 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.4 + * src/objects.lisp: prepend _ character for entry + point on Allegro macosx, patch by Luis Oliveira + +2005-07-05 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.5.0 + * Remove vestigial LLGPL license notices as UFFI as been + BSD-licensed for several years. + +2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.4.39 + * tests/objects.lisp: Rename from pointers.lisp. + Fix test CHPTR.4 as noted by Jorg Hohle + * src/objects.lisp: Remove default from ensure-char-integer + +2005-06-09 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.4.38 + * src/libraries.lisp: Commit patch from Edi Weitz to + allow plain filename library names to allow underlying + lisp implementation to find foreign libraries in the + locations known to the operating system. + * tests/cast.lisp: Add :module keyword as noted by Jorg Hohle. + * src/strings.lisp: Avoid multiple evaluation of input + parameters for macros as noted by Jorg Hohle. + +2005-04-12 Kevin Rosenberg (kevin@rosenberg.net) + * Version 1.4.37 + * src/strings.lisp: Fix variable name + +2005-04-04 Kevin Rosenberg (kevin@rosenberg.net) + * src/strings.lisp, src/aggregates.lisp: Support change in SBCL copy + function [Thanks for Nathan Froyd and Zach Beane] + +2005-04-03 Kevin Rosenberg (kevin@rosenberg.net) + * src/objects.lisp: Commit patch from James Bielman to add + def-foreign-var support for OpenMCL + +2005-03-03 Kevin Rosenberg (kevin@rosenberg.net) + * src/primitives.lisp: Add support for :union types + [patch from Cyrus Harmon] + * tests/union.lisp, tests/structs.lisp: Tests for + union and structure types [from Cyrus Harmon] + +2005-02-22 Kevin Rosenberg (kevin@rosenberg.net) + * src/primitives.lisp, src/strings.lisp: Better support + for sb-unicode [from Yoshinori Tahara and R. Mattes] + +2005-01-22 Kevin Rosenberg (kevin@rosenberg.net) + * src/primitives.lisp: Better support SBCL-AMD64 + +2004-11-08 Kevin Rosenberg (kevin@rosenberg.net) + * src/strings.lisp: Better support sb-unicode + * tests/compress.lisp: Support sb-unicode + +2004-10-07 Kevin Rosenberg (kevin@rosenberg.net) + * src/objects.lisp: Add new function: + convert-from-foreign-usb8 + +2004-04-15 Kevin Rosenberg (kevin@rosenberg.net) + * src/objects.lisp: Add new functions: + MAKE-POINTER and POINTER-ADDRESS + +2004-04-13 Kevin Rosenberg (kevin@rosenberg.net) + * src/string.lisp: Add new FOREIGN-STRING-LENGTH + +2003-08-15 Kevin Rosenberg (kevin@rosenberg.net) + * Added with-cast-pointer and def-foreign-var (patches submitted + by Edi Weitz). + * Added many new tests + +2002-10-16 Kevin Rosenberg (kevin@rosenberg.net) + * Added support for SBCL and SCL + +2002-09-29 Kevin Rosenberg (kevin@rosenberg.net) + * Numerous changes in openmcl support (uffi now supports + clsql on openmcl) + +2002-09-19 Kevin Rosenberg (kevin@rosenberg.net) + - Integrate John Desoi's OpenMCL support into src-mcl + * examples/Makefile: add section for building on MacOS X (John Desoi) + * examples/test-examples: changed from mk: to asdf: package loading (KMR) + * examples/run-examples: changed from mk: to asdf: package loading (KMR), + add conditional loading if UFFI not loaded (John Desoi) + * examples/compress.cl: Add dylib to library types for MacOSX (John Desoi), + converted compressed output to hexidecimal display (KMR) + * examples/union.cl: Rework the tests (KMR) + * src-main/libraries.cl: add dylib as default library type on MacOSX (John Desoi) + * src-main/aggregates.cl: convert from uffi type in deref-array (John Desoi) + +2002-09-16 Kevin Rosenberg (kevin@rosenberg.net) + - Restructure directories to move to a asdf definition file + without pathnames. + +2002-08-25 Kevin Rosenberg (kevin@rosenberg.net) + - Restructure directories to attempt to properly handle both + Common Lisp Controller and non-CLC systems + +2002-08-17 Kevin Rosenberg (kevin@rosenberg.net) + + - add uffi.asd for ASDF users + +2002-08-01 Kevin Rosenberg (kevin@rosenberg.net) + - Restructure directories to improve Common Lisp Controller v3 + compatibility + +2002-07-25 Kevin Rosenberg (kevin@rosenberg.net) + + - Rework handling of logical pathnames. + - Move run-examples.cl to examples directory. + +2002-06-28 Kevin Rosenberg (kevin@rosenberg.net) + + - Added size-of-foreign-type function. + +2002-06-26 Kevin Rosenberg (kevin@rosenberg.net) + + - Fix bug in Lispworks allocate-foreign-object + - Added new :unsigned-byte type. Made :byte signed. + +2002-04-27 Kevin Rosenberg (kevin@rosenberg.net) + - misc files + First debian version + +2002-04-23 Kevin Rosenberg (kevin@rosenberg.net) + - doc/* + Updated to debian docbook catalog + +2002-04-23 John DeSoi (desoi@mac.com) + * src/mcl/* + Improved MCL support + +2002-04-06 Kevin Rosenberg (kevin@rosenberg.net) + * src/mcl/libraries.cl: + Removed unnecessary function and added find-foreign-library + * src/mcl/*.cl: + Added authorship for John DeSoi + * doc/ref.sgml: + Added documentation for find-foreign-library + * uffi.system: + Simplied logical pathnames and MCL loading + +2002-04-04 John DeSoi (desoi@mac.com) + * src/mcl/*.cl + Added initial support for MCL + +2002-04-02 Kevin Rosenberg (kevin@rosenberg.net) + * src/libraries.cl: + Added test for .so libraries on CMUCL and use sys::load-object-file instead + of alien:load-library-file + * examples/Makefile: + Updated defaults so library is created correctly on Linux, FreeBSD, and Solaris + +2002-04-02 Kevin Rosenberg (kevin@rosenberg.net) + * examples/compress.cl: + Fixed missing '/' + * examples/union.cl: + Added support for SPARC big-endian + * test-examples.cl: + Automated testing suite + +2002-04-01 Kevin Rosenberg (kevin@rosenberg.net) + * src/libraries.cl: + * examples/Makefile: + Changed default type for FreeBSD and updated Makefile for + FreeBSD and Solaris. Enhanced find-foreign-library to + take a list of types to search. + * examples/compress.cl: + Add support to use find-foreign-library + +2002-03-31 Kevin Rosenberg (kevin@rosenberg.net) + * src/strings.cl: + Fixed bug in with-foreign-string (Thanks Harald Hanche-Olsen) + * examples/Makefile: + Create a .a library file for FreeBSD + * src/libraries.cl: + Added default type and find-foreign-library functions + +2002-03-29 Kevin Rosenberg (kevin@rosenberg.net) + * src/objects.cl: + Fixed bug in deref-pointer (Thanks John Desoi!) + +2002-03-22 Kevin Rosenberg (kevin@rosenberg.net) + * src/aggregates.cl: + Changed name and implementation of def-array to more appropriate + def-array-pointer + * src/ref.sgml: + Updated def-array-pointer documentation + * src/primitives.cl: + Made results of def-constant equal those of cl:defconstant + * src/objects.cl: + Made type be evaluated for with-foreign-object and allocate-foreign-object + * VERSION: + Increase to 0.3.0 to coincide with the release of CLSQL. + +21 Mar 2002 + * Fixed problem with NULL foreign-strings with CMUCL + * Added c-test-fns to examples for allow more specific testing + of UFFI. Builds on UNIX and Win32 platforms. + * Added def-union function, added union.cl example + * Fixed error with ensure-char-[character|integer] + * Added 2-d array example to examples/arrays.cl + * Fixed documentation error on gethostname + * Added ensure-char-* and def-union to documentation + * Added double-float vector example to c-test-fns + * Reworked cstring on Lispworks to have LW handle string conversion + * First pass at with-foreign-object -- unoptimized + * Added gethostname2 example which uses with-foreign-object + * Added char-array-to-pointer function to encapsulate + converting a char array to a char pointer + * Converted with-foreign-object to use stack allocation on CMUCL and LW + * Added benchmark code, first file is for allocation + +20 Mar 2002 + * Updated strings.cl so that foreign-strings are always unsigned. + Fixes a problem with strtol example. + * Added ensure-char-character and ensure-char-integer to handle + differences in implementations dereferencing of (* :char). + * Added section on design priorities for UFFI + * Added section in TODO on splitting implementation-dependent code + +19 Mar 2002 + * Added size parameter to allocate-foreign-object. Creates an array + of dimensions size. + * Got array-2d example working with a 1-d array. + * Cleaned strtol example + * Added TODO file + +18 Mar 2002 + * Documentation fixes (Erik Winkels) + * Fixed missing '.' in CMUCL type declarations (Erik Winkels) + +17 Mar 2002 + * Changed deref-pointer so it always returns a character when + called with a :char or :unsigned-char type + * Removed function ensure-char as no longer needed + * Added missing :byte specifier to Lispworks + * Changed default string type in Lispworks to :unsigned-char + which is the native type for Lispworks foreign-strings. + * Reworked strtol to handle new character pointing method + +16 Mar 2002 + * Fixed return value in load-foreign-library (Thanks Erik Winkels), + modified routine to accept pathnames as well as strings. + * Fix documention with :pointer-void (Again, Erik Winkels) + * Added missing type specifiers for CMUCL (Thanks a bunch, Erik!) + +15 Mar 2002 + * Finished basic skeleton of documentation. + +14 Mar 2002 + * Changed license to more liberal Lisp Lessor GNU Public License + * Fixed problem with uffi.system absent from in distribution + (Thanks John DeSoi) + * Fixed compiler warnings + + +11 Mar 2002 + * Changed def-type to def-foreign-type + * Created new macro def-type to generate cl:deftype forms. Removed + uffi-declare and uffi-slot-type as they are no longer necessary. + +10 Mar 2002 + * Modified input parameters to load-foreign-library + * Added to documention + * Changed parameter order in get-slot-value and deref-array + +9 Mar 2002 + * Added to documentation + * Made Allegro CL array access more efficient + * Changed def-routine name to def-function + * Fixed bug in def-function for Lispworks] + * Fixed error in +null-c-string-pointer+ name + * Fixed error in (make-null-pointer) for Lispworks + * Reworked Lispwork c-strings to be (* :char) rather than the + implementation default of (* (:unsigned :char)) to be consistent + with CMUCL. Bumped version to 0.2.0 because of change this change. + * Renamed c-string to cstring to emphasize it as a basic type + * Modified getenv.cl example to avoid name collison with LW + * Modified compress.cl to setup output buffer as :unsigned*char + * Added test-all-examples function. All routines tested okay with + ACL, LW, and CMUCL + +8 Mar 2002 + * Added ZIP file output with LF->CRLF translations to distribution + * Modified def-enum to use uffi:def-constant rather than + cl:defconstant +
Added: branches/trunk-reorg/thirdparty/uffi/INSTALL ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/INSTALL Mon Feb 11 09:06:27 2008 @@ -0,0 +1,3 @@ +Detailed installation instructions are supplied in PDF format +in the file ./doc/uffi.pdf. +
Added: branches/trunk-reorg/thirdparty/uffi/LICENSE ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/LICENSE Mon Feb 11 09:06:27 2008 @@ -0,0 +1,26 @@ +Copyright (c) 2001-2003 Kevin M. Rosenberg and contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the author nor the names of the contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.
Added: branches/trunk-reorg/thirdparty/uffi/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,45 @@ +# FILE IDENTIFICATION +# +# Name: Makefile +# Purpose: Makefile for the uffi package +# Programer: Kevin M. Rosenberg, M.D. +# Date Started: Mar 2002 +# +# CVS Id: $Id$ +# +# This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg + +PKG:=uffi +DEBPKG=cl-uffi +SUBDIRS:= examples src benchmarks +DOCSUBDIRS:=doc + +include Makefile.common + + +.PHONY: all +all: + + +.PHONY: distclean +distclean: clean + @$(MAKE) -C doc $@ +# ./debian/rules clean + + +SOURCE_FILES=src doc examples Makefile uffi.system uffi.debian.system \ + benchmarks COPYRIGHT README TODO INSTALL ChangeLog NEWS \ + test-examples.cl set-logical.cl + +.PHONY: doc +doc: + $(MAKE) -C doc + +.PHONY: dist +dist: clean + $(MAKE) -C doc $@ + +.PHONY: TAGS +TAGS: + if [ -f TAGS ]; then mv -f TAGS TAGS~; fi + find . -name *.lisp -exec /usr/bin/etags -a {} ;
Added: branches/trunk-reorg/thirdparty/uffi/Makefile.common ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/Makefile.common Mon Feb 11 09:06:27 2008 @@ -0,0 +1,17 @@ +all: + + +.PHONY: clean +clean: + @rm -rf .bin + @rm -f *.ufsl *.fsl *.fas *.x86f *.sparcf *.fasl + @rm -f *.fasla8 *.fasla16 *.faslm8 *.faslm16 *.faslmt + @rm -f *~ *.bak *.orig *.err #*# .#* + @rm -f *.so *.a + @rm -rf debian/cl-uffi +ifneq ($(SUBDIRS)$(DOCSUBDIRS),) + @set -e; for i in $(SUBDIRS) $(DOCSUBDIRS); do \ + $(MAKE) -C $$i $@; done +endif + +.SUFFIXES: # No default suffixes
Added: branches/trunk-reorg/thirdparty/uffi/NEWS ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/NEWS Mon Feb 11 09:06:27 2008 @@ -0,0 +1 @@ +UFFI now supports AllegroCL AMD64
Added: branches/trunk-reorg/thirdparty/uffi/README ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/README Mon Feb 11 09:06:27 2008 @@ -0,0 +1,20 @@ +Package: UFFI (Universal Foreign Language Interface) +Web site: http://uffi.b9.com +Author: Kevin M. Rosenberg + + +BRIEF DESCRIPTION +----------------- +uffi is a Common Lisp package for interfacing C-language compatible +libraries. Every Common Lisp implementation has a method for +interfacing to such libraries. Unfortunately, these method vary widely +amongst implementations. uffi gathers a common subset of functionality +between Common Lisp implementations. uffi wraps this common subset of +functionality into it's own syntax and provides macro translation of +uffi features into the specific syntax of supported Common Lisp +implementations. + +Currently, AllegroCL (Linux and Microsoft Windows), Lispworks (Linux +and Microsoft Windows), CMUCL, SBCL, and OpenMCL are supported. + +
Added: branches/trunk-reorg/thirdparty/uffi/TODO ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/TODO Mon Feb 11 09:06:27 2008 @@ -0,0 +1,7 @@ +- Run test-suite on MCL port + +- Add OpenMCL support for with-cast-pointer and def-foreign-var + +- Add support for direct vector passing to and from foreign functions + to avoid copying elements in and out of vector. +
Added: branches/trunk-reorg/thirdparty/uffi/benchmarks/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/benchmarks/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,6 @@ +SUBDIRS := + +include ../Makefile.common + +.PHONY: distclean +distclean: clean
Added: branches/trunk-reorg/thirdparty/uffi/benchmarks/allocation.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/benchmarks/allocation.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,126 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: allocation.cl +;;;; Purpose: Benchmark allocation and slot-access speed +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(declaim (optimize (debug 3) (speed 3) (safety 1) (compilation-speed 0))) +(in-package :cl-user) + + +(defun stk-int () + #+allegro + (ff:with-stack-fobject (ptr :int) + (setf (ff:fslot-value ptr) 0)) + #+lispworks + (fli:with-dynamic-foreign-objects ((ptr :int)) + (setf (fli:dereference ptr) 0)) + #+cmu + (alien:with-alien ((ptr alien:signed)) + (let ((p (alien:addr ptr))) + (setf (alien:deref p) 0))) + #+sbcl + (sb-alien:with-alien ((ptr sb-alien:signed)) + (let ((p (sb-alien:addr ptr))) + (setf (sb-alien:deref p) 0))) + ) + +(defun stk-vector () + #+allegro + (ff:with-stack-fobject (ptr '(:array :int 10) ) + (setf (ff:fslot-value ptr 5) 0)) + #+lispworks + (fli:with-dynamic-foreign-objects ((ptr (:c-array :int 10))) + (setf (fli:dereference ptr 5) 0)) + #+cmu + (alien:with-alien ((ptr (alien:array alien:signed 10))) + (setf (alien:deref ptr 5) 0)) + #+sbcl + (sb-alien:with-alien ((ptr (sb-alien:array sb-alien:signed 10))) + (setf (sb-alien:deref ptr 5) 0)) + ) + +(defun stat-int () + #+allegro + (let ((ptr (ff:allocate-fobject :int :c))) + (declare (dynamic-extent ptr)) + (setf (ff:fslot-value-typed :int :c ptr) 0) + (ff:free-fobject ptr)) + #+lispworks + (let ((ptr (fli:allocate-foreign-object :type :int))) + (declare (dynamic-extent ptr)) + (setf (fli:dereference ptr) 0) + (fli:free-foreign-object ptr)) + #+cmu + (let ((ptr (alien:make-alien (alien:signed 32)))) + (declare ;;(type (alien (* (alien:unsigned 32))) ptr) + (dynamic-extent ptr)) + (setf (alien:deref ptr) 0) + (alien:free-alien ptr)) + #+sbcl + (let ((ptr (sb-alien:make-alien (sb-alien:signed 32)))) + (declare ;;(type (alien (* (alien:unsigned 32))) ptr) + (dynamic-extent ptr)) + (setf (sb-alien:deref ptr) 0) + (sb-alien:free-alien ptr)) + ) + +(defun stat-vector () + #+allegro + (let ((ptr (ff:allocate-fobject '(:array :int 10) :c))) + (declare (dynamic-extent ptr)) + (setf (ff:fslot-value-typed '(:array :int 10) :c ptr 5) 0) + (ff:free-fobject ptr)) + #+lispworks + (let ((ptr (fli:allocate-foreign-object :type '(:c-array :int 10)))) + (declare (dynamic-extent ptr)) + (setf (fli:dereference ptr 5) 0) + (fli:free-foreign-object ptr)) + #+cmu + (let ((ptr (alien:make-alien (alien:array (alien:signed 32) 10)))) + (declare ;;(type (alien (* (alien:unsigned 32))) ptr) + (dynamic-extent ptr)) + (setf (alien:deref ptr 5) 0) + (alien:free-alien ptr)) + #+sbcl + (let ((ptr (sb-alien:make-alien (sb-alien:array (sb-alien:signed 32) 10)))) + (declare ;;(type (sb-alien (* (sb-alien:unsigned 32))) ptr) + (dynamic-extent ptr)) + (setf (sb-alien:deref ptr 5) 0) + (sb-alien:free-alien ptr)) + ) + + +(defun stk-vs-stat () + (format t "~&Stack allocation, Integer") + (time (dotimes (i 1000) + (dotimes (j 1000) + (stk-int)))) + (format t "~&Static allocation, Integer") + (time (dotimes (i 1000) + (dotimes (j 1000) + (stat-int)))) + (format t "~&Stack allocation, Vector") + (time (dotimes (i 1000) + (dotimes (j 1000) + (stk-int)))) + (format t "~&Static allocation, Vector") + (time (dotimes (i 1000) + (dotimes (j 1000) + (stat-int)))) +) + + +(stk-vs-stat) + + +
Added: branches/trunk-reorg/thirdparty/uffi/debian/README.Debian ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/README.Debian Mon Feb 11 09:06:27 2008 @@ -0,0 +1,7 @@ +The Debian Package CL-UFFI +-------------------------- + +This is the UFFI Common Lisp system packaged for Debian by +Kevin M. Rosenberg kmr@debian.org, April 2002. + +The home page for UFFI is http://uffi.med-info.com/
Added: branches/trunk-reorg/thirdparty/uffi/debian/changelog ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/changelog Mon Feb 11 09:06:27 2008 @@ -0,0 +1,872 @@ +cl-uffi (1.6.0-1) unstable; urgency=low + + * New upstream (closes: 433814) + + -- Kevin M. Rosenberg kmr@debian.org Sun, 22 Jul 2007 12:39:49 -0600 + +cl-uffi (1.5.18-3) unstable; urgency=low + + * debian/watch: New version + + -- Kevin M. Rosenberg kmr@debian.org Wed, 18 Jul 2007 20:27:04 -0600 + +cl-uffi (1.5.18-2) unstable; urgency=low + + * Fix build twice in a row (closes: 424155) + + -- Kevin M. Rosenberg kmr@debian.org Tue, 22 May 2007 11:33:27 -0600 + +cl-uffi (1.5.18-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 12 Apr 2007 23:48:46 -0600 + +cl-uffi (1.5.17-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 10 Oct 2006 08:34:43 -0600 + +cl-uffi (1.5.16-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 02 Sep 2006 20:31:11 -0600 + +cl-uffi (1.5.15-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Mon, 14 Aug 2006 00:21:47 -0600 + +cl-uffi (1.5.14-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 4 Jul 2006 19:23:10 -0600 + +cl-uffi (1.5.13-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 17 May 2006 09:08:58 -0600 + +cl-uffi (1.5.12-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 17 May 2006 08:09:13 -0600 + +cl-uffi (1.5.11-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 9 May 2006 09:33:59 -0600 + +cl-uffi (1.5.10-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Mon, 17 Apr 2006 18:05:56 -0600 + +cl-uffi (1.5.9-1) unstable; urgency=low + + * add GNU uname (closes: 355924) + + -- Kevin M. Rosenberg kmr@debian.org Wed, 8 Mar 2006 12:06:17 -0700 + +cl-uffi (1.5.8-1) unstable; urgency=low + + * Really commit patch for GNU/kFreeBSD (closes: 345220) + + -- Kevin M. Rosenberg kmr@debian.org Mon, 16 Jan 2006 14:47:08 -0700 + +cl-uffi (1.5.7-2) unstable; urgency=low + + * Commit patch for GNU/kFreeBSD (closes: 345220) + + -- Kevin M. Rosenberg kmr@debian.org Sat, 31 Dec 2005 11:11:36 -0700 + +cl-uffi (1.5.7-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Mon, 14 Nov 2005 19:39:25 -0700 + +cl-uffi (1.5.6-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Mon, 14 Nov 2005 12:02:07 -0700 + +cl-uffi (1.5.5-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Fri, 4 Nov 2005 11:59:50 -0700 + +cl-uffi (1.5.4-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sun, 18 Sep 2005 01:22:50 -0600 + +cl-uffi (1.5.3-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 17 Sep 2005 23:44:20 -0600 + +cl-uffi (1.5.2-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 17 Sep 2005 22:48:11 -0600 + +cl-uffi (1.5.1-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 6 Jul 2005 21:29:46 -0600 + +cl-uffi (1.5.0-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 5 Jul 2005 19:03:23 -0600 + +cl-uffi (1.4.39-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 8 Jun 2005 18:37:06 -0600 + +cl-uffi (1.4.38-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 08 Jun 2005 10:42:10 -0600 + +cl-uffi (1.4.37-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 13 Apr 2005 12:42:41 -0600 + +cl-uffi (1.4.36-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 6 Apr 2005 11:42:09 -0600 + +cl-uffi (1.4.35-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Mon, 4 Apr 2005 14:35:10 -0600 + +cl-uffi (1.4.34-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sun, 3 Apr 2005 17:55:49 -0600 + +cl-uffi (1.4.33-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 2 Mar 2005 12:25:43 -0700 + +cl-uffi (1.4.32-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 22 Feb 2005 10:10:03 -0700 + +cl-uffi (1.4.31-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 22 Jan 2005 17:27:37 -0700 + +cl-uffi (1.4.30-1) unstable; urgency=low + + * New upstream, handle sb-unicode + + -- Kevin M. Rosenberg kmr@debian.org Mon, 8 Nov 2004 19:30:11 -0700 + +cl-uffi (1.4.29-1) unstable; urgency=low + + * New upstream, revert patch that broken clsql on debian + + -- Kevin M. Rosenberg kmr@debian.org Sat, 30 Oct 2004 11:30:14 -0600 + +cl-uffi (1.4.28-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 23 Oct 2004 09:05:50 -0600 + +cl-uffi (1.4.27-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 21 Oct 2004 16:44:11 -0600 + +cl-uffi (1.4.26-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 9 Sep 2004 22:20:47 -0600 + +cl-uffi (1.4.25-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Fri, 27 Aug 2004 06:33:16 -0600 + +cl-uffi (1.4.24-1) unstable; urgency=low + + * Fix for OpenMCL from James Bielman + + -- Kevin M. Rosenberg kmr@debian.org Thu, 15 Jul 2004 09:27:22 -0600 + +cl-uffi (1.4.23-1) unstable; urgency=low + + * Add support for new SBCL load-shared-object [supplied by Andreas Fuchs] + + -- Kevin M. Rosenberg kmr@debian.org Tue, 13 Jul 2004 09:19:32 -0600 + +cl-uffi (1.4.22-1) unstable; urgency=low + + * OpenMCL fix + + -- Kevin M. Rosenberg kmr@debian.org Wed, 23 Jun 2004 12:36:24 -0600 + +cl-uffi (1.4.21-1) unstable; urgency=low + + * Fix for WITH-FOREIGN-OBJECT macro on CMUCL + + -- Kevin M. Rosenberg kmr@debian.org Thu, 10 Jun 2004 00:17:31 -0600 + +cl-uffi (1.4.20-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 20 May 2004 09:59:07 -0600 + +cl-uffi (1.4.19-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 19 May 2004 12:16:03 -0600 + +cl-uffi (1.4.18-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 18 May 2004 15:40:58 -0600 + +cl-uffi (1.4.17-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 15 May 2004 11:02:22 -0600 + +cl-uffi (1.4.16-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 13 May 2004 04:23:13 -0600 + +cl-uffi (1.4.15-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 12 May 2004 22:40:39 -0600 + +cl-uffi (1.4.14-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Wed, 12 May 2004 12:48:13 -0600 + +cl-uffi (1.4.13-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 6 May 2004 10:14:10 -0600 + +cl-uffi (1.4.12-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Sat, 17 Apr 2004 12:26:00 -0600 + +cl-uffi (1.4.11-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 15 Apr 2004 05:48:48 -0600 + +cl-uffi (1.4.10-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 15 Apr 2004 01:59:37 -0600 + +cl-uffi (1.4.9-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 13 Apr 2004 16:03:22 -0600 + +cl-uffi (1.4.8-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 13 Apr 2004 14:13:04 -0600 + +cl-uffi (1.4.7-1) unstable; urgency=low + + * Fix fast-native-to-string on 16-bit wide char Allegro + + -- Kevin M. Rosenberg kmr@debian.org Fri, 2 Apr 2004 14:20:36 -0700 + +cl-uffi (1.4.6-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 25 Nov 2003 06:37:14 -0700 + +cl-uffi (1.4.5-1) unstable; urgency=low + + * Change documentation encoding to ISO-8859-1 + + -- Kevin M. Rosenberg kmr@debian.org Thu, 20 Nov 2003 20:35:15 -0700 + +cl-uffi (1.4.4-1) unstable; urgency=low + + * Add patch from Vebjorn Ljosa for fast-native-to-string + + -- Kevin M. Rosenberg kmr@debian.org Tue, 18 Nov 2003 13:09:32 -0700 + +cl-uffi (1.4.3-1) unstable; urgency=low + + * Improved test/make.sh and uffi-tests.asd + + -- Kevin M. Rosenberg kmr@debian.org Tue, 11 Nov 2003 15:02:40 -0700 + +cl-uffi (1.4.2-1) unstable; urgency=low + + * Yet another attempt for asdf-install + + -- Kevin M. Rosenberg kmr@debian.org Tue, 11 Nov 2003 04:51:24 -0700 + +cl-uffi (1.4.1-1) unstable; urgency=low + + * Fix for asdf-install + + -- Kevin M. Rosenberg kmr@debian.org Tue, 11 Nov 2003 04:29:27 -0700 + +cl-uffi (1.4.0-1) unstable; urgency=low + + * Make UFFI asdf-installable + + -- Kevin M. Rosenberg kmr@debian.org Tue, 11 Nov 2003 03:28:06 -0700 + +cl-uffi (1.3.9-1) unstable; urgency=low + + * Use local XSL files, add Debian-specific catalog + + -- Kevin M. Rosenberg kmr@debian.org Tue, 11 Nov 2003 00:12:34 -0700 + +cl-uffi (1.3.8-1) unstable; urgency=low + + * Use XInclude for documentation + + -- Kevin M. Rosenberg kmr@debian.org Mon, 10 Nov 2003 22:39:33 -0700 + +cl-uffi (1.3.7-1) unstable; urgency=low + + * Convert documentation to Docbook XML with new processing commands + + -- Kevin M. Rosenberg kmr@debian.org Mon, 10 Nov 2003 20:38:28 -0700 + +cl-uffi (1.3.6-1) unstable; urgency=low + + * More MacOSX changes + + -- Kevin M. Rosenberg kmr@debian.org Sun, 31 Aug 2003 20:45:23 -0600 + +cl-uffi (1.3.5-1) unstable; urgency=low + + * Rework loading of foreign libraries to better support MacOSX, especially + sbcl + + -- Kevin M. Rosenberg kmr@debian.org Wed, 27 Aug 2003 10:01:11 -0600 + +cl-uffi (1.3.4-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Tue, 26 Aug 2003 07:29:19 -0600 + +cl-uffi (1.3.3-1) unstable; urgency=low + + * Add gettimeofday to tests + + -- Kevin M. Rosenberg kmr@debian.org Tue, 26 Aug 2003 07:29:07 -0600 + +cl-uffi (1.3.2-1) unstable; urgency=low + + * Patch from Edi Weitz + + -- Kevin M. Rosenberg kmr@debian.org Fri, 22 Aug 2003 19:03:06 -0600 + +cl-uffi (1.3.1-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 14 Aug 2003 18:27:32 -0600 + +cl-uffi (1.3.0-1) unstable; urgency=low + + * Add initial support and tests for def-foreign-var + + -- Kevin M. Rosenberg kmr@debian.org Thu, 14 Aug 2003 15:38:33 -0600 + +cl-uffi (1.2.23-1) unstable; urgency=low + + * New upstream with fixes suggested and patches submitted by Edi Weitz. + + -- Kevin M. Rosenberg kmr@debian.org Thu, 14 Aug 2003 12:26:07 -0600 + +cl-uffi (1.2.22-1) unstable; urgency=low + + * New upstream with Lispworks patch from Edi Weitz + + -- Kevin M. Rosenberg kmr@debian.org Tue, 12 Aug 2003 08:09:04 -0600 + +cl-uffi (1.2.21-1) unstable; urgency=low + + * New upstream -- fix for Franz's mlisp + + -- Kevin M. Rosenberg kmr@debian.org Sat, 19 Jul 2003 14:15:52 -0600 + +cl-uffi (1.2.20-1) unstable; urgency=low + + * New upstream -- really fix bug + + -- Kevin M. Rosenberg kmr@debian.org Tue, 8 Jul 2003 06:37:58 -0600 + +cl-uffi (1.2.19-1) unstable; urgency=low + + * Fix bug in sbcl/load-library + + -- Kevin M. Rosenberg kmr@debian.org Mon, 7 Jul 2003 18:49:37 -0600 + +cl-uffi (1.2.18-1) unstable; urgency=low + + * New BSD license + + -- Kevin M. Rosenberg kmr@debian.org Thu, 26 Jun 2003 12:01:24 -0600 + +cl-uffi (1.2.17-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 12 Jun 2003 06:12:30 -0600 + +cl-uffi (1.2.16-1) unstable; urgency=low + + * New upstream + + -- Kevin M. Rosenberg kmr@debian.org Thu, 12 Jun 2003 06:04:06 -0600 + +cl-uffi (1.2.15-1) unstable; urgency=low + + * Documentation improvement by Nikodemus Siivola + + -- Kevin M. Rosenberg kmr@debian.org Mon, 5 May 2003 15:57:32 -0600 + +cl-uffi (1.2.14-1) unstable; urgency=low + + * New upstream + * Add to debhelper to depends (closes:192001) + + -- Kevin M. Rosenberg kmr@debian.org Mon, 5 May 2003 08:53:30 -0600 + +cl-uffi (1.2.13-1) unstable; urgency=low + + * Fix getenv test + * Work-around load-object-file bug in CMUCL in testing script + + -- Kevin M. Rosenberg kmr@debian.org Thu, 1 May 2003 17:31:21 -0600 + +cl-uffi (1.2.12-1) unstable; urgency=low + + * Finish converting examples into test suite + + -- Kevin M. Rosenberg kmr@debian.org Wed, 30 Apr 2003 08:11:42 -0600 + +cl-uffi (1.2.11-1) unstable; urgency=low + + * Add test suite, new binary package uffi-tests + + -- Kevin M. Rosenberg kmr@debian.org Tue, 29 Apr 2003 08:10:26 -0600 + +cl-uffi (1.2.10-1) unstable; urgency=low + + * Fix allegro free-cstring bug + + -- Kevin M. Rosenberg kmr@debian.org Fri, 28 Mar 2003 12:58:08 -0700 + +cl-uffi (1.2.9-1) unstable; urgency=low + + * change ccl:%put-cstring to ccl::%put-cstring for openmcl + + -- Kevin M. Rosenberg kmr@debian.org Wed, 12 Mar 2003 14:12:03 -0700 + +cl-uffi (1.2.8-1) unstable; urgency=low + + * Change output on compress.lisp example + + -- Kevin M. Rosenberg kmr@debian.org Mon, 10 Mar 2003 10:37:00 -0700 + +cl-uffi (1.2.7-1) unstable; urgency=low + + * Remove reference to obsolete Corman module in uffi.asd + + -- Kevin M. Rosenberg kmr@debian.org Wed, 19 Feb 2003 14:56:15 -0700 + +cl-uffi (1.2.6-1) unstable; urgency=low + + * Add :language :ansi-c for Lispworks def-function + + -- Kevin M. Rosenberg kmr@debian.org Wed, 5 Feb 2003 23:54:12 -0700 + +cl-uffi (1.2.5-1) unstable; urgency=low + + * Rework allocate-foreign-array to evaluate type + + -- Kevin M. Rosenberg kmr@debian.org Sat, 28 Dec 2002 01:12:30 -0700 + +cl-uffi (1.2.4-1) unstable; urgency=low + + * Fix syntax error from last version + + -- Kevin M. Rosenberg kmr@debian.org Fri, 13 Dec 2002 18:54:41 -0700 + +cl-uffi (1.2.3-1) unstable; urgency=low + + * More external format changes for lispworks (thanks Marc Battyani) + + -- Kevin M. Rosenberg kmr@debian.org Fri, 13 Dec 2002 15:46:23 -0700 + +cl-uffi (1.2.2-1) unstable; urgency=low + + * Add external format parameters to lispworks to avoid translating stringsl + + -- Kevin M. Rosenberg kmr@debian.org Fri, 13 Dec 2002 14:26:17 -0700 + +cl-uffi (1.2.1-1) unstable; urgency=low + + * Add uncompression test + + -- Kevin M. Rosenberg kmr@debian.org Mon, 9 Dec 2002 09:05:52 -0700 + +cl-uffi (1.2.0-1) unstable; urgency=low + + * Fixes in allocate-foreign-object and deref-array for allegro + + -- Kevin M. Rosenberg kmr@debian.org Mon, 2 Dec 2002 23:59:43 -0700 + +cl-uffi (1.1.8-1) unstable; urgency=low + + * Reverse broken bug "fixes" + + -- Kevin M. Rosenberg kmr@debian.org Thu, 28 Nov 2002 11:47:26 -0700 + +cl-uffi (1.1.7.1-1) unstable; urgency=low + + * Another allegro bug (Thanks Matthew Danish) + + -- Kevin M. Rosenberg kmr@debian.org Sat, 23 Nov 2002 12:06:40 -0700 + +cl-uffi (1.1.7-1) unstable; urgency=low + + * bug fixes on allegro + + -- Kevin M. Rosenberg kmr@debian.org Sat, 23 Nov 2002 11:03:18 -0700 + +cl-uffi (1.1.6-1) unstable; urgency=low + + * More documention of cstrings and foreign strings + + -- Kevin M. Rosenberg kmr@debian.org Thu, 21 Nov 2002 19:51:55 -0700 + +cl-uffi (1.1.5-1) unstable; urgency=low + + * Documentation changes + + -- Kevin M. Rosenberg kmr@debian.org Thu, 21 Nov 2002 18:35:26 -0700 + +cl-uffi (1.1.4-1) unstable; urgency=low + + * OpenMCL/MCL fixes + + -- Kevin M. Rosenberg kmr@debian.org Wed, 20 Nov 2002 14:03:16 -0700 + +cl-uffi (1.1.3-1) unstable; urgency=low + + * Fix OpenMCL default library pathname type + + -- Kevin M. Rosenberg kmr@debian.org Sun, 17 Nov 2002 22:28:59 -0700 + +cl-uffi (1.1.2-1) unstable; urgency=low + + * src/objects.lisp: Fix bug in allocate-foreign-object for AllegroCL + + -- Kevin M. Rosenberg kmr@debian.org Thu, 14 Nov 2002 15:10:41 -0700 + +cl-uffi (1.1.1-1) unstable; urgency=low + + * Remove 'load-compiled-op from .asd file + + -- Kevin M. Rosenberg kmr@debian.org Fri, 8 Nov 2002 09:49:49 -0700 + +cl-uffi (1.1.0-1) unstable; urgency=low + + * Add SCL support. + + -- Kevin M. Rosenberg kmr@debian.org Tue, 15 Oct 2002 11:22:35 -0600 + +cl-uffi (1.0.1-1) unstable; urgency=low + + * Add SBCL to documentation + + -- Kevin M. Rosenberg kmr@debian.org Mon, 14 Oct 2002 01:18:05 -0600 + +cl-uffi (1.0.0-1) unstable; urgency=low + + * Initial SBCL compatibility + + -- Kevin M. Rosenberg kmr@debian.org Sun, 13 Oct 2002 19:01:31 -0600 + +cl-uffi (0.9.2-1) unstable; urgency=high + + * Add AUTHORS file + * Integrate Reini Urban's cormanlisp patches into main source + * Add Depends: version on Common Lisp Controller + + -- Kevin M. Rosenberg kmr@debian.org Tue, 1 Oct 2002 08:11:21 -0600 + +cl-uffi (0.9.1-1) unstable; urgency=low + + * Rename .cl files to .lisp files + + -- Kevin M. Rosenberg kmr@debian.org Mon, 30 Sep 2002 04:01:58 -0600 + +cl-uffi (0.9.0-1) unstable; urgency=low + + * Reorganize directories, merge MCL/OpenMCL into main code + + -- Kevin M. Rosenberg kmr@debian.org Mon, 30 Sep 2002 01:32:03 -0600 + +cl-uffi (0.8.6-1) unstable; urgency=low + + * Fix :pointer-self for OpenMCL. + * Multiple changes to support OpenMCL with CLSQL + + -- Kevin M. Rosenberg kmr@debian.org Mon, 30 Sep 2002 01:31:37 -0600 + +cl-uffi (0.8.5-1) unstable; urgency=low + + * Add with-cstrings macro to mcl's source + + -- Kevin M. Rosenberg kmr@debian.org Sun, 29 Sep 2002 12:19:20 -0600 + +cl-uffi (0.8.4-1) unstable; urgency=low + + * Change mcl's load-library definition from macro to function + + -- Kevin M. Rosenberg kmr@debian.org Sun, 29 Sep 2002 11:49:32 -0600 + +cl-uffi (0.8.3-1) unstable; urgency=low + + * New upstream release. Passes all tests with OpenMCL in Debian PPC. + + -- Kevin M. Rosenberg kmr@debian.org Sun, 29 Sep 2002 11:32:05 -0600 + +cl-uffi (0.8.2-2) unstable; urgency=low + + * Add pathname to clc-register-impl invocation + + -- Kevin M. Rosenberg kmr@debian.org Wed, 25 Sep 2002 06:38:44 -0600 + +cl-uffi (0.8.2-1) unstable; urgency=low + + * Add conditionals to .asd file to control clc autobuilding + + -- Kevin M. Rosenberg kmr@debian.org Sun, 22 Sep 2002 21:00:57 -0600 + +cl-uffi (0.8.1-1) unstable; urgency=low + + * Fix size of openmcl's and mcl's integers + + -- Kevin M. Rosenberg kmr@debian.org Fri, 20 Sep 2002 07:06:31 -0600 + +cl-uffi (0.8.0-1) unstable; urgency=low + + * Adds support for openmcl, numerous changes from John Desoi + + -- Kevin M. Rosenberg kmr@debian.org Thu, 19 Sep 2002 21:09:17 -0600 + +cl-uffi (0.7.1-1) unstable; urgency=low + + * New upstream version + + -- Kevin M. Rosenberg kmr@debian.org Wed, 18 Sep 2002 01:57:10 -0600 + +cl-uffi (0.7.0-1) unstable; urgency=low + + * Remove .system file, restructure directories for .asd file without pathnames + + -- Kevin M. Rosenberg kmr@debian.org Mon, 16 Sep 2002 12:00:45 -0600 + +cl-uffi (0.6.3-1) unstable; urgency=low + + * New upstream version, fixes problem with .asd file. + + -- Kevin M. Rosenberg kmr@debian.org Fri, 6 Sep 2002 04:59:45 -0600 + +cl-uffi (0.6.2-1) unstable; urgency=low + + * New upstream version. Restructure directories once again to handle + non-CLC systems. + + -- Kevin M. Rosenberg kmr@debian.org Fri, 23 Aug 2002 09:33:14 -0600 + +cl-uffi (0.6.1-1) unstable; urgency=low + + * Add uffi.asd file to upstream for ASDF users. + + -- Kevin M. Rosenberg kmr@debian.org Sat, 17 Aug 2002 18:50:12 -0600 + +cl-uffi (0.6.0-2) unstable; urgency=low + + * Update e-mail address + * Update Standards version + + -- Kevin M. Rosenberg kmr@debian.org Mon, 12 Aug 2002 00:01:27 -0600 + +cl-uffi (0.6.0-1) unstable; urgency=low + + * New upstream version (Restructure directories to improve Common Lisp + Controller compatibility.) + + -- Kevin M. Rosenberg kmr@debian.org Thu, 25 Jul 2002 21:24:53 -0600 + +cl-uffi (0.5.1-1) unstable; urgency=low + + * Rework upstream documentation. + + -- Kevin M. Rosenberg kmr@debian.org Tue, 9 Jul 2002 12:45:56 -0600 + +cl-uffi (0.5.0-2) unstable; urgency=low + + * Add the LLGPL text to the copyright file. + + -- Kevin M. Rosenberg kmr@debian.org Sun, 7 Jul 2002 15:40:05 -0600 + +cl-uffi (0.5.0-1) unstable; urgency=low + + * New upstream version + + * Additions to the copyright file to comply with Debian Policy + + -- Kevin M. Rosenberg kmr@debian.org Fri, 28 Jun 2002 11:16:28 -0600 + +cl-uffi (0.4.8-1) unstable; urgency=low + + * New upstream version + + -- Kevin M. Rosenberg kmr@debian.org Wed, 26 Jun 2002 21:35:07 -0600 + +cl-uffi (0.4.5-2) unstable; urgency=low + + * Fix Build-Depends-Indep + + -- Kevin M. Rosenberg kmr@debian.org Tue, 25 Jun 2002 06:12:19 -0600 + +cl-uffi (0.4.5-1) unstable; urgency=low + + * New upstream version. + + * Remove deprecated repository + + * Migrate to Debhelper V4 + + * Changed Maintainer: field from sponsor to sponsoree/packager + + -- Kevin M. Rosenberg kmr@debian.org Thu, 20 Jun 2002 07:43:53 -0600 + +cl-uffi (0.4.4-8) unstable; urgency=low + + * Improved control file in anticipation of having dpkg-buildpackage + generate the documentation rather than putting the documentation in + the upstream archive. + * Remade package to include upstream sources. + + -- Kevin M. Rosenberg kmr@debian.org Sun, 5 May 2002 11:17:52 -0600 + +cl-uffi (0.4.4-7) unstable; urgency=low + + * Modified make-dist.sh to use cvs-buildpackage, added options + * Cleaned debian/rules, debian/copyright + * First version to upload. (closes: #145723) + + -- Kevin M. Rosenberg kmr@debian.org Sat, 4 May 2002 16:03:11 -0600 + +cl-uffi (0.4.4-6) unstable; urgency=low + + * Fixed Maintainer and Uploader fields in debian control + + -- Kevin M. Rosenberg kmr@debian.org Fri, 3 May 2002 09:11:47 -0600 + +cl-uffi (0.4.4-5) unstable; urgency=low + + * Commented-out DH_VERBOSE flag. + * Uses debian/dirs with debhelper. + * Changed doc-base section to programming. + * Added Uploaders field to debian/control. + * Made .system file be a symbolic link to .system file in repository. + + -- Kevin M. Rosenberg kmr@debian.org Thu, 2 May 2002 15:37:50 -0600 + +cl-uffi (0.4.4-4) unstable; urgency=low + + * Added upstream ChangeLog to debian distribution. + + -- Kevin M. Rosenberg kmr@debian.org Tue, 30 Apr 2002 13:01:12 -0600 + +cl-uffi (0.4.4-3) unstable; urgency=low + + * Modified make-dist.sh to create better .diff.gz + + -- Kevin M. Rosenberg kmr@debian.org Sun, 28 Apr 2002 06:38:48 -0600 + +cl-uffi (0.4.4-2) unstable; urgency=low + + * Improved source code archive for debian upload. + + -- Kevin M. Rosenberg kmr@debian.org Sun, 28 Apr 2002 03:04:52 -0600 + +cl-uffi (0.4.4-1) unstable; urgency=low + + * Initial package. + + -- Kevin M. Rosenberg kmr@debian.org Thu, 25 Apr 2002 19:13:41 -0600 +
Added: branches/trunk-reorg/thirdparty/uffi/debian/cl-uffi.doc-base ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/cl-uffi.doc-base Mon Feb 11 09:06:27 2008 @@ -0,0 +1,17 @@ +Document: cl-uffi +Title: UFFI Manual +Author: Kevin M. Rosenberg +Abstract: This manual describes the + use the UFFI (Universal Foreign Function Interface) + Common Lisp library. This library supports CMUCL, SBCL, + AllegroCL, Lispworks, SCL, OpenMCL, and MCL. +Section: programming + +Format: PDF +Files: /usr/share/doc/cl-uffi/cl-uffi.pdf.gz + +Format: HTML +Index: /usr/share/doc/cl-uffi/html/index.html +Files: /usr/share/doc/cl-uffi/html/*.html + +
Added: branches/trunk-reorg/thirdparty/uffi/debian/compat ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/compat Mon Feb 11 09:06:27 2008 @@ -0,0 +1 @@ +4
Added: branches/trunk-reorg/thirdparty/uffi/debian/control ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/control Mon Feb 11 09:06:27 2008 @@ -0,0 +1,23 @@ +Source: cl-uffi +Section: devel +Priority: optional +Maintainer: Kevin M. Rosenberg kmr@debian.org +Build-Depends: zlib1g-dev,debhelper (>= 4.0.0) +Standards-Version: 3.7.2.2 + +Package: cl-uffi +Architecture: all +Depends: common-lisp-controller (>= 3.37) +Recommends: cl-uffi-tests +Description: Universal Foreign Function Library for Common Lisp + UFFI provides a universal foreign function interface (FFI) for + Common Lisp. + UFFI supports AllegroCL, CMUCL, Lispworks, MCL, OpenMCL, + SBCL, and SCL. + +Package: cl-uffi-tests +Architecture: any +Depends: common-lisp-controller (>= 3.37), cl-uffi, zlib1g-dev +Description: Regression tests for UFFI Common Lisp Library + This is a test of regression tests for UFFI. Besides providing + testing for UFFI, the tests serve as an example of UFFI usage.
Added: branches/trunk-reorg/thirdparty/uffi/debian/copyright ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/copyright Mon Feb 11 09:06:27 2008 @@ -0,0 +1,34 @@ +Debian Copyright Section +======================== + +Upstream Source URL: http://files.b9.com/uffi +Upstream Author: Kevin Rosenberg kevin@rosenberg.net +Debian Maintainer: Kevin M. Rosenberg kmr@debian.org + + +Copyright (c) 2001-2003 Kevin M. Rosenberg and contributors. +All rights reserved. + +Redistribution and use in source and binary forms, with or without +modification, are permitted provided that the following conditions +are met: +1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. +2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. +3. Neither the name of the author nor the names of the contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + +THIS SOFTWARE IS PROVIDED BY THE AUTHORS AND CONTRIBUTORS ``AS IS'' AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE +ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHORS OR CONTRIBUTORS BE LIABLE +FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL +DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS +OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) +HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT +LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY +OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +SUCH DAMAGE.
Added: branches/trunk-reorg/thirdparty/uffi/debian/cvsbp-prepare.sh ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/cvsbp-prepare.sh Mon Feb 11 09:06:27 2008 @@ -0,0 +1,9 @@ +#!/bin/bash + +set -e # abort on error + +# Clean checked out CVS directory +rm -f debian/upload.sh debian/make-upstream.sh debian/make-debian.sh +rm -f `find . -type f -name .cvsignore` +rm -f stamp-h.in build-stamp configure-stamp +rm -f debian/cvsbp-prepare.sh
Added: branches/trunk-reorg/thirdparty/uffi/debian/docs ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/docs Mon Feb 11 09:06:27 2008 @@ -0,0 +1,4 @@ +NEWS +README +TODO +AUTHORS
Added: branches/trunk-reorg/thirdparty/uffi/debian/make-upstream.sh ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/make-upstream.sh Mon Feb 11 09:06:27 2008 @@ -0,0 +1,6 @@ +#!/bin/bash -e + +bups uffi -d"-name .bin" + +exit 0 +
Added: branches/trunk-reorg/thirdparty/uffi/debian/postinst ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/postinst Mon Feb 11 09:06:27 2008 @@ -0,0 +1,52 @@ +#! /bin/sh +# postinst script for uffi +# +# see: dh_installdeb(1) + +set -e + +# package name according to lisp +LISP_PKG=uffi + +# summary of how this script can be called: +# * <postinst> `configure' <most-recently-configured-version> +# * <old-postinst> `abort-upgrade' <new version> +# * <conflictor's-postinst> `abort-remove' `in-favour' <package> +# <new-version> +# * <deconfigured's-postinst> `abort-deconfigure' `in-favour' +# <failed-install-package> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package +# +# quoting from the policy: +# Any necessary prompting should almost always be confined to the +# post-installation script, and should be protected with a conditional +# so that unnecessary prompting doesn't happen if a package's +# installation fails and the `postinst' is called with `abort-upgrade', +# `abort-remove' or `abort-deconfigure'. + +case "$1" in + configure) + #clc-only-compatible $LISP_PKG allegro cmucl lispworks openmcl sbcl scl + /usr/sbin/register-common-lisp-source $LISP_PKG + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument `$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +
Added: branches/trunk-reorg/thirdparty/uffi/debian/preinst ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/preinst Mon Feb 11 09:06:27 2008 @@ -0,0 +1,23 @@ +#!/bin/bash +# This is part of uffi program: +# http://uffi.med-info.com +# +# Copyright (c) 2002 Kevin M. Rosenberg kmr@debian.org + +pkg=uffi +dir=/usr/share/common-lisp/source/$pkg + +case "$1" in + install|upgrade|abort-upgrade) + # Remove any old versions + test -h $dir && rm $dir + rm -rf ${dir}-[0-9.]* + ;; + *) + echo "preinst called with unknown argument '$1'" >&2 + ;; +esac + +#DEBHELPER# + +exit 0
Added: branches/trunk-reorg/thirdparty/uffi/debian/prerm ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/prerm Mon Feb 11 09:06:27 2008 @@ -0,0 +1,42 @@ +#! /bin/sh +# prerm script for uffi +# +# see: dh_installdeb(1) + +set -e + +# package name according to lisp +LISP_PKG=uffi + +# summary of how this script can be called: +# * <prerm> `remove' +# * <old-prerm> `upgrade' <new-version> +# * <new-prerm> `failed-upgrade' <old-version> +# * <conflictor's-prerm> `remove' `in-favour' <package> <new-version> +# * <deconfigured's-prerm> `deconfigure' `in-favour' +# <package-being-installed> <version> `removing' +# <conflicting-package> <version> +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + + +case "$1" in + remove|upgrade|deconfigure) + /usr/sbin/unregister-common-lisp-source $LISP_PKG + ;; + failed-upgrade) + ;; + *) + echo "prerm called with unknown argument `$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + +
Added: branches/trunk-reorg/thirdparty/uffi/debian/rules ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/rules Mon Feb 11 09:06:27 2008 @@ -0,0 +1,127 @@ +#!/usr/bin/make -f + +pkg := uffi +pkg-tests := $(pkg)-tests +debpkg := cl-$(pkg) +debpkg-tests := $(debpkg)-tests + + +clc-source := usr/share/common-lisp/source +clc-systems := usr/share/common-lisp/systems +clc-files := $(clc-source)/$(pkg) +clc-tests := $(clc-source)/$(pkg-tests) +doc-dir := usr/share/doc/$(debpkg) +lib-dir := usr/lib/uffi + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + # Add here commands to compile the package. + (cd tests; make) + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + # Add here commands to clean up after the build process. + $(MAKE) clean + (cd tests; make clean) + rm -f debian/$(debpkg).postinst.* debian/$(debpkg).prerm.* + rm -f doc/cl-uffi.pdf.gz + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs --all $(clc-systems) $(clc-source) + + # Add here commands to install the package into debian/uffi. + dh_installdirs -p $(debpkg) $(doc-dir) $(clc-files)/src + dh_install $(pkg).asd $(clc-files) + dh_install "src/*.lisp" $(clc-files)/src + dh_link $(clc-files)/$(pkg).asd $(clc-systems)/$(pkg).asd + + rm -rf doc/html + (cd doc; tar xzf html.tar.gz; cd ..) + dh_install doc/html $(doc-dir) + rm -rf doc/html + cp doc/uffi.pdf doc/cl-uffi.pdf + rm -f doc/cl-uffi.pdf.gz # ensure file not present before making gz + gzip -9 doc/cl-uffi.pdf + dh_install doc/cl-uffi.pdf.gz $(doc-dir) + + dh_installdirs -p $(debpkg-tests) $(clc-tests)/tests $(lib-dir) + dh_install -p $(debpkg-tests) $(pkg-tests).asd $(clc-tests) + dh_install -p $(debpkg-tests) tests/*.lisp tests/*.c $(clc-tests)/tests + dh_install -p $(debpkg-tests) tests/*.so $(lib-dir) + dh_link -p $(debpkg-tests) $(clc-tests)/$(pkg-tests).asd $(clc-systems)/$(pkg-tests).asd + +# Build architecture-independent files here. +binary-indep: build install + dh_testdir -i + dh_testroot -i +# dh_installdebconf -i + dh_installdocs -i + dh_installexamples -i examples/*.lisp + dh_installmenu -i +# dh_installlogrotate -i +# dh_installemacsen -i +# dh_installpam -i +# dh_installmime -i +# dh_installinit -i + dh_installcron -i +# dh_installman -i + dh_installinfo -i +# dh_undocumented -i + dh_installchangelogs ChangeLog -i + dh_link -i + dh_compress -i + dh_fixperms -i + dh_installdeb -i +# dh_perl -i + dh_gencontrol -i + dh_md5sums -i + dh_builddeb -i + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir -a + dh_testroot -a +# dh_installdebconf -a + dh_installdocs -a +# dh_installlogrotate -a +# dh_installemacsen -a +# dh_installpam -a +# dh_installmime -a +# dh_installinit -a +# dh_installcron -a +# dh_installman -a +# dh_installinfo -a +# dh_undocumented -a +# dh_makeshlibs -a +# dh_perl -a + dh_installchangelogs ChangeLog -a + dh_strip -a + dh_link -a + dh_compress -a + dh_fixperms -a + dh_installmenu -a + dh_installdeb -a + dh_gencontrol -a + dh_shlibdeps -a + dh_md5sums -a + dh_builddeb -a + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure +
Added: branches/trunk-reorg/thirdparty/uffi/debian/upload.sh ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/upload.sh Mon Feb 11 09:06:27 2008 @@ -0,0 +1,4 @@ +#!/bin/bash -e + +dup uffi -Ufiles.b9.com -D/home/ftp/uffi -su \ + -C"(umask 022; cd /opt/apache/htdocs/uffi; make install; find . -type d |xargs chmod go+rx; find . -type f | xargs chmod go+r)" $*
Added: branches/trunk-reorg/thirdparty/uffi/debian/watch ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/debian/watch Mon Feb 11 09:06:27 2008 @@ -0,0 +1,2 @@ +version=3 +http://files.b9.com/uffi/uffi-(%5B%5Cd%5C.%5D*)%5C.tar%5C.gz debian uupdate
Added: branches/trunk-reorg/thirdparty/uffi/doc/COPYING.GFDL ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/COPYING.GFDL Mon Feb 11 09:06:27 2008 @@ -0,0 +1,330 @@ + GNU Free Documentation License + Version 1.1, March 2000 + + Copyright (C) 2000 Free Software Foundation, Inc. + 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + +0. PREAMBLE + +The purpose of this License is to make a manual, textbook, or other +written document "free" in the sense of freedom: to assure everyone +the effective freedom to copy and redistribute it, with or without +modifying it, either commercially or noncommercially. Secondarily, +this License preserves for the author and publisher a way to get +credit for their work, while not being considered responsible for +modifications made by others. + +This License is a kind of "copyleft", which means that derivative +works of the document must themselves be free in the same sense. It +complements the GNU General Public License, which is a copyleft +license designed for free software. + +We have designed this License in order to use it for manuals for free +software, because free software needs free documentation: a free +program should come with manuals providing the same freedoms that the +software does. But this License is not limited to software manuals; +it can be used for any textual work, regardless of subject matter or +whether it is published as a printed book. We recommend this License +principally for works whose purpose is instruction or reference. + + +1. APPLICABILITY AND DEFINITIONS + +This License applies to any manual or other work that contains a +notice placed by the copyright holder saying it can be distributed +under the terms of this License. The "Document", below, refers to any +such manual or work. Any member of the public is a licensee, and is +addressed as "you". + +A "Modified Version" of the Document means any work containing the +Document or a portion of it, either copied verbatim, or with +modifications and/or translated into another language. + +A "Secondary Section" is a named appendix or a front-matter section of +the Document that deals exclusively with the relationship of the +publishers or authors of the Document to the Document's overall subject +(or to related matters) and contains nothing that could fall directly +within that overall subject. (For example, if the Document is in part a +textbook of mathematics, a Secondary Section may not explain any +mathematics.) The relationship could be a matter of historical +connection with the subject or with related matters, or of legal, +commercial, philosophical, ethical or political position regarding +them. + +The "Invariant Sections" are certain Secondary Sections whose titles +are designated, as being those of Invariant Sections, in the notice +that says that the Document is released under this License. + +The "Cover Texts" are certain short passages of text that are listed, +as Front-Cover Texts or Back-Cover Texts, in the notice that says that +the Document is released under this License. + +A "Transparent" copy of the Document means a machine-readable copy, +represented in a format whose specification is available to the +general public, whose contents can be viewed and edited directly and +straightforwardly with generic text editors or (for images composed of +pixels) generic paint programs or (for drawings) some widely available +drawing editor, and that is suitable for input to text formatters or +for automatic translation to a variety of formats suitable for input +to text formatters. A copy made in an otherwise Transparent file +format whose markup has been designed to thwart or discourage +subsequent modification by readers is not Transparent. A copy that is +not "Transparent" is called "Opaque". + +Examples of suitable formats for Transparent copies include plain +ASCII without markup, Texinfo input format, LaTeX input format, SGML +or XML using a publicly available DTD, and standard-conforming simple +HTML designed for human modification. Opaque formats include +PostScript, PDF, proprietary formats that can be read and edited only +by proprietary word processors, SGML or XML for which the DTD and/or +processing tools are not generally available, and the +machine-generated HTML produced by some word processors for output +purposes only. + +The "Title Page" means, for a printed book, the title page itself, +plus such following pages as are needed to hold, legibly, the material +this License requires to appear in the title page. For works in +formats which do not have any title page as such, "Title Page" means +the text near the most prominent appearance of the work's title, +preceding the beginning of the body of the text. + + +2. VERBATIM COPYING + +You may copy and distribute the Document in any medium, either +commercially or noncommercially, provided that this License, the +copyright notices, and the license notice saying this License applies +to the Document are reproduced in all copies, and that you add no other +conditions whatsoever to those of this License. You may not use +technical measures to obstruct or control the reading or further +copying of the copies you make or distribute. However, you may accept +compensation in exchange for copies. If you distribute a large enough +number of copies you must also follow the conditions in section 3. + +You may also lend copies, under the same conditions stated above, and +you may publicly display copies. + + +3. COPYING IN QUANTITY + +If you publish printed copies of the Document numbering more than 100, +and the Document's license notice requires Cover Texts, you must enclose +the copies in covers that carry, clearly and legibly, all these Cover +Texts: Front-Cover Texts on the front cover, and Back-Cover Texts on +the back cover. Both covers must also clearly and legibly identify +you as the publisher of these copies. The front cover must present +the full title with all words of the title equally prominent and +visible. You may add other material on the covers in addition. +Copying with changes limited to the covers, as long as they preserve +the title of the Document and satisfy these conditions, can be treated +as verbatim copying in other respects. + +If the required texts for either cover are too voluminous to fit +legibly, you should put the first ones listed (as many as fit +reasonably) on the actual cover, and continue the rest onto adjacent +pages. + +If you publish or distribute Opaque copies of the Document numbering +more than 100, you must either include a machine-readable Transparent +copy along with each Opaque copy, or state in or with each Opaque copy +a publicly-accessible computer-network location containing a complete +Transparent copy of the Document, free of added material, which the +general network-using public has access to download anonymously at no +charge using public-standard network protocols. If you use the latter +option, you must take reasonably prudent steps, when you begin +distribution of Opaque copies in quantity, to ensure that this +Transparent copy will remain thus accessible at the stated location +until at least one year after the last time you distribute an Opaque +copy (directly or through your agents or retailers) of that edition to +the public. + +It is requested, but not required, that you contact the authors of the +Document well before redistributing any large number of copies, to give +them a chance to provide you with an updated version of the Document. + + +4. MODIFICATIONS + +You may copy and distribute a Modified Version of the Document under +the conditions of sections 2 and 3 above, provided that you release +the Modified Version under precisely this License, with the Modified +Version filling the role of the Document, thus licensing distribution +and modification of the Modified Version to whoever possesses a copy +of it. In addition, you must do these things in the Modified Version: + +A. Use in the Title Page (and on the covers, if any) a title distinct + from that of the Document, and from those of previous versions + (which should, if there were any, be listed in the History section + of the Document). You may use the same title as a previous version + if the original publisher of that version gives permission. +B. List on the Title Page, as authors, one or more persons or entities + responsible for authorship of the modifications in the Modified + Version, together with at least five of the principal authors of the + Document (all of its principal authors, if it has less than five). +C. State on the Title page the name of the publisher of the + Modified Version, as the publisher. +D. Preserve all the copyright notices of the Document. +E. Add an appropriate copyright notice for your modifications + adjacent to the other copyright notices. +F. Include, immediately after the copyright notices, a license notice + giving the public permission to use the Modified Version under the + terms of this License, in the form shown in the Addendum below. +G. Preserve in that license notice the full lists of Invariant Sections + and required Cover Texts given in the Document's license notice. +H. Include an unaltered copy of this License. +I. Preserve the section entitled "History", and its title, and add to + it an item stating at least the title, year, new authors, and + publisher of the Modified Version as given on the Title Page. If + there is no section entitled "History" in the Document, create one + stating the title, year, authors, and publisher of the Document as + given on its Title Page, then add an item describing the Modified + Version as stated in the previous sentence. +J. Preserve the network location, if any, given in the Document for + public access to a Transparent copy of the Document, and likewise + the network locations given in the Document for previous versions + it was based on. These may be placed in the "History" section. + You may omit a network location for a work that was published at + least four years before the Document itself, or if the original + publisher of the version it refers to gives permission. +K. In any section entitled "Acknowledgements" or "Dedications", + preserve the section's title, and preserve in the section all the + substance and tone of each of the contributor acknowledgements + and/or dedications given therein. +L. Preserve all the Invariant Sections of the Document, + unaltered in their text and in their titles. Section numbers + or the equivalent are not considered part of the section titles. +M. Delete any section entitled "Endorsements". Such a section + may not be included in the Modified Version. +N. Do not retitle any existing section as "Endorsements" + or to conflict in title with any Invariant Section. + +If the Modified Version includes new front-matter sections or +appendices that qualify as Secondary Sections and contain no material +copied from the Document, you may at your option designate some or all +of these sections as invariant. To do this, add their titles to the +list of Invariant Sections in the Modified Version's license notice. +These titles must be distinct from any other section titles. + +You may add a section entitled "Endorsements", provided it contains +nothing but endorsements of your Modified Version by various +parties--for example, statements of peer review or that the text has +been approved by an organization as the authoritative definition of a +standard. + +You may add a passage of up to five words as a Front-Cover Text, and a +passage of up to 25 words as a Back-Cover Text, to the end of the list +of Cover Texts in the Modified Version. Only one passage of +Front-Cover Text and one of Back-Cover Text may be added by (or +through arrangements made by) any one entity. If the Document already +includes a cover text for the same cover, previously added by you or +by arrangement made by the same entity you are acting on behalf of, +you may not add another; but you may replace the old one, on explicit +permission from the previous publisher that added the old one. + +The author(s) and publisher(s) of the Document do not by this License +give permission to use their names for publicity for or to assert or +imply endorsement of any Modified Version. + + +5. COMBINING DOCUMENTS + +You may combine the Document with other documents released under this +License, under the terms defined in section 4 above for modified +versions, provided that you include in the combination all of the +Invariant Sections of all of the original documents, unmodified, and +list them all as Invariant Sections of your combined work in its +license notice. + +The combined work need only contain one copy of this License, and +multiple identical Invariant Sections may be replaced with a single +copy. If there are multiple Invariant Sections with the same name but +different contents, make the title of each such section unique by +adding at the end of it, in parentheses, the name of the original +author or publisher of that section if known, or else a unique number. +Make the same adjustment to the section titles in the list of +Invariant Sections in the license notice of the combined work. + +In the combination, you must combine any sections entitled "History" +in the various original documents, forming one section entitled +"History"; likewise combine any sections entitled "Acknowledgements", +and any sections entitled "Dedications". You must delete all sections +entitled "Endorsements." + + +6. COLLECTIONS OF DOCUMENTS + +You may make a collection consisting of the Document and other documents +released under this License, and replace the individual copies of this +License in the various documents with a single copy that is included in +the collection, provided that you follow the rules of this License for +verbatim copying of each of the documents in all other respects. + +You may extract a single document from such a collection, and distribute +it individually under this License, provided you insert a copy of this +License into the extracted document, and follow this License in all +other respects regarding verbatim copying of that document. + + +7. AGGREGATION WITH INDEPENDENT WORKS + +A compilation of the Document or its derivatives with other separate +and independent documents or works, in or on a volume of a storage or +distribution medium, does not as a whole count as a Modified Version +of the Document, provided no compilation copyright is claimed for the +compilation. Such a compilation is called an "aggregate", and this +License does not apply to the other self-contained works thus compiled +with the Document, on account of their being thus compiled, if they +are not themselves derivative works of the Document. + +If the Cover Text requirement of section 3 is applicable to these +copies of the Document, then if the Document is less than one quarter +of the entire aggregate, the Document's Cover Texts may be placed on +covers that surround only the Document within the aggregate. +Otherwise they must appear on covers around the whole aggregate. + + +8. TRANSLATION + +Translation is considered a kind of modification, so you may +distribute translations of the Document under the terms of section 4. +Replacing Invariant Sections with translations requires special +permission from their copyright holders, but you may include +translations of some or all Invariant Sections in addition to the +original versions of these Invariant Sections. You may include a +translation of this License provided that you also include the +original English version of this License. In case of a disagreement +between the translation and the original English version of this +License, the original English version will prevail. + + +9. TERMINATION + +You may not copy, modify, sublicense, or distribute the Document except +as expressly provided for under this License. Any other attempt to +copy, modify, sublicense or distribute the Document is void, and will +automatically terminate your rights under this License. However, +parties who have received copies, or rights, from you under this +License will not have their licenses terminated so long as such +parties remain in full compliance. + + +10. FUTURE REVISIONS OF THIS LICENSE + +The Free Software Foundation may publish new, revised versions +of the GNU Free Documentation License from time to time. Such new +versions will be similar in spirit to the present version, but may +differ in detail to address new problems or concerns. See +http://www.gnu.org/copyleft/. + +Each version of the License is given a distinguishing version number. +If the Document specifies that a particular numbered version of this +License "or any later version" applies to it, you have the option of +following the terms and conditions either of that specified version or +of any later version that has been published (not as a draft) by the +Free Software Foundation. If the Document does not specify a version +number of this License, you may choose any version ever published (not +as a draft) by the Free Software Foundation. +
Added: branches/trunk-reorg/thirdparty/uffi/doc/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,144 @@ +############################################################################## +# FILE IDENTIFICATION +# +# Name: Makefile +# Purpose: Makefile for the uffi documentation +# Programer: Kevin M. Rosenberg +# Date Started: Mar 2002 +# +# CVS Id: $Id$ +# +# This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +############################################################################## + +DOCFILE_BASE_DEFAULT:=uffi +DOCFILE_EXT_DEFAULT:=xml + + +# Standard docfile processing + +DEBIAN=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Debian.*') +UBUNTU=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Ubuntu.*') +SUSE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE.*') +SUSE91=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*SuSE Linux 9.1.*') +REDHAT=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Red Hat.*') +MANDRAKE=$(shell expr "`cat /etc/issue 2> /dev/null`" : '.*Mandrake.*') +DARWIN=$(shell expr "`uname -a`" : '.*Darwin.*') + +ifneq (${DEBIAN},0) +OS:=debian +else + ifneq (${SUSE91},0) + OS=suse91 + else + ifneq (${SUSE},0) + OS=suse + else + ifneq (${REDHAT},0) + OS=redhat + else + ifneq (${MANDRAKE},0) + OS=mandrake + else + ifneq (${DARWIN},0) + OS=darwin + else + ifneq (${UBUNTU},0) + OS=ubuntu + endif + endif + endif + endif + endif + endif +endif + +ifndef DOCFILE_BASE +DOCFILE_BASE=${DOCFILE_BASE_DEFAULT} +endif + +ifndef DOCFILE_EXT +DOCFILE_EXT=${DOCFILE_EXT_DEFAULT} +endif + +DOCFILE:=${DOCFILE_BASE}.${DOCFILE_EXT} +FOFILE:=${DOCFILE_BASE}.fo +PDFFILE:=${DOCFILE_BASE}.pdf +PSFILE:=${DOCFILE_BASE}.ps +DVIFILE:=${DOCFILE_BASE}.dvi +TXTFILE:=${DOCFILE_BASE}.txt +HTMLFILE:=${DOCFILE_BASE}.html +TMPFILES:=${DOCFILE_BASE}.aux ${DOCFILE_BASE}.out ${DOCFILE_BASE}.log +DOCFILES:=$(shell echo *.xml *.xsl) + +ifeq ($(XSLTPROC),) + XSLTPROC:=xsltproc +endif + +CATALOG:=`pwd`/catalog-${OS}.xml +CHECK:=XML_CATALOG_FILES="$(CATALOG)" xmllint --noout --xinclude --postvalid $(DOCFILE) || exit 1 + +.PHONY: all +all: html pdf + +.PHONY: dist +dist: html pdf + +.PHONY: doc +doc: html pdf + +.PHONY: check +check: + @echo "Operating System Detected: ${OS}" + @$(CHECK) + +.PHONY: html +html: html.tar.gz + +html.tar.gz: $(DOCFILES) Makefile + @rm -rf html + @mkdir html + @XML_CATALOG_FILES="$(CATALOG)" $(XSLTPROC) --stringparam chunker.output.encoding UTF-8 \ + --xinclude --output html/ html_chunk.xsl $(DOCFILE) + @GZIP='-9' tar czf html.tar.gz html + +.PHONY: fo +fo: ${FOFILE} + +${FOFILE}: $(DOCFILES) Makefile + @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output $(FOFILE) fo.xsl $(DOCFILE) + +.PHONY: pdf +pdf: ${PDFFILE} + +${PDFFILE}: ${DOCFILES} Makefile + @$(MAKE) fo + @fop $(FOFILE) -pdf $(PDFFILE) > /dev/null + +.PHONY: dvi +dvi: ${DVIFILE} + +.PHONY: ps +ps: ${PSFILE} + +${PSFILE}: ${DOCFILES} Makefile + @$(MAKE) fo + @fop $(FOFILE) -ps $(PSFILE) > /dev/null + + +.PHONY: txt +txt: ${TXTFILE} + +${TXTFILE}: ${FOFILE} + @XML_CATALOG_FILES="$(CATALOG)" xsltproc --xinclude --output ${HTMLFILE} html.xsl $(DOCFILE) + lynx -dump ${HTMLFILE} > ${TXTFILE} + +.PHONY: clean +clean: + @rm -f *~ *.bak *.orig #*# .#* texput.log + @rm -rf html ${PSFILE} ${HTMLFILE} + @rm -f ${TMPFILES} ${FOFILE} + @rm -f ${DVIFILE} ${TXTFILE} + +.PHONY: distclean +distclean: clean
Added: branches/trunk-reorg/thirdparty/uffi/doc/appendix.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/appendix.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,35 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<appendix id="installation"> + <title>Installation</title> + <sect1 id="download"> + <title>Download &uffi;</title> + <para> +You need to download the &uffi; package from its web +<ulink url="http://uffi.b9.com"><citetitle>home</citetitle></ulink>. +You also need to have a copy of &asdf;. If you need a copy of +&asdf;, it is included in the + <ulink + url="http://www.sourceforge.net/projects/cclan%22%3E + <citetitle>CCLAN</citetitle></ulink> package. You can download +the file <filename>defsystem.lisp</filename> from the CVS +<ulink url="http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp"><citetitle>tree</citetitle></ulink>. + </para> + </sect1> + <sect1 id="loading"> + <title>Loading</title> + <para> + After downloading and installing &asdf;, simply + <function>push</function> the + directory containing &uffi; into + <varname>asdf:*central-registry*</varname> variable. Whenever you +want to load the &uffi; package, use the form + <computeroutput>(asdf:operate 'asdf:load-op :uffi)</computeroutput>. + </para> + </sect1> +</appendix>
Added: branches/trunk-reorg/thirdparty/uffi/doc/bookinfo.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/bookinfo.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,77 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<bookinfo> + <title>&uffi; Reference Guide</title> + <author> + <firstname>Kevin</firstname> + <othername>M.</othername> + <surname>Rosenberg</surname> + <affiliation> + <orgname>Heart Hospital of New Mexico</orgname> + <address> + <email>kevin@rosenberg.net</email> + <street>504 Elm Street N.E.</street> + <city>Albuquerque</city> + <state>New Mexico</state> + <postcode>87102</postcode> + </address> + </affiliation> + </author> + + <printhistory> + <simpara>$Id$</simpara> + <simpara>File $Date$</simpara> + </printhistory> + <copyright> + <year>2002-2003</year> + <holder>Kevin M. Rosenberg</holder> + </copyright> + <legalnotice> + <itemizedlist> + <listitem> + <para>The &uffi; package was designed and + written by Kevin M. Rosenberg. + </para> + </listitem> + <listitem> + <para> + Permission is granted to copy, distribute and/or modify this document + under the terms of the GNU Free Documentation License, Version 1.1 + or any later version published by the Free Software Foundation; + with no Invariant Sections, with the no + Front-Cover Texts, and with no Back-Cover Texts. + A copy of the license is included in the &uffi; distribution. + </para> + </listitem> + <listitem> + <para> + <application>Allegro CL</application>® is a registered + trademark of Franz Inc. + </para> + </listitem> + <listitem> + <para> + <application>Lispworks</application>® is a registered + trademark of Xanalys Inc. + </para> + </listitem> + <listitem> + <para> + <application>Microsoft Windows</application>® is a + registered trademark of Microsoft Inc. + </para> + </listitem> + <listitem> + <para> + Other brand or product names are the registered trademarks + or trademarks of their respective holders. + </para> + </listitem> + </itemizedlist> + </legalnotice> +</bookinfo>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-darwin.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-darwin.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///sw/share/xml/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="dtd/docbookx/4.2.0/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="xsl/docbook-xsl/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="dtd/xml/4.2/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="dtd/xml/4.2.0/xml/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="xsl/docbook-xsl/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="xsl/docbook-xsl/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="xsl/docbook-xsl/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-debian.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-debian.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/sgml/docbook/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="dtd/xml/4.2/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="stylesheet/xsl/nwalsh/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="dtd/xml/4.2/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="dtd/xml/4.2/xml/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="stylesheet/xsl/nwalsh/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="stylesheet/xsl/nwalsh/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="stylesheet/xsl/nwalsh/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-mandrake.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-mandrake.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/sgml/docbook/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="xml-dtd-4.2/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="xsl-stylesheets/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="xml-dtd-4.2/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="xml-dtd-4.2/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="xsl-stylesheets/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="xsl-stylesheets/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="xsl-stylesheets/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/xml/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="db42xml/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="docbook/docbook-xsl/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="db42xml/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="db42xml/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="docbook/stylesheet/nwalsh/current/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="docbook/stylesheet/nwalsh/current/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="docbook/stylesheet/nwalsh/current/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse90.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse90.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/sgml/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="db42xml/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="docbook/docbook-xsl/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="db42xml/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="db42xml/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="docbook/docbook-xsl/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="docbook/docbook-xsl/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="docbook/docbook-xsl/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse91.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-suse91.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,48 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/xml/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="docbook/schema/dtd/4.2/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="docbook/stylesheet/nwalsh/current/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="docbook/schema/dtd/4.2/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="docbook/schema/dtd/4.2/docbookx.dtd" /> + <uri + name="docbookx.dtd" + uri="docbook/schema/dtd/4.2/docbookx.dtd" /> + <system + systemId="docbookx.dtd" + uri="docbook/schema/dtd/4.2/docbookx.dtd" /> + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="docbook/stylesheet/nwalsh/current/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="docbook/stylesheet/nwalsh/current/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="docbook/stylesheet/nwalsh/current/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/catalog-ubuntu.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/catalog-ubuntu.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,43 @@ +<?xml version="1.0" ?> +<!DOCTYPE catalog + PUBLIC "-//OASIS/DTD Entity Resolution XML Catalog V1.0//EN" + "http://www.oasis-open.org/committees/entity/release/1.0/catalog.dtd"> + +<catalog xmlns="urn:oasis:names:tc:entity:xmlns:xml:catalog"> + + <!-- The directory DTD and stylesheet files are installed under --> + <group xml:base="file:///usr/share/sgml/docbook/" > + + <!-- Resolve DTD URL system ID to local file --> + <rewriteSystem + systemIdStartString="http://www.oasis-open.org/docbook/xml/4.2/" + rewritePrefix="dtd/xml/4.2/" /> + <!-- Resolve stylesheet URL to local file --> + <rewriteURI + uriStartString="http://docbook.sourceforge.net/release/xsl/current/" + rewritePrefix="stylesheet/xsl/nwalsh/" /> + + <!-- Resolve DTD PUBLIC identifiers --> + <nextCatalog catalog="dtd/xml/4.2/catalog.xml" /> + + <!-- To resolve simple DTD SYSTEM identifiers. --> + <!-- Note: this does not work with Java resolver --> + <!-- classes in Saxon or Xalan --> + <system + systemId="docbook.dtd" + uri="dtd/xml/4.2/xml/docbookx.dtd" /> + + <!-- To resolve short stylesheet references --> + <uri + name="docbook_html.xsl" + uri="stylesheet/xsl/nwalsh/xhtml/docbook.xsl" /> + <uri + name="docbook_chunk.xsl" + uri="stylesheet/xsl/nwalsh/xhtml/chunk.xsl" /> + <uri + name="docbook_fo.xsl" + uri="stylesheet/xsl/nwalsh/fo/docbook.xsl" /> + + </group> + +</catalog>
Added: branches/trunk-reorg/thirdparty/uffi/doc/entities.inc ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/entities.inc Mon Feb 11 09:06:27 2008 @@ -0,0 +1,16 @@ +<!ENTITY uffi "<application><emphasis>UFFI</emphasis></application>"> +<!ENTITY ffi "<acronym>FFI</acronym>"> +<!ENTITY cmucl "<application>CMUCL</application>"> +<!ENTITY scl "<application>SCL</application>"> +<!ENTITY lw "<application>Lispworks</application>"> +<!ENTITY sbcl "<application>SBCL</application>"> +<!ENTITY openmcl "<application>OpenMCL</application>"> +<!ENTITY mcl "<application>MCL</application>"> +<!ENTITY acl "<application>AllegroCL</application>"> +<!ENTITY cl "<application>ANSI Common Lisp</application>"> +<!ENTITY t "<constant>T</constant>"> +<!ENTITY nil "<constant>NIL</constant>"> +<!ENTITY null "<constant>NULL</constant>"> +<!ENTITY c "<computeroutput>C</computeroutput>"> +<!ENTITY defsystem "<application>defsystem</application>"> +<!ENTITY asdf "<application>ASDF</application>">
Added: branches/trunk-reorg/thirdparty/uffi/doc/fo.xsl ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/fo.xsl Mon Feb 11 09:06:27 2008 @@ -0,0 +1,8 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:import href="docbook_fo.xsl"/> +<xsl:param name="fop.extensions" select="1"/> +</xsl:stylesheet> +
Added: branches/trunk-reorg/thirdparty/uffi/doc/glossary.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/glossary.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,21 @@ +<?xml version="1.0" ?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<glossary id="glossary"> + <glossentry id="gloss-ffi"> + <glossterm>Foreign Function Interface + <acronym>FFI</acronym>) + </glossterm> + <glossdef> + <para> + An interface to a C-compatible library. + </para> + </glossdef> + </glossentry> +</glossary> + +
Added: branches/trunk-reorg/thirdparty/uffi/doc/html.tar.gz ============================================================================== Binary file. No diff available.
Added: branches/trunk-reorg/thirdparty/uffi/doc/html.xsl ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/html.xsl Mon Feb 11 09:06:27 2008 @@ -0,0 +1,10 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:import href="docbook_html.xsl"/> +<xsl:param name="use.id.as.filename" select="1"/> +<xsl:output encoding="UTF-8" method="html" /> + +</xsl:stylesheet> +
Added: branches/trunk-reorg/thirdparty/uffi/doc/html_chunk.xsl ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/html_chunk.xsl Mon Feb 11 09:06:27 2008 @@ -0,0 +1,9 @@ +<?xml version='1.0'?> +<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" + version="1.0"> + +<xsl:import href="docbook_chunk.xsl"/> +<xsl:param name="use.id.as.filename" select="1"/> + +</xsl:stylesheet> +
Added: branches/trunk-reorg/thirdparty/uffi/doc/intro.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/intro.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,113 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" +"http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<chapter id="introduction"> + <title>Introduction</title> + <sect1 id="purpose"> + <title>Purpose</title> + <para> + This reference guide describes &uffi;, a package that provides a + cross-implementation interface from Common Lisp to C-language + compatible libraries. + </para> + </sect1> + + <sect1 id="background"> + <title>Background + </title> + <para> + Every Common Lisp implementation has a method for interfacing to + C-language compatible libraries. These methods are often termed + a <emphasis>Foreign Function Library Interface</emphasis> + (&ffi;). Unfortunately, these methods vary widely amongst + implementations, thus preventing the writing of a portable FFI + to a particular C-library. + </para> + <para> + &uffi; gathers a common subset of functionality between Common + Lisp implementations. &uffi; wraps this common subset of + functionality with it's own syntax and provides macro + translation of uffi functions into the specific syntax of + supported Common Lisp implementations. + </para> + <para> + Developers who use &uffi; to interface with C libraries will + automatically have their code function in each of uffi's supported + implementations. + </para> + </sect1> + + <sect1 id="supported-impl"> + <title>Supported Implementations</title> + <para>The primary tested and supported platforms for &uffi; are: + </para> + <itemizedlist mark="opencircle"> + <listitem><para>&acl; v6.2 on Debian GNU/Linux + FreeBSD 4.5, Solaris v2.8, and Microsoft Windows XP.</para></listitem> + <listitem><para>&lw; v4.2 on Debian GNU/Linux and Microsoft Windows XP.</para></listitem> + <listitem><para>&cmucl; 18d on Debian GNU/Linux, FreeBSD 4.5, and Solaris 2.8</para></listitem> + <listitem><para>&sbcl; 0.7.8 on Debian GNU/Linux</para></listitem> + <listitem><para>&scl; 1.1.1 on Debian GNU/Linux</para></listitem> + <listitem><para>&openmcl; 0.13 on Debian GNU/Linux for PowerPC</para></listitem> + </itemizedlist> + <para>Beta code is included with &uffi; for + </para> + <itemizedlist mark="opencircle"> + <listitem><para>&openmcl; and &mcl; with MacOSX</para></listitem> + </itemizedlist> + </sect1> + + <sect1 id="design"> + <title>Design</title> + <sect2> + <title>Overview</title> + <para> + &uffi; was designed as a cross-implementation + compatible <emphasis>Foreign Function Interface</emphasis>. + Necessarily, + only a common subset of functionality can be + provided. Likewise, not every optimization for that a specific + implementation provides can be supported. Wherever possible, + though, implementation-specific optimizations are invoked. + </para> + </sect2> + + <sect2> + <title>Priorities</title> + <para> + The design of &uffi; is dictated by the order of these priorities: + </para> + <itemizedlist> + <listitem> + <para> + Code using &uffi; must operate correctly on all + supported implementations. + </para> + </listitem> + <listitem> + <para> + Take advantage of implementation-specific optimizations. Ideally, + there will not a situation where an implementation-specific + &ffi; will be chosen due to lack of optimizations in &uffi;. + </para> + </listitem> + <listitem> + <para>Provide a simple interface to developers using + &uffi;. This priority is quite a bit lower than the above priorities. + This lower priority is manifest by programmers having to pass types in + pointer and array dereferencing, needing to use + <constant>cstring</constant> wrapper functions, and the use of + ensure-char-character and ensure-char-integer functions. My hope is + that the developer inconvenience will be outweighed by the generation + of optimized code that is cross-implementation compatible. + </para> + </listitem> + </itemizedlist> + </sect2> + </sect1> + +</chapter>
Added: branches/trunk-reorg/thirdparty/uffi/doc/notes.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/notes.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<chapter id="notes"> + <title>Programming Notes</title> + + <sect1 id="impl-specific"> + <title>Implementation Specific Notes</title> + <para> + </para> + <sect2> + <title>&acl;</title> + <para> + </para> + </sect2> + <sect2> + <title>&lw;</title> + <para> + </para> + </sect2> + <sect2> + <title>&cmucl;</title> + <para> + </para> + </sect2> + </sect1> + + <sect1 id="object-represen"> + <title>Foreign Object Representation and Access</title> + <para> There are two main approaches used to represent foreign + objects: an integer that represents an address in memory, and a + object that also includes run-time typing. The advantage of + run-time typing is the system can dereference pointers and perform + array access without those functions requiring a type at the cost + of additional overhead to generate and store the run-time + typing. The advantage of integer representation, at least for + &acl;, is that the compiler can generate inline code to + dereference pointers. Further, the overhead of the run-time type + information is eliminated. The disadvantage is the program must + then supply + the type to the functions to dereference objects and array. + </para> + </sect1> + + <sect1 id="optimizing"> + <title>Optimizing Code Using UFFI</title> + <sect2> + <title>Background</title> + <para> + Two implementions have different techniques to optimize + (open-code) foreign objects. &acl; can open-code foreign + object + access if pointers are integers and the type of object is + specified in the access function. Thus, &uffi; represents objects + in &acl; as integers which don't have type information. + </para> <para> + &cmucl; works best when keeping objects as typed + objects. However, it's compiler can open-code object access when + the object type is specified in <function>declare</function> + commands and in <varname>:type</varname> specifiers in + <function>defstruct</function> and <function>defclass</function>. + </para> <para> &lw;, in converse to &acl; and &cmucl; does not do + any open coding of object access. &lw;, by default, maintains + objects with run-time typing. </para> + </sect2> + <sect2> + <title>Cross-Implementation Optimization</title> + <para> + To fully optimize across platforms, both explicit type + information must be passed to dereferencing of pointers and + arrays. Though this optimization only helps with &acl;, &uffi; + is designed to require this type information be passed the + dereference functions. Second, declarations of type should be + made in functions, structures, and classes where foreign + objects will be help. This will optimize access for &lw; + </para> + <para> + Here is an example that should both methods being used for + maximum cross-implementation optimization: + <screen> +(uffi:def-type the-struct-type-def the-struct-type) +(let ((a-foreign-struct (allocate-foreign-object 'the-struct-type))) + (declare 'the-struct-type-def a-foreign-struct) + (get-slot-value a-foreign-struct 'the-struct-type 'field-name)) + </screen> + </para> + </sect2> + </sect1> + +</chapter>
Added: branches/trunk-reorg/thirdparty/uffi/doc/preface.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/preface.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,16 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<preface id="preface"> + <title>Preface</title> + <para>This reference guide describes the usage and features of + &uffi;. The first chapter provides an overview to the design of + &uffi;. Following that chapter is the reference section for all + user accessible functions of &uffi;. The appendix covers the + installation and implementation-specifc features of &uffi;. + </para> +</preface>
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_aggregate.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_aggregate.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,524 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="aggregates"> + <title>Aggregate Types</title> + <partintro> + <title>Overview</title> + <para> + Aggregate types are comprised of one or more primitive types. + </para> + </partintro> + + <refentry id="def-enum"> + <refnamediv> + <refname>def-enum</refname> + <refpurpose>Defines a &c; enumeration. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-enum</function> <replaceable>name fields &key separator-string</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A symbol that names the enumeration. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>fields</parameter></term> + <listitem> + <para>A list of field defintions. Each definition can be +a symbol or a list of two elements. Symbols get assigned a value of the +current counter which starts at <computeroutput>0</computeroutput> and +increments by <computeroutput>1</computeroutput> for each subsequent symbol. It the field definition is a list, the first position is the symbol and the second +position is the value to assign the the symbol. The current counter gets set +to <computeroutput>1+</computeroutput> this value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>separator-string</parameter></term> + <listitem> + <para>A string that governs the creation of constants. The +default is <computeroutput>"#"</computeroutput>.</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Declares a &c; enumeration. It generates constants with integer values for the elements of the enumeration. The symbols for the these constant +values are created by the <function>concatenation</function> of the +enumeration name, separator-string, and field symbol. Also creates +a foreign type with the name <parameter>name</parameter> of type +<constant>:int</constant>. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-enum abc (:a :b :c)) +;; Creates constants abc#a (1), abc#b (2), abc#c (3) and defines +;; the foreign type "abc" to be :int + +(def-enum efoo (:e1 (:e2 10) :e3) :separator-string "-") +;; Creates constants efoo-e1 (1), efoo-e2 (10), efoo-e3 (11) and defines +;; the foreign type efoo to be :int + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Creates a :int foreign type, defines constants.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="def-struct"> + <refnamediv> + <refname>def-struct</refname> + <refpurpose>Defines a &c; structure. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-struct</function> <replaceable>name &rest fields</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A symbol that names the structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>fields</parameter></term> + <listitem> + <para>A variable number of field defintions. Each definition is a list consisting of a symbol naming the field followed by its foreign type. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Declares a structure. A special type is available as a slot +in the field. It is a pointer that points to an instance of the parent +structure. It's type is <constant>:pointer-self</constant>. + + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-struct foo (a :unsigned-int) + (b (* :char)) + (c (:array :int 10)) + (next :pointer-self)) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Creates a foreign type.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="get-slot-value"> + <refnamediv> + <refname>get-slot-value</refname> + <refpurpose>Retrieves a value from a slot of a structure. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>get-slot-value</function> <replaceable>obj type field</replaceable> => <returnvalue>value</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>obj</parameter></term> + <listitem> + <para>A pointer to foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A name of the foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>field</parameter></term> + <listitem> + <para>A name of the desired field in foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>value</returnvalue></term> + <listitem> + <para>The value of the field in the structure. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Accesses a slot value from a structure. This is generalized + and can be used with <function>setf</function>. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(get-slot-value foo-ptr 'foo-structure 'field-name) +(setf (get-slot-value foo-ptr 'foo-structure 'field-name) 10) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="get-slot-pointer"> + <refnamediv> + <refname>get-slot-pointer</refname> + <refpurpose>Retrieves a pointer from a slot of a structure. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>get-slot-pointer</function> <replaceable>obj type field</replaceable> => <returnvalue>pointer</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>obj</parameter></term> + <listitem> + <para>A pointer to foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A name of the foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>field</parameter></term> + <listitem> + <para>A name of the desired field in foreign structure. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>pointer</returnvalue></term> + <listitem> + <para>The value of the field in the structure. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + This is similar to <function>get-slot-value</function>. It + is used when the value of a slot is a pointer type. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(get-slot-pointer foo-ptr 'foo-structure 'my-char-ptr) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="def-array-pointer"> + <refnamediv> + <refname>def-array-pointer</refname> + <refpurpose>Defines a pointer to a array of type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-array-pointer</function> <replaceable>name type</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A name of the new foreign type. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>The foreign type of the array elements. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Defines a type tat is a pointer to an array of type. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-array-pointer byte-array-pointer :unsigned-char) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Defines a new foreign type.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="deref-array"> + <refnamediv> + <refname>deref-array</refname> + <refpurpose>Deference an array. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>deref-array</function> <replaceable>array type position</replaceable> => <returnvalue>value</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>array</parameter></term> + <listitem> + <para>A foreign array. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>The foreign type of the array. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>position</parameter></term> + <listitem> + <para>An integer specifying the position to retrieve from +the array. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>value</returnvalue></term> + <listitem> + <para>The value stored in the position of the array. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Dereferences (retrieves) the value of an array element. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-array-pointer ca :char) +(let ((fs (convert-to-foreign-string "ab"))) + (values (null-char-p (deref-array fs 'ca 0)) + (null-char-p (deref-array fs 'ca 2)))) +=> &nil; + &t; + </screen> + </refsect1> + <refsect1> + <title>Notes</title> + <para> + The TYPE argument is ignored for CL implementations other than + AllegroCL. If you want to cast a pointer to another type use + WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="def-union"> + <refnamediv> + <refname>def-union</refname> + <refpurpose>Defines a foreign union type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-union</function> <replaceable>name &rest fields</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A name of the new union type. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>fields</parameter></term> + <listitem> + <para>A list of fields of the union. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Defines a foreign union type. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-union test-union + (a-char :char) + (an-int :int)) + +(let ((u (allocate-foreign-object 'test-union)) + (setf (get-slot-value u 'test-union 'an-int) (+ 65 (* 66 256))) + (prog1 + (ensure-char-character (get-slot-value u 'test-union 'a-char)) + (free-foreign-object u))) +=> #\A + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Defines a new foreign type.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + +</reference> +
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_declare.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_declare.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="ref_declarations"> + <title>Declarations</title> + + <partintro> + <sect1> + <title>Overview</title> + <para>Declarations are used to give the compiler optimizing + information about foreign types. Currently, only &cmucl; + supports declarations. On &acl; and &lw;, these expressions + declare the type generically as &t; + </para> + </sect1> + </partintro> + + <refentry id="def-type"> + <refnamediv> + <refname>def-type</refname> + <refpurpose>Defines a Common Lisp type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-type</function> <replaceable>name type</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A symbol naming the type</para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A form that specifies the &uffi; type. It is not evaluated. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>Defines a Common Lisp type based on a &uffi; type. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-type char-ptr '(* :char)) +... +(defun foo (ptr) +(declare (type char-ptr ptr)) +... + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Defines a new &cl; type.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> +</reference> +
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_func_libr.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_func_libr.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,264 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="func_libr"> + <title>Functions & Libraries</title> + + <refentry id="def-function"> + <refnamediv> + <refname>def-function</refname> + <refpurpose>Declares a function. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-function</function> <replaceable>name args &key module returning</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A string or list specificying the function name. If it is a string, that names the foreign function. A Lisp name is created by translating #_ to #- and by converting to upper-case in case-insensitive Lisp implementations. If it is a list, the first item is a string specifying the foreign function name and the second it is a symbol stating the Lisp name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>args</parameter></term> + <listitem> + <para>A list of argument declarations. If &nil;, indicates that the function does not take any arguments. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>module</parameter></term> + <listitem> + <para>A string specifying which module (or library) that the foreign function resides. (Required by Lispworks)</para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>returning</returnvalue></term> + <listitem> + <para>A declaration specifying the result type of the +foreign function. If <constant>:void</constant> indicates module does not return any value. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>Declares a foreign function. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-function "gethostname" + ((name (* :unsigned-char)) + (len :int)) + :returning :int) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="load-foreign-library"> + <refnamediv> + <refname>load-foreign-library</refname> + <refpurpose>Loads a foreign library. + </refpurpose> + <refclass>Function</refclass> + </refnamediv> + <refsect1> + <title>Syntax</title> +<synopsis> + <function>load-foreign-library</function> <replaceable>filename &key module supporting-libraries force-load</replaceable> => <returnvalue>success</returnvalue> +</synopsis> + </refsect1> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>filename</parameter></term> + <listitem> + <para>A string or pathname specifying the library location +in the filesystem. At least one implementation (&lw;) can not +accept a logical pathname. If this parameter denotes a pathname without a +directory component then most of the supported Lisp implementations will be +able to find the library themselves if it is located in one of the standard +locations as defined by the underlying operating system. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>module</parameter></term> + <listitem> + <para>A string designating the name of the module to apply +to functions in this library. (Required for Lispworks) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>supporting-libraries</parameter></term> + <listitem> + <para>A list of strings naming the libraries required to +link the foreign library. (Required by CMUCL) + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>force-load</parameter></term> + <listitem> + <para>Forces the loading of the library if it has been previously loaded. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>success</returnvalue></term> + <listitem> + <para>A boolean flag, &t; if the library was able to be +loaded successfully or if the library has been previously loaded, + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>Loads a foreign library. Applies a module name to functions +within the library. Ensures that a library is only loaded once during +a session. A library can be reloaded by using the <symbol>:force-load</symbol> key. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> + (load-foreign-library #p"/usr/lib/libmysqlclient.so" + :module "mysql" + :supporting-libraries '("c")) + => T + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Loads the foreign code into the Lisp system. + </para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>Ability to load the file.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>An error will be signaled if the library is unable to be loaded.</para> + </refsect1> + </refentry> + + <refentry id="find-foreign-library"> + <refnamediv> + <refname>find-foreign-library</refname> + <refpurpose>Finds a foreign library file. + </refpurpose> + <refclass>Function</refclass> + </refnamediv> + <refsect1> + <title>Syntax</title> +<synopsis> + <function>find-foreign-library</function> <replaceable>names directories & drive-letters types</replaceable> => <returnvalue>path</returnvalue> +</synopsis> + </refsect1> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>names</parameter></term> + <listitem> + <para>A string or list of strings containing the base name of the library file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>directories</parameter></term> + <listitem> + <para>A string or list of strings containing the directory the library file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>drive-letters</parameter></term> + <listitem> + <para>A string or list of strings containing the drive letters for the library file. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>types</parameter></term> + <listitem> + <para>A string or list of strings containing the file type of the library file. Default +is &nil;. If &nil;, will use a default type based on the currently running implementation. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>path</returnvalue></term> + <listitem> + <para>A path containing the path found, or &nil; if the library file was not found. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>Finds a foreign library by searching through a number of possible locations. Returns +the path of the first found file. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(find-foreign-library '("libmysqlclient" "libmysql") + '("/opt/mysql/lib/mysql/" "/usr/local/lib/" "/usr/lib/" "/mysql/lib/opt/") + :types '("so" "dll") + :drive-letters '("C" "D" "E")) +=> #P"D:\mysql\lib\opt\libmysql.dll" + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None. + </para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + +</reference> + +
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_object.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_object.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,859 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="objects"> + <title>Objects</title> +<partintro> +<title>Overview</title> + <para> + Objects are entities that can allocated, referred to by pointers, and +can be freed. + </para> +</partintro> + + + <refentry id="allocate-foreign-object"> + <refnamediv> + <refname>allocate-foreign-object</refname> + <refpurpose>Allocates an instance of a foreign object. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>allocate-foreign-object</function> <replaceable>type &optional size</replaceable> => <returnvalue>ptr</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>The type of foreign object to allocate. This parameter is evaluated. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>size</parameter></term> + <listitem> + <para>An optional size parameter that is evaluated. If specified, allocates and returns an +array of <parameter>type</parameter> that is <parameter>size</parameter> members long. This parameter is evaluated. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>ptr</returnvalue></term> + <listitem> + <para>A pointer to the foreign object. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Allocates an instance of a foreign object. It returns a pointer to the object. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-struct ab (a :int) (b :double)) +(allocate-foreign-object 'ab) +=> #<ptr> + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="free-foreign-object"> + <refnamediv> + <refname>free-foreign-object</refname> + <refpurpose>Frees memory that was allocated for a foreign boject. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>free-foreign-object</function> <replaceable>ptr</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>A pointer to the allocated foreign object to free. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Frees the memory used by the allocation of a foreign object. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="with-foreign-object"> + <refnamediv> + <refname>with-foreign-object</refname> + <refpurpose>Wraps the allocation of a foreign object around a body of code. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>with-foreign-object</function> <replaceable>(var type) &body body</replaceable> => <returnvalue>form-return</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>var</parameter></term> + <listitem> + <para>The variable name to bind. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>The type of foreign object to allocate. This parameter is evaluated. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>form-return</returnvalue></term> + <listitem> + <para>The result of evaluating the <parameter>body</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> +This function wraps the allocation, binding, and destruction of a foreign object. +On &cmucl; and +&lw; platforms the object is stack allocated for efficiency. Benchmarks show that &acl; performs +much better with static allocation. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(defun gethostname2 () + "Returns the hostname" + (uffi:with-foreign-object (name '(:array :unsigned-char 256)) + (if (zerop (c-gethostname (uffi:char-array-to-pointer name) 256)) + (uffi:convert-from-foreign-string name) + (error "gethostname() failed.")))) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="size-of-foreign-type"> + <refnamediv> + <refname>size-of-foreign-type</refname> + <refpurpose>Returns the number of data bytes used by a foreign object type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>size-of-foreign-type</function> <replaceable>ftype</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>ftype</parameter></term> + <listitem> + <para>A foreign type specifier. This parameter is evaluated. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Returns the number of data bytes used by a foreign object type. This does not include any Lisp storage overhead. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <para> +<screen> +(size-of-foreign-object :unsigned-byte) +=> 1 +(size-of-foreign-object 'my-100-byte-vector-type) +=> 100 +</screen> + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="pointer-address"> + <refnamediv> + <refname>pointer-address</refname> + <refpurpose>Returns the address of a pointer. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>pointer-address</function> <replaceable>ptr</replaceable> => <returnvalue>address</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>A pointer to a foreign object. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>address</parameter></term> + <listitem> + <para>An integer representing the pointer's address. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Returns the address as an integer of a pointer. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="deref-pointer"> + <refnamediv> + <refname>deref-pointer</refname> + <refpurpose>Deferences a pointer. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>deref-pointer</function> <replaceable>ptr type</replaceable> => <returnvalue>value</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>A pointer to a foreign object. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A foreign type of the object being pointed to. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>value</returnvalue></term> + <listitem> + <para>The value of the object where the pointer points. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Returns the object to which a pointer points. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <para> +<screen> +(let ((intp (allocate-foreign-object :int))) + (setf (deref-pointer intp :int) 10) + (prog1 + (deref-pointer intp :int) + (free-foreign-object intp))) +=> 10 +</screen> + </para> + </refsect1> + <refsect1> + <title>Notes</title> + <para> + The TYPE argument is ignored for CL implementations other than + AllegroCL. If you want to cast a pointer to another type use + WITH-CAST-POINTER together with DEREF-POINTER/DEREF-ARRAY. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="ensure-char-character"> + <refnamediv> + <refname>ensure-char-character</refname> + <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is +a character. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>ensure-char-character</function> <replaceable>object</replaceable> => <returnvalue>char</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>object</parameter></term> + <listitem> + <para>Either a character or a integer specifying a character code. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>char</returnvalue></term> + <listitem> + <para>A character. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Ensures that an objects obtained by dereferencing +<constant>:char</constant> and <constant>:unsigned-char</constant> +pointers are a lisp character. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <para> +<screen> +(let ((fs (convert-to-foreign-string "a"))) + (prog1 + (ensure-char-character (deref-pointer fs :char)) + (free-foreign-object fs))) +=> #\a +</screen> + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>Depending upon the implementation and what &uffi; expects, this +macro may signal an error if the object is not a character or +integer.</para> + </refsect1> + </refentry> + + <refentry id="ensure-char-integer"> + <refnamediv> + <refname>ensure-char-integer</refname> + <refpurpose>Ensures that a dereferenced <constant>:char</constant> pointer is +an integer. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>ensure-char-integer</function> <replaceable>object</replaceable> => <returnvalue>int</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>object</parameter></term> + <listitem> + <para>Either a character or a integer specifying a character code. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>int</returnvalue></term> + <listitem> + <para>An integer. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Ensures that an object obtained by dereferencing a +<constant>:char</constant> pointer is an integer. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <para> +<screen> +(let ((fs (convert-to-foreign-string "a"))) + (prog1 + (ensure-char-integer (deref-pointer fs :char)) + (free-foreign-object fs))) +=> 96 +</screen> + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>Depending upon the implementation and what &uffi; expects, this +macro may signal an error if the object is not a character or +integer.</para> + </refsect1> + </refentry> + + <refentry id="make-null-pointer"> + <refnamediv> + <refname>make-null-pointer</refname> + <refpurpose>Create a &null; pointer. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>make-null-pointer</function> <replaceable>type</replaceable> => <returnvalue>ptr</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A type of object to which the pointer refers. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>The &null; pointer of type <parameter>type</parameter>. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Creates a &null; pointer of a specified type. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="null-pointer-p"> + <refnamediv> + <refname>null-pointer-p</refname> + <refpurpose>Tests a pointer for &null; value. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>null-pointer-p</function> <replaceable>ptr</replaceable> => <returnvalue>is-null</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>A foreign object pointer. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>is-null</returnvalue></term> + <listitem> + <para>The boolean flag. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + A predicate testing if a pointer is has a &null; value. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="null-cstring-pointer"> + <refnamediv> + <refname>+null-cstring-pointer+</refname> + <refpurpose>A constant &null; cstring pointer. + </refpurpose> + <refclass>Constant</refclass> + </refnamediv> + <refsect1> + <title>Description</title> + <para> + A &null; cstring pointer. This can be used for testing +if a cstring returned by a function is &null;. + </para> + </refsect1> + </refentry> + + <refentry id="with-cast-pointer"> + <refnamediv> + <refname>with-cast-pointer</refname> + <refpurpose>Wraps a body of code with a pointer cast to a new type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>with-cast-pointer</function> (<replaceable>binding-name ptr type) & body body</replaceable> => <returnvalue>value</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>binding-name</parameter></term> + <listitem> + <para>A symbol which will be bound to the casted object. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>ptr</parameter></term> + <listitem> + <para>A pointer to a foreign object. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A foreign type of the object being pointed to. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>value</returnvalue></term> + <listitem> + <para>The value of the object where the pointer points. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Executes BODY with POINTER cast to be a pointer to type TYPE. + BINDING-NAME is will be bound to this value during the execution of + BODY. + + This is a no-op in AllegroCL but will wrap BODY in a LET form if + BINDING-NAME is provided. + + This macro is meant to be used in conjunction with DEREF-POINTER or + DEREF-ARRAY. In Allegro CL the "cast" will actually take place in + DEREF-POINTER or DEREF-ARRAY. + </para> + </refsect1> + <refsect1> + <title>Examples</title> +<screen> +(with-foreign-object (size :int) + ;; FOO is a foreign function returning a :POINTER-VOID + (let ((memory (foo size))) + (when (mumble) + ;; at this point we know for some reason that MEMORY points + ;; to an array of unsigned bytes + (with-cast-pointer (memory :unsigned-byte) + (dotimes (i (deref-pointer size :int)) + (do-something-with + (deref-array memory '(:array :unsigned-byte) i))))))) +</screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="def-foreign-var"> + <refnamediv> + <refname>def-foreign-var</refname> + <refpurpose> +Defines a symbol macro to access a variable in foreign code + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-foreign-var</function> <replaceable>name type module</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para> +A string or list specificying the symbol macro's name. If it is a + string, that names the foreign variable. A Lisp name is created + by translating #_ to #- and by converting to upper-case in + case-insensitive Lisp implementations. If it is a list, the first + item is a string specifying the foreign variable name and the + second it is a symbol stating the Lisp name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>type</parameter></term> + <listitem> + <para>A foreign type of the foreign variable. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>module</returnvalue></term> + <listitem> + <para> + A string specifying the module (or library) the foreign variable + resides in. (Required by Lispworks) + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> +Defines a symbol macro which can be used to access (get and set) the +value of a variable in foreign code. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <refsect2> + <title>C code</title> +<screen> + int baz = 3; + + typedef struct { + int x; + double y; + } foo_struct; + + foo_struct the_struct = { 42, 3.2 }; + + int foo () { + return baz; + } +</screen> +</refsect2> +<refsect2> +<title>Lisp code</title> +<screen> + (uffi:def-struct foo-struct + (x :int) + (y :double)) + + (uffi:def-function ("foo" foo) + () + :returning :int + :module "foo") + + (uffi:def-foreign-var ("baz" *baz*) :int "foo") + (uffi:def-foreign-var ("the_struct" *the-struct*) foo-struct "foo") + + +*baz* + => 3 + +(incf *baz*) + => 4 + +(foo) + => 4 +</screen> +</refsect2> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + +</reference>
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_primitive.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_primitive.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,279 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="primitives"> + <title>Primitive Types</title> + <partintro> + <title>Overview</title> + <para> + Primitive types have a single value, these include + characters, numbers, and pointers. They are all symbols in + the keyword package. + </para> + <itemizedlist> + <listitem> + <para><constant>:char</constant> - Signed 8-bits. A + dereferenced :char pointer returns an character. + </para> + </listitem> + <listitem> + <para><constant>:unsigned-char</constant> - Unsigned 8-bits. A dereferenced :unsigned-char + pointer returns an character. + </para> + </listitem> + <listitem> + <para><constant>:byte</constant> - Signed 8-bits. A + dereferenced :byte pointer returns an integer. + </para> + </listitem> + <listitem> + <para><constant>:unsigned-byte</constant> - Unsigned 8-bits. A + dereferenced :unsigned-byte pointer returns an integer. + </para> + </listitem> + <listitem> + <para><constant>:short</constant> - Signed 16-bits. + </para> + </listitem> + <listitem> + <para><constant>:unsigned-short</constant> - Unsigned 16-bits. + </para> + </listitem> + <listitem> + <para><constant>:int</constant> - Signed 32-bits.</para> + </listitem> + <listitem> + <para><constant>:unsigned-int</constant> - Unsigned 32-bits.</para> + </listitem> + <listitem> + <para><constant>:long</constant> - Signed 32 or 64 bits, depending upon the platform.</para> + </listitem> + <listitem> + <para><constant>:unsigned-long</constant> - Unsigned 32 or 64 bits, depending upon the platform.</para> + </listitem> + <listitem> + <para><constant>:float</constant> - 32-bit floating point.</para> + </listitem> + <listitem> + <para><constant>:double</constant> - 64-bit floating point.</para> + </listitem> + <listitem> + <para><constant>:cstring</constant> - + A &null; terminated string used for passing and returning characters strings with a &c; function. + </para> + </listitem> + <listitem> + <para><constant>:void</constant> - + The absence of a value. Used to indicate that a function does not return a value. + </para> + </listitem> + <listitem> + <para><constant>:pointer-void</constant> - Points to a generic object.</para> + </listitem> + <listitem> + <para><constant>*</constant> - Used to declare a pointer to an object</para> + </listitem> + </itemizedlist> + </partintro> + + <refentry id="def-constant"> + <refnamediv> + <refname>def-constant</refname> + <refpurpose>Binds a symbol to a constant. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>def-constant</function> <replaceable>name value &key export</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A symbol that will be bound to the value. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para>An evaluated form that is bound the the name. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>export</parameter></term> + <listitem> + <para>When &t;, the name is exported from the current package. The default is &nil;</para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>This is a thin wrapper around <function>defconstant</function>. It evaluates at + compile-time and optionally exports the symbol from the package. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-constant pi2 (* 2 pi)) +(def-constant exported-pi2 (* 2 pi) :export t) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Creates a new special variable..</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="def-foreign-type"> + <refnamediv> + <refname>def-foreign-type</refname> + <refpurpose>Defines a new foreign type. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsect1> + <title>Syntax</title> + <synopsis> + <function>def-foreign-type</function> <replaceable>name type</replaceable> + </synopsis> + </refsect1> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>name</parameter></term> + <listitem> + <para>A symbol naming the new foreign type. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>value</parameter></term> + <listitem> + <para>A form that is not evaluated that defines the new + foreign type. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para>Defines a new foreign type. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-foreign-type my-generic-pointer :pointer-void) +(def-foreign-type a-double-float :double-float) +(def-foreign-type char-ptr (* :char)) + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>Defines a new foreign type. + </para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="null-char-p"> + <refnamediv> + <refname>null-char-p</refname> + <refpurpose>Tests a character for &null; value. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsect1> + <title>Syntax</title> + <synopsis> + <function>null-char-p</function> <replaceable>char</replaceable> => <returnvalue>is-null</returnvalue> + </synopsis> + </refsect1> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>char</parameter></term> + <listitem> + <para>A character or integer. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>is-null</parameter></term> + <listitem> + <para>A boolean flag indicating if char is a &null; value. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + A predicate testing if a character or integer is &null;. This + abstracts the difference in implementations where some return a + <computeroutput>character</computeroutput> + and some return a + <computeroutput>integer</computeroutput> + whence dereferencing a + <computeroutput>C</computeroutput> + character pointer. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <screen> +(def-array-pointer ca :unsigned-char) +(let ((fs (convert-to-foreign-string "ab"))) + (values (null-char-p (deref-array fs 'ca 0)) + (null-char-p (deref-array fs 'ca 2)))) +=> &nil; + &t; + </screen> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None. + </para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> +</reference>
Added: branches/trunk-reorg/thirdparty/uffi/doc/ref_string.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/ref_string.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,514 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +%myents; +]> + +<reference id="strings"> + <title>Strings</title> + <partintro> + <title>Overview</title> + <para> + &uffi; has functions to two types of <varname>C</varname>-compatible + strings: <emphasis>cstring</emphasis> and <emphasis>foreign</emphasis> + strings. cstrings are used <emphasis>only</emphasis> as parameters to + and from functions. In some implementations a cstring is not a foreign + type but rather the Lisp string itself. On other platforms a cstring + is a newly allocated foreign vector for storing characters. The + following is an example of using cstrings to both send and return a + value. + </para> + + <screen> +(uffi:def-function ("getenv" c-getenv) + ((name :cstring)) + :returning :cstring) + +(defun my-getenv (key) + "Returns an environment variable, or NIL if it does not exist" + (check-type key string) + (uffi:with-cstring (key-native key) + (uffi:convert-from-cstring (c-getenv key-native)))) + </screen> + + <para> + In contrast, foreign strings are always a foreign vector of + characters which have memory allocated. Thus, if you need to + allocate memory to hold the return value of a string, you must + use a foreign string and not a cstring. The following is an + example of using a foreign string for a return value. + </para> + + <screen> +(uffi:def-function ("gethostname" c-gethostname) + ((name (* :unsigned-char)) + (len :int)) + :returning :int) + +(defun gethostname () + "Returns the hostname" + (let* ((name (uffi:allocate-foreign-string 256)) + (result-code (c-gethostname name 256)) + (hostname (when (zerop result-code) + (uffi:convert-from-foreign-string name)))) + ;; UFFI does not yet provide a universal way to free + ;; memory allocated by C's malloc. At this point, a program + ;; needs to call C's free function to free such memory. + (unless (zerop result-code) + (error "gethostname() failed.")))) + </screen> + + <para> + Foreign functions that return pointers to freshly allocated + strings should in general not return cstrings, but foreign + strings. (There is no portable way to release such cstrings from + Lisp.) The following is an example of handling such a function. + </para> + + <screen> +(uffi:def-function ("readline" c-readline) + ((prompt :cstring)) + :returning (* :char)) + +(defun readline (prompt) + "Reads a string from console with line-editing." + (with-cstring (c-prompt prompt) + (let* ((c-str (c-readline c-prompt)) + (str (convert-from-foreign-string c-str))) + (uffi:free-foreign-object c-str) + str))) + </screen> + + </partintro> + + <refentry id="convert-from-cstring"> + <refnamediv> + <refname>convert-from-cstring</refname> + <refpurpose>Converts a cstring to a Lisp string.</refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>convert-from-cstring</function> + <replaceable>cstring</replaceable> + => + <returnvalue>string</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>cstring</parameter></term> + <listitem> + <para>A cstring. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>string</returnvalue></term> + <listitem> + <para>A Lisp string. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Converts a Lisp string to a <constant>cstring</constant>. This is + most often used when processing the results of a foreign function + that returns a cstring. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="convert-to-cstring"> + <refnamediv> + <refname>convert-to-cstring</refname> + <refpurpose>Converts a Lisp string to a cstring.</refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>convert-to-cstring</function> + <replaceable>string</replaceable> + => + <returnvalue>cstring</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>string</parameter></term> + <listitem> + <para>A Lisp string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>cstring</returnvalue></term> + <listitem> + <para>A cstring. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Converts a Lisp string to a <varname>cstring</varname>. The + <varname>cstring</varname> should be freed with + <function>free-cstring</function>. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>On some implementations, this function allocates memory.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="free-cstring"> + <refnamediv> + <refname>free-cstring</refname> + <refpurpose>Free memory used by cstring. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>free-cstring</function> <replaceable>cstring</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>cstring</parameter></term> + <listitem> + <para>A cstring. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Frees any memory possibly allocated by + <function>convert-to-cstring</function>. On some implementions, a cstring is just the Lisp string itself. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="with-cstring"> + <refnamediv> + <refname>with-cstring</refname> + <refpurpose>Binds a newly created cstring.</refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>with-cstring</function> + <replaceable>(cstring string) {body}</replaceable> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>cstring</parameter></term> + <listitem> + <para>A symbol naming the cstring to be created. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>string</parameter></term> + <listitem> + <para>A Lisp string that will be translated to a cstring. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>body</parameter></term> + <listitem> + <para>The body of where the cstring will be bound. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Binds a symbol to a cstring created from conversion of a + string. Automatically frees the <varname>cstring</varname>. + </para> + </refsect1> + <refsect1> + <title>Examples</title> + <para> + <screen> +(def-function ("getenv" c-getenv) + ((name :cstring)) + :returning :cstring) + +(defun getenv (key) + "Returns an environment variable, or NIL if it does not exist" + (check-type key string) + (with-cstring (key-cstring key) + (convert-from-cstring (c-getenv key-cstring)))) + </screen> + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="convert-from-foreign-string"> + <refnamediv> + <refname>convert-from-foreign-string</refname> + <refpurpose>Converts a foreign string into a Lisp string.</refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>convert-from-foreign-string</function> + <replaceable>foreign-string &key length null-terminated-p</replaceable> + => + <returnvalue>string</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>foreign-string</parameter></term> + <listitem> + <para>A foreign string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>length</parameter></term> + <listitem> + <para>The length of the foreign string to convert. The + default is the length of the string until a &null; + character is reached. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>null-terminated-p</parameter></term> + <listitem> + <para>A boolean flag with a default value of &t; When true, + the string is converted until the first &null; character is reached. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>string</returnvalue></term> + <listitem> + <para>A Lisp string. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Returns a Lisp string from a foreign string. + Can translated ASCII and binary strings. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + + <refentry id="convert-to-foreign-string"> + <refnamediv> + <refname>convert-to-foreign-string</refname> + <refpurpose>Converts a Lisp string to a foreign string. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>convert-to-foreign-string</function> + <replaceable>string</replaceable> => + <returnvalue>foreign-string</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>string</parameter></term> + <listitem> + <para>A Lisp string. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>foreign-string</returnvalue></term> + <listitem> + <para>A foreign string. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Converts a Lisp string to a foreign string. Memory should be + freed with <function>free-foreign-object</function>. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + + <refentry id="allocate-foreign-string"> + <refnamediv> + <refname>allocate-foreign-string</refname> + <refpurpose>Allocates space for a foreign string. + </refpurpose> + <refclass>Macro</refclass> + </refnamediv> + <refsynopsisdiv> + <title>Syntax</title> + <synopsis> + <function>allocate-foreign-string</function> <replaceable>size + &key unsigned</replaceable> => + <returnvalue>foreign-string</returnvalue> + </synopsis> + </refsynopsisdiv> + <refsect1> + <title>Arguments and Values</title> + <variablelist> + <varlistentry> + <term><parameter>size</parameter></term> + <listitem> + <para>The size of the space to be allocated in bytes. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>unsigned</parameter></term> + <listitem> + <para>A boolean flag with a default value of &t;. When true, + marks the pointer as an <constant>:unsigned-char</constant>. + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><returnvalue>foreign-string</returnvalue></term> + <listitem> + <para>A foreign string which has undefined contents. + </para> + </listitem> + </varlistentry> + </variablelist> + </refsect1> + <refsect1> + <title>Description</title> + <para> + Allocates space for a foreign string. Memory should + be freed with <function>free-foreign-object</function>. + </para> + </refsect1> + <refsect1> + <title>Side Effects</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Affected by</title> + <para>None.</para> + </refsect1> + <refsect1> + <title>Exceptional Situations</title> + <para>None.</para> + </refsect1> + </refentry> + +</reference>
Added: branches/trunk-reorg/thirdparty/uffi/doc/schemas.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/schemas.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,16 @@ +<?xml version="1.0"?> +<locatingRules xmlns="http://thaiopensource.com/ns/locating-rules/1.0"> + <uri resource="appendix.xml" typeId="DocBook"/> + <uri resource="bookinfo.xml" typeId="DocBook"/> + <uri resource="glossary.xml" typeId="DocBook"/> + <uri resource="intro.xml" typeId="DocBook"/> + <uri resource="notes.xml" typeId="DocBook"/> + <uri resource="preface.xml" typeId="DocBook"/> + <uri resource="ref_aggregate.xml" typeId="DocBook"/> + <uri resource="ref_declare.xml" typeId="DocBook"/> + <uri resource="ref_func_libr.xml" typeId="DocBook"/> + <uri resource="ref_object.xml" typeId="DocBook"/> + <uri resource="ref_primitive.xml" typeId="DocBook"/> + <uri resource="ref_string.xml" typeId="DocBook"/> + <uri resource="uffi.xml" typeId="DocBook"/> +</locatingRules>
Added: branches/trunk-reorg/thirdparty/uffi/doc/uffi.pdf ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/uffi.pdf Mon Feb 11 09:06:27 2008 @@ -0,0 +1,2920 @@ +%PDF-1.3 +%���� +4 0 obj +<< /Type /Info +/Producer (FOP 0.20.5) >> +endobj +5 0 obj +<< /Length 201 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GaqdX]aDVA&-UqjSmom=E4u;+CBYq42W:aU`jc=(4<^HFDa4C2;[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f7@i*$o%1]nO`Y,,r2u`B_t@aheY@Sq*.LdNo<&"a/-F<XB5`'iUpaRmBYJPMb0?u`h%HtSEGsq#=u5\Ep:Z(/RAi[58[,U#1+a+M:=(;>jXAJ/NGa'N3o(jZFhcV4>eptt<K=(:#eQ2/rOD(),k%VDhplYNSL1TXiaFr=`#I^O:+d'4822siIHb$2T,s!u*d41R#F(fhu~> +endstream +endobj +8 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 7 0 R +>> +endobj +9 0 obj +<< /Length 81 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Garg^iGoCd.c`?]8EV`b1=.gRYV7c]1UaMe0JP941GUmh0[MUU-q[K1isOjf_GG&\U1]Eh,lhpD'$^~> +endstream +endobj +10 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 9 0 R +>> +endobj +11 0 obj +<< /Length 2067 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gb"/l?#S1_'Sc)J.t"a>Kp)+Vq!/R8<as$#lk6g2m=fO,_+S6Ma%fJ,om"K?N84n."\MJbW`&L8[9["ZH[O,/f-a@kUL13m8"p<L^$0q*H]&L+r8rcZ&Y8]'7$:-c\2R]=s'/7H[nC`*NG0)$P(7N?U7Csa?Bmr2MRpCkrq3/'2hql*i\sAANk@G'U$@UkM'mc)*qc?Do/'CdA\S#-(R#%**s;Xr^7ArS-@pBGbtV<O'oM!a+,Ym2]\W0^;9O!gam-Mi<,;oY;dTb8"?K*WM27$3jE:O^>Qp3;[(4CMY00H#1/WGaZNbtG6]N-pY`Bc"dd6p!QCD?\p*V8A5bKp+irL:\qZ-,#ZX0!((/"V=&nJCVMNoUT<#$QVo*7aZ;dU(A1gE=d[MRFl;<<_1fn5%k%1!+563mltaW<4K%j<U76>gl761#=.Lk%_mVW4tZUsj>-9:=DB:apP&fVqXd"9RCbfPUX`3=LkNWSY5B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ojei-,LZqm8eC3.\oge>UHIfP;q`g*WHh*^]#mi%!sA[R;<DcB'4obdoV`e!<n/rY(-B2oC6$(Ba;kE[-35m2q2*OmDl^t-Wr#1>VNZNq_bdSl(e"aTc4]!2\d&AM0F0Kt17CD2;<b!;W,HNPh1pqql.fCQ2=S<A+;!a3dDkPs+c5lGAS&+]Z6%>'_>TnQ`:J01-#X4r?^]G/sDYB8?sk[JqR>A"?N5qh>Lr[ApneD-FArt$)Vs!5\E>/"Lq[f,Y2f)WUE1S%IlkP+OD!f#m'J&2W:pQU>@KIgPCCQH-epS<^5BqPpS&&Q+r+>$.,4IJ\Ip8GNY@?,6Ok18eX#c!e$gFh0iTrXS_9WpKJiF2apd1APq-iI^/Z1Ik+HclS"7Y(eY5<h5beVj"uRAbBRSTX$hdtHj5.N?8BBAq]ukjc<?OuCnEI9okjLolQ8,C#]u]mFO/!`Xd*Ul(G9Q&=IDFI+/I>U9B*GFkl6e6/OjU9)uII)`JLLI6..1Nr+9Ff]_Ucpd?Eh^NC,m<T@n64IbNS@,9D+r3,*hWq<(uZY<N%3Yd+!~> +endstream +endobj +12 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 11 0 R +/Annots 13 0 R +>> +endobj +13 0 obj +[ +14 0 R +16 0 R +18 0 R +20 0 R +22 0 R +24 0 R +26 0 R +28 0 R +30 0 R +32 0 R +34 0 R +36 0 R +38 0 R +40 0 R +42 0 R +44 0 R +46 0 R +48 0 R +50 0 R +52 0 R +54 0 R +56 0 R +58 0 R +60 0 R +62 0 R +64 0 R +66 0 R +68 0 R +70 0 R +72 0 R +74 0 R +76 0 R +78 0 R +80 0 R +82 0 R +84 0 R +86 0 R +88 0 R +90 0 R +92 0 R +94 0 R +96 0 R +98 0 R +100 0 R +102 0 R +104 0 R +106 0 R +108 0 R +110 0 R +112 0 R +114 0 R +116 0 R +118 0 R +120 0 R +122 0 R +124 0 R +126 0 R +] +endobj +14 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 704.89 149.98 694.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 15 0 R +/H /I +>> +endobj +16 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 693.89 179.44 683.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 17 0 R +/H /I +>> +endobj +18 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 682.89 176.22 672.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 19 0 R +/H /I +>> +endobj +20 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 671.89 192.88 661.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 21 0 R +/H /I +>> +endobj +22 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 660.89 254.83 650.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 23 0 R +/H /I +>> +endobj +24 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 649.89 172.33 639.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 25 0 R +/H /I +>> +endobj +26 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 638.89 207.43 628.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 27 0 R +/H /I +>> +endobj +28 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 627.89 204.67 617.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 29 0 R +/H /I +>> +endobj +30 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 616.89 210.83 606.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 31 0 R +/H /I +>> +endobj +32 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 605.89 268.43 595.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 33 0 R +/H /I +>> +endobj +34 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 594.89 211.33 584.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 35 0 R +/H /I +>> +endobj +36 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 583.89 210.22 573.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 37 0 R +/H /I +>> +endobj +38 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 572.89 203.56 562.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 39 0 R +/H /I +>> +endobj +40 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 561.89 314.52 551.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 41 0 R +/H /I +>> +endobj +42 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 550.89 263.73 540.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 43 0 R +/H /I +>> +endobj +44 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 539.89 216.88 529.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 45 0 R +/H /I +>> +endobj +46 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 168.0 528.89 312.72 518.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 47 0 R +/H /I +>> +endobj +48 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 517.89 178.87 507.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 49 0 R +/H /I +>> +endobj +50 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 506.89 177.32 496.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 51 0 R +/H /I +>> +endobj +52 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 495.89 195.83 485.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 53 0 R +/H /I +>> +endobj +54 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 484.89 193.43 474.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 55 0 R +/H /I +>> +endobj +56 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 473.89 209.53 463.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 57 0 R +/H /I +>> +endobj +58 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 462.89 188.43 452.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 59 0 R +/H /I +>> +endobj +60 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 451.89 203.58 441.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 61 0 R +/H /I +>> +endobj +62 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 440.89 182.32 430.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 63 0 R +/H /I +>> +endobj +64 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 429.89 182.32 419.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 65 0 R +/H /I +>> +endobj +66 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 418.89 198.99 408.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 67 0 R +/H /I +>> +endobj +68 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 407.89 205.66 397.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 69 0 R +/H /I +>> +endobj +70 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 396.89 212.3 386.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 71 0 R +/H /I +>> +endobj +72 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 385.89 188.41 375.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 73 0 R +/H /I +>> +endobj +74 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 374.89 182.88 364.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 75 0 R +/H /I +>> +endobj +76 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 363.89 166.1 353.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 77 0 R +/H /I +>> +endobj +78 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 352.89 235.08 342.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 79 0 R +/H /I +>> +endobj +80 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 341.89 219.52 331.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 81 0 R +/H /I +>> +endobj +82 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 330.89 221.76 320.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 83 0 R +/H /I +>> +endobj +84 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 319.89 223.97 309.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 85 0 R +/H /I +>> +endobj +86 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 308.89 205.65 298.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 87 0 R +/H /I +>> +endobj +88 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 297.89 196.2 287.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 89 0 R +/H /I +>> +endobj +90 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 286.89 230.61 276.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 91 0 R +/H /I +>> +endobj +92 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 275.89 221.74 265.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 93 0 R +/H /I +>> +endobj +94 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 264.89 216.21 254.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 95 0 R +/H /I +>> +endobj +96 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 253.89 199.55 243.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 97 0 R +/H /I +>> +endobj +98 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 242.89 233.05 232.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 99 0 R +/H /I +>> +endobj +100 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 231.89 212.32 221.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 101 0 R +/H /I +>> +endobj +102 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 220.89 205.08 210.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 103 0 R +/H /I +>> +endobj +104 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 209.89 160.56 199.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 105 0 R +/H /I +>> +endobj +106 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 198.89 227.31 188.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 107 0 R +/H /I +>> +endobj +108 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 187.89 215.65 177.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 109 0 R +/H /I +>> +endobj +110 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 176.89 190.09 166.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 111 0 R +/H /I +>> +endobj +112 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 165.89 192.33 155.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 113 0 R +/H /I +>> +endobj +114 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 154.89 255.08 144.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 115 0 R +/H /I +>> +endobj +116 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 143.89 243.42 133.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 117 0 R +/H /I +>> +endobj +118 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 132.89 233.42 122.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 119 0 R +/H /I +>> +endobj +120 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 121.89 223.88 111.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 121 0 R +/H /I +>> +endobj +122 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 110.89 193.43 100.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 123 0 R +/H /I +>> +endobj +124 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 99.89 223.42 89.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 125 0 R +/H /I +>> +endobj +126 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 88.89 222.31 78.89 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 127 0 R +/H /I +>> +endobj +128 0 obj +<< /Length 395 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gb"/g:J8Sj&B4,8.H[!;h!T(Rn'RjY'ed^U&eDfr8g#IJ<5ieE/h%+X._W7<-'o^;H'q/FO3Gm$RcOT!_$"S2#cnUAi\(Y'Kqa_='4J\j^ghDA;n-3Ze<=ImDi2+Y2HALbWm[RZ)M\-O,"4O';A9L0\5(uhm*1b;S;.4ZF@qXqp7nVA@^YTnj`8S:;5H.Io"463c^1Cpr/`T^G6a\YMhr/4*9loWi+2[ZDg`I%c.Zs#<6)Ef.8ls?$B/Bu@:fk*7G[Zcd=$=<`l5327uA#Fs3`fLbVj[J/UAEI6&+;P*,!t*-Q-Mg!:e=)K+d"6\_Xm10Y`88*uV93LMnh<@Zg%kmTo'<f0$Ze4E4N:<@bQ9W:W9'EB-cK!`M<P8BfU<j*c7+(IIR::&~> +endstream +endobj +129 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 128 0 R +/Annots 130 0 R +>> +endobj +130 0 obj +[ +131 0 R +133 0 R +135 0 R +137 0 R +] +endobj +131 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 768.889 177.22 758.889 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 132 0 R +/H /I +>> +endobj +133 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 757.889 210.93 747.889 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 134 0 R +/H /I +>> +endobj +135 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 144.0 746.889 177.33 736.889 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 136 0 R +/H /I +>> +endobj +137 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 735.889 155.55 725.889 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A 138 0 R +/H /I +>> +endobj +139 0 obj +<< /Length 590 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gasam9lHOU&A@ZcHqY%9q?(6;7d<Uj.@'*Gb/%M'ee/?)Rn\B]c,.IB9fEXs@NI=Djup^HeCh;o"XJk78O9I6"PO7dj=Uj#JI$3u5t25YT>:'Sdj12lj?7_goqSQu!$dijlE3"3/-*^N6q+X%eOOKE_2c)c,smE<43&Nmfe5`:gs5bX5R2"l8\`E$^`J]Pfn_P;7":!n-&%nfP\O%`C5RMj:e"hiP$$&6rVjhH#:O4=B1WPkS(?j%8l*IH:id>GPuA*Odr9IWR8dpqkq&ag2Ic5c&G8D][<u0cEs<$8kn#t\o<!RZVq^(K2]X+[6X7Q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ream +endobj +146 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 145 0 R +>> +endobj +147 0 obj +<< /Length 302 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Garo<4&<aJ&:f!)MVCZ+]=)4ioi_Y+"p@g^_@SS;'.FH2>U9;3%P9+r7(;"<qsFq/g"fdBS8kJIiS]OmSjIrUA4dalRC3m2!M6VYC[p%9!HXn[?Y6U5pkj0RiH1#8I_HtBd9Wd^F]6*$O-c.ncf#&-qnE[gR420ma%5BBMY*\.:Un)TgYu;RFkF0FC^.!4'n9GMp[bY1kqZ;E@W+R&Jk;_g1CXB$OXG0O*i.BmrHLtPR$9@#mMXUmo>`Q\cjW9#qBR3V\%olqEW.%a-L(eVj]Kbq@6g/QR579;Q[Jn6<c-I~> +endstream +endobj +148 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 147 0 R +>> +endobj +149 0 obj +<< /Length 468 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GarnS9iHZu'YO#fEi_&S#!rq^g8YCU:<+573?GDQ`Jd&9J_'\`%3KG#XhuHsm(Sg7H*bH$H(ZPkE>297Ccm;)cUYp&^1B<b\Nk`Z*/P4Q"aZ`p_(&6'>"_ka/+eRZa1_VkK(?@e_(>^^&<Ag]"RE25/a0<ih9j6(:TS5?nq37dXZ*i@n!\:S$7;_V#9!\[LMGqrRG<gEou@?><)LaWZt!'8bl3L138s:2bFllpJLO+e^P(4"itNP^YW%"Yf$'%CFJLr595oZV/94"#j_^eeh78XRYOd^2VFU<MaeS*4$[q#<R67](9d16`/DD:0Oe@=@cBXPl<L<a4W`rE"K`6%E9Ao@,)Yq9UFcoEfAUF`]A^;ZEF?VBXpb,0(V?*DQDd3lOaLE7OKLG6%5GN?iB\A>pI3?NFES7g+=G`$u%sGn(F0Vk@,KAqN(3qOp3YY4r&ln*/a_2bh_7pgq:n.~> +endstream +endobj +150 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 149 0 R +>> +endobj +151 0 obj +<< /Length 820 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GatU29on!^&A@ZcHn/0*l>J&`Z!EHig6F/9?:k_O3,Bk'ck+q%n*;6L*S?HR.k]'(2tQt0_`S'SG;Fu0!pZI%*al>m&;8;`+@Q;U`<@[+;37O@_l#3=,P2'A*t:gbK$=;u3WfYi*/[UTZiR7N4>)[V!ub*8rA%[WiYllj!<*#lNln0%saW+RC,7*qjk-pW,U^i]!tQ<dVlXC%\k5_+T,GsoSc-e!o1P&If^40K;+T:Ts@jtZ,@HM(VCu794UUSpf'*F8[1:O3+uGPQG2'DM6-_/c/b^4]K:@1M[[94osaYQWeV3"M[E"XQ'+e]#qM52SkPmj&G)B'+@MEXLQ#/P%6L(ZCI6o-/=VKV_%`VkYM4gbu4DSl3\bRL0'h[<$bec/s6&;%J<?[hf+8F7)js*%kC^r1JP-\q[%f6Z:EZ`diEAan;V,;3C4fUmd[B!>WW!"?ckeB*,3C$MSj`9c"T%PM.g`n$OV;8Bm+2bXr8kh?I8CEK:._We!kDK^!C?N6hqOTpCV+>6piYW27,S:*UfCLW+L>(=r(h3IGVEpXOiVBK8,M\dHbXbHOoi!-n;N_r)u1_]c>mi]O]iEbMCnjYH-5'.6J\%1DQ4qefHTmYXaF&92cTmWpS/6$Q]<=<q\<g2PM#eks!HD.gl5mQJ<]pY%XV^TB59>0R$6Xm*J-iBY\L^n`<\gH0b)m(Ei#WsYD(Ju:_X7:%G]-us4j8CpKWgpSskP1".]j6r=uRXPrChD1H&K:gEgKDM*nc'%^H`%_@o">VB)BG:uk$m(#d_kte^j5abbp]=!oFX<PJ<8,QG!E#<U+T~> +endstream +endobj +152 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 151 0 R +>> +endobj +153 0 ob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Xg%Po\qm7#XAPY%?cRGZDI#q#Nc_ArJ[#-+]Q;pb'G6'<\+I^puoHr]B!4432W-PM[i$)Yi'lEtNb"`sGjCO_tA`M9T)TIBtf-YU"QJ@`#NG98tHpWqugju;?7Ol:rU!+uPNa)3puMZ.tbE88IeHL6`@j.?.NLZA:DGTdUqs+QG9J&`7X!g&'W&,k5n2a[R$0+oU*`H6WP18PgB:U9DZFI+Y&Du<s0heLp"7#%0H5Xb?g\h/h)(cO:GVR#U9BPDSgl#H_[:!8JTd9k96ME)jW'$>;Xj4(Y1I?ulSeb.T%'*r+o!09ja:1lfXCVB[!L:7t00,,Yp/Hp`lM(4LNZd5s:l1!_h@lEnSCV%lpR7*.&qjC/F8,XB[?HaD~> +endstream +endobj +160 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 159 0 R +>> +endobj +161 0 obj +<< /Length 293 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GarnQ0lFl_%,CL_Nm:IU&g^Br)^$$0'EtiY*J.<M4?-(N_a/e0\5$NYBYfD`h=6<U7((l+(lKOk`(CWk8cr?kK/&$G(5*!H=GSQA(6<U/;n_YK$6G-3Q@VX=7Jo3DdgFqS50\EBOYqcXJ2F6tLQmQ@SZg91c@Mi)XDTM)`eAU@*Lf8Uh$=hqjS(b(o)a:-g1,"ql!n%BeY58Z\6Y^'[Td(KS7nD+)=C5hqYN1NcRH#hLBBQt:kBu_,7Xu"j91`o;4Df+p(mHGjt46oTP";gdE3/Uf!G$.^7]$:~> +endstream +endobj +162 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 161 0 R +>> +endobj +163 0 obj +<< /Length 1766 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat<A?#Sa]m(L0NkQ+&/24F3s&+uN?G9*mg4()a+QXp\fUSPn-]4X4mp"tgrA5c*:V`P"e7#D[C78j,l]_LSi*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ICr`l3X^o2FT6$iSYc6+QeK!^')[aStsf]f7e\^fdnQkJhWDJ"RCDY7;idc_KQFf(u349DElOc=[u=P]uJa.7%WS_J"\i?9!Tb(X4OU,J>kah0/7M!,\LS3][S=VT#-#KGs59b\J<Ms"G)B7UuHp3!.B<GM/PEInO__p.&On'FE[?Mf)O(PKV\n90GrEk0G:DOV,-#pYI5?.F>M><aG"X_VB*caKu=_GE_S9/J3"L.`%rG=!4Vn75F]g+;iZSI\Y`W/K;oru=NNiGm)2;_oam]@-_;/W73mI<bt[qN1%-/p(Ys^$tg+;>3_I?^'1d)koB.?AkeE%NYF/?C^(/.;tS[cYoWET``/H;)0G$RNHW/0?qM*,!S.5R8B"9h2I:o`Z':(G@`P9:'T\fc_%-oi;VSg$+-a2O;F&G#Rn>\TBnPTD<3;+cUrtmHD4'KnSKnk%G]pTTNM[j`+5@k_qu`oXM%1_;U2^L83n<E(,[&Cch8To.&IsL);[?r5tmk5H_&G`8a3m#[qBDR;88[X&U6,?h4(kaBr^@)3\*0^'i`T[(,,4dl:!F^>j\\T]-`R+&,YPAZZ1h"OE#_D>Ttl?I,Cg3DGF0:mR;R]G+1Jgq92F$3PsdC_*^?\h>Zh!IL:'clZ=#=O@TimjIk!FSU?p^a$XLU+:WQ:%THF-"]5T9J:#[PhM(q6g<))e~> +endstream +endobj +170 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 169 0 R +>> +endobj +171 0 obj +<< /Length 670 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat=)95iQ=%)2U?kh$lVkq-\['[7*i<hQD=bHcccaJj_Yc5[()rdElur(&BK.ss'cIc*_F,^ga>hgSCP,pX(Ydf=r9J,s[$#*M4S,i_^A#3%f@IJ9]7Ac_m]pnpK!J<:4YTF1a`arr3bJi&";8OHbtqA^RIba,,.J<97Ml>B=Pm&^MVB%@rKL[JMfTOg;)="!:X4<5Qi#6R'Md`7kc-re+^QVNF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U:_m<fYqpF6u\U57e91;iNr\o;*AW"eD7#A<U(XDVXC@$2Lo'srk@),_GV.]PPFp+CZ.99ha"3I`o*eR6;)M9FNKVDMa`Z*7%XcJ)1ljFjg'8q16ScF^g/I!9rrL-(JJe~> +endstream +endobj +180 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 179 0 R +>> +endobj +181 0 obj +<< /Length 597 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$ubAQ&g&A7<ZGYAV(o!P3:9G$A`TEU2Y]sKrD1?C!i6s$85k3kr8[e4S[^5%l45?C[+Wo1s_m:IZ!Dc6i7$ML37]?>(;&gu]&j`3:BgoblIEj<`:O\DtUIQJ9e/*AV$,CdV.)@(h*M@))=VS;!jecA:eZ6gJ4]u_4Fa)_'=+0`-9D<j:RE@F+II)Dp"6f2i:mu712U@mrpF5!?n:-Z5U'D.%5YhgPe'>A1Pg0Dl;O!-p5I@bLa46T`B`^4A2rQd]f8:(klEltS,n7ZNA_Mm$(>?/G\B!jb1*SZ8L`$-UfX9sO5d@rp(0X,5"`j:2$9].jXgH$J4uhjLL0D>/Seu']5`#(@PbLCna`Q3)BKY>LKVk5--.A"k'Sr]]IA'-[.UNB;(rQ+FSWkd,9Bc*+8/&oX1.if"fJX(:SS#PN<#><!&>bj7#sLc,^jIU@>)IB9eS8m@&ml"(CL7<0o!UVTI4+D'(PlB$b+lYFm#'r3*h6!'B#rje(>8]?[j[eh<j][)1-f(ZD(r]Gt@J7_cO4[<LJk1"<T.;0$O>M+d?j&OSJK6Y`0JJDGHUlP.hof::@$rADuCJg<`dc~> +endstream +endobj +182 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 181 0 R +>> +endobj +183 0 obj +<< /Length 1266 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%#;3.J1&:Vs/5l8o?V;d*C(fkCJh<Xd.\nfi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^dFirmR'_YY*3+)[4dnI$pp1-tg*=X$@b06"`uLa0Lp7gKs9g0MNj5a7h0hl1GtsP>J:(X6>"g6g*p)Vmf-UM&WGBU]2'1H:lS00loC7*)b$*Iq2hL>kI?ML[o?@0KDYm\D-q`rs0&1dK"hhVAfaPJ/EP45b=WT\bUOBYZl!?@Luht3C\dlr-o8d&';P!g'iWmoY5f]!PA~> +endstream +endobj +184 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 183 0 R +>> +endobj +185 0 obj +<< /Length 817 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%!bDt%*']&L6]OPOcj(E7]"B%aS"Tfs:L^dpX[S@dk4@l!"iTkJiNK^f76'\J&^?7]*4kG,g(9]rA6if(S"jqpprIQ5&IM;h#"G)XOUd.4tIb]>X'6T@bU>Ve48OSCi0VBIP=hOj+@@+BP1B+>E/97Jd;"6_loM]WI3)%nXGAG3+=FF,Z.ai@icj.`PXceYnL347@hn)^?_eSe=Q0"hle]p>u^+E$FTB1On95V)%Mb+n\98?`J1Q#JQ/cBb#/[@1L^I3>>L'n's#IAG#F&J<i5D12LdhrVXeV2n9OOL7(:#Lb<MECI0F!&U8VNibh2U"C_dc]1H97O!9mDj5/!9,'tLgjOQA8M)/H.oeM`Fs<T%:=35ekXo<9ohe[B/X@s'OaKj*m5/7DE`/3LC9n$E]7@`['94pa\Ef.EoB#2nSf_U>Z^;85VN:[QhID\V5@-JU7ID_:CR-5K*IJ:pVaY&$S#>?o](T6"t[Bo-(;_*JrEL@?<;J1^4EAldtr1A6ApK!ciP:@%lHpNsLcS6$YqH3&PPf)Cp<*:jObF)dIGU^L(F+1%aX'YBDlU0$qeG<D?!,ukX[WSJJTj<8^)PGk\iD.jK,:HT.X?%_+`$`aW)0rlgES$``u)g?;$$7=\cLT0IL07IZ1m&pQr`HMG3ecFpb`P0noT5a\k"R9[5ZlqO;T[`)5P6W>>>8>[$kfr_He]E@c@<Tri(L4?SWJ5K;F4)eOT6Eb92Kk.?rtXFeF[p8r2u4<cNSHmB!<$m[Ts7"mtTip5SIQl<T6-T<URkfbt]0F&k/geS(56g0$qj5"2~> +endstream +endobj +186 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 185 0 R +>> +endobj +187 0 obj +<< /Length 611 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$u9omaW&A@7.pr;`1#CfNs!3%Kk!=:%(BJ7.EgH$KkRhRfHi8<RBZuMO/gJol24jWTA4O;e1dG'_60E`G,`=(m,=\X3(dSXrTN$G6P%6qohgA!Sp6PV%aX<-IKM`iL5mIDMbm"LbRWj:!<Ksn6GNjG@lu%#?m^R"@DLQPb_s3_npT=pblX+g;9YaXD*"K_H)&sCNS3kLdRnhr*FQKMI_FtP]Z_<M41c%/b=@OZGNqsGp]/*uLSs$d6n+5"M>_a@BfJ^$/Es[T%mXg/9pD[>fD>=aZ-mnmmja+:_9V;(QCar`PP[T)s9lkU=0sk+RJAoI-_"$\Y:UA3s+tj&eT75Np%9H(h3[1lDH:W=p23lg-!mNm+1(X$X8kkbe*7`I'];)A[prt&cuUF4!>^4DWQam>u]q)mSeR=W4r4:fiMn_IkLP4)fRDk)%3)M4-:&mg5[671<[>LB?b0iQ-+VcU*!*0Bs/XsAeU/NIp3sUmY%KfQ[,P2M=NO:,3HZN,A6grAQpt>k7RAS;=DtGs)RDAVbVr78m!FfT5KIoEA:H9@cJaBi2?nb7@YZ,oJO3U:4oqW0b\gPBZAY"+Aj$ep2N)hrs*cuERF~> +endstream +endobj +188 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 187 0 R +>> +endobj +189 0 obj +<< /Length 1060 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%"hf"u<&:Vr4_.3=lMf"FCUeOHcWcdU</k)80AIk"B_F,LKZF'Z1bYK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#*p61(oT\Q3mqr6E:_dK)=3tlme$/56r,SE9\b"#H%r=;_KVqV~> +endstream +endobj +196 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 195 0 R +>> +endobj +197 0 obj +<< /Length 656 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$u9okbt&A@ZcI,$k=osaIbQ$1^M:i0:6QM/c#5SB9'7=YH=g4*H38\hP:>B.KSH%'\gbkO@3hL&^e.%h00df?.K5S/)\6&G_5M@374UNhj6h)m$2F,PL?pnL1_7'K='TG)k&2P:lj8UE^OaKi$$Cu1O//8nBV7@S>hSPh>8@T,5YE(l#D,BO3e7<KB=B*,#rJ@2<5n]Shf(!0ER&3f)tOrXt$1$VZ)P^q7HjAW@`MCZ8/e-;]m_"Gmj*2*M]'ri^kCp&)Wq'?"-46N6SSU'X>O""ne9=cP&eoKoG?:_]>NLdI?0To/I6Q;b.$7'C[52QXd%[%Ta<,Ak-_iU:n8@4E9GJtZ+GAh'^MB'e'+]PeB<[WkNhrpZRm>cS9HdbCkdl!7?O!K`0=lU%MhbQMueuM:!;kS'%%V/b6jq&h_B2SQ/oqAns=s1Qp>!h6Hcn#h\clRq,#.pRM$EGBp]_"=APF$QI)>KkLOUXOnj!Gf0T'eRP3;ep-ep8lO@/HI5D=1haad@Z1.A`9hVrUSIi0O7A!RrHFYGCZ(*M%kihhOOKu1qQhp4\0RJ4rFDBbd`.VHB<H@#`*C//%Y"(hI?taY!A)Yo1'=NZ_B;Zd:`=]kmc/#ejM3BYNaGf.'G;$RmA#!#rWbQhF+"~> +endstream +endobj +198 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 197 0 R +>> +endobj +199 0 obj +<< /Length 438 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$tbAP0N&A70Vp'=!$rJ9k%#^m[BKN'B`Po`9Wcq**A`&[JY)]HL`-pa+O]@P9QG]l62]XoO$<$;Vl8j*4pNrl9k"iZRRnc^N%6aVKTd5'SC0t]mG>b_Eu;A[iU'7dC+L#NLeCB,#HD7@uiZpeRbds[f*X,G(:VG%t%7k;TDb@WA#E`:]EfJ?`V_8^#AZGX+u>q?3@YtuY3!04o9m85$u];TM+A/&V-FLgjUD>DlT;?f;l+r\s`/s@L6gFP9B/X;JC=0r"R#!AS17)cb12dE%C,3qN!Ho^"NT39hc=);-Ieh4*trSb%=03ht/BfdSClJf>(].^&.[OOt_n+uoWA6PCsnb5^S%[cE0KgPd^4@/07jKq%1On[E(Vr&?r6m*",n-MU^":u8DBLofQD]\S0V2tOHV;(-YO1BjgI(j?_3H<P5=BF;c~> +endstream +endobj +200 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 199 0 R +>> +endobj +201 0 obj +<< /Length 1607 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat=,968iG&AII3E,oXZ"&T+Fpi*+$O__Mf:2D3d-QQ"5"%5Ej'9Z2fLo^OO!!F^#%p;Us([N(;rcYjAFZfQcf!Slc:h[i&R:AD+T]PYbZiU@M/+>4uY\1qcp#j9ram#YpQPKPGV6C+DIXqlL!Y>Z-i$.)(.I`MO4$+TcD=:V2e?llqCkTd0M\SR0VZ&!c^=":Sa#2Tk1rZp"S?NIQPV=to?t<F8UT'\V8eq!;\9$;$E""ig'f^f\O(@2C,UqDD+rX+-K&HqGGgYbTq2S/!`DI:j7]K;G%90IY@ZqSRG0uVVe$?.dPp2sQV5Aah8!WQbFYXHn%#t;bM\c:aZ:4r9J6<Cl54UslYS<^rcV7/m\ckG4J-\N'(T,jWkYFNboibC,8T4eu&Ab?QS4#)PcqnbcThld#29QE\mF#NXU+eD&>CU5)]?R2G4gmhd7K=UD#KbK2>@]e#*/De/bZ^d9nE*j%<J74[]H:hF7F`boce6U5k2LjVSrBI+/H?EERDt8FOdH,8&d4d]lJ7(%3e*3p.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J?aj6$9!.i;su#Bqq9La\onI:n=A[;2mUc(!;=Ch6j-<=6)U*0"R]R^CeU'[^7bEDiJj&D9=OMql+@YE72W-CU7DSW-bmGqVC:D)h\eahN4["Fc.fHV_mZPneT8FC]fh<SO>#LF;9Q/^T<F7[V0OC']XQfq2#72g14lBOUO"=akdhMjIR>:,UBYZ@nf!dqNRPMaj0QOZ4_f+]K/mc]5�g7?qZ9k?h"h~> +endstream +endobj +206 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 205 0 R +>> +endobj +207 0 obj +<< /Length 2198 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GauHM95iTD&AJ$C#ekCZGSs*&dlB9O%AX7J[,%>=*b^tIe7ch'7."U`lT9JbUn2^[U'M<LAiWWsB0OK,%l\DKYi>s:8[*9WDd;Je`cGD[k;e!]TK#]:(qV2Q"6XWFIbXh<S$IKWh`/A4LEFak-plS(:';cDgA(J;Rr_.SHKX%<aRNO*@m3G/^0j@&O$`1`WF$_g4q84a>U"u#i'q4EJq,q0*+9PYBpq#n]W3hpZ?jCMCdML+N9c<qA6;$?PKpi2@i(u@5PF6WLAQE>bm!eY4.Z^2T.2n1h5XH3De'DL*X'<X>!S))h-_p8*O-3eB](W!aqho,k!a/B_bPEfEhTb`gt&K_a<Bk[F:?3PD2g^:"N(s)22?h[s[pXDj62L=C#4Aat3+G+-&chOl6jpmS9Q$8'5OUnPjY1[7k1.j:+1S<*u-9n35E8h6J7_<-^T+oLNamL3hDdb]5]26-.b]1VP7o5.aC,iP#h2M`UrKIOls\pXF1M1kZ[P0f2^]pf+[L6ObY_]&YHFEb$#ZCU7V_[ASn$E;/!'(,=!KVL!Mp9eYMILL7'=AV>uYkugAGHH)@bS2JJ=o$YoK&43'@cOWFN5DkR<:b8$5'kE[:Pq#5`%%OkeKN&Lt9kq#3?\t]e_[udG?[(niYdmW",>2">T-2=Cf2Pf;@*p/:b.GZ6JXGPe<#n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ABpM&24elCjASihIF"antNP$R+Ts!.g\V8>tHWIWDT8<o*\gZcLq3nNBUh&-8D\VA3+:AWM,t!*3;!XR<onbPrkjMc6UFru%@&`<'d]ui;\u7,m*A,S:]6\M;<%0LP-pu$$Mt5d<Vtn%^hb)Jo:Ngn!jGic;PO=s^e;8qrYasFEK'hjPt7gH7!LD?3B_G[gNueV!me_Cd'J`[X4_@(X2Q(Q6HE]IJP='CBal,_E%rIf]S9D^:i+)h)3f35i8gI/&Z>,<hGu/86oYP%\YV]b-EL'W.kp+mHJ]6"U&1e3Z_NncQmf'Kq%J-a^9s$2G_XnO<8??W([X"Z%70-H_X5H,/C2\s'Z"]V]&nE3M[b?La*NJ!8<0kVn*^BK0K#$#J=Y]qA+4m$&Yh)eB$qLLRUNYh`YMT-1I;@8I@-n_]9+*(PPUOSc%WJS+h^&jsWK>A`r(Is3sONNZC*X+BI@W^prnn,Bc86~> +endstream +endobj +208 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 207 0 R +>> +endobj +209 0 obj +<< /Length 163 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Garo9YmS?5&-_t0MH=Q!md8imEc"&L)\KLlbDTJ)Qm2?S:BClT]_9Uoi3[]SP2JeqKa#"4NdX3VaI3RTL8eXX1C[*kK-@mG5-><i/O4C>U>"h&`<uNobN:Y5Bti21M_"`#)sUVi:ZZ(<b$E5qN`08TdD!%*Y1b85~> +endstream +endobj +210 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 209 0 R +>> +endobj +211 0 obj +<< /Length 711 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%!997OU&AI=/ppb\7&AR6-8@q.#Za82E<-OmFkTB';XB(W^W3=[ERHb):o2;jSSu5fpG%Y6]r)-/+:1Yu-q;qsUY'uKOp#5>)$e8$8e:.Oh,ALDpZO\25<'?I3-GK9oE)h(;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&[b`SXRt=ifo>:@B?^"A_LRG1T-)LppN^lldH/)VP:h^I=!/I(i/tfFkf"4,uFZ_Sn(>&.-YLj!Z0bisF.d,>2*qJ.r?,uWnRO)a@`_QpK4Co"Ed)T\7429qT39H>SY::Jh[gC\n^P\Og5GAEn&2\Tt73./-mfi$8578JJ<fJ7%',LiiGd(&"LtC)"dSAlD6loHA^RdGb-N[0FSAG/Enlt!Ml[==W!"M>l0hMTuERZg+JiiM`gZ38*hs>[iO6g\WUJUoB0NE;ui14s"LF2XXA&Y.H~> +endstream +endobj +218 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 217 0 R +>> +endobj +219 0 obj +<< /Length 990 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%"8T3'C'Y`a3pk2h-%'u#X!)d$Y<)b>5%30o9e/9VLcFA*Jo\VH2Rdmn-S15?$bM1qKQLee[joYpO!&tC]A-%>U!X6sM:`qHBJY3DW7Y>@nr&D5a>C@Ff$DNS^M?O8h"tT<kJ8dje"9XZGJN,S!\u:odO`-RX?KcKJQ=X'lApkRK0l-P[IUXk`l_5%A*C[Nb?A0V_FettXpI\bijo&9ils^Q*Z![^ElsfddiZd8OaQF0uZihumT^mp&HT_X0.H8o8knH;(*/AAJYC>e-pWBjG<u^llFd=U0?#3H7._T$BcTBGa&>HN,p0H!.@\F&ue?Os!)8O=G&<dM6auYrs@U3o[l09c%O:4uj.'rL$hc*YBnmIX7qCmp17VI:;-?4nL*m:/"@LO78NQo^Cj&7ht]GSdZ)r"[lJj[<Xjm:lMikDH:UN<pmlsTD&S+>3PJC$XUFVn63ia5D/LRXfF3h`s+!6%d^.uL4ldhq*1Tu!Md>Fb',4p$8I(d6XODTSpK2#,ehP`c[[R18j@k`*6Xl>=H*E.22S_!&6S&E*=]LAQK-@l`fi8cN:1TcU39JX$L.=]gT('BHbT<>C#i^;1,5&"*<I<d36!(9`BiTO+h,mOtf?f:fNO5d-r>/),@2C$6^>TBlHQ@!i6?L@t@Q/M_!H8Q!k&#;d#PguIdfMNS[?hl5cRj@hS012HE5&."X:=1[eTu9[T_ngM@"\qd18gKL[GO")O1+q#P.a?6)*C(4GbG7?*^?DRLbl4HQc`]V<m.,PG/H?!QKGsbm(!;c/ng]-4HZ=0c:i6L;h:_KR*lm!Xq1Ol,!m:BlHCM(E(NBt7)r:fRm"VK+Jdop2n@=+(q,]]%D<c,XW?f4e[rkI]80TTe!J_+Tj7Y,J+HqEMfjpgQ$K6Fe#HFXI6Mbs)5)pOGMt;\r95i`Q7mpbY%X77&qC,nTNsp=%[+fo`Ha:PjqNm`::F6iiC`I@idgaaUX5G.%qZND('~> +endstream +endobj +220 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 219 0 R +>> +endobj +221 0 obj +<< /Length 667 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat%!9p:c+&A@Zck.#b/bBu)NXibB@=RK3m96jAFKFD"bKNWl)qsPOB^.H1F\M0S'rHR/%LV(o[o8t4JJHRAp4<NrRN-tN?8.tESA/lk--p45B2\4;5hkD2@r+&YE@G`D6:^b(7$:mcS&-n"cp06_AW\gcpj>u+0X.mheCk%@DKNHhch[,GDl+I05I3e)"5GuJAJ!q-&buml\42jL`6XJ2,0F6c^gdc@%3eWqH6sp*`@UNqJGuFnDQc]S,9O4%mB$O*8^_$)1?'@IOatZHO;D,W0^]u(p#bM4h\kTArTU7:2^0:EQi7:ZeajC2*.7LEE-f1A6oj=HrfUh?j*ebAprJV0^XR([CtcRb`#,YO/iWRs"Miseo=AL$K7@9kT=$k;"pJiYF91gPIh(1tW./#Qs'+hEEm8gLDV,%Fgke%bSrC@poqZf12%>$r`bAl*)*0[X)%2f6[5TT<s!W[Q%$`<5$qa6FSa_qbtPs2+pb(/[.>P`X,Ji/Aku/dj+=!P/MAVb9J2<Y\LW7_.<BW`7A'W&2_t?H1Z?$[P*QO<!It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/u2h*%%Y*dF&WUJ<9QAp@(Fc&/SR%9O^'<Ze,Djo6PR-tb)JJf2VKJS-$",-gHlLX:%S/V8GUbe=&!6eAsEkm(dp$d7FVZ$h'Q7I:~> +endstream +endobj +224 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 223 0 R +>> +endobj +225 0 obj +<< /Length 203 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Garp%]*cD?&;B(lTAif_$R`8BHYik^&0#%>Yu"";Kb:)o^QBY5+B&aI*53o'Z5+9M0a_s%(al/rj([^&'WaY5VALlT);Cm7oZ)<&l#1Vo9F-k,-]_a1rN<cMYTLGgXEMZ8[ERnsD&XfkA4I7G/.7m(^uR1+B[oRPq)A#5jA/q0%f4_7o!d<u6XBha-Q=D=Pn2m]/FYIY~> +endstream +endobj +226 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 225 0 R +>> +endobj +227 0 obj +<< /Length 1437 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +Gat$8gMYb(o\EjtFMNtH0dkh"a]jX75_lMX<b!fS0IS\f'9OT-PgfHs7uEO%b*Ll"JAH<FF2.;EC@UmK3.`SE=gY1EEO9#e-rrPLV$P":8gm4ZM,sN;YIi-"T%und8#ou3'ocV&/h!HF!$[Cn0`hY:"<1AnX(,(O]P[)3-)17Qh&<!:5p'33(P556.GSnc#,Bgm:+Uu>ac4s1MGgf+7=J!oBge+N5k7R*>!a'u;'MH'.%B'@b9T!GMlh*JO0@p2TRFF4f%s]K\t`q`ZQ03qJI$jh+9HRONPHpH4mlJ%oaXVnOAe]7i+<Y<Ihq]SqfL[/j#3>nOQOp!ANmgGR8Q-rTbp^i7sD6P]e'?A$?rY`m(Aem<q;-7Vr3$5@h/!k`aZ;m^k!RXGNKrb0&=(*.ehjo/%UhQS5Z7!9C%h!,?,G<NaR7h/#u"+a)R&ieFh3b+o$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F[jcRuMf49,S!A<_,\_U*6$q@,XQ@bYj["@G@CUcM(k`FinJjm!qitsesPHC_LhcKT?F5CKSi6+5MG1OEk!kH)7EZhS;.HN$T^qr(uR/@9Q1[m[3;!j<U;,o?G1B46XW[dA'VBXV3`Ls6KNH';ZS;X3k(Hq0kL#/sSLo(DF25+RCK7p@eI0LC*64'\i?ND&dVTkHc/JmW(_nT]_PhNt4_FL_u[$*u0TrDTMh>,H#ZQ/d6X.&eZ^.Mb'>a*oP7[7r<5gT&d\RHT>ujt8=/e%F>4'L]m[]bXanWf5TH>ZSi*@6c&Mg"SYU4JP8\Gc=Z_%;W9aKY-WP[^Z%E5E`-^<'MnV2+>-p=#"+4A*"D89(`'>Ic%hafBR8r,aT@hM[^i0Z0$$#M^MKDb6(+F"r)O66O8G@`XKVl_5^<$lum<T3fXig'P(@&`/58T3AL_]-9I6'EKA^>tmME@UEuM`YsbDJjS@lA\3^M93^De4?6EAQ/PW#PO_tV=tl*-pqkMkOY$Q#"GV$&3fj6?1-ag=k(As^J'>:--mC(fZ;4"VjC?JL1,mXi4D#=;Y%l@m9XT^,Y8W$q3S3[im<cKd^GolUc<C+Hqh4?S_Q1$kf38YZ[7pibQiD:UX_ZJAf/r2jI_F_=s5i(Rh[8f:0#=A\2q@`=B;VN;=mY>Cpr?8oC(a6VUq%B[h0*(:nJMl[#U^RD02)EnJU2u24Ym!&=9f3jY:#`7Bs'G3DZ6TYiG:^W</50dK<c7^s\aZjYQKp)Z5gW!:)rESU$]4gOtrrl(X@NY~> +endstream +endobj +236 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 235 0 R +/Annots 237 0 R +>> +endobj +237 0 obj +[ +238 0 R +239 0 R +240 0 R +241 0 R +242 0 R +243 0 R +244 0 R +] +endobj +238 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 352.0 687.572 373.66 677.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://uffi.b9.com) +/S /URI >> +/H /I +>> +endobj +239 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 381.047 687.572 451.607 677.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://uffi.b9.com) +/S /URI >> +/H /I +>> +endobj +240 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 532.89 676.572 564.57 666.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.sourceforge.net/projects/cclan) +/S /URI >> +/H /I +>> +endobj +241 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 571.85 676.572 586.29 666.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.sourceforge.net/projects/cclan) +/S /URI >> +/H /I +>> +endobj +242 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 120.0 665.572 280.52 655.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://www.sourceforge.net/projects/cclan) +/S /URI >> +/H /I +>> +endobj +243 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 178.61 654.572 194.16 644.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp) +/S /URI >> +/H /I +>> +endobj +244 0 obj +<< /Type /Annot +/Subtype /Link +/Rect [ 199.99 654.572 462.73 644.572 ] +/C [ 0 0 0 ] +/Border [ 0 0 0 ] +/A << /URI (http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/cclan/asdf/asdf.lisp) +/S /URI >> +/H /I +>> +endobj +245 0 obj +<< /Length 293 /Filter [ /ASCII85Decode /FlateDecode ] + >> +stream +GarnQ]2$6t']&^&GAN"?r-jS=&QCY6DnqH(8S'?1_$pKrO41H]6pb4_c9758]^t3e'Yl"u/&8WI_N?OFq(XQC.2_#?#n?k:YFDFBT$LF50&RcJF-:`1m>67-=V?*%$aAkSQ'/o9fVhMC`.<SG#Nk_oap*qg@msug8]%nhLGL2'+;Qqs&Q47>g%9VrFjO-`BDH52e$=>g;<H[Z78HC']T4612T5jkb5VIIuTAqPq_]Q7<U"JYW@X;*[uEC7lk+AEVS*I&Qgqq-1jYeA?aa.*Y^\iKTla*(pb~> +endstream +endobj +246 0 obj +<< /Type /Page +/Parent 1 0 R +/MediaBox [ 0 0 595 842 ] +/Resources 3 0 R +/Contents 245 0 R +>> +endobj +249 0 obj +<< + /Title (\376\377\0\125\0\106\0\106\0\111\0\40\0\122\0\145\0\146\0\145\0\162\0\145\0\156\0\143\0\145\0\40\0\107\0\165\0\151\0\144\0\145) + /Parent 247 0 R + /Next 251 0 R + /A 248 0 R +>> endobj +251 0 obj +<< + /Title (\376\377\0\124\0\141\0\142\0\154\0\145\0\40\0\157\0\146\0\40\0\103\0\157\0\156\0\164\0\145\0\156\0\164\0\163) + /Parent 247 0 R + /Prev 249 0 R + /Next 252 0 R + /A 250 0 R +>> endobj +252 0 obj +<< + /Title (\376\377\0\120\0\162\0\145\0\146\0\141\0\143\0\145) + /Parent 247 0 R + /Prev 251 0 R + /Next 253 0 R + /A 15 0 R +>> endobj +253 0 obj +<< + /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\61\0\56\0\240\0\111\0\156\0\164\0\162\0\157\0\144\0\165\0\143\0\164\0\151\0\157\0\156) + /Parent 247 0 R + /First 254 0 R + /Last 257 0 R + /Prev 252 0 R + /Next 260 0 R + /Count -6 + /A 17 0 R +>> endobj +254 0 obj +<< + /Title (\376\377\0\120\0\165\0\162\0\160\0\157\0\163\0\145) + /Parent 253 0 R + /Next 255 0 R + /A 19 0 R +>> endobj +255 0 obj +<< + /Title (\376\377\0\102\0\141\0\143\0\153\0\147\0\162\0\157\0\165\0\156\0\144) + /Parent 253 0 R + /Prev 254 0 R + /Next 256 0 R + /A 21 0 R +>> endobj +256 0 obj +<< + /Title (\376\377\0\123\0\165\0\160\0\160\0\157\0\162\0\164\0\145\0\144\0\40\0\111\0\155\0\160\0\154\0\145\0\155\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156\0\163) + /Parent 253 0 R + /Prev 255 0 R + /Next 257 0 R + /A 23 0 R +>> endobj +257 0 obj +<< + /Title (\376\377\0\104\0\145\0\163\0\151\0\147\0\156) + /Parent 253 0 R + /First 258 0 R + /Last 259 0 R + /Prev 256 0 R + /Count -2 + /A 25 0 R +>> endobj +258 0 obj +<< + /Title (\376\377\0\117\0\166\0\145\0\162\0\166\0\151\0\145\0\167) + /Parent 257 0 R + /Next 259 0 R + /A 27 0 R +>> endobj +259 0 obj +<< + /Title (\376\377\0\120\0\162\0\151\0\157\0\162\0\151\0\164\0\151\0\145\0\163) + /Parent 257 0 R + /Prev 258 0 R + /A 29 0 R +>> endobj +260 0 obj +<< + /Title (\376\377\0\103\0\150\0\141\0\160\0\164\0\145\0\162\0\240\0\62\0\56\0\240\0\120\0\162\0\157\0\147\0\162\0\141\0\155\0\155\0\151\0\156\0\147\0\40\0\116\0\157\0\164\0\145\0\163) + /Parent 247 0 R + /First 261 0 R + /Last 266 0 R + /Prev 253 0 R + /Next 269 0 R + /Count -8 + /A 31 0 R +>> endobj +261 0 obj +<< + /Title (\376\377\0\111\0\155\0\160\0\154\0\145\0\155\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156\0\40\0\123\0\160\0\145\0\143\0\151\0\146\0\151\0\143\0\40\0\116\0\157\0\164\0\145\0\163) + /Parent 260 0 R + /First 262 0 R + /Last 264 0 R + /Next 265 0 R + /Count -3 + /A 33 0 R +>> endobj +262 0 obj +<< + /Title (\376\377\0\101\0\154\0\154\0\145\0\147\0\162\0\157\0\103\0\114) + /Parent 261 0 R + /Next 263 0 R + /A 35 0 R +>> endobj +263 0 obj +<< + /Title (\376\377\0\114\0\151\0\163\0\160\0\167\0\157\0\162\0\153\0\163) + /Parent 261 0 R + /Prev 262 0 R + /Next 264 0 R + /A 37 0 R +>> endobj +264 0 obj +<< + /Title (\376\377\0\103\0\115\0\125\0\103\0\114) + /Parent 261 0 R + /Prev 263 0 R + /A 39 0 R +>> endobj +265 0 obj +<< + /Title (\376\377\0\106\0\157\0\162\0\145\0\151\0\147\0\156\0\40\0\117\0\142\0\152\0\145\0\143\0\164\0\40\0\122\0\145\0\160\0\162\0\145\0\163\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156\0\40\0\141\0\156\0\144\0\40\0\101\0\143\0\143\0\145\0\163\0\163) + /Parent 260 0 R + /Prev 261 0 R + /Next 266 0 R + /A 41 0 R +>> endobj +266 0 obj +<< + /Title (\376\377\0\117\0\160\0\164\0\151\0\155\0\151\0\172\0\151\0\156\0\147\0\40\0\103\0\157\0\144\0\145\0\40\0\125\0\163\0\151\0\156\0\147\0\40\0\125\0\106\0\106\0\111) + /Parent 260 0 R + /First 267 0 R + /Last 268 0 R + /Prev 265 0 R + /Count -2 + /A 43 0 R +>> endobj +267 0 obj +<< + /Title (\376\377\0\102\0\141\0\143\0\153\0\147\0\162\0\157\0\165\0\156\0\144) + /Parent 266 0 R + /Next 268 0 R + /A 45 0 R +>> endobj +268 0 obj +<< + /Title (\376\377\0\103\0\162\0\157\0\163\0\163\0\55\0\111\0\155\0\160\0\154\0\145\0\155\0\145\0\156\0\164\0\141\0\164\0\151\0\157\0\156\0\40\0\117\0\160\0\164\0\151\0\155\0\151\0\172\0\141\0\164\0\151\0\157\0\156) + /Parent 266 0 R + /Prev 267 0 R + /A 47 0 R +>> endobj +269 0 obj +<< + /Title (\376\377\0\104\0\145\0\143\0\154\0\141\0\162\0\141\0\164\0\151\0\157\0\156\0\163) + /Parent 247 0 R + /First 271 0 R + /Last 272 0 R + /Prev 260 0 R + /Next 273 0 R + /Count -2 + /A 49 0 R +>> endobj +271 0 obj +<< + /Title (\376\377\0\117\0\166\0\145\0\162\0\166\0\151\0\145\0\167) + /Parent 269 0 R + /Next 272 0 R + /A 270 0 R +>> endobj +272 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\164\0\171\0\160\0\145) + /Parent 269 0 R + /Prev 271 0 R + /A 51 0 R +>> endobj +273 0 obj +<< + /Title (\376\377\0\120\0\162\0\151\0\155\0\151\0\164\0\151\0\166\0\145\0\40\0\124\0\171\0\160\0\145\0\163) + /Parent 247 0 R + /First 274 0 R + /Last 276 0 R + /Prev 269 0 R + /Next 277 0 R + /Count -3 + /A 53 0 R +>> endobj +274 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\143\0\157\0\156\0\163\0\164\0\141\0\156\0\164) + /Parent 273 0 R + /Next 275 0 R + /A 55 0 R +>> endobj +275 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\164\0\171\0\160\0\145) + /Parent 273 0 R + /Prev 274 0 R + /Next 276 0 R + /A 57 0 R +>> endobj +276 0 obj +<< + /Title (\376\377\0\156\0\165\0\154\0\154\0\55\0\143\0\150\0\141\0\162\0\55\0\160) + /Parent 273 0 R + /Prev 275 0 R + /A 59 0 R +>> endobj +277 0 obj +<< + /Title (\376\377\0\101\0\147\0\147\0\162\0\145\0\147\0\141\0\164\0\145\0\40\0\124\0\171\0\160\0\145\0\163) + /Parent 247 0 R + /First 278 0 R + /Last 284 0 R + /Prev 273 0 R + /Next 285 0 R + /Count -7 + /A 61 0 R +>> endobj +278 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\145\0\156\0\165\0\155) + /Parent 277 0 R + /Next 279 0 R + /A 63 0 R +>> endobj +279 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\163\0\164\0\162\0\165\0\143\0\164) + /Parent 277 0 R + /Prev 278 0 R + /Next 280 0 R + /A 65 0 R +>> endobj +280 0 obj +<< + /Title (\376\377\0\147\0\145\0\164\0\55\0\163\0\154\0\157\0\164\0\55\0\166\0\141\0\154\0\165\0\145) + /Parent 277 0 R + /Prev 279 0 R + /Next 281 0 R + /A 67 0 R +>> endobj +281 0 obj +<< + /Title (\376\377\0\147\0\145\0\164\0\55\0\163\0\154\0\157\0\164\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162) + /Parent 277 0 R + /Prev 280 0 R + /Next 282 0 R + /A 69 0 R +>> endobj +282 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\141\0\162\0\162\0\141\0\171\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162) + /Parent 277 0 R + /Prev 281 0 R + /Next 283 0 R + /A 71 0 R +>> endobj +283 0 obj +<< + /Title (\376\377\0\144\0\145\0\162\0\145\0\146\0\55\0\141\0\162\0\162\0\141\0\171) + /Parent 277 0 R + /Prev 282 0 R + /Next 284 0 R + /A 73 0 R +>> endobj +284 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\165\0\156\0\151\0\157\0\156) + /Parent 277 0 R + /Prev 283 0 R + /A 75 0 R +>> endobj +285 0 obj +<< + /Title (\376\377\0\117\0\142\0\152\0\145\0\143\0\164\0\163) + /Parent 247 0 R + /First 286 0 R + /Last 298 0 R + /Prev 277 0 R + /Next 299 0 R + /Count -13 + /A 77 0 R +>> endobj +286 0 obj +<< + /Title (\376\377\0\141\0\154\0\154\0\157\0\143\0\141\0\164\0\145\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\157\0\142\0\152\0\145\0\143\0\164) + /Parent 285 0 R + /Next 287 0 R + /A 79 0 R +>> endobj +287 0 obj +<< + /Title (\376\377\0\146\0\162\0\145\0\145\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\157\0\142\0\152\0\145\0\143\0\164) + /Parent 285 0 R + /Prev 286 0 R + /Next 288 0 R + /A 81 0 R +>> endobj +288 0 obj +<< + /Title (\376\377\0\167\0\151\0\164\0\150\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\157\0\142\0\152\0\145\0\143\0\164) + /Parent 285 0 R + /Prev 287 0 R + /Next 289 0 R + /A 83 0 R +>> endobj +289 0 obj +<< + /Title (\376\377\0\163\0\151\0\172\0\145\0\55\0\157\0\146\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\164\0\171\0\160\0\145) + /Parent 285 0 R + /Prev 288 0 R + /Next 290 0 R + /A 85 0 R +>> endobj +290 0 obj +<< + /Title (\376\377\0\160\0\157\0\151\0\156\0\164\0\145\0\162\0\55\0\141\0\144\0\144\0\162\0\145\0\163\0\163) + /Parent 285 0 R + /Prev 289 0 R + /Next 291 0 R + /A 87 0 R +>> endobj +291 0 obj +<< + /Title (\376\377\0\144\0\145\0\162\0\145\0\146\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162) + /Parent 285 0 R + /Prev 290 0 R + /Next 292 0 R + /A 89 0 R +>> endobj +292 0 obj +<< + /Title (\376\377\0\145\0\156\0\163\0\165\0\162\0\145\0\55\0\143\0\150\0\141\0\162\0\55\0\143\0\150\0\141\0\162\0\141\0\143\0\164\0\145\0\162) + /Parent 285 0 R + /Prev 291 0 R + /Next 293 0 R + /A 91 0 R +>> endobj +293 0 obj +<< + /Title (\376\377\0\145\0\156\0\163\0\165\0\162\0\145\0\55\0\143\0\150\0\141\0\162\0\55\0\151\0\156\0\164\0\145\0\147\0\145\0\162) + /Parent 285 0 R + /Prev 292 0 R + /Next 294 0 R + /A 93 0 R +>> endobj +294 0 obj +<< + /Title (\376\377\0\155\0\141\0\153\0\145\0\55\0\156\0\165\0\154\0\154\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162) + /Parent 285 0 R + /Prev 293 0 R + /Next 295 0 R + /A 95 0 R +>> endobj +295 0 obj +<< + /Title (\376\377\0\156\0\165\0\154\0\154\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162\0\55\0\160) + /Parent 285 0 R + /Prev 294 0 R + /Next 296 0 R + /A 97 0 R +>> endobj +296 0 obj +<< + /Title (\376\377\0\53\0\156\0\165\0\154\0\154\0\55\0\143\0\163\0\164\0\162\0\151\0\156\0\147\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162\0\53) + /Parent 285 0 R + /Prev 295 0 R + /Next 297 0 R + /A 99 0 R +>> endobj +297 0 obj +<< + /Title (\376\377\0\167\0\151\0\164\0\150\0\55\0\143\0\141\0\163\0\164\0\55\0\160\0\157\0\151\0\156\0\164\0\145\0\162) + /Parent 285 0 R + /Prev 296 0 R + /Next 298 0 R + /A 101 0 R +>> endobj +298 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\166\0\141\0\162) + /Parent 285 0 R + /Prev 297 0 R + /A 103 0 R +>> endobj +299 0 obj +<< + /Title (\376\377\0\123\0\164\0\162\0\151\0\156\0\147\0\163) + /Parent 247 0 R + /First 300 0 R + /Last 306 0 R + /Prev 285 0 R + /Next 307 0 R + /Count -7 + /A 105 0 R +>> endobj +300 0 obj +<< + /Title (\376\377\0\143\0\157\0\156\0\166\0\145\0\162\0\164\0\55\0\146\0\162\0\157\0\155\0\55\0\143\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Next 301 0 R + /A 107 0 R +>> endobj +301 0 obj +<< + /Title (\376\377\0\143\0\157\0\156\0\166\0\145\0\162\0\164\0\55\0\164\0\157\0\55\0\143\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 300 0 R + /Next 302 0 R + /A 109 0 R +>> endobj +302 0 obj +<< + /Title (\376\377\0\146\0\162\0\145\0\145\0\55\0\143\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 301 0 R + /Next 303 0 R + /A 111 0 R +>> endobj +303 0 obj +<< + /Title (\376\377\0\167\0\151\0\164\0\150\0\55\0\143\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 302 0 R + /Next 304 0 R + /A 113 0 R +>> endobj +304 0 obj +<< + /Title (\376\377\0\143\0\157\0\156\0\166\0\145\0\162\0\164\0\55\0\146\0\162\0\157\0\155\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 303 0 R + /Next 305 0 R + /A 115 0 R +>> endobj +305 0 obj +<< + /Title (\376\377\0\143\0\157\0\156\0\166\0\145\0\162\0\164\0\55\0\164\0\157\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 304 0 R + /Next 306 0 R + /A 117 0 R +>> endobj +306 0 obj +<< + /Title (\376\377\0\141\0\154\0\154\0\157\0\143\0\141\0\164\0\145\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\163\0\164\0\162\0\151\0\156\0\147) + /Parent 299 0 R + /Prev 305 0 R + /A 119 0 R +>> endobj +307 0 obj +<< + /Title (\376\377\0\106\0\165\0\156\0\143\0\164\0\151\0\157\0\156\0\163\0\40\0\46\0\40\0\114\0\151\0\142\0\162\0\141\0\162\0\151\0\145\0\163) + /Parent 247 0 R + /First 308 0 R + /Last 310 0 R + /Prev 299 0 R + /Next 311 0 R + /Count -3 + /A 121 0 R +>> endobj +308 0 obj +<< + /Title (\376\377\0\144\0\145\0\146\0\55\0\146\0\165\0\156\0\143\0\164\0\151\0\157\0\156) + /Parent 307 0 R + /Next 309 0 R + /A 123 0 R +>> endobj +309 0 obj +<< + /Title (\376\377\0\154\0\157\0\141\0\144\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\154\0\151\0\142\0\162\0\141\0\162\0\171) + /Parent 307 0 R + /Prev 308 0 R + /Next 310 0 R + /A 125 0 R +>> endobj +310 0 obj +<< + /Title (\376\377\0\146\0\151\0\156\0\144\0\55\0\146\0\157\0\162\0\145\0\151\0\147\0\156\0\55\0\154\0\151\0\142\0\162\0\141\0\162\0\171) + /Parent 307 0 R + /Prev 309 0 R + /A 127 0 R +>> endobj +311 0 obj +<< + /Title (\376\377\0\101\0\160\0\160\0\145\0\156\0\144\0\151\0\170\0\240\0\101\0\56\0\240\0\111\0\156\0\163\0\164\0\141\0\154\0\154\0\141\0\164\0\151\0\157\0\156) + /Parent 247 0 R + /First 312 0 R + /Last 313 0 R + /Prev 307 0 R + /Next 314 0 R + /Count -2 + /A 132 0 R +>> endobj +312 0 obj +<< + /Title (\376\377\0\104\0\157\0\167\0\156\0\154\0\157\0\141\0\144\0\40\0\125\0\106\0\106\0\111) + /Parent 311 0 R + /Next 313 0 R + /A 134 0 R +>> endobj +313 0 obj +<< + /Title (\376\377\0\114\0\157\0\141\0\144\0\151\0\156\0\147) + /Parent 311 0 R + /Prev 312 0 R + /A 136 0 R +>> endobj +314 0 obj +<< + /Title (\376\377\0\107\0\154\0\157\0\163\0\163\0\141\0\162\0\171) + /Parent 247 0 R + /Prev 311 0 R + /A 138 0 R +>> endobj +315 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F3 +/BaseFont /Helvetica-Bold +/Encoding /WinAnsiEncoding >> +endobj +316 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F5 +/BaseFont /Times-Roman +/Encoding /WinAnsiEncoding >> +endobj +317 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F10 +/BaseFont /Courier-Oblique +/Encoding /WinAnsiEncoding >> +endobj +318 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F1 +/BaseFont /Helvetica +/Encoding /WinAnsiEncoding >> +endobj +319 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F6 +/BaseFont /Times-Italic +/Encoding /WinAnsiEncoding >> +endobj +320 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F4 +/BaseFont /Helvetica-BoldOblique +/Encoding /WinAnsiEncoding >> +endobj +321 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F9 +/BaseFont /Courier +/Encoding /WinAnsiEncoding >> +endobj +322 0 obj +<< /Type /Font +/Subtype /Type1 +/Name /F7 +/BaseFont /Times-Bold +/Encoding /WinAnsiEncoding >> +endobj +1 0 obj +<< /Type /Pages +/Count 55 +/Kids [6 0 R 8 0 R 10 0 R 12 0 R 129 0 R 140 0 R 142 0 R 144 0 R 146 0 R 148 0 R 150 0 R 152 0 R 154 0 R 156 0 R 158 0 R 160 0 R 162 0 R 164 0 R 166 0 R 168 0 R 170 0 R 172 0 R 174 0 R 176 0 R 178 0 R 180 0 R 182 0 R 184 0 R 186 0 R 188 0 R 190 0 R 192 0 R 194 0 R 196 0 R 198 0 R 200 0 R 202 0 R 204 0 R 206 0 R 208 0 R 210 0 R 212 0 R 214 0 R 216 0 R 218 0 R 220 0 R 222 0 R 224 0 R 226 0 R 228 0 R 230 0 R 232 0 R 234 0 R 236 0 R 246 0 R ] >> +endobj +2 0 obj +<< /Type /Catalog +/Pages 1 0 R + /Outlines 247 0 R + /PageMode /UseOutlines + /Names << /Dests << /Names [ (preface) [ 140 0 R /XYZ 115.0 774.889 null ] (introduction) [ 142 0 R /XYZ 115.0 774.889 null ] (notes) [ 146 0 R /XYZ 115.0 774.889 null ] (ref_declarations) [ 150 0 R /XYZ 115.0 774.889 null ] (primitives) [ 154 0 R /XYZ 115.0 774.889 null ] (aggregates) [ 162 0 R /XYZ 115.0 774.889 null ] (objects) [ 178 0 R /XYZ 115.0 774.889 null ] (strings) [ 208 0 R /XYZ 115.0 774.889 null ] (func_libr) [ 226 0 R /XYZ 115.0 774.889 null ] (installation) [ 236 0 R /XYZ 115.0 774.889 null ] (glossary) [ 246 0 R /XYZ 115.0 774.889 null ] (id2463880) [ 10 0 R /XYZ 115.0 774.889 null ] ] >> >> + >> +endobj +3 0 obj +<< +/Font << /F3 315 0 R /F5 316 0 R /F10 317 0 R /F6 319 0 R /F1 318 0 R /F4 320 0 R /F9 321 0 R /F7 322 0 R >> +/ProcSet [ /PDF /ImageC /Text ] >> +endobj +15 0 obj +<< +/S /GoTo +/D [140 0 R /XYZ 115.0 774.889 null] +>> +endobj +17 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 774.889 null] +>> +endobj +19 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 736.898 null] +>> +endobj +21 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 671.572 null] +>> +endobj +23 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 509.246 null] +>> +endobj +25 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 246.92 null] +>> +endobj +27 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 213.594 null] +>> +endobj +29 0 obj +<< +/S /GoTo +/D [142 0 R /XYZ 115.0 130.155 null] +>> +endobj +31 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 774.889 null] +>> +endobj +33 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 736.898 null] +>> +endobj +35 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 693.572 null] +>> +endobj +37 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 654.133 null] +>> +endobj +39 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 614.694 null] +>> +endobj +41 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 575.255 null] +>> +endobj +43 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 443.929 null] +>> +endobj +45 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 410.603 null] +>> +endobj +47 0 obj +<< +/S /GoTo +/D [146 0 R /XYZ 115.0 252.164 null] +>> +endobj +49 0 obj +<< +/S /GoTo +/D [150 0 R /XYZ 115.0 774.889 null] +>> +endobj +51 0 obj +<< +/S /GoTo +/D [152 0 R /XYZ 115.0 774.889 null] +>> +endobj +53 0 obj +<< +/S /GoTo +/D [154 0 R /XYZ 115.0 774.889 null] +>> +endobj +55 0 obj +<< +/S /GoTo +/D [156 0 R /XYZ 115.0 774.889 null] +>> +endobj +57 0 obj +<< +/S /GoTo +/D [158 0 R /XYZ 115.0 774.889 null] +>> +endobj +59 0 obj +<< +/S /GoTo +/D [160 0 R /XYZ 115.0 774.889 null] +>> +endobj +61 0 obj +<< +/S /GoTo +/D [162 0 R /XYZ 115.0 774.889 null] +>> +endobj +63 0 obj +<< +/S /GoTo +/D [164 0 R /XYZ 115.0 774.889 null] +>> +endobj +65 0 obj +<< +/S /GoTo +/D [166 0 R /XYZ 115.0 774.889 null] +>> +endobj +67 0 obj +<< +/S /GoTo +/D [168 0 R /XYZ 115.0 774.889 null] +>> +endobj +69 0 obj +<< +/S /GoTo +/D [170 0 R /XYZ 115.0 774.889 null] +>> +endobj +71 0 obj +<< +/S /GoTo +/D [172 0 R /XYZ 115.0 774.889 null] +>> +endobj +73 0 obj +<< +/S /GoTo +/D [174 0 R /XYZ 115.0 774.889 null] +>> +endobj +75 0 obj +<< +/S /GoTo +/D [176 0 R /XYZ 115.0 774.889 null] +>> +endobj +77 0 obj +<< +/S /GoTo +/D [178 0 R /XYZ 115.0 774.889 null] +>> +endobj +79 0 obj +<< +/S /GoTo +/D [180 0 R /XYZ 115.0 774.889 null] +>> +endobj +81 0 obj +<< +/S /GoTo +/D [182 0 R /XYZ 115.0 774.889 null] +>> +endobj +83 0 obj +<< +/S /GoTo +/D [184 0 R /XYZ 115.0 774.889 null] +>> +endobj +85 0 obj +<< +/S /GoTo +/D [186 0 R /XYZ 115.0 774.889 null] +>> +endobj +87 0 obj +<< +/S /GoTo +/D [188 0 R /XYZ 115.0 774.889 null] +>> +endobj +89 0 obj +<< +/S /GoTo +/D [190 0 R /XYZ 115.0 774.889 null] +>> +endobj +91 0 obj +<< +/S /GoTo +/D [192 0 R /XYZ 115.0 774.889 null] +>> +endobj +93 0 obj +<< +/S /GoTo +/D [194 0 R /XYZ 115.0 774.889 null] +>> +endobj +95 0 obj +<< +/S /GoTo +/D [196 0 R /XYZ 115.0 774.889 null] +>> +endobj +97 0 obj +<< +/S /GoTo +/D [198 0 R /XYZ 115.0 774.889 null] +>> +endobj +99 0 obj +<< +/S /GoTo +/D [200 0 R /XYZ 115.0 774.889 null] +>> +endobj +101 0 obj +<< +/S /GoTo +/D [202 0 R /XYZ 115.0 774.889 null] +>> +endobj +103 0 obj +<< +/S /GoTo +/D [204 0 R /XYZ 115.0 774.889 null] +>> +endobj +105 0 obj +<< +/S /GoTo +/D [208 0 R /XYZ 115.0 774.889 null] +>> +endobj +107 0 obj +<< +/S /GoTo +/D [212 0 R /XYZ 115.0 774.889 null] +>> +endobj +109 0 obj +<< +/S /GoTo +/D [214 0 R /XYZ 115.0 774.889 null] +>> +endobj +111 0 obj +<< +/S /GoTo +/D [216 0 R /XYZ 115.0 774.889 null] +>> +endobj +113 0 obj +<< +/S /GoTo +/D [218 0 R /XYZ 115.0 774.889 null] +>> +endobj +115 0 obj +<< +/S /GoTo +/D [220 0 R /XYZ 115.0 774.889 null] +>> +endobj +117 0 obj +<< +/S /GoTo +/D [222 0 R /XYZ 115.0 774.889 null] +>> +endobj +119 0 obj +<< +/S /GoTo +/D [224 0 R /XYZ 115.0 774.889 null] +>> +endobj +121 0 obj +<< +/S /GoTo +/D [226 0 R /XYZ 115.0 774.889 null] +>> +endobj +123 0 obj +<< +/S /GoTo +/D [228 0 R /XYZ 115.0 774.889 null] +>> +endobj +125 0 obj +<< +/S /GoTo +/D [230 0 R /XYZ 115.0 774.889 null] +>> +endobj +127 0 obj +<< +/S /GoTo +/D [234 0 R /XYZ 115.0 774.889 null] +>> +endobj +132 0 obj +<< +/S /GoTo +/D [236 0 R /XYZ 115.0 774.889 null] +>> +endobj +134 0 obj +<< +/S /GoTo +/D [236 0 R /XYZ 115.0 736.898 null] +>> +endobj +136 0 obj +<< +/S /GoTo +/D [236 0 R /XYZ 115.0 649.572 null] +>> +endobj +138 0 obj +<< +/S /GoTo +/D [246 0 R /XYZ 115.0 774.889 null] +>> +endobj +247 0 obj +<< + /First 249 0 R + /Last 314 0 R +>> endobj +248 0 obj +<< +/S /GoTo +/D [10 0 R /XYZ 115.0 774.889 null] +>> +endobj +250 0 obj +<< +/S /GoTo +/D [12 0 R /XYZ 115.0 764.889 null] +>> +endobj +270 0 obj +<< +/S /GoTo +/D [150 0 R /XYZ 115.0 728.236 null] +>> +endobj +xref +0 323 +0000000000 65535 f +0000085208 00000 n +0000085695 00000 n +0000086406 00000 n +0000000015 00000 n +0000000071 00000 n +0000000363 00000 n +0000000469 00000 n +0000001525 00000 n +0000001631 00000 n +0000001802 00000 n +0000001909 00000 n +0000004069 00000 n +0000004192 00000 n +0000004625 00000 n +0000086571 00000 n +0000004759 00000 n +0000086639 00000 n +0000004893 00000 n +0000086707 00000 n +0000005027 00000 n +0000086775 00000 n +0000005161 00000 n +0000086843 00000 n +0000005295 00000 n +0000086911 00000 n +0000005429 00000 n +0000086978 00000 n +0000005563 00000 n +0000087046 00000 n +0000005697 00000 n +0000087114 00000 n +0000005831 00000 n +0000087182 00000 n +0000005965 00000 n +0000087250 00000 n +0000006099 00000 n +0000087318 00000 n +0000006233 00000 n +0000087386 00000 n +0000006367 00000 n +0000087454 00000 n +0000006501 00000 n +0000087522 00000 n +0000006635 00000 n +0000087590 00000 n +0000006769 00000 n +0000087658 00000 n +0000006903 00000 n +0000087726 00000 n +0000007037 00000 n +0000087794 00000 n +0000007171 00000 n +0000087862 00000 n +0000007305 00000 n +0000087930 00000 n +0000007439 00000 n +0000087998 00000 n +0000007573 00000 n +0000088066 00000 n +0000007707 00000 n +0000088134 00000 n +0000007841 00000 n +0000088202 00000 n +0000007975 00000 n +0000088270 00000 n +0000008109 00000 n +0000088338 00000 n +0000008243 00000 n +0000088406 00000 n +0000008377 00000 n +0000088474 00000 n +0000008510 00000 n +0000088542 00000 n +0000008644 00000 n +0000088610 00000 n +0000008778 00000 n +0000088678 00000 n +0000008911 00000 n +0000088746 00000 n +0000009045 00000 n +0000088814 00000 n +0000009179 00000 n +0000088882 00000 n +0000009313 00000 n +0000088950 00000 n +0000009447 00000 n +0000089018 00000 n +0000009581 00000 n +0000089086 00000 n +0000009714 00000 n +0000089154 00000 n +0000009848 00000 n +0000089222 00000 n +0000009982 00000 n +0000089290 00000 n +0000010116 00000 n +0000089358 00000 n +0000010250 00000 n +0000089426 00000 n +0000010384 00000 n +0000089494 00000 n +0000010520 00000 n +0000089563 00000 n +0000010656 00000 n +0000089632 00000 n +0000010792 00000 n +0000089701 00000 n +0000010928 00000 n +0000089770 00000 n +0000011064 00000 n +0000089839 00000 n +0000011200 00000 n +0000089908 00000 n +0000011336 00000 n +0000089977 00000 n +0000011472 00000 n +0000090046 00000 n +0000011608 00000 n +0000090115 00000 n +0000011744 00000 n +0000090184 00000 n +0000011880 00000 n +0000090253 00000 n +0000012016 00000 n +0000090322 00000 n +0000012150 00000 n +0000090391 00000 n +0000012284 00000 n +0000012772 00000 n +0000012898 00000 n +0000012951 00000 n +0000090460 00000 n +0000013089 00000 n +0000090529 00000 n +0000013227 00000 n +0000090598 00000 n +0000013365 00000 n +0000090667 00000 n +0000013503 00000 n +0000014186 00000 n +0000014296 00000 n +0000016420 00000 n +0000016530 00000 n +0000017619 00000 n +0000017729 00000 n +0000020274 00000 n +0000020384 00000 n +0000020779 00000 n +0000020889 00000 n +0000021450 00000 n +0000021560 00000 n +0000022473 00000 n +0000022583 00000 n +0000023923 00000 n +0000024033 00000 n +0000025087 00000 n +0000025197 00000 n +0000026036 00000 n +0000026146 00000 n +0000027352 00000 n +0000027462 00000 n +0000027848 00000 n +0000027958 00000 n +0000029818 00000 n +0000029928 00000 n +0000031064 00000 n +0000031174 00000 n +0000032120 00000 n +0000032230 00000 n +0000033141 00000 n +0000033251 00000 n +0000034014 00000 n +0000034124 00000 n +0000035361 00000 n +0000035471 00000 n +0000036452 00000 n +0000036562 00000 n +0000036960 00000 n +0000037070 00000 n +0000038119 00000 n +0000038229 00000 n +0000038919 00000 n +0000039029 00000 n +0000040389 00000 n +0000040499 00000 n +0000041409 00000 n +0000041519 00000 n +0000042223 00000 n +0000042333 00000 n +0000043487 00000 n +0000043597 00000 n +0000044763 00000 n +0000044873 00000 n +0000045978 00000 n +0000046088 00000 n +0000046872 00000 n +0000046982 00000 n +0000047731 00000 n +0000047841 00000 n +0000048372 00000 n +0000048482 00000 n +0000050183 00000 n +0000050293 00000 n +0000051885 00000 n +0000051995 00000 n +0000052564 00000 n +0000052674 00000 n +0000054966 00000 n +0000055076 00000 n +0000055332 00000 n +0000055442 00000 n +0000056246 00000 n +0000056356 00000 n +0000057164 00000 n +0000057274 00000 n +0000058020 00000 n +0000058130 00000 n +0000059272 00000 n +0000059382 00000 n +0000060465 00000 n +0000060575 00000 n +0000061335 00000 n +0000061445 00000 n +0000062425 00000 n +0000062535 00000 n +0000062831 00000 n +0000062941 00000 n +0000064472 00000 n +0000064582 00000 n +0000066453 00000 n +0000066563 00000 n +0000066913 00000 n +0000067023 00000 n +0000068445 00000 n +0000068555 00000 n +0000069715 00000 n +0000069841 00000 n +0000069918 00000 n +0000070088 00000 n +0000070261 00000 n +0000070455 00000 n +0000070649 00000 n +0000070842 00000 n +0000071062 00000 n +0000071282 00000 n +0000071668 00000 n +0000090736 00000 n +0000090790 00000 n +0000071778 00000 n +0000090858 00000 n +0000071982 00000 n +0000072183 00000 n +0000072325 00000 n +0000072603 00000 n +0000072730 00000 n +0000072890 00000 n +0000073139 00000 n +0000073302 00000 n +0000073435 00000 n +0000073580 00000 n +0000073887 00000 n +0000074186 00000 n +0000074325 00000 n +0000074479 00000 n +0000074594 00000 n +0000074930 00000 n +0000075210 00000 n +0000075355 00000 n +0000075636 00000 n +0000090926 00000 n +0000075850 00000 n +0000075984 00000 n +0000076116 00000 n +0000076347 00000 n +0000076503 00000 n +0000076697 00000 n +0000076846 00000 n +0000077077 00000 n +0000077209 00000 n +0000077368 00000 n +0000077550 00000 n +0000077744 00000 n +0000077944 00000 n +0000078109 00000 n +0000078247 00000 n +0000078432 00000 n +0000078653 00000 n +0000078865 00000 n +0000079077 00000 n +0000079294 00000 n +0000079483 00000 n +0000079660 00000 n +0000079884 00000 n +0000080096 00000 n +0000080296 00000 n +0000080478 00000 n +0000080706 00000 n +0000080907 00000 n +0000081081 00000 n +0000081266 00000 n +0000081470 00000 n +0000081677 00000 n +0000081849 00000 n +0000082021 00000 n +0000082281 00000 n +0000082529 00000 n +0000082751 00000 n +0000083017 00000 n +0000083174 00000 n +0000083393 00000 n +0000083597 00000 n +0000083883 00000 n +0000084046 00000 n +0000084174 00000 n +0000084308 00000 n +0000084422 00000 n +0000084533 00000 n +0000084649 00000 n +0000084758 00000 n +0000084870 00000 n +0000084991 00000 n +0000085098 00000 n +trailer +<< +/Size 323 +/Root 2 0 R +/Info 4 0 R +>> +startxref +90995 +%%EOF
Added: branches/trunk-reorg/thirdparty/uffi/doc/uffi.xml ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/uffi.xml Mon Feb 11 09:06:27 2008 @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="utf-8"?> +<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.2//EN" + "http://www.oasis-open.org/docbook/xml/4.2/docbookx.dtd" [ +<!ENTITY % myents SYSTEM "entities.inc"> +<!ENTITY % xinclude SYSTEM "xinclude.mod"> +%myents; +%xinclude; +]> + + +<book lang="en"> + <xi:include href="bookinfo.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="preface.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="intro.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="notes.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_declare.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_primitive.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_aggregate.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_object.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_string.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="ref_func_libr.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="appendix.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> + <xi:include href="glossary.xml" xmlns:xi="http://www.w3.org/2001/XInclude" /> +</book>
Added: branches/trunk-reorg/thirdparty/uffi/doc/xinclude.mod ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/doc/xinclude.mod Mon Feb 11 09:06:27 2008 @@ -0,0 +1,24 @@ +<!ELEMENT xi:include (xi:fallback?) > +<!ATTLIST xi:include + xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" + href CDATA #REQUIRED + parse (xml|text) "xml" + encoding CDATA #IMPLIED > + +<!ELEMENT xi:fallback ANY> +<!ATTLIST xi:fallback + xmlns:xi CDATA #FIXED "http://www.w3.org/2001/XInclude" > + +<!ENTITY % local.book.class "| xi:include"> + +<!-- inside book elements --> +<!ENTITY % local.chapter.class "| xi:include"> +<!-- inside chapter or section elements --> +<!ENTITY % local.divcomponent.mix "| xi:include"> +<!-- inside para, programlisting, literallayout, etc. --> +<!ENTITY % local.para.char.mix "| xi:include"> +<!-- inside bookinfo, chapterinfo, etc. --> +<!ENTITY % local.info.class "| xi:include"> + +<!-- used for xml:base in docbook 4.2 and prior --> +<!ENTITY % local.common.attrib "xml:base CDATA #IMPLIED">
Added: branches/trunk-reorg/thirdparty/uffi/examples/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,45 @@ +# FILE IDENTIFICATION +# +# Name: Makefile +# Purpose: Makefile for UFFI examples +# Programer: Kevin M. Rosenberg +# Date Started: Mar 2002 +# +# CVS Id: $Id$ +# +# This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +# + +SUBDIRS:= + +include ../Makefile.common + +.PHONY: distclean +distclean: clean + + +base=c-test-fns +source=$(base).c +object=$(base).o +shared_lib=$(base).so + +.PHONY: all +all: $(shared_lib) + +linux: $(source) Makefile + gcc -fPIC -DPIC -c $(source) -o $(object) + gcc -shared $(object) -o $(shared_lib) + rm $(object) + +mac: + cc -dynamic -c $(source) -o $(object) + ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $(base).dylib $(object) + ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib + +solaris: + cc -KPIC -c $(source) -o $(object) + cc -G $(object) -o $(shared_lib) + +aix-acl: + gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $(source) + make_shared -o $(shared_lib) $(object)
Added: branches/trunk-reorg/thirdparty/uffi/examples/Makefile.msvc ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/Makefile.msvc Mon Feb 11 09:06:27 2008 @@ -0,0 +1,27 @@ +# FILE IDENTIFICATION +# +# Name: Makefile.msvc +# Purpose: Makefile for the CLSQL UFFI helper package (MSVC) +# Programer: Kevin M. Rosenberg +# Date Started: Mar 2002 +# +# CVS Id: $Id: Makefile.msvc,v 1.1 2002/03/23 10:26:03 kevin Exp $ +# +# This file, part of CLSQL, is Copyright (c) 2002-2005 by Kevin M. Rosenberg + +BASE=c-test-fns + +# Nothing to configure beyond here + +SRC=$(BASE).c +OBJ=$(BASE).obj +DLL=$(BASE).dll + +$(DLL): $(SRC) + cl /MD /LD -D_MT /DWIN32=1 $(SRC) + del $(OBJ) $(BASE).exp + +clean: + del /q $(DLL) + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/acl-compat-tester.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/acl-compat-tester.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,600 @@ +;; tester.cl +;; A test harness for Allegro CL. +;; +;; copyright (c) 1985-1986 Franz Inc, Alameda, CA +;; copyright (c) 1986-2001 Franz Inc, Berkeley, CA - All rights reserved. +;; +;; This code is free software; you can redistribute it and/or +;; modify it under the terms of the version 2.1 of +;; the GNU Lesser General Public License as published by +;; the Free Software Foundation, as clarified by the Franz +;; preamble to the LGPL found in +;; http://opensource.franz.com/preamble.html. +;; +;; This code 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 GNU +;; Lesser General Public License for more details. +;; +;; Version 2.1 of the GNU Lesser General Public License can be +;; found at http://opensource.franz.com/license.html. +;; If it is not present, you can access it from +;; http://www.gnu.org/copyleft/lesser.txt (until superseded by a newer +;; version) or write to the Free Software Foundation, Inc., 59 Temple +;; Place, Suite 330, Boston, MA 02111-1307 USA +;; +;;;; from the original ACL 6.1 sources: +;; $Id$ + + +(defpackage :util.test + (:use :common-lisp) + (:shadow #:test) + (:export +;;;; Control variables: + #:*break-on-test-failures* + #:*error-protect-tests* + #:*test-errors* + #:*test-successes* + #:*test-unexpected-failures* + +;;;; The test macros: + #:test + #:test-error + #:test-no-error + #:test-warning + #:test-no-warning + + #:with-tests + )) + +(in-package :util.test) + +#+cmu +(unless (find-class 'break nil) + (define-condition break (simple-condition) ())) + +(define-condition simple-break (error simple-condition) ()) + +;; the if* macro used in Allegro: +;; +;; This is in the public domain... please feel free to put this definition +;; in your code or distribute it with your version of lisp. + +(eval-when (:compile-toplevel :load-toplevel :execute) + (defvar if*-keyword-list '("then" "thenret" "else" "elseif"))) + +(defmacro if* (&rest args) + (do ((xx (reverse args) (cdr xx)) + (state :init) + (elseseen nil) + (totalcol nil) + (lookat nil nil) + (col nil)) + ((null xx) + (cond ((eq state :compl) + `(cond ,@totalcol)) + (t (error "if*: illegal form ~s" args)))) + (cond ((and (symbolp (car xx)) + (member (symbol-name (car xx)) + if*-keyword-list + :test #'string-equal)) + (setq lookat (symbol-name (car xx))))) + + (cond ((eq state :init) + (cond (lookat (cond ((string-equal lookat "thenret") + (setq col nil + state :then)) + (t (error + "if*: bad keyword ~a" lookat)))) + (t (setq state :col + col nil) + (push (car xx) col)))) + ((eq state :col) + (cond (lookat + (cond ((string-equal lookat "else") + (cond (elseseen + (error + "if*: multiples elses"))) + (setq elseseen t) + (setq state :init) + (push `(t ,@col) totalcol)) + ((string-equal lookat "then") + (setq state :then)) + (t (error "if*: bad keyword ~s" + lookat)))) + (t (push (car xx) col)))) + ((eq state :then) + (cond (lookat + (error + "if*: keyword ~s at the wrong place " (car xx))) + (t (setq state :compl) + (push `(,(car xx) ,@col) totalcol)))) + ((eq state :compl) + (cond ((not (string-equal lookat "elseif")) + (error "if*: missing elseif clause "))) + (setq state :init))))) + + + + +(defvar *break-on-test-failures* nil + "When a test failure occurs, common-lisp:break is called, allowing +interactive debugging of the failure.") + +(defvar *test-errors* 0 + "The value is the number of test errors which have occurred.") +(defvar *test-successes* 0 + "The value is the number of test successes which have occurred.") +(defvar *test-unexpected-failures* 0 + "The value is the number of unexpected test failures which have occurred.") + +(defvar *error-protect-tests* nil + "Protect each test from errors. If an error occurs, then that will be +taken as a test failure unless test-error is being used.") + +(defmacro test-values-errorset (form &optional announce catch-breaks) + ;; internal macro + (let ((g-announce (gensym)) + (g-catch-breaks (gensym))) + `(let* ((,g-announce ,announce) + (,g-catch-breaks ,catch-breaks)) + (handler-case (cons t (multiple-value-list ,form)) + (condition (condition) + (if* (and (null ,g-catch-breaks) + (typep condition 'simple-break)) + then (break condition) + elseif ,g-announce + then (format *error-output* "~&Condition type: ~a~%" + (class-of condition)) + (format *error-output* "~&Message: ~a~%" condition)) + condition))))) + +(defmacro test-values (form &optional announce catch-breaks) + ;; internal macro + (if* *error-protect-tests* + then `(test-values-errorset ,form ,announce ,catch-breaks) + else `(cons t (multiple-value-list ,form)))) + +(defmacro test (expected-value test-form + &key (test #'eql test-given) + (multiple-values nil multiple-values-given) + (fail-info nil fail-info-given) + (known-failure nil known-failure-given) + +;;;;;;;;;; internal, undocumented keywords: +;;;; Note about these keywords: if they were documented, we'd have a +;;;; problem, since they break the left-to-right order of evaluation. +;;;; Specifically, errorset breaks it, and I don't see any way around +;;;; that. `errorset' is used by the old test.cl module (eg, +;;;; test-equal-errorset). + errorset + reported-form + (wanted-message nil wanted-message-given) + (got-message nil got-message-given)) + "Perform a single test. `expected-value' is the reference value for the +test. `test-form' is a form that will produce the value to be compared to +the expected-value. If the values are not the same, then an error is +logged, otherwise a success is logged. + +Normally the comparison of values is done with `eql'. The `test' keyword +argument can be used to specify other comparison functions, such as eq, +equal,equalp, string=, string-equal, etc. + +Normally, only the first return value from the test-form is considered, +however if `multiple-values' is t, then all values returned from test-form +are considered. + +`fail-info' allows more information to be printed with a test failure. + +`known-failure' marks the test as a known failure. This allows for +programs that do regression analysis on the output from a test run to +discriminate on new versus known failures." + `(test-check + :expected-result ,expected-value + :test-results + (,(if errorset 'test-values-errorset 'test-values) ,test-form t) + ,@(when test-given `(:predicate ,test)) + ,@(when multiple-values-given `(:multiple-values ,multiple-values)) + ,@(when fail-info-given `(:fail-info ,fail-info)) + ,@(when known-failure-given `(:known-failure ,known-failure)) + :test-form ',(if reported-form reported-form test-form) + ,@(when wanted-message-given `(:wanted-message ,wanted-message)) + ,@(when got-message-given `(:got-message ,got-message)))) + +(defmethod conditionp ((thing condition)) t) +(defmethod conditionp ((thing t)) nil) + +(defmacro test-error (form &key announce + catch-breaks + (fail-info nil fail-info-given) + (known-failure nil known-failure-given) + (condition-type ''simple-error) + (include-subtypes nil include-subtypes-given) + (format-control nil format-control-given) + (format-arguments nil format-arguments-given)) + "Test that `form' signals an error. The order of evaluation of the +arguments is keywords first, then test form. + +If `announce' is non-nil, then cause the error message to be printed. + +The `catch-breaks' is non-nil then consider a call to common-lisp:break an +`error'. + +`fail-info' allows more information to be printed with a test failure. + +`known-failure' marks the test as a known failure. This allows for +programs that do regression analysis on the output from a test run to +discriminate on new versus known failures. + +If `condition-type' is non-nil, it should be a symbol naming a condition +type, which is used to check against the signalled condition type. The +test will fail if they do not match. + +`include-subtypes', used with `condition-type', can be used to match a +condition to an entire subclass of the condition type hierarchy. + +`format-control' and `format-arguments' can be used to check the error +message itself." + (let ((g-announce (gensym)) + (g-catch-breaks (gensym)) + (g-fail-info (gensym)) + (g-known-failure (gensym)) + (g-condition-type (gensym)) + (g-include-subtypes (gensym)) + (g-format-control (gensym)) + (g-format-arguments (gensym)) + (g-c (gensym))) + `(let* ((,g-announce ,announce) + (,g-catch-breaks ,catch-breaks) + ,@(when fail-info-given `((,g-fail-info ,fail-info))) + ,@(when known-failure-given `((,g-known-failure ,known-failure))) + (,g-condition-type ,condition-type) + ,@(when include-subtypes-given + `((,g-include-subtypes ,include-subtypes))) + ,@(when format-control-given + `((,g-format-control ,format-control))) + ,@(when format-arguments-given + `((,g-format-arguments ,format-arguments))) + (,g-c (test-values-errorset ,form ,g-announce ,g-catch-breaks))) + (test-check + :predicate #'eq + :expected-result t + :test-results + (test-values (and (conditionp ,g-c) + ,@(if* include-subtypes-given + then `((if* ,g-include-subtypes + then (typep ,g-c ,g-condition-type) + else (eq (class-of ,g-c) + (find-class + ,g-condition-type)))) + else `((eq (class-of ,g-c) + (find-class ,g-condition-type)))) + ,@(when format-control-given + `((or + (null ,g-format-control) + (string= + (concatenate 'simple-string + "~1@<" ,g-format-control "~:@>") + (simple-condition-format-control ,g-c))))) + ,@(when format-arguments-given + `((or + (null ,g-format-arguments) + (equal + ,g-format-arguments + (simple-condition-format-arguments ,g-c)))))) + t) + :test-form ',form + ,@(when fail-info-given `(:fail-info ,g-fail-info)) + ,@(when known-failure-given `(:known-failure ,g-known-failure)) + :condition-type ,g-condition-type + :condition ,g-c + ,@(when include-subtypes-given + `(:include-subtypes ,g-include-subtypes)) + ,@(when format-control-given + `(:format-control ,g-format-control)) + ,@(when format-arguments-given + `(:format-arguments ,g-format-arguments)))))) + +(defmacro test-no-error (form &key announce + catch-breaks + (fail-info nil fail-info-given) + (known-failure nil known-failure-given)) + "Test that `form' does not signal an error. The order of evaluation of +the arguments is keywords first, then test form. + +If `announce' is non-nil, then cause the error message to be printed. + +The `catch-breaks' is non-nil then consider a call to common-lisp:break an +`error'. + +`fail-info' allows more information to be printed with a test failure. + +`known-failure' marks the test as a known failure. This allows for +programs that do regression analysis on the output from a test run to +discriminate on new versus known failures." + (let ((g-announce (gensym)) + (g-catch-breaks (gensym)) + (g-fail-info (gensym)) + (g-known-failure (gensym)) + (g-c (gensym))) + `(let* ((,g-announce ,announce) + (,g-catch-breaks ,catch-breaks) + ,@(when fail-info-given `((,g-fail-info ,fail-info))) + ,@(when known-failure-given `((,g-known-failure ,known-failure))) + (,g-c (test-values-errorset ,form ,g-announce ,g-catch-breaks))) + (test-check + :predicate #'eq + :expected-result t + :test-results (test-values (not (conditionp ,g-c))) + :test-form ',form + :condition ,g-c + ,@(when fail-info-given `(:fail-info ,g-fail-info)) + ,@(when known-failure-given `(:known-failure ,g-known-failure)))))) + +(defvar *warn-cookie* (cons nil nil)) + +(defmacro test-warning (form &key fail-info known-failure) + "Test that `form' signals a warning. The order of evaluation of +the arguments is keywords first, then test form. + +`fail-info' allows more information to be printed with a test failure. + +`known-failure' marks the test as a known failure. This allows for +programs that do regression analysis on the output from a test run to +discriminate on new versus known failures." + (let ((g-fail-info (gensym)) + (g-known-failure (gensym)) + (g-value (gensym))) + `(let* ((,g-fail-info ,fail-info) + (,g-known-failure ,known-failure) + (,g-value (test-values-errorset ,form nil t))) + (test + *warn-cookie* + (if* (or (typep ,g-value 'simple-warning) (typep ,g-value 'warning)) + then *warn-cookie* + else ;; test produced no warning + nil) + :test #'eq + :reported-form ,form ;; quoted by test macro + :wanted-message "a warning" + :got-message "no warning" + :fail-info ,g-fail-info + :known-failure ,g-known-failure)))) + +(defmacro test-no-warning (form &key fail-info known-failure) + "Test that `form' does not signal a warning. The order of evaluation of +the arguments is keywords first, then test form. + +`fail-info' allows more information to be printed with a test failure. + +`known-failure' marks the test as a known failure. This allows for +programs that do regression analysis on the output from a test run to +discriminate on new versus known failures." + (let ((g-fail-info (gensym)) + (g-known-failure (gensym)) + (g-value (gensym))) + `(let* ((,g-fail-info ,fail-info) + (,g-known-failure ,known-failure) + (,g-value (test-values-errorset ,form nil t))) + (test + *warn-cookie* + (if* (or (typep ,g-value 'simple-warning) (typep ,g-value 'warning)) + then nil ;; test produced warning + else *warn-cookie*) + :test #'eq + :reported-form ',form + :wanted-message "no warning" + :got-message "a warning" + :fail-info ,g-fail-info + :known-failure ,g-known-failure)))) + +(defvar *announce-test* nil) ;; if true announce each test that was done + +(defmacro errorset (form &optional announce catch-breaks) + ;; Evaluate FORM, and if there are no errors and FORM returns + ;; values v1,v2,...,vn, then return values t,v1,v2,...,vn. If an + ;; error occurs while evaluating FORM, then return nil immediately. + ;; If ANNOUNCE is t, then the error message will be printed out. + (if catch-breaks + `(handler-case (values-list (cons t (multiple-value-list ,form))) + (error (condition) + (declare (ignorable condition)) + ,@(if announce `((format *error-output* "~&Error: ~a~%" condition))) + nil) + (simple-break (condition) + (declare (ignorable condition)) + ,@(if announce `((format *error-output* "~&Warning: ~a~%" condition)) +) + nil)) + `(handler-case (values-list (cons t (multiple-value-list ,form))) + (error (condition) + (declare (ignorable condition)) + ,@(if announce `((format *error-output* "~&Error: ~a~%" condition))) + nil)))) + +(defun test-check (&key (predicate #'eql) + expected-result test-results test-form + multiple-values fail-info known-failure + wanted-message got-message condition-type condition + include-subtypes format-control format-arguments + &aux fail predicate-failed got wanted) + ;; for debugging large/complex test sets: + (when *announce-test* + (format t "Just did test ~s~%" test-form) + (force-output)) + + ;; this is an internal function + (flet ((check (expected-result result) + (let* ((results + (multiple-value-list + (errorset (funcall predicate expected-result result) t))) + (failed (null (car results)))) + (if* failed + then (setq predicate-failed t) + nil + else (cadr results))))) + (when (conditionp test-results) + (setq condition test-results) + (setq test-results nil)) + (when (null (car test-results)) + (setq fail t)) + (if* (and (not fail) (not multiple-values)) + then ;; should be a single result + ;; expected-result is the single result wanted + (when (not (and (cdr test-results) + (check expected-result (cadr test-results)))) + (setq fail t)) + (when (and (not fail) (cddr test-results)) + (setq fail 'single-got-multiple)) + else ;; multiple results wanted + ;; expected-result is a list of results, each of which + ;; should be checked against the corresponding test-results + ;; using the predicate + (do ((got (cdr test-results) (cdr got)) + (want expected-result (cdr want))) + ((or (null got) (null want)) + (when (not (and (null want) (null got))) + (setq fail t))) + (when (not (check (car got) (car want))) + (return (setq fail t))))) + (if* fail + then (when (not known-failure) + (format *error-output* + "~& * * * UNEXPECTED TEST FAILURE * * *~%") + (incf *test-unexpected-failures*)) + (format *error-output* "~&Test failed: ~@[known failure: ~*~]~s~%" + known-failure test-form) + (if* (eq 'single-got-multiple fail) + then (format + *error-output* + "~ +Reason: additional value were returned from test form.~%") + elseif predicate-failed + then (format *error-output* "Reason: predicate error.~%") + elseif (null (car test-results)) + then (format *error-output* "~ +Reason: an error~@[ (of type `~s')~] was detected.~%" + (when condition (class-of condition))) + elseif condition + then (if* (not (conditionp condition)) + then (format *error-output* "~ +Reason: expected but did not detect an error of type `~s'.~%" + condition-type) + elseif (null condition-type) + then (format *error-output* "~ +Reason: detected an unexpected error of type `~s': + ~a.~%" + (class-of condition) + condition) + elseif (not (if* include-subtypes + then (typep condition condition-type) + else (eq (class-of condition) + (find-class condition-type)))) + then (format *error-output* "~ +Reason: detected an incorrect condition type.~%") + (format *error-output* + " wanted: ~s~%" condition-type) + (format *error-output* + " got: ~s~%" (class-of condition)) + elseif (and format-control + (not (string= + (setq got + (concatenate 'simple-string + "~1@<" format-control "~:@>")) + (setq wanted + (simple-condition-format-control + condition))))) + then ;; format control doesn't match + (format *error-output* "~ +Reason: the format-control was incorrect.~%") + (format *error-output* " wanted: ~s~%" wanted) + (format *error-output* " got: ~s~%" got) + elseif (and format-arguments + (not (equal + (setq got format-arguments) + (setq wanted + (simple-condition-format-arguments + condition))))) + then (format *error-output* "~ +Reason: the format-arguments were incorrect.~%") + (format *error-output* " wanted: ~s~%" wanted) + (format *error-output* " got: ~s~%" got) + else ;; what else???? + (error "internal-error")) + else (let ((*print-length* 50) + (*print-level* 10)) + (if* wanted-message + then (format *error-output* + " wanted: ~a~%" wanted-message) + else (if* (not multiple-values) + then (format *error-output* + " wanted: ~s~%" + expected-result) + else (format + *error-output* + " wanted values: ~{~s~^, ~}~%" + expected-result))) + (if* got-message + then (format *error-output* + " got: ~a~%" got-message) + else (if* (not multiple-values) + then (format *error-output* " got: ~s~%" + (second test-results)) + else (format + *error-output* + " got values: ~{~s~^, ~}~%" + (cdr test-results)))))) + (when fail-info + (format *error-output* "Additional info: ~a~%" fail-info)) + (incf *test-errors*) + (when *break-on-test-failures* + (break "~a is non-nil." '*break-on-test-failures*)) + else (when known-failure + (format *error-output* + "~&Expected test failure for ~s did not occur.~%" + test-form) + (when fail-info + (format *error-output* "Additional info: ~a~%" fail-info)) + (setq fail t)) + (incf *test-successes*)) + (not fail))) + +(defmacro with-tests ((&key (name "unnamed")) &body body) + (let ((g-name (gensym))) + `(flet ((doit () ,@body)) + (let ((,g-name ,name) + (*test-errors* 0) + (*test-successes* 0) + (*test-unexpected-failures* 0)) + (format *error-output* "Begin ~a test~%" ,g-name) + (if* *break-on-test-failures* + then (doit) + else (handler-case (doit) + (error (c) + (format + *error-output* + "~ +~&Test ~a aborted by signalling an uncaught error:~%~a~%" + ,g-name c)))) + #+allegro + (let ((state (sys:gsgc-switch :print))) + (setf (sys:gsgc-switch :print) nil) + (format t "~&**********************************~%" ,g-name) + (format t "End ~a test~%" ,g-name) + (format t "Errors detected in this test: ~s " *test-errors*) + (unless (zerop *test-unexpected-failures*) + (format t "UNEXPECTED: ~s" *test-unexpected-failures*)) + (format t "~%Successes this test:~s~%" *test-successes*) + (setf (sys:gsgc-switch :print) state)) + #-allegro + (progn + (format t "~&**********************************~%" ,g-name) + (format t "End ~a test~%" ,g-name) + (format t "Errors detected in this test: ~s " *test-errors*) + (unless (zerop *test-unexpected-failures*) + (format t "UNEXPECTED: ~s" *test-unexpected-failures*)) + (format t "~%Successes this test:~s~%" *test-successes*)) + )))) + +(provide :tester #+module-versions 1.1)
Added: branches/trunk-reorg/thirdparty/uffi/examples/arrays.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/arrays.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,63 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: arrays.cl +;;;; Purpose: UFFI Example file to test arrays +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(uffi:def-constant +column-length+ 10) +(uffi:def-constant +row-length+ 10) + +(uffi:def-foreign-type long-ptr (* :long)) + +(defun test-array-1d () + "Tests vector" + (let ((a (uffi:allocate-foreign-object :long +column-length+))) + (dotimes (i +column-length+) + (setf (uffi:deref-array a '(:array :long) i) (* i i))) + (dotimes (i +column-length+) + (format t "~&~D => ~D" i (uffi:deref-array a '(:array :long) i))) + (uffi:free-foreign-object a)) + (values)) + +(defun test-array-2d () + "Tests 2d array" + (let ((a (uffi:allocate-foreign-object 'long-ptr +row-length+))) + (dotimes (r +row-length+) + (declare (fixnum r)) + (setf (uffi:deref-array a '(:array (* :long)) r) + (uffi:allocate-foreign-object :long +column-length+)) + (let ((col (uffi:deref-array a '(:array (* :long)) r))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (setf (uffi:deref-array col '(:array :long) c) (+ (* r +column-length+) c))))) + + (dotimes (r +row-length+) + (declare (fixnum r)) + (format t "~&Row ~D: " r) + (let ((col (uffi:deref-array a '(:array (* :long)) r))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (let ((result (uffi:deref-array col '(:array :long) c))) + (format t "~d " result))))) + + (uffi:free-foreign-object a)) + (values)) + +#+examples-uffi +(test-array-1d) + +#+examples-uffi +(test-array-2d) + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/atoifl.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/atoifl.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,56 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: atoifl.cl +;;;; Purpose: UFFI Example file to atoi/atof/atol +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(uffi:def-function ("atoi" c-atoi) + ((str :cstring)) + :returning :int) + +(uffi:def-function ("atol" c-atol) + ((str :cstring)) + :returning :long) + +(uffi:def-function ("atof" c-atof) + ((str :cstring)) + :returning :double) + +(defun atoi (str) + "Returns a int from a string." + (uffi:with-cstring (str-cstring str) + (c-atoi str-cstring))) + +(defun atof (str) + "Returns a double float from a string." + (uffi:with-cstring (str-cstring str) + (c-atof str-cstring))) + +#+examples-uffi +(progn + (flet ((print-results (str) + (format t "~&(atoi ~S) => ~S" str (atoi str)))) + (print-results "55"))) + + +#+test-uffi +(progn + (util.test:test (atoi "123") 123 :test #'eql + :fail-info "Error with atoi") + (util.test:test (atoi "") 0 :test #'eql + :fail-info "Error with atoi") + (util.test:test (atof "2.23") 2.23d0 :test #'eql + :fail-info "Error with atof") + ) +
Added: branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.c ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.c Mon Feb 11 09:06:27 2008 @@ -0,0 +1,91 @@ +/*************************************************************************** + * FILE IDENTIFICATION + * + * Name: c-test-fns.c + * Purpose: Test functions in C for UFFI library + * Programer: Kevin M. Rosenberg + * Date Started: Mar 2002 + * + * CVS Id: $Id$ + * + * This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg + * + * These variables are correct for GCC + * you'll need to modify these for other compilers + ***************************************************************************/ + +#ifdef WIN32 +#include <windows.h> + +BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, + DWORD fdwReason, + LPVOID lpvReserved) +{ + return 1; +} + +#define DLLEXPORT __declspec(dllexport) + +#else +#define DLLEXPORT +#endif + +#include <ctype.h> +#include <stdlib.h> +#include <math.h> + + +/* Test of constant input string */ +DLLEXPORT +int +cs_count_upper (char* psz) +{ + int count = 0; + + if (psz) { + while (*psz) { + if (isupper (*psz)) + ++count; + ++psz; + } + return count; + } else + return -1; +} + +/* Test of input and output of a string */ +DLLEXPORT +void +cs_to_upper (char* psz) +{ + if (psz) { + while (*psz) { + *psz = toupper (*psz); + ++psz; + } + } +} + +/* Test of an output only string */ +DLLEXPORT +void +cs_make_random (int size, char* buffer) +{ + int i; + for (i = 0; i < size; i++) + buffer[i] = 'A' + (rand() % 26); +} + + +/* Test of input/output vector */ +DLLEXPORT +void +half_double_vector (int size, double* vec) +{ + int i; + for (i = 0; i < size; i++) + vec[i] /= 2.; +} + + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/c-test-fns.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,118 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: c-test-fns.cl +;;;; Purpose: UFFI Example file for zlib compression +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(unless (uffi:load-foreign-library + (uffi:find-foreign-library "c-test-fns" + (list *load-truename* "/home/kevin/debian/src/uffi/examples/")) + :supporting-libraries '("c")) + (warn "Unable to load c-test-fns library")) + +(uffi:def-function ("cs_to_upper" cs-to-upper) + ((input (* :unsigned-char))) + :returning :void + ) + +(defun string-to-upper (str) + (uffi:with-foreign-string (str-foreign str) + (cs-to-upper str-foreign) + (uffi:convert-from-foreign-string str-foreign))) + +(uffi:def-function ("cs_count_upper" cs-count-upper) + ((input :cstring)) + :returning :int + ) + +(defun string-count-upper (str) + (uffi:with-cstring (str-cstring str) + (cs-count-upper str-cstring))) + +(uffi:def-function ("half_double_vector" half-double-vector) + ((size :int) + (vec (* :double))) + :returning :void) + +(uffi:def-constant +double-vec-length+ 10) +(defun test-half-double-vector () + (let ((vec (uffi:allocate-foreign-object :double +double-vec-length+)) + results) + (dotimes (i +double-vec-length+) + (setf (uffi:deref-array vec '(:array :double) i) + (coerce i 'double-float))) + (half-double-vector +double-vec-length+ vec) + (dotimes (i +double-vec-length+) + (push (uffi:deref-array vec '(:array :double) i) results)) + (uffi:free-foreign-object vec) + (nreverse results))) + +(defun t2 () + (let ((vec (make-array +double-vec-length+ :element-type 'double-float))) + (dotimes (i +double-vec-length+) + (setf (aref vec i) (coerce i 'double-float))) + (half-double-vector +double-vec-length+ vec) + vec)) + +#+(or cmu scl) +(defun t3 () + (let ((vec (make-array +double-vec-length+ :element-type 'double-float))) + (dotimes (i +double-vec-length+) + (setf (aref vec i) (coerce i 'double-float))) + (system:without-gcing + (half-double-vector +double-vec-length+ (system:vector-sap vec))) + vec)) + +#+examples-uffi +(format t "~&(string-to-upper "this is a test") => ~A" + (string-to-upper "this is a test")) + +#+examples-uffi +(format t "~&(string-to-upper nil) => ~A" + (string-to-upper nil)) + +#+examples-uffi +(format t "~&(string-count-upper "This is a Test") => ~A" + (string-count-upper "This is a Test")) + +#+examples-uffi +(format t "~&(string-count-upper nil) => ~A" + (string-count-upper nil)) + +#+examples-uffi +(format t "~&Half vector: ~S" (test-half-double-vector)) + + + +#+test-uffi +(progn + (util.test:test (string= (string-to-upper "this is a test") "THIS IS A TEST") + t + :test #'eql + :fail-info "Error with string-to-upper") + (util.test:test (string-to-upper nil) nil + :fail-info "string-to-upper with nil failed") + (util.test:test (string-count-upper "This is a Test") + 2 + :test #'eql + :fail-info "Error with string-count-upper") + (util.test:test (string-count-upper nil) -1 + :test #'eql + :fail-info "string-count-upper with nil failed") + + (util.test:test (test-half-double-vector) + '(0.0d0 0.5d0 1.0d0 1.5d0 2.0d0 2.5d0 3.0d0 3.5d0 4.0d0 4.5d0) + :test #'equal + :fail-info "Error comparing half-double-vector") + )
Added: branches/trunk-reorg/thirdparty/uffi/examples/compress.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/compress.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,116 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: compress.cl +;;;; Purpose: UFFI Example file for zlib compression +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(eval-when (:load-toplevel :execute) + (unless (uffi:load-foreign-library + #-(or macosx darwin) + (uffi:find-foreign-library + "libz" + '("/usr/local/lib/" "/usr/lib/" "/zlib/") + :types '("so" "a")) + #+(or macosx darwin) + (uffi:find-foreign-library "z" + `(,(pathname-directory *load-pathname*))) + :module "zlib" + :supporting-libraries '("c")) + (warn "Unable to load zlib"))) + +(uffi:def-function ("compress" c-compress) + ((dest (* :unsigned-char)) + (destlen (* :long)) + (source :cstring) + (source-len :long)) + :returning :int + :module "zlib") + +(defun compress (source) + "Returns two values: array of bytes containing the compressed data + and the numbe of compressed bytes" + (let* ((sourcelen (length source)) + (destsize (+ 12 (ceiling (* sourcelen 1.01)))) + (dest (uffi:allocate-foreign-string destsize :unsigned t)) + (destlen (uffi:allocate-foreign-object :long))) + (setf (uffi:deref-pointer destlen :long) destsize) + (uffi:with-cstring (source-native source) + (let ((result (c-compress dest destlen source-native sourcelen)) + (newdestlen (uffi:deref-pointer destlen :long))) + (unwind-protect + (if (zerop result) + (values (uffi:convert-from-foreign-string + dest + :length newdestlen + :null-terminated-p nil) + newdestlen) + (error "zlib error, code ~D" result)) + (progn + (uffi:free-foreign-object destlen) + (uffi:free-foreign-object dest))))))) + +(uffi:def-function ("uncompress" c-uncompress) + ((dest (* :unsigned-char)) + (destlen (* :long)) + (source :cstring) + (source-len :long)) + :returning :int + :module "zlib") + +(defun uncompress (source) + (let* ((sourcelen (length source)) + (destsize 200000) ;adjust as needed + (dest (uffi:allocate-foreign-string destsize :unsigned t)) + (destlen (uffi:allocate-foreign-object :long))) + (setf (uffi:deref-pointer destlen :long) destsize) + (uffi:with-cstring (source-native source) + (let ((result (c-uncompress dest destlen source-native sourcelen)) + (newdestlen (uffi:deref-pointer destlen :long))) + (unwind-protect + (if (zerop result) + (uffi:convert-from-foreign-string + dest + :length newdestlen + :null-terminated-p nil) + (error "zlib error, code ~D" result)) + (progn + (uffi:free-foreign-object destlen) + (uffi:free-foreign-object dest))))))) + +#+examples-uffi +(progn + (flet ((print-results (str) + (multiple-value-bind (compressed len) (compress str) + (let ((*print-length* nil)) + (format t "~&(compress ~S) => " str) + (format t "~S~%" (map 'list #'char-code compressed)))))) + (print-results "") + (print-results "test") + (print-results "test2"))) + +#+test-uffi +(progn + (flet ((test-compress (str) + (multiple-value-bind (compressed len) (compress str) + (multiple-value-bind (uncompressed len2) (uncompress compressed) + (util.test:test str uncompressed :test #'string= + :fail-info "Error uncompressing a compressed string"))))) + (test-compress "") + (test-compress "test") + (test-compress "test2"))) + +;; Results of the above on my system: +;; (compress "") => 789c300001,8 +;; (compress "test") => 789c2b492d2e1045d1c1,12 +;; (compress "test2") => 789c2b492d2e31206501f3,13
Added: branches/trunk-reorg/thirdparty/uffi/examples/file-socket.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/file-socket.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,39 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: file-socket.cl +;;;; Purpose: UFFI Example file to get a socket on a file +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Jul 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +;; Values for linux +(uffi:def-constant PF_UNIX 1) +(uffi:def-constant SOCK_STREAM 1) + +(uffi:def-function ("socket" c-socket) + ((family :int) + (type :int) + (protocol :int)) + :returning :int) + +(uffi:def-function ("connect" c-connect) + ((sockfd :int) + (serv-addr :void-pointer) + (addr-len :int)) + :returning :int) + +(defun connect-to-file-socket (filename) + (let ((socket (c-socket PF_UNIX SOCK_STREAM 0))) + (if (plusp socket) + (let ((stream (c-connect socket filename (length filename)))) + stream) + (error "Unable to create socket"))))
Added: branches/trunk-reorg/thirdparty/uffi/examples/getenv.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/getenv.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,44 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: getenv.cl +;;;; Purpose: UFFI Example file to get environment variable +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + + +(uffi:def-function ("getenv" c-getenv) + ((name :cstring)) + :returning :cstring) + +(defun my-getenv (key) + "Returns an environment variable, or NIL if it does not exist" + (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)))) + (print-results "USER") + (print-results "_FOO_"))) + + +#+test-uffi +(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") +) +
Added: branches/trunk-reorg/thirdparty/uffi/examples/gethostname.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/gethostname.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,63 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: gethostname.cl +;;;; Purpose: UFFI Example file to get hostname of system +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + + +;;; This example is inspired by the example on the CL-Cookbook web site + +(uffi:def-function ("gethostname" c-gethostname) + ((name (* :unsigned-char)) + (len :int)) + :returning :int) + +(defun gethostname () + "Returns the hostname" + (let* ((name (uffi:allocate-foreign-string 256)) + (result-code (c-gethostname name 256)) + (hostname (when (zerop result-code) + (uffi:convert-from-foreign-string name)))) + (uffi:free-foreign-object name) + (unless (zerop result-code) + (error "gethostname() failed.")) + hostname)) + +(defun gethostname2 () + "Returns the hostname" + (uffi:with-foreign-object (name '(:array :unsigned-char 256)) + (if (zerop (c-gethostname (uffi:char-array-to-pointer name) 256)) + (uffi:convert-from-foreign-string name) + (error "gethostname() failed.")))) + +#+examples-uffi +(progn + (format t "~&Hostname (technique 1): ~A" (gethostname)) + (format t "~&Hostname (technique 2): ~A" (gethostname2))) + +#+test-uffi +(progn + (let ((hostname1 (gethostname)) + (hostname2 (gethostname2))) + + (util.test:test (and (stringp hostname1) (stringp hostname2)) t + :fail-info "gethostname not string") + (util.test:test (and (not (zerop (length hostname1))) + (not (zerop (length hostname2)))) t + :fail-info "gethostname length 0") + (util.test:test (string= hostname1 hostname1) t + :fail-info "gethostname techniques don't match")) + ) + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/getshells.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/getshells.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,44 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: getshells.cl +;;;; Purpose: UFFI Example file to get lisp of legal shells +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + + +(uffi:def-function "setusershell" + nil + :returning :void) + +(uffi:def-function "endusershell" + nil + :returning :void) + +(uffi:def-function "getusershell" + nil + :returning :cstring) + +(defun getshells () + "Returns list of valid shells" + (setusershell) + (let (shells) + (do ((shell (uffi:convert-from-cstring (getusershell)) + (uffi:convert-from-cstring (getusershell)))) + ((null shell)) + (push shell shells)) + (endusershell) + (nreverse shells))) + +#+examples-uffi +(format t "~&Shells: ~S" (getshells)) +
Added: branches/trunk-reorg/thirdparty/uffi/examples/gettime.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/gettime.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,73 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: gettime +;;;; Purpose: UFFI Example file to get time, use C structures +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(uffi:def-foreign-type time-t :unsigned-long) + +(uffi:def-struct tm + (sec :int) + (min :int) + (hour :int) + (mday :int) + (mon :int) + (year :int) + (wday :int) + (yday :int) + (isdst :int)) + +(uffi:def-function ("time" c-time) + ((time (* time-t))) + :returning time-t) + +(uffi:def-function ("localtime" c-localtime) + ((time (* time-t))) + :returning (* tm)) + +(uffi:def-type time-t :unsigned-long) +(uffi:def-type tm-pointer (* tm)) + +(defun gettime () + "Returns the local time" + (uffi:with-foreign-object (time 'time-t) +;; (declare (type time-t time)) + (c-time time) + (let ((tm-ptr (the tm-pointer (c-localtime time)))) + (declare (type tm-pointer tm-ptr)) + (let ((time-string (format nil "~2d/~2,'0d/~d ~2d:~2,'0d:~2,'0d" + (1+ (uffi:get-slot-value tm-ptr 'tm 'mon)) + (uffi:get-slot-value tm-ptr 'tm 'mday) + (+ 1900 (uffi:get-slot-value tm-ptr 'tm 'year)) + (uffi:get-slot-value tm-ptr 'tm 'hour) + (uffi:get-slot-value tm-ptr 'tm 'min) + (uffi:get-slot-value tm-ptr 'tm 'sec) + ))) + time-string)))) + + + + +#+examples-uffi +(format t "~&~A" (gettime)) + +#+test-uffi +(progn + (let ((time (gettime))) + (util.test:test (stringp time) t :fail-info "Time is not a string") + (util.test:test (plusp (parse-integer time :junk-allowed t)) + t + :fail-info "time string does not start with a number"))) + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/run-examples.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/run-examples.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,36 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: run-examples.cl +;;;; Purpose: Load and execute all examples for UFFI +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +#-uffi (asdf:oos 'asdf:load-op :uffi) + +(pushnew :examples-uffi cl:*features*) + +(flet ((load-test (name) + (load (make-pathname :defaults *load-truename* :name name)))) + (load-test "c-test-fns") + (load-test "arrays") + (load-test "union") + (load-test "strtol") + (load-test "atoifl") + (load-test "gettime") + (load-test "getenv") + (load-test "gethostname") + (load-test "getshells") + (load-test "compress")) + +(setq cl:*features* (remove :examples-uffi cl:*features*)) + + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/strtol.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/strtol.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,80 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: strtol.cl +;;;; Purpose: UFFI Example file to strtol, uses pointer arithmetic +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(uffi:def-foreign-type char-ptr (* :unsigned-char)) + +;; This example does not use :cstring to pass the input string since +;; the routine needs to do pointer arithmetic to see how many characters +;; were parsed + +(uffi:def-function ("strtol" c-strtol) + ((nptr char-ptr) + (endptr (* char-ptr)) + (base :int)) + :returning :long) + +(defun strtol (str &optional (base 10)) + "Returns a long int from a string. Returns number and condition flag. +Condition flag is T if all of string parses as a long, NIL if +their was no string at all, or an integer indicating position in string +of first non-valid character" + (let* ((str-native (uffi:convert-to-foreign-string str)) + (endptr (uffi:allocate-foreign-object 'char-ptr)) + (value (c-strtol str-native endptr base)) + (endptr-value (uffi:deref-pointer endptr 'char-ptr))) + + (unwind-protect + (if (uffi:null-pointer-p endptr-value) + (values value t) + (let ((next-char-value (uffi:deref-pointer endptr-value :unsigned-char)) + (chars-parsed (- (uffi:pointer-address endptr-value) + (uffi:pointer-address str-native)))) + (cond + ((zerop chars-parsed) + (values nil nil)) + ((uffi:null-char-p next-char-value) + (values value t)) + (t + (values value chars-parsed))))) + (progn + (uffi:free-foreign-object str-native) + (uffi:free-foreign-object endptr))))) + + + +#+examples-uffi +(progn + (flet ((print-results (str) + (multiple-value-bind (result flag) (strtol str) + (format t "~&(strtol ~S) => ~S,~S" str result flag)))) + (print-results "55") + (print-results "55.3") + (print-results "a"))) + +#+test-uffi +(progn + (flet ((test-strtol (str results) + (util.test:test (multiple-value-list (strtol str)) results + :test #'equal + :fail-info "Error testing strtol"))) + (test-strtol "123" '(123 t)) + (test-strtol "0" '(0 t)) + (test-strtol "55a" '(55 2)) + (test-strtol "a" '(nil nil)))) + + +
Added: branches/trunk-reorg/thirdparty/uffi/examples/test-examples.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/test-examples.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,40 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: test-examples.cl +;;;; Purpose: Load and execute all examples for UFFI +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +#-uffi (asdf:oos 'asdf:load-op :uffi) + +(unless (ignore-errors (find-package :util.test)) + (load (make-pathname :name "acl-compat-tester" :defaults *load-truename*))) + +(defun do-tests () + (pushnew :test-uffi cl:*features*) + (util.test:with-tests (:name "UFFI-Tests") + (setq util.test:*break-on-test-failures* nil) + (flet ((load-test (name) + (load (make-pathname :name name :defaults *load-truename*)))) + (load-test "c-test-fns") + (load-test "arrays") + (load-test "union") + (load-test "strtol") + (load-test "atoifl") + (load-test "gettime") + (load-test "getenv") + (load-test "gethostname") + (load-test "getshells") + (load-test "compress")) + (setq cl:*features* (remove :test-uffi cl:*features*)))) + +(do-tests) +
Added: branches/trunk-reorg/thirdparty/uffi/examples/union.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/examples/union.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,86 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: union.cl +;;;; Purpose: UFFI Example file to test unions +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(uffi:def-union tunion1 + (char :char) + (int :int) + (uint :unsigned-int) + (sf :float) + (df :double)) + +(defun run-union-1 () + (let ((u (uffi:allocate-foreign-object 'tunion1))) + (setf (uffi:get-slot-value u 'tunion1 'uint) + ;; little endian + #-(or sparc sparc-v9 powerpc ppc big-endian) + (+ (* 1 (char-code #\A)) + (* 256 (char-code #\B)) + (* 65536 (char-code #\C)) + (* 16777216 255)) + ;; big endian + #+(or sparc sparc-v9 powerpc ppc big-endian) + (+ (* 16777216 (char-code #\A)) + (* 65536 (char-code #\B)) + (* 256 (char-code #\C)) + (* 1 255))) + (format *standard-output* "~&Should be #\A: ~S" + (uffi:ensure-char-character + (uffi:get-slot-value u 'tunion1 'char))) +;; (format *standard-output* "~&Should be negative number: ~D" +;; (uffi:get-slot-value u 'tunion1 'int)) + (format *standard-output* "~&Should be positive number: ~D" + (uffi:get-slot-value u 'tunion1 'uint)) + (uffi:free-foreign-object u)) + (values)) + +#+test-uffi +(defun test-union-1 () + (let ((u (uffi:allocate-foreign-object 'tunion1))) + (setf (uffi:get-slot-value u 'tunion1 'uint) + #-(or sparc sparc-v9 powerpc ppc) + (+ (* 1 (char-code #\A)) + (* 256 (char-code #\B)) + (* 65536 (char-code #\C)) + (* 16777216 128)) + #+(or sparc sparc-v9 powerpc ppc) + (+ (* 16777216 (char-code #\A)) + (* 65536 (char-code #\B)) + (* 256 (char-code #\C)) + (* 1 128))) ;set signed bit + (util.test:test (uffi:ensure-char-character + (uffi:get-slot-value u 'tunion1 'char)) + #\A + :test #'eql + :fail-info "Error with union character") + #-(or sparc sparc-v9 openmcl digitool) +;; (util.test:test (> 0 (uffi:get-slot-value u 'tunion1 'int)) +;; t +;; :fail-info +;; "Error with negative int in union") + (util.test:test (plusp (uffi:get-slot-value u 'tunion1 'uint)) + t + :fail-info + "Error with unsigned int in union") + (uffi:free-foreign-object u)) + (values)) + +#+examples-uffi +(run-union-1) + + +#+test-uffi +(test-union-1)
Added: branches/trunk-reorg/thirdparty/uffi/src/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,6 @@ +SUBDIRS := + +include ../Makefile.common + +.PHONY: distclean +distclean: clean
Added: branches/trunk-reorg/thirdparty/uffi/src/aggregates.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/aggregates.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,262 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: aggregates.lisp +;;;; Purpose: UFFI source to handle aggregate types +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + +(defmacro def-enum (enum-name args &key (separator-string "#")) + "Creates a constants for a C type enum list, symbols are created +in the created in the current package. The symbol is the concatenation +of the enum-name name, separator-string, and field-name" + (let ((counter 0) + (cmds nil) + (constants nil)) + (declare (fixnum counter)) + (dolist (arg args) + (let ((name (if (listp arg) (car arg) arg)) + (value (if (listp arg) + (prog1 + (setq counter (cadr arg)) + (incf counter)) + (prog1 + counter + (incf counter))))) + (setq name (intern (concatenate 'string + (symbol-name enum-name) + separator-string + (symbol-name name)))) + (push `(uffi:def-constant ,name ,value) constants))) + (setf cmds (append '(progn) + #+allegro `((ff:def-foreign-type ,enum-name :int)) + #+lispworks `((fli:define-c-typedef ,enum-name :int)) + #+(or cmu scl) `((alien:def-alien-type ,enum-name alien:signed)) + #+sbcl `((sb-alien:define-alien-type ,enum-name sb-alien:signed)) + #+digitool `((def-mcl-type ,enum-name :integer)) + #+openmcl `((ccl::def-foreign-type ,enum-name :int)) + (nreverse constants))) + cmds)) + + +(defmacro def-array-pointer (name-array type) + #+allegro + `(ff:def-foreign-type ,name-array + (:array ,(convert-from-uffi-type type :array))) + #+lispworks + `(fli:define-c-typedef ,name-array + (:c-array ,(convert-from-uffi-type type :array))) + #+(or cmu scl) + `(alien:def-alien-type ,name-array + (* ,(convert-from-uffi-type type :array))) + #+sbcl + `(sb-alien:define-alien-type ,name-array + (* ,(convert-from-uffi-type type :array))) + #+digitool + `(def-mcl-type ,name-array '(:array ,type)) + #+openmcl + `(ccl::def-foreign-type ,name-array (:array ,(convert-from-uffi-type type :array))) + ) + +(defun process-struct-fields (name fields &optional (variant nil)) + (let (processed) + (dolist (field fields) + (let* ((field-name (car field)) + (type (cadr field)) + (def (append (list field-name) + (if (eq type :pointer-self) + #+(or cmu scl) `((* (alien:struct ,name))) + #+sbcl `((* (sb-alien:struct ,name))) + #+(or openmcl digitool) `((:* (:struct ,name))) + #+lispworks `((:pointer ,name)) + #-(or cmu sbcl scl openmcl digitool lispworks) `((* ,name)) + `(,(convert-from-uffi-type type :struct)))))) + (if variant + (push (list def) processed) + (push def processed)))) + (nreverse processed))) + + +(defmacro def-struct (name &rest fields) + #+(or cmu scl) + `(alien:def-alien-type ,name (alien:struct ,name ,@(process-struct-fields name fields))) + #+sbcl + `(sb-alien:define-alien-type ,name (sb-alien:struct ,name ,@(process-struct-fields name fields))) + #+allegro + `(ff:def-foreign-type ,name (:struct ,@(process-struct-fields name fields))) + #+lispworks + `(fli:define-c-struct ,name ,@(process-struct-fields name fields)) + #+digitool + `(ccl:defrecord ,name ,@(process-struct-fields name fields)) + #+openmcl + `(ccl::def-foreign-type + nil + (:struct ,name ,@(process-struct-fields name fields))) + ) + + +(defmacro get-slot-value (obj type slot) + #+(or lispworks cmu sbcl scl) (declare (ignore type)) + #+allegro + `(ff:fslot-value-typed ,type :c ,obj ,slot) + #+lispworks + `(fli:foreign-slot-value ,obj ,slot) + #+(or cmu scl) + `(alien:slot ,obj ,slot) + #+sbcl + `(sb-alien:slot ,obj ,slot) + #+(or openmcl digitool) + `(ccl:pref ,obj ,(read-from-string (format nil ":~a.~a" (keyword type) (keyword slot)))) + ) + +#+(or openmcl digitool) +(defmacro set-slot-value (obj type slot value) ;use setf to set values + `(setf (ccl:pref ,obj ,(read-from-string (format nil ":~a.~a" (keyword type) (keyword slot)))) ,value)) + +#+(or openmcl digitool) +(defsetf get-slot-value set-slot-value) + + +(defmacro get-slot-pointer (obj type slot) + #+(or lispworks cmu sbcl scl) (declare (ignore type)) + #+allegro + `(ff:fslot-value-typed ,type :c ,obj ,slot) + #+lispworks + `(fli:foreign-slot-pointer ,obj ,slot) + #+(or cmu scl) + `(alien:slot ,obj ,slot) + #+sbcl + `(sb-alien:slot ,obj ,slot) + #+digitool + `(ccl:%int-to-ptr (+ (ccl:%ptr-to-int ,obj) (the fixnum (ccl:field-info ,type ,slot)))) + #+openmcl + `(let ((field (ccl::%find-foreign-record-type-field ,type ,slot))) + (ccl:%int-to-ptr (+ (ccl:%ptr-to-int ,obj) (the fixnum (ccl::foreign-record-field-offset field))))) +) + +;; necessary to eval at compile time for openmcl to compile convert-from-foreign-usb8 +;; below +(eval-when (:compile-toplevel :load-toplevel :execute) + ;; so we could allow '(:array :long) or deref with other type like :long only + #+(or openmcl digitool) + (defun array-type (type) + (let ((result type)) + (when (listp type) + (let ((type-list (if (eq (car type) 'quote) (nth 1 type) type))) + (when (and (listp type-list) (eq (car type-list) :array)) + (setf result (cadr type-list))))) + result)) + + + (defmacro deref-array (obj type i) + "Returns a field from a row" + #+(or lispworks cmu sbcl scl) (declare (ignore type)) + #+(or cmu scl) `(alien:deref ,obj ,i) + #+sbcl `(sb-alien:deref ,obj ,i) + #+lispworks `(fli:dereference ,obj :index ,i :copy-foreign-object nil) + #+allegro `(ff:fslot-value-typed (quote ,(convert-from-uffi-type type :type)) :c ,obj ,i) + #+openmcl + (let* ((array-type (array-type type)) + (local-type (convert-from-uffi-type array-type :allocation)) + (element-size-in-bits (ccl::%foreign-type-or-record-size local-type :bits))) + (ccl::%foreign-access-form + obj + (ccl::%foreign-type-or-record local-type) + `(* ,i ,element-size-in-bits) + nil)) + #+digitool + (let* ((array-type (array-type type)) + (local-type (convert-from-uffi-type array-type :allocation)) + (accessor (first (macroexpand `(ccl:pref obj ,local-type))))) + `(,accessor + ,obj + (* (the fixnum ,i) ,(size-of-foreign-type local-type)))) + )) + +; this expands to the %set-xx functions which has different params than %put-xx +#+digitool +(defmacro deref-array-set (obj type i value) + (let* ((array-type (array-type type)) + (local-type (convert-from-uffi-type array-type :allocation)) + (accessor (first (macroexpand `(ccl:pref obj ,local-type)))) + (settor (first (macroexpand `(setf (,accessor obj ,local-type) value))))) + `(,settor + ,obj + (* (the fixnum ,i) ,(size-of-foreign-type local-type)) + ,value))) + +#+digitool +(defsetf deref-array deref-array-set) + +(defmacro def-union (name &rest fields) + #+allegro + `(ff:def-foreign-type ,name (:union ,@(process-struct-fields name fields))) + #+lispworks + `(fli:define-c-union ,name ,@(process-struct-fields name fields)) + #+(or cmu scl) + `(alien:def-alien-type ,name (alien:union ,name ,@(process-struct-fields name fields))) + #+sbcl + `(sb-alien:define-alien-type ,name (sb-alien:union ,name ,@(process-struct-fields name fields))) + #+digitool + `(ccl:defrecord ,name (:variant ,@(process-struct-fields name fields t))) + #+openmcl + `(ccl::def-foreign-type nil + (:union ,name ,@(process-struct-fields name fields))) +) + + +#-(or sbcl cmu) +(defun convert-from-foreign-usb8 (s len) + (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0)) + (fixnum len)) + (let ((a (make-array len :element-type '(unsigned-byte 8)))) + (dotimes (i len a) + (declare (fixnum i)) + (setf (aref a i) (uffi:deref-array s '(:array :unsigned-byte) i))))) + +#+sbcl +(eval-when (:compile-toplevel :load-toplevel :execute) + (sb-ext:without-package-locks + (defvar *system-copy-fn* (if (fboundp (intern "COPY-FROM-SYSTEM-AREA" "SB-KERNEL")) + (intern "COPY-FROM-SYSTEM-AREA" "SB-KERNEL") + (intern "COPY-UB8-FROM-SYSTEM-AREA" "SB-KERNEL"))) + (defconstant +system-copy-offset+ (if (fboundp (intern "COPY-FROM-SYSTEM-AREA" "SB-KERNEL")) + (* sb-vm:vector-data-offset sb-vm:n-word-bits) + 0)) + (defconstant +system-copy-multiplier+ (if (fboundp (intern "COPY-FROM-SYSTEM-AREA" "SB-KERNEL")) + sb-vm:n-byte-bits + 1)))) + + +#+sbcl +(defun convert-from-foreign-usb8 (s len) + (let ((sap (sb-alien:alien-sap s))) + (declare (type sb-sys:system-area-pointer sap)) + (locally + (declare (optimize (speed 3) (safety 0))) + (let ((result (make-array len :element-type '(unsigned-byte 8)))) + (funcall *system-copy-fn* sap 0 result +system-copy-offset+ + (* len +system-copy-multiplier+)) + result)))) + +#+cmu +(defun convert-from-foreign-usb8 (s len) + (let ((sap (alien:alien-sap s))) + (declare (type system:system-area-pointer sap)) + (locally + (declare (optimize (speed 3) (safety 0))) + (let ((result (make-array len :element-type '(unsigned-byte 8)))) + (kernel:copy-from-system-area sap 0 + result (* vm:vector-data-offset + vm:word-bits) + (* len vm:byte-bits)) + result))))
Added: branches/trunk-reorg/thirdparty/uffi/src/corman/corman-notes.txt ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/corman/corman-notes.txt Mon Feb 11 09:06:27 2008 @@ -0,0 +1,17 @@ +some notes: + we need the :pascal (:stdcall) calling conventions for + (def-function names args &key module returning calling-convention) + so I added this. calling-convention defaults to :cdecl + but on win32 we mostly use :stdcall + + #+corman is invalid, #+cormanlisp instead + + cormanlisp doesn't need to load and register the dll, since the underlying + LoadLibrary() call does this. we need the module keyword for def-function +instead. + (should probably default to kernel32.dll) + I'll think about library.cl, but we'll need more real-world win32 examples. + (ideally the complete winapi :) + I also have to look at valentina. + +patch -p0 < corman.diff
Added: branches/trunk-reorg/thirdparty/uffi/src/corman/getenv-ccl.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/corman/getenv-ccl.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,81 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: getenv-ccl.cl +;;;; Purpose: cormanlisp version +;;;; Programmer: "Joe Marshall" prunesquallor@attbi.com +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; ************************************************************************* + +(in-package :cl-user) + +(ct:defun-dll c-getenv ((lpname LPSTR) + (lpbuffer LPSTR) + (nsize LPDWORD)) + :library-name "kernel32.dll" + :return-type DWORD + :entry-name "GetEnvironmentVariableA" + :linkage-type :pascal) + +(defun getenv (name) + (let ((nsizebuf (ct:malloc (sizeof :long))) + (buffer (ct:malloc 1)) + (cname (ct:lisp-string-to-c-string name))) + (setf (ct:cref lpdword nsizebuf 0) 0) + (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)) + nil + (ct:c-string-to-lisp-string buffer1)) + (ct:free buffer1) + (ct:free nsizebuf))))) + +(defun cl:user-homedir-pathname (&optional host) + (cond ((or (stringp host) + (and (consp host) + (every #'stringp host))) nil) + ((or (eq host :unspecific) + (null host)) + (let ((homedrive (getenv "HOMEDRIVE")) + (homepath (getenv "HOMEPATH"))) + (parse-namestring + (if (and (stringp homedrive) + (stringp homepath) + (= (length homedrive) 2) + (> (length homepath) 0)) + (concatenate 'string homedrive homepath "\") + "C:\")))) + (t (error "HOST must be a string, list of strings, NIL or :unspecific")))) + +;| +(uffi:def-function ("getenv" c-getenv) + ((name :cstring)) + :returning :cstring) + +(defun my-getenv (key) + "Returns an environment variable, or NIL if it does not exist" + (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)))) + (print-results "USER") + (print-results "_FOO_"))) + + +#test-uffi +(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") +) +
Added: branches/trunk-reorg/thirdparty/uffi/src/functions.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/functions.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,239 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: function.lisp +;;;; Purpose: UFFI source to C function definitions +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + +(defun process-function-args (args) + (if (null args) + #+(or lispworks cmu sbcl scl cormanlisp digitool) nil + #+allegro '(:void) + #+openmcl (values nil nil) + + ;; args not null + #+(or lispworks allegro cmu sbcl scl digitool cormanlisp) + (let (processed) + (dolist (arg args) + (push (process-one-function-arg arg) processed)) + (nreverse processed)) + #+openmcl + (let ((processed nil) + (params nil)) + (dolist (arg args) + (let ((name (car arg)) + (type (convert-from-uffi-type (cadr arg) :routine))) + ;;(when (and (listp type) (eq (car type) :address)) + ;;(setf type :address)) + (push name params) + (push type processed) + (push name processed))) + (values (nreverse params) (nreverse processed))) + )) + +(defun process-one-function-arg (arg) + (let ((name (car arg)) + (type (convert-from-uffi-type (cadr arg) :routine))) + #+(or cmu sbcl scl) + ;(list name type :in) + `(,name ,type ,@(if (= (length arg) 3) (list (third arg)) (values))) + #+(or allegro lispworks digitool) + (if (and (listp type) (listp (car type))) + (append (list name) type) + (list name type)) + #+openmcl + (declare (ignore name type)) + )) + + +(defun allegro-convert-return-type (type) + (if (and (listp type) (not (listp (car type)))) + (list type) + type)) + +(defun funcallable-lambda-list (args) + (let ((ll nil)) + (dolist (arg args) + (push (car arg) ll)) + (nreverse ll))) + +#| +(defmacro def-funcallable (name args &key returning) + (let ((result-type (convert-from-uffi-type returning :return)) + (function-args (process-function-args args))) + #+lispworks + `(fli:define-foreign-funcallable ,name ,function-args + :result-type ,result-type + :language :ansi-c + :calling-convention :cdecl) + #+(or cmu scl sbcl) + ;; requires the type of the function pointer be declared correctly! + (let* ((ptrsym (gensym)) + (ll (funcallable-lambda-list args))) + `(defun ,name ,(cons ptrsym ll) + (alien::alien-funcall ,ptrsym ,@ll))) + #+openmcl + (multiple-value-bind (params args) (process-function-args args) + (let ((ptrsym (gensym))) + `(defun ,name ,(cons ptrsym params) + (ccl::ff-call ,ptrsym ,@args ,result-type)))) + #+allegro + ;; this is most definitely wrong + (let* ((ptrsym (gensym)) + (ll (funcallable-lambda-list args))) + `(defun ,name ,(cons ptrsym ll) + (system::ff-funcall ,ptrsym ,@ll))) + )) +|# + +(defun convert-lispworks-args (args) + (loop for arg in args + with processed = nil + do + (if (and (= (length arg) 3) (eq (third arg) :out)) + (push (list (first arg) + (list :reference-return (second arg))) processed) + (push (subseq arg 0 2) processed)) + finally (return (nreverse processed)))) + +(defun preprocess-names (names) + (let ((fname (gensym))) + (if (atom names) + (values (list names fname) fname (uffi::make-lisp-name names)) + (values (list (first names) fname) fname (second names))))) + +(defun preprocess-args (args) + (loop for arg in args + with lisp-args = nil and out = nil and processed = nil + do + (if (= (length arg) 3) + (ecase (third arg) + (:in + (progn + (push (first arg) lisp-args) + (push (list (first arg) (second arg)) processed))) + (:out + (progn + (push (list (first arg) (second arg)) out) + (push (list (first arg) (list '* (second arg))) processed)))) + (progn + (push (first arg) lisp-args) + (push arg processed))) + finally (return (values (nreverse lisp-args) + (nreverse out) + (nreverse processed))))) + + +(defmacro def-function (names args &key module returning) + (multiple-value-bind (lisp-args out processed) + (preprocess-args args) + (declare (ignorable lisp-args processed)) + (if (= (length out) 0) + `(%def-function ,names ,args + ,@(if module (list :module module) (values)) + ,@(if returning (list :returning returning) (values))) + + #+(or cmu scl sbcl) + `(%def-function ,names ,args + ,@(if returning (list :returning returning) (values))) + #+(and lispworks lispworks5) + (multiple-value-bind (name-pair fname lisp-name) + (preprocess-names names) + `(progn + (%def-function ,name-pair ,(convert-lispworks-args args) + ,@(if module (list :module module) (values)) + ,@(if returning (list :returning returning) (values))) + (defun ,lisp-name ,lisp-args + (,fname ,@(mapcar + #'(lambda (arg) + (cond ((member (first arg) lisp-args) + (first arg)) + ((member (first arg) out :key #'first) + t))) + args))))) + #+(and lispworks (not lispworks5)) + `(%def-function ,names ,(convert-lispworks-args args) + ,@(if module (list :module module) (values)) + ,@(if returning (list :returning returning) (values))) + #-(or cmu scl sbcl lispworks) + (multiple-value-bind (name-pair fname lisp-name) + (preprocess-names names) + `(progn + (%def-function ,name-pair ,processed + :module ,module :returning ,returning) + ;(declaim (inline ,fname)) + (defun ,lisp-name ,lisp-args + (with-foreign-objects ,out + (values (,fname ,@(mapcar #'first args)) + ,@(mapcar #'(lambda (arg) + (list 'deref-pointer + (first arg) + (second arg))) out)))))) + ))) + + +;; name is either a string representing foreign name, or a list +;; of foreign-name as a string and lisp name as a symbol +(defmacro %def-function (names args &key module returning) + #+(or cmu sbcl scl allegro openmcl digitool cormanlisp) (declare (ignore module)) + + (let* ((result-type (convert-from-uffi-type returning :return)) + (function-args (process-function-args args)) + (foreign-name (if (atom names) names (car names))) + (lisp-name (if (atom names) (make-lisp-name names) (cadr names)))) + ;; todo: calling-convention :stdcall for cormanlisp + #+allegro + `(ff:def-foreign-call (,lisp-name ,foreign-name) + ,function-args + :returning ,(allegro-convert-return-type result-type) + :call-direct t + :strings-convert nil) + #+(or cmu scl) + `(alien:def-alien-routine (,foreign-name ,lisp-name) + ,result-type + ,@function-args) + #+sbcl + `(sb-alien:define-alien-routine (,foreign-name ,lisp-name) + ,result-type + ,@function-args) + #+lispworks + `(fli:define-foreign-function (,lisp-name ,foreign-name :source) + ,function-args + ,@(if module (list :module module) (values)) + :result-type ,result-type + :language :ansi-c + #+:win32 :calling-convention #+:win32 :cdecl) + #+digitool + `(eval-when (:compile-toplevel :load-toplevel :execute) + (ccl:define-entry-point (,lisp-name ,foreign-name) + ,function-args + ,result-type)) + #+openmcl + (declare (ignore function-args)) + #+(and openmcl darwinppc-target) + (setf foreign-name (concatenate 'string "_" foreign-name)) + #+openmcl + (multiple-value-bind (params args) (process-function-args args) + `(defun ,lisp-name ,params + (ccl::external-call ,foreign-name ,@args ,result-type))) + #+cormanlisp + `(ct:defun-dll ,lisp-name (,function-args) + :return-type ,result-type + ,@(if module (list :library-name module) (values)) + :entry-name ,foreign-name + :linkage-type ,calling-convention) ; we need :pascal + )) + + + +
Added: branches/trunk-reorg/thirdparty/uffi/src/libraries.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/libraries.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,134 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: libraries.lisp +;;;; Purpose: UFFI source to load foreign libraries +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + +(defvar *loaded-libraries* nil + "List of foreign libraries loaded. Used to prevent reloading a library") + +(defun default-foreign-library-type () + "Returns string naming default library type for platform" + #+(or win32 cygwin mswindows) "dll" + #+(or macosx darwin ccl-5.0) "dylib" + #-(or win32 cygwin mswindows macosx darwin ccl-5.0) "so" +) + +(defun foreign-library-types () + "Returns list of string naming possible library types for platform, sorted by preference" + #+(or win32 mswindows) '("dll" "lib") + #+(or macosx darwin ccl-5.0) '("dylib" "bundle") + #-(or win32 mswindows macosx darwin ccl-5.0) '("so" "a" "o") +) + +(defun find-foreign-library (names directories &key types drive-letters) + "Looks for a foreign library. directories can be a single +string or a list of strings of candidate directories. Use default +library type if type is not specified." + (unless types + (setq types (foreign-library-types))) + (unless (listp types) + (setq types (list types))) + (unless (listp names) + (setq names (list names))) + (unless (listp directories) + (setq directories (list directories))) + #+(or win32 mswindows) + (unless (listp drive-letters) + (setq drive-letters (list drive-letters))) + #-(or win32 mswindows) + (setq drive-letters '(nil)) + (dolist (drive-letter drive-letters) + (dolist (name names) + (dolist (dir directories) + (dolist (type types) + (let ((path (make-pathname + #+lispworks :host + #+lispworks (when drive-letter drive-letter) + #-lispworks :device + #-lispworks (when drive-letter drive-letter) + :name name + :type type + :directory + (etypecase dir + (pathname + (pathname-directory dir)) + (list + dir) + (string + (pathname-directory + (parse-namestring dir))))))) + (when (probe-file path) + (return-from find-foreign-library path))))))) + nil) + + +(defun load-foreign-library (filename &key module supporting-libraries + force-load) + #+(or allegro openmcl digitool sbcl) (declare (ignore module supporting-libraries)) + #+(or cmu scl) (declare (ignore module)) + #+lispworks (declare (ignore supporting-libraries)) + + (flet ((load-failure () + (error "Unable to load foreign library "~A"." filename))) + (when (and filename (or (null (pathname-directory filename)) + (probe-file filename))) + (if (pathnamep filename) ;; ensure filename is a string to check if already loaded + (setq filename (namestring (if (null (pathname-directory filename)) + filename + ;; lispworks treats as UNC, so use truename + #+(and lispworks win32) (truename filename) + #-(and lispworks win32) filename)))) + + (if (and (not force-load) + (find filename *loaded-libraries* :test #'string-equal)) + t ;; return T, but don't reload library + (progn + #+cmu + (let ((type (pathname-type (parse-namestring filename)))) + (if (string-equal type "so") + (unless + (sys::load-object-file filename) + (load-failure)) + (alien:load-foreign filename + :libraries + (convert-supporting-libraries-to-string + supporting-libraries)))) + #+scl + (let ((type (pathname-type (parse-namestring filename)))) + (alien:load-foreign filename + :libraries + (convert-supporting-libraries-to-string + supporting-libraries))) + #+sbcl + (handler-case (sb-alien::load-1-foreign filename) + (sb-int:unsupported-operator (c) + (if (fboundp (intern "LOAD-SHARED-OBJECT" :sb-alien)) + (funcall (intern "LOAD-SHARED-OBJECT" :sb-alien) filename) + (error c)))) + + #+lispworks (fli:register-module module :real-name filename + :connection-style :immediate) + #+allegro (load filename) + #+openmcl (ccl:open-shared-library filename) + #+digitool (ccl:add-to-shared-library-search-path filename t) + + (push filename *loaded-libraries*) + t))))) + +(defun convert-supporting-libraries-to-string (libs) + (let (lib-load-list) + (dolist (lib libs) + (push (format nil "-l~A" lib) lib-load-list)) + (nreverse lib-load-list)))
Added: branches/trunk-reorg/thirdparty/uffi/src/objects.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/objects.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,291 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: objects.lisp +;;;; Purpose: UFFI source to handle objects and pointers +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (defun size-of-foreign-type (type) + #+lispworks (fli:size-of type) + #+allegro (ff:sizeof-fobject type) + #+(or cmu scl) (ash (eval `(alien:alien-size ,type)) -3) ;; convert from bits to bytes + #+sbcl (ash (eval `(sb-alien:alien-size ,type)) -3) ;; convert from bits to bytes + #+clisp (values (ffi:size-of type)) + #+digitool + (let ((mcl-type (ccl:find-mactype type nil t))) + (if mcl-type + (ccl::mactype-record-size mcl-type) + (ccl::record-descriptor-length (ccl:find-record-descriptor type t t)))) ;error if not a record + #+openmcl (ccl::%foreign-type-or-record-size type :bytes) + )) + +(defmacro allocate-foreign-object (type &optional (size :unspecified)) + "Allocates an instance of TYPE. If size is specified, then allocate +an array of TYPE with size SIZE. The TYPE parameter is evaluated." + (if (eq size :unspecified) + (progn + #+(or cmu scl) + `(alien:make-alien ,(convert-from-uffi-type (eval type) :allocation)) + #+sbcl + `(sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation)) + #+lispworks + `(fli:allocate-foreign-object :type ',(convert-from-uffi-type type :allocate)) + #+allegro + `(ff:allocate-fobject ',(convert-from-uffi-type type :allocate) :c) + #+(or openmcl digitool) + `(new-ptr ,(size-of-foreign-type (convert-from-uffi-type type :allocation))) + ) + (progn + #+(or cmu scl) + `(alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) + #+sbcl + `(sb-alien:make-alien ,(convert-from-uffi-type (eval type) :allocation) ,size) + #+lispworks + `(fli:allocate-foreign-object :type ',(convert-from-uffi-type type :allocate) :nelems ,size) + #+allegro + `(ff:allocate-fobject (list :array (quote ,(convert-from-uffi-type type :allocate)) ,size) :c) + #+(or openmcl digitool) + `(new-ptr (* ,size ,(size-of-foreign-type (convert-from-uffi-type type :allocation)))) + ))) + +(defmacro free-foreign-object (obj) + #+(or cmu scl) + `(alien:free-alien ,obj) + #+sbcl + `(sb-alien:free-alien ,obj) + #+lispworks + `(fli:free-foreign-object ,obj) + #+allegro + `(ff:free-fobject ,obj) + #+(or openmcl digitool) + `(dispose-ptr ,obj) + ) + +(defmacro null-pointer-p (obj) + #+lispworks `(fli:null-pointer-p ,obj) + #+allegro `(zerop ,obj) + #+(or cmu scl) `(alien:null-alien ,obj) + #+sbcl `(sb-alien:null-alien ,obj) + #+(or openmcl digitool) `(ccl:%null-ptr-p ,obj) + ) + +(defmacro make-null-pointer (type) + #+(or allegro openmcl digitool) (declare (ignore type)) + #+(or cmu scl) `(alien:sap-alien (system:int-sap 0) (* ,(convert-from-uffi-type (eval type) :type))) + #+sbcl `(sb-alien:sap-alien (sb-sys:int-sap 0) (* ,(convert-from-uffi-type (eval type) :type))) + #+lispworks `(fli:make-pointer :address 0 :type (quote ,(convert-from-uffi-type (eval type) :type))) + #+allegro 0 + #+(or openmcl digitool) `(ccl:%null-ptr) + ) + +(defmacro make-pointer (addr type) + #+(or allegro openmcl digitool) (declare (ignore type)) + #+(or cmu scl) `(alien:sap-alien (system:int-sap ,addr) (* ,(convert-from-uffi-type (eval type) :type))) + #+sbcl `(sb-alien:sap-alien (sb-sys:int-sap ,addr) (* ,(convert-from-uffi-type (eval type) :type))) + #+lispworks `(fli:make-pointer :address ,addr :type (quote ,(convert-from-uffi-type (eval type) :type))) + #+allegro addr + #+(or openmcl digitool) `(ccl:%int-to-ptr ,addr) + ) + + +(defmacro char-array-to-pointer (obj) + #+(or cmu scl) `(alien:cast ,obj (* (alien:unsigned 8))) + #+sbcl `(sb-alien:cast ,obj (* (sb-alien:unsigned 8))) + #+lispworks `(fli:make-pointer :type '(:unsigned :char) + :address (fli:pointer-address ,obj)) + #+allegro obj + #+(or openmcl digitool) obj + ) + +(defmacro deref-pointer (ptr type) + "Returns a object pointed" + #+(or cmu sbcl lispworks scl) (declare (ignore type)) + #+(or cmu scl) `(alien:deref ,ptr) + #+sbcl `(sb-alien:deref ,ptr) + #+lispworks `(fli:dereference ,ptr) + #+allegro `(ff:fslot-value-typed (quote ,(convert-from-uffi-type type :deref)) :c ,ptr) + #+(or openmcl digitool) `(ccl:pref ,ptr ,(convert-from-uffi-type type :deref)) + ) + +#+digitool +(defmacro deref-pointer-set (ptr type value) + `(setf (ccl:pref ,ptr ,(convert-from-uffi-type type :deref)) ,value)) + +#+digitool +(defsetf deref-pointer deref-pointer-set) + +(defmacro ensure-char-character (obj) + #+(or digitool) obj + #+(or allegro cmu sbcl scl openmcl) `(code-char ,obj) + ;; lispworks varies whether deref'ing array vs. slot access of a char + #+lispworks `(if (characterp ,obj) ,obj (code-char ,obj))) + +(defmacro ensure-char-integer (obj) + #+(or digitool) `(char-code ,obj) + #+(or allegro cmu sbcl scl openmcl) obj + ;; lispworks varies whether deref'ing array vs. slot access of a char + #+lispworks + `(if (integerp ,obj) ,obj (char-code ,obj))) + +(defmacro ensure-char-storable (obj) + #+(or digitool (and lispworks (not lispworks5))) obj + #+(or allegro cmu lispworks5 openmcl sbcl scl) + `(char-code ,obj)) + +(defmacro pointer-address (obj) + #+(or cmu scl) + `(system:sap-int (alien:alien-sap ,obj)) + #+sbcl + `(sb-sys:sap-int (sb-alien:alien-sap ,obj)) + #+lispworks + `(fli:pointer-address ,obj) + #+allegro + obj + #+(or openmcl digitool) + `(ccl:%ptr-to-int ,obj) + ) + +;; TYPE is evaluated. +#-(or openmcl digitool) +(defmacro with-foreign-object ((var type) &rest body) + #-(or cmu sbcl lispworks scl) ; default version + `(let ((,var (allocate-foreign-object ,type))) + (unwind-protect + (progn ,@body) + (free-foreign-object ,var))) + #+(or cmu scl) + (let ((obj (gensym)) + (ctype (convert-from-uffi-type (eval type) :allocate))) + (if (and (consp ctype) (eq 'array (car ctype))) + `(alien:with-alien ((,obj ,ctype)) + (let* ((,var ,obj)) + ,@body)) + `(alien:with-alien ((,obj ,ctype)) + (let* ((,var (alien:addr ,obj))) + ,@body)))) + #+sbcl + (let ((obj (gensym)) + (ctype (convert-from-uffi-type (eval type) :allocate))) + (if (and (consp ctype) (eq 'array (car ctype))) + `(sb-alien:with-alien ((,obj ,ctype)) + (let* ((,var ,obj)) + ,@body)) + `(sb-alien:with-alien ((,obj ,ctype)) + (let* ((,var (sb-alien:addr ,obj))) + ,@body)))) + #+lispworks + `(fli:with-dynamic-foreign-objects ((,var ,(convert-from-uffi-type + (eval type) :allocate))) + ,@body) + ) + +#-(or openmcl digitool) +(defmacro with-foreign-objects (bindings &rest body) + (if bindings + `(with-foreign-object ,(car bindings) + (with-foreign-objects ,(cdr bindings) + ,@body)) + `(progn ,@body))) + +#+(or openmcl digitool) +(defmacro with-foreign-objects (bindings &rest body) + (let ((params nil) type count) + (dolist (spec (reverse bindings)) ;keep order - macroexpands to let* + (setf type (convert-from-uffi-type (eval (nth 1 spec)) :allocate)) + (setf count 1) + (when (and (listp type) (eq (first type) :array)) + (setf count (nth 2 type)) + (unless (integerp count) (error "Invalid size for array: ~a" type)) + (setf type (nth 1 type))) + (push (list (first spec) (* count (size-of-foreign-type type))) params)) + `(ccl:%stack-block ,params ,@body))) + +#+(or openmcl digitool) +(defmacro with-foreign-object ((var type) &rest body) + `(with-foreign-objects ((,var ,type)) + ,@body)) + +#+lispworks +(defmacro with-cast-pointer ((binding-name pointer type) &body body) + `(fli:with-coerced-pointer (,binding-name + :type ',(convert-from-uffi-type (eval type) :type)) + ,pointer + ,@body)) + +#+(or cmu scl sbcl) +(defmacro with-cast-pointer ((binding-name pointer type) &body body) + `(let ((,binding-name + (#+(or cmu scl) alien:cast + #+sbcl sb-alien:cast + ,pointer (* ,(convert-from-uffi-type (eval type) :type))))) + ,@body)) + +#+(or allegro openmcl) +(defmacro with-cast-pointer ((binding-name pointer type) &body body) + (declare (ignore type)) + `(let ((,binding-name ,pointer)) + ,@body)) + +#-(or lispworks cmu scl sbcl allegro openmcl) +(defmacro with-cast-pointer ((binding-name pointer type) &body body) + (declare (ignore binding-name pointer type body)) + '(error "WITH-CAST-POINTER not (yet) implemented for ~A" + (lisp-implementation-type))) + +#+(or allegro openmcl) +(defun convert-external-name (name) + "Add an underscore to NAME if necessary for the ABI." + #+(or macosx darwinppc-target) (concatenate 'string "_" name) + #-(or macosx darwinppc-target) name) + +(defmacro def-foreign-var (names type module) + #-lispworks (declare (ignore module)) + (let ((foreign-name (if (atom names) names (first names))) + (lisp-name (if (atom names) (make-lisp-name names) (second names))) + #-allegro + (var-type (convert-from-uffi-type type :type))) + #+(or cmu scl) + `(alien:def-alien-variable (,foreign-name ,lisp-name) ,var-type) + #+sbcl + `(sb-alien:define-alien-variable (,foreign-name ,lisp-name) ,var-type) + #+allegro + `(define-symbol-macro ,lisp-name + (ff:fslot-value-typed (quote ,(convert-from-uffi-type type :deref)) + :c (ff:get-entry-point ,(convert-external-name foreign-name)))) + #+lispworks + `(progn + (fli:define-foreign-variable (,lisp-name ,foreign-name) + :accessor :address-of + :type ,var-type + :module ,module) + (define-symbol-macro ,lisp-name (fli:dereference (,lisp-name) + :copy-foreign-object nil))) + #+openmcl + `(define-symbol-macro ,lisp-name + (deref-pointer (ccl:foreign-symbol-address + ,(convert-external-name foreign-name)) ,var-type)) + #-(or allegro cmu scl sbcl lispworks openmcl) + `(define-symbol-macro ,lisp-name + '(error "DEF-FOREIGN-VAR not (yet) defined for ~A" + (lisp-implementation-type))))) + + +;;; Define a special variable, like DEFVAR, that will be initialized +;;; to a pointer which may need to be reset when a saved image is +;;; loaded. This is needed for OpenMCL, which sets pointers to "dead +;;; macptrs" when a saved image is loaded. +;; This may possibly be needed for sbcl's SAVE-LISP-AND-DIE +(defmacro def-pointer-var (name value &optional doc) + #-openmcl `(defvar ,name ,value ,@(if doc (list doc))) + #+openmcl `(ccl::defloadvar ,name ,value ,doc))
Added: branches/trunk-reorg/thirdparty/uffi/src/os.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/os.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,79 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: os.lisp +;;;; Purpose: Operating system interface for UFFI +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Sep 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg. +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + + +(defun getenv (var) + "Return the value of the environment variable." + #+allegro (sys::getenv (string var)) + #+clisp (sys::getenv (string var)) + #+cmu (cdr (assoc (string var) ext:*environment-list* :test #'equalp + :key #'string)) + #+gcl (si:getenv (string var)) + #+lispworks (lw:environment-variable (string var)) + #+lucid (lcl:environment-variable (string var)) + #+(or openmcl digitool) (ccl::getenv var) + #+sbcl (sb-ext:posix-getenv var) + #-(or allegro clisp cmu gcl lispworks lucid openmcl digitool sbcl) + (error 'not-implemented :proc (list 'getenv var))) + + +;; modified from function ASDF -- Copyright Dan Barlow and Contributors + +(defun run-shell-command (control-string &rest args &key output) + "Interpolate ARGS into CONTROL-STRING as if by FORMAT, and +synchronously execute the result using a Bourne-compatible shell, with +output to *trace-output*. Returns the shell's exit code." + (unless output + (setq output *trace-output*)) + + (let ((command (apply #'format nil control-string args))) + #+sbcl + (sb-impl::process-exit-code + (sb-ext:run-program + "/bin/sh" + (list "-c" command) + :input nil :output output)) + + #+(or cmu scl) + (ext:process-exit-code + (ext:run-program + "/bin/sh" + (list "-c" command) + :input nil :output output)) + + #+allegro + (excl:run-shell-command command :input nil :output output) + + #+lispworks + (system:call-system-showing-output + command + :shell-type "/bin/sh" + :output-stream output) + + #+clisp ;XXX not exactly *trace-output*, I know + (ext:run-shell-command command :output :terminal :wait t) + + #+openmcl + (nth-value 1 + (ccl:external-process-status + (ccl:run-program "/bin/sh" (list "-c" command) + :input nil :output output + :wait t))) + + #-(or openmcl clisp lispworks allegro scl cmu sbcl) + (error "RUN-SHELL-PROGRAM not implemented for this Lisp.") + ))
Added: branches/trunk-reorg/thirdparty/uffi/src/package.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/package.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,84 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: package.lisp +;;;; Purpose: Defines UFFI package +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:cl-user) + +(defpackage #:uffi + (:use #:cl) + (:export + + ;; immediate types + #:def-constant + #:def-foreign-type + #:def-type + #:null-char-p + + ;; aggregate types + #:def-enum + #:def-struct + #:get-slot-value + #:get-slot-pointer + #:def-array-pointer + #:deref-array + #:def-union + + ;; objects + #:allocate-foreign-object + #:free-foreign-object + #:with-foreign-object + #:with-foreign-objects + #:size-of-foreign-type + #:pointer-address + #:deref-pointer + #:ensure-char-character + #:ensure-char-integer + #:ensure-char-storable + #:null-pointer-p + #:make-null-pointer + #:make-pointer + #:pointer-address + #:+null-cstring-pointer+ + #:char-array-to-pointer + #:with-cast-pointer + #:def-foreign-var + #:convert-from-foreign-usb8 + #:def-pointer-var + + ;; string functions + #:convert-from-cstring + #:convert-to-cstring + #:free-cstring + #:with-cstring + #:with-cstrings + #:convert-from-foreign-string + #:convert-to-foreign-string + #:allocate-foreign-string + #:with-foreign-string + #:with-foreign-strings + #:foreign-string-length + + ;; function call + #:def-function + + ;; Libraries + #:find-foreign-library + #:load-foreign-library + #:default-foreign-library-type + #:foreign-library-types + + ;; OS + #:run-shell-command + #:getenv + )) + +
Added: branches/trunk-reorg/thirdparty/uffi/src/primitives.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/primitives.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,311 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: primitives.lisp +;;;; Purpose: UFFI source to handle immediate types +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + +#+(or openmcl digitool) +(defvar *keyword-package* (find-package "KEYWORD")) + +#+(or openmcl digitool) +; MCL and OpenMCL expect a lot of FFI elements to be keywords (e.g. struct field names in OpenMCL) +; So this provides a function to convert any quoted symbols to keywords. +(defun keyword (obj) + (cond ((keywordp obj) + obj) + ((null obj) + nil) + ((symbolp obj) + (intern (symbol-name obj) *keyword-package*)) + ((and (listp obj) (eq (car obj) 'cl:quote)) + (keyword (cadr obj))) + ((stringp obj) + (intern obj *keyword-package*)) + (t + obj))) + +; Wrapper for unexported function we have to use +#+digitool +(defmacro def-mcl-type (name type) + `(ccl::def-mactype ,(keyword name) (ccl:find-mactype ,type))) + +(defmacro def-constant (name value &key (export nil)) + "Macro to define a constant and to export it" + `(eval-when (:compile-toplevel :load-toplevel :execute) + (defconstant ,name ,value) + ,(when export (list 'export `(quote ,name))) + ',name)) + +(defmacro def-type (name type) + "Generates a (deftype) statement for CL. Currently, only CMUCL +supports takes advantage of this optimization." + #+(or lispworks allegro openmcl digitool cormanlisp) (declare (ignore type)) + #+(or lispworks allegro openmcl digitool cormanlisp) `(deftype ,name () t) + #+(or cmu scl) + `(deftype ,name () '(alien:alien ,(convert-from-uffi-type type :declare))) + #+sbcl + `(deftype ,name () '(sb-alien:alien ,(convert-from-uffi-type type :declare))) + ) + +(defmacro null-char-p (val) + "Returns T if character is NULL" + `(zerop ,val)) + +(defmacro def-foreign-type (name type) + #+lispworks `(fli:define-c-typedef ,name ,(convert-from-uffi-type type :type)) + #+allegro `(ff:def-foreign-type ,name ,(convert-from-uffi-type type :type)) + #+(or cmu scl) `(alien:def-alien-type ,name ,(convert-from-uffi-type type :type)) + #+sbcl `(sb-alien:define-alien-type ,name ,(convert-from-uffi-type type :type)) + #+cormanlisp `(ct:defctype ,name ,(convert-from-uffi-type type :type)) + #+(or openmcl digitool) + (let ((mcl-type (convert-from-uffi-type type :type))) + (unless (or (keywordp mcl-type) (consp mcl-type)) + (setf mcl-type `(quote ,mcl-type))) + #+digitool + `(def-mcl-type ,(keyword name) ,mcl-type) + #+openmcl + `(ccl::def-foreign-type ,(keyword name) ,mcl-type)) + ) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (defvar +type-conversion-hash+ (make-hash-table :size 20 :test #'eq)) + #+(or cmu sbcl scl) (defvar *cmu-def-type-hash* + (make-hash-table :size 20 :test #'eq)) + ) + +#+(or cmu scl) +(defvar *cmu-sbcl-def-type-list* + '((:char . (alien:signed 8)) + (:unsigned-char . (alien:unsigned 8)) + (:byte . (alien:signed 8)) + (:unsigned-byte . (alien:unsigned 8)) + (:short . (alien:signed 16)) + (:unsigned-short . (alien:unsigned 16)) + (:int . (alien:signed 32)) + (:unsigned-int . (alien:unsigned 32)) + #-x86-64 (:long . (alien:signed 32)) + #-x86-64 (:unsigned-long . (alien:unsigned 32)) + #+x86-64 (:long . (alien:signed 64)) + #+x86-64 (:unsigned-long . (alien:unsigned 64)) + (:float . alien:single-float) + (:double . alien:double-float) + (:void . t) + ) + "Conversions in CMUCL for def-foreign-type are different than in def-function") + +#+sbcl +(defvar *cmu-sbcl-def-type-list* + '((:char . (sb-alien:signed 8)) + (:unsigned-char . (sb-alien:unsigned 8)) + (:byte . (sb-alien:signed 8)) + (:unsigned-byte . (sb-alien:unsigned 8)) + (:short . (sb-alien:signed 16)) + (:unsigned-short . (sb-alien:unsigned 16)) + (:int . (sb-alien:signed 32)) + (:unsigned-int . (sb-alien:unsigned 32)) + #-x86-64 (:long . (sb-alien:signed 32)) + #-x86-64 (:unsigned-long . (sb-alien:unsigned 32)) + #+x86-64 (:long . (sb-alien:signed 64)) + #+x86-64 (:unsigned-long . (sb-alien:unsigned 64)) + (:float . sb-alien:single-float) + (:double . sb-alien:double-float) + (:void . t) + ) + "Conversions in SBCL for def-foreign-type are different than in def-function") + +(defvar *type-conversion-list* nil) + +#+(or cmu scl) +(setq *type-conversion-list* + '((* . *) (:void . c-call:void) + (:pointer-void . (* t)) + (:cstring . c-call:c-string) + (:char . c-call:char) + (:unsigned-char . (alien:unsigned 8)) + (:byte . (alien:signed 8)) + (:unsigned-byte . (alien:unsigned 8)) + (:short . c-call:short) + (:unsigned-short . c-call:unsigned-short) + (:int . alien:integer) (:unsigned-int . c-call:unsigned-int) + (:long . c-call:long) (:unsigned-long . c-call:unsigned-long) + (:float . c-call:float) (:double . c-call:double) + (:array . alien:array))) + +#+sbcl +(setq *type-conversion-list* + '((* . *) (:void . sb-alien:void) + (:pointer-void . (* t)) + #-sb-unicode(:cstring . sb-alien:c-string) + #+sb-unicode(:cstring . sb-alien:utf8-string) + (:char . sb-alien:char) + (:unsigned-char . (sb-alien:unsigned 8)) + (:byte . (sb-alien:signed 8)) + (:unsigned-byte . (sb-alien:unsigned 8)) + (:short . sb-alien:short) + (:unsigned-short . sb-alien:unsigned-short) + (:int . sb-alien:int) (:unsigned-int . sb-alien:unsigned-int) + (:long . sb-alien:long) (:unsigned-long . sb-alien:unsigned-long) + (:float . sb-alien:float) (:double . sb-alien:double) + (:array . sb-alien:array))) + +#+(or allegro cormanlisp) +(setq *type-conversion-list* + '((* . *) (:void . :void) + (:short . :short) + (:pointer-void . (* :void)) + (:cstring . (* :unsigned-char)) + (:byte . :char) + (:unsigned-byte . :unsigned-char) + (:char . :char) + (:unsigned-char . :unsigned-char) + (:int . :int) (:unsigned-int . :unsigned-int) + (:long . :long) (:unsigned-long . :unsigned-long) + (:float . :float) (:double . :double) + (:array . :array))) + +#+lispworks +(setq *type-conversion-list* + '((* . :pointer) (:void . :void) + (:short . :short) + (:pointer-void . (:pointer :void)) + (:cstring . (:reference-pass (:ef-mb-string :external-format + (:latin-1 :eol-style :lf)) + :allow-null t)) + (:cstring-returning . (:reference (:ef-mb-string :external-format + (:latin-1 :eol-style :lf)) + :allow-null t)) + (:byte . :byte) + (:unsigned-byte . (:unsigned :byte)) + (:char . :char) + (:unsigned-char . (:unsigned :char)) + (:int . :int) (:unsigned-int . (:unsigned :int)) + (:long . :long) (:unsigned-long . (:unsigned :long)) + (:float . :float) (:double . :double) + (:array . :c-array))) + +#+digitool +(setq *type-conversion-list* + '((* . :pointer) (:void . :void) + (:short . :short) (:unsigned-short . :unsigned-short) + (:pointer-void . :pointer) + (:cstring . :string) + (:char . :character) + (:unsigned-char . :unsigned-byte) + (:byte . :signed-byte) (:unsigned-byte . :unsigned-byte) + (:int . :long) (:unsigned-int . :unsigned-long) + (:long . :long) (:unsigned-long . :unsigned-long) + (:float . :single-float) (:double . :double-float) + (:array . :array))) + +#+openmcl +(setq *type-conversion-list* + '((* . :address) (:void . :void) + (:short . :short) (:unsigned-short . :unsigned-short) + (:pointer-void . :address) + (:cstring . :address) + (:char . :signed-char) + (:unsigned-char . :unsigned-char) + (:byte . :signed-byte) (:unsigned-byte . :unsigned-byte) + (:int . :int) (:unsigned-int . :unsigned-int) + (:long . :long) (:unsigned-long . :unsigned-long) + (:long-long . :signed-doubleword) (:unsigned-long-long . :unsigned-doubleword) + (:float . :single-float) (:double . :double-float) + (:array . :array))) + +(dolist (type *type-conversion-list*) + (setf (gethash (car type) +type-conversion-hash+) (cdr type))) + +#+(or cmu sbcl scl) +(dolist (type *cmu-sbcl-def-type-list*) + (setf (gethash (car type) *cmu-def-type-hash*) (cdr type))) + +(defun basic-convert-from-uffi-type (type) + (let ((found-type (gethash type +type-conversion-hash+))) + (if found-type + found-type + #-(or openmcl digitool) type + #+(or openmcl digitool) (keyword type)))) + +(defun %convert-from-uffi-type (type context) + "Converts from a uffi type to an implementation specific type" + (if (atom type) + (cond + #+(or allegro cormanlisp) + ((and (or (eq context :routine) (eq context :return)) + (eq type :cstring)) + (setq type '((* :char) integer))) + #+(or cmu sbcl scl) + ((eq context :type) + (let ((cmu-type (gethash type *cmu-def-type-hash*))) + (if cmu-type + cmu-type + (basic-convert-from-uffi-type type)))) + #+lispworks + ((and (eq context :return) + (eq type :cstring)) + (basic-convert-from-uffi-type :cstring-returning)) + #+digitool + ((and (eq type :void) (eq context :return)) nil) + (t + (basic-convert-from-uffi-type type))) + (let ((sub-type (car type))) + (case sub-type + (cl:quote + (convert-from-uffi-type (cadr type) context)) + (:struct-pointer + #+(or openmcl digitool) `(:* (:struct ,(%convert-from-uffi-type (cadr type) :struct))) + #-(or openmcl digitool) (%convert-from-uffi-type (list '* (cadr type)) :struct) + ) + (:struct + #+(or openmcl digitool) `(:struct ,(%convert-from-uffi-type (cadr type) :struct)) + #-(or openmcl digitool) (%convert-from-uffi-type (cadr type) :struct) + ) + (:union + #+(or openmcl digitool) `(:union ,(%convert-from-uffi-type (cadr type) :union)) + #-(or openmcl digitool) (%convert-from-uffi-type (cadr type) :union) + ) + (t + (cons (%convert-from-uffi-type (first type) context) + (%convert-from-uffi-type (rest type) context))))))) + +(defun convert-from-uffi-type (type context) + (let ((result (%convert-from-uffi-type type context))) + (cond + ((atom result) result) + #+openmcl + ((eq (car result) :address) + (if (eq context :struct) + (append '(:*) (cdr result)) + :address)) + #+digitool + ((and (eq (car result) :pointer) (eq context :allocation) :pointer)) + (t result)))) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (when (char= #\a (schar (symbol-name '#:a) 0)) + (pushnew :uffi-lowercase-reader *features*)) + (when (not (string= (symbol-name '#:a) + (symbol-name '#:A))) + (pushnew :uffi-case-sensitive *features*))) + +(defun make-lisp-name (name) + (let ((converted (substitute #- #_ name))) + (intern + #+uffi-case-sensitive converted + #+(and (not uffi-lowercase-reader) (not uffi-case-sensitive)) (string-upcase converted) + #+(and uffi-lowercase-reader (not uffi-case-sensitive)) (string-downcase converted)))) + +(eval-when (:compile-toplevel :load-toplevel :execute) + (setq cl:*features* (delete :uffi-lowercase-reader *features*)) + (setq cl:*features* (delete :uffi-case-sensitive *features*)))
Added: branches/trunk-reorg/thirdparty/uffi/src/readmacros-mcl.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/readmacros-mcl.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,35 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: readmacros-mcl.lisp +;;;; Purpose: This file holds functions using read macros for MCL +;;;; Programmer: Kevin M. Rosenberg/John Desoi +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi) + + +;; trap macros don't work right directly in the macros +#+digitool +(defun new-ptr (size) + (#_NewPtr size)) + +#+digitool +(defun dispose-ptr (ptr) + (#_DisposePtr ptr)) + +#+openmcl +(defmacro new-ptr (size) + `(ccl::malloc ,size)) + +#+openmcl +(defmacro dispose-ptr (ptr) + `(ccl::free ,ptr)) +
Added: branches/trunk-reorg/thirdparty/uffi/src/strings.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/src/strings.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,412 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10; Package: UFFI -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: strings.lisp +;;;; Purpose: UFFI source to handle strings, cstring and foreigns +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; ************************************************************************* + +(in-package #:uffi) + + +(def-pointer-var +null-cstring-pointer+ + #+(or cmu sbcl scl) nil + #+allegro 0 + #+lispworks (fli:make-pointer :address 0 :type '(:unsigned :char)) + #+(or openmcl digitool) (ccl:%null-ptr) +) + +(defmacro convert-from-cstring (obj) + "Converts a string from a c-call. Same as convert-from-foreign-string, except +that LW/CMU automatically converts strings from c-calls." + #+(or cmu sbcl lispworks scl) obj + #+allegro + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (zerop ,stored) + nil + (values (excl:native-to-string ,stored))))) + #+(or openmcl digitool) + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (ccl:%null-ptr-p ,stored) + nil + (values (ccl:%get-cstring ,stored))))) + ) + +(defmacro convert-to-cstring (obj) + #+(or cmu sbcl scl lispworks) obj + #+allegro + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (null ,stored) + 0 + (values (excl:string-to-native ,stored))))) + #+(or openmcl digitool) + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (null ,stored) + +null-cstring-pointer+ + (let ((ptr (new-ptr (1+ (length ,stored))))) + (ccl::%put-cstring ptr ,stored) + ptr)))) + ) + +(defmacro free-cstring (obj) + #+(or cmu sbcl scl lispworks) (declare (ignore obj)) + #+allegro + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (unless (zerop ,stored) + (ff:free-fobject ,stored)))) + #+(or openmcl digitool) + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (unless (ccl:%null-ptr-p ,stored) + (dispose-ptr ,stored)))) + ) + +(defmacro with-cstring ((cstring lisp-string) &body body) + #+(or cmu sbcl scl lispworks) + `(let ((,cstring ,lisp-string)) ,@body) + #+allegro + (let ((acl-native (gensym)) + (stored-lisp-string (gensym))) + `(let ((,stored-lisp-string ,lisp-string)) + (excl:with-native-string (,acl-native ,stored-lisp-string) + (let ((,cstring (if ,stored-lisp-string ,acl-native 0))) + ,@body)))) + #+(or openmcl digitool) + (let ((stored-lisp-string (gensym))) + `(let ((,stored-lisp-string ,lisp-string)) + (if (stringp ,stored-lisp-string) + (ccl:with-cstrs ((,cstring ,stored-lisp-string)) + ,@body) + (let ((,cstring +null-cstring-pointer+)) + ,@body)))) + ) + +(defmacro with-cstrings (bindings &rest body) + (if bindings + `(with-cstring ,(car bindings) + (with-cstrings ,(cdr bindings) + ,@body)) + `(progn ,@body))) + +;;; Foreign string functions + +(defmacro convert-to-foreign-string (obj) + #+lispworks + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (null ,stored) + +null-cstring-pointer+ + (fli:convert-to-foreign-string + ,stored + :external-format '(:latin-1 :eol-style :lf))))) + #+allegro + (let ((stored (gensym))) + `(let ((,stored ,obj)) + (if (null ,stored) + 0 + (values (excl:string-to-native ,stored))))) + #+(or cmu scl) + (let ((size (gensym)) + (storage (gensym)) + (stored-obj (gensym)) + (i (gensym))) + `(let ((,stored-obj ,obj)) + (etypecase ,stored-obj + (null + (alien:sap-alien (system:int-sap 0) (* (alien:unsigned 8)))) + (string + (let* ((,size (length ,stored-obj)) + (,storage (alien:make-alien (alien:unsigned 8) (1+ ,size)))) + (setq ,storage (alien:cast ,storage (* (alien:unsigned 8)))) + (locally + (declare (optimize (speed 3) (safety 0))) + (dotimes (,i ,size) + (declare (fixnum ,i)) + (setf (alien:deref ,storage ,i) + (char-code (char ,stored-obj ,i)))) + (setf (alien:deref ,storage ,size) 0)) + ,storage))))) + #+sbcl + (let ((size (gensym)) + (storage (gensym)) + (stored-obj (gensym)) + (i (gensym))) + `(let ((,stored-obj ,obj)) + (etypecase ,stored-obj + (null + (sb-alien:sap-alien (sb-sys:int-sap 0) (* (sb-alien:unsigned 8)))) + (string + (let* ((,size (length ,stored-obj)) + (,storage (sb-alien:make-alien (sb-alien:unsigned 8) (1+ ,size)))) + (setq ,storage (sb-alien:cast ,storage (* (sb-alien:unsigned 8)))) + (locally + (declare (optimize (speed 3) (safety 0))) + (dotimes (,i ,size) + (declare (fixnum ,i)) + (setf (sb-alien:deref ,storage ,i) + (char-code (char ,stored-obj ,i)))) + (setf (sb-alien:deref ,storage ,size) 0)) + ,storage))))) + #+(or openmcl digitool) + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (null ,stored-obj) + +null-cstring-pointer+ + (let ((ptr (new-ptr (1+ (length ,stored-obj))))) + (ccl::%put-cstring ptr ,stored-obj) + ptr)))) + ) + +;; Either length or null-terminated-p must be non-nil +(defmacro convert-from-foreign-string (obj &key + length + (locale :default) + (null-terminated-p t)) + #+allegro + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (zerop ,stored-obj) + nil + (if (eq ,locale :none) + (fast-native-to-string ,stored-obj ,length) + (values + (excl:native-to-string + ,stored-obj + ,@(when length (list :length length)) + :truncate (not ,null-terminated-p))))))) + #+lispworks + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (fli:null-pointer-p ,stored-obj) + nil + (if (eq ,locale :none) + (fast-native-to-string ,stored-obj ,length) + (fli:convert-from-foreign-string + ,stored-obj + ,@(when length (list :length length)) + :null-terminated-p ,null-terminated-p + :external-format '(:latin-1 :eol-style :lf)))))) + #+(or cmu scl) + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (null-pointer-p ,stored-obj) + nil + (cmucl-naturalize-cstring (alien:alien-sap ,stored-obj) + :length ,length + :null-terminated-p ,null-terminated-p)))) + + #+sbcl + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (null-pointer-p ,stored-obj) + nil + (sbcl-naturalize-cstring (sb-alien:alien-sap ,stored-obj) + :length ,length + :null-terminated-p ,null-terminated-p)))) + #+(or openmcl digitool) + (declare (ignore null-terminated-p)) + #+(or openmcl digitool) + (let ((stored-obj (gensym))) + `(let ((,stored-obj ,obj)) + (if (ccl:%null-ptr-p ,stored-obj) + nil + #+digitool (ccl:%get-cstring + ,stored-obj 0 + ,@(if length (list length) nil)) + #+openmcl ,@(if length + `((ccl:%str-from-ptr ,stored-obj ,length)) + `((ccl:%get-cstring ,stored-obj)))))) + ) + + +(defmacro allocate-foreign-string (size &key (unsigned t)) + #+ignore + (let ((array-def (gensym))) + `(let ((,array-def (list 'alien:array 'c-call:char ,size))) + (eval `(alien:cast (alien:make-alien ,,array-def) + ,(if ,unsigned + '(* (alien:unsigned 8)) + '(* (alien:signed 8))))))) + + #+(or cmu scl) + `(alien:make-alien ,(if unsigned + '(alien:unsigned 8) + '(alien:signed 8)) + ,size) + + #+sbcl + `(sb-alien:make-alien ,(if unsigned + '(sb-alien:unsigned 8) + '(sb-alien:signed 8)) + ,size) + + #+lispworks + `(fli:allocate-foreign-object :type + ,(if unsigned + ''(:unsigned :char) + :char) + :nelems ,size) + #+allegro + (declare (ignore unsigned)) + #+allegro + `(ff:allocate-fobject :char :c ,size) + #+(or openmcl digitool) + (declare (ignore unsigned)) + #+(or openmcl digitool) + `(new-ptr ,size) + ) + +(defun foreign-string-length (foreign-string) + #+allegro `(ff:foreign-strlen ,foreign-string) + #-allegro + `(loop with size = 0 + until (char= (deref-array ,foreign-string '(:array :unsigned-char) size) #\Null) + do (incf size) + finally return size)) + + +(defmacro with-foreign-string ((foreign-string lisp-string) &body body) + (let ((result (gensym))) + `(let* ((,foreign-string (convert-to-foreign-string ,lisp-string)) + (,result (progn ,@body))) + (declare (dynamic-extent ,foreign-string)) + (free-foreign-object ,foreign-string) + ,result))) + +(defmacro with-foreign-strings (bindings &body body) + `(with-foreign-string ,(car bindings) + ,@(if (cdr bindings) + `((with-foreign-strings ,(cdr bindings) ,@body)) + body))) + +;; Modified from CMUCL's source to handle non-null terminated strings +#+cmu +(defun cmucl-naturalize-cstring (sap &key length (null-terminated-p t)) + (declare (type system:system-area-pointer sap)) + (locally + (declare (optimize (speed 3) (safety 0))) + (let ((null-terminated-length + (when null-terminated-p + (loop + for offset of-type fixnum upfrom 0 + until (zerop (system:sap-ref-8 sap offset)) + finally (return offset))))) + (if length + (if (and null-terminated-length + (> (the fixnum length) (the fixnum null-terminated-length))) + (setq length null-terminated-length)) + (setq length null-terminated-length))) + (let ((result (make-string length))) + (kernel:copy-from-system-area sap 0 + result (* vm:vector-data-offset + vm:word-bits) + (* length vm:byte-bits)) + result))) + +#+scl +;; kernel:copy-from-system-area doesn't work like it does on CMUCL or SBCL, +;; so have to iteratively copy from sap +(defun cmucl-naturalize-cstring (sap &key length (null-terminated-p t)) + (declare (type system:system-area-pointer sap)) + (locally + (declare (optimize (speed 3) (safety 0))) + (let ((null-terminated-length + (when null-terminated-p + (loop + for offset of-type fixnum upfrom 0 + until (zerop (system:sap-ref-8 sap offset)) + finally (return offset))))) + (if length + (if (and null-terminated-length + (> (the fixnum length) (the fixnum null-terminated-length))) + (setq length null-terminated-length)) + (setq length null-terminated-length))) + (let ((result (make-string length))) + (dotimes (i length) + (declare (type fixnum i)) + (setf (char result i) (code-char (system:sap-ref-8 sap i)))) + result))) + +#+(and sbcl (not sb-unicode)) +(defun sbcl-naturalize-cstring (sap &key length (null-terminated-p t)) + (declare (type sb-sys:system-area-pointer sap) + (type (or null fixnum) length)) + (locally + (declare (optimize (speed 3) (safety 0))) + (let ((null-terminated-length + (when null-terminated-p + (loop + for offset of-type fixnum upfrom 0 + until (zerop (sb-sys:sap-ref-8 sap offset)) + finally (return offset))))) + (if length + (if (and null-terminated-length + (> (the fixnum length) (the fixnum null-terminated-length))) + (setq length null-terminated-length)) + (setq length null-terminated-length))) + (let ((result (make-string length))) + (funcall *system-copy-fn* sap 0 result +system-copy-offset+ + (* length +system-copy-multiplier+)) + result))) + +#+(and sbcl sb-unicode) +(defun sbcl-naturalize-cstring (sap &key length (null-terminated-p t)) + (declare (type sb-sys:system-area-pointer sap) + (type (or null fixnum) length)) + (locally + (declare (optimize (speed 3) (safety 0))) + (cond + (null-terminated-p + (let ((casted (sb-alien:cast (sb-alien:sap-alien sap (* char)) + #+sb-unicode sb-alien:utf8-string + #-sb-unicode sb-alien:c-string))) + (if length + (copy-seq (subseq casted 0 length)) + (copy-seq casted)))) + (t + (let ((result (make-string length))) + ;; this will not work in sb-unicode + (funcall *system-copy-fn* sap 0 result +system-copy-offset+ + (* length +system-copy-multiplier+)) + result))))) + + +(eval-when (:compile-toplevel :load-toplevel :execute) + (def-function "strlen" + ((str (* :unsigned-char))) + :returning :unsigned-int)) + +(def-type char-ptr-def (* :unsigned-char)) + +#+(or (and allegro (not ics)) (and lispworks (not lispworks5))) +(defun fast-native-to-string (s len) + (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0)) + (type char-ptr-def s)) + (let* ((len (or len (strlen s))) + (str (make-string len))) + (declare (fixnum len) + (type (simple-array #+lispworks base-char + #-lispworks (signed-byte 8) (*)) str)) + (dotimes (i len str) + (setf (aref str i) + (uffi:deref-array s '(:array :char) i))))) + +#+(or (and allegro ics) lispworks5) +(defun fast-native-to-string (s len) + (declare (optimize (speed 3) (space 0) (safety 0) (compilation-speed 0)) + (type char-ptr-def s)) + (let* ((len (or len (strlen s))) + (str (make-string len))) + (dotimes (i len str) + (setf (schar str i) (code-char (uffi:deref-array s '(:array :unsigned-byte) i))))))
Added: branches/trunk-reorg/thirdparty/uffi/tests/Makefile ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/Makefile Mon Feb 11 09:06:27 2008 @@ -0,0 +1,30 @@ +# FILE IDENTIFICATION +# +# Name: Makefile +# Purpose: Makefile for UFFI examples +# Programer: Kevin M. Rosenberg +# Date Started: Mar 2002 +# +# CVS Id: $Id$ +# +# This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg + +SUBDIRS= + +include ../Makefile.common + +base=uffi-c-test +source=$(base).c +object=$(base).o +shared_lib=$(base).so + +.PHONY: all +all: $(shared_lib) + +$(shared_lib): $(source) Makefile + BASE=$(base) OBJECT=$(object) SOURCE=$(source) SHARED_LIB=$(shared_lib) sh make.sh + rm $(object) + +.PHONY: distclean +distclean: clean + rm -f $(base).dylib $(base).dylib $(base).so $(base).o
Added: branches/trunk-reorg/thirdparty/uffi/tests/Makefile.msvc ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/Makefile.msvc Mon Feb 11 09:06:27 2008 @@ -0,0 +1,28 @@ +# FILE IDENTIFICATION +# +# Name: Makefile.msvc +# Purpose: Makefile for the CLSQL UFFI helper package (MSVC) +# Programer: Kevin M. Rosenberg +# Date Started: Mar 2002 +# +# CVS Id: $Id: Makefile.msvc,v 1.1 2002/03/23 10:26:03 kevin Exp $ +# +# This file, part of CLSQL, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +# + +BASE=c-test-fns + +# Nothing to configure beyond here + +SRC=$(BASE).c +OBJ=$(BASE).obj +DLL=$(BASE).dll + +$(DLL): $(SRC) + cl /MD /LD -D_MT /DWIN32=1 $(SRC) + del $(OBJ) $(BASE).exp + +clean: + del /q $(DLL) + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/arrays.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/arrays.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,57 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: arrays.lisp +;;;; Purpose: UFFI test arrays +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-constant +column-length+ 10) +(uffi:def-constant +row-length+ 10) + +(uffi:def-foreign-type long-ptr (* :long)) + +(deftest :array.1 + (let ((a (uffi:allocate-foreign-object :long +column-length+)) + (results nil)) + (dotimes (i +column-length+) + (setf (uffi:deref-array a '(:array :long) i) (* i i))) + (dotimes (i +column-length+) + (push (uffi:deref-array a '(:array :long) i) results)) + (uffi:free-foreign-object a) + (nreverse results)) + (0 1 4 9 16 25 36 49 64 81)) + + +(deftest :array.2 + (let ((a (uffi:allocate-foreign-object 'long-ptr +row-length+)) + (results nil)) + (dotimes (r +row-length+) + (declare (fixnum r)) + (setf (uffi:deref-array a '(:array (* :long)) r) + (uffi:allocate-foreign-object :long +column-length+)) + (let ((col (uffi:deref-array a '(:array (* :long)) r))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (setf (uffi:deref-array col '(:array :long) c) (+ (* r +column-length+) c))))) + + (dotimes (r +row-length+) + (declare (fixnum r)) + (let ((col (uffi:deref-array a '(:array (* :long)) r))) + (dotimes (c +column-length+) + (declare (fixnum c)) + (push (uffi:deref-array col '(:array :long) c) results)))) + (uffi:free-foreign-object a) + (nreverse results)) + (0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99)) + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/atoifl.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/atoifl.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,42 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: atoifl.lisp +;;;; Purpose: UFFI Example file to atoi/atof/atol +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-function ("atoi" c-atoi) + ((str :cstring)) + :returning :int) + +(uffi:def-function ("atol" c-atol) + ((str :cstring)) + :returning :long) + +(uffi:def-function ("atof" c-atof) + ((str :cstring)) + :returning :double) + +(defun atoi (str) + "Returns a int from a string." + (uffi:with-cstring (str-cstring str) + (c-atoi str-cstring))) + +(defun atof (str) + "Returns a double float from a string." + (uffi:with-cstring (str-cstring str) + (c-atof str-cstring))) + +(deftest :atoi.1 (atoi "123") 123) +(deftest :atoi.2 (atoi "") 0) +(deftest :atof.3 (atof "2.23") 2.23d0)
Added: branches/trunk-reorg/thirdparty/uffi/tests/casts.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/casts.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,51 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICAION +;;;; +;;;; Name: casts.lisp +;;;; Purpose: Tests of with-cast-pointer +;;;; Programmer: Kevin M. Rosenberg / Edi Weitz +;;;; Date Started: Aug 2003 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2003-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-function ("cast_test_int" cast-test-int) + () + :module "uffi_tests" + :returning :pointer-void) + +(uffi:def-function ("cast_test_float" cast-test-float) + () + :module "uffi_tests" + :returning :pointer-void) + +(deftest :cast.1 + (progn + (uffi:with-cast-pointer (temp (cast-test-int) :int) + (assert (= (uffi:deref-pointer temp :int) 23))) + (let ((result (cast-test-int))) + (uffi:with-cast-pointer (result2 result :int) + (assert (= (uffi:deref-pointer result2 :int) 23))) + (uffi:with-cast-pointer (temp result :int) + (assert (= (uffi:deref-pointer temp :int) 23)))) + t) + t) + +(deftest :cast.2 + (progn + (uffi:with-cast-pointer (temp (cast-test-float) :double) + (assert (= (uffi:deref-pointer temp :double) 3.21d0))) + (let ((result (cast-test-float))) + (uffi:with-cast-pointer (result2 result :double) + (assert (= (uffi:deref-pointer result2 :double) 3.21d0))) + (uffi:with-cast-pointer (temp result :double) + (assert (= (uffi:deref-pointer temp :double) 3.21d0)))) + t) + t) +
Added: branches/trunk-reorg/thirdparty/uffi/tests/compress.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/compress.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,92 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: compress.lisp +;;;; Purpose: UFFI Example file for zlib compression +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-function ("compress" c-compress) + ((dest (* :unsigned-char)) + (destlen (* :long)) + (source :cstring) + (source-len :long)) + :returning :int + :module "zlib") + +(defun compress (source) + "Returns two values: array of bytes containing the compressed data + and the numbe of compressed bytes" + (let* ((sourcelen (length source)) + (destsize (+ 12 (ceiling (* sourcelen 1.01)))) + (dest (uffi:allocate-foreign-string destsize :unsigned t)) + (destlen (uffi:allocate-foreign-object :long))) + (setf (uffi:deref-pointer destlen :long) destsize) + (uffi:with-cstring (source-native source) + (let ((result (c-compress dest destlen source-native sourcelen)) + (newdestlen (uffi:deref-pointer destlen :long))) + (unwind-protect + (if (zerop result) + (values (uffi:convert-from-foreign-usb8 + dest newdestlen) + newdestlen) + (error "zlib error, code ~D" result)) + (progn + (uffi:free-foreign-object destlen) + (uffi:free-foreign-object dest))))))) + +(uffi:def-function ("uncompress" c-uncompress) + ((dest (* :unsigned-char)) + (destlen (* :long)) + (source :cstring) + (source-len :long)) + :returning :int + :module "zlib") + +(defun uncompress (source) + (let* ((sourcelen (length source)) + (destsize 200000) ;adjust as needed + (dest (uffi:allocate-foreign-string destsize :unsigned t)) + (destlen (uffi:allocate-foreign-object :long))) + (setf (uffi:deref-pointer destlen :long) destsize) + (uffi:with-cstring (source-native source) + (let ((result (c-uncompress dest destlen source-native sourcelen)) + (newdestlen (uffi:deref-pointer destlen :long))) + (unwind-protect + (if (zerop result) + (uffi:convert-from-foreign-string + dest + :length newdestlen + :null-terminated-p nil) + (error "zlib error, code ~D" result)) + (progn + (uffi:free-foreign-object destlen) + (uffi:free-foreign-object dest))))))) + +(deftest :compress.1 (compress "") + #(120 156 3 0 0 0 0 1) 8) +(deftest :compress.2 (compress "test") + #(120 156 43 73 45 46 1 0 4 93 1 193) 12) +(deftest :compress.3 (compress "test2") + #(120 156 43 73 45 46 49 2 0 6 80 1 243) 13) + +(defun compress-uncompress (str) + (multiple-value-bind (compressed len) (compress str) + (declare (ignore len)) + (multiple-value-bind (uncompressed len2) (uncompress compressed) + (declare (ignore len2)) + uncompressed))) + + +(deftest :uncompress.1 "" "") +(deftest :uncompress.2 "test" "test") +(deftest :uncompress.3 "test2" "test2")
Added: branches/trunk-reorg/thirdparty/uffi/tests/foreign-loader.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/foreign-loader.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,47 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: foreign-loader.lisp +;;;; Purpose: Loads foreign libraries +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +;;; For CMUCL, it's necessary to load foreign files separate from their +;;; usage + +(in-package uffi-tests) + +#+clisp (uffi:load-foreign-library "/usr/lib/libz.so" :module "z") +#-clisp +(unless (uffi:load-foreign-library + (uffi:find-foreign-library + #-(or macosx darwin) + "libz" + #+(or macosx darwin) + "z" + (list (pathname-directory *load-pathname*) + "/usr/local/lib/" #+(or 64bit x86-64) "/usr/lib64/" + "/usr/lib/" "/zlib/")) + :module "zlib" + :supporting-libraries '("c")) + (warn "Unable to load zlib")) + +#+clisp (uffi:load-foreign-library "/home/kevin/debian/src/uffi/tests/uffi-c-test.so" :module "uffi_tests") +#-clisp +(unless (uffi:load-foreign-library + (uffi:find-foreign-library + '(#+(or 64bit x86-64) "uffi-c-test64" "uffi-c-test") + (list (pathname-directory *load-truename*) + "/usr/lib/uffi/" + "/home/kevin/debian/src/uffi/tests/")) + :supporting-libraries '("c") + :module "uffi_tests") + (warn "Unable to load uffi-c-test library")) +
Added: branches/trunk-reorg/thirdparty/uffi/tests/foreign-var.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/foreign-var.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,88 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: foreign-var +;;;; Purpose: Tests of foreign variables +;;;; Authors: Kevin M. Rosenberg and Edi Weitz +;;;; Date Started: Aug 2003 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2003-2005 by Kevin M. Rosenberg +;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(def-foreign-var "uchar_13" :unsigned-byte "uffi_tests") +(def-foreign-var "schar_neg_120" :byte "uffi_tests") +(def-foreign-var "uword_257" :unsigned-short "uffi_tests") +(def-foreign-var "sword_neg_321" :short "uffi_tests") +(def-foreign-var "uint_1234567" :int "uffi_tests") +(def-foreign-var "sint_neg_123456" :int "uffi_tests") +(def-foreign-var "float_neg_4_5" :float "uffi_tests") +(def-foreign-var "double_3_1" :double "uffi_tests") + +(deftest :fvar.1 uchar-13 13) +(deftest :fvar.2 schar-neg-120 -120) +(deftest :fvar.3 uword-257 257) +(deftest :fvar.4 sword-neg-321 -321) +(deftest :fvar.5 uint-1234567 1234567) +(deftest :fvar.6 sint-neg-123456 -123456) +(deftest :fvar.7 float-neg-4-5 -4.5f0) +(deftest :fvar.8 double-3-1 3.1d0) + +(uffi:def-foreign-var ("fvar_addend" *fvar-addend*) :int "uffi_tests") + +(uffi:def-struct fvar-struct + (i :int) + (d :double)) + +(uffi:def-foreign-var ("fvar_struct" *fvar-struct*) fvar-struct + "uffi_tests") + +(uffi:def-function ("fvar_struct_int" fvar-struct-int) + () + :returning :int + :module "uffi_tests") + + (uffi:def-function ("fvar_struct_double" fvar-struct-double) + () + :returning :double + :module "uffi_tests") + +(deftest :fvarst.1 *fvar-addend* 3) +(deftest :fvarst.2 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 42) +(deftest :fvarst.3 (= (+ *fvar-addend* + (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i)) + (fvar-struct-int)) + t) +(deftest :fvarst.4 (uffi:get-slot-value *fvar-struct* 'fvar-struct 'd) 3.2d0) +(deftest :fvarst.5 (= (uffi:get-slot-value *fvar-struct* 'fvar-struct 'd) + (fvar-struct-double)) + t) + +(deftest fvarst.6 + (let ((orig *fvar-addend*)) + (incf *fvar-addend* 3) + (prog1 + *fvar-addend* + (setf *fvar-addend* orig))) + 6) + +(deftest fvarst.7 + (let ((orig *fvar-addend*)) + (incf *fvar-addend* 3) + (prog1 + (fvar-struct-int) + (setf *fvar-addend* orig))) + 48) + +(deftest fvarst.8 + (let ((orig (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i))) + (decf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) 10) + (prog1 + (fvar-struct-int) + (setf (uffi:get-slot-value *fvar-struct* 'fvar-struct 'i) orig))) + 35)
Added: branches/trunk-reorg/thirdparty/uffi/tests/getenv.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/getenv.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,64 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: getenv.lisp +;;;; Purpose: UFFI Example file to get environment variable +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + + +(uffi:def-function ("getenv" c-getenv) + ((name :cstring)) + :returning :cstring) + +(uffi:def-function ("setenv" c-setenv) + ((name :cstring) + (value :cstring) + (overwrite :int)) + :returning :int) + +(uffi:def-function ("unsetenv" c-unsetenv) + ((name :cstring)) + :returning :void) + +(defun my-getenv (key) + "Returns an environment variable, or NIL if it does not exist" + (check-type key string) + (uffi:with-cstring (key-native key) + (uffi:convert-from-cstring (c-getenv key-native)))) + +(defun my-setenv (key name &optional (overwrite t)) + "Returns an environment variable, or NIL if it does not exist" + (check-type key string) + (check-type name string) + (setq overwrite (if overwrite 1 0)) + (uffi:with-cstrings ((key-native key) + (name-native name)) + (c-setenv key-native name-native (if overwrite 1 0)))) + +(defun my-unsetenv (key) + "Returns an environment variable, or NIL if it does not exist" + (check-type key string) + (uffi:with-cstrings ((key-native key)) + (c-unsetenv key-native))) + +(deftest :getenv.1 (progn + (my-unsetenv "__UFFI_FOO1__") + (my-getenv "__UFFI_FOO1__")) + nil) +(deftest :getenv.2 (progn + (my-setenv "__UFFI_FOO1__" "UFFI-TEST") + (my-getenv "__UFFI_FOO1__")) + "UFFI-TEST") + + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/gethostname.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/gethostname.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,52 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: gethostname.lisp +;;;; Purpose: UFFI Example file to get hostname of system +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + + +;;; This example is inspired by the example on the CL-Cookbook web site + +(eval-when (:compile-toplevel :load-toplevel :execute) + (uffi:def-function ("gethostname" c-gethostname) + ((name (* :unsigned-char)) + (len :int)) + :returning :int) + + (defun gethostname () + "Returns the hostname" + (let* ((name (uffi:allocate-foreign-string 256)) + (result-code (c-gethostname name 256)) + (hostname (when (zerop result-code) + (uffi:convert-from-foreign-string name)))) + (uffi:free-foreign-object name) + (unless (zerop result-code) + (error "gethostname() failed.")) + hostname)) + + (defun gethostname2 () + "Returns the hostname" + (uffi:with-foreign-object (name '(:array :unsigned-char 256)) + (if (zerop (c-gethostname (uffi:char-array-to-pointer name) 256)) + (uffi:convert-from-foreign-string name) + (error "gethostname() failed."))))) + +(deftest :gethostname.1 (stringp (gethostname)) t) +(deftest :gethostname.2 (stringp (gethostname2)) t) +(deftest :gethostname.3 (plusp (length (gethostname))) t) +(deftest :gethostname.4 (plusp (length (gethostname2))) t) +(deftest :gethostname.5 (string= (gethostname) (gethostname2)) t) + + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/make.sh ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/make.sh Mon Feb 11 09:06:27 2008 @@ -0,0 +1,45 @@ +#!/bin/sh + +case "`uname`" in + Linux) os_linux=1 ;; + FreeBSD) os_freebsd=1 ;; + GNU/kFreeBSD) os_gnukfreebsd=1;; + Darwin) os_darwin=1 ;; + SunOS) os_sunos=1 ;; + AIX) os_aix=1 ;; + GNU) os_gnu=1 ;; + *) echo "Unable to identify uname " `uname` + exit 1 ;; +esac + +if [ "$os_linux" ]; then + gcc -fPIC -DPIC -c $SOURCE -o $OBJECT + gcc -shared $OBJECT -o $SHARED_LIB + +elif [ "$os_gnu" ]; then + gcc -fPIC -DPIC -c $SOURCE -o $OBJECT + gcc -shared $OBJECT -o $SHARED_LIB + +elif [ "$os_freebsd" ]; then + gcc -fPIC -DPIC -c $SOURCE -o $OBJECT + gcc -shared $OBJECT -o $SHARED_LIB + +elif [ "$os_gnukfreebsd" ]; then + gcc -fPIC -DPIC -c $SOURCE -o $OBJECT + gcc -shared $OBJECT -o $SHARED_LIB + +elif [ "$os_darwin" ]; then + cc -dynamic -c $SOURCE -o $OBJECT + ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress -o $BASE.dylib $OBJECT + ld -bundle /usr/lib/bundle1.o -flat_namespace -undefined suppress /usr/lib/libz.dylib -o z.dylib + +elif [ "$os_sunos" ]; then + cc -KPIC -c $SOURCE -o $OBJECT + cc -G $OBJECT -o $SHARED_LIB + +elif [ "$os_aix" ]; then + gcc -c -D_BSD -D_NO_PROTO -D_NONSTD_TYPES -D_MBI=void $SOURCE + make_shared -o $SHARED_LIB $OBJECT +fi + +exit 0
Added: branches/trunk-reorg/thirdparty/uffi/tests/objects.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/objects.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,70 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: pointers.lisp +;;;; Purpose: Test file for UFFI pointers +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Aug 2003 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2003-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(deftest :chptr.1 + (let ((native-string "test string")) + (uffi:with-foreign-string (fs native-string) + (ensure-char-character + (deref-pointer fs :char)))) + #\t) + +(deftest :chptr.2 + (let ((native-string "test string")) + (uffi:with-foreign-string (fs native-string) + (ensure-char-character + (deref-pointer fs :unsigned-char)))) + #\t) + +(deftest :chptr.3 + (let ((native-string "test string")) + (uffi:with-foreign-string (fs native-string) + (ensure-char-integer + (deref-pointer fs :unsigned-char)))) + 116) + +(deftest :chptr.4 + (let ((native-string "test string")) + (uffi:with-foreign-string (fs native-string) + (integerp + (ensure-char-integer + (deref-pointer fs :unsigned-char))))) + t) + +(deftest :chptr.5 + (let ((fs (uffi:allocate-foreign-object :unsigned-char 128))) + (setf (uffi:deref-array fs '(:array :unsigned-char) 0) + (uffi:ensure-char-storable #\a)) + (setf (uffi:deref-array fs '(:array :unsigned-char) 1) + (uffi:ensure-char-storable (code-char 0))) + (uffi:convert-from-foreign-string fs)) + "a") + +;; This produces an array which needs fli:foreign-aref to access +;; rather than fli:dereference + +#-lispworks +(deftest :chptr.6 + (uffi:with-foreign-object (fs '(:array :unsigned-char 128)) + (setf (uffi:deref-array fs '(:array :unsigned-char) 0) + (uffi:ensure-char-storable #\a)) + (setf (uffi:deref-array fs '(:array :unsigned-char) 1) + (uffi:ensure-char-storable (code-char 0))) + (uffi:convert-from-foreign-string fs)) + "a") + + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/package.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/package.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,20 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: package.lisp +;;;; Purpose: Package file uffi testing suite +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Apr 2003 +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2003-2005 by Kevin M. Rosenberg +;;;; +;;;; $Id$ +;;;; ************************************************************************* + +(defpackage #:uffi-tests + (:use #:asdf #:cl #:uffi #:rtest) + (:shadowing-import-from #:uffi #:run-shell-command)) + +(in-package #:uffi-tests) +
Added: branches/trunk-reorg/thirdparty/uffi/tests/rt.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/rt.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,254 @@ +#|----------------------------------------------------------------------------| + | Copyright 1990 by the Massachusetts Institute of Technology, Cambridge MA. | + | | + | Permission to use, copy, modify, and distribute this software and its | + | documentation for any purpose and without fee is hereby granted, provided | + | that this copyright and permission notice appear in all copies and | + | supporting documentation, and that the name of M.I.T. not be used in | + | advertising or publicity pertaining to distribution of the software | + | without specific, written prior permission. M.I.T. makes no | + | representations about the suitability of this software for any purpose. | + | It is provided "as is" without express or implied warranty. | + | | + | M.I.T. DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING | + | ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL | + | M.I.T. BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR | + | ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, | + | WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, | + | ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS | + | SOFTWARE. | + |----------------------------------------------------------------------------|# + +(defpackage #:regression-test + (:nicknames #:rtest #-lispworks #:rt) + (:use #:cl) + (:export #:*do-tests-when-defined* #:*test* #:continue-testing + #:deftest #:do-test #:do-tests #:get-test #:pending-tests + #:rem-all-tests #:rem-test) + (:documentation "The MIT regression tester with pfdietz's modifications")) + +(in-package :regression-test) + +(defvar *test* nil "Current test name") +(defvar *do-tests-when-defined* nil) +(defvar *entries* '(nil) "Test database") +(defvar *in-test* nil "Used by TEST") +(defvar *debug* nil "For debugging") +(defvar *catch-errors* t + "When true, causes errors in a test to be caught.") +(defvar *print-circle-on-failure* nil + "Failure reports are printed with *PRINT-CIRCLE* bound to this value.") +(defvar *compile-tests* nil + "When true, compile the tests before running them.") +(defvar *optimization-settings* '((safety 3))) +(defvar *expected-failures* nil + "A list of test names that are expected to fail.") + +(defstruct (entry (:conc-name nil) + (:type list)) + pend name form) + +(defmacro vals (entry) `(cdddr ,entry)) + +(defmacro defn (entry) `(cdr ,entry)) + +(defun pending-tests () + (do ((l (cdr *entries*) (cdr l)) + (r nil)) + ((null l) (nreverse r)) + (when (pend (car l)) + (push (name (car l)) r)))) + +(defun rem-all-tests () + (setq *entries* (list nil)) + nil) + +(defun rem-test (&optional (name *test*)) + (do ((l *entries* (cdr l))) + ((null (cdr l)) nil) + (when (equal (name (cadr l)) name) + (setf (cdr l) (cddr l)) + (return name)))) + +(defun get-test (&optional (name *test*)) + (defn (get-entry name))) + +(defun get-entry (name) + (let ((entry (find name (cdr *entries*) + :key #'name + :test #'equal))) + (when (null entry) + (report-error t + "~%No test with name ~:@(~S~)." + name)) + entry)) + +(defmacro deftest (name form &rest values) + `(add-entry '(t ,name ,form .,values))) + +(defun add-entry (entry) + (setq entry (copy-list entry)) + (do ((l *entries* (cdr l))) (nil) + (when (null (cdr l)) + (setf (cdr l) (list entry)) + (return nil)) + (when (equal (name (cadr l)) + (name entry)) + (setf (cadr l) entry) + (report-error nil + "Redefining test ~:@(~S~)" + (name entry)) + (return nil))) + (when *do-tests-when-defined* + (do-entry entry)) + (setq *test* (name entry))) + +(defun report-error (error? &rest args) + (cond (*debug* + (apply #'format t args) + (if error? (throw '*debug* nil))) + (error? (apply #'error args)) + (t (apply #'warn args)))) + +(defun do-test (&optional (name *test*)) + (do-entry (get-entry name))) + +(defun equalp-with-case (x y) + "Like EQUALP, but doesn't do case conversion of characters." + (cond + ((eq x y) t) + ((consp x) + (and (consp y) + (equalp-with-case (car x) (car y)) + (equalp-with-case (cdr x) (cdr y)))) + ((and (typep x 'array) + (= (array-rank x) 0)) + (equalp-with-case (aref x) (aref y))) + ((typep x 'vector) + (and (typep y 'vector) + (let ((x-len (length x)) + (y-len (length y))) + (and (eql x-len y-len) + (loop + for e1 across x + for e2 across y + always (equalp-with-case e1 e2)))))) + ((and (typep x 'array) + (typep y 'array) + (not (equal (array-dimensions x) + (array-dimensions y)))) + nil) + ((typep x 'array) + (and (typep y 'array) + (let ((size (array-total-size x))) + (loop for i from 0 below size + always (equalp-with-case (row-major-aref x i) + (row-major-aref y i)))))) + (t (eql x y)))) + +(defun do-entry (entry &optional + (s *standard-output*)) + (catch '*in-test* + (setq *test* (name entry)) + (setf (pend entry) t) + (let* ((*in-test* t) + ;; (*break-on-warnings* t) + (aborted nil) + r) + ;; (declare (special *break-on-warnings*)) + + (block aborted + (setf r + (flet ((%do + () + (if *compile-tests* + (multiple-value-list + (funcall (compile + nil + `(lambda () + (declare + (optimize ,@*optimization-settings*)) + ,(form entry))))) + (multiple-value-list + (eval (form entry)))))) + (if *catch-errors* + (handler-bind + ((style-warning #'muffle-warning) + (error #'(lambda (c) + (setf aborted t) + (setf r (list c)) + (return-from aborted nil)))) + (%do)) + (%do))))) + + (setf (pend entry) + (or aborted + (not (equalp-with-case r (vals entry))))) + + (when (pend entry) + (let ((*print-circle* *print-circle-on-failure*)) + (format s "~&Test ~:@(~S~) failed~ + ~%Form: ~S~ + ~%Expected value~P: ~ + ~{~S~^~%~17t~}~%" + *test* (form entry) + (length (vals entry)) + (vals entry)) + (format s "Actual value~P: ~ + ~{~S~^~%~15t~}.~%" + (length r) r))))) + (when (not (pend entry)) *test*)) + +(defun continue-testing () + (if *in-test* + (throw '*in-test* nil) + (do-entries *standard-output*))) + +(defun do-tests (&optional + (out *standard-output*)) + (dolist (entry (cdr *entries*)) + (setf (pend entry) t)) + (if (streamp out) + (do-entries out) + (with-open-file + (stream out :direction :output) + (do-entries stream)))) + +(defun do-entries (s) + (format s "~&Doing ~A pending test~:P ~ + of ~A tests total.~%" + (count t (cdr *entries*) + :key #'pend) + (length (cdr *entries*))) + (dolist (entry (cdr *entries*)) + (when (pend entry) + (format s "~@[~<~%~:; ~:@(~S~)~>~]" + (do-entry entry s)))) + (let ((pending (pending-tests)) + (expected-table (make-hash-table :test #'equal))) + (dolist (ex *expected-failures*) + (setf (gethash ex expected-table) t)) + (let ((new-failures + (loop for pend in pending + unless (gethash pend expected-table) + collect pend))) + (if (null pending) + (format s "~&No tests failed.") + (progn + (format s "~&~A out of ~A ~ + total tests failed: ~ + ~:@(~{~<~% ~1:;~S~>~ + ~^, ~}~)." + (length pending) + (length (cdr *entries*)) + pending) + (if (null new-failures) + (format s "~&No unexpected failures.") + (when *expected-failures* + (format s "~&~A unexpected failures: ~ + ~:@(~{~<~% ~1:;~S~>~ + ~^, ~}~)." + (length new-failures) + new-failures))) + )) + (null pending))))
Added: branches/trunk-reorg/thirdparty/uffi/tests/strtol.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/strtol.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,64 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: strtol.lisp +;;;; Purpose: UFFI Example file to strtol, uses pointer arithmetic +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-foreign-type char-ptr (* :unsigned-char)) + +;; This example does not use :cstring to pass the input string since +;; the routine needs to do pointer arithmetic to see how many characters +;; were parsed + +(uffi:def-function ("strtol" c-strtol) + ((nptr char-ptr) + (endptr (* char-ptr)) + (base :int)) + :returning :long) + +(defun strtol (str &optional (base 10)) + "Returns a long int from a string. Returns number and condition flag. +Condition flag is T if all of string parses as a long, NIL if +their was no string at all, or an integer indicating position in string +of first non-valid character" + (let* ((str-native (uffi:convert-to-foreign-string str)) + (endptr (uffi:allocate-foreign-object 'char-ptr)) + (value (c-strtol str-native endptr base)) + (endptr-value (uffi:deref-pointer endptr 'char-ptr))) + + (unwind-protect + (if (uffi:null-pointer-p endptr-value) + (values value t) + (let ((next-char-value (uffi:deref-pointer endptr-value :unsigned-char)) + (chars-parsed (- (uffi:pointer-address endptr-value) + (uffi:pointer-address str-native)))) + (cond + ((zerop chars-parsed) + (values nil nil)) + ((uffi:null-char-p next-char-value) + (values value t)) + (t + (values value chars-parsed))))) + (progn + (uffi:free-foreign-object str-native) + (uffi:free-foreign-object endptr))))) + +(deftest :strtol.1 (strtol "123") 123 t) +(deftest :strtol.2 (strtol "0") 0 t) +(deftest :strtol.3 (strtol "55a") 55 2) +(deftest :strtol.4 (strtol "a") nil nil) + + + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/structs.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/structs.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,36 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: structs.lisp +;;;; Purpose: Test file for UFFI structures +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +;; Compilation failure as reported by Edi Weitz + + +(uffi:def-struct foo + (bar :pointer-self)) + +(uffi:def-foreign-type foo-ptr (* foo)) + +;; tests that compilation worked +(deftest :structs.1 + (with-foreign-object (p 'foo) + t) + t) + +(deftest :structs.2 + (progn + (uffi:def-foreign-type foo-struct (:struct foo)) + t) + t)
Added: branches/trunk-reorg/thirdparty/uffi/tests/time.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/time.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,110 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: time.lisp +;;;; Purpose: UFFI test file, time, use C structures +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Feb 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-foreign-type time-t :unsigned-long) + +(uffi:def-struct tm + (sec :int) + (min :int) + (hour :int) + (mday :int) + (mon :int) + (year :int) + (wday :int) + (yday :int) + (isdst :int) + ;; gmoffset present on SusE SLES9 + (gmoffset :long)) + +(uffi:def-function ("time" c-time) + ((time (* time-t))) + :returning time-t) + +(uffi:def-function "gmtime" + ((time (* time-t))) + :returning (:struct-pointer tm)) + +(uffi:def-function "asctime" + ((time (:struct-pointer tm))) + :returning :cstring) + +(uffi:def-type time-t :unsigned-long) +(uffi:def-type tm-pointer (:struct-pointer tm)) + +(deftest :time.1 + (uffi:with-foreign-object (time 'time-t) + (setf (uffi:deref-pointer time :unsigned-long) 7381) + (uffi:deref-pointer time :unsigned-long)) + 7381) + +(deftest :time.2 + (uffi:with-foreign-object (time 'time-t) + (setf (uffi:deref-pointer time :unsigned-long) 7381) + (let ((tm-ptr (the tm-pointer (gmtime time)))) + (values (1+ (uffi:get-slot-value tm-ptr 'tm 'mon)) + (uffi:get-slot-value tm-ptr 'tm 'mday) + (+ 1900 (uffi:get-slot-value tm-ptr 'tm 'year)) + (uffi:get-slot-value tm-ptr 'tm 'hour) + (uffi:get-slot-value tm-ptr 'tm 'min) + (uffi:get-slot-value tm-ptr 'tm 'sec) + ))) + 1 1 1970 2 3 1) + + +(uffi:def-struct timeval + (secs :long) + (usecs :long)) + +(uffi:def-struct timezone + (minutes-west :int) + (dsttime :int)) + +(uffi:def-function ("gettimeofday" c-gettimeofday) + ((tv (* timeval)) + (tz (* timezone))) + :returning :int) + +(defun get-utime () + (uffi:with-foreign-object (tv 'timeval) + (let ((res (c-gettimeofday tv (uffi:make-null-pointer 'timezone)))) + (values + (+ (* 1000000 (uffi:get-slot-value tv 'timeval 'secs)) + (uffi:get-slot-value tv 'timeval 'usecs)) + res)))) + +(deftest :timeofday.1 + (multiple-value-bind (t1 res1) (get-utime) + (multiple-value-bind (t2 res2) (get-utime) + (and (or (= t2 t1) (> t2 t1)) + (> t1 1000000000) + (> t2 1000000000) + (zerop res1) + (zerop res2)))) + t) + +(defun posix-time-to-asctime (secs) + "Converts number of seconds elapsed since 00:00:00 on January 1, 1970, Coordinated Universal Time (UTC)" + (string-right-trim + '(#\newline #\return) + (uffi:convert-from-cstring + (uffi:with-foreign-object (time 'time-t) + (setf (uffi:deref-pointer time :unsigned-long) secs) + (asctime (gmtime time)))))) + +(deftest :time.3 + (posix-time-to-asctime 0) + "Thu Jan 1 00:00:00 1970")
Added: branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test-lib.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test-lib.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,98 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: uffi-c-test-lib.lisp +;;;; Purpose: UFFI Example file for zlib compression +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + + +(uffi:def-function ("cs_to_upper" cs-to-upper) + ((input (* :unsigned-char))) + :returning :void + :module "uffi_tests") + +(defun string-to-upper (str) + (uffi:with-foreign-string (str-foreign str) + (cs-to-upper str-foreign) + (uffi:convert-from-foreign-string str-foreign))) + +(uffi:def-function ("cs_count_upper" cs-count-upper) + ((input :cstring)) + :returning :int + :module "uffi_tests") + +(defun string-count-upper (str) + (uffi:with-cstring (str-cstring str) + (cs-count-upper str-cstring))) + +(uffi:def-function ("half_double_vector" half-double-vector) + ((size :int) + (vec (* :double))) + :returning :void + :module "uffi_tests") + +(uffi:def-function ("return_long_negative_one" return-long-negative-one) + () + :returning :long + :module "uffi_tests") + +(uffi:def-function ("return_int_negative_one" return-int-negative-one) + () + :returning :int + :module "uffi_tests") + +(uffi:def-function ("return_short_negative_one" return-short-negative-one) + () + :returning :short + :module "uffi_tests") + + +(uffi:def-constant +double-vec-length+ 10) +(defun test-half-double-vector () + (let ((vec (uffi:allocate-foreign-object :double +double-vec-length+)) + results) + (dotimes (i +double-vec-length+) + (setf (uffi:deref-array vec '(:array :double) i) + (coerce i 'double-float))) + (half-double-vector +double-vec-length+ vec) + (dotimes (i +double-vec-length+) + (push (uffi:deref-array vec '(:array :double) i) results)) + (uffi:free-foreign-object vec) + (nreverse results))) + +(defun t2 () + (let ((vec (make-array +double-vec-length+ :element-type 'double-float))) + (dotimes (i +double-vec-length+) + (setf (aref vec i) (coerce i 'double-float))) + (half-double-vector +double-vec-length+ vec) + vec)) + +#+(or cmu scl) +(defun t3 () + (let ((vec (make-array +double-vec-length+ :element-type 'double-float))) + (dotimes (i +double-vec-length+) + (setf (aref vec i) (coerce i 'double-float))) + (system:without-gcing + (half-double-vector +double-vec-length+ (system:vector-sap vec))) + vec)) + +(deftest :c-test.1 (string-to-upper "this is a test") "THIS IS A TEST") +(deftest :c-test.2 (string-to-upper nil) nil) +(deftest :c-test.3 (string-count-upper "This is a Test") 2) +(deftest :c-test.4 (string-count-upper nil) -1) +(deftest :c-test.5 (test-half-double-vector) + (0.0d0 0.5d0 1.0d0 1.5d0 2.0d0 2.5d0 3.0d0 3.5d0 4.0d0 4.5d0)) +(deftest :c-test.6 (return-long-negative-one) -1) +(deftest :c-test.7 (return-int-negative-one) -1) +(deftest :c-test.8 (return-short-negative-one) -1) +
Added: branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test.c ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/uffi-c-test.c Mon Feb 11 09:06:27 2008 @@ -0,0 +1,158 @@ +/*************************************************************************** + * FILE IDENTIFICATION + * + * Name: c-test-fns.c + * Purpose: Test functions in C for UFFI library + * Programer: Kevin M. Rosenberg + * Date Started: Mar 2002 + * + * CVS Id: $Id$ + * + * This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg + * + * These variables are correct for GCC + * you'll need to modify these for other compilers + ***************************************************************************/ + +#ifdef WIN32 +#include <windows.h> + +BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, + DWORD fdwReason, + LPVOID lpvReserved) +{ + return 1; +} + +#define DLLEXPORT __declspec(dllexport) + +#else +#define DLLEXPORT +#endif + +#include <ctype.h> +#include <stdlib.h> +#include <math.h> + + +DLLEXPORT unsigned char uchar_13 = 13; +DLLEXPORT signed char schar_neg_120 = -120; +DLLEXPORT unsigned short uword_257 = 257; +DLLEXPORT signed short sword_neg_321 = -321; +DLLEXPORT unsigned int uint_1234567 = 1234567; +DLLEXPORT signed int sint_neg_123456 = -123456; +DLLEXPORT double double_3_1 = 3.1; +DLLEXPORT float float_neg_4_5 = -4.5; + +/* Test of constant input string */ +DLLEXPORT +int +cs_count_upper (char* psz) +{ + int count = 0; + + if (psz) { + while (*psz) { + if (isupper (*psz)) + ++count; + ++psz; + } + return count; + } else + return -1; +} + +/* Test of input and output of a string */ +DLLEXPORT +void +cs_to_upper (char* psz) +{ + if (psz) { + while (*psz) { + *psz = toupper (*psz); + ++psz; + } + } +} + +/* Test of an output only string */ +DLLEXPORT +void +cs_make_random (int size, char* buffer) +{ + int i; + for (i = 0; i < size; i++) + buffer[i] = 'A' + (rand() % 26); +} + + +/* Test of input/output vector */ +DLLEXPORT +void +half_double_vector (int size, double* vec) +{ + int i; + for (i = 0; i < size; i++) + vec[i] /= 2.; +} + + + +DLLEXPORT +void * +cast_test_int () { + int *x = (int *) malloc(sizeof(int)); + *x = 23; + return x; +} + +DLLEXPORT +void * +cast_test_float () +{ + double *y = (double *) malloc(sizeof(double)); + *y = 3.21; + return y; +} + +DLLEXPORT +long +return_long_negative_one () +{ + return -1; +} + +DLLEXPORT +int +return_int_negative_one () +{ + return -1; +} + +DLLEXPORT +short +return_short_negative_one () +{ + return -1; +} + +DLLEXPORT int fvar_addend = 3; + +typedef struct { + int i; + double d; +} fvar_struct_type; + +fvar_struct_type fvar_struct = {42, 3.2}; + +DLLEXPORT +int fvar_struct_int () { + return (fvar_addend + fvar_struct.i); +} + +DLLEXPORT +double fvar_struct_double () { + return fvar_struct.d; +} + +
Added: branches/trunk-reorg/thirdparty/uffi/tests/union.lisp ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/tests/union.lisp Mon Feb 11 09:06:27 2008 @@ -0,0 +1,71 @@ +;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: union.lisp +;;;; Purpose: UFFI Example file to test unions +;;;; Programmer: Kevin M. Rosenberg +;;;; Date Started: Mar 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(in-package #:uffi-tests) + +(uffi:def-union tunion1 + (char :char) + (int :int) + (uint :unsigned-int) + (sf :float) + (df :double)) + +(defvar *u* (uffi:allocate-foreign-object 'tunion1)) +(setf (uffi:get-slot-value *u* 'tunion1 'uint) + #-(or sparc sparc-v9 powerpc ppc) + (+ (* 1 (char-code #\A)) + (* 256 (char-code #\B)) + (* 65536 (char-code #\C)) + (* 16777216 128)) + #+(or sparc sparc-v9 powerpc ppc) + (+ (* 16777216 (char-code #\A)) + (* 65536 (char-code #\B)) + (* 256 (char-code #\C)) + (* 1 128))) + +(deftest :union.1 + (uffi:ensure-char-character + (uffi:get-slot-value *u* 'tunion1 'char)) + #\A) + +(deftest :union.2 + (uffi:ensure-char-integer + (uffi:get-slot-value *u* 'tunion1 'char)) + 65) + +#-(or sparc sparc-v9 openmcl digitool) +(deftest :union.3 (plusp (uffi:get-slot-value *u* 'tunion1 'uint)) t) + + +(uffi:def-union foo-u + (bar :pointer-self)) + +(uffi:def-foreign-type foo-u-ptr (* foo-u)) + +;; tests that compilation worked +(deftest :unions.4 + (with-foreign-object (p 'foo-u) + t) + t) + +(deftest :unions.5 + (progn + (uffi:def-foreign-type foo-union (:union foo-u)) + t) + t) + + + +
Added: branches/trunk-reorg/thirdparty/uffi/uffi-tests.asd ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/uffi-tests.asd Mon Feb 11 09:06:27 2008 @@ -0,0 +1,95 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: uffi-tests.asd +;;;; Purpose: ASDF system definitionf for uffi testing package +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Apr 2003 +;;;; +;;;; $Id$ +;;;; ************************************************************************* + +(defpackage #:uffi-tests-system + (:use #:asdf #:cl)) +(in-package #:uffi-tests-system) + +(operate 'load-op 'uffi) + +(defvar *library-file-dir* (append (pathname-directory *load-truename*) + (list "tests"))) + +(defclass uffi-test-source-file (c-source-file) + ()) + +(defmethod output-files ((o compile-op) (c uffi-test-source-file)) + (let* ((library-file-type + (funcall (intern (symbol-name'#:default-foreign-library-type) + (symbol-name '#:uffi)))) + (found + (some #'(lambda (dir) + (probe-file (make-pathname + :directory dir + :name (component-name c) + :type library-file-type))) + '((:absolute "usr" "lib" "uffi"))))) + (list (if found + found + (make-pathname :name (component-name c) + :type library-file-type + :directory *library-file-dir*))))) + +(defmethod perform ((o load-op) (c uffi-test-source-file)) + nil) ;;; library will be loaded by a loader file + +(defmethod operation-done-p ((o load-op) (c uffi-test-source-file)) + (and (symbol-function (intern (symbol-name '#:cs-count-upper) + (find-package '#:uffi-tests))) + t)) + +(defmethod perform ((o compile-op) (c uffi-test-source-file)) + (unless (operation-done-p o c) + #-(or win32 mswindows) + (unless (zerop (run-shell-command + #-freebsd "cd ~A; make" + #+freebsd "cd ~A; gmake" + (namestring (make-pathname :name nil + :type nil + :directory *library-file-dir*)))) + (error 'operation-error :component c :operation o)))) + +(defmethod operation-done-p ((o compile-op) (c uffi-test-source-file)) + (or (and (probe-file #p"/usr/lib/uffi/uffi-c-test.so") t) + (let ((lib (make-pathname :defaults (component-pathname c) + :type (uffi:default-foreign-library-type)))) + (and (probe-file lib) + (> (file-write-date lib) (file-write-date (component-pathname c))))))) + +(defsystem uffi-tests + :depends-on (:uffi) + :components + ((:module tests + :components + ((:file "rt") + (:file "package" :depends-on ("rt")) + (:uffi-test-source-file "uffi-c-test" :depends-on ("package")) + (:file "strtol" :depends-on ("package")) + (:file "atoifl" :depends-on ("package")) + (:file "getenv" :depends-on ("package")) + (:file "gethostname" :depends-on ("package")) + (:file "union" :depends-on ("package")) + (:file "arrays" :depends-on ("package")) + (:file "structs" :depends-on ("package")) + (:file "objects" :depends-on ("package")) + (:file "time" :depends-on ("package")) + (:file "foreign-loader" :depends-on ("package" "uffi-c-test")) + (:file "uffi-c-test-lib" :depends-on ("foreign-loader")) + (:file "compress" :depends-on ("foreign-loader")) + (:file "casts" :depends-on ("foreign-loader")) + (:file "foreign-var" :depends-on ("foreign-loader")) + )))) + +(defmethod perform ((o test-op) (c (eql (find-system :uffi-tests)))) + (or (funcall (intern (symbol-name '#:do-tests) + (find-package '#:regression-test))) + (error "test-op failed")))
Added: branches/trunk-reorg/thirdparty/uffi/uffi.asd ============================================================================== --- (empty file) +++ branches/trunk-reorg/thirdparty/uffi/uffi.asd Mon Feb 11 09:06:27 2008 @@ -0,0 +1,48 @@ +;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- +;;;; ************************************************************************* +;;;; FILE IDENTIFICATION +;;;; +;;;; Name: uffi.asd +;;;; Purpose: ASDF system definition file for UFFI package +;;;; Author: Kevin M. Rosenberg +;;;; Date Started: Aug 2002 +;;;; +;;;; $Id$ +;;;; +;;;; This file, part of UFFI, is Copyright (c) 2002-2005 by Kevin M. Rosenberg +;;;; +;;;; ************************************************************************* + +(defpackage #:uffi-system (:use #:asdf #:cl)) +(in-package #:uffi-system) + +#+(or allegro lispworks cmu openmcl digitool cormanlisp sbcl scl) +(defsystem uffi + :name "uffi" + :author "Kevin Rosenberg kevin@rosenberg.net" + :version "1.2.x" + :maintainer "Kevin M. Rosenberg kmr@debian.org" + :licence "Lessor Lisp General Public License" + :description "Universal Foreign Function Library for Common Lisp" + :long-description "UFFI provides a universal foreign function interface (FFI) for Common Lisp. UFFI supports CMUCL, Lispworks, and AllegroCL." + + :components + ((:module :src + :components + ((:file "package") + (:file "primitives" :depends-on ("package")) + #+(or openmcl digitool) (:file "readmacros-mcl" :depends-on ("package")) + (:file "objects" :depends-on ("primitives")) + (:file "aggregates" :depends-on ("primitives")) + (:file "strings" :depends-on ("primitives" "functions" "aggregates" "objects")) + (:file "functions" :depends-on ("primitives")) + (:file "libraries" :depends-on ("package")) + (:file "os" :depends-on ("package")))) + )) + +#+(or allegro lispworks cmu openmcl digitool cormanlisp sbcl scl) +(defmethod perform ((o test-op) (c (eql (find-system 'uffi)))) + (oos 'load-op 'uffi-tests) + (oos 'test-op 'uffi-tests :force t)) + +