#if DEUTSCH
Dies ist CLISP, eine Implementierung von COMMON LISP.


Was ist LISP?
-------------

LISP ist eine Programmiersprache, die 1959 von J. McCarthy erfunden wurde.
Frher gab's viele verschiedene Dialekte, heute ist LISP durch den Industrie-
Standard COMMON LISP standardisiert und weit verbreitet worden. Anwendungen
reichen von der symbolischen Wissensverarbeitung (KI) ber die Numerik
(MACLISP lieferte einen ebensoguten Numerik-Code wie FORTRAN) bis hin zu
verbreiteten Programmen wie Editoren (EMACS) oder CAD-Systemen (AUTOCAD).
Eine Einfhrung in die Sprache ist:

  Sheila Hughes: Lisp. Pitman Publishing Limited, London 1986.
  107 Seiten. ca. DM 15,80.

Nach einiger Zeit unentbehrlich ist das Standardwerk mit der Sprachdefinition

  Guy L. Steele Jr.: Common Lisp - The Language. Digital Press.
  1. Auflage 1984, 465 Seiten, ca. DM 73,60.
  2. Auflage 1990, 1032 Seiten. ca. DM 94,90.

LISP liegt in einer interaktiven Umgebung vor, d.h. man gibt Formen ein, die
dann sofort ausgewertet werden. So kann man Variablen inspizieren, Funktionen
mit wechselnden Argumenten aufrufen oder auch eigene Funktionen definieren.


Inhalt:
-------

Zu CLISP gehren folgende Dateien:

#ifdef UNIX
      lisp.a           Hauptprogramm, mu erst noch gelinkt werden
#endif
#ifdef MSDOS
      lisp.exe         Hauptprogramm
#ifndef OS2
      lisp_1mb.exe     Hauptprogramm, fr Leute mit nur 1 oder 2 MB RAM
#endif
#endif
#ifdef ATARI
      lisp.prg         Hauptprogramm
#endif
#ifdef AMIGAOS
      lisp.run         Hauptprogramm
#endif
      lispinit.mem     beim Start bentigtes Speicherabbild
      clisp.1          Benutzungshinweise im man-Format von Unix
      clisp.man        Benutzungshinweise
#ifdef MSDOS
      clisp.dvi        Benutzungshinweise im DVI-Format
#endif
      impnotes.txt     Dokumentation von Implementierungsdetails
#ifdef EMUNIX
      emx-user.doc     Benutzungshinweise fr EMX-Anwendungen
#ifdef EMUNIX_PORTABEL
      emx.dll          EMX als dynamische OS/2-Bibliothek
      emxlibc.dll      die EMX-libc als dynamische OS/2-Bibliothek
#ifdef EMUNIX_OLD_8e
      termcap.dat      Datenbank von Terminal-Beschreibungen
#endif
#endif
#endif
      README           dies hier
      SUMMARY          Kurzbeschreibung von CLISP
      ANNOUNCE         Ankndingung
      COPYRIGHT        Klarstellung des Urheberrechts
      GNU-GPL          Gebrauchslizenz fr Offene Software
      config.lsp       rtliche Konfiguration

und - als Zugabe, fr den Fall, da Sie Quellen lesen mchten -

      *.lsp            die Quellen zu lispinit.mem
      *.fas            dieselben Dateien in compilierter Form
#ifdef UNIX

Um das ausfhrbare Programm zu erstellen, brauchen Sie ferner:

      libreadline.a    die GNU Readline-Bibliothek
      readline.tar.Z   Quellen und Dokumentation zur GNU Readline-Bibliothek

oder

      libnoreadline.a  wertloser Ersatz fr die GNU Readline-Bibliothek
#endif

#ifdef MSDOS

Hardware-Voraussetzungen:
-------------------------

