Clean up whitespace

This commit is contained in:
Lassi Kortela 2023-05-19 10:28:13 +03:00
parent 61fc3061a1
commit a9537cd94b
5 changed files with 45 additions and 45 deletions

View File

@ -12,16 +12,16 @@
; At the outset, everything in the .ffi file is marked as referenced. ; At the outset, everything in the .ffi file is marked as referenced.
; The mechanisms for excluding stuff are based on an item's name. ; 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. ; item defined in that file and files included by it.
(exclude-file '()) (exclude-file '())
; exclude-structure takes a structure name (i.e. either "struct FOO" ; exclude-structure takes a structure name (i.e. either "struct FOO"
; or "union FOO" or "FOO") or list of names and inhibits generation of ; or "union FOO" or "FOO") or list of names and inhibits generation of
; constructors, destructors, accessors, and mutators for it and all ; constructors, destructors, accessors, and mutators for it and all
; typedefs derived from it. If the name is a typedef name and the ; typedefs derived from it. If the name is a typedef name and the
; structure named has a compiler-generated tag, then the structure ; structure named has a compiler-generated tag, then the structure
; named by this typedef is also excluded. ; named by this typedef is also excluded.
(exclude-structure "FILE") (exclude-structure "FILE")
@ -41,11 +41,11 @@
; Override-prototype gives the named function a new prototype. ; Override-prototype gives the named function a new prototype.
(override-prototype "fgets" (override-prototype "fgets"
`(function (,(primitive-type 'string) `(function (,(primitive-type 'string)
,(primitive-type 'int) ,(primitive-type 'int)
,(pointer-type (struct-type "FILE"))) ,(pointer-type (struct-type "FILE")))
,(pointer-type (primitive-type 'char)))) ,(pointer-type (primitive-type 'char))))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -73,7 +73,7 @@
; values. Values are: warning, alloc-new, and pass-placeholder. If alloc-new ; values. Values are: warning, alloc-new, and pass-placeholder. If alloc-new
; is the value, then a proxy function will be generated which receives ; 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 ; 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 ; 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 ; that take an extra argument (the first); that argument must be a pointer
; to a structure in which to place the value. ; to a structure in which to place the value.

View File

@ -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 facilitates the writing of translators from C header files to foreign
function interfaces for particular language implementations. function interfaces for particular language implementations.
<P> <P>
<img src="../ball.red.gif" alt="*"> <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> <A href="manifesto.html">(HTML)</a> <A href="manifesto.ps.gz">(ps.gz, 26 KB)</A>
<BR> <BR>
<img src="../ball.red.gif" alt="*"> <img src="../ball.red.gif" alt="*">
@ -26,7 +26,7 @@ FFIGEN User's Manual
<BR> <BR>
<img src="../ball.red.gif" alt="*"> <img src="../ball.red.gif" alt="*">
FFIGEN Back-end for Chez Scheme Version 5 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> <P>
There are three motivating observations behind FFIGEN. The first is 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> <UL>
<LI>The FFIGEN front-end is based on the front-end of the freely <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 <em>lcc</em> makes
the FFIGEN front end portable, complete, and extensible for special the FFIGEN front end portable, complete, and extensible for special
purposes. purposes.
@ -76,20 +76,20 @@ build on.
<P> <P>
The current version of FFIGEN is available as a set of modifications to 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 The FFIGEN
distribution includes documentation on how to write back-ends and a distribution includes documentation on how to write back-ends and a
documented example back-end for the FFI of Chez Scheme version 5. documented example back-end for the FFI of Chez Scheme version 5.
<P> <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> is neither complete nor polished.</B>
<P> <P>
<img src="../ball.red.gif" alt="*"> <img src="../ball.red.gif" alt="*">
Click <A href="ffigen.tar.gz">here</A> to download the Click <A href="ffigen.tar.gz">here</A> to download the
full FFIGEN distribution. (148 KB) full FFIGEN distribution. (148 KB)
<BR> <BR>
This archive has not been updated with the fixes in the bug fix file (below). This archive has not been updated with the fixes in the bug fix file (below).
<P> <P>
<img src="../ball.red.gif" alt="*"> <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 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 to policy.sch to remove gratuitous non-standard-ness (use of reverse! rather
than reverse). Also included generated standard libraries for Chez Scheme 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. directory.
<P> <P>
<img src="../ball.red.gif" alt="*"> <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. Scheme policy file, left out of distribution.
<P> <P>
<img src="../ball.red.gif" alt="*"> <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. 3.4b distribution.
(965 KB) (965 KB)

View File

@ -1,9 +1,9 @@
<!-- -*- mode: html; mode: font-lock -*- <!-- -*- mode: html; mode: font-lock -*-
Hand-translated from LaTeX to HTML by lth on 2000-05-16, Hand-translated from LaTeX to HTML by lth on 2000-05-16,
converted footnotes to in-line text, and inserted hyperlinks. converted footnotes to in-line text, and inserted hyperlinks.
No other changes. --> No other changes. -->
<html> <html>
<head> <head>
<title>FFIGEN Manifesto and Overview</title> <title>FFIGEN Manifesto and Overview</title>
@ -123,8 +123,8 @@ translate <tt>char*</tt> as <tt>string</tt>, we end up with (since
<pre> <pre>
(define fgets (define fgets
(foreign-function "fgets" (foreign-function "fgets"
(string integer-32 unsigned-32) (string integer-32 unsigned-32)
string)) string))
</pre> </pre>
@ -134,7 +134,7 @@ translate as:
<pre> <pre>
(define fgets (define fgets
(foreign-function "fgets" (foreign-function "fgets"
(unsigned-32 integer-32 unsigned-32) (unsigned-32 integer-32 unsigned-32)
unsigned-32)) unsigned-32))
</pre> </pre>

View File

@ -14,7 +14,7 @@ Updated 14 June 2000.
<UL> <UL>
<LI> Full ANSI C support: <LI> Full ANSI C support:
<UL> <UL>
<LI> [done] Bitfields. <LI> [done] Bitfields.
<LI> General support for type qualifiers. <LI> General support for type qualifiers.
</UL> </UL>
@ -23,9 +23,9 @@ Updated 14 June 2000.
<LI> Output structure field offsets. <LI> Output structure field offsets.
<LI> Output line and column information. <LI> Output line and column information.
<LI> Retain and output comments. <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 <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. <code>#includes</code> the source header file.
<LI> Support certain extensions: Microsoft __huge, __near, __far, __based, <LI> Support certain extensions: Microsoft __huge, __near, __far, __based,
__cdecl, __pascal; GNU __inline; others? __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 as far as possible, and extraneous cruft should be removed so that the
back end can produce better translations. back end can produce better translations.
<LI> Support for some form of tokenized macros to support certain regular <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: heavily in a virtual-function like style:
<pre> <pre>
#define SoSphSetOverride(_this, state) \ #define SoSphSetOverride(_this, state) \
@ -55,7 +55,7 @@ Updated 14 June 2000.
<LI> [done] Move to lcc 3.6. <LI> [done] Move to lcc 3.6.
<LI> [done] Proper integration with lcc. Currently, it uses the lcc driver but <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 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. rather be called filename.ffi.
</UL> </UL>
@ -69,7 +69,7 @@ Updated 14 June 2000.
<H3>Back-ends</H3> <H3>Back-ends</H3>
<UL> <UL>
<LI> Back-end for Scheme-to-C. <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)). interesting things with Open Inventor macros (see above)).
<LI> Back-end for Tcl/Tk? <LI> Back-end for Tcl/Tk?
<LI> Back-ends for ILU and Modula-3. <LI> Back-ends for ILU and Modula-3.

