newLISP-tk 1.37


An Integration of newLISPtm and Tcl/Tk - quick intro




Copyright © 2001-2007 Lutz Mueller.  www.nuevatec.com. All rights reserved.

Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License,
Version 1.2 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts,
and no Back-Cover Texts. A copy of the license is included in the section entitled GNU Free Documentation License.

The accompanying software is protected by the GNU General Public License V.2, June 1991.

newLISP is a trademark of Lutz Mueller.





Contents

Introduction
Installation
LINUX and other UNIXs
MS Windows
newLISP DLL
Configuration
Controlling a remote newLISP on a different computer
Running multiple instances of newLISP-tk
Multiple instances of raw newLISP without tk
The console window
How to use the editor / browser
How to use the Debugger
Writing applications with newLISP and Tcl/Tk
Delivering applications with newLISP-tk
Special considerations using newLISP-tk
Options and settings
License
GNU Free Documentation License
GNU Public License




Introduction

newLISP-tk is a Graphical User Interface (GUI) for newLISP based on Tcl/Tk, an Open Source and platform independent toolkit for GUI applications. newLISP-tk consists of two parts working together: the newLISP program which is an Open Source implementation of the programming language LISP, and newLISP-tk a GUI program to control newLISP written with a language and GUI toolkit called Tcl/Tk.

Since newLISP-tk v. 0.91 the BWidget set, is also included in the newlisp-tk.exe Win32 GUI executable. For Linux/UNIX installation see the Installation chapter on how to include the BWidget extensions. The BWidget set contains over 30 high-level widgets for making professional looking GUI interfaces.

For more information about Tcl/Tk and the BWidget set and their source code and licensing go to one of the following sites on the Internet:

http://www.scriptics.com
http://tcltk.org
http://tcl.activestate.com
http://tcllib.sourceforge.net/

There is an interactive Tcl/Tk tutorial at:

http://hegel.ittc.ukans.edu/topics/tcltk/tutorial-noplugin/index.html

For more information about newLISP and related programs, source and licensing go to:

http://sourceforge.net/projects/newlisp
http://www.newlisp.org
http://www.nuevatec.com

While newLISP by itself can only be controlled via a shell or console window, newLISP-tk adds multiple LISP -aware editors / browsers and a source code debugger. It also adds the possibility to make newLISP programs drawing graphics or show graphical widgets of the underlying operating system like buttons, text entries, list boxes, menus etc.. The graphical capabilities are delivered by the Tcl/Tk component. Because newLISP and Tcl/Tk both can be implemented on most operating systems, newLISP-tk can be used to create LISP applications for a variety of platforms at the same time.

Note that some features work differently in the bare console version of newLISP when compared with runnng the newLISP-tk front-end. See the chapter Special considerations using newLISP-tk for details.



Installation


LINUX and other UNIXs

If a previous installation is present the old newlisp-tk.config file may have to be removed because of changing directory structures in new versions.

A new file newlisp-tk.config can be generated in the home directory using the Options/Save settings function from the main menu.

The newLISP executable and help and demo files can be installed from a binary RPM distribution or newLISP can be compiled from source. See the file INSTALLATION in the newLISP source distribution in the newlisp-x.x.x/doc/ directory for details.

Most LINUX distributions include Tcl/Tk by default. The source distribution contains newlisp-tk.tcl, which is the Tcl/Tk source for newLISP-tk. If Tcl/Tk version 8.4 (or 8.3) is not installed on your operating system, it is available at the following Internet sites:

ftp://ftp.scriptics.com/pub/tcl/
ftp://tcl.activestate.com/pub/tcl/

If the BWidget set extension is installed (default on Tcl/Tk 8.4), the lines 157 and 158 in the file newlisp-tk.tcl have to be out commented to include the BWidget package and point to the right library path in the TCL/TK installation.

The first line in newlisp-tk.tcl should point to the correct location of the program wish, which is the Tcl/Tk binary used to run Tcl/Tk programs. By default the first line of newlisp-tk.tcl contains the line:

#!/usr/bin/wish

