Clean up whitespace
This commit is contained in:
parent
61fc3061a1
commit
a9537cd94b
|
@ -12,16 +12,16 @@
|
|||
; At the outset, everything in the .ffi file is marked as referenced.
|
||||
; The mechanisms for excluding stuff are based on an item's name.
|
||||
|
||||
; exclude-file takes a file name or list of file names and excludes every
|
||||
; exclude-file takes a file name or list of file names and excludes every
|
||||
; item defined in that file and files included by it.
|
||||
|
||||
(exclude-file '())
|
||||
|
||||
; exclude-structure takes a structure name (i.e. either "struct FOO"
|
||||
; or "union FOO" or "FOO") or list of names and inhibits generation of
|
||||
; constructors, destructors, accessors, and mutators for it and all
|
||||
; typedefs derived from it. If the name is a typedef name and the
|
||||
; structure named has a compiler-generated tag, then the structure
|
||||
; constructors, destructors, accessors, and mutators for it and all
|
||||
; typedefs derived from it. If the name is a typedef name and the
|
||||
; structure named has a compiler-generated tag, then the structure
|
||||
; named by this typedef is also excluded.
|
||||
|
||||
(exclude-structure "FILE")
|
||||
|
@ -41,11 +41,11 @@
|
|||
|
||||
; Override-prototype gives the named function a new prototype.
|
||||
|
||||
(override-prototype "fgets"
|
||||
(override-prototype "fgets"
|
||||
`(function (,(primitive-type 'string)
|
||||
,(primitive-type 'int)
|
||||
,(pointer-type (struct-type "FILE")))
|
||||
,(pointer-type (primitive-type 'char))))
|
||||
,(primitive-type 'int)
|
||||
,(pointer-type (struct-type "FILE")))
|
||||
,(pointer-type (primitive-type 'char))))
|
||||
|
||||
|
||||
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
|
||||
|
@ -73,7 +73,7 @@
|
|||
; values. Values are: warning, alloc-new, and pass-placeholder. If alloc-new
|
||||
; is the value, then a proxy function will be generated which receives
|
||||
; the return value, allocates an object on the heap for it, copies the value
|
||||
; into the allocated memory, and returns a pointer to the memory.
|
||||
; into the allocated memory, and returns a pointer to the memory.
|
||||
; If pass-placeholder is the value, then a FF and proxy will be generated
|
||||
; that take an extra argument (the first); that argument must be a pointer
|
||||
; to a structure in which to place the value.
|
||||
|
|
|
@ -14,10 +14,10 @@ FFIGEN (Foreign Function Interface GENerator) is a program suite that
|
|||
facilitates the writing of translators from C header files to foreign
|
||||
function interfaces for particular language implementations.
|
||||
|
||||
<P>
|
||||
<P>
|
||||
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
FFIGEN Manifesto and Overview
|
||||
FFIGEN Manifesto and Overview
|
||||
<A href="manifesto.html">(HTML)</a> <A href="manifesto.ps.gz">(ps.gz, 26 KB)</A>
|
||||
<BR>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
|
@ -26,7 +26,7 @@ FFIGEN User's Manual
|
|||
<BR>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
FFIGEN Back-end for Chez Scheme Version 5
|
||||
<A href="chez.ps.gz">(ps.gz, 52 KB)</A>
|
||||
<A href="chez.ps.gz">(ps.gz, 52 KB)</A>
|
||||
|
||||
<P>
|
||||
There are three motivating observations behind FFIGEN. The first is
|
||||
|
@ -56,7 +56,7 @@ FFIGEN is a system that implements the split-translation philosophy.
|
|||
<UL>
|
||||
|
||||
<LI>The FFIGEN front-end is based on the front-end of the freely
|
||||
available, production quality, ANSI C compiler <em>lcc</em>. Using
|
||||
available, production quality, ANSI C compiler <em>lcc</em>. Using
|
||||
<em>lcc</em> makes
|
||||
the FFIGEN front end portable, complete, and extensible for special
|
||||
purposes.
|
||||
|
@ -76,20 +76,20 @@ build on.
|
|||
<P>
|
||||
|
||||
The current version of FFIGEN is available as a set of modifications to
|
||||
<em>lcc</em> version 3.4b; you also need to get the <em>lcc</em> sources.
|
||||
<em>lcc</em> version 3.4b; you also need to get the <em>lcc</em> sources.
|
||||
The FFIGEN
|
||||
distribution includes documentation on how to write back-ends and a
|
||||
documented example back-end for the FFI of Chez Scheme version 5.
|
||||
|
||||
<P>
|
||||
<B> This is a preliminary release of FFIGEN. It works, but
|
||||
<B> This is a preliminary release of FFIGEN. It works, but
|
||||
is neither complete nor polished.</B>
|
||||
|
||||
<P>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
Click <A href="ffigen.tar.gz">here</A> to download the
|
||||
full FFIGEN distribution. (148 KB)
|
||||
<BR>
|
||||
Click <A href="ffigen.tar.gz">here</A> to download the
|
||||
full FFIGEN distribution. (148 KB)
|
||||
<BR>
|
||||
This archive has not been updated with the fixes in the bug fix file (below).
|
||||
<P>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
|
@ -98,15 +98,15 @@ Fixes to chez.sch to handle structs/unions that are declared but not
|
|||
defined; function pointers; and unsigned shorts (a typo). Also a minor fix
|
||||
to policy.sch to remove gratuitous non-standard-ness (use of reverse! rather
|
||||
than reverse). Also included generated standard libraries for Chez Scheme
|
||||
back-end (unknowingly left out of distribution). Unpack in <em>lcc</em> main
|
||||
back-end (unknowingly left out of distribution). Unpack in <em>lcc</em> main
|
||||
directory.
|
||||
<P>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
Click <A href="chez-policy.sch">here</A> to download an example of a Chez
|
||||
Click <A href="chez-policy.sch">here</A> to download an example of a Chez
|
||||
Scheme policy file, left out of distribution.
|
||||
<P>
|
||||
<img src="../ball.red.gif" alt="*">
|
||||
Click <A href="lcc-3.4b.tar.gz">here</A> to download the <em>lcc</em>
|
||||
Click <A href="lcc-3.4b.tar.gz">here</A> to download the <em>lcc</em>
|
||||
3.4b distribution.
|
||||
(965 KB)
|
||||
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
<!-- -*- mode: html; mode: font-lock -*-
|
||||
|
||||
Hand-translated from LaTeX to HTML by lth on 2000-05-16,
|
||||
converted footnotes to in-line text, and inserted hyperlinks.
|
||||
Hand-translated from LaTeX to HTML by lth on 2000-05-16,
|
||||
converted footnotes to in-line text, and inserted hyperlinks.
|
||||
No other changes. -->
|
||||
|
||||
|
||||
<html>
|
||||
<head>
|
||||
<title>FFIGEN Manifesto and Overview</title>
|
||||
|
@ -123,8 +123,8 @@ translate <tt>char*</tt> as <tt>string</tt>, we end up with (since
|
|||
|
||||
<pre>
|
||||
(define fgets
|
||||
(foreign-function "fgets"
|
||||
(string integer-32 unsigned-32)
|
||||
(foreign-function "fgets"
|
||||
(string integer-32 unsigned-32)
|
||||
string))
|
||||
</pre>
|
||||
|
||||
|
@ -134,7 +134,7 @@ translate as:
|
|||
|
||||
<pre>
|
||||
(define fgets
|
||||
(foreign-function "fgets"
|
||||
(foreign-function "fgets"
|
||||
(unsigned-32 integer-32 unsigned-32)
|
||||
unsigned-32))
|
||||
</pre>
|
||||
|
|
|
@ -14,7 +14,7 @@ Updated 14 June 2000.
|
|||
|
||||
<UL>
|
||||
<LI> Full ANSI C support:
|
||||
<UL>
|
||||
<UL>
|
||||
<LI> [done] Bitfields.
|
||||
<LI> General support for type qualifiers.
|
||||
</UL>
|
||||
|
@ -23,9 +23,9 @@ Updated 14 June 2000.
|
|||
<LI> Output structure field offsets.
|
||||
<LI> Output line and column information.
|
||||
<LI> Retain and output comments.
|
||||
<LI> Output source file information (the name of the input file to
|
||||
<LI> Output source file information (the name of the input file to
|
||||
<code>lcc -ffigen</code>); this can
|
||||
be useful since the back end can generate C files which
|
||||
be useful since the back end can generate C files which
|
||||
<code>#includes</code> the source header file.
|
||||
<LI> Support certain extensions: Microsoft __huge, __near, __far, __based,
|
||||
__cdecl, __pascal; GNU __inline; others?
|
||||
|
@ -39,7 +39,7 @@ Updated 14 June 2000.
|
|||
as far as possible, and extraneous cruft should be removed so that the
|
||||
back end can produce better translations.
|
||||
<LI> Support for some form of tokenized macros to support certain regular
|
||||
and nice rewrites? C libraries like Open Inventor use macros
|
||||
and nice rewrites? C libraries like Open Inventor use macros
|
||||
heavily in a virtual-function like style:
|
||||
<pre>
|
||||
#define SoSphSetOverride(_this, state) \
|
||||
|
@ -55,7 +55,7 @@ Updated 14 June 2000.
|
|||
<LI> [done] Move to lcc 3.6.
|
||||
<LI> [done] Proper integration with lcc. Currently, it uses the lcc driver but
|
||||
it generates code, performs assembly, and produces file.o (which it need
|
||||
not do). In addition, the output file is called SYMBOLS but should
|
||||
not do). In addition, the output file is called SYMBOLS but should
|
||||
rather be called filename.ffi.
|
||||
</UL>
|
||||
|
||||
|
@ -69,7 +69,7 @@ Updated 14 June 2000.
|
|||
<H3>Back-ends</H3>
|
||||
<UL>
|
||||
<LI> Back-end for Scheme-to-C.
|
||||
<LI> Back-end for Gambit-C (Harold's got one working, it also does
|
||||
<LI> Back-end for Gambit-C (Harold's got one working, it also does
|
||||
interesting things with Open Inventor macros (see above)).
|
||||
<LI> Back-end for Tcl/Tk?
|
||||
<LI> Back-ends for ILU and Modula-3.
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<!-- -*- mode: html; mode: font-lock -*-
|
||||
|
||||
Hand-translated from LaTeX to HTML by lth on 2000-05-16, and
|
||||
converted footnotes to in-line text. Fixed a small number of
|
||||
Hand-translated from LaTeX to HTML by lth on 2000-05-16, and
|
||||
converted footnotes to in-line text. Fixed a small number of
|
||||
typos. No other changes. -->
|
||||
|
||||
<html>
|
||||
|
@ -70,7 +70,7 @@ produced.</p>
|
|||
<dd>Define preprocessor macro.
|
||||
<dt><tt>-Uname</tt>
|
||||
<dd>Undefine preprocessor macro.
|
||||
<dt><tt>-Idirectory</tt>
|
||||
<dt><tt>-Idirectory</tt>
|
||||
<dd>Add directory to the <em>beginning</em> of the list
|
||||
of include files. Standard directories include the <em>lcc</em> include
|
||||
directory, <tt>/usr/include</tt>, and the current directory (in that order).
|
||||
|
@ -109,8 +109,8 @@ process, as discussed in section 5.
|
|||
| (array <value> <type>)
|
||||
<attrs> -> (<attr> ...)
|
||||
<attr> -> static | extern | const | volatile
|
||||
<primitive> -> char | signed-char | unsigned-char | short
|
||||
| unsigned-short | int | unsigned | long
|
||||
<primitive> -> char | signed-char | unsigned-char | short
|
||||
| unsigned-short | int | unsigned | long
|
||||
| unsigned-long | float | double | void
|
||||
<value> -> <integer>
|
||||
<filename> -> <string>
|
||||
|
@ -182,8 +182,8 @@ Arrays are not valid return types.
|
|||
Array parameters lose some semantic information in the translation in
|
||||
the current system. An array parameter <tt>t a[n]</tt> is always
|
||||
converted to a pointer: <tt>(pointer t)</tt> regardless of whether
|
||||
<tt>n</tt> is known or not. As expected, then, something like
|
||||
<tt>t a[n][m][o]</tt> gets the parameter type
|
||||
<tt>n</tt> is known or not. As expected, then, something like
|
||||
<tt>t a[n][m][o]</tt> gets the parameter type
|
||||
<tt>(pointer (array m (array o t)))</tt>. Note that this only pertains to
|
||||
parameter types; variables of array type are not converted in this manner.
|
||||
(The semantic information claimed lost is the size of the leftmost
|
||||
|
@ -195,7 +195,7 @@ The grammar describes the current format, which will change: line number
|
|||
and column information will be incorporated. You should always use the
|
||||
accessor functions defined in the target-independent part of the
|
||||
back-end; see section 5. The grammar does not allow
|
||||
for bit fields or qualifications on anything but primitive
|
||||
for bit fields or qualifications on anything but primitive
|
||||
types, but these will be accomodated eventually.
|
||||
|
||||
</ul>
|
||||
|
@ -261,7 +261,7 @@ function <tt>generate-translation</tt>, which takes no arguments.
|
|||
</pre></p>
|
||||
|
||||
<p>A number of data structure accessors and mutators are also available.
|
||||
These are generic procedures which work on all of the record types.
|
||||
These are generic procedures which work on all of the record types.
|
||||
|
||||
<pre>
|
||||
(define (file r) ...) ; file name of record
|
||||
|
@ -417,7 +417,7 @@ to be investigated:</p>
|
|||
<ul>
|
||||
<li> It would be nice to retain comments.
|
||||
|
||||
<li> Various popular extensions to C are not currently supported by
|
||||
<li> Various popular extensions to C are not currently supported by
|
||||
<em>lcc</em>, but would be extremely useful: <tt>long long</tt> is used
|
||||
extensively in Unix header files, and header files for compilers on PCs
|
||||
often use the common Microsoft extensions <tt>__huge</tt>, <tt>__far</tt>,
|
||||
|
@ -484,8 +484,8 @@ implementation of the FFIGEN front end in the matter of roughly a single
|
|||
work day possible. Would it be that all software was this clean!</p>
|
||||
|
||||
<p>The development of FFIGEN was supported by ARPA
|
||||
under U.S. Army grant No. DABT63-94-C-0029,
|
||||
``Programming Environments, Compiler Technology and Runtime Systems
|
||||
under U.S. Army grant No. DABT63-94-C-0029,
|
||||
``Programming Environments, Compiler Technology and Runtime Systems
|
||||
for Object Oriented Parallel Processing''.</p>
|
||||
|
||||
<h2>10. Copyrights</h2>
|
||||
|
|
Loading…
Reference in New Issue