#ifndef OS2
Diese DOS-Version von CLISP setzt als CPU einen 80386 (SX oder DX) oder einen
80486 sowie mindestens 1 MB RAM voraus.
#else
Diese OS/2-Version von CLISP setzt als CPU einen 80386 (SX oder DX) oder einen
80486 voraus, die OS/2 2.0 fhrt.
#endif

#endif
#ifdef ATARI

Hardware-Voraussetzungen:
-------------------------

Diese Atari-Version von CLISP setzt einen Atari ST mit einer 68000 CPU sowie
mindestens 2 MB RAM voraus.

#endif
#ifdef AMIGAOS

Hardware-Voraussetzungen:
-------------------------

Diese Amiga-Version von CLISP setzt momentan einen Amiga mit mindestens 1.5 MB
RAM voraus, dessen gesamter Speicher mit 24 Bit adressierbar ist. Daher luft
sie nicht auf dem A3000. Wir arbeiten an einer getrennten A3000-Version.

#endif

Installation:
-------------

#ifdef OS2
Zuerst installieren Sie emx.dll and emxlibc.dll in einem separaten Verzeichnis,
sagen wir c:\emx\dll. Fgen Sie c:\emx\dll (mit dem korrekten Laufwerks-
buchstaben) zur LIBPATH-Anweisung in Ihrer Datei config.sys hinzu. Booten
Sie Ihren Computer neu, damit die LIBPATH-Anweisung und die neuen Umgebungs-
Variablen Wirkung zeigen.

#ifdef EMUNIX_OLD_8e
Vielleicht wollen Sie auch termcap.dat in einem separaten Verzeichnis, sagen
wir c:\emx\etc, installieren.

#endif
#endif
#ifdef UNIX
Um das ausfhrbare Programm zu erstellen, geben Sie ein:

         cc lisp.a -L. -lnoreadline -ltermcap -s -o lisp.run

oder
- wenn Sie die Editiermglichkeiten der GNU Readline-Bibliothek haben mchten -

         cc lisp.a -L. -lreadline -ltermcap -s -o lisp.run

Passen Sie die Strings innerhalb von config.lsp mit einem Texteditor an.
#else
Passen Sie den Inhalt von config.lsp, insbesondere die Definitionen von
short-site-name und long-site-name, an Ihre rtlichen Gegebenheiten an.
Vielleicht mchten Sie auch die Zeitzonendefinition in defs1.lsp ndern.
#endif
Starten Sie dann

#ifdef MSDOS
         lisp.exe -M lispinit.mem
#endif
#ifdef ATARI
         lisp.prg -M lispinit.mem
#endif
#if defined(UNIX) || defined(AMIGAOS)
         lisp.run -M lispinit.mem
#endif

Auf den LISP-Prompt

      > _

hin eingeben:

        (compile-file "config")
        (load "config")
#ifndef UNIX

und - falls Sie defs1.lsp verndert haben -

        (compile-file "defs1")
        (load "defs1")
#endif

und dann

        (saveinitmem)

Damit berschreiben Sie die Datei lispinit.mem mit Ihrer Konfiguration. Sodann

        (exit)

Legen Sie ein Verzeichnis an und legen Sie das ausfhrbare Programm und das
Speicherabbild dort ab.
#ifdef UNIX
Ich schlage hierfr /usr/local/lib/lisp vor:

   mkdir /usr/local/lib/lisp
   mv lisp.run /usr/local/lib/lisp
   mv lispinit.mem /usr/local/lib/lisp
#endif
#ifdef MSDOS
Angenommen, Sie whlen dafr D:\LIB\LISP :

   mkdir d:\lib\lisp
   copy lisp.exe d:\lib\lisp
   copy lispinit.mem d:\lib\lisp
#endif

#ifdef MSDOS
Und erstellen Sie eine Kommando-Datei, die Lisp startet:

   copy con c:\bat\clisp.bat
   d:\lib\lisp\lisp.exe -M d:\lib\lisp\lispinit.mem %1 %2 %3 %4 %5 %6 %7 %8 %9
   [Ctrl-Z]