After installation newlisp and newlisp-tk should be in the /usr/bin directory, which should be in the execution path of the OS's environment. The install routine renames newlisp-tk.tcl to newlisp-tk. Icons used in newlisp-tk are installed in /usr/share/newlisp/newlisp-tk/images.

Demo programs are installed in /usr/share/newlisp/newlisp-tk and doc files are installed in /usr/share/newlisp/doc. Other directories are not used by the newlisp installation process on LINUX.

To run newLISP-tk just execute:

newlisp-tk

newLISP-tk comes up with a console window and will launch the newLISP program automatically. On the first line of the console window the newLISP copyright notice should appear to confirm successful startup.

If the copyright notice does not appear than newlisp-tk could not load newlisp or communicate with it. In this case make sure that port settings in newlisp-tk.config are correct.

The file newlisp-tk.config can be found in the users home directory. If no newlisp-tk.config is found, newLISP-tk will start using default values for all configuration parameters.  A newlisp-tk.config file can be generated by selecting Options/Save Settings from the main console menu. Two different ports should be used for TCLTKport and newLISPport but newLISPhost and TCLTKhost should have the same IP address, normally localhost: 127.0.0.1.  After an unsuccessful startup use the LINUX task manager, i.e.:'top' or 'ktop' or do a: 'ps -A' to make sure that none of the processes newlisp-tk and newlisp have been left running after a failed start attempt. Remove those processes and start over again executing newlisp-tk.


MS Windows

If a an old newLISP-tk installation is present it should be removed using the uninstaller from the 'Start Menu' in 'Start/Programs/newLISP' or by using the uninstaller in the control panel 'Add or Remove Programs' applet.

For Win32 based OS's the installer of newLISP-tk for Windows can be used which contains all components necessary to run newLISP-tk. The package contains a file called newlisp-tk.exe which is a precompiled and linked newlisp-tk.tcl containing all Tcl/Tk DLLs (Dynamic Link Libraries) necessary. The package also contains the file newlisp.exe which is newLISP compiled for Windows.

Be default the installer installs in the C:\Program Files\newlisp, where C:\Program Files is taken from the PROGRAMFILES environment variable. The install path can be changed during install.

To run newLISP-tk just execute the file:

newlisp-tk.exe

from the directory where it is installed or by clicking the link created on the desktop by the installer or by clicking the link in the Start menu of the Windows task bar.

newLISP-tk comes up with a console window and will launch the newLISP program automatically. On the first line of the console window the newLISP startup notice should appear to confirm successful startup.

If the sign-on message does not appear than newlisp-tk.exe could not load newlisp.exe or could communicate with it via TCP/IP. In this case make sure that port settings and newLISPbin location are specified correctly in the file newlisp-tk.config.

The file newlisp-tk.config can be found in the startup directory of newlisp-tk.exe. If no newlisp-tk.config is found, newLISP-tk will start using default values for all configuration parameters. A newlisp-tk.config file can be generated by selecting Options/Save Settings from the main console menu.

Two different ports are used for TCLTKport and newLISPport but newLISPhost and TCLTKhost should have the same IP address, normally 127.0.0.1, when running the GUI front-end and the newlisp executable on the same computer. After an unsuccessful startup use the Windows Task Manager to make sure that none of the processes newlisp-tk.exe and newlisp.exe has been left running. After a failed start attempt remove those processes and start over again executing newlisp-tk.exe.

To run newLISP without graphical capabilities just execute

newlisp.exe

in a command window.


newLISP DLL

The Win32 distribution of newLISP-tk also contains a file called newlisp.dll. Note that this file is not required to run newlisp.exe or newlisp-tk.exe. This file is newLISP compiled to a DLL (Dynamic Link Library). This file on its own can be imported into to other Win32 applications for delivering newLISP functionality in those applications. See the main newLISP manual for details.


Configuration

newLISP-tk starts up in a default configuration, which can be changed and saved to a file from the applications Options menu. The saved file is named newlisp-tk.config and can also be edited using a text editor like vi on LINUX or notepad.exe on Windows. The configuration file contains some path / file names which are important for correct operation. For more details about configuration see the chapter Options and Settings.


Controlling a remote newLISP on a different computer

