cl-uffi-2.1.2/0000755000175000017500000000000011674246130012057 5ustar kevinkevincl-uffi-2.1.2/AUTHORS0000644000175000017500000000044711015741033013123 0ustar kevinkevinKevin M. Rosenberg Primary author John Desoi Contributed MCL & OpenMCL support Reini Urban Contributed initial Corman support Edi Weitz Contributed with-cast-pointer and def-foreign-var along with documentation cl-uffi-2.1.2/benchmarks/0000755000175000017500000000000011674246130014174 5ustar kevinkevincl-uffi-2.1.2/benchmarks/allocation.lisp0000644000175000017500000000721711333325526017220 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/benchmarks/Makefile0000644000175000017500000000011511015741033015620 0ustar kevinkevinSUBDIRS := include ../Makefile.common .PHONY: distclean distclean: clean cl-uffi-2.1.2/doc/0000755000175000017500000000000011674246130012624 5ustar kevinkevincl-uffi-2.1.2/doc/appendix.xml0000644000175000017500000000245111015741033015147 0ustar kevinkevin %myents; ]> Installation Download &uffi; You need to download the &uffi; package from its web home. You also need to have a copy of &asdf;. If you need a copy of &asdf;, it is included in the CCLAN package. You can download the file defsystem.lisp from the CVS tree. Loading After downloading and installing &asdf;, simply push the directory containing &uffi; into asdf:*central-registry* variable. Whenever you want to load the &uffi; package, use the form (asdf:operate 'asdf:load-op :uffi). cl-uffi-2.1.2/doc/bookinfo.xml0000644000175000017500000000371411333325516015157 0ustar kevinkevin %myents; ]> &uffi; Reference Guide Kevin M. Rosenberg Heart Hospital of New Mexico
kevin@rosenberg.net 504 Elm Street N.E. Albuquerque New Mexico 87102
2002-2003 Kevin M. Rosenberg The &uffi; package was designed and written by Kevin M. Rosenberg. 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. Allegro CL® is a registered trademark of Franz Inc. Lispworks® is a registered trademark of Xanalys Inc. Microsoft Windows® is a registered trademark of Microsoft Inc. Other brand or product names are the registered trademarks or trademarks of their respective holders.
cl-uffi-2.1.2/doc/catalog-darwin.xml0000644000175000017500000000263111015741033016233 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-debian.xml0000644000175000017500000000266211015741033016175 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-mandrake.xml0000644000175000017500000000262611015741033016535 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-suse.xml0000644000175000017500000000267311015741033015734 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-suse90.xml0000644000175000017500000000262211015741033016077 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-suse91.xml0000644000175000017500000000326611015741033016105 0ustar kevinkevin cl-uffi-2.1.2/doc/catalog-ubuntu.xml0000644000175000017500000000266211015741033016275 0ustar kevinkevin cl-uffi-2.1.2/doc/COPYING.GFDL0000644000175000017500000004076011015741033014370 0ustar kevinkevin 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. cl-uffi-2.1.2/doc/entities.inc0000644000175000017500000000144011015741033015131 0ustar kevinkevinUFFI"> FFI"> CMUCL"> SCL"> Lispworks"> SBCL"> OpenMCL"> MCL"> AllegroCL"> ANSI Common Lisp"> T"> NIL"> NULL"> C"> defsystem"> ASDF"> cl-uffi-2.1.2/doc/fo.xsl0000644000175000017500000000033511333054743013760 0ustar kevinkevin cl-uffi-2.1.2/doc/glossary.xml0000644000175000017500000000075211015741033015204 0ustar kevinkevin %myents; ]> Foreign Function Interface FFI) An interface to a C-compatible library. cl-uffi-2.1.2/doc/html.tar.gz0000644000175000017500000005511211333507746014730 0ustar kevinkevin$2nK]krH_ر4!)RR˜#ի'm5$G];͘87f{X3`ߏ!1tz7 f.߀Y ~,Q|~S]+_O l^4;撃rQx2;A))F&~Y/qˇ11rIy [Wuw3P =1bPOwلzğQx4L.|mO FՆ\!wԔWmbÒ`tI|3_wiKX!- iIJ(=. TzoN$ɾβd3q'dTK\ľ h{,Q |IΠw7D#@<8/5xخO&Iz5>a(xb1 am'.6!DZvhv#}ƲEڳB*I5Ll!J8\R s LS& mppcܖdnfJt{8L6q5QdKąՁ95$Ll"x' x{U)IZ]Z#LsK6>mt,ͧ v . $u<|0+0 ]?U]|r'^s}& MѷThRk ՆC &#!PyȄK #E1^@Օ2t5Q 4$Kk_Z½+`#Qqo LL0!h(A^0mER0S*drFCc>ߞC;:L3m`PH ިAt0 ~u[oDjYk<6/COy;࿺ῢi)Q<[3B" ªSu7ˇ#F%P_Llb@Ϣ[G}ZHl *a><Kyjjlydx IhM|D9צIa|^ [=-0x?0+x;7oɠu~FnmqYGK~e^z/-aG$o^ gX #HP GdM[5j]dq+i'n3Lq{I/717ט7hp Mf`PCJIJ8oVnor}6z_ R<5Ž^OUcѰW?lof6>[ >Lv .vHNŘg6}^gk4VfGP0RV91jc'sLYZf*b}|3ɭO Osuv|d[/ա =>aGE>otA#%u?, g`٥Ԑ)e0YƇ{ 7^HA!Ɖ!)0p#)jyKh44=EޫZ@Gi$QK!u~3ZPq7v/a˓*'IcM֞ji;s6N Vf)S.S@&Wt(sS`|oϖ"SדVE;vdn=*Y0X.Er2@9a睌Bpb!S9N:@⃐Hn5*$id”$N4 #_lZ?N؁kD nѧBP:1<(PJ8{Ƌ0o`)udBrO]{(Ƅ4cYVG,f/6]^Jw?wߞ,Mˆhpw)wa|vƏ7ybp_Z*Z[5Is} 3aO0:PwsI 3Ӫ;`[qVm?ao<+1M$Ű5f} c.h42ؔG>ؿM0G?FNCCTg# T. !erI|ba2peN xgզ+p[JD2rѼgİU$p/ 6LfL7AV\iDp4kZ`g_OpN>~OP  s\ }ۼ3O ~\9wWBQ)3F_ +*0ioIzh'R_Nebܬ܈#Fd#Ȟ՚lc]h&% JM>@,7_&%\yܮcj:EC+2(jri ڽ 8Lp8e.z4\%ǂ0Owj@3~M|bjprpflc2*FDC=?lLu 𽨗 ݬߑlŸlQgp.O20Č#͵$b^oaܷu7.yyWrZ-~Ka9Ql$ ^xDO)zsщ{޶*.9>ݾW͛x\Y7B&? Z:udmxHj?Ru@^sh:(c.kS塔g'y f}^xs! *I2񎈟l76qnv$ɄotPe?&&&7Wy)DtFEDUy=Lx0=/$+2⡕.&xBXoŢ<9o:>G zlUW^h ^+@0qI`nfQI_]5/;$zⱝ9bPNϕ8cp `)P(~띱M 'ӟ=;à 'J2#w6l_A@E{ΫfT2&K`Z2(2/TF1.:u]X9<2.Zyn8MXqHO(2/di& u/X E\c9n1X ʼno|"" lFa0+u댭=UOi.*OG 5 |E/8ǂvI\ A2a(CEg<:GNJz4u-|S\ $ ];o\*d<&%*ו־Q{PC]kTxfMsWM@ъ_߇?:d}klX4+@ʅg)]Λ5Wn.TPI&hC>Q8}o8*q6I×5? I[CJɤ`ZI6e6O^ FQkbJWMmo hM`6 ¿R˺?UrJ^ e|@FO {ncn¼jkxvԘzQ|w?%.ޥ ^?{ pR82H 꼉J|WWrG=D|j:~8oN0D+ \:Uoޫ"U/$d{3P\ROzM`p)$쁖)ݢG#mHBLUh9Do 50?vq`~XVD!D2*0N[-FKףGN o'rcڤqyRNHԥ KGKh?)җܦl t:b{TuOY 퍆߇{g{&.m̵5,9?1{kvnuL'8}cv~ǖy#tݳw*UEwUGw{rM;~' K/õn΄,k>`I)Jfff`P`3b 4~݌xf2!zx(|iF2<}4)ʐ>̼A<6Yx^Eit6~R<. 09a*P^e{Qo]nI| 9bL2I*qZ8mw靈IH˜$xRj.wCmfPHHB241n BVUVU~_eeF91nfa4J3J{eޗy0!kUtmJ{uOQ:&U|AVo˸V[\pt)v1H4ޠGlѭga,iFcWE*KԐB)OUqPQXs,|V^]1da4hsB]GSʐ9<;-|,zN-VLp7 Q+MK_@/KA#6_|4xzW-I? _)!Am|"7NKg~xa^Ose]q]"&LJ|0g\٘0AuM{P 6 "?A|'˽[:G3'ܭ +Ӄ̣ˢ,^l懊b1ҝoߖg2<9rQ~9㎎&yJJrx$v1{ȼmQHtW!:(_:~?kW'Y<.;,K{g׏|weA?]PNO~̳XdĞLE)E sOdKWOv^})pfr٩J}awR˅5Na 'ƞ޲ t"SiH`Ö=0 ^wyn'8O: im(u{h`?AІdd.@z+l&,( k̊>};2yWdY}B_:2J4 .t7$0[[L^3jؒU9@`;\z%OWےz0L ms.G 6 qo掦tz/Run(C>>uḓy7d[Ƭ|*3Ylbgl xӈʧ@nYX*ؽu77]2JL{2% \L4^$"HX34;g ivuJ[ ,%.іYWgTEd1@g2A8 fCYwÍ<;xGbZQg.(9Œ]. 'g5;UD D, -M QBz GIM+@)87JAc#FLv1sw,"X*3HEzbxJqZ G흔%EAcD&؊?:ΕQLR.fl#)z&`P$B5:m4Q\Md+J_FnHkCF]pCt9lx:42UbxjO*G@gb?_Oepb} PFg`Z8ݮqA6ȸqCb(#BG!qPCRLL!jzv*]"Pn O.ܹMu) ߋn,X [gwcSNR *8"9&p=HXI;:%z'\ΘN&GoD*?t0 ۯ?!{q$2OG>ܲGz!:y)󨈞J?1F$sᐈ>#bwU\ W޿Dsy.§p̆TElHAh\0\&+XrK4ӢpinO nXA+8S,&oJMYڳ)GNUMȼkYbXQqک%01GW5!W<s`^Q40U3;2 @j%D"ILIXBBM`s!hܲhr). M`id~S:E~S!<0%#DRMb>G_ɠ2\MEl:`;s*y0ңy z~,ee'b2_T Ȉe+ƹX;GToG?:G+㈭,@U@QnؑC8<|ab OrPb~cF$2E_ew f} B[ Pu51ʂoG'ޏEJF8O-VGĈ^`?,e7=6y6@&H.RF GYm@e]wqjʔ=#sJƯ-$7CtUi?pn*l?O(B\KhpnzB\fnNJ*ƔUX"SRLx\LEvSG͜mYd(XuW' ;7?k*7E8"ܫ)F|wnN pHh'/y iK~/& Z +HԿ4^ǘzxbs-pwł\u;1\R9t} ?.6ܛ)cqh MM&tMgC\gv&+ڜu9ސ7K;eY885 `=ܔԠ)xWO5swH?]aUّSZT"֨ΛԞ\gcB.fFi#-ĞH/ 2҅ tt!ȲzߧbeǟB/3E&)M 8:|η$a?v7o?jry|6Rx' i׭E8"7d֦=JH}#6aw0$N\/ijɃ*9ab0 E#eJH?~qrδdB Q$m@%u؁?:vkW㿪?(/&P˻/POB<GD~.I僣)P0ʂ})ŷWA {ؾbT8|qFQ#͂2OZ1'|ybWk}tPH g)fCƠu|b3%ga 8UڪhQa$Y 8XN>q l)qHla.LF -#aa(X4w|oEӖi^6ugV֞ R`x&Γ>:y|yJmwc,#FŨ;<@ȑkh(F2XUY CKT2UL;0VGP? i@w7|Zl!"Mi..$o1CXͲHS⸺4tEG6ab@nhD4+dzB1ɥCR$0cszԟ#;e)sBO >aN*@羸A{lepyV)`8:AG$9"Ur!˄MmPJUyh2۵{w*OOeީ5c>cJ&0#GMoAhytD9U ԯ2P)WT E)%#kP9_>댾Y̗};rRvs)!Kr jPAn 'oN ZdztrU *9!K3g'2i) xң0aGNDu}W4/*j|cW-%* N#ې{{I{{jH6%&p_}{O}<7޼^.?}yi{j[e/#qD`D܅Eu OjbOҴ4yL9 $oAȴiqTH28 3' ΤeqB wv&#ؐEҨЀk$< 6 K eBGXO1YãQyR;!.9;VD RQZH>ʸ"}nA_ k]# æ"4 9>*Kj9zk ׳ PHik/z> 3Z3inጮ1z2J&Fz*7b7鍬kg@ d䘷N z|=vYnm: <}vb7VgEX@p\P ^G }>kSN*éjN*5AŘ^ӚyBi*?4ٟB;f6hauZ4TݮtAh(  8lHWz'[58Om!t P8>9NDP4xP*3PWY+R8aq2=U`s2FcCTӉշft)Ǭ:5c?c(>qmZ%zDG:8c2Ȟ8k' qӝXٔ{ GfH⥡p2''p<#pRgQJ97I0V!KC; 6LcaZg2nQjc8>@}4QOdX]l)lS DM5+ l|_35af2PuhTRhӶohv+g&'lݷIXc崛G>.7SGg20@ t,?V65ب:\F [0:ii?~W&ۻAܾ 4q6iN_%kyDj0 oΝE,1?NUbҁ:cN|0;=!o~s Iĵу6FK #w7 WYk6?:]c)q\z-oEeL6kV=LL`oo,{mh{w`VEŁo@VBԨS`NNtB$ _ej;T> M iIsЅ^$o?~d]#dj`G/xZ5ɏ/?,.`\,IsY|z*$'5}!_=%0Hv@Gs?B8m`dz>ٌ/B0#I3tWZ(> ~v[&`s7/Y{~magtmag|maȊҨ)^%2cjխłI}i:S5Wщiͬ[="|f3ړ9|ZSf J^s.R0`x4"KʨD2Јd%l3׈R9-GLhKY郠8Txйfti,a>V@)TE\@?U33VeinSg uٯ-\pydZ9>N .mwX$*=5+]Cۼq`jꠐp7gx#kV5,DqXŐJY ]&4.{4BN|XNR|'U: 8'Ohb% *cUpm8kH`#j7$< ٬^bxa]Yx(z,3_G0$ؿ K5Q1a>GLiCμ "Ş/bÉ_7uψu%Ck0EAh64 6|f[;47d\j"Wf} !NO˒l@'X$'/!ʼnk|w%*BZ|~J_$vJa h(YF]N\5+Zj޽1ָ}P<~05 m*d cUSȁfnT7v~/YV_5W5/g*{_Oz,~zϞ=9@018E@4@,~v" 3)4780jkz&P5`'@2&MpamhE](|dW^_`~?K`/YL/*֞0O"t(uWkDv( ЭzcA pZd[@$:'Jh&£T@ LL T=coV {Q^LĮSKhZQ[My8 %Yn`Rr:j#C2' gҕ&*:`M8̨3ؑE0,ps䰊$Jȇ$Ɇ9DSiMr,+RɊ D\w%f-`jt?c=Smrgp09+nL yݻgbƧI^pYN5,ѠnM0'"h\w}oY4>P޽'.2<ޚ8PX[gF P2u.6iJ%NGJY*)7>@vQm2F>~#IȚL܇:.`p ')n7{OTl|tPҐAǪ ߥd 37G 1p@왽п=; 1 &TShpzsgyzG!!.cL|?U[zw*9) ދ9!_Ӭ%εL@XrSceȋXRi숉ܾDeZ}<`􃵿qX$QEVٚRE+PF( vyHJS)I+{򫗟޽c@|S.AyTr<)#JXXukgv? GT97˓2U脇*lVhITr =DNNGa~%΢lT!N'=?n 9alUN؏2BAR͉G(]ev d lێn_%Hhi Dws}{Fno0tVjNm;bQ=W8uGCʵM=<6XhI/Id8P 5Y}E9" й@o9Ŀ x:&:'@"+^f0٬ Էg.bF>k(b͋rp3!8@;wBZ`\{=C5@aQ)  hlKh!kbO(Ơ5X&9J \`EBUݷY3uzrwK_w2 ԍMp-m@h1S-P[o>Y86Hҝr`B`\Ϸ>" JUO^DLIc1VC)fzxL=şs6':4Β\A/ʋ)\VJР"'@AEaYR[t2ojucP"s{+<>"m?/_jʱ1;6,]v!$^.czrN., 1-{xkÇX3AS:(MAU jk۝;Io#k5w@.XpNb(|\.sڸ 1ѥH_jBc7х >sKuَK6/SVG-92زy&6EG] Sj/&pǭfQ#b>{ڈoFN⡊-.IX('谞 dneS=h?*ToW_B@/r8})ؗ ߝܖk_y>%Fg8/;IktO)`y3ӃoG"|Oq俠nMMSN)+i#^?qW= =S1@Z"Z:MYՔ;BaU<uT(eBLbE;BsϞɕcN_xK5=qHyȶ!͋ >Qr6w\,S$Ь|[>+'Iru*'%m&#u-f.XbZyd.i g^#^vNѭ7Pr@ ?I{=qx \"=_bDD(6㷦H۹ߖ mȆ&.VL*审锊ԃɏQUmkV/FJdEٗq4FR(w"4eHv^_M|*(lDYؖMt>U*O`G6>SI{wUfdo[oy\Qܛw+\#PlB/-XApduL<@,鑕e`gr}klvY%)!Tg<{‘C<;<B gU31Zu-SK(بX]VjjO0vxSl[Be?'$tyZ;VJ2 #' eC)Ac>%pf$[IltW0D v.@1 }tu= 6+.:1uZ a%*.Lp=%;o ,^҆`btt:.9+CvcVD>sNABιwt7sDP++ Jh\z"XKJK,AiCY%LLtH>ؠ4zѹ/g~BRUcȀhh1 - .Ȕua}xg  6:|0CGTS%>&2>e4&'3T|!kP@e uCwz_J32oAs))L<1q@u ogucowX5[57aJv{f>E2qB,xg9s?xYjlL*&ǚC8k#5_UƯ?s[nwDIj܊寞[Tf@dd2-̮/Gywn\0qρY7m<ˣx*ʞ~m8ܧza+@'z5UֆqsE*ފ\`4S-yshz ϞL|U{^,36c:uPE^kmWj= CvQy<.3<$ݯ|`&Js*"n3B(g'c 3: b5޸|Y'>*.~/}GՂ*P v.@R!Ynj5V׊j_<گ(8WSvK ogt7| ˀ-9UmNvkJ8ۑwT~ i,Y|Gw 3?>"A*9 |o,_wYWw0My\AMn~)Amn VV9GvL^:Ke)<%[& Wʌ-~i  2V^kGzkpe&O}O%ږhGEr=XcLm~є'߃%pA+|[+,v]Kd=ywo^7{3k{ _ jY ~oܳhVIJVh/zig`XqElGz;gK_"xVk,ΐ(/D g 9% {aoNV{Tx1%|}t˜h2]yt;*1KfFM}~CQtFQ܈Uni}!S^"!!VX,?%s͆hS?ιX|qa_JE.ƞ./o!Ip'}!x7 ghk~m.2Z`2/b Ԩv!C w %pwZN22}bhdF 3{ b?vmƪWdS^Du M _}* Kд|6$x/LY}z_Xܠe˽1֒9JM*.Nb]bSWwЄzʧ"y13&\&DT@) i5,qqJM jXǮg\3v15\leo#+vKElE8, n- <Bak-6B5WLeHpMzP!K7GXE>EL歰n$-B=Qɧ^Lhdtk:M8yT?OS?OS?OS?OS|;? cl-uffi-2.1.2/doc/html.xsl0000644000175000017500000000042111015741033014304 0ustar kevinkevin cl-uffi-2.1.2/doc/html_chunk.xsl0000644000175000017500000000034411015741033015500 0ustar kevinkevin cl-uffi-2.1.2/doc/intro.xml0000644000175000017500000001003411015741033014466 0ustar kevinkevin %myents; ]> Introduction Purpose This reference guide describes &uffi;, a package that provides a cross-implementation interface from Common Lisp to C-language compatible libraries. Background Every Common Lisp implementation has a method for interfacing to C-language compatible libraries. These methods are often termed a Foreign Function Library Interface (&ffi;). Unfortunately, these methods vary widely amongst implementations, thus preventing the writing of a portable FFI to a particular C-library. &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. Developers who use &uffi; to interface with C libraries will automatically have their code function in each of uffi's supported implementations. Supported Implementations The primary tested and supported platforms for &uffi; are: &acl; v6.2 on Debian GNU/Linux FreeBSD 4.5, Solaris v2.8, and Microsoft Windows XP. &lw; v4.2 on Debian GNU/Linux and Microsoft Windows XP. &cmucl; 18d on Debian GNU/Linux, FreeBSD 4.5, and Solaris 2.8 &sbcl; 0.7.8 on Debian GNU/Linux &scl; 1.1.1 on Debian GNU/Linux &openmcl; 0.13 on Debian GNU/Linux for PowerPC Beta code is included with &uffi; for &openmcl; and &mcl; with MacOSX Design Overview &uffi; was designed as a cross-implementation compatible Foreign Function Interface. 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. Priorities The design of &uffi; is dictated by the order of these priorities: Code using &uffi; must operate correctly on all supported implementations. 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;. 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 cstring 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. cl-uffi-2.1.2/doc/Makefile0000644000175000017500000000632011333325505014261 0ustar kevinkevin############################################################################## # FILE IDENTIFICATION # # Name: Makefile # Purpose: Makefile for the uffi documentation # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # # This file, part of UFFI, is Copyright (c) 2002-2010 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 cl-uffi-2.1.2/doc/notes.xml0000644000175000017500000000645611015741033014500 0ustar kevinkevin %myents; ]> Programming Notes Implementation Specific Notes &acl; &lw; &cmucl; Foreign Object Representation and Access 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. Optimizing Code Using UFFI Background 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. &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 declare commands and in :type specifiers in defstruct and defclass. &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. Cross-Implementation Optimization 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; Here is an example that should both methods being used for maximum cross-implementation optimization: (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)) cl-uffi-2.1.2/doc/preface.xml0000644000175000017500000000115311015741033014742 0ustar kevinkevin %myents; ]> Preface 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;. cl-uffi-2.1.2/doc/ref_aggregate.xml0000644000175000017500000003312511015741033016123 0ustar kevinkevin %myents; ]> Aggregate Types Overview Aggregate types are comprised of one or more primitive types. def-enum Defines a &c; enumeration. Macro Syntax def-enum name fields &key separator-string Arguments and Values name A symbol that names the enumeration. fields 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 0 and increments by 1 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 1+ this value. separator-string A string that governs the creation of constants. The default is "#". Description 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 concatenation of the enumeration name, separator-string, and field symbol. Also creates a foreign type with the name name of type :int. Examples (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 Side Effects Creates a :int foreign type, defines constants. Affected by None. Exceptional Situations None. def-struct Defines a &c; structure. Macro Syntax def-struct name &rest fields Arguments and Values name A symbol that names the structure. fields A variable number of field defintions. Each definition is a list consisting of a symbol naming the field followed by its foreign type. Description 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 :pointer-self. Examples (def-struct foo (a :unsigned-int) (b (* :char)) (c (:array :int 10)) (next :pointer-self)) Side Effects Creates a foreign type. Affected by None. Exceptional Situations None. get-slot-value Retrieves a value from a slot of a structure. Macro Syntax get-slot-value obj type field => value Arguments and Values obj A pointer to foreign structure. type A name of the foreign structure. field A name of the desired field in foreign structure. value The value of the field in the structure. Description Accesses a slot value from a structure. This is generalized and can be used with setf. Examples (get-slot-value foo-ptr 'foo-structure 'field-name) (setf (get-slot-value foo-ptr 'foo-structure 'field-name) 10) Side Effects None. Affected by None. Exceptional Situations None. get-slot-pointer Retrieves a pointer from a slot of a structure. Macro Syntax get-slot-pointer obj type field => pointer Arguments and Values obj A pointer to foreign structure. type A name of the foreign structure. field A name of the desired field in foreign structure. pointer The value of the field in the structure. Description This is similar to get-slot-value. It is used when the value of a slot is a pointer type. Examples (get-slot-pointer foo-ptr 'foo-structure 'my-char-ptr) Side Effects None. Affected by None. Exceptional Situations None. def-array-pointer Defines a pointer to a array of type. Macro Syntax def-array-pointer name type Arguments and Values name A name of the new foreign type. type The foreign type of the array elements. Description Defines a type tat is a pointer to an array of type. Examples (def-array-pointer byte-array-pointer :unsigned-char) Side Effects Defines a new foreign type. Affected by None. Exceptional Situations None. deref-array Deference an array. Macro Syntax deref-array array type position => value Arguments and Values array A foreign array. type The foreign type of the array. position An integer specifying the position to retrieve from the array. value The value stored in the position of the array. Description Dereferences (retrieves) the value of an array element. Examples (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; Notes 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. Side Effects None. Affected by None. Exceptional Situations None. def-union Defines a foreign union type. Macro Syntax def-union name &rest fields Arguments and Values name A name of the new union type. fields A list of fields of the union. Description Defines a foreign union type. Examples (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 Side Effects Defines a new foreign type. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/ref_declare.xml0000644000175000017500000000404711015741033015575 0ustar kevinkevin %myents; ]> Declarations Overview 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; def-type Defines a Common Lisp type. Macro Syntax def-type name type Arguments and Values name A symbol naming the type type A form that specifies the &uffi; type. It is not evaluated. Description Defines a Common Lisp type based on a &uffi; type. Examples (def-type char-ptr '(* :char)) ... (defun foo (ptr) (declare (type char-ptr ptr)) ... Side Effects Defines a new &cl; type. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/ref_func_libr.xml0000644000175000017500000002004411015741033016134 0ustar kevinkevin %myents; ]> Functions & Libraries def-function Declares a function. Macro Syntax def-function name args &key module returning Arguments and Values name 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. args A list of argument declarations. If &nil;, indicates that the function does not take any arguments. module A string specifying which module (or library) that the foreign function resides. (Required by Lispworks) returning A declaration specifying the result type of the foreign function. If :void indicates module does not return any value. Description Declares a foreign function. Examples (def-function "gethostname" ((name (* :unsigned-char)) (len :int)) :returning :int) Side Effects None. Affected by None. Exceptional Situations None. load-foreign-library Loads a foreign library. Function Syntax load-foreign-library filename &key module supporting-libraries force-load => success Arguments and Values filename 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. module A string designating the name of the module to apply to functions in this library. (Required for Lispworks) supporting-libraries A list of strings naming the libraries required to link the foreign library. (Required by CMUCL) force-load Forces the loading of the library if it has been previously loaded. success A boolean flag, &t; if the library was able to be loaded successfully or if the library has been previously loaded, Description 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 :force-load key. Examples (load-foreign-library #p"/usr/lib/libmysqlclient.so" :module "mysql" :supporting-libraries '("c")) => T Side Effects Loads the foreign code into the Lisp system. Affected by Ability to load the file. Exceptional Situations An error will be signaled if the library is unable to be loaded. find-foreign-library Finds a foreign library file. Function Syntax find-foreign-library names directories & drive-letters types => path Arguments and Values names A string or list of strings containing the base name of the library file. directories A string or list of strings containing the directory the library file. drive-letters A string or list of strings containing the drive letters for the library file. types 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. path A path containing the path found, or &nil; if the library file was not found. Description Finds a foreign library by searching through a number of possible locations. Returns the path of the first found file. Examples (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" Side Effects None. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/ref_object.xml0000644000175000017500000005310711015741033015445 0ustar kevinkevin %myents; ]> Objects Overview Objects are entities that can allocated, referred to by pointers, and can be freed. allocate-foreign-object Allocates an instance of a foreign object. Macro Syntax allocate-foreign-object type &optional size => ptr Arguments and Values type The type of foreign object to allocate. This parameter is evaluated. size An optional size parameter that is evaluated. If specified, allocates and returns an array of type that is size members long. This parameter is evaluated. ptr A pointer to the foreign object. Description Allocates an instance of a foreign object. It returns a pointer to the object. Examples (def-struct ab (a :int) (b :double)) (allocate-foreign-object 'ab) => #<ptr> Side Effects None. Affected by None. Exceptional Situations None. free-foreign-object Frees memory that was allocated for a foreign boject. Macro Syntax free-foreign-object ptr Arguments and Values ptr A pointer to the allocated foreign object to free. Description Frees the memory used by the allocation of a foreign object. Side Effects None. Affected by None. Exceptional Situations None. with-foreign-object Wraps the allocation of a foreign object around a body of code. Macro Syntax with-foreign-object (var type) &body body => form-return Arguments and Values var The variable name to bind. type The type of foreign object to allocate. This parameter is evaluated. form-return The result of evaluating the body. Description 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. Examples (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.")))) Side Effects None. Affected by None. Exceptional Situations None. size-of-foreign-type Returns the number of data bytes used by a foreign object type. Macro Syntax size-of-foreign-type ftype Arguments and Values ftype A foreign type specifier. This parameter is evaluated. Description Returns the number of data bytes used by a foreign object type. This does not include any Lisp storage overhead. Examples (size-of-foreign-object :unsigned-byte) => 1 (size-of-foreign-object 'my-100-byte-vector-type) => 100 Side Effects None. Affected by None. Exceptional Situations None. pointer-address Returns the address of a pointer. Macro Syntax pointer-address ptr => address Arguments and Values ptr A pointer to a foreign object. address An integer representing the pointer's address. Description Returns the address as an integer of a pointer. Side Effects None. Affected by None. Exceptional Situations None. deref-pointer Deferences a pointer. Macro Syntax deref-pointer ptr type => value Arguments and Values ptr A pointer to a foreign object. type A foreign type of the object being pointed to. value The value of the object where the pointer points. Description Returns the object to which a pointer points. Examples (let ((intp (allocate-foreign-object :int))) (setf (deref-pointer intp :int) 10) (prog1 (deref-pointer intp :int) (free-foreign-object intp))) => 10 Notes 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. Side Effects None. Affected by None. Exceptional Situations None. ensure-char-character Ensures that a dereferenced :char pointer is a character. Macro Syntax ensure-char-character object => char Arguments and Values object Either a character or a integer specifying a character code. char A character. Description Ensures that an objects obtained by dereferencing :char and :unsigned-char pointers are a lisp character. Examples (let ((fs (convert-to-foreign-string "a"))) (prog1 (ensure-char-character (deref-pointer fs :char)) (free-foreign-object fs))) => #\a Side Effects None. Affected by None. Exceptional Situations Depending upon the implementation and what &uffi; expects, this macro may signal an error if the object is not a character or integer. ensure-char-integer Ensures that a dereferenced :char pointer is an integer. Macro Syntax ensure-char-integer object => int Arguments and Values object Either a character or a integer specifying a character code. int An integer. Description Ensures that an object obtained by dereferencing a :char pointer is an integer. Examples (let ((fs (convert-to-foreign-string "a"))) (prog1 (ensure-char-integer (deref-pointer fs :char)) (free-foreign-object fs))) => 96 Side Effects None. Affected by None. Exceptional Situations Depending upon the implementation and what &uffi; expects, this macro may signal an error if the object is not a character or integer. make-null-pointer Create a &null; pointer. Macro Syntax make-null-pointer type => ptr Arguments and Values type A type of object to which the pointer refers. ptr The &null; pointer of type type. Description Creates a &null; pointer of a specified type. Side Effects None. Affected by None. Exceptional Situations None. null-pointer-p Tests a pointer for &null; value. Macro Syntax null-pointer-p ptr => is-null Arguments and Values ptr A foreign object pointer. is-null The boolean flag. Description A predicate testing if a pointer is has a &null; value. Side Effects None. Affected by None. Exceptional Situations None. +null-cstring-pointer+ A constant &null; cstring pointer. Constant Description A &null; cstring pointer. This can be used for testing if a cstring returned by a function is &null;. with-cast-pointer Wraps a body of code with a pointer cast to a new type. Macro Syntax with-cast-pointer (binding-name ptr type) & body body => value Arguments and Values binding-name A symbol which will be bound to the casted object. ptr A pointer to a foreign object. type A foreign type of the object being pointed to. value The value of the object where the pointer points. Description 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. Examples (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))))))) Side Effects None. Affected by None. Exceptional Situations None. def-foreign-var Defines a symbol macro to access a variable in foreign code Macro Syntax def-foreign-var name type module Arguments and Values name 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. type A foreign type of the foreign variable. module A string specifying the module (or library) the foreign variable resides in. (Required by Lispworks) Description Defines a symbol macro which can be used to access (get and set) the value of a variable in foreign code. Examples C code int baz = 3; typedef struct { int x; double y; } foo_struct; foo_struct the_struct = { 42, 3.2 }; int foo () { return baz; } Lisp code (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 Side Effects None. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/ref_primitive.xml0000644000175000017500000002052311333054743016213 0ustar kevinkevin %myents; ]> Primitive Types Overview Primitive types have a single value, these include characters, numbers, and pointers. They are all symbols in the keyword package. :char - Signed 8-bits. A dereferenced :char pointer returns an character. :unsigned-char - Unsigned 8-bits. A dereferenced :unsigned-char pointer returns an character. :byte - Signed 8-bits. A dereferenced :byte pointer returns an integer. :unsigned-byte - Unsigned 8-bits. A dereferenced :unsigned-byte pointer returns an integer. :short - Signed 16-bits. :unsigned-short - Unsigned 16-bits. :int - Signed 32-bits. :unsigned-int - Unsigned 32-bits. :long - Signed 32 or 64 bit integer, depending upon the platform. :unsigned-long - Unsigned 32 or 64 bit integer, depending upon the platform. :long-long - Signed 64 bits integer for implementations that support this. If implementation does not support this, 'uffi:no-long-long is pushed on the cl:*features* list. :unsigned-long-long - Unsigned 64 bits integer for implementations that support this. If implementation does not support this, 'uffi:no-long-long is pushed on the cl:*features* list. :float - 32-bit floating point. :double - 64-bit floating point. :cstring - A &null; terminated string used for passing and returning characters strings with a &c; function. :void - The absence of a value. Used to indicate that a function does not return a value. :pointer-void - Points to a generic object. * - Used to declare a pointer to an object def-constant Binds a symbol to a constant. Macro Syntax def-constant name value &key export Arguments and Values name A symbol that will be bound to the value. value An evaluated form that is bound the the name. export When &t;, the name is exported from the current package. The default is &nil; Description This is a thin wrapper around defconstant. It evaluates at compile-time and optionally exports the symbol from the package. Examples (def-constant pi2 (* 2 pi)) (def-constant exported-pi2 (* 2 pi) :export t) Side Effects Creates a new special variable.. Affected by None. Exceptional Situations None. def-foreign-type Defines a new foreign type. Macro Syntax def-foreign-type name type Arguments and Values name A symbol naming the new foreign type. value A form that is not evaluated that defines the new foreign type. Description Defines a new foreign type. Examples (def-foreign-type my-generic-pointer :pointer-void) (def-foreign-type a-double-float :double-float) (def-foreign-type char-ptr (* :char)) Side Effects Defines a new foreign type. Affected by None. Exceptional Situations None. null-char-p Tests a character for &null; value. Macro Syntax null-char-p char => is-null Arguments and Values char A character or integer. is-null A boolean flag indicating if char is a &null; value. Description A predicate testing if a character or integer is &null;. This abstracts the difference in implementations where some return a character and some return a integer whence dereferencing a C character pointer. Examples (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; Side Effects None. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/ref_string.xml0000644000175000017500000003320411015741033015501 0ustar kevinkevin %myents; ]> Strings Overview &uffi; has functions to two types of C-compatible strings: cstring and foreign strings. cstrings are used only 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. (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)))) 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. (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.")))) 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. (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))) convert-from-cstring Converts a cstring to a Lisp string. Macro Syntax convert-from-cstring cstring => string Arguments and Values cstring A cstring. string A Lisp string. Description Converts a Lisp string to a cstring. This is most often used when processing the results of a foreign function that returns a cstring. Side Effects None. Affected by None. Exceptional Situations None. convert-to-cstring Converts a Lisp string to a cstring. Macro Syntax convert-to-cstring string => cstring Arguments and Values string A Lisp string. cstring A cstring. Description Converts a Lisp string to a cstring. The cstring should be freed with free-cstring. Side Effects On some implementations, this function allocates memory. Affected by None. Exceptional Situations None. free-cstring Free memory used by cstring. Macro Syntax free-cstring cstring Arguments and Values cstring A cstring. Description Frees any memory possibly allocated by convert-to-cstring. On some implementions, a cstring is just the Lisp string itself. Side Effects None. Affected by None. Exceptional Situations None. with-cstring Binds a newly created cstring. Macro Syntax with-cstring (cstring string) {body} Arguments and Values cstring A symbol naming the cstring to be created. string A Lisp string that will be translated to a cstring. body The body of where the cstring will be bound. Description Binds a symbol to a cstring created from conversion of a string. Automatically frees the cstring. Examples (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)))) Side Effects None. Affected by None. Exceptional Situations None. convert-from-foreign-string Converts a foreign string into a Lisp string. Macro Syntax convert-from-foreign-string foreign-string &key length null-terminated-p => string Arguments and Values foreign-string A foreign string. length The length of the foreign string to convert. The default is the length of the string until a &null; character is reached. null-terminated-p A boolean flag with a default value of &t; When true, the string is converted until the first &null; character is reached. string A Lisp string. Description Returns a Lisp string from a foreign string. Can translated ASCII and binary strings. Side Effects None. Affected by None. Exceptional Situations None. convert-to-foreign-string Converts a Lisp string to a foreign string. Macro Syntax convert-to-foreign-string string => foreign-string Arguments and Values string A Lisp string. foreign-string A foreign string. Description Converts a Lisp string to a foreign string. Memory should be freed with free-foreign-object. Side Effects None. Affected by None. Exceptional Situations None. allocate-foreign-string Allocates space for a foreign string. Macro Syntax allocate-foreign-string size &key unsigned => foreign-string Arguments and Values size The size of the space to be allocated in bytes. unsigned A boolean flag with a default value of &t;. When true, marks the pointer as an :unsigned-char. foreign-string A foreign string which has undefined contents. Description Allocates space for a foreign string. Memory should be freed with free-foreign-object. Side Effects None. Affected by None. Exceptional Situations None. cl-uffi-2.1.2/doc/schemas.xml0000644000175000017500000000140411015741033014757 0ustar kevinkevin cl-uffi-2.1.2/doc/uffi.pdf0000644000175000017500000067402211333507746014270 0ustar kevinkevin%PDF-1.4 % 4 0 obj << /Title (UFFI Reference Guide) /Author (Kevin M. Rosenberg) /Creator (DocBook XSL Stylesheets with Apache FOP) /Producer (Apache FOP Version 0.95) /CreationDate (D:20100207032322Z) >> endobj 5 0 obj << /N 3 /Length 11 0 R /Filter /FlateDecode >> stream xwTSϽ7PkhRH H.*1 J"6DTpDQ2(C"QDqpId߼y͛~kg}ֺLX Xňg` lpBF|،l *?Y"1P\8=W%Oɘ4M0J"Y2Vs,[|e92<se'9`2&ctI@o|N6(.sSdl-c(2-yH_/XZ.$&\SM07#1ؙYrfYym";8980m-m(]v^DW~ emi]P`/u}q|^R,g+\Kk)/C_|Rax8t1C^7nfzDp 柇u$/ED˦L L[B@ٹЖX!@~(* {d+} G͋љς}WL$cGD2QZ4 E@@A(q`1D `'u46ptc48.`R0) @Rt CXCP%CBH@Rf[(t CQhz#0 Zl`O828.p|O×X ?:0FBx$ !i@ڐH[EE1PL ⢖V6QP>U(j MFkt,:.FW8c1L&ӎ9ƌaX: rbl1 {{{;}#tp8_\8"Ey.,X%%Gщ1-9ҀKl.oo/O$&'=JvMޞxǥ{=Vs\x ‰N柜>ucKz=s/ol|ϝ?y ^d]ps~:;/;]7|WpQoH!ɻVsnYs}ҽ~4] =>=:`;cܱ'?e~!ańD#G&}'/?^xI֓?+\wx20;5\ӯ_etWf^Qs-mw3+?~O~ endstream endobj 6 0 obj [/ICCBased 5 0 R] endobj 7 0 obj << /Type /Metadata /Subtype /XML /Length 12 0 R >> stream UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:22Z endstream endobj 10 0 obj << /Length 13 0 R /Filter /FlateDecode >> stream xu 0 {:\'*$^찉}~QĉRG/%ҟ l[CG1Ԥ=h+ %!f[G~ J%dO-%m|E9Cq*׹tG}vN6rRNY&su\[zwu ^X$E endstream endobj 8 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 10 0 R >> endobj 11 0 obj 2596 endobj 12 0 obj 918 endobj 13 0 obj 185 endobj 15 0 obj << /Length 16 0 R /Filter /FlateDecode >> stream xV_(ϧ1cSn^zR& ZrI6x dPafҿ iF@;-(,CBXH (tBXO#1Bf>,  ͵F "L~ w~R 6)cjVgɜU6ovvd[ϢBY1Gλ~R|t5Mb0_0|>?fW0CKGYFžxْ)& i((pK(L02Z=V5{Y3`je ԣSۣuiqQZ_š0E0IBA D&/ }DN)! 4D0$k6jq"jy !:DJwdo>_R%JnsᨃM\ <-gAGY]JK S^\ZO6߯T.1 }׍]|J*%_I)݆DTlt1|BG1S,yeIxD͂i1<)Fb]q O} o14 4rrIH6oփͭ}Zì0&m<3%E3{/9x^{KݼBdfBDnR;g=_t%{c\usQT}7OL/N!IYc:r]+ȠȨK&zQUllwHvUl!%Qy6:Ӄ?Kߊ1[ꉷ }c:֗!TOe"@5/ucZ۟( @ꭾѮ}!tmUε7čA; `5ci endstream endobj 14 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 15 0 R >> endobj 16 0 obj 907 endobj 17 0 obj << /Type /Metadata /Subtype /XML /Length 23 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 20 0 obj << /Type /Metadata /Subtype /XML /Length 24 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 22 0 obj << /Length 25 0 R /Filter /FlateDecode >> stream xTM0+Hqme=uUV{`I,@]bp&Ql|7 (~ Cq~xl$@Q ,$<}uwLps^Q=q]zO7>&IjBI͈:Ϩ9zLaT&SS[ɓѼ[Y0F}{L멎qH)Gd endstream endobj 21 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 22 0 R >> endobj 23 0 obj 1165 endobj 24 0 obj 1165 endobj 25 0 obj 581 endobj 26 0 obj << /Type /Metadata /Subtype /XML /Length 29 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 28 0 obj << /Length 30 0 R /Filter /FlateDecode >> stream xYYo9 ~uX4mܦ"iS$A }PƲ=9fRsJ#Iv.4#RɏH R+JgHC#O-HgQJ۵1Ki'2f0+  Ok>Kr6U/G`u["ڝ/p۶vߣZQ)lFE~ "غ[wj@.4]j}7;͉,́BvcmQ P1J |Ikrv/Xs ~ >.WuTylɪsliM]4@ \DIOH⇂1/sFh<s@qSu:s=N{^]*SMz9ٚ!$R 5߰AhDVWy hG,˄ݲ>.4jk+fj$΢߾ 8Ĕ>;HG{R{0NT;٨ڶH苒7V."N* Q9 ]3e9 Cڛ:VjHTGS &tab78Ȇt74WGpWY{`F21>޿?\. ou#]2͡zL:w+hX8[~czkIC'vȋA!畆7Eqobz:my}?)|5)G&ա> y:n!/[ȡH'nG{>o'O}ZBدx^,MSҵMYԫ4Ѳ 'jyB٢IvUI.nIxTxhk}&SoiV;hT4΁q>懓wi1]'.G$6=q}$<G|QeGa shbI7K xW#?%?3ܤ-+vU=ËLUs\uTqzAZpl#Z> endobj 29 0 obj 1203 endobj 30 0 obj 1809 endobj 32 0 obj << /Length 33 0 R /Filter /FlateDecode >> stream xWK6W*Q9[@!AhD*$eHvrbmp_d.$h4F#5*Aѝ~}%Ղ_hK7ϓ+z0H0|ڿRY0|?v>Z>,&0VL=FPA^VOOߣq8z7~?_M켾&1/ '${"Jf~`3CC D,G)3Ϗc߇c߁=P%B ;P6ȋRu66~yy}@XHCuDh_H!sizO9{x^,B;~rd!FWVj m|"T~RbHfT1ʼږVҴ5n0UTv&<Oi=<ɫC{jChbsₜIXJҐ+ ?m%\Ûь(eDvx=l ˩ Y>ec?0Z|ߟʨNÒM:/OE.Cya< >LDmֹ*2P;Jr+zZ7*1?煍jiϢ`C#`Zbl<~NLTo,6 =ˏcElǦx#uvD>D5MwcMR2xbWJuEDc4Kqe 13P^nH\F3֔Z.> endobj 33 0 obj 1028 endobj 34 0 obj << /Type /Metadata /Subtype /XML /Length 37 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 36 0 obj << /Length 38 0 R /Filter /FlateDecode >> stream xYK6ϯ-Kծ#mn@e$$aY;,_ɖnIP9}-sww୘$b ]?rZG|_&/;_t[p :u`N!|(Ac/$~j!Q 8qZ#&>7MTD EVos< 1X&17 cu\YX Bixe^2q#BBa_JvUHxۏߕ{}7-f1#4ߞFG,I@HmvH7z6z4n aF23|]WLOxN~}*[Nr\͈涌cfKq-m|/L8gQ+ (z], Kw3-żK7a})gtܱh ^16K&)d!]ŠK\,HO+(‡}L.&ёEUc~ƈ=s/32aNKWlkGqGe u0\ ~L[fْs6aͪx0XѼ4)2YvO;:35)~UZP 080 m|hL W (*3f]^0Oa1FLmP4.vyƚN]Sw:2 硋edҎצ5y7 5; ixexg*MD1̜kЎazq6}2v 30ah6c@T)F'ѰeR0-0&$|=0N ۫޾>0`3!}Xb.\G:Ћ'e1{:2*8 ?Q-j$ʹB-ff*&v7<=1ɸ7W&:iGFz-( M8LPpt>E@.Eqhئc`CPPp-OEZ-J;V!o_2R/&ֳctHrH7/]ױXȷzzХWU]T{1JWX{n\ix'KͶѽodYJU׽"H Z]'yNP=&cr(`'EYj>Y42fSN.`me l/4bx!?tJZ4k>㰯0/ĘȺdMx͆$+&Mٿ^ -=M0pT^C7 :-e2w>yŶ3vץmECW,`w,{խdKA4pw((Y/{ه@gd~g ʫU\ 's-7V_1_\ݝe{ʗfq&6?W|/Q/6Q^O۽i>X@Eē)c=(ߙHl4CZ?)м`lh򙟋2~yhꢞ1 :$@rm2VF 4mխj m,On`=L%# ;Vr_!hj̧G>Nh* x ?/+|i "F, oڂ$f^›6}Eӳk)66ܞlQm#v>${+Ԍ.@,@1W ʋkPVkGVb &%'}E m^,fWhw ^Xێ`\·Q^9X_ 8ʯXV7 !> endobj 37 0 obj 1241 endobj 38 0 obj 2002 endobj 40 0 obj << /Length 41 0 R /Filter /FlateDecode >> stream xRMO0WʇG5`HBa1jmkɼvޛjYDBR/D5>3%qmʠ3^B zJ*mV~;~AFeFǷYa8xn꼉˲%,@}O%l zDw`f5Р ol@1]T%ݩńDVZIkZ|Yi{}f5;0ֺ&^ lS)(cL>ˊg-v'P<Q.Z /4X:%wu&]w@]'"nLސc4̛ɹvw,|匈c9+H*.̐^0f?=?Hm endstream endobj 39 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 40 0 R >> endobj 41 0 obj 388 endobj 42 0 obj << /Type /Metadata /Subtype /XML /Length 45 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 44 0 obj << /Length 46 0 R /Filter /FlateDecode >> stream xT]o0}WTjkuԩF,q5&ɲ_?Jb5 _u tu3X7τ ]y. Ѐ9î^,L ߒ6A<<:r &wg? Tpw<9 )^7Na'snZYqUɛ(BpGVp2`$Kha/ɇ" 8H-I<ϏYJ]L ҩr]np D9y6)eEAb\ +ƑnCEidZB1tND(QU[EH>iӌ]Ě}w>RU1IK"ҋ<6G>0%d.—ۮӦ!MmboZVF&o!ee_ΎMPrusЉQ84j]/.JڟSDv9 7 endstream endobj 43 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 44 0 R >> endobj 45 0 obj 1279 endobj 46 0 obj 495 endobj 47 0 obj << /Type /Metadata /Subtype /XML /Length 50 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 49 0 obj << /Length 51 0 R /Filter /FlateDecode >> stream xVKS0WV-CeINSȿڒM@ ZK;Oij"I"+K.VK%O's\ 0xtH]eG]A/Wķ&W2vGBh+TeF6ą* \dUci#,,n`Oy}6V,,(&߂p7xKk|ScP"#XfNV3mUJب?JP4ht$D?ۻ4ʊJ?CYєJT ڝ+aFc 58v6_dw53 Ѭe1cPÉm& 8if#xZ"}.ơ1aP .T%_V[oaPD+``Is΢]M6ER^y#$fJogo]T7_L3(^ sacŠ)H73t9#hnxl7>['ԾPɪF|QX&]Jx/{=Zr~WqBRL6ܙ4p(>-ȳWEcͅ~aTM);Ib'>/ endstream endobj 48 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 49 0 R >> endobj 50 0 obj 1317 endobj 51 0 obj 806 endobj 52 0 obj << /Type /Metadata /Subtype /XML /Length 55 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 54 0 obj << /Length 56 0 R /Filter /FlateDecode >> stream xY[6~_NVb;*U[DU<0q2 U.99~vq} jd@mpmZтX ڤ~|:8V {7_DXA]cgv+dVKo٪mus*8o;Oͫ_m mp` [5 2<8ǀ ! {ZB+z%/cNJj?Cl86p"5?R Fhx<&o'D!lvjDRL0TgRN48GTSZ_ڎ0=NdyFSƘqx$S/,D3*g"{BBKx"N no>?}ty:oH 4b֥qV.Rc,BW\FuZ6)@V YM\txp 2:8^tΓ\S z2|QR.F{p`)v)hgg=M[΄Fݼ^$7zr!iV4K9ײfYR19Uf]YE(XG6 CQC4H Qi`~qTMBu;W^>,+N5,hxHȏQ$d#)^B#-F$tj5ժj}*eمPmd8 +RVdRRb5!6eXM~uP$-,BDu4ͯ(aM+S)Z__=CX65[$ ^ީÃxi [Ns*X,!TG:FMN@F{G *.+Fx!e/mT6U]ߟXxc>m \hVB'wvL:R4YeWRK?b4kVgGrʟل=iQm퉪kF'2<ܭq'aw㿭{Q_mWq{\ΜĽ FJ1'FH_ڵvWTݼ5+WM($Jo'GTM? endstream endobj 53 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 54 0 R >> endobj 55 0 obj 1355 endobj 56 0 obj 1345 endobj 57 0 obj << /Type /Metadata /Subtype /XML /Length 60 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:23Z endstream endobj 59 0 obj << /Length 61 0 R /Filter /FlateDecode >> stream xVKo8WPk(Q-.Z^+MKIlR"p4"ǡ0@o? Hrwk0H/@!Z3I=z%%gUmnRrudzzL~ va $a/Sg{ts:BUi^6]0˭(Bخ8|,&tF lcwYf!l%сTE.u6Q]$eoDhAsbEs0)O{1_~iJg@Cl"!⸏A$u9hW(017{8xDBEҹYtc)f}z;p@FEۮT?Dv0Q*rbFՒb)ކ!E3hSu!S#`Th\Iffum .ȁΪ1 %mazڊFD۲y)V x@gPLwM>dafD9Ll sqk2U<}.be>Ku-+|ښuAMkq嫐ˆr>Q=`J hV}RU),౶[ S ~[K kU%kۤ>_:#0*;2¥ ɉ|HC z5IVJʼJ3hRg']E N;۞(2c$'O,J1HyIUv6h@)DT9FoJVZ"fu3jF=SBH48z<4 _R4nIxsF-c;> endobj 60 0 obj 1393 endobj 61 0 obj 938 endobj 62 0 obj << /Type /Metadata /Subtype /XML /Length 65 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 64 0 obj << /Length 66 0 R /Filter /FlateDecode >> stream xV[o0~W1{ll֩IT%>P0)K JҺDsA6_BRo2EkDEaQ̞mhK7藕YYw0D -M:O3p/ n jQ:KLڸm f= ^ItVEN8"V[Vp\ɰUnݡwr5*g'kT ADrL Of"p!*1nȎBś.[m@Ƹ3!@~)#U:]..Tgj,|f ₻(D`>&WbN<)Ecg \]H#l3 I="0Q@?ܥj>#}x<*+fǪGCX =#:ֶ܀}qi3f<%=}b':8N;f~iq,oEKÃ)zokK)`) x[y60`ϰշJ rۤ`S]410F#w""mg*i?q>qA0|;eGI/ﰷޖ-KQOy{1@8ly]F l 9Â~"û˫f֍~#3O<{X:LJ@C2.k|8<"'g? endstream endobj 63 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 64 0 R >> endobj 65 0 obj 1431 endobj 66 0 obj 733 endobj 67 0 obj << /Type /Metadata /Subtype /XML /Length 70 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 69 0 obj << /Length 71 0 R /Filter /FlateDecode >> stream xWo6 zr0CRH؀nK Y"n{{Pl: K$G%Q{4E>s bh;"Z 0h;G꼰 5lY:#ٗpFP]%0бoNȫ")_|gA0!IyMRɜ%6nY_kts9"Q1Gk#Jbca@ (XhC_ >jW˸CdWPl( NZҵ}d\ߠЊ>I0SSGDU7EitQ),c%:JJ:^EeM~~N $a!3)\).V.Vy/,==3BX/lbj@>UsR@kס7"2IlݸbHLeAf'guycQWݓruo6:=S'ڴ|d2Z]#q#+i˥v֞򐧗}:lY.bҕOD|}oi'AI7N2Ĵ͎:3|;KLbl3^~Ȑ ¥v=2T>c@+lQG/sk!-TMFZ]Z%|6Ee:/e6scDoW3fe3v_گεr> endobj 70 0 obj 1469 endobj 71 0 obj 1055 endobj 72 0 obj << /Type /Metadata /Subtype /XML /Length 75 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 74 0 obj << /Length 76 0 R /Filter /FlateDecode >> stream xR=o0+nc{lR 5RĀ _kP;tσpe%asAFJ F$UsE΄C|[376:  y'w7=D]*nAgA ͥ BƷs6 0Tͪ(>o=J2ᮬJuY CB^=5} ЈkMƘ^TS(')kvvpoQNH> endobj 75 0 obj 1507 endobj 76 0 obj 325 endobj 77 0 obj << /Type /Metadata /Subtype /XML /Length 80 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 79 0 obj << /Length 81 0 R /Filter /FlateDecode >> stream xXo6BH=OYECL;l)wć$u7 C<~(`wI$A_|YI#AB(Hha;P5~ .>}ui$⣥_o#`/>Mb(@%{t6+berx> 6 Hل,7wfbb C54qo^%` LzkvSLwe] hoʊen>b"!Ai,Ͳ[A!t kxwe]!- qES~?HeIv\u7a%8mag@ipP(dH(*T?͟aspd\]SVvxem0niSџ k@`Dbem7pq ޯ0n &+9΍0DS?q3`X rW\oDA_+lhc&/|Lr,bA՜(G=ճSާ8yLG$ !lyg&yۖۊ-~Ym 4"ԇ!<=*@bvyYr=1Y&%h>˲*nfA[=rNDa'~4E>AFepbV-r4TdY:6R9Ob:= r3yL:8l>: jn-ւ`\R3gu`΋ڱ㔇-ĺe|ۢ){S4 ZzY]ި#s牱hhBB0f3yGk=LJdU$d+eXӢ=݃5&oթC ˙Nξt$Ikuŀ#uT4,10i&9.N A]S=;5,('a> endobj 80 0 obj 1545 endobj 81 0 obj 1530 endobj 82 0 obj << /Type /Metadata /Subtype /XML /Length 85 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 84 0 obj << /Length 86 0 R /Filter /FlateDecode >> stream xWKo8WU X%mZt-P==2 +mw$ %JjPih|a"|߆t2E^DAHZƂ|J87/_a0Sw}_<# <̝# =2U7ٻ=s~Ҿzow7D0% Py qv9 }E6;/]+m. c2ʥcӹ|TsD#a|ɶnK\!)AsӑR6Պ,-p伓IZȺw.1ϟyY|.ts6S#қ-Fn@xhrZXF;W 5d053V&~*/Vˣ~󪒵"2;9Ay#14Mue )j.^IE`y,|3%FC$tZ uaيi9QTH b_C9vbvD'*hO22w2R?"ȗL dzeJSQ*=5[;pȼvq&*M7?c ~PCbpV>8%oLo"͞Xgy֬l0 dgqsK *)^d'u#XNڶv ֞> j?nת.Zf2eiH<# lNZ>\D]}ңI"fe7@`Iu^Yr8,t;ZCƙsW֟YQGlP" *$cmwq endstream endobj 83 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 84 0 R >> endobj 85 0 obj 1583 endobj 86 0 obj 1007 endobj 87 0 obj << /Type /Metadata /Subtype /XML /Length 90 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 89 0 obj << /Length 91 0 R /Filter /FlateDecode >> stream xV[o0~ϯCI =dII]')EIk;߹$ 7_ wOW{Pnq` ;`ƪ J?j#؂^!ѻч+ýU ﲃoNЋwPL ~An ![M,g}mIVrb^{rmi ށ!avnw`WAh:!Bb!hb7 ~mj^EÀum0␅B5!;MRe 1;[npleC!ama|"oXnLEpBJKN-vn\0>a}+w"tP9qgoSgkЪ__G>氓j%[7Z0t@ !±IdH7L6tI 3qaU EQ_.vCحdɥEIvZ=qpVd8[|%C'>Bve\${i H*BwDz,G3)7S;6ink"J_m[0)nC'j|BP&Bx\)zZ ;b P}_!,quDL_foL]|Ilen7M1M\9rgFnAcpfȩ̑ۏEj/khq3`|vɳq}Qa5xx5?3T18J-"QDpp8&P}>- endstream endobj 88 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 89 0 R >> endobj 90 0 obj 1621 endobj 91 0 obj 835 endobj 92 0 obj << /Type /Metadata /Subtype /XML /Length 95 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 94 0 obj << /Length 96 0 R /Filter /FlateDecode >> stream xV]o }mC` a:6iDC7!'di?0؍mle)R^ ?.XspB"0$9pdd@~X#=؂A 1Ջkc΋I|^<)[ pث $Qd'ɬe7ڡEg3(g,lw`CKz!Xz p 堆/ՠ~&vk#p'Z kK'o" bK5gʴP3[ LGBxMRU|{bg'lSysr_Samܓ1 l|IVUZSp,ncOx`iAz&k#Tҷ֡G,#!C;l=qgokNVeueZk7dQ {-B#4pjT we%b\~TtbLy4ӻs% rܧl8/u03]&a|^0<.t({_UNe1}v7Ӧ7>,u1!Ҽ 2ؼ=1c"\D4:Taq+tz t9 'L)w;ÈBDff:B.;ռ2Z8_m\x2 vq ) vtĻlJ'F48eFˢ,RVw{ױrr i.P?nJuC% H!13iGDOx>%ܴ endstream endobj 93 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 94 0 R >> endobj 95 0 obj 1659 endobj 96 0 obj 816 endobj 97 0 obj << /Type /Metadata /Subtype /XML /Length 100 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 99 0 obj << /Length 101 0 R /Filter /FlateDecode >> stream xVMo0 WQ_[v@`;=xHqOeS!z-'E}' A"-"1h-ЮR;Y L[dlkUp/O } J< a!MUTnn͚]NwRW> endobj 100 0 obj 1697 endobj 101 0 obj 690 endobj 102 0 obj << /Type /Metadata /Subtype /XML /Length 105 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 104 0 obj << /Length 106 0 R /Filter /FlateDecode >> stream xW[o6~ RA*IX`2dY+L;dɓ;2/.v2 `$}C Sn&Oa"/PK,@w)C 孔5z_R`7\" O7wP|6nB`D#1KRoiV%;}>Qi^xCxh@Ɇ :%'x׎ - 0ƤˡBmʛQ KQTU@S4]N(-( XJ 0M =ha]5s"mUiO#.#TMBƹv"؋GL+"@DŽxC*Vj~c-[OYxLSnqg|̪n#6)__-j}&-`jɎ&8ܪD>Qp@GҒ YF Fѭ+fd_:Eh+nGQA%*ݪܜ\$ι5Z=c|@Ƴ|x> t0fЕ*۞Dqi*AY֋C_@E{^GSdͭ3:1=F\՛Ute[XD ާI:55d1]ţ)uejMᄬcy0:r>s^^ٳ}OIr&ug7'dSm\Ia`_Z>_ǿ9m<3ZXOYW-Nfww//w ]bk>̖|is\݈GX/B "x> endobj 105 0 obj 1735 endobj 106 0 obj 1074 endobj 107 0 obj << /Type /Metadata /Subtype /XML /Length 110 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:24Z endstream endobj 109 0 obj << /Length 111 0 R /Filter /FlateDecode >> stream xVmo0ί4i#l1IMJUCJLD #dm $CM)=wϽ$_nt0\_ kd @ ZH [|nn%@`<OЋ?db_\ @HiS,SuSm+(+'UlO g 0Dѐ#\ kpc`nu8Ku& IY2@^.40U*C^[H] @:ۀCqY†h)"Ismۑ&E)ҕ j}fa8n#|sHqPk`󧼊;7D + 0I&;=(jdrh`4ɱiou)h*v:%YslRh9/WȫRIߣl' zP\FUZ *ADOνVdq 7(fiךv7ƻa Bu|!qnȍ|B<\Ȉy1Zo21=\HRC w]i7NHkhGN|ÙɁ9ȝ4%l endstream endobj 108 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 109 0 R >> endobj 110 0 obj 1773 endobj 111 0 obj 840 endobj 112 0 obj << /Type /Metadata /Subtype /XML /Length 115 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 114 0 obj << /Length 116 0 R /Filter /FlateDecode >> stream xRMk0 Wr6ev(=K3tsCء׵#$~ICK`^'4]/ Q.n^@p-(Td7 PS)驐qn i y;b҅n[)#/8lm_V P- [l!{#o=u&`BFcQ/ȑT1xHQ{C_/[AJ#A3uFsg#M[*o#,f]כ"omy g9[M7UZySe] ڒ7y[J endstream endobj 113 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 114 0 R >> endobj 115 0 obj 1811 endobj 116 0 obj 342 endobj 117 0 obj << /Type /Metadata /Subtype /XML /Length 120 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 119 0 obj << /Length 121 0 R /Filter /FlateDecode >> stream xVmo0_a :۱xIC 4$Ua݇u4)i KlqtCJ}ΏϦoL/ Ww2BD(L2cJ5`v[<>xWװ@ ~z6.Z| wB",H{RS7nPATdWZzo'ޫQ&K( &+t5b]GlO]bIdˈB\j66Jlzb qTe^&oj^2>K)Upx2^Up9:57:( 6e͕K`]a&ϰ'OK$ա?"o H,h$e.2kdOJЈծl~P`]KFx_ uPZk[L,N|R)7͉1_EpUp?C, B9-n+;,Kn+ BIC)yC"b{[[V^Ѫ_l沎 8*,?dZg{c -.wf-,o=Y;|YyLe[-P:ά({'vrW5h d0 %)eR VWj5SVg7EEa TEhژy"6lv?CXJtwj3/܇/Pb22vgq2$!bl:mu̾ΌtP,Mggf0m@Q# Nj|;KZ#/Nыx'?ͥ5""c%>u,쎜-rsZhȃ5hy<밎8?5G`/,>>:\ˤi ?ŒFFgoB*5 endstream endobj 118 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 119 0 R >> endobj 120 0 obj 1849 endobj 121 0 obj 913 endobj 122 0 obj << /Type /Metadata /Subtype /XML /Length 125 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 124 0 obj << /Length 126 0 R /Filter /FlateDecode >> stream xUM0+| J*Q{I`RE ƞ|FsRq͜>adĮIUg>.o'w|w^pG8W;>w*H.Ym a6qDg͛}fiؙEVp"YGEv €cK[VC34쎼gֹOc"22RwlEy4oJ+L.R $+򆌇k_$y5SmEUݙ8y*kR-:ld_%E>=ܥ\zu'ļ7CC`yIdktœdd_# FV}ecôRoĺQwKoQC20.=MըBR[ˏmT3L-*uU^Đ@ op endstream endobj 123 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 124 0 R >> endobj 125 0 obj 1887 endobj 126 0 obj 627 endobj 127 0 obj << /Type /Metadata /Subtype /XML /Length 130 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 129 0 obj << /Length 131 0 R /Filter /FlateDecode >> stream xW[o6~ )ԕ6E>}Pd:*K%%~%R7N5@MB%_(WSGJF u yjz!XUէϰEVxiSY};O/>o!ha/QoI7ٛ=$*&MT^vpi̋HDUPG`| oΗnK홹 ^C߇I/5"?TfiM5a <L@_4 endstream endobj 128 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 129 0 R >> endobj 130 0 obj 1925 endobj 131 0 obj 1163 endobj 132 0 obj << /Type /Metadata /Subtype /XML /Length 135 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 134 0 obj << /Length 136 0 R /Filter /FlateDecode >> stream xVKo@+Vr`/XR+jZj#Cʀ 8;-ڒYk|= ?R1H_mdIx`D~G)2kku+xJXNɹ%"`!s3wȋp q$6~+Q[g]QVdOسRo,(AЀ$8h[ t柝/Ij& !tK :JSA\&^:y̼jc UaU7]mljel>cXFUdJwfR/{Ytz&O:4 y-ۯѢ{ilfvʂBmW]^-吸C]{NPPprGN5i}66Y6ʺ~ۺGI $ J I߇SKk'-7zĉ.WIGv0gUߵ~Q+EEl$N0IAkFp3p8nCy7yC~<+Oe2h x[;ч}Fq6Yndvi[Y""z g]:J?bڅK@cz'J7& ct79EFmVP/wRy|R2ρ> endobj 135 0 obj 1963 endobj 136 0 obj 809 endobj 137 0 obj << /Type /Metadata /Subtype /XML /Length 140 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 139 0 obj << /Length 141 0 R /Filter /FlateDecode >> stream xUMo@+V²졕\խTR@Cea⓫Hμs@Oi᥏%}`m Ց!jOI].)௃teܹ=/n \. vP0)+'L͞UʬUIVJ R\]S"#+KFVa '»9Kת׿A"rT&f@ }zK$7u\ff &s$Pъ%=O)Yb&V xj=-?R