#endif
#ifdef UNIX
Und erstellen Sie ein Shell-Script, das Lisp startet:

   cat > /usr/local/bin/clisp
#ifdef UNIX_USE_KSH
   #!/bin/ksh
#else
   #!/bin/sh
#endif
   exec /usr/local/lib/lisp/lisp.run -M /usr/local/lib/lisp/lispinit.mem "$@"
   [Ctrl-D]EOF
   chmod a+x /usr/local/bin/clisp

Installieren Sie nun die Benutzungshinweise

   mv clisp.1 /usr/local/man/man1/clisp.1

and probieren Sie

   man clisp
#endif

#ifdef AMIGAOS

Anmerkung:
----------

Sie knnen CLISP von der Workbench(r) aus starten. Die folgenden Anwendungs-
parameter des Anwendungs-Piktogrammes werden erkannt:

   WINDOW=<Spezifikation eines Fensters oder eines Kanals>
   ARGS=<Argumente wie beim Kommandozeilen-Aufruf>

Beispielsweise

   WINDOW=CON:0/11/640/200/CLISP-interaktiv
   ARGS=-M lispinit.mem

#endif
#ifdef MSDOS

Der Editor:
-----------

Normalerweise ruft die Funktion ED von CLISP den Editor auf, den Sie in
config.lsp angegeben haben. Nach Ausfhrung von

    (load "editor")

ruft sie dagegen den eingebauten Bildschirmeditor auf. Er erinnert ein wenig
an Emacs: Sie knnen aus dem Editor heraus Lisp-Ausdrcke auswerten, und das
Ergebnis wird in den Editor-Puffer eingefgt. Den vollen Befehlssatz ersehen
Sie durch Drcken von Alt-H.
#if defined(EMUNIX_PORTABEL) && defined(EMUNIX_OLD_8e)

Beachten Sie: Damit der Editor korrekt funktioniert, mssen Sie eine Zeile wie

    DEVICE=ANSI.SYS

in Ihrer Datei CONFIG.SYS haben. Auerdem mu die Umgebungs-Variable TERM
gesetzt sein, und die Umgebungs-Variable TERMCAP mu den Pfadnamen der
Datenbank von Terminal-Beschreibungen enthalten, wobei \ durch / zu ersetzen
ist. Es ist wohl nicht schlecht, diese Sachen in das oben erstellte clisp.bat
zu schreiben:

    set TERM=ansi
    set TERMCAP=c:/emx/etc/termcap.dat

"ansi-color-2" statt "ansi" sieht auch gut aus.
#endif

#endif

Wenn's Probleme gibt:
---------------------

#ifdef EMUNIX
Sollte clisp berhaupt nicht gestartet werden knnen, konsultieren Sie
EMX-USER.DOC. lisp.exe ist eine EMX-Anwendung. Was dort ber EMX-Anwendungen
gesagt wird, trifft auch auf lisp.exe zu.

#endif
Bei Errors befindet man sich im Debugger:

     1. Break> _

Hier kann man wie blich Formen auswerten.
Auerdem:

     Help
               ruft Hilfestellung an.
     Abort     oder
     Unwind
               steigt hoch in die nchsthhere Hauptschleife.
     (show-stack)
               zeigt den Stackinhalt an. Das hilft bei der Fehlersuche.

Auerdem kann man sich die Werte der Variablen der Funktion anzeigen lassen,
in der der Fehler passierte.

Bei greren Problemen, z.B. harten Abstrzen, bitte Fehlerbeschreibung
und reproduzierbare Vorgehensweise zur Erzeugung dieses Fehlers an die
Autoren senden.


Dank:
-----

#ifdef MSDOS
Wenn Sie CLISP schnell und fehlerfrei finden und damit arbeiten mgen, wren
wir ber ein Geschenk von z.B. 40 DM (der Betrag steht Ihnen frei) dankbar.
Die meisten DOS-Programme kosten etwas; Sie sind das Bezahlen deswegen
vermutlich schon gewhnt.