The newLISP-tk GUI front-end and the newLISP executable binary can run on different computers connected on a TCP/IP network. In order for this to work, the config file parameters: newLISPhost and TCLTKhost must be configured correctly with their respective IP-numbers or host names in the file newlisp-tk.config.

For example the following lines might be included in the file newlisp-tk.conf:

set Ide(TCLTKhost) "68.128.23.35"
set Ide(TCLTKport) "64003"
set Ide(newLISPhost) "mysite.com"
set Ide(newLISPport) "64001"

Note, that either IP-numbers or host names can be used in host parameters. Any port numbers can be configured, but must be available with sufficient access rights on the participating computers. newLISP on the remote computer gets started first by executing:

newlisp -p 64001

On the local computer start newlisp-tk.exe. The file newlisp-tk.conf should be in the same directory as newlisp-tk.tcl (on UNIXs) or newlisp-tk.exe on Windows.

Speed of the GUI is adequate even on low speed dial-up connected computer system. Execution speed of Graphics applications depends on the speed of the link, as each graphics command goes back and forth over the TCP/IP connection.


Running multiple instances of newLISP-tk

Multiple instance or newLISP-tk can be run, but care must be taken to configure different ports newLISPport and TCLTKport for each instance to avoid conflict. When trying to start up a second instance without special configuration a message will appear "socket already in use".

Using the following steps multiple instances of newLISP-tk can be run on Windows 2000/XP:

          (3) Start newlisp-tk.exe from a different startup directory containing a modified version of newlisp-tk.config .

(2) In the second copy of  newlisp-tk.config configure newLISPport and TCLTKport with different numbers, i.e. 64001 ND 64002 in the original version of newlisp-tk.config and 64101 and 64102 in the second version.

(3) When creating a Start menu or Desktop link, the startup directory should be configured for the location of the modified newlisp-tk.config file. newLISP-tk will always look for it's config file in the startup directory.

To run multiple instances of newLISP-tk on LINUX start a second instance as a different user. In LINUX newlisp-tk.tcl is centrally installed as newlisp-tk in usr/bin. When running newlisp-tk it searches for the config file newlisp-tk.config the users home directory.


Multiple instances of raw newLISP without tk

When running newLISP in raw mode without the graphical front-end, no special preparations are necessary to run multiple instances, just execute newlisp.exe on Windows 2000/XP or newlisp on LINUX for several instances.



The console window in newLISP-tk

newLISP statements can be entered directly in the console window for evaluation. When entering parentheses the cursor will jump to the matching parenthesis. This helps to enter LISP expressions with correctly balanced parentheses. Many Ctrl-key combinations are available as shortcuts to menu items. The most important functions are available as icons.

Almost all short cut Ctrl-key combinations are documented inside the menus or can be read in the bottom status line of the console when moving the mouse over the icons.

The following keys can be used for editing and retrieval of the command history and are not documented anywhere else:

Up arrow previous entry
Down arrow next entry
Home or Ctrl-A beginning of line or [End]
End or Ctrl-E end of line or [Home]

While in the console window menu, commands can be accessed with the mouse or with keyboard shortcuts specific to the underlying host operating system. On Windows press Alt- and the first letter of the item in the main console menu.

The mouse can also be used to select text for copy / cut / paste anywhere in the console window. Pressing the right mouse button opens up a pop up menu. On MacOS X press Ctrl-Button instead.

The Load ... option in the file menu can be used to load newLISP source files. The Save All as ... option can be used to save the whole contents of the newLISP workspace in to a file.



How to use the editor / browser

To open up a browser / editor select editor from the console menu or click the icon available. More than one editor / browser can be open at the same time. The main use of the editor / browser is for editing newLISP function definitions and for browsing newLISP code. The editor / browser contains three main areas:


The editor window

When editing text in this window, parenthesis matching occurs when typing in parentheses. This helps in entering correctly balanced LISP expressions. When double clicking the mouse anywhere in an expression the scope of the current expression will be highlighted. This helps identifying correct syntax and helps recognizing the structure of an expression.