> endobj 140 0 obj 2001 endobj 141 0 obj 638 endobj 142 0 obj << /Type /Metadata /Subtype /XML /Length 145 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 144 0 obj << /Length 146 0 R /Filter /FlateDecode >> stream xVߓ6~У$Τ3^'II&M ]@{g~ZAߜ?O0,Q1dj:qGjQZki ֭*b>[Eor,2vZ y:a݄S.UuSmlѵϳP\F-^ Pֳa6  Z`×դu& !tK}*Cގu[,d}v,W JT4[o:WX_%1i]d!Y12]8kh/&V<>]2̨Ǫ`׃/N H6s?LUuR;]µ&-<1|/C endstream endobj 143 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 144 0 R >> endobj 145 0 obj 2039 endobj 146 0 obj 969 endobj 147 0 obj << /Type /Metadata /Subtype /XML /Length 150 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 149 0 obj << /Length 151 0 R /Filter /FlateDecode >> stream xWKo6 ҋ t>DQ )j-!*v%U6Pz۽Ґof>i<[ ?R17oh3FdvH tF[Y`Ed~|D@ۆ5O=f>NӰ I< A,B0Z2s'7nͶ-\AnN J.09ڝg7 MjڹnPːB4l],퇈)L]RmO׺ASڸR06ցW?DK_C;5 s ^ޙ(gjV˸.4s{i5B沃u9\bhkC[\@aACdvre?+8^PQ 8USP׿t\Tc/c`&x< V}yuV*gnbA as?unrlY9/0 =q<;q~x.n_``cϺ˴<[VL0~ * ݴH@ Ķ>hҬ2v@v#vfB`&Sc5hJBD%(8P@1޻KVG{W8cz(SZ3DdX# 啈/gI ѹ8\a1N;$zA8s,Ǽ$iwJְ)?~ |A1ΌW1^U 쇠/WA8V7;9MN}Z_"3+!ap o)ȻyHIF搌&&\jo AוJXC CtF<7ԓLGk ,sMK=`P eow{wjS_m endstream endobj 148 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 149 0 R >> endobj 150 0 obj 2077 endobj 151 0 obj 1036 endobj 152 0 obj << /Type /Metadata /Subtype /XML /Length 155 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 154 0 obj << /Length 156 0 R /Filter /FlateDecode >> stream xVێ8}+<1Ҷ )ڙU"%R4C&6=d Ődf\NIңG1"xhDh@GdA-xuq>yGП/0C {d]k|}3pYX'!Xnfݶ]C׽Q (fEO=߷(A8}Yt[z;Ss5˟!1!bi!cyw#&1 n*s6}RmQ{U]!{kEc1cR\ [׭s7IcyT2 `<08Z&^^@gJ>:| vl@1]V]PbAc)h % [+kt3ߓds7׿Uڬ1g/_]ґnXkG#%t=6aSjpչF呔3YuB+_'$I/XN_Tgy>iSŤd#P5ɪ׋aCi,U*E $ж(=>$yˈq&13򖵆a'T XJD,欰q vd=$aP.p?;xvҲfӔT/6uS]|<ҏ8c#7z=u bxu\͘_N%nJ)K¨z:'ßH.CPs;e쯳 ԫ')> endobj 155 0 obj 2115 endobj 156 0 obj 965 endobj 157 0 obj << /Type /Metadata /Subtype /XML /Length 160 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 159 0 obj << /Length 161 0 R /Filter /FlateDecode >> stream xVMo0 WRdY v(mQo9іğɩKGJ#s?Js+Q[arIVْ, W> K= Gܜ@p%޻;_?d3_5!.⒍T-niZӲAV'[oԻ Y }2] #~񮦝V"22֨Urn)u^Ey[.7$MvF&ġk *i`r:>2dr13QnlItZY2TFo77e1-ڀ"+@գ`4QkaM% Vvp=qeS}{Ԓ=M 㟿nHGt ޻:6yUQ5 Ojl<@Zek2if'9{ܙH%+EO9 ypY`iyv"5$3sm75V @=r޸vkK80V,Sܟ^G"KzjV)1ؔ3-]$Ex|*B %Rf endstream endobj 158 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 159 0 R >> endobj 160 0 obj 2153 endobj 161 0 obj 711 endobj 162 0 obj << /Type /Metadata /Subtype /XML /Length 165 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 164 0 obj << /Length 166 0 R /Filter /FlateDecode >> stream xUMo0 WR>tX;` C׃(gh[N!@H$#03ܑ͉҆T %$)N6R|R'/pw{_2/ n]\NoJYQK\Z5zeGR0\m?$ Hr4P$ܐ7g䁄˰÷U%vR^ZTjM.7ƺlᆂRqO6zp`(H[?8=S6h!g:,ruVY~~e̙cjEz}=.gS ;J\@`X%ZzPQnw"z QH"B5P+}׶ۿNC$ Ew\J,"߽w9ĻyIK 8kJ _ *L>zQYMZ2}mg9\ku~e?hkVRUɺYب^%њ5"hw<qNO!) 2^DEêFɇ7{:bLuUW gDej߽0q&oU>WT(mwԗ@PBUP+͓|^J(Qb'Y 0u 4( endstream endobj 163 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 164 0 R >> endobj 165 0 obj 2191 endobj 166 0 obj 682 endobj 167 0 obj << /Type /Metadata /Subtype /XML /Length 170 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 169 0 obj << /Length 171 0 R /Filter /FlateDecode >> stream xTMO0 W8#͑o !$D0J Nd[۵=MZg9TЗ%f PЅeKp8ErI>p͞_? r57W7x 8-Qx|^KEJJO)ʙ)NtYIÖR>R]zp1ۦax!!9 "e^Eg_e2P"JK;'P\ɺx7nP$hc?Ϭ,pfzKX黃UPN/;0ȴiV=_zhՊq| j7ȗzǛGz2 endstream endobj 168 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 169 0 R >> endobj 170 0 obj 2229 endobj 171 0 obj 465 endobj 172 0 obj << /Type /Metadata /Subtype /XML /Length 175 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 174 0 obj << /Length 176 0 R /Filter /FlateDecode >> stream xXKs6WprhPo:(q'['ʁ *IV}Adw4# ^B$ "_Ad[I>{Zr|.| m,aaH2*Fz? ,HGphU}RUU j-;DŽD,ѱ2б߽` B^sBК9 B!:<tb}fs+~wLjBQ/ *1Zvɏi0I⺙lʴhpub--u Ahhl: zS*8rrI¼I 4z5o6`fnLG`Hz'U)gϷQ0]OR/2xAөXl\Cc B!ԔiJIr%T.Nx/N1Wg[ kSh{58b8Q In,!AtfO86tiҏWٍ>TNUb]s6;0{quvq~r5飩!Cݚ. ^5dz-YsUp'_m+vLqK6ژtOHy QdE9)7&&d,UrJzbrXbCaz03MD+ttt9TtW@uo9soԙmg[MY)NR߷EqvD=' ! $t:J**.$YR i48vM'qj/gz d#!>m4GEo2e.;a$=``~Oz'b\E=|-o__V:|cnU)Oř^Pqdeu)[4 <^}obQN͗6[t,'gYۏ?R<֒yu)%kAڽ]^ܩkS nc\U5ዼ<.w 6B@!MN uo.gXMkujFGC&*cNKrFrW_SuP p#6V϶$Z_>d^>x\1!Lvn/燽FnzWFCEx=%}|J?3߿UV5 endstream endobj 173 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 174 0 R >> endobj 175 0 obj 2267 endobj 176 0 obj 1425 endobj 177 0 obj << /Type /Metadata /Subtype /XML /Length 180 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 179 0 obj << /Length 181 0 R /Filter /FlateDecode >> stream xXo6_Ats#}nذ jluQ2%WxC"){P:y_;+,K2< X#p,J|!Aj !p@Su[˾An ୛$pH H1Ki{*Tީ^)GEn=֋o~F`]j7D&4#x ?/ެg9|nf ")B;ՐX~ˏTG;L cuxGUY7VKe 1QHnIfGP|MKVQ ,s>1/Zӭ!|*&\*$)v4D6V0~rciZ [sx۳l⇼_m6݃t0)633DUIX^APJXiY,8dӱx:PyuPGT9/Mڱ%kRKپsWm~!޽޹Y H3d2if9!%D ۠;z 5&tKP cIK_hS&B]\C K& ɲHYsƋib@ LrlLoois#mm9o؂֖PvC_wXN?u) ?/.#{r4Rkʋdi"WfGa}Mz@{VuWjKE 4O̞Y>Pٲ&J6t'-\Ytn{wF'޳ feЛ\n0J"DJ]_y^Ѿw`(Iy߲4m^oI%&$Clhǧ&ȼj~=xE]ݍ<+Q>2^ߐ\!1>LF0ϣԏ^Cۮ1Cԅם | },A"&7ˮ,K3́Z10f(*>h@xh Pq6*T=nzʮ*T;/Dp/8Fa_q endstream endobj 178 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 179 0 R >> endobj 180 0 obj 2305 endobj 181 0 obj 1276 endobj 183 0 obj << /Length 184 0 R /Filter /FlateDecode >> stream xTn0 }WyJ D$˗= (bM1{sݾ~v[iJ<琔;ᝏ/@zƥ<. `lvW;zp'@ !\tz c_*QfPy\*LJp3MlUj}v $q5@ڋ vK#kSz԰YU$ =-$ LC|ը-wD8:A{(=[MW3]?P E""G_TiTE^yQ[`8-fIVYaV&}3y;#} ^EZ?_몉=7$hE!݁.>n/ӻƐ w4/j0e˵l_M载OcQie"Ҹ~܃:]3h:KY_h)" .CǕ&qP?V) Ov+NyY7xͺO[SҷͿ) endstream endobj 182 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 183 0 R >> endobj 184 0 obj 528 endobj 185 0 obj << /Type /Metadata /Subtype /XML /Length 188 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 187 0 obj << /Length 189 0 R /Filter /FlateDecode >> stream xYYo6~_!rUtSEA-̓,s-!::vHR@&pL} 6:OFVm8#kx!p| ʠ([e+E^En7|2l 8o9p>ޱ/|5mp{%Mؒ%^ʞV[v@ŀ<@3v[㋱uN?|gn$.X6ֱ8moMkQ$#GLSΔC87~8jiۊB8 R[O,߆?a)9CES;}Bg v9"9!*|2މ#+Wҿ]VI%mTǴ/Ko/ vc2kYDhᕴ~V}sEs"O*LbL{йԭTEQǯfY6Yڳ$'FUYɐ\t7cNgS@3gt w>e`"O>|Eb7%٢~h9)-d.vNB[tpٛP?Ö%/e7oBԧ&;$kj -7alW ڹ+}.!Tj4 w۴Ln$}D@szWىpX!"&r9OO"ID%|4`-zxofk=Xl %ԓM9c,ItJH#˞JOďwUCK+,.'#ղncYPC!hQ_,U$%_: K7];H2Ilobh;=mq-w²DLXAԱR[Cwۣ`Iu-OoYwyh NQza|0+[[)-\CvC×$]+"@;|{96Gf\X_kZO\l~o!I6զYҒ>CsfCt_u\D?G&|5 L>@4_'cN"n|d "# Y%yf66Pc>|"%V]/WO Ll..Ңif%~];oe "юKyڋb%4|RT/w•҈KJB:ըeIF K;/cTsǡh4i::J6xNbcQc)v6x1^oQN%Fac@|dp> q j]>>Ib=|a- >gX_CN<(Ůwآ*L fr[{\z#Ӛ~ىR endstream endobj 186 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 187 0 R >> endobj 188 0 obj 2343 endobj 189 0 obj 1746 endobj 191 0 obj << /Length 192 0 R /Filter /FlateDecode >> stream xTn0+F9HP@zK.$t~ml`h<y1z F) < v`}shlR~ axBKõ^7H#!ͭU4aa޽O!? qg-H _TbbI Ak- q:3^TϢp_Ӱew73U$Hl'CvmqDSh^ fR]I>Sm( cL "?TuYT!G@ɛʎFu ӺY]벣;ֺZ/E;!2$bW'ظWfvhEUp) +kƽR?׵ZbS'A;yqK!Nl_"kl&]SMVX;_Dn endstream endobj 190 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 191 0 R >> endobj 192 0 obj 462 endobj 193 0 obj << /Type /Metadata /Subtype /XML /Length 196 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:25Z endstream endobj 195 0 obj << /Length 197 0 R /Filter /FlateDecode >> stream xVKo0+|$u|hmTHѮCeMi&5Kx^RXyA~+AQ9 (1)C2gV@O'JG?ٹU;x\xs>zXxT@4ČiiO<[}s<{VEu/"Z6fE/vR÷դ~ vjvCp*ʤ"*0p"#zEL3"3#CB RLT}r~hFp#u1Vq^` 'Ѡߢ,:q )NXP0=uu 2ړ>4k %KEkĬA ,bMrq߽rG<+"ͺ;f2n|gNߣQV Ilf8f^ oOdh=ol6ۥgbOI|~y:EB@d} 'Bc7cWh@틞Ok`lO39|RR sxiO-dYQSi2M{}YIJi˩`ZIQ. KyJ}dR82y=Jp@fg;{$2N|t@b^T*2q&o8.ckt0>Fd9jh?}j; endstream endobj 194 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 195 0 R >> endobj 196 0 obj 2381 endobj 197 0 obj 732 endobj 198 0 obj << /Type /Metadata /Subtype /XML /Length 201 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 200 0 obj << /Length 202 0 R /Filter /FlateDecode >> stream xVn0+xT"6)PtA`=9(  ВJr}HRlmNQ a g潙yC? $ μn0P8 5[vH/ৗ{|. @Cpʻ7'PL ."`72f7dRW7aҲIV9z]kzhh w`H:>' ?{gA_V& MY2D\56oQ\6#y! "έq\TY/bWu'νs„@4.9pERmH)S`*G%r_=CGvɉ kEg=]=.!áº:z FLk4\ze`fԽqr> endobj 201 0 obj 2419 endobj 202 0 obj 737 endobj 203 0 obj << /Type /Metadata /Subtype /XML /Length 206 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 205 0 obj << /Length 207 0 R /Filter /FlateDecode >> stream xUKo0+|H]glcS5TC!ބ65l&Z2;!gM̏T%y3 IN"!e@d[P7q4\||'C˸ J< aέҨl,susO֊}.`*뢿@aFV2C]XtnCpzڵbwIʦQ.4>8.QAk^'uS Z!x0WH)%F^)SK&€\ek}^Cr&`P|ʺNo8$n}Kͧc~RtլrlY;>.sk|vL73EU qb;zeJZgۗ K*rGz>nuǧ)0J^~ (#qwY55}7TsW3?&[8sWi6'#7w5 endstream endobj 204 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 205 0 R >> endobj 206 0 obj 2457 endobj 207 0 obj 680 endobj 208 0 obj << /Type /Metadata /Subtype /XML /Length 211 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 210 0 obj << /Length 212 0 R /Filter /FlateDecode >> stream xVMo6W99@%)REEaYca%*$ƢHʖD9%ak13 G뿘0 #;")$ 38I?&-_ %M/n O/g/ rI cfROKZafƬ :EN?*z }d#YdP$|]|߂$oIZ Y2AbsZ Û&pl~~55Xo牎vHZkBN[Ň\nc}ڧOY-R%ndC@1DY]qpylRϽxiN3e I3:3p{kR|Q!hd-`}m?6eN:;#ߋ,UbM}(T}Kiq-@ƜScm@Oc&J7.(rS.*s6bX2lkPuOy0j9UV|ʋb TթlsIg JzHcvbs1ϤoSY 0 9GY4Y?a!CX=_T\lWW[䣨06ntsPUa͌τpN5Q ciN9-&L!Qm^ 3uzqu/W.K3v=pqC ̞7} g֦dZC-Oepɔq4zk"sGԈmu%&mg:O7dmϿ~Rj4wJ۪@YI7_d{}_ニ98~ğ*cb7&Eɵ푞8rex<+}xh Bu.ߺv"Snt4jiXIbؽ;_}\xW^Y i9gk )#:z]i;sv/''Sݝ_N endstream endobj 209 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 210 0 R >> endobj 211 0 obj 2495 endobj 212 0 obj 984 endobj 213 0 obj << /Type /Metadata /Subtype /XML /Length 216 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 215 0 obj << /Length 217 0 R /Filter /FlateDecode >> stream xWOs8)tڡ3kUL;I3ƻ=t{ Xb6߾AH{~ Hh0Hhp G-@zLp=!嫺{h>N7O=0_zFiaH[BʜJ{ ~ڼ6ueSθ`ct!CVȽՈCcY/v (V0 SS5BCgtkA9fPkl*˿A !A4:2ins*3]!Z㥁x%j2\TQGʝ>'Qm!A0CwZGȒX?> endobj 216 0 obj 2533 endobj 217 0 obj 946 endobj 219 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 680.124 149.98 689.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 218 0 R /H /I >> endobj 221 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.998 680.124 539.998 689.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 218 0 R /H /I >> endobj 223 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 668.124 180.461 677.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 222 0 R /H /I >> endobj 224 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.926 668.124 539.926 677.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 222 0 R /H /I >> endobj 226 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 656.124 176.22 665.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 225 0 R /H /I >> endobj 227 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.996 656.124 539.996 665.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 225 0 R /H /I >> endobj 229 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 644.124 196.414 653.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 230 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.923 644.124 539.923 653.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 228 0 R /H /I >> endobj 232 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 632.124 255.659 641.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 231 0 R /H /I >> endobj 233 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.921 632.124 539.921 641.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 231 0 R /H /I >> endobj 235 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 620.124 172.33 629.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 234 0 R /H /I >> endobj 236 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.997 620.124 539.997 629.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 234 0 R /H /I >> endobj 238 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 608.124 207.43 617.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 237 0 R /H /I >> endobj 239 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.995 608.124 539.995 617.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 237 0 R /H /I >> endobj 241 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 596.124 204.67 605.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 240 0 R /H /I >> endobj 242 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.998 596.124 539.998 605.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 240 0 R /H /I >> endobj 244 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 584.124 212.664 593.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 243 0 R /H /I >> endobj 245 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.857 584.124 539.857 593.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 243 0 R /H /I >> endobj 247 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 572.124 269.99 581.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 246 0 R /H /I >> endobj 248 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.849 572.124 539.849 581.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 246 0 R /H /I >> endobj 250 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 560.124 211.33 569.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 249 0 R /H /I >> endobj 251 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.996 560.124 539.996 569.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 249 0 R /H /I >> endobj 253 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 548.124 210.22 557.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 252 0 R /H /I >> endobj 254 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.995 548.124 539.995 557.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 252 0 R /H /I >> endobj 256 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 536.124 203.56 545.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 255 0 R /H /I >> endobj 257 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.998 536.124 539.998 545.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 255 0 R /H /I >> endobj 259 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 524.124 316.99298 533.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 258 0 R /H /I >> endobj 260 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.701 524.124 539.701 533.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 258 0 R /H /I >> endobj 262 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 512.124 266.111 521.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 261 0 R /H /I >> endobj 263 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.773 512.124 539.773 521.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 261 0 R /H /I >> endobj 265 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 500.124 216.88 509.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 264 0 R /H /I >> endobj 266 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.995 500.124 539.995 509.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 264 0 R /H /I >> endobj 268 0 obj << /Type /Annot /Subtype /Link /Rect [ 168.0 488.124 313.39502 497.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 267 0 R /H /I >> endobj 269 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.916 488.124 539.916 497.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 267 0 R /H /I >> endobj 271 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 476.124 179.893 485.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 270 0 R /H /I >> endobj 272 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.926 476.124 539.926 485.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 270 0 R /H /I >> endobj 274 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 464.124 177.32 473.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 273 0 R /H /I >> endobj 275 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.997 464.124 539.997 473.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 273 0 R /H /I >> endobj 277 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 452.124 197.761 461.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 276 0 R /H /I >> endobj 278 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.857 452.124 539.857 461.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 276 0 R /H /I >> endobj 280 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 440.124 193.43 449.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 281 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.997 440.124 539.997 449.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 279 0 R /H /I >> endobj 283 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 428.124 209.53 437.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 282 0 R /H /I >> endobj 284 0 obj << /Type /Annot /Subtype /Link /Rect [ 534.996 428.124 539.996 437.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 282 0 R /H /I >> endobj 286 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 416.124 188.43 425.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 285 0 R /H /I >> endobj 287 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.996 416.124 539.996 425.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 285 0 R /H /I >> endobj 289 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 404.124 205.461 413.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 288 0 R /H /I >> endobj 290 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.88904 404.124 539.88904 413.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 288 0 R /H /I >> endobj 292 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 392.124 182.32 401.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 291 0 R /H /I >> endobj 293 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 392.124 539.997 401.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 291 0 R /H /I >> endobj 295 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 380.124 182.32 389.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 294 0 R /H /I >> endobj 296 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 380.124 539.997 389.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 294 0 R /H /I >> endobj 298 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 368.124 198.99 377.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 299 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 368.124 539.998 377.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 297 0 R /H /I >> endobj 301 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 356.124 205.66 365.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 300 0 R /H /I >> endobj 302 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 356.124 539.998 365.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 300 0 R /H /I >> endobj 304 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 344.124 212.3 353.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 303 0 R /H /I >> endobj 305 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 344.124 539.998 353.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 303 0 R /H /I >> endobj 307 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 332.124 188.41 341.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 306 0 R /H /I >> endobj 308 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 332.124 539.997 341.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 306 0 R /H /I >> endobj 310 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 320.124 182.88 329.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 309 0 R /H /I >> endobj 311 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 320.124 539.997 329.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 309 0 R /H /I >> endobj 313 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 308.124 167.164 317.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 312 0 R /H /I >> endobj 314 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.942 308.124 539.942 317.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 312 0 R /H /I >> endobj 316 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 296.124 235.08 305.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 315 0 R /H /I >> endobj 317 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 296.124 539.997 305.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 315 0 R /H /I >> endobj 319 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 284.124 219.51999 293.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 318 0 R /H /I >> endobj 320 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.996 284.124 539.996 293.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 318 0 R /H /I >> endobj 322 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 272.124 221.76001 281.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 321 0 R /H /I >> endobj 323 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 272.124 539.997 281.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 321 0 R /H /I >> endobj 325 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 260.124 223.97 269.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 324 0 R /H /I >> endobj 326 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 260.124 539.997 269.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 324 0 R /H /I >> endobj 328 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 248.124 205.65 257.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 327 0 R /H /I >> endobj 329 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 248.124 539.998 257.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 327 0 R /H /I >> endobj 331 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 236.124 196.2 245.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 330 0 R /H /I >> endobj 332 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 236.124 539.997 245.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 330 0 R /H /I >> endobj 334 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 224.124 230.61 233.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 333 0 R /H /I >> endobj 335 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 224.124 539.998 233.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 333 0 R /H /I >> endobj 337 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 212.124 221.73999 221.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 336 0 R /H /I >> endobj 338 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 212.124 539.997 221.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 336 0 R /H /I >> endobj 340 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 200.124 216.20999 209.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 339 0 R /H /I >> endobj 341 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 200.124 539.997 209.124 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 339 0 R /H /I >> endobj 343 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 188.12402 199.55 197.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 342 0 R /H /I >> endobj 344 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 188.12402 539.998 197.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 342 0 R /H /I >> endobj 346 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 176.12402 233.05 185.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 347 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 176.12402 539.997 185.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 345 0 R /H /I >> endobj 349 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 164.12402 212.32 173.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 348 0 R /H /I >> endobj 350 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 164.12402 539.998 173.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 348 0 R /H /I >> endobj 352 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 152.12402 205.08 161.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 351 0 R /H /I >> endobj 353 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 152.12402 539.998 161.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 351 0 R /H /I >> endobj 355 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 140.12402 161.642 149.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 354 0 R /H /I >> endobj 356 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.942 140.12402 539.942 149.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 354 0 R /H /I >> endobj 358 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 128.12402 227.31 137.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 357 0 R /H /I >> endobj 359 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 128.12402 539.997 137.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 357 0 R /H /I >> endobj 361 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 116.12402 215.65 125.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 360 0 R /H /I >> endobj 362 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 116.12402 539.997 125.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 360 0 R /H /I >> endobj 364 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 104.12402 190.09 113.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 363 0 R /H /I >> endobj 365 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.999 104.12402 539.999 113.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 363 0 R /H /I >> endobj 367 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 92.12402 192.33 101.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 366 0 R /H /I >> endobj 368 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 92.12402 539.998 101.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 366 0 R /H /I >> endobj 370 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 80.12402 255.08 89.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 369 0 R /H /I >> endobj 371 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 80.12402 539.997 89.12402 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 369 0 R /H /I >> endobj 372 0 obj << /Length 373 0 R /Filter /FlateDecode >> stream xOWv`=?lkc-%ukzFҨԳh"L''HfF+hL"8@xf7:޼oq?fχ͗ooٿO_Շ7W_~Oov΋xG++ W6ۛc>/#Տ}?>ӿ>}uOݯj~W߶7~2.eG<ض77o,ns?x_L_rooo./7?|~/?;2alo=~_ꋈyu͇3q9h6\.;.-i鎝C;Lj?0~pZk%J\qƵj\sε:\kp&ך\krɵZ\kacZdž k;:vuXرq`Zk \+VrZk5.Z7oӾ4y:p:6O;ONSZ k]xbZa˽"OVX+֊k \+VrZɵj\qε:\s\krɵ&Z\kqŵ k况rZcܱVX+kk \+VrƵj!yޟf?k7zOsom>}~ý`crx^ޫΰtӁ˚]~H ytH>H>H>H>H>H>H>H>H>H>H>H>H>H>H>H>8'RՇޔqċ߾>}ß~YXbX>ux2/;Kitlitli)\sε\kp&ך\krŵZXfi8Z5K)֪YNVhz`k \+VrZɵj\qε:\s\krɵ&Z\kqŵ֪YNVhck, Xfi8ZkJ\+VZk5ոVZku5ZkM5Zk-Z5K)֪YMwU4bZ5K)Ⳍ䳌䳌䳌䳌䳌䳌䳌䳌YZX=-ڋm.7ϓ?~4R/>xm=:7j{Wǹkܫo< v.Ѵt^v4yhhʵk \+VrƵתf ӁzI)ך\kqŵ:ף):׃鎵h`z`y=rZk%J\+VZk5չVZk 5ZkM5Zk-MMMLu>GS\+VpZɵk%j\q˫_򛹧~lk]_t?=7w?ttźCme5k^ٱl?x,=x0 v.c<6o[Ws9ƃitkuչVZk 5ZkM5Zk-$ XiILӒ$b%I,=Ӓ$rZkJ\+VZk5չVZku5ZkM5Zk-ZOK`$tZOK`$k=-I) \+VrZɵj\qƵ:\s\krɵ&ך\kqŵzZS$;zZS$zZSgggggggggO tq pm[ח#/_hvk%O_Ms|}+Y+/35:DD;y[@MmnC]m!܆pm )ܖp[m sn9\4[v.-w;Vp -[ nM5VI՛]%6NֽnSupm %w;WᖻkhssUn۹w;WVp -[ n)ܚpk­ .ܺpm!܆pm )ܦp[m %wn;rsn۹w;Vp -[ n)ܚpk­^m۶f^Y__rwu\mO?}ʮNL8n/vmDn] 6nSM6nK-ᶸ[xjN۝՜ܭdn5'p -[ n)ܚpk­ &ܺp­ !܆pm )ܦpm %w9o[ps՜ w9o[n!RpK­ &ܚp­ .܆pm!ܦpm %ܖp[ܭdn5'-w9o[p{pVp &%)%)%)%)%)%)%,z Uͦ,[s7c٣vjkᗽC{Zݧ?w?}|gv;'xye;3}oC]C6N^x+܆pm )ܦp[m ݎw;6vع۱scnݎp -[ n)R5ք[n]uօnC 6nSMᶄnbnqظ[-v;wn!Bp -[ &ܚpk­ .ܺpm!܆pm )ܖp[m rnqܸ[-w;w˃nyn!Bps5%͌j5[?׊]]ןb*mٿL.@s;k||nbpL//겻:q]:qD;y-[n)Rpk­ &ܺp­ !܆pm)ܦpm %w{xr-w{xr-[n!RpKք[nMuօ[n] 6nSM6nK-ᶸ[=沛{ZJƋ毾O܍׷ۧׯyZR[\]wS/oM^6DEx;nCM6nK-ᶄnXo[=۝cYnXo[=[-[n)R5ք[nMuօ[nC 6nSM6nK-VecYݹ[=[VenXo[n!RpK­ &ܚp­ .܆pm!ܦpm %ܖp[ܭ-wDzx,rz, wDzx+Bp MKRKRKRKRKe)=qTV7z;E_~/wv0Ak~zn6!͖Χ3J^x]=WѶvv!܆pm )ܦp[m j1o[-j1o[-j1o[n!RpK­ &Zm6wg괋6E;x;6цhho!&Zᶄnb.rZ[Vxj1nVx+Bp -[ nM5ք[n]uօnC 6nS-ᶄnb.rZ̅۝b.rZ[Vx+Bp -[ &ܚp;7^k6<>z%w'YsOfc迳0B~Y{qs-Ӥrަho/ v.^~_Vu6nCM6nS-ᶄn5"-wnwV#2rn5"p -[ n)R5ք[+}n6E;x;6цhho!&ZᶄnՈܭFdn5"-wnV#2 n!BpK-[nM5օ[n]u6nCM6nK-ᶄn5"-wnwV#2rՈ-[n)Rpk­ &j<̱}uMˍ}'/?]O7 ghqni>Zu΁MюKմ6it6 iiH)Z\kqŵ֊ kņbZcرVX+֊kk \+VrƵj\qε:\kpך\krɵ&Z\kqrZaܰVX+w;k偵ZypZk%J\+VZk]*nx_7;[5o?ýyw?~~YDڗ[O?ݍoןo˗}y_^}}x1jn_nhC]!&cmVp -[ n)ܚpk­[z7O;ONӉӹ4yʵZ\kqXics)֪;wbs) \+VrZɵj\qƵ:\s\krɵ&ך\kqŵ֪;wbs鎵Xiz`s) \+VrZɵk5ոVUmu{޺-7ݿ|s=61cR/zztmݽZ;6E;x[w! v.֝nhnSMᶄnK-V;Ωݹ[[V;Ωn!BpK-[nM]ʹ8HN.uBiݥ4xʵ&Z\kqjTb(;֪mRqjTXH) \+VrZɵk5ոVZkuչZk 5ZkMZ kN8Z*NV킊SU{Z*NVpZk%J\qƵjel4vx|O=wv _~n&V۶/?M治766D/\sv& oSsmVMᶄn}o[vnu[Vw;=[Vp -[ n)ܚpk­ .ܺpm!܆pm )ܦp[m Fܭnxfܭnp{p!p -[n)R5ք[/jH{/Ey߼緟6`+^Y8; 7v:| 76NhSmp­ .܆pm)ܦpm %ܖp[ظ۱qcnݎ;w;vv8qn!BpK-[nM5օ[n] 6nCM6nK-ᶸ[l-6wbns8[--[n)Rpk­ &ܺp­ .܆pm)ܦpm %ܖp[-7wˍrns<[-b^b^b^b^b^b^b^b^RknΡd}$sm_˟x_w}z\iշZv ^^~}YX-jeweU,nh'okXܦhokX܆h[nC 6nSMᶄnK-vlظ۱qcnݎw;vܭlmn!RpKք[nuNm'iGӉ:UӁ:RS5Zk-U/ qbZc pbZq`8V\+VpZɵk%JոVZkuչVZk 5ZkM5Zk- k况rZcܱVX+ʃk \+VrZɵj~.AW_͹v2ןV/V+?5GO#[  ϗ(l40<_p0i8`x@!I*TQFeTSNeTfPAe&TfREeYPؠ̱Ac2e;9v(sP8qP2AeI*T&L2ʜ:;|'!.6Nޞ6E+ܖp[m bnqظ[-v;wnqn!BpK­ &ܚpk­ .ܺpm!ܦpm )ܖp[mqܸ[n-7;w˝rnyp<[-[n)RpKV6ebf&7s ~w|Ž^+[:{=\0eBzh8a˄0i8`˄$I*ӨL2t*өL2 *3̠2L*3̢2,(:{=2N^̯W:{=2Ae *T&LRFey6{}6{ v.>н6N>нަhnK-ᶸ -w{>{ݹ -w{>{n't-[n)Rpk­ &ܚp­ .܆pm)ܦpm %ܖp[=н=нVp -[ n)ܞML=Mo=~?~opn>Wp}ӆsw'jq7ݙFhho/]m6E;xۅ[n]u6nCM6nK-ᶄn(o[=1۝n(o[=1[-[n)R5ք[+vmhSsmVMᶄnn)nwVc=[[-[n)Rpk­ &ܺp­ !܆pm)ܦpm %w'LySrzʔܭ3IS n!BpK-[ˇ5M}yz|{r__'f?~|{޷s۷~g+zSc__wg6DEx{&Kpm!܆pm )ܖp[mqZ[VKxjo[-jo[n!BpK­ &ܚp­ .ܺpm!ܦpm %ܖp[mqZ [VpsZ [Vxj5o[n!RpKք[nM5օ[n] 6nSM6nK-ᶸ[-w`ݹ[-w`=[p MKRKRKRKRKh2lfHg[Wlkt|Nn>}aֹ^v5'W!oo!&ۋ oScpm)ܦpm %w!o[ xj[VC(ܭPn!Bp -[ &ܚpk­ .ܺpm!܆pm )ܖp[m j[VC(ܭPn5-w!o[n!RpKք[nM5օ[n] 6nSM6nK-ᶸ[ xj۝ܭP=[ x+Bp MKRKRK!Tzpz!Լ/coosmռǼ~OeaaF :-IFeiTQNe:TfPAeTfRIe&YTfQe 96(sPء̱Cc2e *T&LR2Ie4*ӨL;e}^m.D]hhnK-wbnsع[-wCp -[ n)ܚpk­ .ܺp­ !܆pm )ܦp[m %wˍrnsܹ[-w˃!Bp -[ &j1>_WPm?܎Զ9$e~wgOd^[жmvmmm[­ &ܚpk­ .ܺpm!ܦpm )ܖp[mq;w9 o[Mq{p Vp -[ n)ܚpk­ .ܺpm!܆pm )ܦp[m jh[VCCrw!o[n!BpK­ &ܚp­ .ܺpm!ܦpm %ܖp[mq;wK1/I1/I1/I1/I1/I1/I1/I1/I1/I1/I1/I1/I1/y:`[u$ܺyzR~K~_>t}^{m͇W͇1er嶛!.m7ohmš6E;xhC]mp­ .܆pm!ܦpm %ܖp[ܭV-wyaerzXwy+Bp -[ nM5ք[n]uօnC 6nS-ᶄnʼn2nwV+ʼn2o[n!RpKք[nM5օ[n] 6nSM6nK-ᶸ[n-7w˝rns<[-ż$ż$ż$ż$ż$ż$ż$żm7~ۑGչ{SrW?7oO?좽_zʯ|6\_7+F0 v.֛,l407Y42 *3̠2L*3̢2,(S)BJ8 PQ,nZi_9ilT zxx6N])۱V 6nSMᶄnܭFPn5-wnV#( n!BpK-[nMrk⯶}mvvmhSm %ܖp[ܭFPn5j[V#(rAVp -[ nM5ք[n]uօnC 6nSMᶄnܭFPݹ[xjۃ-[n)RpKV zq>ff=\]!Tҟۏ?AYï+~r/v_Oj.r&oS%ކh[nC 6nSMᶄnK-vlظ۱qcnݎw;v8[n!RpKք[n.v.CMcmvvn )ܖp[mqظ[l-6;wbnqp8[-[n)RpKք[nMuօ[nC 6nSM6nK-wˍ.ow;w˝nyn!BpK-[.Qr|uu]7diO<}Z<]U^v+꼁1nx5ź u u ~@NpD;y[' 6E;x[' 6DE+ܺp­ !܆pm )ܦpm %w;O^-w;O^ΓqΓi{pE n!BpK-[nM%ȹNնMގM!.yV-ᶄnɋnɋnɋnɋ=y"n[n!BpK­ &ܚp­ .ܺpm!ܦpm %ܖp[mqܸ[n-7;w˝nypp~o?}n-egUGc<[W;G9yp]pD+ܖp[mqzܭ-wG9yQNܭp -[n)R5ք[n]uօ[nC 6nSMᶄnK-Vrգݹ[=[Vrգn!BpK-[nM5ք[n]u6nCM6nS-ᶄn('o[=ʉ۝գn('nVrVp -[ n)]zCB%vuY;cp1珿;9Wm_W?FFo+Fp]FpD;y[6E+ܦpm )ܖp[mqZ[VkpsZ[Vkp{pZ[-[n)Rpk­ :u\^YqYq]YqD+ܖp[mqZ[Vkxjo[jo[n!BpK­ &ܚp­ .ܺpm!ܦpm %ܖp[mqZ[VkpsZ[Vkxjo[n!RpKք[=E9n?q~lt}]{.b~z|ݙ6ZiFgu`nkunokunC]MM5ք[n]uօnC 6nS-ᶄngnnwV;gno[n!RpKք[nM5օ[n] 6nSM6nK-ᶸ[lܭv>-wxj3rܭv>mn!RpK­ &ܚp­ .܆pm!ܦpm %ܖp[ܭv>-wxj3r b^b^b^b^b^b^b^b^b^b^r>7[=|cO3Yg\_x=ɒ3E˞Xk]Gysɝ\嶎M:ަho/unM5օ[n] 6nSM6nK-ᶸ[--w%vݹ[--w%v=[-p -[ n)R5ք[n]uօnC 6nSMᶄn;rZb[VKxjnVKx+Bp -[ nM5ք[n]uօnC 6nS-ᶄn;rZb۝;rZb[b^b^b^b^b^b^b^b^b^rLãgg\_ޤ.^b{_(R_⼻new]hh'nk@woCܭ=[ x+Bp -[ nM57mEhC]mp[m j@[VrՀwo[n!BpK­ &ܚp­ .ܺpm!ܦpm %ܖp[mqՀ;wo[ xj@[-[n)R5vo|N܂?ܾ|ǯԵ endstream endobj 220 0 obj [ 219 0 R 221 0 R 223 0 R 224 0 R 226 0 R 227 0 R 229 0 R 230 0 R 232 0 R 233 0 R 235 0 R 236 0 R 238 0 R 239 0 R 241 0 R 242 0 R 244 0 R 245 0 R 247 0 R 248 0 R 250 0 R 251 0 R 253 0 R 254 0 R 256 0 R 257 0 R 259 0 R 260 0 R 262 0 R 263 0 R 265 0 R 266 0 R 268 0 R 269 0 R 271 0 R 272 0 R 274 0 R 275 0 R 277 0 R 278 0 R 280 0 R 281 0 R 283 0 R 284 0 R 286 0 R 287 0 R 289 0 R 290 0 R 292 0 R 293 0 R 295 0 R 296 0 R 298 0 R 299 0 R 301 0 R 302 0 R 304 0 R 305 0 R 307 0 R 308 0 R 310 0 R 311 0 R 313 0 R 314 0 R 316 0 R 317 0 R 319 0 R 320 0 R 322 0 R 323 0 R 325 0 R 326 0 R 328 0 R 329 0 R 331 0 R 332 0 R 334 0 R 335 0 R 337 0 R 338 0 R 340 0 R 341 0 R 343 0 R 344 0 R 346 0 R 347 0 R 349 0 R 350 0 R 352 0 R 353 0 R 355 0 R 356 0 R 358 0 R 359 0 R 361 0 R 362 0 R 364 0 R 365 0 R 367 0 R 368 0 R 370 0 R 371 0 R ] endobj 18 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Annots 220 0 R /Contents 372 0 R >> endobj 373 0 obj 17147 endobj 374 0 obj << /Type /Metadata /Subtype /XML /Length 377 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 376 0 obj << /Length 378 0 R /Filter /FlateDecode >> stream xVKs0WH(+YC;C[ҙN L{HspwNi¿ڒIM'CH}`oҜ,/{(Nmɀ0A$[dI6֑+ š|g mw̻>/N*(h6@xHe=g7ZVz<Goa_H€̗q>oH3rK_S÷U~vRZݠXq-B5 ʋ4m|exwy'32"Km˄i>~p:W]>ZȝEEnx`-EdzKUOQ2YZkhdʚI=v~+k3'Rttߴ-#>ȥEj7Da}i[eXQ0U$[&ynIߢTxJkћ0;6S-L{Y0[׶jN' A?"8M |:4KMCuNw2ό6|hN{~@CQ8/i@$kEjwU8w9 JP9^I U'0 q;T>”Mm,Q3_0"DWK|mN endstream endobj 375 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 376 0 R >> endobj 377 0 obj 2571 endobj 378 0 obj 664 endobj 379 0 obj << /Type /Metadata /Subtype /XML /Length 382 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 381 0 obj << /Length 383 0 R /Filter /FlateDecode >> stream xVmo0_O$@*b !4n.4IsmtCBCU^{l"9!6:C< D,@[de@`}rwޗkX\#wk˃f۰آkqb6w6@€48hE_f>;Ch޻Xz\gr7EdeDG4 Z>8#$&a,+bU(uzϫL34C6FIĒJ)#|eLL})-lªM1nU m8(ΧH譧 %h$hݮZ# %kBʎ$$  P9S0A  Ξ}]^,r +~hxt:9 B6΢mu^wc>lgq`J9ͅ_>y,n[F,6Vۡ.4ungaGE0AYkfӀCȴ+L8wi8ʡ[eciC߱zhN4)r v@h+u*W.Um.]Q5LD09łR[8]w\l6:wbB{cG%|쇜PhRO&I.ףvfTf_Nb?P@*@c endstream endobj 380 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 381 0 R >> endobj 382 0 obj 2609 endobj 383 0 obj 874 endobj 384 0 obj << /Type /Metadata /Subtype /XML /Length 387 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 386 0 obj << /Length 388 0 R /Filter /FlateDecode >> stream xRN0 + m4MrEbHD%0Vi-bMNQ~à.9.VzWs '0el .X4bAѤKlZEUet/Ej>yhC, Spl⵵To٦ &u~E]\f̂ :ˈ_֙hoP5XL 3՝Nf8vN0B{/!Zؐf*Cf~kSLEiWe<^ģ endstream endobj 385 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 386 0 R >> endobj 387 0 obj 2647 endobj 388 0 obj 259 endobj 389 0 obj << /Type /Metadata /Subtype /XML /Length 392 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 391 0 obj << /Length 393 0 R /Filter /FlateDecode >> stream xX[o6~ :`p#+ِ֡+bPd&"K.IGDJd |hf󏵬ͮLai?r ؜N\IŜN$Ň»Rj3g)O՗H'WМJ-2$d5\!ZrƪV]*N[dQY"(ի2ut*n4VLP_z:LR]ߗ/uD<b`&]vLmN$s΁7w G[$ *|S*ǜ,6spmtK 'zO3}4NuFd1F2*[ڨI{>0]CқdTʤ*-xa^!<^XLaDD^8w{V+kIy_VkכOן}ζ+gr*i ox^A肸1p!f3Bx1"=Who>K e Hwr3EmEmkDcJk"H=_>KY[]Q S N endstream endobj 390 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 391 0 R >> endobj 392 0 obj 2685 endobj 393 0 obj 1300 endobj 394 0 obj << /Type /Metadata /Subtype /XML /Length 397 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 396 0 obj << /Length 398 0 R /Filter /FlateDecode >> stream x]o6ݿBȀ lץÆl@Wo{h T"TTQjDRH2;HAw8N~X}Zy#sb.Cb,1-GUBϫw<ВHnV0_4xG!Ʊ rpĉ*7NvVhV ٽP+-7yk烳uu5bܾ2dF!i [~[c;H(Uo#C}S. $DN~ql,Kщ:O.q\i@l1 \z7CeSKNR74'wǺϾH"CX8\K=`rݳ W%}*yPe닲"Qo?ӡm/LI0}O;#D 90x~Qcd{UgBaGߋ$IV&`C߁@)m?ΎZQ'%ڞ MM+Ae}D'Wnz#aq0V \Yڊ0+L]IۧHUDiFA:D2*$F̬,R!ioB$aSȈpeWEEu4NQBڔj*s0bwFDwbT{۟Lߋ\|16kto)[0,nE6@@vs TQ b&HVuMZ,Y9]T^S/peݞv;)6)9}$ Ƹ&k )("EtlYz+^dpu.n?Cю7 G"ibd,cNWj!pw/ H=t%c;={$a$7ˁv/~#T吢ujZdF!+jTn!JW3/ݯk5EF;}ڈ}Iդ # };ʽpmQ̴D&)=?CN*)Q֢B)éq8s5 N|'ͨ%XA1Fwͮ^eJ^gwpJ endstream endobj 395 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 396 0 R >> endobj 397 0 obj 2723 endobj 398 0 obj 1568 endobj 400 0 obj << /Length 401 0 R /Filter /FlateDecode >> stream xSMo0 WȜ|Iݤݪ"P@ ]R؀ۿ!f_Np/Qx>Tf/>| B &`H`ۨ="ME,W҆t慘+xOxxA![B1SDTIc rd$eguTcXA*fI'Fd~ u(4FБ}$ԮY?[Aٛ9{׵ ydĪN{V&2iu'rKw¾&hHF@"oI멹+D`Q<oϪsg]g j Rͷ ]{O\@P$k4ye*> endstream endobj 399 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 400 0 R >> endobj 401 0 obj 344 endobj 402 0 obj << /Type /Metadata /Subtype /XML /Length 405 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 404 0 obj << /Length 406 0 R /Filter /FlateDecode >> stream xXo6Ȁf,ݒmC-dcŇEhuxG"+ -!W$GCGWg  "_j#l W /u8/rC I"&T+;\"Q[kb}!J&Qn@Pp}X56,n7>w[22$P K[ &: n7Dc9I*)8}WY-|H)0bι-X0`uFYAUR2ROe\Y.wY `K1TZk]ϱGC)y苑#(ZXJAc} Dsȼ>-]]wxuz>$~6_)O;uD񤎗csDWx4/Rt] TSG}\Ui^cUkZbqjwN_dCVۨ˼= \ɏJ,wD}:;\F ׮9} XxYg+1%̵v|OD_8# )KvMUUŴ>%Idi0{ϙA{#"x8 !o1N:cz?݁Kw~V92lLңxߍ^'9m/ӝУRͻ,g&xb#1ʝibq{KWR4^DT6Xìo6bmP2t"J"O,1\unjW'4vIt(,px:W23Uެk'VҶkGpZʢy<̘˛6.-iTTU5FyT*E~MW=lK'i)Z NAm1sK$!&.(SB3wO+էlpxԎ!_=\5(^zX22MUEnnQ.: (u腚ƻ0JJBFY݂q+ûVmW7/ X@  ,)vþ_-97CSS_^$mL.CZg?=amˌOFvY|cnh/tYY= endstream endobj 403 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Contents 404 0 R >> endobj 405 0 obj 2761 endobj 406 0 obj 1189 endobj 407 0 obj << /Type /Metadata /Subtype /XML /Length 419 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 409 0 obj << /Type /Annot /Subtype /Link /Rect [ 343.576 634.758 365.236 643.758 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://uffi.b9.com) /S /URI >> /H /I >> endobj 411 0 obj << /Type /Annot /Subtype /Link /Rect [ 371.261 634.758 441.82098 643.758 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://uffi.b9.com) /S /URI >> /H /I >> endobj 412 0 obj << /Type /Annot /Subtype /Link /Rect [ 387.288 622.758 421.44 631.758 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.sourceforge.net/projects/cclan) /S /URI >> /H /I >> endobj 413 0 obj << /Type /Annot /Subtype /Link /Rect [ 427.242 622.758 540.002 631.758 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.sourceforge.net/projects/cclan) /S /URI >> /H /I >> endobj 414 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 610.758 175.54001 619.758 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A << /URI (http://www.sourceforge.net/projects/cclan) /S /URI >> /H /I >> endobj 415 0 obj << /Type /Annot /Subtype /Link /Rect [ 492.895 610.758 508.44498 619.758 ] /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 416 0 obj << /Type /Annot /Subtype /Link /Rect [ 516.099 610.758 539.999 619.758 ] /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 417 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 598.758 358.84 607.758 ] /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 418 0 obj << /Length 420 0 R /Filter /FlateDecode >> stream xWKo6WVgE14)q(9(2%UߗK^R9CǙCX}pA@=ÝN   a` 1^e iEj_g gOjr 28̐3~}1M pAzR\>m]= AYSlyF`0e9UQڂy]'eʫ{ʫm("Bk/#T,?W` EyYY "a]2zCw30R)Mݿz"Q86QX ,T慔kKіl)C7:V@b.iԘ #.Dڝ!TqWbuYXA>܄cȸJpoʭMD~ #IDzڶ^.wig9ۖF#%[) k";K"qޔEMnpECqoC`IY L 4{sxIg`=>r֚Bc EV0S%'6$\~sC]5ͯTA"#}"R0!@rW'2- ./T#nYWuLf$y\Q4Pz(#HF%^mL 7I\\кϘ2zMzF Z˴96<*Ha ZNt̀ !&zA@6k;9U2W&t-bA+2nia\HS 0@g·!UrAgY4+^&_3(Ǥ3j+s".ֶ";BTM= bTVf3u1CəfjKemSwEYnnrNurb2SeAv˘k-[M,:|ɚ>~xkw;z`,~}~B_+ɇh-Љf[}Hˣ7" `~d3NJ G ٮSHuljשdNeQVZ?]Mp;4q I endstream endobj 410 0 obj [ 409 0 R 411 0 R 412 0 R 413 0 R 414 0 R 415 0 R 416 0 R 417 0 R ] endobj 408 0 obj << /Resources 3 0 R /Type /Page /MediaBox [0 0 612 792] /BleedBox [0 0 612 792] /TrimBox [0 0 612 792] /Parent 1 0 R /Annots 410 0 R /Contents 418 0 R >> endobj 419 0 obj 2799 endobj 420 0 obj 1104 endobj 421 0 obj << /Type /Metadata /Subtype /XML /Length 424 0 R >> stream en UFFI Reference Guide Kevin M. Rosenberg 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 2010-02-07T03:23:22Z 1.4 Apache FOP Version 0.95 2010-02-07T03:23:22Z DocBook XSL Stylesheets with Apache FOP 2010-02-07T03:23:26Z endstream endobj 423 0 obj << /Length 425 0 R /Filter /FlateDecode >> stream xRMO@ﯘ#XgiꭑC"U>b]vW 7of`zE1& >? &(tR$)Ϥ!+ݩ+*&8f_Gpc>`3B#: 4S UvoZ:cTgQx}+:l$0`e_6J]AHҋ.>pAqOfQdqVU{> endobj 424 0 obj 2837 endobj 425 0 obj 327 endobj 427 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 709.5 243.42 718.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 426 0 R /H /I >> endobj 429 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 709.5 539.997 718.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 426 0 R /H /I >> endobj 431 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 697.5 233.42 706.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 430 0 R /H /I >> endobj 432 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.996 697.5 539.996 706.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 430 0 R /H /I >> endobj 434 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 685.5 226.498 694.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 433 0 R /H /I >> endobj 435 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.836 685.5 539.836 694.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 433 0 R /H /I >> endobj 437 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 673.5 193.43 682.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 438 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.998 673.5 539.998 682.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 436 0 R /H /I >> endobj 440 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 661.5 223.42 670.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 439 0 R /H /I >> endobj 441 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 661.5 539.997 670.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 439 0 R /H /I >> endobj 443 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 649.5 222.31 658.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 444 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 649.5 539.997 658.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 442 0 R /H /I >> endobj 446 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 637.5 178.248 646.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 445 0 R /H /I >> endobj 447 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.94104 637.5 539.94104 646.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 445 0 R /H /I >> endobj 449 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 625.5 211.91 634.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 448 0 R /H /I >> endobj 450 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.93896 625.5 539.93896 634.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 448 0 R /H /I >> endobj 452 0 obj << /Type /Annot /Subtype /Link /Rect [ 144.0 613.5 177.33 622.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 451 0 R /H /I >> endobj 453 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.999 613.5 539.999 622.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 451 0 R /H /I >> endobj 455 0 obj << /Type /Annot /Subtype /Link /Rect [ 120.0 601.5 155.55 610.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 454 0 R /H /I >> endobj 456 0 obj << /Type /Annot /Subtype /Link /Rect [ 529.997 601.5 539.997 610.5 ] /C [ 0 0 0 ] /Border [ 0 0 0 ] /A 454 0 R /H /I >> endobj 457 0 obj << /Length 458 0 R /Filter /FlateDecode >> stream xAo;ŞMwWUw1A,Á/N`HC&IYZ&g)#&E~gŝ)4ꇋ\c0A~8ܿoL=x|s w}E9|qwe.on[~|1?T/?Yb9Q÷Ͼy^u ӣ=XqoWo^ݾ߿|QC~`q=5ʡ-nߞnѝ~Q_Ty?-~{ߞgCN8]3Ƽ|-nzo^]׷iVQZ? ~]?RRORRRT"oԾURVI[%oԾ5RH[CT{AT{EWT{EWT{C7T{CվTj?P;}R{)RHWv"Jj/^4T{AT{AT{EWT{E7T{C7TjQ;}G~;;}}R{-ZHk%Jj^6R{mj/jjj?YOt~ËcmaĎEJ~b$xyHSGGr<8:_qxkuչVZk 5Zεk9 \+V(Z9+X+gfhaQ%\Kp-Zʵk)2e\˸VZkuչZk \˹sZkZ9CkbQ3<8ʵk \Kr-ZƵk\sε\kp-Zεk9 \+V (y!X+pk6 k)e(e(e(e(e(e(e(ed3Lʜ.=gDKl~|᪞mVo]8=ˉ:U[DehѨh>QQ>Q\+VpZ#ZV (چhkmG4ʵk \Kr-ZƵk\sε\kp-Zεk9 \+6|DXk>ъ#Z6 (%\Kr-Zʵk2e\sε:\kpr\˹VpZ#ZbmF6| kmG4ʵk %\Kr-Zkr딅ƃSvԞhtys} -SE[|l)Pm~KѼzFGGJ^U8W(r\+VpZێ4SabmUZ~0ڰֶ*r-Zµk)R\Kq-ZƵ:\s\kp-Zεk XK vQ km(v~Q µk \Kr-ZƵkuչVZk 5Zεk9 \+V`mZZV0Zֶ)-bm{ZZF4ʵk \Kr-Z[kfEg7[.QOujnٗ_\>y_qڼ>a|-:?iaXPip`n ÂBs;42Je(1*cTƨQNe:TfPAeq*TƩS2Ae䵟0eOP&A({`2y' R2Be(Q*TFQ2Fe:TSAeTfP2Ne *PF 6a5,XL^ P&ՄA(iP2Be(Q*TƨQ2t*өL2 *3S2Ne *P&A(MdMǺ֡:]S풵_w0S?xW/n޽{bykVr_w"bk~QΣu~CY[:,< YnmFjl7Yp7Yp7]p7[p7[pXp nc||-b-[-yeg+w&rdln7Yp7Yp7]p7]p7[pt^<;BV}!> endobj 458 0 obj 3664 endobj 461 0 obj << /Title (UFFI Reference Guide) /Parent 460 0 R /Next 463 0 R /A 459 0 R >> endobj 463 0 obj << /Title (Table of Contents) /Parent 460 0 R /Prev 461 0 R /Next 464 0 R /A 462 0 R >> endobj 464 0 obj << /Title (Preface) /Parent 460 0 R /Prev 463 0 R /Next 465 0 R /A 218 0 R >> endobj 465 0 obj << /Title /Parent 460 0 R /Prev 464 0 R /Next 472 0 R /First 466 0 R /Last 469 0 R /Count -6 /A 222 0 R >> endobj 466 0 obj << /Title (Purpose) /Parent 465 0 R /Next 467 0 R /A 225 0 R >> endobj 467 0 obj << /Title (Background) /Parent 465 0 R /Prev 466 0 R /Next 468 0 R /A 228 0 R >> endobj 468 0 obj << /Title (Supported Implementations) /Parent 465 0 R /Prev 467 0 R /Next 469 0 R /A 231 0 R >> endobj 469 0 obj << /Title (Design) /Parent 465 0 R /Prev 468 0 R /First 470 0 R /Last 471 0 R /Count -2 /A 234 0 R >> endobj 470 0 obj << /Title (Overview) /Parent 469 0 R /Next 471 0 R /A 237 0 R >> endobj 471 0 obj << /Title (Priorities) /Parent 469 0 R /Prev 470 0 R /A 240 0 R >> endobj 472 0 obj << /Title /Parent 460 0 R /Prev 465 0 R /Next 481 0 R /First 473 0 R /Last 478 0 R /Count -8 /A 243 0 R >> endobj 473 0 obj << /Title (Implementation Specific Notes) /Parent 472 0 R /Next 477 0 R /First 474 0 R /Last 476 0 R /Count -3 /A 246 0 R >> endobj 474 0 obj << /Title (AllegroCL) /Parent 473 0 R /Next 475 0 R /A 249 0 R >> endobj 475 0 obj << /Title (Lispworks) /Parent 473 0 R /Prev 474 0 R /Next 476 0 R /A 252 0 R >> endobj 476 0 obj << /Title (CMUCL) /Parent 473 0 R /Prev 475 0 R /A 255 0 R >> endobj 477 0 obj << /Title (Foreign Object Representation and Access) /Parent 472 0 R /Prev 473 0 R /Next 478 0 R /A 258 0 R >> endobj 478 0 obj << /Title (Optimizing Code Using UFFI) /Parent 472 0 R /Prev 477 0 R /First 479 0 R /Last 480 0 R /Count -2 /A 261 0 R >> endobj 479 0 obj << /Title (Background) /Parent 478 0 R /Next 480 0 R /A 264 0 R >> endobj 480 0 obj << /Title (Cross-Implementation Optimization) /Parent 478 0 R /Prev 479 0 R /A 267 0 R >> endobj 481 0 obj << /Title (Declarations) /Parent 460 0 R /Prev 472 0 R /Next 485 0 R /First 483 0 R /Last 484 0 R /Count -2 /A 270 0 R >> endobj 483 0 obj << /Title (Overview) /Parent 481 0 R /Next 484 0 R /A 482 0 R >> endobj 484 0 obj << /Title (def-type) /Parent 481 0 R /Prev 483 0 R /A 273 0 R >> endobj 485 0 obj << /Title (Primitive Types) /Parent 460 0 R /Prev 481 0 R /Next 489 0 R /First 486 0 R /Last 488 0 R /Count -3 /A 276 0 R >> endobj 486 0 obj << /Title (def-constant) /Parent 485 0 R /Next 487 0 R /A 279 0 R >> endobj 487 0 obj << /Title (def-foreign-type) /Parent 485 0 R /Prev 486 0 R /Next 488 0 R /A 282 0 R >> endobj 488 0 obj << /Title (null-char-p) /Parent 485 0 R /Prev 487 0 R /A 285 0 R >> endobj 489 0 obj << /Title (Aggregate Types) /Parent 460 0 R /Prev 485 0 R /Next 497 0 R /First 490 0 R /Last 496 0 R /Count -7 /A 288 0 R >> endobj 490 0 obj << /Title (def-enum) /Parent 489 0 R /Next 491 0 R /A 291 0 R >> endobj 491 0 obj << /Title (def-struct) /Parent 489 0 R /Prev 490 0 R /Next 492 0 R /A 294 0 R >> endobj 492 0 obj << /Title (get-slot-value) /Parent 489 0 R /Prev 491 0 R /Next 493 0 R /A 297 0 R >> endobj 493 0 obj << /Title (get-slot-pointer) /Parent 489 0 R /Prev 492 0 R /Next 494 0 R /A 300 0 R >> endobj 494 0 obj << /Title (def-array-pointer) /Parent 489 0 R /Prev 493 0 R /Next 495 0 R /A 303 0 R >> endobj 495 0 obj << /Title (deref-array) /Parent 489 0 R /Prev 494 0 R /Next 496 0 R /A 306 0 R >> endobj 496 0 obj << /Title (def-union) /Parent 489 0 R /Prev 495 0 R /A 309 0 R >> endobj 497 0 obj << /Title (Objects) /Parent 460 0 R /Prev 489 0 R /Next 511 0 R /First 498 0 R /Last 510 0 R /Count -13 /A 312 0 R >> endobj 498 0 obj << /Title (allocate-foreign-object) /Parent 497 0 R /Next 499 0 R /A 315 0 R >> endobj 499 0 obj << /Title (free-foreign-object) /Parent 497 0 R /Prev 498 0 R /Next 500 0 R /A 318 0 R >> endobj 500 0 obj << /Title (with-foreign-object) /Parent 497 0 R /Prev 499 0 R /Next 501 0 R /A 321 0 R >> endobj 501 0 obj << /Title (size-of-foreign-type) /Parent 497 0 R /Prev 500 0 R /Next 502 0 R /A 324 0 R >> endobj 502 0 obj << /Title (pointer-address) /Parent 497 0 R /Prev 501 0 R /Next 503 0 R /A 327 0 R >> endobj 503 0 obj << /Title (deref-pointer) /Parent 497 0 R /Prev 502 0 R /Next 504 0 R /A 330 0 R >> endobj 504 0 obj << /Title (ensure-char-character) /Parent 497 0 R /Prev 503 0 R /Next 505 0 R /A 333 0 R >> endobj 505 0 obj << /Title (ensure-char-integer) /Parent 497 0 R /Prev 504 0 R /Next 506 0 R /A 336 0 R >> endobj 506 0 obj << /Title (make-null-pointer) /Parent 497 0 R /Prev 505 0 R /Next 507 0 R /A 339 0 R >> endobj 507 0 obj << /Title (null-pointer-p) /Parent 497 0 R /Prev 506 0 R /Next 508 0 R /A 342 0 R >> endobj 508 0 obj << /Title (+null-cstring-pointer+) /Parent 497 0 R /Prev 507 0 R /Next 509 0 R /A 345 0 R >> endobj 509 0 obj << /Title (with-cast-pointer) /Parent 497 0 R /Prev 508 0 R /Next 510 0 R /A 348 0 R >> endobj 510 0 obj << /Title (def-foreign-var) /Parent 497 0 R /Prev 509 0 R /A 351 0 R >> endobj 511 0 obj << /Title (Strings) /Parent 460 0 R /Prev 497 0 R /Next 519 0 R /First 512 0 R /Last 518 0 R /Count -7 /A 354 0 R >> endobj 512 0 obj << /Title (convert-from-cstring) /Parent 511 0 R /Next 513 0 R /A 357 0 R >> endobj 513 0 obj << /Title (convert-to-cstring) /Parent 511 0 R /Prev 512 0 R /Next 514 0 R /A 360 0 R >> endobj 514 0 obj << /Title (free-cstring) /Parent 511 0 R /Prev 513 0 R /Next 515 0 R /A 363 0 R >> endobj 515 0 obj << /Title (with-cstring) /Parent 511 0 R /Prev 514 0 R /Next 516 0 R /A 366 0 R >> endobj 516 0 obj << /Title (convert-from-foreign-string) /Parent 511 0 R /Prev 515 0 R /Next 517 0 R /A 369 0 R >> endobj 517 0 obj << /Title (convert-to-foreign-string) /Parent 511 0 R /Prev 516 0 R /Next 518 0 R /A 426 0 R >> endobj 518 0 obj << /Title (allocate-foreign-string) /Parent 511 0 R /Prev 517 0 R /A 430 0 R >> endobj 519 0 obj << /Title (Functions & Libraries) /Parent 460 0 R /Prev 511 0 R /Next 523 0 R /First 520 0 R /Last 522 0 R /Count -3 /A 433 0 R >> endobj 520 0 obj << /Title (def-function) /Parent 519 0 R /Next 521 0 R /A 436 0 R >> endobj 521 0 obj << /Title (load-foreign-library) /Parent 519 0 R /Prev 520 0 R /Next 522 0 R /A 439 0 R >> endobj 522 0 obj << /Title (find-foreign-library) /Parent 519 0 R /Prev 521 0 R /A 442 0 R >> endobj 523 0 obj << /Title /Parent 460 0 R /Prev 519 0 R /Next 526 0 R /First 524 0 R /Last 525 0 R /Count -2 /A 445 0 R >> endobj 524 0 obj << /Title (Download UFFI) /Parent 523 0 R /Next 525 0 R /A 448 0 R >> endobj 525 0 obj << /Title (Loading) /Parent 523 0 R /Prev 524 0 R /A 451 0 R >> endobj 526 0 obj << /Title (Glossary) /Parent 460 0 R /Prev 523 0 R /A 454 0 R >> endobj 527 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Courier-Oblique /Encoding /WinAnsiEncoding >> endobj 528 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Times-Roman /Encoding /WinAnsiEncoding >> endobj 529 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Helvetica-BoldOblique /Encoding /WinAnsiEncoding >> endobj 530 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Helvetica-Bold /Encoding /WinAnsiEncoding >> endobj 531 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Courier /Encoding /WinAnsiEncoding >> endobj 532 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Times-Italic /Encoding /WinAnsiEncoding >> endobj 533 0 obj << /Type /Font /Subtype /Type1 /BaseFont /Times-Bold /Encoding /WinAnsiEncoding >> endobj 1 0 obj << /Type /Pages /Count 54 /Kids [8 0 R 14 0 R 18 0 R 19 0 R 21 0 R 27 0 R 31 0 R 35 0 R 39 0 R 43 0 R 48 0 R 53 0 R 58 0 R 63 0 R 68 0 R 73 0 R 78 0 R 83 0 R 88 0 R 93 0 R 98 0 R 103 0 R 108 0 R 113 0 R 118 0 R 123 0 R 128 0 R 133 0 R 138 0 R 143 0 R 148 0 R 153 0 R 158 0 R 163 0 R 168 0 R 173 0 R 178 0 R 182 0 R 186 0 R 190 0 R 194 0 R 199 0 R 204 0 R 209 0 R 214 0 R 375 0 R 380 0 R 385 0 R 390 0 R 395 0 R 399 0 R 403 0 R 408 0 R 422 0 R ] >> endobj 2 0 obj << /Type /Catalog /Pages 1 0 R /Metadata 421 0 R /Lang (en) /PageLabels 9 0 R /Outlines 460 0 R /PageMode /UseOutlines >> endobj 3 0 obj << /Font << /F10 527 0 R /F5 528 0 R /F4 529 0 R /F3 530 0 R /F9 531 0 R /F6 532 0 R /F7 533 0 R >> /ProcSet [ /PDF /ImageB /ImageC /Text ] /ColorSpace << /DefaultRGB 6 0 R >> >> endobj 9 0 obj << /Nums [0 << /P (1) >> 1 << /P (2) >> 2 << /P (iii) >> 3 << /P (iv) >> 4 << /P (v) >> 5 << /P (1) >> 6 << /P (2) >> 7 << /P (3) >> 8 << /P (4) >> 9 << /P (5) >> 10 << /P (6) >> 11 << /P (7) >> 12 << /P (8) >> 13 << /P (9) >> 14 << /P (10) >> 15 << /P (11) >> 16 << /P (12) >> 17 << /P (13) >> 18 << /P (14) >> 19 << /P (15) >> 20 << /P (16) >> 21 << /P (17) >> 22 << /P (18) >> 23 << /P (19) >> 24 << /P (20) >> 25 << /P (21) >> 26 << /P (22) >> 27 << /P (23) >> 28 << /P (24) >> 29 << /P (25) >> 30 << /P (26) >> 31 << /P (27) >> 32 << /P (28) >> 33 << /P (29) >> 34 << /P (30) >> 35 << /P (31) >> 36 << /P (32) >> 37 << /P (33) >> 38 << /P (34) >> 39 << /P (35) >> 40 << /P (36) >> 41 << /P (37) >> 42 << /P (38) >> 43 << /P (39) >> 44 << /P (40) >> 45 << /P (41) >> 46 << /P (42) >> 47 << /P (43) >> 48 << /P (44) >> 49 << /P (45) >> 50 << /P (46) >> 51 << /P (47) >> 52 << /P (48) >> 53 << /P (49) >> ] >> endobj 218 0 obj << /Type /Action /S /GoTo /D [21 0 R /XYZ 72.0 720.0 null] >> endobj 222 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 720.0 null] >> endobj 225 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 690.141 null] >> endobj 228 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 619.16797 null] >> endobj 231 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 442.105 null] >> endobj 234 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 198.77197 null] >> endobj 237 0 obj << /Type /Action /S /GoTo /D [27 0 R /XYZ 72.0 162.844 null] >> endobj 240 0 obj << /Type /Action /S /GoTo /D [31 0 R /XYZ 72.0 720.0 null] >> endobj 243 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 720.0 null] >> endobj 246 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 690.141 null] >> endobj 249 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 644.39 null] >> endobj 252 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 602.786 null] >> endobj 255 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 561.182 null] >> endobj 258 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 519.578 null] >> endobj 261 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 389.827 null] >> endobj 264 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 354.51 null] >> endobj 267 0 obj << /Type /Action /S /GoTo /D [35 0 R /XYZ 72.0 196.03802 null] >> endobj 270 0 obj << /Type /Action /S /GoTo /D [43 0 R /XYZ 72.0 720.0 null] >> endobj 273 0 obj << /Type /Action /S /GoTo /D [48 0 R /XYZ 72.0 720.0 null] >> endobj 276 0 obj << /Type /Action /S /GoTo /D [53 0 R /XYZ 72.0 720.0 null] >> endobj 279 0 obj << /Type /Action /S /GoTo /D [58 0 R /XYZ 72.0 720.0 null] >> endobj 282 0 obj << /Type /Action /S /GoTo /D [63 0 R /XYZ 72.0 720.0 null] >> endobj 285 0 obj << /Type /Action /S /GoTo /D [68 0 R /XYZ 72.0 720.0 null] >> endobj 288 0 obj << /Type /Action /S /GoTo /D [73 0 R /XYZ 72.0 720.0 null] >> endobj 291 0 obj << /Type /Action /S /GoTo /D [78 0 R /XYZ 72.0 720.0 null] >> endobj 294 0 obj << /Type /Action /S /GoTo /D [83 0 R /XYZ 72.0 720.0 null] >> endobj 297 0 obj << /Type /Action /S /GoTo /D [88 0 R /XYZ 72.0 720.0 null] >> endobj 300 0 obj << /Type /Action /S /GoTo /D [93 0 R /XYZ 72.0 720.0 null] >> endobj 303 0 obj << /Type /Action /S /GoTo /D [98 0 R /XYZ 72.0 720.0 null] >> endobj 306 0 obj << /Type /Action /S /GoTo /D [103 0 R /XYZ 72.0 720.0 null] >> endobj 309 0 obj << /Type /Action /S /GoTo /D [108 0 R /XYZ 72.0 720.0 null] >> endobj 312 0 obj << /Type /Action /S /GoTo /D [113 0 R /XYZ 72.0 720.0 null] >> endobj 315 0 obj << /Type /Action /S /GoTo /D [118 0 R /XYZ 72.0 720.0 null] >> endobj 318 0 obj << /Type /Action /S /GoTo /D [123 0 R /XYZ 72.0 720.0 null] >> endobj 321 0 obj << /Type /Action /S /GoTo /D [128 0 R /XYZ 72.0 720.0 null] >> endobj 324 0 obj << /Type /Action /S /GoTo /D [133 0 R /XYZ 72.0 720.0 null] >> endobj 327 0 obj << /Type /Action /S /GoTo /D [138 0 R /XYZ 72.0 720.0 null] >> endobj 330 0 obj << /Type /Action /S /GoTo /D [143 0 R /XYZ 72.0 720.0 null] >> endobj 333 0 obj << /Type /Action /S /GoTo /D [148 0 R /XYZ 72.0 720.0 null] >> endobj 336 0 obj << /Type /Action /S /GoTo /D [153 0 R /XYZ 72.0 720.0 null] >> endobj 339 0 obj << /Type /Action /S /GoTo /D [158 0 R /XYZ 72.0 720.0 null] >> endobj 342 0 obj << /Type /Action /S /GoTo /D [163 0 R /XYZ 72.0 720.0 null] >> endobj 345 0 obj << /Type /Action /S /GoTo /D [168 0 R /XYZ 72.0 720.0 null] >> endobj 348 0 obj << /Type /Action /S /GoTo /D [173 0 R /XYZ 72.0 720.0 null] >> endobj 351 0 obj << /Type /Action /S /GoTo /D [178 0 R /XYZ 72.0 720.0 null] >> endobj 354 0 obj << /Type /Action /S /GoTo /D [186 0 R /XYZ 72.0 720.0 null] >> endobj 357 0 obj << /Type /Action /S /GoTo /D [194 0 R /XYZ 72.0 720.0 null] >> endobj 360 0 obj << /Type /Action /S /GoTo /D [199 0 R /XYZ 72.0 720.0 null] >> endobj 363 0 obj << /Type /Action /S /GoTo /D [204 0 R /XYZ 72.0 720.0 null] >> endobj 366 0 obj << /Type /Action /S /GoTo /D [209 0 R /XYZ 72.0 720.0 null] >> endobj 369 0 obj << /Type /Action /S /GoTo /D [214 0 R /XYZ 72.0 720.0 null] >> endobj 426 0 obj << /Type /Action /S /GoTo /D [375 0 R /XYZ 72.0 720.0 null] >> endobj 430 0 obj << /Type /Action /S /GoTo /D [380 0 R /XYZ 72.0 720.0 null] >> endobj 433 0 obj << /Type /Action /S /GoTo /D [385 0 R /XYZ 72.0 720.0 null] >> endobj 436 0 obj << /Type /Action /S /GoTo /D [390 0 R /XYZ 72.0 720.0 null] >> endobj 439 0 obj << /Type /Action /S /GoTo /D [395 0 R /XYZ 72.0 720.0 null] >> endobj 442 0 obj << /Type /Action /S /GoTo /D [403 0 R /XYZ 72.0 720.0 null] >> endobj 445 0 obj << /Type /Action /S /GoTo /D [408 0 R /XYZ 72.0 720.0 null] >> endobj 448 0 obj << /Type /Action /S /GoTo /D [408 0 R /XYZ 72.0 690.141 null] >> endobj 451 0 obj << /Type /Action /S /GoTo /D [408 0 R /XYZ 72.0 597.258 null] >> endobj 454 0 obj << /Type /Action /S /GoTo /D [422 0 R /XYZ 72.0 720.0 null] >> endobj 459 0 obj << /Type /Action /S /GoTo /D [8 0 R /XYZ 72.0 720.0 null] >> endobj 460 0 obj << /First 461 0 R /Last 526 0 R >> endobj 462 0 obj << /Type /Action /S /GoTo /D [18 0 R /XYZ 72.0 720.0 null] >> endobj 482 0 obj << /Type /Action /S /GoTo /D [43 0 R /XYZ 72.0 690.141 null] >> endobj xref 0 534 0000000000 65535 f 0000209526 00000 n 0000209989 00000 n 0000210141 00000 n 0000000015 00000 n 0000000216 00000 n 0000002898 00000 n 0000002931 00000 n 0000004200 00000 n 0000210351 00000 n 0000003939 00000 n 0000004367 00000 n 0000004388 00000 n 0000004408 00000 n 0000005411 00000 n 0000004428 00000 n 0000005579 00000 n 0000005599 00000 n 0000160090 00000 n 0000201280 00000 n 0000006855 00000 n 0000008768 00000 n 0000008111 00000 n 0000008936 00000 n 0000008957 00000 n 0000008978 00000 n 0000008998 00000 n 0000012177 00000 n 0000010292 00000 n 0000012345 00000 n 0000012366 00000 n 0000013491 00000 n 0000012387 00000 n 0000013659 00000 n 0000013680 00000 n 0000017090 00000 n 0000015012 00000 n 0000017258 00000 n 0000017279 00000 n 0000017764 00000 n 0000017300 00000 n 0000017932 00000 n 0000017952 00000 n 0000019893 00000 n 0000019322 00000 n 0000020061 00000 n 0000020082 00000 n 0000020102 00000 n 0000022392 00000 n 0000021510 00000 n 0000022560 00000 n 0000022581 00000 n 0000022601 00000 n 0000025468 00000 n 0000024047 00000 n 0000025636 00000 n 0000025657 00000 n 0000025678 00000 n 0000028176 00000 n 0000027162 00000 n 0000028344 00000 n 0000028365 00000 n 0000028385 00000 n 0000030716 00000 n 0000029907 00000 n 0000030884 00000 n 0000030905 00000 n 0000030925 00000 n 0000033616 00000 n 0000032485 00000 n 0000033784 00000 n 0000033805 00000 n 0000033826 00000 n 0000035825 00000 n 0000035424 00000 n 0000035993 00000 n 0000036014 00000 n 0000036034 00000 n 0000039276 00000 n 0000037670 00000 n 0000039444 00000 n 0000039465 00000 n 0000039486 00000 n 0000042243 00000 n 0000041160 00000 n 0000042411 00000 n 0000042432 00000 n 0000042453 00000 n 0000045076 00000 n 0000044165 00000 n 0000045244 00000 n 0000045265 00000 n 0000045285 00000 n 0000047927 00000 n 0000047035 00000 n 0000048095 00000 n 0000048116 00000 n 0000048136 00000 n 0000050692 00000 n 0000049925 00000 n 0000050860 00000 n 0000050882 00000 n 0000050903 00000 n 0000053883 00000 n 0000052731 00000 n 0000054053 00000 n 0000054075 00000 n 0000054097 00000 n 0000056881 00000 n 0000055963 00000 n 0000057051 00000 n 0000057073 00000 n 0000057094 00000 n 0000059418 00000 n 0000058998 00000 n 0000059588 00000 n 0000059610 00000 n 0000059631 00000 n 0000062564 00000 n 0000061573 00000 n 0000062734 00000 n 0000062756 00000 n 0000062777 00000 n 0000065462 00000 n 0000064757 00000 n 0000065632 00000 n 0000065654 00000 n 0000065675 00000 n 0000068934 00000 n 0000067693 00000 n 0000069104 00000 n 0000069126 00000 n 0000069148 00000 n 0000072091 00000 n 0000071204 00000 n 0000072261 00000 n 0000072283 00000 n 0000072304 00000 n 0000075114 00000 n 0000074398 00000 n 0000075284 00000 n 0000075306 00000 n 0000075327 00000 n 0000078506 00000 n 0000077459 00000 n 0000078676 00000 n 0000078698 00000 n 0000078719 00000 n 0000082003 00000 n 0000080889 00000 n 0000082173 00000 n 0000082195 00000 n 0000082217 00000 n 0000085468 00000 n 0000084425 00000 n 0000085638 00000 n 0000085660 00000 n 0000085681 00000 n 0000088716 00000 n 0000087927 00000 n 0000088886 00000 n 0000088908 00000 n 0000088929 00000 n 0000091973 00000 n 0000091213 00000 n 0000092143 00000 n 0000092165 00000 n 0000092186 00000 n 0000095051 00000 n 0000094508 00000 n 0000095221 00000 n 0000095243 00000 n 0000095264 00000 n 0000099127 00000 n 0000097624 00000 n 0000099297 00000 n 0000099319 00000 n 0000099341 00000 n 0000103093 00000 n 0000101739 00000 n 0000103263 00000 n 0000103285 00000 n 0000103913 00000 n 0000103307 00000 n 0000104083 00000 n 0000104104 00000 n 0000108364 00000 n 0000106540 00000 n 0000108534 00000 n 0000108556 00000 n 0000109118 00000 n 0000108578 00000 n 0000109288 00000 n 0000109309 00000 n 0000112593 00000 n 0000111783 00000 n 0000112763 00000 n 0000112785 00000 n 0000112806 00000 n 0000116133 00000 n 0000115318 00000 n 0000116303 00000 n 0000116325 00000 n 0000116346 00000 n 0000119654 00000 n 0000118896 00000 n 0000119824 00000 n 0000119846 00000 n 0000119867 00000 n 0000123517 00000 n 0000122455 00000 n 0000123687 00000 n 0000123709 00000 n 0000123730 00000 n 0000127380 00000 n 0000126356 00000 n 0000127550 00000 n 0000127572 00000 n 0000211332 00000 n 0000127593 00000 n 0000159253 00000 n 0000127732 00000 n 0000211411 00000 n 0000127874 00000 n 0000128014 00000 n 0000211490 00000 n 0000128156 00000 n 0000128295 00000 n 0000211571 00000 n 0000128437 00000 n 0000128577 00000 n 0000211654 00000 n 0000128719 00000 n 0000128859 00000 n 0000211735 00000 n 0000129001 00000 n 0000129140 00000 n 0000211818 00000 n 0000129282 00000 n 0000129421 00000 n 0000211899 00000 n 0000129563 00000 n 0000129702 00000 n 0000211978 00000 n 0000129844 00000 n 0000129984 00000 n 0000212057 00000 n 0000130126 00000 n 0000130265 00000 n 0000212138 00000 n 0000130407 00000 n 0000130546 00000 n 0000212218 00000 n 0000130688 00000 n 0000130827 00000 n 0000212299 00000 n 0000130969 00000 n 0000131108 00000 n 0000212380 00000 n 0000131250 00000 n 0000131392 00000 n 0000212461 00000 n 0000131534 00000 n 0000131674 00000 n 0000212542 00000 n 0000131816 00000 n 0000131955 00000 n 0000212622 00000 n 0000132097 00000 n 0000132239 00000 n 0000212705 00000 n 0000132381 00000 n 0000132521 00000 n 0000212784 00000 n 0000132663 00000 n 0000132802 00000 n 0000212863 00000 n 0000132944 00000 n 0000133084 00000 n 0000212942 00000 n 0000133226 00000 n 0000133365 00000 n 0000213021 00000 n 0000133507 00000 n 0000133646 00000 n 0000213100 00000 n 0000133788 00000 n 0000133927 00000 n 0000213179 00000 n 0000134069 00000 n 0000134209 00000 n 0000213258 00000 n 0000134355 00000 n 0000134494 00000 n 0000213337 00000 n 0000134636 00000 n 0000134775 00000 n 0000213416 00000 n 0000134917 00000 n 0000135056 00000 n 0000213495 00000 n 0000135198 00000 n 0000135337 00000 n 0000213574 00000 n 0000135479 00000 n 0000135617 00000 n 0000213653 00000 n 0000135759 00000 n 0000135898 00000 n 0000213733 00000 n 0000136040 00000 n 0000136179 00000 n 0000213813 00000 n 0000136321 00000 n 0000136461 00000 n 0000213893 00000 n 0000136603 00000 n 0000136742 00000 n 0000213973 00000 n 0000136884 00000 n 0000137026 00000 n 0000214053 00000 n 0000137168 00000 n 0000137310 00000 n 0000214133 00000 n 0000137452 00000 n 0000137591 00000 n 0000214213 00000 n 0000137733 00000 n 0000137872 00000 n 0000214293 00000 n 0000138014 00000 n 0000138152 00000 n 0000214373 00000 n 0000138294 00000 n 0000138433 00000 n 0000214453 00000 n 0000138575 00000 n 0000138717 00000 n 0000214533 00000 n 0000138859 00000 n 0000139001 00000 n 0000214613 00000 n 0000139143 00000 n 0000139286 00000 n 0000214693 00000 n 0000139432 00000 n 0000139575 00000 n 0000214773 00000 n 0000139721 00000 n 0000139864 00000 n 0000214853 00000 n 0000140010 00000 n 0000140153 00000 n 0000214933 00000 n 0000140299 00000 n 0000140443 00000 n 0000215013 00000 n 0000140589 00000 n 0000140732 00000 n 0000215093 00000 n 0000140878 00000 n 0000141021 00000 n 0000215173 00000 n 0000141167 00000 n 0000141310 00000 n 0000215253 00000 n 0000141456 00000 n 0000141598 00000 n 0000215333 00000 n 0000141743 00000 n 0000141884 00000 n 0000142028 00000 n 0000160277 00000 n 0000160300 00000 n 0000163706 00000 n 0000162964 00000 n 0000163876 00000 n 0000163898 00000 n 0000163919 00000 n 0000167573 00000 n 0000166621 00000 n 0000167743 00000 n 0000167765 00000 n 0000167786 00000 n 0000170863 00000 n 0000170526 00000 n 0000171033 00000 n 0000171055 00000 n 0000171076 00000 n 0000175232 00000 n 0000173854 00000 n 0000175402 00000 n 0000175424 00000 n 0000175446 00000 n 0000179908 00000 n 0000178262 00000 n 0000180078 00000 n 0000180100 00000 n 0000180544 00000 n 0000180122 00000 n 0000180714 00000 n 0000180735 00000 n 0000184856 00000 n 0000183589 00000 n 0000185026 00000 n 0000185048 00000 n 0000185070 00000 n 0000190837 00000 n 0000187962 00000 n 0000190752 00000 n 0000188136 00000 n 0000188312 00000 n 0000188508 00000 n 0000188705 00000 n 0000188902 00000 n 0000189127 00000 n 0000189350 00000 n 0000189570 00000 n 0000191025 00000 n 0000191047 00000 n 0000191069 00000 n 0000194404 00000 n 0000193999 00000 n 0000194574 00000 n 0000194596 00000 n 0000215413 00000 n 0000194617 00000 n 0000201099 00000 n 0000194752 00000 n 0000215493 00000 n 0000194890 00000 n 0000195025 00000 n 0000215573 00000 n 0000195163 00000 n 0000195299 00000 n 0000215653 00000 n 0000195437 00000 n 0000195572 00000 n 0000215733 00000 n 0000195710 00000 n 0000195845 00000 n 0000215813 00000 n 0000195983 00000 n 0000196118 00000 n 0000215893 00000 n 0000196256 00000 n 0000196392 00000 n 0000215973 00000 n 0000196534 00000 n 0000196669 00000 n 0000216055 00000 n 0000196811 00000 n 0000196946 00000 n 0000216137 00000 n 0000197084 00000 n 0000197219 00000 n 0000197357 00000 n 0000201467 00000 n 0000216217 00000 n 0000216295 00000 n 0000201489 00000 n 0000216348 00000 n 0000201586 00000 n 0000201695 00000 n 0000201794 00000 n 0000202024 00000 n 0000202108 00000 n 0000202210 00000 n 0000202327 00000 n 0000202452 00000 n 0000202537 00000 n 0000202624 00000 n 0000202874 00000 n 0000203022 00000 n 0000203108 00000 n 0000203209 00000 n 0000203291 00000 n 0000203423 00000 n 0000203568 00000 n 0000203655 00000 n 0000203765 00000 n 0000216427 00000 n 0000203911 00000 n 0000203996 00000 n 0000204081 00000 n 0000204230 00000 n 0000204319 00000 n 0000204427 00000 n 0000204515 00000 n 0000204664 00000 n 0000204749 00000 n 0000204851 00000 n 0000204957 00000 n 0000205065 00000 n 0000205174 00000 n 0000205277 00000 n 0000205363 00000 n 0000205505 00000 n 0000205605 00000 n 0000205716 00000 n 0000205827 00000 n 0000205939 00000 n 0000206046 00000 n 0000206151 00000 n 0000206264 00000 n 0000206375 00000 n 0000206484 00000 n 0000206590 00000 n 0000206704 00000 n 0000206813 00000 n 0000206905 00000 n 0000207046 00000 n 0000207143 00000 n 0000207253 00000 n 0000207357 00000 n 0000207461 00000 n 0000207580 00000 n 0000207697 00000 n 0000207797 00000 n 0000207952 00000 n 0000208041 00000 n 0000208153 00000 n 0000208250 00000 n 0000208484 00000 n 0000208574 00000 n 0000208658 00000 n 0000208743 00000 n 0000208857 00000 n 0000208967 00000 n 0000209087 00000 n 0000209200 00000 n 0000209306 00000 n 0000209417 00000 n trailer << /Size 534 /Root 2 0 R /Info 4 0 R /ID [ ] >> startxref 216508 %%EOF cl-uffi-2.1.2/doc/uffi.xml0000644000175000017500000000240111015741033014263 0ustar kevinkevin %myents; %xinclude; ]> cl-uffi-2.1.2/doc/xinclude.mod0000644000175000017500000000160111015741033015125 0ustar kevinkevin cl-uffi-2.1.2/examples/0000755000175000017500000000000011674246130013675 5ustar kevinkevincl-uffi-2.1.2/examples/acl-compat-tester.lisp0000644000175000017500000006305611333325476020127 0ustar kevinkevin;; 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: (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) cl-uffi-2.1.2/examples/arrays.lisp0000644000175000017500000000361611333325470016072 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/examples/atoifl.lisp0000644000175000017500000000264111333325461016044 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") ) cl-uffi-2.1.2/examples/c-test-fns.c0000644000175000017500000000306211333325453016023 0ustar kevinkevin/*************************************************************************** * FILE IDENTIFICATION * * Name: c-test-fns.c * Purpose: Test functions in C for UFFI library * Programer: Kevin M. Rosenberg * Date Started: Mar 2002 * * This file, part of UFFI, is Copyright (c) 2002-2010 by Kevin M. Rosenberg * * These variables are correct for GCC * you'll need to modify these for other compilers ***************************************************************************/ #if defined(WIN32)||defined(WIN64) #include BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason, LPVOID lpvReserved) { return 1; } #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT #endif #include #include #include /* 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.; } cl-uffi-2.1.2/examples/c-test-fns.lisp0000644000175000017500000000731511333325445016556 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") ) cl-uffi-2.1.2/examples/compress.lisp0000644000175000017500000001020111333325440016405 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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 cl-uffi-2.1.2/examples/file-socket.lisp0000644000175000017500000000213111333325432016763 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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")))) cl-uffi-2.1.2/examples/getenv.lisp0000644000175000017500000000240111333325424016047 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") ) cl-uffi-2.1.2/examples/gethostname.lisp0000644000175000017500000000376311333325415017111 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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")) ) cl-uffi-2.1.2/examples/getshells.lisp0000644000175000017500000000206411333325407016557 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)) cl-uffi-2.1.2/examples/gettime.lisp0000644000175000017500000000411511333325401016214 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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"))) cl-uffi-2.1.2/examples/Makefile0000644000175000017500000000171511333325372015337 0ustar kevinkevin# FILE IDENTIFICATION # # Name: Makefile # Purpose: Makefile for UFFI examples # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # # This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/examples/Makefile.msvc0000644000175000017500000000073611333325364016311 0ustar kevinkevin# FILE IDENTIFICATION # # Name: Makefile.msvc # Purpose: Makefile for the CLSQL UFFI helper package (MSVC) # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # # This file, part of CLSQL, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/examples/run-examples.lisp0000644000175000017500000000173111333325356017210 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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*)) cl-uffi-2.1.2/examples/strtol.lisp0000644000175000017500000000520311333325347016115 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)))) cl-uffi-2.1.2/examples/test-examples.lisp0000644000175000017500000000241511333325340017354 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/examples/union.lisp0000644000175000017500000000532111333325332015711 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/INSTALL0000644000175000017500000000013311015741033013074 0ustar kevinkevinDetailed installation instructions are supplied in PDF format in the file ./doc/uffi.pdf. cl-uffi-2.1.2/LICENSE0000644000175000017500000000273111015741033013056 0ustar kevinkevinCopyright (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. cl-uffi-2.1.2/Makefile0000644000175000017500000000145011333325323013511 0ustar kevinkevin# FILE IDENTIFICATION # # Name: Makefile # Purpose: Makefile for the uffi package # Programer: Kevin M. Rosenberg, M.D. # Date Started: Mar 2002 # # This file, part of UFFI, is Copyright (c) 2002-2010 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 \{\} \; cl-uffi-2.1.2/Makefile.common0000644000175000017500000000060611015741033014777 0ustar kevinkevinall: .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 cl-uffi-2.1.2/NEWS0000644000175000017500000000006211236146144012552 0ustar kevinkevinUFFI now supports 64-bit AllegroCL and Lispworks. cl-uffi-2.1.2/README0000644000175000017500000000141111015741033012723 0ustar kevinkevinPackage: 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. cl-uffi-2.1.2/src/0000755000175000017500000000000011674246130012646 5ustar kevinkevincl-uffi-2.1.2/src/aggregates.fasl0000644000175000017500000003071611333046230015624 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/aggregates.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-CR  %DEFMACROQ&UFFIR DEF-ENUM>#BNSEPARATOR-STRINGQ& SB-KERNELR KEYWORD-SUPPLIED-P< VERIFY-KEYWORDSQ  DEBUG-FUNR7:>(@$$$-A(B$$ $-C1 D$M#$M$*$./$$$#J$`(E3C1 F(G  VARARGS-ENTRYLLAMBDAL &OPTIONAL PROBLEM6L INFO7NL&REST G8QRSQ COMPILED-DEBUG-INFOR7:>Q  DEBUG-INFOR7:>(V$$$-W(X$$$-Y1Z[;2$EHeHPHUHU$<BHJ$<8HI$<.HIHMH\$HH{H}HxH+HP HBHUH\$HHUH=V HRH+HP r HHHLH -HEHHHHuH\$HHֿHH+HP HBHuH uKH\$H0HH=HHCHCHC H0H+HP HBHEHH$<HIHMHEHH$<HI$<HAHEH} :H\$HHH}HRH+HP HBHHMHE HE HEHHHEHPHU؋$<Hы$<WHuHEHHHkqHL%A(HMHuHHUH t$< BH H\$HHHH=H5HHCHHCHtHCHKHmHCLCHfHH+HP  T  U U U U U U  UjL%AYHI U U U QNABSOLUTER alloc_trampQNABSOLUTERQ&SB-VM ^ALLOC-SIGNED-BIGNUM-IN-RBXRQNABSOLUTERQ ^ALLOC-SIGNED-BIGNUM-IN-RCXR=b3 WHOLE0 ENVIRONMENT1eLFUNCTIONgLVALUESJijk&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-namelLMACRO-FUNCTIONn8 DEF-ARRAY-POINTER>p#B PROPER-LIST-OF-LENGTH-P#BN POINTER-SELF STRUCT<s APPEND2<#($$$-18  DEF-STRUCT>#B <<"<<O<$#$?$*$./$$$$T$$#$`(12C1 $M#$M$*$./$$$#$`(C1 (Y1; 2EHeHZHUHU؋$<LHJHHuH\$HHֿH0H+HP HBHuH HEHH$<HAHELELEHEHH$<HyH\$HIHH+HP LEHH\$HHIHH+HP HBHHH}Hu` H\$H0H}H=~HHCHCHC Hl0H+HP HB T  U U= WHOLE48 ENVIRONMENT49$$$$((Ďm8 GET-SLOT-VALUE>#Bp< SLOT< OBJu SLOT<$#$?$*$./$$$$T$$#$`(12C1 $M#$M$*$./$$$$J$`(C1 (Y1; 2EHeHIHUHU$<;HJLLEH\$HIпH;H+HP HBLEH HEHH$<HyHEHH$<HI$<uQHEHH$<HI$<HI$<HqHHu` H UH\$H0HH=IHHCHCHCH}0H+HP HB T  U U U U U= WHOLE55 ENVIRONMENT56m8 GET-SLOT-POINTER>#Bp<<<$#$?$*$./$$$$T$$#$`(12C1 $M#$M$*$./$$$$J$`(C1 (Y1; 2EHeHIHUHU$<;HJLLEH\$HIпH;H+HP HBLEH HEHH$<HyHEHH$<HI$<uQHEHH$<HI$<HI$<HqHHu` H UH\$H0HH=IHHCHCHCH}0H+HP HB T  U U U U U= WHOLE64 ENVIRONMENT65m8  DEREF-ARRAY>#Bp< DEREF<u I<$#$?$*$./$$$$T$$#$`(12C1 $M#$M$*$./$$$$J$`(C1 (Y1; 2EHeHIHUHU$<;HJLLEH\$HIпH;H+HP HBLEH HEHH$<HyHEHH$<HI$<uQHEHH$<HI$<HI$<HqHHu` H UH\$H0HH=IHHCHCHCH}0H+HP HB T  U U U U U= WHOLE73 ENVIRONMENT74&Returns a field from a rowm8  DEF-UNION>#B <#B *IGNORED-PACKAGE-LOCKS* *SYSTEM-COPY-FN*$$ 1 %DEFVAR<&COPY-FROM-SYSTEM-AREA& SB-KERNEL()$$$-*1+,-./0L DEFCONSTANT',s ^VECTOR-DATA-OFFSET ^ N-WORD-BITS4$561', ^ N-BYTE-BITS$89:;C1 <(=&top level form>Y1?@;2EHeкO HEIL$8HC!HIL$8H uHL%AA4AHYIH HA!IHbuHAHR H\$H0HO HC HC HHCH0H+HP HBH\$HHH=HH+HP H\$HHH+HP H AIDH\$H Hp HlHCHi H+HP HBH\$HHH=HH+HP H\$HHH+HP H @AIDH\$H H HHCH H+HP HBIL$8HAHP!HAIHAHAHIL$8 H]H\$HHEH=FHGH+HP H\$HH1H+HP H u4H\$HH:H=HH+HP HH\$HHH=HH+HP HQNABSOLUTERQ ^ALLOC-TLS-INDEX-IN-RAXRi=C;fD8 CONVERT-FROM-FOREIGN-USB8>F#5B  ALIEN-SAP(d$$ $-e1 fgSg@g gggg̽g̞gg[?>h@cl-uffi-2.1.2/src/aggregates.lisp0000644000175000017500000002401411333325315015644 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)))) cl-uffi-2.1.2/src/corman/0000755000175000017500000000000011335075517014130 5ustar kevinkevincl-uffi-2.1.2/src/corman/corman-notes.txt0000644000175000017500000000122511015741033017262 0ustar kevinkevinsome 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 cl-uffi-2.1.2/src/corman/getenv-ccl.lisp0000644000175000017500000000516211333325274017050 0ustar kevinkevin;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: getenv-ccl.cl ;;;; Purpose: cormanlisp version ;;;; Programmer: "Joe Marshall" ;;;; Date Started: Feb 2002 ;;;; ;;;; ************************************************************************* (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") ) cl-uffi-2.1.2/src/functions.fasl0000644000175000017500000002661311333046230015524 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/functions.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-IMPLR %DEFUNQ&UFFIR PROCESS-FUNCTION-ARGS>#FB PROCESS-ONE-FUNCTION-ARG8>?#BNROUTINE CONVERT-FROM-UFFI-TYPE<  BACKQ-LIST*<$#Z$?$*$  $$$$T$$#(B C1 D$P#`$P$*$  $$,#$j(E1 F(G(1HI;2 EHeHLLEI$<IH@HEIH$<HQH\$HH=THUH+HP HBLEHI1H t HRHH tH$<t HusIH$<~HI$<uxHQI$M\$hIKI9L$pvbIL$hIKI1$t HQHA HHUHu`   T  U U UjL%AYHIQNABSOLUTER alloc_tramp=K ARGM/0L*O@$$$$$P(Q(RS$$:=1T8 ALLEGRO-CONVERT-RETURN-TYPE>V#B$#$?$*$  $$$$T$$#(V UW1 X$H#$H$*$  $$$$U(YU1 Z([U(1\];2EHeHu\Hʋ$<t HH]HQ$<tI$M\$hISI9T$pv*IT$hISI1$t HJHB  TjL%AZHRQNABSOLUTER alloc_tramp=_ULTYPEa/013bcd$$:=1e8 FUNCALLABLE-LAMBDA-LIST>g#B<$#$?$*$  $$$$T$$#(g fh1 i$L#$L$*$  $$$#(jf1 k(lf(1mn;2EHeHH HWHYHI$<uiHsI$M\$hI[I9\$pvSI\$hI[I1$t HsHSHӋ$<u>HH uH(u`  T jL%A[H[ UQNABSOLUTER alloc_tramp=pf.5q$$:=1r8 CONVERT-LISPWORKS-ARGS>t#-BLSUBSEQ#BLGENSYM< MAKE-LISP-NAME<$#$?$*$  $$$$T$$#( 1 $P#$P$*$  $$,#$j(1 ((1;2EHeH]LLEHT$HH1H*HP LEHHuI I$<IPHI$M\$hI[ I9\$pI\$hI[HHPHH@HxH@ I1$t HIH$<HIHHH]H]IHI$M\$hI[ I9\$pI\$hI[HHPHH@HxH@ I1$t H]H\$HIH~H+HP HBHuLEHHUHH[ Tj L%A[H[ Uj L%A[H[[QNABSOLUTER alloc_trampQNABSOLUTER alloc_tramp= NAMES/012LSYMBOL3$$$$$(($$:=18 PREPROCESS-ARGS>#NBNINuN#BN RETURNINGNMODULE VERIFY-KEYWORDS#OB<<<<@cl-uffi-2.1.2/src/functions.lisp0000644000175000017500000002107411333054743015552 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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))) #+(or lispworks5 lispworks6) (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) (not lispworks 6)) `(%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 #+:mswindows :calling-convention #+:mswindows :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 )) cl-uffi-2.1.2/src/libraries.fasl0000644000175000017500000002230411333046230015461 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/libraries.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-IMPLR %DEFVARQ&UFFIR *LOADED-LIBRARIES*$LBOUNDP7$$$&EList of foreign libraries loaded. Used to prevent reloading a library$$&,/Users/kevin/pub/src/uffi/src/libraries.lisp Q&SB-C DEFINITION-SOURCE-LOCATIONRQR( $$$- QLSTRUCTURE-OBJECTR ($$$-Q&SB-SYS STRUCTURE!OBJECTR ($$$-($$$-18 %DEFUN DEFAULT-FOREIGN-LIBRARY-TYPE>$WB&dylib$$Q$?$*$NSTANDARDNMINIMAL$$$$T(NEXTERNAL TL-XEP Q COMPILED-DEBUG-FUNR Q DEBUG-FUNR (#$$$-$(%$$ $-&1 '$D$W$D$*$$((&1 )(*Q COMPILED-DEBUG-INFOR Q DEBUG-INFOR (-$$$-.(/$$$-0112;W2EHeHu HH] T=3LFUNCTIONLVALUESLSIMPLE-BASE-STRING$7L &OPTIONAL9:;&7Returns string naming default library type for platform<$$ 1=8 FOREIGN-LIBRARY-TYPES>?$WB&bundle?@$$Q$?$*$$$$$T(A>B&1 C$D$W$D$*$$(D>&1 E(F>01GH;W2EHeHu HH] T=I>45LCONS8KLM&WReturns list of string naming possible library types for platform, sorted by preferenceN$$ 1O8 FIND-FOREIGN-LIBRARY>Q#BNTYPESN DRIVE-LETTERSNALLOW-OTHER-KEYSTLPARSE-NAMESTRING<$# #$*$$$$#j$$#*$$#J(gPh&1 i(j VARARGS-ENTRYPl01mn;2EHv>H`H)HHHvLMI)M1ONIHuHHHHPHpHUHxHpYHpLTHHHHٿ A A  HH}I4 IT HH;luHZH;ftNH;et@I$M\$hI[I9\$pI\$hI[I1$t HSHC LLH~H kHMHMHxHMH}IH} HM$<HM$<iHM$<H HM8HEHHHMHEHHHMHMHMHEH@HEHEHHHMHMHMHEHHHMHEHHHMHMHM\HEH@HEHEHHHMH}H} A IDH}HM$<HM$<HM$<sA<h$$$$((&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.$$ 18 LOAD-FOREIGN-LIBRARY>#BV#BQ& SB-FORMATR FORMAT-ERRORN COMPLAINT&required argument missingNCONTROL-STRING&-l~ANOFFSET@cl-uffi-2.1.2/src/libraries.lisp0000644000175000017500000001235311334026052015507 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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 win64 cygwin mswindows windows) "dll" #+(or macosx darwin ccl-5.0) "dylib" #-(or win32 win64 cygwin mswindows windows 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 win64 windows mswindows) '("dll" "lib") #+(or macosx darwin ccl-5.0) '("dylib" "bundle") #-(or win32 win64 windows 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 win64 windows mswindows) (unless (listp drive-letters) (setq drive-letters (list drive-letters))) #-(or win32 win64 windows 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) (declare (ignorable module supporting-libraries)) (flet ((load-failure () (error "Unable to load foreign library \"~A\"." filename))) (declare (ignorable #'load-failure)) (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 mswindows) (truename filename) #-(and lispworks mswindows) 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 (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))) cl-uffi-2.1.2/src/Makefile0000644000175000017500000000011511015741033014272 0ustar kevinkevinSUBDIRS := include ../Makefile.common .PHONY: distclean distclean: clean cl-uffi-2.1.2/src/objects.fasl0000644000175000017500000004054011333046230015140 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/objects.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-IMPLR %DEFUNQ&UFFIR SIZE-OF-FOREIGN-TYPE>#BQ&SB-ALIENR  ALIEN-SIZE  BACKQ-LIST@#BQ&SB-INTR @PROPER-LIST-OF-LENGTH-P FREE-FOREIGN-OBJECT>e#:BA<  FREE-ALIEN <Fd OBJgK<$#($?$*$  $$$$T$$#$`(hFdij!1 k$M#.$M$*$  $$$$J$`(li!1 m(ni+1op; :2EHeHHUHU$<HJLLEH\$HIпH;H+HP HBLEH t1HEHH$<|HyHHu` H\$H0HH=IHHCHCHCH0H+HP HB| T  U=qi WHOLE10 ENVIRONMENT11t[ugbdv8> NULL-POINTER-P>x#:BA<  NULL-ALIEN <FwgK<$#($?$*$  $$$$T$$#$`(yFwz{!1 |$M#.$M$*$  $$$$J$`(}z!1 ~(z+1; :2EHeHHUHU$<HJLLEH\$HIпH;H+HP HBLEH t1HEHH$<|HyHHu` H\$H0HH=IHHCHCHCH0H+HP HB| T  U=z WHOLE17 ENVIRONMENT18[gbw8> MAKE-NULL-POINTER>#BA<  MAKE-POINTER>#%BA< < <D<ZF ADDR/K<$#$?$*$  $$$$T$$#$`(F!1 $M# $M$*$  $$$#$`(!1 (+1;%2EHeHHUHU؋$<HJLLEH\$HIпHH+HP HBLEH  HEHH$<WHyHEHH$<EHI$<;HAHEH\$HHHH+HP HBHUH\$HHUHH+HP HBH\$HH=qHrH+HP HBHH\$HHUH.H+HP HBHH:H}Hu` H\$H0HH=IHHCHCHCH0H+HP HB T  U U U= WHOLE31 ENVIRONMENT32[D$$$$((b8> CHAR-ARRAY-TO-POINTER>#ABA< CASTZ UNSIGNED$  BACKQ-LIST*<FgK<$#/$?$*$  $$$$T$$#$`(F!1 $M#5$M$*$  $$$$J$`(!1 (+1; A2EHeHHUHU$<HJLLEH\$HIпH;H+HP HBLEH t8HEHH$<HyHH5Hu` H\$H0HH=IHHCHCHCH0H+HP HBu T  U= WHOLE38 ENVIRONMENT39[gb8>  DEREF-POINTER>#nBA< DEREF ENSURE-CHAR-CHARACTER>#:BA ENSURE-CHAR-INTEGER># BA<FgK<$#$?$*$  $ $$$T$$#$`(F!1 $M#$M$*$  $ $$$J$`(!1 (+1; 2 EHeHHUHU$<HJLLEH\$HIпHKH+HP HBLEH tHEHH$<ufHQH]H\$H0H H= IH HCHCHCH0H+HP HB T  U= WHOLE61 ENVIRONMENT621Y35gb8> ENSURE-CHAR-STORABLE>#:BA POINTER-ADDRESS>#fBA<  ALIEN-SAP < SAP-INTFgK<$#T$?$*$  $ $$$T$$#$`(F!1 $M#Z$M$*$  $ $$$J$`(!1 (+1; f2EHeH HUHU$<HJLLEH\$HIпH;H+HP HBLEH t]HEHH$<HyH\$HHHH+HP HBHHHu` H\$H0HH=IHHCHCHCH0H+HP HBP T  U= WHOLE75 ENVIRONMENT76"[#gb$8> WITH-FOREIGN-OBJECT>&#"B @LIST-OF-LENGTH-AT-LEAST-P<A9+1?@;"2EHeHHUHU$<HJ$<HAHEHMHU$< HEHHHHuH\$HHֿHH+HP HBHuH rH\$HHUHWH+HP HBH HEHHHMHEHH$<HAHEHEHH$<HIHMHT$HH1H*HP HUH\$HHUHH+HP HBH\$HH=HH+HP HBHH $<HRH9H\$HHUHHrH+HP HBH\$HHPH+HP HBHUH\$HHUH}H"H+HP HBH\$HHH+HP HBHH\$HHHuHH+HP HBHHH}Hu` H\$HHUHHH+HP HBH\$HHeH+HP HBHUH\$HH_H}H4H+HP HBHH\$HHUH H+HP HBH\$HHH+HP HBHH\$HHHuHH+HP HBHHH}Hu` H\$H0HuHH=HHCHCHCH0H+HP HBH\$H0HKH=LH]HCHCHC H:0H+HP HB>H\$HHH#H=$H5HHCHHCHHCHKH HCHHCHHH+HP  T  U U U=A9 WHOLE82 ENVIRONMENT83D[D$ $$$$E(F(GH1b%I8> WITH-FOREIGN-OBJECTS>K#B& WITH-CAST-POINTER>_#B&<A< <D<Z <LLET<F^  BINDING-NAME POINTER/bK<bL&BODY0d234567<$#$?$*$  $$$$T$$#$`(eF^fg!1 h$M#$M$*$  $$$#*$`(if!1 j(kf+1lm;2EHeHXHUHU$<JHJ$<@HAHEHMHU$<HEHHHHuH\$HHֿHH+HP HBHuH H\$HHUHgH+HP HBH ~HEH@HEHEHH$<HAHEHEHH$<mHI$<cHQHEHH$<QHAHEH\$HHH+HP HBH\$HH=HH+HP HBHH\$HHHH+HP HBHH\$HHH}HoH+HP HBHH\$HHUHFH+HP HBH\$HH$H+HP HBHHHuHu` H\$H0HuHH=HHCHCHCH0H+HP HB.H\$H0HH=HHCHCHC H0H+HP HBH\$HHHH=H5PHHCHFHCHsHCHKHlHCH)HCH^HH+HP  T  U U U U U=nf WHOLE100 ENVIRONMENT101q[D$$$$$$$r(s(tudb^v8> DEF-FOREIGN-VAR>x#BA< MAKE-LISP-NAME<D< < DEFINE-ALIEN-VARIABLEFw NAMES/ MODULE|K<$#$?$*$  $$$$T$$#$`(}Fw~!1 $M#$M$*$  $$$#$`(~!1 (~+1; 2EHeH9HUHU؋$<+HJLLEH\$HIпHH+HP HBLEH HEHH$<HIHHEHP$<HR$<HBHEHEHP$<HR$<HR$<H t $<HMH t $<H\$HHHDH+HP HBHH\$HHUH=#HuH H+HP HBHuHUH\$HHUHHH+HP HBHHHuHu` HI$<HqeHAHEH H\$H0HH=IHHCHCHCH0H+HP HB& T  U     U=~ WHOLE111 ENVIRONMENT112[D$$$$$x$$$$$$((|bw8> DEF-POINTER-VAR>#mBA @ . (nf S!)$#@9Q  DEBUG-SOURCER($$ $-1 ̞̅mW@ ̪́̕pT-?>@cl-uffi-2.1.2/src/objects.lisp0000644000175000017500000002555711333325261015201 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) (not lispworks6))) obj #+(or allegro cmu lispworks5 lispworks6 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)) cl-uffi-2.1.2/src/os.fasl0000644000175000017500000000574211333046231014136 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/os.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-IMPLR %DEFUNQ&UFFIR GETENV>$cBQ&SB-EXTR  POSIX-GETENV<$$]$?$*$NSTANDARDNMINIMAL$$$$T$$#( NEXTERNALQ&SB-CR TL-XEPQ COMPILED-DEBUG-FUNRQR($$$-QLSTRUCTURE-OBJECTR($$$-Q&SB-SYS STRUCTURE!OBJECTR($$$-Q DEBUG-FUNR($$$-($$ $-1 $H$c$H$*$  $$$#( 1 !("Q COMPILED-DEBUG-INFORQ DEBUG-INFOR(%$$$-&('$$$-(1)*;c2EHeHuHHHu`  T=+ VAR-LFUNCTION/LVALUESLORL SIMPLE-ARRAYL*45LSIMPLE-BASE-STRINGLNULLQ&SB-ALIENR 8ALIEN3 8SIGNED$;<=2L UNSIGNED-BYTE$?@AL &OPTIONALCDE&-Return the value of the environment variable.F$$&%/Users/kevin/pub/src/uffi/src/os.lispGQ DEFINITION-SOURCE-LOCATIONR(I$$$-J1K8 RUN-SHELL-COMMAND>M#BNOUTPUTNALLOW-OTHER-KEYSLFORMAT<&-cP&/bin/shQNINPUT  RUN-PROGRAMw@cl-uffi-2.1.2/src/os.lisp0000644000175000017500000000500611333325254014156 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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.") )) cl-uffi-2.1.2/src/package.fasl0000644000175000017500000000323711333046227015112 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/package.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&CL-USER8Q&SB-IMPLR  %DEFPACKAGE&UFFI&CL& DEF-CONSTANT&DEF-FOREIGN-TYPE &DEF-TYPE & NULL-CHAR-P &DEF-ENUM & DEF-STRUCT &GET-SLOT-VALUE&GET-SLOT-POINTER&DEF-ARRAY-POINTER& DEREF-ARRAY& DEF-UNION&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&+NULL-CSTRING-POINTER+ &CHAR-ARRAY-TO-POINTER!&WITH-CAST-POINTER"&DEF-FOREIGN-VAR#&CONVERT-FROM-FOREIGN-USB8$&DEF-POINTER-VAR%&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-LENGTH0& DEF-FUNCTION1&FIND-FOREIGN-LIBRARY2&LOAD-FOREIGN-LIBRARY3&DEFAULT-FOREIGN-LIBRARY-TYPE4&FOREIGN-LIBRARY-TYPES5&RUN-SHELL-COMMAND6&GETENV7189$$&*/Users/kevin/pub/src/uffi/src/package.lisp:Q&SB-C ;DEFINITION-SOURCE-LOCATIONRQR(=$$$->QLSTRUCTURE-OBJECTR>(@$$$-AQ&SB-SYS BSTRUCTURE!OBJECTR>A(D$$$-E(F$$$-G1H8 #+I$#@:Q ; DEBUG-SOURCER>AE(K$$ $-L1 M?>O@cl-uffi-2.1.2/src/package.lisp0000644000175000017500000000373711333670524015144 0ustar kevinkevin;;;; -*- 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 #:no-long-long #: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 ;; Internatialization #:no-i18n #:*default-foreign-encoding* #:*foreign-encodings* #:foreign-encoded-octet-count #:string-to-octets #:octets-to-string )) cl-uffi-2.1.2/src/primitives.fasl0000644000175000017500000002644711333046230015714 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/primitives.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-CR  %DEFMACROQ&UFFIR  DEF-CONSTANT># BNEXPORTQ& SB-KERNELR KEYWORD-SUPPLIED-P< VERIFY-KEYWORDS(?  VARARGS-ENTRYLLAMBDAL &OPTIONAL PROBLEM6D INFO7FL&REST G8IJKQ COMPILED-DEBUG-INFOR/26Q  DEBUG-INFOR/26(N$$$-O(P$$$-Q1RS; 2EHeHHUHU$<sHJ$<iHI$<_HIHMH\$HHH}HH+HP HBHUH\$HHUH= HH+HP r HHHLH ^HEHHHHuH\$HHֿHEH+HP HBHuH uKH\$H0HH=H HCHCHC H 0H+HP HBHEHH$<9HIHMHEHH$<#HI$<HAHEH} lH\$HHUH}HH+HP HBLH\$HHuH}HuLEHjH+HP HBLEHUI ujA H\$HH9H}LEH"H+HP HBLEHHH=HuLEHMH(u` H\$HHH}HH+HP HBHHI$M\$hI[ I9\$pI\$hI[HHPHH@HxH@ I1$t LA H\$HHH^H=_H5HYHCHHCHKHCHKHDHCLCH=HH+HP  T  U U U U Uj L%A[H[QNABSOLUTER alloc_tramp=U+ WHOLE0 ENVIRONMENT1XLFUNCTIONZL*\]&+Macro to define a constant and to export it^LMACRO-FUNCTION`8 DEF-TYPE>b#B PROPER-LIST-OF-LENGTH-P~#:Bb#Bb# B %PUTHASH<$#$?$*$&'$ (NTOPLEVEL TOP-LEVEL-FORMLBLOCKLLET N-LIST35LTAGBODY START36LUNLESSQ DEBUG-NAME-MARKERR/26($$$-1   ;1  ( &$DOLIST (TYPE *TYPE-CONVERSION-LIST*)Q1; 2 EHeHL@!OIbuL@IRlIHM@$<uvHHPHZHx!I<# B<$#$?$*$&'$ ( N-LIST42 START43;1 (&&DOLIST (TYPE *CMU-SBCL-DEF-TYPE-LIST*)Q1 ; 2 EHeHL@!OIbuL@IRlIHM@$<uvHHPHZHx!I<%#B GETHASH3<$#$?$*$&'$ $$$T$$#(&)*$';1 ($L#$L$*$&'$ $,#$J()$;1 *(+$Q1,-;2EHeHujLLEHHx!I<:#4B%<$<NSTRUCT-POINTERNSTRUCTNUNION9<[d<$#$B$*$&'$ $$$T$$#$$#(=)*9>;1 ?$T#$T$*$&'$ $,##$$$j(@9;1 A(B9Q1CD; 42EHeLHLEH}I t I$<H /H9MuwH*Hx!I<Y#B9<$#$?$*$&'$ $$$T$$#$$#(Y)*dZ;1 [$M#$M$*$&'$ $$$J$$$j(\d;1 ](^dQ1_`;2EHeHuKHUH}H\$HHUH}HH+HP HBH t$<uH] T=adIYZ2b9$ $$$$c(d(ef$$ 1g8$LCHAR=EaLSCHARL SYMBOL-NAME A7$77NUFFI-LOWERCASE-READERLADJOINmL SYMBOL-VALUEL *FEATURES*77pq8$$$$LNOTLSTRING=j A7j A777NUFFI-CASE-SENSITIVEnwop77px8$$$# MAKE-LISP-NAME>z#BL SUBSTITUTE@cl-uffi-2.1.2/src/primitives.lisp0000644000175000017500000003101711334110152015717 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)) (:long-long (alien:signed 64)) (:unsigned-long-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)) (:long-long (sb-alien:signed 64)) (:unsigned-long-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) #+#.(cl:if (cl:and (cl:find-package (cl:string '#:c-call)) (cl:find-symbol (cl:string '#:long-long) (cl:string '#:c-call))) '(and) '(or)) (:long-long . c-call:long-long) #+#.(cl:if (cl:and (cl:find-package (cl:string '#:c-call)) (cl:find-symbol (cl:string '#:unsigned-long-long) (cl:string '#:c-call))) '(and) '(or)) (:unsigned-long-long . c-call:unsigned-long-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) (:long-long . sb-alien:long-long) (:unsigned-long-long . sb-alien:unsigned-long-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))) #+(or allegro cormanlisp) (push 'uffi:no-long-long cl:*features*) #+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)) #+lispworks6 (:long-long . :int64) #+lispworks6 (:unsigned-long-long . :uint64) (:float . :float) (:double . :double) (:array . :c-array))) #+(and lispworks (not lispworks6)) (push 'uffi:no-long-long cl:*features*) #+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))) #+digitool (push 'uffi:no-long-long cl:*features*) #+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*))) cl-uffi-2.1.2/src/readmacros-mcl.lisp0000644000175000017500000000152511333325213016423 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)) cl-uffi-2.1.2/src/strings.fasl0000644000175000017500000004152711333046230015206 0ustar kevinkevin#!/Users/kevin/src/dl/sbcl-git/src/runtime/sbcl --script # FASL compiled from "/Users/kevin/pub/src/uffi/src/strings.lisp" using SBCL version 1.0.35.4 X86-64M1.0.35.4&(:GENCGC :SB-PACKAGE-LOCKS :SB-THREAD)LSETL *PACKAGE*&UFFI8Q&SB-IMPLR %DEFVARQ&UFFIR +NULL-CSTRING-POINTER+$LBOUNDP7$$$$$&*/Users/kevin/pub/src/uffi/src/strings.lispQ&SB-C DEFINITION-SOURCE-LOCATIONRQR( $$$- QLSTRUCTURE-OBJECTR ($$$-Q&SB-SYS STRUCTURE!OBJECTR ($$$-($$$-18 %DEFMACRO CONVERT-FROM-CSTRING># BQ&SB-INTR PROPER-LIST-OF-LENGTH-PLVALUESL &OPTIONALABC&Converts a string from a c-call. Same as convert-from-foreign-string, except that LW/CMU automatically converts strings from c-calls.DLMACRO-FUNCTIONF8 CONVERT-TO-CSTRING>H# B<G<$#$?$*$ !$$$$T$$#$`(H#$GIJ,1 K$M#$M$*$ !$$$$J$`(LI,1 M(NI61OP; 2 EHeHHUHU$<HJLLEH\$HIпHKH+HP HBLEH tHEHH$<ufHQH]H\$H0H H= IH HCHCHCH0H+HP HB T  U=QI WHOLE7 ENVIRONMENT8TBUEGV8  FREE-CSTRING>X#)B?LNULL@ghiEWj8  WITH-CSTRING>l#B LIST-OF-LENGTH-AT-LEAST-P<<  BACKQ-LISTL*uEk8  WITH-CSTRINGS>#Bl#tB#BNLOCALE KEYWORD-SUPPLIED-P#BNUNSIGNED<<l< SIZE UNSIGNED  << SIGNED$ m<wx{<$#$?$*$ !$ $$$T$$#$`( #$,1 $M#$M$*$ !$ $$#*$`(,1 (@ PROBLEM69 INFO70 G7161;2EHeH7HUHU$<)HJ$<HIHMH\$HHH}HH+HP HBHUH\$HHUH= HH+HP r HHHLH $HEHHHHuH\$HHֿHeH+HP HBHuH uKH\$H0H>H=?H@HCHCHC H-0H+HP HBHEHH$<HAHEH} tfH\$HHH}HH+HP HBHHH=H HDHHuHu` O H\$HHHH=H5RHHCHHHCHHCHKHHCLCHHH+HP  T  U U= WHOLE63 ENVIRONMENT64!" E#8 %DEFUN FOREIGN-STRING-LENGTH>&#B  DEREF-ARRAYLQUOTENARRAYN UNSIGNED-CHAR*+,o%61?@; 2EHeHHH}H\$HH@H}H5=H>H+HP HBHH\$HH!H5"H H+HP HBHHH=H5 H H]HEHH]HMH HMH@u`  T=A% FOREIGN-STRINGC=DEF$$ 1G8 WITH-FOREIGN-STRING>I#CBl<<<m<]#Bl<Ho<\m<st]<$#$?$*$ !$ $$$T$$#$`(^#$\_`,1 a$M#$M$*$ !$ $$#$`(b_,1 c(d_61ef; 2EHeHuHUHU؋$<gHJHHuH\$HHֿH@H+HP HBHuH HEHH$<HIHEHP$<HRH$<HH@HEHYH u HHH}Hu` HyH\$HHHH+HP HBH\$HHH+HP HBHH\$H0HjH=SHdHCHCHC HQ0H+HP HB T  U  U=g_ WHOLE90 ENVIRONMENT91jk]E\l8$>m#uBNALLOW-OTHER-KEYS *SYSTEM-COPY-FN* %COERCE-CALLABLE-TO-FUN#xB *SAVED-FP-AND-PCS*< %TYPEP<pf~$#$?$*$ !$$$$T$$#(#$,1 $L#$L$*$ !$$,##(,1 (61;x2 EHeHHO  HP!IHbuHPHRO  IL$8HC!HIL$8H uHL%AA4AHYIH%HEHUHEHHeHHHL$HQHHHtHL%AHQHHB!IHbuHBHRHHX!IHbuHXHRHHHHT$HJHZHpIL$8HC!HIL$8H uHL%AA4AHYIH HH $<F@cl-uffi-2.1.2/src/i18n.lisp0000644000175000017500000001724211465565410014327 0ustar kevinkevin;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: i18n.lisp ;;;; Purpose: non-ASCII character support ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2010 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 by Kevin M. Rosenberg ;;;; ;;;; ************************************************************************* (in-package #:uffi) #-(or (and lispworks unicode) (and sbcl sb-unicode) (and allegro ics) (and clisp i18n) (and openmcl openmcl-unicode-strings)) (pushnew 'no-i18n cl:*features*) (defvar *default-foreign-encoding* nil "Normalized name of default external character format to use for foreign string conversions. nil means use implementation default encoding.") (defvar *foreign-encoding-mapping* #+(and lispworks unicode) '((:ascii . :ascii) (:latin-1 . :latin-1) (:ucs-2 . :unicode) (:utf-8 . :utf-8) (:jis . :jis) (:sjis . :sjis) (:gbk . :gbk)) #+(and sbcl sb-unicode) '((:ascii . :ascii) (:latin-1 . :latin-1) (:utf-8 . :utf-8) (:ucs-2 . :ucs-2) (:sjis . :sjis) (:gbk . :gbk)) #+(and allegro ics) '((:ascii . :ascii) (:latin-1 . :latin1) (:utf-8 . :utf-8) (:sjis . :shift-jis) (:euc-jp . :euc) (:gbk . :gb2313) (:ucs-2 . :unicode)) #+(and clisp unicode) '((:ascii . charset:ascii) (:ucs-2 . charset:ucs-2) (:utf-8 . charset:utf-8) (:latin-1 . charset:iso-8859-1) (:jis . charset:jis_x0201) (:jis . charset:shift-jis) (:gbk . charset:gbk) (:euc-jp . charset:euc-jp)) #+(and openmcl openmcl-unicode-strings) '((:ascii . :ascii) (:latin-1 . :iso-8859-1) (:utf-8 . :utf-8) (:ucs-2 . :ucs-2) #+nil (:euc-jp . :euc-jp) ) #-(or (and lispworks unicode) (and sbcl sb-unicode) (and allegro ics) (and clisp unicode) (and openmcl openmcl-unicode-strings)) nil "Mapping between normalized external format name and implementation name.") (defvar *foreign-encodings* (mapcar 'car *foreign-encoding-mapping*) "List of normalized names of external formats support by underlying implementation.") (defun lookup-foreign-encoding (normalized) (cdr (assoc normalized *foreign-encoding-mapping* :test 'eql))) (defmacro string-to-octets (str &key encoding null-terminate) (declare (ignorable encoding)) #-(or allegro lispworks openmcl sbcl) (map-into (make-array (length str) :element-type '(unsigned-byte 8)) #'char-code str) #+allegro (let ((fe (gensym "FE-")) (ife (gensym "IFE-")) (s (gensym "STR-")) (nt (gensym "NT-"))) `(let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe))) (,s ,str) (,nt ,null-terminate)) (values (if ,ife (excl:string-to-octets ,s :external-format ,ife :null-terminate ,nt) (excl:string-to-octets ,s :null-terminate ,nt))))) #+ccl ;; simply reading each char-code from the LENGTH of string handles ;; multibyte characters in testing with CCL 1.5 (let ((len (gensym "LEN-")) (out (gensym "OUT-"))) `(let ((,len (length ,str))) (if (,null-terminate) (progn (let ((,out (map-into (make-array (1+ ,len) :element-type '(unsigned-byte 8)) #'char-code ,str))) (setf (char ,out ,len) 0) ,out)) (map-into (make-array len :element-type '(unsigned-byte 8)) #'char-code str)))) #+lispworks ;; simply reading each char-code from the LENGTH of string handles multibyte characters ;; just fine in testing LW 6.0 and CCL 1.4 (let ((len (gensym "LEN-")) (out (gensym "OUT-"))) `(let ((,len (length ,str))) (if (,null-terminate) (progn (let ((,out (map-into (make-array (1+ ,len) :element-type '(unsigned-byte 8)) #'char-code ,str))) (setf (char ,out ,len) 0) ,out)) (map-into (make-array len :element-type '(unsigned-byte 8)) #'char-code str)))) #+sbcl (let ((fe (gensym "FE-")) (ife (gensym "IFE-")) (s (gensym "STR-")) (nt (gensym "NT-"))) `(let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe))) (,s ,str) (,nt ,null-terminate)) (if ,ife (sb-ext:string-to-octets ,s :external-format ,ife :null-terminate ,nt) (sb-ext:string-to-octets ,s :null-terminate ,nt)))) ) (defmacro octets-to-string (octets &key encoding) "Converts a vector of octets to a Lisp string." (declare (ignorable encoding)) #-(or allegro lispworks openmcl sbcl) (let ((out (gensym "OUT-")) (code (gensym "CODE-"))) `(with-output-to-string (,out) (loop for ,code across ,octets do (write-char (code-char ,code) ,out)))) #+allegro (let ((fe (gensym "FE-")) (ife (gensym "IFE-")) (oct (gensym "OCTETS-"))) `(let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe))) (,oct ,octets)) (values (if ,ife (excl:octets-to-string ,oct :external-format ,ife) (excl:octets-to-string ,oct))))) #+lispworks ;; With LW 6.0, writing multibyte character just one octet at a time ;; produces expected formatted output, but strings lengths are too ;; long and consists only of octets, not wide characters ;; ;; Below technique of using fli:convert-from-foreign-string works tp ;; correctly create string of wide-characters. However, errors occur ;; during formatted printing of such strings with an error such as ;; "#\U+30D3 is not of type BASE-CHAR" (let ((fe (gensym "FE-")) (ife (gensym "IFE-")) (oct (gensym "OCTETS-"))) `(let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe))) (,oct ,octets)) (fli:with-dynamic-foreign-objects ((ptr (:unsigned :byte) :initial-contents (coerce ,oct 'list))) (fli:convert-from-foreign-string ptr :length (length ,oct) :null-terminated-p nil :external-format ,ife)))) #+(or ccl openmcl) ;; With CCL 1.5, writing multibyte character just one octet at a time tests fine (let ((out (gensym "OUT-")) (code (gensym "CODE-"))) `(with-output-to-string (,out) (loop for ,code across ,octets do (write-char (code-char ,code) ,out)))) #+sbcl (let ((fe (gensym "FE-")) (ife (gensym "IFE-")) (oct (gensym "OCTETS-"))) `(let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe))) (,oct ,octets)) (if ,ife (sb-ext:octets-to-string ,oct :external-format ,ife) (sb-ext:octets-to-string ,oct)))) ) (defun foreign-encoded-octet-count (str &key encoding) "Returns the octets required to represent the string when passed to a ~ foreign function." (declare (ignorable encoding)) ;; AllegroCL 8-bit, CCL, and Lispworks give correct value without converting ;; to external-format. AllegroCL 16-bit, SBCL, and CLISP requires conversion ;; with external-format #+(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n)) (length (string-to-octets str :encoding (or encoding *default-foreign-encoding*))) #-(or (and allegro ics) (and sbcl sb-unicode) (and clisp i18n)) (length str) ) cl-uffi-2.1.2/src/strings.lisp0000644000175000017500000004471611674246037015252 0ustar kevinkevin;;;; -*- Mode: Lisp; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: strings.lisp ;;;; Purpose: UFFI source to handle strings, cstrings, and foreigns ;;;; Programmer: Kevin M. Rosenberg ;;;; Date Started: Feb 2002 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) (declare (ignorable 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 (defun %convert-to-foreign-string (str encoding) (declare (ignorable str encoding)) #+(or cmu scl) (etypecase str (null (alien:sap-alien (system:int-sap 0) (* (alien:unsigned 8)))) (string (locally (declare (optimize (speed 3) (safety 0))) (let* ((size (length str)) (storage (alien:make-alien (alien:unsigned 8) (1+ size)))) (declare (fixnum size)) (setq storage (alien:cast storage (* (alien:unsigned 8)))) (dotimes (i size) (declare (fixnum i)) (setf (alien:deref storage i) (char-code (char str i)))) (setf (alien:deref storage size) 0) storage)))) #+(and sbcl (not sb-unicode)) (etypecase str (null (sb-alien:sap-alien (sb-sys:int-sap 0) (* (sb-alien:unsigned 8)))) (string (locally (declare (optimize (speed 3) (safety 0))) (let* ((size (length str)) (storage (sb-alien:make-alien (sb-alien:unsigned 8) (1+ size)))) (declare (fixnum i)) (setq storage (sb-alien:cast storage (* (sb-alien:unsigned 8)))) (dotimes (i size) (declare (fixnum i)) (setf (sb-alien:deref storage i) (char-code (char str i)))) (setf (sb-alien:deref storage size) 0)) storage))) #+(and sbcl sb-unicode) (etypecase str (null (sb-alien:sap-alien (sb-sys:int-sap 0) (* (sb-alien:unsigned 8)))) (string (locally (declare (optimize (speed 3) (safety 0))) (let* ((fe (or encoding *default-foreign-encoding* sb-impl::*default-external-format*)) (ife (when fe (lookup-foreign-encoding fe)))) (if ife (let* ((octets (sb-ext:string-to-octets str :external-format ife)) (size (length octets)) (storage (sb-alien:make-alien (sb-alien:unsigned 8) (+ size 2)))) (declare (fixnum size)) (setq storage (sb-alien:cast storage (* (sb-alien:unsigned 8)))) (dotimes (i size) (declare (fixnum i)) (setf (sb-alien:deref storage i) (aref octets i))) ;; terminate with 2 nulls, maybe needed for some encodings (setf (sb-alien:deref storage size) 0) (setf (sb-alien:deref storage (1+ size)) 0) storage) (let* ((size (length str)) (storage (sb-alien:make-alien (sb-alien:unsigned 8) (1+ size)))) (declare (fixnum size)) (setq storage (sb-alien:cast storage (* (sb-alien:unsigned 8)))) (dotimes (i size) (declare (fixnum i)) (setf (sb-alien:deref storage i) (char-code (char str i)))) (setf (sb-alien:deref storage size) 0) storage)))))) #+(and openmcl openmcl-unicode-strings) (if (null str) +null-cstring-pointer+ (locally (declare (optimize (speed 3) (safety 0))) (let* ((fe (or encoding *default-foreign-encoding*)) (ife (when fe (lookup-foreign-encoding fe)))) (if ife (let* ((octets (ccl:encode-string-to-octets str :external-format ife)) (size (length octets)) (ptr (new-ptr (+ size 2)))) (declare (fixnum size)) (dotimes (i size) (declare (fixnum i)) (setf (ccl:%get-unsigned-byte ptr i) (svref octets i))) (setf (ccl:%get-unsigned-byte ptr size) 0) (setf (ccl:%get-unsigned-byte ptr (1+ size)) 0) ptr) (let ((ptr (new-ptr (1+ (length str))))) (ccl::%put-cstring ptr str) ptr))))) #+(or digitool (and openmcl (not openmcl-unicode-strings))) (if (null str) +null-cstring-pointer+ (let ((ptr (new-ptr (1+ (length str))))) (ccl::%put-cstring ptr str) ptr)) #+(or allegro lispworks) nil ) (defmacro convert-to-foreign-string (obj &optional encoding) (declare (ignorable encoding)) #+allegro (let ((stored (gensym "STR-")) (fe (gensym "FE-")) (ife (gensym "IFE-"))) `(let* ((,stored ,obj) (,fe (or encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe)))) (cond ((null ,stored) 0) ((null ,ife) (values (excl:string-to-native ,stored))) (t (values (excl:string-to-native ,stored :external-format ,ife)))))) #+lispworks (let ((stored (gensym "STR-")) (fe (gensym "EF-")) (ife (gensym "NEF-"))) `(let* ((,stored ,obj) (,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe)))) (cond ((null ,stored) +null-cstring-pointer+) ((null ,ife) (fli:convert-to-foreign-string ,stored)) (t (fli:convert-to-foreign-string ,stored :external-format ,ife))))) #+(or cmu scl sbcl digitool openmcl) `(%convert-to-foreign-string ,obj (lookup-foreign-encoding (or ,encoding *default-foreign-encoding*))) ) ;; Either length or null-terminated-p must be non-nil (defmacro convert-from-foreign-string (obj &key length encoding (null-terminated-p t)) (declare (ignorable length encoding null-terminated-p)) #+allegro (let ((stored-obj (gensym "STR-")) (fe (gensym "FE-")) (ife (gensym "IFE-"))) `(let ((,stored-obj ,obj)) (if (zerop ,stored-obj) nil (let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe)))) (if ,ife (values (excl:native-to-string ,stored-obj ,@(when length (list :length length)) :truncate (not ,null-terminated-p) :external-format ,ife)) (fast-native-to-string ,stored-obj ,length)))))) #+lispworks #| ;; FAST-NATIVE-TO-STRING (suprisingly) works just fine to make strings ;; for formatted printing with Lispworks and UTF-8 multibyte character strings. ;; However, without knowledge of specific-encoding, the LENGTH call in FAST-NATIVE-TO-STRING ;; will be be incorrect for some encodings/strings and strings consist of octets rather ;; than wide characters ;; This is a stop-gap until get tech support on why the below fails. (let ((stored-obj (gensym "STR-"))) `(let ((,stored-obj ,obj)) (if (fli:null-pointer-p ,stored-obj) nil (fast-native-to-string ,stored-obj ,length)))) |# #| ;; Below code doesn't work on tesing with LW 6.0 testing with a UTF-8 string. ;; fli:convert-from-foreign-string with :external-format of :UTF-8 doesn't ;; properly code multibyte characters. |# (let ((stored-obj (gensym "STR-")) (fe (gensym "FE-")) (ife (gensym "IFE-"))) `(let ((,stored-obj ,obj)) (if (fli:null-pointer-p ,stored-obj) nil (let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe)))) (if ,ife (fli:convert-from-foreign-string ,stored-obj ,@(when length (list :length length)) :null-terminated-p ,null-terminated-p :external-format (list ,ife :eol-style :lf)) (fast-native-to-string ,stored-obj ,length)))))) #+(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)))) #+(and sbcl (not sb-unicode)) (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)))) #+(and sbcl sb-unicode) (let ((stored-obj (gensym "STR-")) (fe (gensym "FE-")) (ife (gensym "IFE-"))) `(let ((,stored-obj ,obj)) (if (null-pointer-p ,stored-obj) nil (let* ((,fe (or ,encoding *default-foreign-encoding*)) (,ife (when ,fe (lookup-foreign-encoding ,fe)))) (sb-alien::c-string-to-string (sb-alien:alien-sap ,stored-obj) (or ,ife sb-impl::*default-external-format* :latin-1) 'character))))) #+(or openmcl digitool) (let ((stored-obj (gensym "STR-")) (fe (gensym "FE-"))) `(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 (let ((,fe (or ,encoding *default-foreign-encoding*))) (case ,fe (:utf-8 (ccl::%get-utf-8-cstring ,stored-obj)) (:ucs-2 (ccl::%get-native-utf-16-cstring ,stored-obj)) (t ,@(if length `((ccl:%str-from-ptr ,stored-obj ,length)) `((ccl:%get-cstring ,stored-obj))))))))) ) (defmacro allocate-foreign-string (size &key (unsigned t)) (declare (ignorable unsigned)) #+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 `(ff:allocate-fobject :char :c ,size) #+(or openmcl digitool) `(new-ptr ,size) ) (defun foreign-string-length (foreign-string) #+allegro (ff:foreign-strlen foreign-string) #-allegro (loop for size from 0 until (zerop (deref-array foreign-string '(:array :unsigned-char) size)) finally (return size))) (defmacro with-foreign-string ((foreign-string lisp-string &optional encoding) &body body) (let ((result (gensym)) (fe (gensym))) `(let* ((,fe ,encoding) (,foreign-string (convert-to-foreign-string ,lisp-string ,fe)) (,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))) (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) (not lispworks6))) (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 lispworks6) (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)))))) cl-uffi-2.1.2/tests/0000755000175000017500000000000011674246130013221 5ustar kevinkevincl-uffi-2.1.2/tests/arrays.lisp0000644000175000017500000000417511333325171015415 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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)) cl-uffi-2.1.2/tests/atoifl.lisp0000644000175000017500000000211611333325106015361 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/casts.lisp0000644000175000017500000000310211333325076015222 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2003-2010 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) cl-uffi-2.1.2/tests/compress.lisp0000644000175000017500000000630111333324757015751 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") cl-uffi-2.1.2/tests/foreign-loader.lisp0000644000175000017500000000320111333672146017005 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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/lib32/" "/opt/local/lib/" "/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")) cl-uffi-2.1.2/tests/foreign-var.lisp0000644000175000017500000000531511333707025016332 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2003-2010 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) cl-uffi-2.1.2/tests/getenv.lisp0000644000175000017500000000350511333324730015400 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") cl-uffi-2.1.2/tests/gethostname.lisp0000644000175000017500000000334211333324721016425 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/i18n.lisp0000644000175000017500000000565611335141324014676 0ustar kevinkevin;;;; -*- Mode: LISP; Syntax: ANSI-Common-Lisp; Base: 10 -*- ;;;; ************************************************************************* ;;;; FILE IDENTIFICATION ;;;; ;;;; Name: i18n.lisp ;;;; Purpose: UFFI test file of i18n functions ;;;; Author: Kevin M. Rosenberg ;;;; Date Started: Feb 2010 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2010 by Kevin M. Rosenberg ;;;; ;;;; ************************************************************************* (in-package #:uffi-tests) (deftest :i18n/sto/1 (uffi:string-to-octets "") #()) (deftest :i18n/sto/2 (uffi:string-to-octets "A") #(65)) (deftest :i18n/sto/3 (uffi:string-to-octets "abc") #(97 98 99)) (deftest :i18n/sto/4 (uffi:string-to-octets "abc" :null-terminate t) #(97 98 99 0)) ;; Below is UTF-8 encoded, 27 octets / 20 lisp characters (deftest :i18n/sto/5 (uffi:string-to-octets "Iñtërnâtiônàlizætiøn" :encoding :utf-8) #(73 195 177 116 195 171 114 110 195 162 116 105 195 180 110 195 160 108 105 122 195 166 116 105 195 184 110)) (deftest :i18n/sto/6 (uffi:string-to-octets "Iñtërnâtiônàlizætiøn" :encoding :utf-8 :null-terminate t) #(73 195 177 116 195 171 114 110 195 162 116 105 195 180 110 195 160 108 105 122 195 166 116 105 195 184 110 0)) (deftest :i18n/lsto/1 (length (uffi:string-to-octets "Iñtërnâtiônàlizætiøn" :encoding :utf-8)) 27) (deftest :i18n/lsto/2 (length (uffi:string-to-octets "Iñtërnâtiônàlizætiøn" :encoding :utf-8 :null-terminate t)) 28) (deftest :i18n/feoc/1 (uffi:foreign-encoded-octet-count "") 0) (deftest :i18n/feoc/2 (uffi:foreign-encoded-octet-count "A") 1) (deftest :i18n/feoc/3 (uffi:foreign-encoded-octet-count "abc") 3) (deftest :i18n/feoc/4 (uffi:foreign-encoded-octet-count "Iñtërnâtiônàlizætiøn" :encoding :utf-8) 27) (deftest :i18n/ots/1 (let ((octets '())) (uffi:octets-to-string (make-array (list (length octets)) :element-type '(unsigned-byte 8) :initial-contents octets))) "") (deftest :i18n/ots/2 (let ((octets '(65))) (uffi:octets-to-string (make-array (list (length octets)) :element-type '(unsigned-byte 8) :initial-contents octets))) "A") (deftest :i18n/ots/3 (let ((octets '(97 98 99))) (uffi:octets-to-string (make-array (list (length octets)) :element-type '(unsigned-byte 8) :initial-contents octets))) "abc") (deftest :i18n/ots/4 (let ((octets '(73 195 177 116 195 171 114 110 195 162 116 105 195 180 110 195 160 108 105 122 195 166 116 105 195 184 110))) (uffi:octets-to-string (make-array (list (length octets)) :element-type '(unsigned-byte 8) :initial-contents octets) :encoding :utf-8)) "Iñtërnâtiônàlizætiøn") cl-uffi-2.1.2/tests/make.sh0000644000175000017500000000230711015741033014463 0ustar kevinkevin#!/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 cl-uffi-2.1.2/tests/Makefile0000644000175000017500000000113311333324712014652 0ustar kevinkevin# FILE IDENTIFICATION # # Name: Makefile # Purpose: Makefile for UFFI examples # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # # This file, part of UFFI, is Copyright (c) 2002-2010 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 cl-uffi-2.1.2/tests/Makefile.msvc0000644000175000017500000000074011333324702015623 0ustar kevinkevin# FILE IDENTIFICATION # # Name: Makefile.msvc # Purpose: Makefile for the CLSQL UFFI helper package (MSVC) # Programer: Kevin M. Rosenberg # Date Started: Mar 2002 # # This file, part of CLSQL, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/objects.lisp0000644000175000017500000000412011333324667015544 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2003-2010 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") cl-uffi-2.1.2/tests/package.lisp0000644000175000017500000000117311333324660015504 0ustar kevinkevin;;;; -*- 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-2010 by Kevin M. Rosenberg ;;;; ;;;; ************************************************************************* (defpackage #:uffi-tests (:use #:asdf #:cl #:uffi #:rtest) (:shadowing-import-from #:uffi #:run-shell-command)) (in-package #:uffi-tests) cl-uffi-2.1.2/tests/rt.lisp0000644000175000017500000002147411015741033014536 0ustar kevinkevin#|----------------------------------------------------------------------------| | 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)))) cl-uffi-2.1.2/tests/strtol.lisp0000644000175000017500000000427511333324647015453 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/structs.lisp0000644000175000017500000000152411333324637015624 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/time.lisp0000644000175000017500000000576711333324625015065 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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") cl-uffi-2.1.2/tests/uffi-c-test-lib.lisp0000644000175000017500000000602611333324615017005 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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) cl-uffi-2.1.2/tests/uffi-c-test.c0000644000175000017500000000505611333324605015515 0ustar kevinkevin/*************************************************************************** * FILE IDENTIFICATION * * Name: c-test-fns.c * Purpose: Test functions in C for UFFI library * Programer: Kevin M. Rosenberg * Date Started: Mar 2002 * * This file, part of UFFI, is Copyright (c) 2002-2010 by Kevin M. Rosenberg * * These variables are correct for GCC * you'll need to modify these for other compilers ***************************************************************************/ #if defined(WIN32)||defined(WIN64) #include BOOL WINAPI DllEntryPoint(HINSTANCE hinstdll, DWORD fdwReason, LPVOID lpvReserved) { return 1; } #define DLLEXPORT __declspec(dllexport) #else #define DLLEXPORT #endif #include #include #include 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; } cl-uffi-2.1.2/tests/uffi-c-test.dylib0000755000175000017500000002213011333646560016400 0ustar kevinkevin(__TEXT__text__TEXT  __symbol_stub1__TEXT  __const__TEXT  __stub_helper__TEXT 0 __eh_frame__TEXT   `__DATA__dyld__DATA__nl_symbol_ptr__DATA__la_symbol_ptr__DATA __data__DATA@0@H__LINKEDIT  XzDYJ- !X" P0" ASLAS%%UHH H}EH}t/HE*tEHEHEuۋEEEEUHH}}UHH }Hu}Dt$EHRHD (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")) (:file "i18n" :depends-on ("package")) )))) (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"))) cl-uffi-2.1.2/uffi.asd0000644000175000017500000000361611363370023013501 0ustar kevinkevin;;;; -*- 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 ;;;; ;;;; This file, part of UFFI, is Copyright (c) 2002-2010 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 " :version "2.0.0" :maintainer "Kevin M. Rosenberg " :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 "i18n" :depends-on ("package")) (:file "primitives" :depends-on ("i18n")) #+(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" #+(or openmcl digitool) "readmacros-mcl")) (: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)) cl-uffi-2.1.2/ChangeLog0000644000175000017500000003617111673670013013641 0ustar kevinkevin2011-12-20 Kevin Rosenberg * src/strings.lisp: Improvments for sb-unicode from Elias Martenson 2010-10-20 Kevin Rosenberg * src/{strings,i18n}.lisp: Rework foreign string conversion for Lispworks so that wide-character strings are produced (rather than strings of octets) 2010-04-20 Kevin Rosenberg * Version 2.0.0 * uffi.asdf: Update version so libraries using UFFI can depend on verson 2.0 for new foreign encoding conversions. * src/i18n.lisp: Add null-terminate to STRING-TO-OCTETS * tests/i18n.lisp: Add new tests 2010-02-11 Kevin Rosenberg * Version 1.8.6 * src/strings.lisp: Standards on :encoding keyword parameter 2010-02-08 Kevin Rosenberg * Version 1.8.5 * src/primitives.lisp: Fix for long-long patch (Stelian Ionescu) * src/i18n.lisp: Changed logic of how to deal with an passed encoding value of il. 2010-02-08 Kevin Rosenberg * Version 1.8.4 * sql/primitives.lisp: Improved detection for availability of long-long integer for CMU. (Thanks to Stelian Ionescu) * sql/i18n.lisp: Changes in how ignored variables are declared (Stelian Ionescu) 2010-02-08 Kevin Rosenberg * Version 1.8.3 * sql/strings.liap: Commit patch from with fixes for recent changes with i18n as well as reworking how ignored variables are declared. 2010-02-07 Kevin Rosenberg * Version 1.8.2 * src/i18n.lisp: Rename function to foreign-encoded-octet-count. Fix errors. * tests/i18n.lisp: New file. i18n tests fine on AllegroCL 8/16 bits, SBCL unicode/non-unicode, CCL, and Lispworks 6 * src/strings.lisp: Fix an error with decoding strings on CCL. 2010-02-06 Kevin Rosenberg * src/i18n.lisp: Add new function string-to-octets 2010-02-06 Kevin Rosenberg * Version 1.8.1 * src/i18n.lisp: Add new function foreign-encoded-string-octets 2010-02-06 Kevin Rosenberg * Version 1.8.0 * src/strings.lisp: Initial support for external-formats with foreign strings. 2010-02-05 Kevin Rosenberg * Version 1.7.3 * src/primitives.lisp: Fix symbol name 2010-02-05 Kevin Rosenberg * Version 1.7.2 * src/i18n.lisp: New file for supporting non-ASCII foreign strings. 2010-01-29 Kevin Rosenberg * Version 1.7.1 * src/primitives.lisp: Add :long-long and :unsigned-long-long for lisp implementations that support it. Push uffi:no-long-long on cl:*features* for lisp implementations that don't support it. 2010-01-28 Kevin Rosenberg * Version 1.7.0 * src/{functions.lisp,objects.lisp,strings.lisp}: Support Lispworks 6 2007-09-17 Kevin Rosenberg * doc/Makefile, doc/html.xsl: Change output encoding from ISO-8859-1 to UTF-8 2007-07-22 Kevin Rosenberg * 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 * Version 1.5.18 * src/functions.lisp: Patch from Ian Eslick for Lispworks 5 2006-10-10 Kevin Rosenberg * Version 1.5.17 * src/functions.lisp: Patch from Edi Weitz for Lispworks 5/Linux 2006-09-02 Kevin Rosenberg * Version 1.5.16 * src/libraries.lisp: Add cygwin support 2006-08-13 Kevin Rosenberg * Version 1.5.15 * src/{objects,strings}.lisp: Add support for Lispworks 5 thanks to patches from Bill Atkins 2006-07-04 Kevin Rosenberg * Version 1.5.14 * src/{objects,strings}.lisp: Apply patch from Edi Weitz 2006-05-17 Kevin Rosenberg * Version 1.5.13 * src/libraries.lisp: Revert buggy patch from Yaroslav Kavenchuk. 2006-05-17 Kevin Rosenberg * Version 1.5.12 * src/libraries.lisp: Patch from Yaroslav Kavenchuk to set default drive letters on MS Windows. 2006-05-11 Kevin Rosenberg * 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 * Version 1.5.10: Commit patch from Gary King for openmcl's feature list change 2005-11-14 Kevin Rosenberg * Version 1.5.7 * src/strings.lisp: Add with-foreign-strings by James Biel 2005-11-14 Kevin Rosenberg * Version 1.5.6 * src/os.lisp: Remove getenv setter 2005-11-07 Kevin Rosenberg * Version 1.5.5 * src/os.lisp: Add support for getenv getter and setter 2005-09-17 Kevin Rosenberg * Version 1.5.4 * src/objects.lisp: prepend _ character for entry point on Allegro macosx, patch by Luis Oliveira 2005-07-05 Kevin Rosenberg * Version 1.5.0 * Remove vestigial LLGPL license notices as UFFI as been BSD-licensed for several years. 2005-06-09 Kevin Rosenberg * 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 * 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 * Version 1.4.37 * src/strings.lisp: Fix variable name 2005-04-04 Kevin Rosenberg * src/strings.lisp, src/aggregates.lisp: Support change in SBCL copy function [Thanks for Nathan Froyd and Zach Beane] 2005-04-03 Kevin Rosenberg * src/objects.lisp: Commit patch from James Bielman to add def-foreign-var support for OpenMCL 2005-03-03 Kevin Rosenberg * 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 * src/primitives.lisp, src/strings.lisp: Better support for sb-unicode [from Yoshinori Tahara and R. Mattes] 2005-01-22 Kevin Rosenberg * src/primitives.lisp: Better support SBCL-AMD64 2004-11-08 Kevin Rosenberg * src/strings.lisp: Better support sb-unicode * tests/compress.lisp: Support sb-unicode 2004-10-07 Kevin Rosenberg * src/objects.lisp: Add new function: convert-from-foreign-usb8 2004-04-15 Kevin Rosenberg * src/objects.lisp: Add new functions: MAKE-POINTER and POINTER-ADDRESS 2004-04-13 Kevin Rosenberg * src/string.lisp: Add new FOREIGN-STRING-LENGTH 2003-08-15 Kevin Rosenberg * Added with-cast-pointer and def-foreign-var (patches submitted by Edi Weitz). * Added many new tests 2002-10-16 Kevin Rosenberg * Added support for SBCL and SCL 2002-09-29 Kevin Rosenberg * Numerous changes in openmcl support (uffi now supports clsql on openmcl) 2002-09-19 Kevin Rosenberg - 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 - Restructure directories to move to a asdf definition file without pathnames. 2002-08-25 Kevin Rosenberg - Restructure directories to attempt to properly handle both Common Lisp Controller and non-CLC systems 2002-08-17 Kevin Rosenberg - add uffi.asd for ASDF users 2002-08-01 Kevin Rosenberg - Restructure directories to improve Common Lisp Controller v3 compatibility 2002-07-25 Kevin Rosenberg - Rework handling of logical pathnames. - Move run-examples.cl to examples directory. 2002-06-28 Kevin Rosenberg - Added size-of-foreign-type function. 2002-06-26 Kevin Rosenberg - Fix bug in Lispworks allocate-foreign-object - Added new :unsigned-byte type. Made :byte signed. 2002-04-27 Kevin Rosenberg - misc files First debian version 2002-04-23 Kevin Rosenberg - doc/* Updated to debian docbook catalog 2002-04-23 John DeSoi (desoi@mac.com) * src/mcl/* Improved MCL support 2002-04-06 Kevin Rosenberg * 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 * 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 * 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 * 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 * 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 * src/objects.cl: Fixed bug in deref-pointer (Thanks John Desoi!) 2002-03-22 Kevin Rosenberg * 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