Wenn nicht, scheuen Sie sich nicht, uns Verbesserungsvorschlge zu schicken.
Oder holen Sie sich die Quellen von CLISP, verbessern Sie es selber und
schicken uns Ihre Modifikationen.

#endif
Wir schulden Dank
  * Guy L. Steele und vielen anderen fr die Spezifikation von Common Lisp.
#ifdef UNIX
  * dem GNU-Projekt von Richard Stallman fr GCC, Autoconf und die
    Readline-Bibliothek.
#else
#ifdef GNU_READLINE
  * dem GNU-Projekt von Richard Stallman fr GCC und die Readline-Bibliothek.
#else
#ifdef GNU
  * dem GNU-Projekt von Richard Stallman fr GCC.
#endif
#endif
#endif
#ifdef EMUNIX
  * Eberhard Mattes fr EMX.
#endif


Autoren:
--------

        Bruno Haible                    Michael Stoll
        Augartenstrae 40               Gallierweg 39
    D - W 7500 Karlsruhe 1          D - W 5300 Bonn 1
        Deutschland                     Deutschland

Email: haible@ma2s2.mathematik.uni-karlsruhe.de
#ifdef AMIGAOS

Portierung fr den Amiga:
-------------------------

        Jrg Hhle
        Radolfzeller Strae 3
    D - W 7753 Allensbach
        Deutschland

Email: hoehle@inf-wiss.ivp.uni-konstanz.de
#endif
#else /* englische bersetzung */
This is CLISP, a Common Lisp implementation.


What is LISP?
-------------

LISP is a programming language. It was invented by J. McCarthy in 1959.
There have been many dialects of it, but nowadays LISP has been standardized
and wide-spread due to the industrial standard COMMON LISP. There are
applications in the domains of symbolic knowledge processing (AI), numerical
mathematics (MACLISP yielded numerical code as good as FORTRAN), and
widely used programs like editors (EMACS) and CAD (AUTOCAD).
There is an introduction to the language:

  Sheila Hughes: Lisp. Pitman Publishing Limited, London 1986.
  107 pages.

After a while wou will need the standard text containing the language
definition:

  Guy L. Steele Jr.: Common Lisp - The Language. Digital Press.
  1. edition 1984, 465 pages.
  2. edition 1990, 1032 pages.

LISP is run in an interactive environment. You input forms, and they will be
evaluated at once. Thus you can inspect variables, call functions with given
arguments or define your own functions.


Contents:
---------

It consists of the following files:

#ifdef UNIX
      lisp.a           main program, to be linked
#endif
#ifdef MSDOS
      lisp.exe         main program
#ifndef OS2
      lisp_1mb.exe     main program, use this one if you have
                       only 1 or 2 MB of RAM
#endif
#endif
#ifdef ATARI
      lisp.prg         main program
#endif
#ifdef AMIGAOS
      lisp.run         main program
#endif
      lispinit.mem     memory image needed for startup
      clisp.1          manual page in Unix man format
      clisp.man        manual page
#ifdef MSDOS
      clisp.dvi        manual page in dvi format
#endif
      impnotes.txt     implementation notes
#ifdef EMUNIX
      emx-user.doc     emx applications user's guide
#ifdef EMUNIX_PORTABEL
      emx.dll          OS/2 dynamic link library containing emx
      emxlibc.dll      OS/2 dynamic link library containing the emx libc
#ifdef EMUNIX_OLD_8e
      termcap.dat      terminal capabilities database
#endif
#endif
#endif
      README           this text
      SUMMARY          short description of CLISP
      ANNOUNCE         announcement
      COPYRIGHT        copyright notice
      GNU-GPL          free software license
      config.lsp       site-dependent configuration