Copy, cut and paste work just like in the console window. To evaluate a definition select Evaluate or EvaluatePrint from the menu. When Evaluate is chosen only error conditions while evaluating are displayed in the console. When using EvaluatePrint also the result of the evaluation will be printed in the console window. When evaluating the editor window always look for output in the console window.

Although the editor window is normally used only for entering function definitions, it can also be used for entering any other LISP expression for evaluation and re-editing. While the console limits input to only one line, multi line expressions can be entered in the edit window.

The right mouse button offers a pop up menu similar to the console pop up working only on the part in the edit window that is currently selected.

When editing use Save Context As from the file menu to save your work inside a given name space.


The context list box

This list box on the top left of the editor / browser shows the different newLISP contexts or name spaces. When clicking one of these with the mouse, the symbols contained in this name space are displayed in the symbols list box below. Everything contained in a specific context can be saved by using the Save Context As option in the File menu.


The variable list box

This list box contains all symbols of a specific name space or context. The symbols serve as variable containers or contain LISP lambda expressions defining user functions. When clicking on these symbols their content appears in the editor window and can be modified and evaluated to make the change effective.

When a symbol is selected it also can be deleted from the name space using the Delete option in the menu. Note that the functions in the SYSTEM name space should not be changed and are protected from deletion. These functions are used by newLISP and newLISP-tk for communicating. Note also that a symbol should only be deleted if no references to it exist in other functions. The function tk in the MAIN name space is also protected and should also not be modified as it is used for communications from newLISP to TK.


Keyboard shortcuts

Many different keyboard shortcuts in form of Ctrl-key combinations are available in the browser / editor. They are documented in the menu and visible in the status line at the bottom when moving the mouse over the icons.



How to use the debugger

To debug a function close all browsers and open the debugger from the consoles main menu. In the console window change to the context, in which the function to debug is at home. For example: if the function to debug is MyContext:a-func execute:

