NextPrevTopIndex

Contents

Preface

1 Introduction to the FLI

1.1 An example of how to interface a foreign function

1.1.1 Defining the FLI function

1.1.2 Loading foreign code

1.1.3 Calling foreign code

1.2 Using the FLI to get the cursor position

1.2.1 Defining FLI types

1.2.2 Defining an FLI function

1.2.3 Accessing the results

1.3 Using the FLI to set the cursor position

1.4 An example of dynamic memory allocation

1.5 Summary

2 FLI Types

2.1 Immediate types

2.1.1 Integral types

2.1.2 Floating point types

2.1.3 Character types

2.1.4 Boolean types

2.1.5 Pointer types

2.2 Aggregate types

2.2.1 Arrays

2.2.2 Strings

2.2.3 Structures and unions

2.3 Parameterized types

2.4 Encapsulated types

2.4.1 Passing Lisp objects to C

2.4.2 An example

2.5 The void type

2.6 Summary

3 FLI Pointers

3.1 Creating and copying pointers

3.2 Pointer testing functions

3.3 Pointer dereferencing and coercing

3.4 An example of dynamic pointer allocation

3.5 More examples of allocation and pointer allocation

3.6 Summary

4 Advanced Uses of the FLI

4.1 Passing a string to a Windows function

4.2 Modifying, passing and returning strings

4.2.1 Use of Reference Arguments

4.2.2 Modifying a string in a C function

4.2.3 Passing a constant string

4.2.4 Returning a string via a buffer

4.2.5 Foreign string encodings

4.2.6 Foreign string line terminators

4.2.7 Mapping Nil to a Null Pointer

4.3 Defining new types

4.4 Foreign callables and foreign functions

4.5 Using DLLs within the LispWorks FLI

4.5.1 Using C DLLs

4.5.2 Using C++ DLLs

4.6 Interfacing to graphics functions

4.7 Summary

5 Function and Macro Reference

6 Type Reference

7 The Foreign Parser

7.1 Introduction

7.2 Loading the Foreign Parser

7.3 Using the Foreign Parser

7.4 Using the LispWorks Editor

7.4.1 Processing Foreign Code with the Editor

7.4.2 Compiling and Loading Foreign Code with the Editor

7.5 Foreign Parser Reference

Glossary

Index

 


LispWorks Foreign Language Interface User Guide and Reference Manual - 27 Mar 2005

NextPrevTopIndex