and - to your convenience, if you like reading source -

      *.lsp            the source of lispinit.mem
      *.fas            the same files, already compiled
#ifdef UNIX

For building the executable, you also need:

      libreadline.a    GNU readline library
      readline.tar.Z   GNU readline library source and documentation

or

      libnoreadline.a  dummy replacement for the GNU readline library
#endif

#ifdef MSDOS

Hardware requirements:
----------------------

#ifndef OS2
This DOS version of CLISP requires an 80386 (SX or DX) or an 80486 CPU
and at least 1 MB of RAM.
#else
This OS/2 version of CLISP requires an 80386 (SX or DX) or an 80486 CPU,
running OS/2 2.0.
#endif

#endif
#ifdef ATARI

Hardware requirements:
----------------------

This Atari version of CLISP requires an Atari ST with 68000 CPU and
at least 2 MB of RAM.

#endif
#ifdef AMIGAOS

Hardware requirements:
----------------------

This Amiga version of CLISP currently requires at least 1.5MB RAM and
an Amiga with no memory outside the 24 bit addressable space. Thus it
will not work on the A3000. We are working on a separate A3000 version.

#endif

Installation:
-------------

#ifdef OS2
First of all, install emx.dll and emxlibc.dll in a separate directory,
say c:\emx\dll. Add c:\emx\dll (insert the correct drive letter)
to the LIBPATH statement in your config.sys file. Reboot your computer
to enable the new LIBPATH statement and the new environment variables.

#ifdef EMUNIX_OLD_8e
You may also want to install termcap.dat in a separate directory,
say c:\emx\etc.

#endif
#endif
#ifdef UNIX
Type

         cc lisp.a -L. -lnoreadline -ltermcap -s -o lisp.run

or - if you prefer having GNU readline's input editing capabilities -

         cc lisp.a -L. -lreadline -ltermcap -s -o lisp.run

to build the executable against your C library.

Change the strings in config.lsp, using a text editor.
#else
Edit the contents of config.lsp appropriately for your site,
especially the definitions of short-site-name and long-site-name.
You may also want to edit the time zone definition in defs1.lsp.
#endif
Then start

#ifdef MSDOS
         lisp.exe -M lispinit.mem
#endif
#ifdef ATARI
         lisp.prg -M lispinit.mem
#endif
#if defined(UNIX) || defined(AMIGAOS)
         lisp.run -M lispinit.mem
#endif

When the LISP prompt

      > _

appears, type

        (compile-file "config")
        (load "config")
#ifndef UNIX

and - in case you modified defs1.lsp -

        (compile-file "defs1")
        (load "defs1")
#endif

and then

        (saveinitmem)

to overwrite the file lispinit.mem with your configuration. Then

        (exit)

Then create a directory, and put the executable and the memory image there.
#ifdef UNIX
I would suggest /usr/local/lib/lisp :

   mkdir /usr/local/lib/lisp
   mv lisp.run /usr/local/lib/lisp
   mv lispinit.mem /usr/local/lib/lisp
#endif
#ifdef MSDOS
Assuming D:\LIB\LISP :

   mkdir d:\lib\lisp
   copy lisp.exe d:\lib\lisp
   copy lispinit.mem d:\lib\lisp
#endif

#ifdef MSDOS
And create a batch file that starts lisp:

   copy con c:\bat\clisp.bat
   d:\lib\lisp\lisp.exe -M d:\lib\lisp\lispinit.mem %1 %2 %3 %4 %5 %6 %7 %8 %9
   [Ctrl-Z]
#endif
#ifdef UNIX
And create a shell script that starts lisp:

   cat > /usr/local/bin/clisp
#ifdef UNIX_USE_KSH
   #!/bin/ksh
#else
   #!/bin/sh
#endif
   exec /usr/local/lib/lisp/lisp.run -M /usr/local/lib/lisp/lispinit.mem "$@"
   [Ctrl-D]EOF
   chmod a+x /usr/local/bin/clisp