(context 'MyContext)

this will change the current context in the console and for the debugger. Next in the console window execute:

(debug (a-func a b c))

the function a-func with its parameters a b c will now appear in the debugger window with the first expression highlighted. Using the left two buttons in the debugger evaluation will proceed step wise or entering into each sub expression o evaluated jumping to the next expression.. The third button can be used to continue evaluation without debugging. In this case the debugger closes and evaluation proceeds as if the debugger never has been open. The last button in the debugger quits the debugging session and interrupts the evaluation process completely.

Evaluation while debugging is somewhat slower and some of the pushbuttons in the debugger will be disabled for certain time intervals.

All normal output of evaluation will be directed as usual to the console window. Error messages will appear in the debugger window and highlighted in a red color. Optionally debugging can also be controlled from the console window pressing the keyboard keys S,N C or Q and <enter>. Ctrl-B will switch the focus back to the console window. From the console Ctrl-G will switch back into the debugger.

At any time when the debugger stops, expressions can be evaluated inn the console window and variables (symbols) can be entered to inquire their contents. The browser / editor can also be used to evaluate expressions or inquire the contents of symbols.


Starting debugging during program execution

Debugging can be started after a program started execution by inserting (trace true) statements before the call to a user-defined function. After trace has been set to true and the program enters the user defined function, console based debugging will appear in the console window. The graphical debugger can now be started. After the first step entering the letter S in the console windows the graphical debugger will take over.



Writing applications with newLISP and Tcl/Tk

This documentation cannot be an introduction to Tcl/Tk. We recommend studying one of the many introductory books that are available for Tcl/Tl. The most important elements are presented here and we recommend studying the included example programs.

To execute Tcl/Tk statements from newLISP use the tk function. The tk function sends a Tcl/Tk statement to the Tcl/Tk module and evaluates it. Try the following:

(tk "toplevel .mywin")

will create a top-level window and pop it up over the console. Now try:

(tk "button .mywin.ok -text OK")

nothing will change in the top-level window at this time until entering:

(tk "pack .mywin.ok -padx 10 -pady 10")

the last line will make the button appear in the window previously created.


Details on the tk function

The tk function can take more than one parameter and will evaluate these and concatenate to a string before sending it out to Tcl/Tk. For example we could have written the change-color function this way:

(define (change-color) (tk".mywin config -background " color))

Let us assume we previously assigned a color name to the newLISP symbol color:

(set 'color "red")

The tk function will now correctly configure a Tcl/Tk statement as previously used, evaluating color to "red" and concatenating it to the previous string. Care must be taken to include spaces for separating variables, like the space after the word -background.


Callback functions from Tcl/Tk

In order to connect the OK button to execute a newLISP function we need a callback initiated from the button press. This is done as follows:

First we need the newLISP callback function:

(define (say-hello) (println "HELLO WORLD"))

Now we need to configure the OK button with a command to be executed on button press:

(tk ".mywin.ok config -command {Newlisp {(say-hello)}}")

Note the use of different type of parenthesis. Tcl/Tk uses curly braces to group expressions an arguments. newLISP uses normal round parenthesis.

When pushing the OK button now, we will see HELLO WORLD twice, the first is the action from the println statement, the second is the return value from the function say-hello, which is the return value of the last function executed. We can suppress the display of the return value in the console using the newLISP function silent:

(tk ".mywin.ok config -command {Newlisp {(silent (say-hello))} }")

Note, that Newlisp is a Tcl/Tk function used to call back to newLISP, its argument should always be an expression executed in newLISP enclosed in braces { }, in this case (say-hello).

On some widgets Tcl/Tk supplies an extra argument to the callback function, but the built-in Tk function Newlisp allows only one. Writing a simple wrapper around it solves the problem. The following example of a Tk scale widget shows this technique:

(context 'SCALE)

(define (run )
(tk "proc ScaleValue { val } { Newlisp \"(silent (SCALE:set-value $val ) )\" }")
(tk "if {[winfo exists .example] == 1} {destroy .example}")
(tk "toplevel .example")
(tk "scale .example.scale -from -10 -to 20 -length 200 -orient horizontal")
(tk ".example.scale configure -command {ScaleValue}")
(tk "pack .example.scale"))

(define (set-value x)
(print x " "))

(context 'MAIN)

Sometimes we want the callback do something back in the TK widget, i.e. we might want the OK button change the color of the window. First define a new callback function:

(define (change-color) (tk ".mywin config -background red"))

Now reconfigure the button:

(tk ".mywin.ok config -command {Newlisp { (change-color) }}")

Now when clicking the OK button the background of .mywin will turn red.

The following example shows how to transfer text from an entry widget written in Tcl/Tk to newLISP:

(define (entry )
(tk "if {[winfo exists .entry] == 1} {destroy .entry}")
(tk "toplevel .entry")
(tk "wm title .entry {entry example}")
(tk "entry .entry.e -width 30 -textvariable ::display")
(tk "bind .entry.e <Return> { Newlisp {(silent (get-entry-text))} }")
(tk "pack .entry.e"))

(define (get-entry-text )
(println (tk "set ::display")))

Whenever return/enter key is pressed in the text of the entry widget will be printed in the console window.


Tcl/Tk variables

Tcl/Tk variables like for example $var will not work when using newLISP-tk. Instead of writing:

(tk "set win [toplevel .mywin]")
(tk "$win config -background green") ;;this will not work

This will not work because the variable win from the first statement will not be known in the second statement. As an alternative both statements could be put together in one tk statement separated by a semicolon ;:

(tk "set win [toplevel .mywin]; $win config -background green") 

To keep longer Tcl/Tk code portions together and over several lines see the next chapter.

another way is, to store the contents of the Tcl/Tk variable in a newLISP variable:

(set 'win (tk "toplevel .mywin"))
(tk win " config -background green")

Observe the space before config to separate .mywin and config when stringed together by the tk function.

This will the return value from (tk "toplevel .mywin") to the newLISP variable win. This method also shows, how to pass variable content back and forth between newLISP and Tcl/Tk.

As shown previously, variables get lost in between different tk statements because Tcl/Tk statements sent to the Tcl/Tk interpreter are evaluated inside a subroutine and not on the toplevel. Every variable created inside the subroutines name space get lost after the tk statement finished. There is a way in Tcl/Tk to refer to variables in a global name space using the global name space qualifier ::. This way variables are conserved in between tk calls:

;; create a variable in the current Tcl/Tk subroutine name space

(tk "set ::win [toplevel .mywin]")
(tk "$::win config -background green")

The last example uses the last technique but in a bigger example with a text variable in an entry widget:

(define (test)
(tk "if {[winfo exists .test] == 1} {destroy .test}")
(tk "toplevel .test")
(tk "set ::display {entry!}")
(tk "wm title .test $::display")
(tk "entry .test.e -width 30 -textvariable ::display")
(tk "pack .test.e"))

This technique is only necessary when the same variable is referenced from different calls with the tk function. In a contiguous portion of Tcl/Tk code it is not necessary to use global variables.


Large Tcl/Tk portions of code

Note, that since version 1.0 of newLISP-tk, tk statements may contain line-breaks. This offers the possibility to pass bigger Tcl/Tk code portions using one tk statement and enclosing bigger text portions in [text] ... [/text] tags:

(context 'SCALE)

(tk [text]
## longer portion of Tcl/Tk source #################################

proc ScaleValue { val } {
Newlisp "(silent (SCALE:set-value $val ) )"
}

if {[winfo exists .example] == 1} {destroy .example}
toplevel .example
scale .example.scale -from -10 -to 20 -length 200 -orient horizontal
.example.scale configure -command {ScaleValue}
pack .example.scale

####################################################################
[/text])

(define (set-value x)
(print x " "))

(context 'MAIN)

Inside the [text][/text] tags quotes " and braces { } can be used freely. Text between [text][/text] tags will be passed without any translation.


Command line arguments

When executing(main-args) in the newLISP-tk GUI environment something like the following is returned:

("c:/newlisp/newlisp" "-p" "64001")

The arguments when loading newlisp.exe (Win32) or newlisp (Linux) are shown. The first part can help to identify the startup directory. The second and third parameter start up newLISP for communications with the GUI front-end. To read command line arguments from the newLISP-tk command line use (tk-args). For example when starting newLISP-tk as follows:

newlisp-tk myApp.lsp 1 2 3 hello

the following would be returned from (tk-args) in myApp.lsp:

("1" "2" "3" "hello")


Delivering applications with newLISP-tk

newLISP-tk can take a lisp file as a command line parameter or a specification in newlisp-tk.config can tell newlisp-tk.exe to load a newLISP application. This together with the ability to hide Tcl/Tk windows enables the delivery of applications in newLISP-tk where the developer environment is never visible and the application has the feel of an independent freestanding application.

The included example tcltk-app.lsp illustrates this. On the command line and in the newlisp directory enter:

newlisp-tk tcltk-app.lsp

As an alternative edit newlisp-tk.config and add or edit the specification:

set Ide(newLISPapp) "tcltk-app.lsp"

Now calling newlisp-tk alone will start up tcltk-app.lsp without the need to specify the application on the command line.

A little window will appear with an exit button without ever showing the newLISP-tk development environment. In order for this to work newlisp-tk on LINUX or newlisp-tk.exe on Windows should be in the execution path of the operating system's environment. A link can be created with an application specific icon on LINUX or Windows 2000/XP and the user will only be exposed to the application itself.

This is the contents of tcltk-app.lsp:

;; tcltk-app.lsp - application demo
;; (context 'App) (define (app-example ) (tk "toplevel .appex") (tk "button .appex.bExit -text Exit -command exit") (tk "pack .appex.bExit -side top -padx 60 -pady 30") (tk "bind .appex <destroy> exit")) (context 'MAIN) (tk "wm withdraw .") (App:app-example)

The two critical statements are:

(tk "bind .appex <destroy> exit"))

and

(tk "wm withdraw .")

The first statement makes sure that the application exits correctly even if the Exit button is not used but the application window is closed using the closing icon in the windows frame.

The second statement hides the newLISP-tk development environment. Another method to suppress the newLISP-tk console is available. In the file newlisp-tk.config include the following line:

set Ide(initCommand) "wm withdraw ."

This will suppress the newLISP-tk console window without any flicker.

To deliver an application called MyApp on Windows 2000/XP to an end user the following files should be included:

File name Description
newlisp.exe newLISP executable
newlisp-tk.exe newLISP loader GUI and Tcl/Tk runtime libraries
newlisp-tk.config config file, not strictly necessary if default configuration is Ok, can be generated with Options/Save
MyApp newLISP source file containing your application

Most installer programs offer facilities to create links with icons on the operating system's desktop in an automated fashion.

On LINUX only the file MyApp would have to be delivered as Tcl/Tk is typically already installed on the system.



Special considerations using newLISP-tk

Most of the following considerations are trivial for users familiar with LINUX or other UNIX like operating systems and for users familiar running the command shell in Windows, but should be mentioned for users accustomed to use Windows only via it's graphical user interface.

There are some differences when running newLISP-tk versus running newLISP using the newlisp or newlisp.exe program binary alone.



Options and settings

On startup newLISP-tk tries to read a file called newlisp-tk.config. This file contains Tcl/Tk statements to configure various settings.

# newlisp-tk.config - newLISP Tcl/Tk configuration file
#
# This file is generated by menu "Options/Save settings"
#

set Ide(HelpProgram) "$env(PROGRAMFILES)/Internet Explorer/IEXPLORE.EXE"
set Ide(TCLTKhost) "127.0.0.1"
set Ide(TCLTKport) "64002"
set Ide(WinPosX) "183"
set Ide(WinPosY) "120"
set Ide(consoleBackground) "white"
set Ide(consoleForeground) "navy"
set Ide(consoleHeight) "30"
set Ide(consoleWidth) "80"
set Ide(debuggerBackground) "white"
set Ide(debuggerForeground) "navy"
set Ide(debuggerHeight) "24"
set Ide(debuggerWidth) "65"
set Ide(editorBackground) "white"
set Ide(editorForeground) "navy"
set Ide(editorHeight) "30"
set Ide(editorWidth) "65"
set Ide(fontName) "Fixedsys"
set Ide(fontSize) "10"
set Ide(imageDir) "/freewrap/images"
set Ide(initCommand) ""
set Ide(lispFileExtension) ".lsp"
set Ide(maxHistory) "50"
set Ide(newLISPapp) ""
set Ide(newLISPhost) "127.0.0.1"
set Ide(newLISPport) "64001"
set Ide(platform) "windows"

The previous example of a newlisp-t.config file contains the defaults installed on MS Wndows. Note that Windows accepts forward slashes in path names as long as they do not occur after a drive letter.

When running on Windows and selecting Options/Save Settings from the console menu all $env(PROGRAMFILES) specs will be replaced with the correct names of the local Windows installation, i.e. C:\Program Files\newlisp on English language Windows. When running on LINUX a different file of defaults will be generated. The file is generated in Tcl/Tk syntax.

When saving, all quotes are replaced with {,} curly braces as string delimiters.

While font and color attributes for the console and editor can be configured from newLISP-tk menus, other attributes have to be changed manually using a text editor like vi or emacs on LINUX or notepad.exe on Windows. The settings in the newlisp-tk.config file will then overwrite the default settings in newLISP-tk for a specific platform.

Note, that on Windows 2000/XP file and directory path names in newlisp-tk.config should be written using the forward slash (like in LINUX/UNIX).

On LINUX all network ports up to 1024 can only be used by the root user. Make sure the port configured is not used by anything else in the system. The TCLKhost and newLISPhost addresses should not be changed unless care is taken to change the program line for starting up the newlisp or newlisp.exe binary in the source file newlisp-tk.tcl . In case that newlisp and the front-end newLISP-tk are running on different machines, the newlisp binary will have to be launched separately and not automatically from newlisp-tk.tcl, or newlisp-tk.exe.



License

The source code to newLISP and newlisp-tk.tcl is distributed under the GNU Public License or GPL, the text of which is included in this manual.. For the licensing of Tcl/Tk (licensed under another Open Source license) see:

http://www.scriptics.com
http://tcllib.sourceforge.net

The source code for newlisp and newLISP-tk, if not included in this distribution, can be obtained at the following links:

http://www.nuevatec.com
http://www.newlisp.org
http://sourceforge.net/projects/newlisp/





GNU Free Documentation License

Version 1.2, November 2002

Copyright (C) 2000,2001,2002 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 functional and useful 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, in any medium, that contains a notice placed by the copyright holder saying it can be distributed under the terms of this License. Such a notice grants a world-wide, royalty-free license, unlimited in duration, to use that work under the conditions stated herein. The "Document", below, refers to any such manual or work. Any member of the public is a licensee, and is addressed as "you". You accept the license if you copy, modify or distribute the work in a way requiring permission under copyright law.

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. (Thus, 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. If a section does not fit the above definition of Secondary then it is not allowed to be designated as Invariant. The Document may contain zero Invariant Sections. If the Document does not identify any Invariant Sections then there are none.

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 Front-Cover Text may be at most 5 words, and a Back-Cover Text may be at most 25 words.

A "Transparent" copy of the Document means a machine-readable copy, represented in a format whose specification is available to the general public, that is suitable for revising the document 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, or absence of markup, has been arranged to thwart or discourage subsequent modification by readers is not Transparent. An image format is not Transparent if used for any substantial amount of text. 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, PostScript or PDF designed for human modification. Examples of transparent image formats include PNG, XCF and JPG. Opaque formats include 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, PostScript or PDF 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.

A section "Entitled XYZ" means a named subunit of the Document whose title either is precisely XYZ or contains XYZ in parentheses following text that translates XYZ in another language. (Here XYZ stands for a specific section name mentioned below, such as "Acknowledgements", "Dedications", "Endorsements", or "History".) To "Preserve the Title" of such a section when you modify the Document means that it remains a section "Entitled XYZ" according to this definition.

The Document may include Warranty Disclaimers next to the notice which states that this License applies to the Document. These Warranty Disclaimers are considered to be included by reference in this License, but only as regards disclaiming warranties: any other implication that these Warranty Disclaimers may have is void and has no effect on the meaning of this License.

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 (or copies in media that commonly have printed covers) 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 computer-network location from which the general network-using public has access to download using public-standard network protocols a complete Transparent copy of the Document, free of added material. 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 fewer than five), unless they release you from this requirement.
  • 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", Preserve 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. For any section Entitled "Acknowledgements" or "Dedications", Preserve the Title of the section, 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 to be Entitled "Endorsements" or to conflict in title with any Invariant Section.
  • O. Preserve any Warranty Disclaimers.

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, and that you preserve all their Warranty Disclaimers.

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, is called an "aggregate" if the copyright resulting from the compilation is not used to limit the legal rights of the compilation's users beyond what the individual works permit. When the Document is included in an aggregate, this License does not apply to the other works in the aggregate which 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 half of the entire aggregate, the Document's Cover Texts may be placed on covers that bracket the Document within the aggregate, or the electronic equivalent of covers if the Document is in electronic form. Otherwise they must appear on printed covers that bracket 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, and all the license notices in the Document, and any Warranty Disclaimers, provided that you also include the original English version of this License and the original versions of those notices and disclaimers. In case of a disagreement between the translation and the original version of this License or a notice or disclaimer, the original version will prevail.

If a section in the Document is Entitled "Acknowledgements", "Dedications", or "History", the requirement (section 4) to Preserve its Title (section 1) will typically require changing the actual title.

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.






GNU GENERAL PUBLIC LICENSE

Version 2, June 1991

Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA. Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed.



PREAMBLE

The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too.

When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things.

To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it.

For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights.

We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software.

Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations.

Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all.

The precise terms and conditions for copying, distribution and modification follow.



GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you".

Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does.

1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program.

You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee.

2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions:

a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change.

b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License.

c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.)

These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it.

Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program.

In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License.

3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following:

a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or,

c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.)

The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable.

If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code.

4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program 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.

5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it.

6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License.

7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program.

If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances.

It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice.

This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License.

8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License.

9. The Free Software Foundation may publish revised and/or new versions of the General Public 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.

Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation.

10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally.



NO WARRANTY

11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION.

12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.





END OF TERMS AND CONDITIONS