View File

@ -1,7 +1,7 @@
<!-- -*- mode: html; mode: font-lock -*- <!-- -*- mode: html; mode: font-lock -*-
Hand-translated from LaTeX to HTML by lth on 2000-05-16, and Hand-translated from LaTeX to HTML by lth on 2000-05-16, and
converted footnotes to in-line text. Fixed a small number of converted footnotes to in-line text. Fixed a small number of
typos. No other changes. --> typos. No other changes. -->
<html> <html>
@ -70,7 +70,7 @@ produced.</p>
<dd>Define preprocessor macro. <dd>Define preprocessor macro.
<dt><tt>-Uname</tt> <dt><tt>-Uname</tt>
<dd>Undefine preprocessor macro. <dd>Undefine preprocessor macro.
<dt><tt>-Idirectory</tt> <dt><tt>-Idirectory</tt>
<dd>Add directory to the <em>beginning</em> of the list <dd>Add directory to the <em>beginning</em> of the list
of include files. Standard directories include the <em>lcc</em> include of include files. Standard directories include the <em>lcc</em> include
directory, <tt>/usr/include</tt>, and the current directory (in that order). directory, <tt>/usr/include</tt>, and the current directory (in that order).
@ -109,8 +109,8 @@ process, as discussed in section 5.
| (array &lt;value&gt; &lt;type&gt;) | (array &lt;value&gt; &lt;type&gt;)
&lt;attrs&gt; -&gt; (&lt;attr&gt; ...) &lt;attrs&gt; -&gt; (&lt;attr&gt; ...)
&lt;attr&gt; -&gt; static | extern | const | volatile &lt;attr&gt; -&gt; static | extern | const | volatile
&lt;primitive&gt; -&gt; char | signed-char | unsigned-char | short &lt;primitive&gt; -&gt; char | signed-char | unsigned-char | short
| unsigned-short | int | unsigned | long | unsigned-short | int | unsigned | long
| unsigned-long | float | double | void | unsigned-long | float | double | void
&lt;value&gt; -&gt; &lt;integer&gt; &lt;value&gt; -&gt; &lt;integer&gt;
&lt;filename&gt; -&gt; &lt;string&gt; &lt;filename&gt; -&gt; &lt;string&gt;
@ -182,8 +182,8 @@ Arrays are not valid return types.
Array parameters lose some semantic information in the translation in Array parameters lose some semantic information in the translation in
the current system. An array parameter <tt>t a[n]</tt> is always the current system. An array parameter <tt>t a[n]</tt> is always
converted to a pointer: <tt>(pointer t)</tt> regardless of whether converted to a pointer: <tt>(pointer t)</tt> regardless of whether
<tt>n</tt> is known or not. As expected, then, something like <tt>n</tt> is known or not. As expected, then, something like
<tt>t a[n][m][o]</tt> gets the parameter type <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 <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. parameter types; variables of array type are not converted in this manner.
(The semantic information claimed lost is the size of the leftmost (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 and column information will be incorporated. You should always use the
accessor functions defined in the target-independent part of the accessor functions defined in the target-independent part of the
back-end; see section 5. The grammar does not allow 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. types, but these will be accomodated eventually.
</ul> </ul>
@ -261,7 +261,7 @@ function <tt>generate-translation</tt>, which takes no arguments.
</pre></p> </pre></p>
<p>A number of data structure accessors and mutators are also available. <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> <pre>
(define (file r) ...) ; file name of record (define (file r) ...) ; file name of record
@ -417,7 +417,7 @@ to be investigated:</p>
<ul> <ul>
<li> It would be nice to retain comments. <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 <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 extensively in Unix header files, and header files for compilers on PCs
often use the common Microsoft extensions <tt>__huge</tt>, <tt>__far</tt>, 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> work day possible. Would it be that all software was this clean!</p>
<p>The development of FFIGEN was supported by ARPA <p>The development of FFIGEN was supported by ARPA
under U.S. Army grant No. DABT63-94-C-0029, under U.S. Army grant No. DABT63-94-C-0029,
``Programming Environments, Compiler Technology and Runtime Systems ``Programming Environments, Compiler Technology and Runtime Systems
for Object Oriented Parallel Processing''.</p> for Object Oriented Parallel Processing''.</p>
<h2>10. Copyrights</h2> <h2>10. Copyrights</h2>