Now install the man page

   mv clisp.1 /usr/local/man/man1/clisp.1

and try

   man clisp
#endif

#ifdef AMIGAOS

Note:
-----

You can start CLISP from Workbench(tm). The following Tooltypes are
recognized in the Tool Icon:

   WINDOW=<window or pipe specification>
   ARGS=<CLI-like arguments>

For example,

   WINDOW=CON:0/11/640/200/CLISP-Listener
   ARGS=-M lispinit.mem

#endif
#ifdef MSDOS

The editor:
-----------

Normally CLISP's ED function calls the editor you specified in config.lsp.
However, after you did

    (load "editor")

it invokes a builtin screen editor. It is a bit Emacs-like: you can evaluate
lisp expressions from within the editor, and the result is pasted into the
editor buffer. Type Alt-H to see the full set of commands.
#if defined(EMUNIX_PORTABEL) && defined(EMUNIX_OLD_8e)

Note that for the editor working properly, it is necessary that you have
a line like

    DEVICE=ANSI.SYS

in your CONFIG.SYS file. Furthermore the environment variable TERM must
be set, and the environment variable TERMCAP must contain the slashified
file name of the terminal capabilities database termcap.dat. It is a good
idea to put this stuff into the clisp.bat built above:

    set TERM=ansi
    set TERMCAP=c:/emx/etc/termcap.dat

`ansi-color-2' instead of `ansi' looks nice, too.
#endif

#endif

When you encounter problems:
----------------------------

#ifdef EMUNIX
If clisp doesn't start up at all, check EMX-USER.DOC. lisp.exe is an EMX
application, so everything mentioned there applies to lisp.exe.

#endif
After errors, you are in the debugger:

     1. Break> _

You can evaluate forms, as usual. Furthermore:

     Help
               calles help
     Abort     or
     Unwind
               climbs up to next higher input loop
     (show-stack)
               shows the contents of the stack, helpful for debugging

And you can look at the values of the variables of the functions where the
error occurred.

#ifdef UNIX
On bigger problems, e.g. core dumps, please send a description of the error
#endif
#ifdef ATARI
On bigger problems, e.g. bombs, please send a description of the error
#endif
#ifdef AMIGAOS
On bigger problems, e.g. "guru"s, please send a description of the error
#endif
#ifdef MSDOS
On bigger problems, e.g. register dumps, please send a description of the error
#endif
and how to produce it reliably to the authors.


Acknowledgement:
----------------

#ifdef MSDOS
If you find CLISP fast and bug-free and you like using it, a gift of $25
(or any amount you like) will be appreciated. Most DOS software costs
something, so you will probably already be used to paying.

If not, feel free to send us suggestions for improvement. Or grab the
source of CLISP, improve it yourself and send us your patches.

#endif
We are indebted to
  * Guy L. Steele and many others for the Common Lisp specification.
#ifdef UNIX
  * Richard Stallman's GNU project for GCC, Autoconf and the readline library.
#else
#ifdef GNU_READLINE
  * Richard Stallman's GNU project for GCC and the readline library.
#else
#ifdef GNU
  * Richard Stallman's GNU project for GCC.
#endif
#endif
#endif
#ifdef EMUNIX
  * Eberhard Mattes for EMX.
#endif


Authors:
--------

        Bruno Haible                    Michael Stoll
        Augartenstrae 40               Gallierweg 39
    D - W 7500 Karlsruhe 1          D - W 5300 Bonn 1
        Germany                         Germany

Email: haible@ma2s2.mathematik.uni-karlsruhe.de
#ifdef AMIGAOS

Amiga Port by:
--------------

        Jrg Hhle
        Radolfzeller Strae 3
    D - W 7753 Allensbach
        Germany

Email: hoehle@inf-wiss.ivp.uni-konstanz.de
#endif
#endif /* DEUTSCH / ENGLISH */
