pilib Manual
\input texinfo
This manual is for pilib, a Platform Independent Library for use with Fortran 9x.
Copyright (c) Martin Hierholzer 2003-2006.
Special thanks to Vincent Magnin for testing on Win32.
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".
This library is an attempt to build a platform and compiler independent library for Fortran 9x. It was created to get rid of problems caused by using different Fortran compilers on different operating systems. The goal is to substitute the compiler dependent runtime libraries, and to make it possible to build graphical user interfaces with Fortran very easily.
Caution: pilib is still under development. Many functions are still missing, and some may not function correctly. Please watch out for TODO lists at the end of each function description, as they may give you hints on what is missing or not working.
Please always use the newest version from http://sourceforge.net/projects/pilib
1. Introduction - Basic ideas of pilib
For stuctural reasons, pilib is subdivided into several categories (see Categories - Reference of functions by category). Before calling any library routine, you need to initialize the library (see piinit). Afterwards you can simply call any routine.
The routines in category "User Interface" (starting with the letters gk) are based on GTK+ 2. This implies, that they use the same hierachical structure. For more details see GTK+ documentation and User Interfaces - Creating user interfaces with pilib.
For a short introduction how to start using pilib, see chapter Creating programs - Introduction into usage of pilib.
2. Installation - Configuring and installing pilib
UNIX/LINUX platforms
====================
The simplest way to compile this package is:
1. `cd' to the directory containing the package's source code and type
`./configure' to configure the package for your system. If you're
using `csh' on an old version of System V, you might need to type
`sh ./configure' instead to prevent `csh' from trying to execute
`configure' itself.
Running `configure' takes awhile. While running, it prints some
messages telling which features it is checking for.
2. Type `make' to compile the package.
3. Type `make install' to install the programs and any data files and
documentation. Make sure that you have all necessary permissions
to install the library (e.g. log in as root)
4. You can remove the program binaries and object files from the
source code directory by typing `make clean'. To also remove the
files that `configure' created (so you can compile the package for
a different kind of computer), type `make distclean'. There is
also a `make maintainer-clean' target, but that is intended mainly
for the package's developers. If you use it, you may have to get
all sorts of other programs in order to regenerate files that came
with the distribution.
Compilers and Options
---------------------
Some systems require unusual options for compilation or linking that
the `configure' script does not know about. You can give `configure'
initial values for variables by setting them in the environment. Using
a Bourne-compatible shell, you can do that on the command line like
this:
CC=gcc F95=ifort CFLAGS=-O2 ./configure
Or on systems that have the `env' program, you can do it like this:
env CC=gcc F95=ifort CFLAGS=-O2 ./configure
Installation Names
------------------
By default, `make install' will install the package's files in
`/usr/local/bin', `/usr/local/man', etc. You can specify an
installation prefix other than `/usr/local' by giving `configure' the
option `--prefix=PATH'.
Operation Controls
------------------
`configure' recognizes the following options to control how it
operates.
`--cache-file=FILE'
Use and save the results of the tests in FILE instead of
`./config.cache'. Set FILE to `/dev/null' to disable caching, for
debugging `configure'.
`--help'
Print a summary of the options to `configure', and exit.
`--quiet'
`--silent'
`-q'
Do not print messages saying which checks are being made. To
suppress all normal output, redirect it to `/dev/null' (any error
messages will still be shown).
`--srcdir=DIR'
Look for the package's source code in directory DIR. Usually
`configure' can determine that directory automatically.
`--version'
Print the version of Autoconf used to generate the `configure'
script, and exit.
`configure' also accepts some other, not widely useful, options.
Windows platforms
=================
The recommended way of compiling pilib on Windows is using MinGW32.
However there are other ways that may work as well, but they are
more complicated and may lead to errors.
Compiling pilib using MinGW32
-----------------------------
1. Download and install MinGW32 and MSYS.
2. Download and install the GTK+2 development package (with installer),
e.g. from http://gladewin32.sourceforge.net/. Be sure that the
installer correctly detects your installation of MinGW/MSYS!
This has been tested using gtk-win32-devel-2.8.10-rc1.
3. Follow the other steps as described for UNIX platforms
4. You will find your DLL in ./src/.libs
Do not try to rename it, as this may break linking.
5. For use with Microsoft linker (e.g. with Compaq Visual Fortran) you
need to create an import library. This may be done with the tool
"lib" bundled with the linker:
lib /machine:i386 /def:libpilib-0.def
Compiling pilib using Visual Studio
-----------------------------------
If you want to compile this package with Microsoft Visual Studio, you
will find the appropriate project files in the win32 subdirectory.
First you need do install a Win32 development package of GTK+-2. Than
you need to update the "additional include directories" and the
"additional library directories" fields in the project property page
according to your GTK+-2 installation.
Open 'pilib.vcproj' and 'pilibf.vcproj' project files with Visual Studio
2003. Before compiling, you will need to customize the build process for
the Fortran 9x source files. Right click on every Fortran 9x source file
of the project 'pilibf' and enter whatever is necessary to compile these
files with your Fortran 9x compiler. Note that you will need a compiler
which generates object files compatible with Microsoft Linker, or
customization of the link process will be necessary, too.
Compiling pilib using CygWIN
----------------------------
(This has been tested only with CygWIN gcc, not with mingw on CygWIN)
1. Download and install CygWIN with gcc
2. Download and install the GTK+2 development package (with installer),
e.g. from http://gladewin32.sourceforge.net/. Be sure that the
installer correctly detects your installation of cygwin!
This has been tested using gtk-win32-devel-2.8.10-rc1.
3. Follow the other steps as described for UNIX platforms
4. You will find your DLL in ./src/.libs
Do not try to rename it, as this may break linking.
3. Creating programs - Introduction into usage of pilib
For an easy introduction into pilib we will first discuss the typical "hello world" example:
program example
use pimod ! (1)
call piinit ! (2)
call gkwindow(c('pilib example'), 25,0, ihwin,iclos) ! (3)
call gktext(c('Hello World'),ihtext) ! (4)
call gkput(0,0,-1,-1,ihwin,ihtext) ! (5)
call gkshow(ihwin) ! (6)
do while(iclos.eq.0) ! (7)
call gkproc
end do
call gkdestroy(ihwin) ! (8)
end program example
First, we have to make use of the pilib Fortran 9x module pimod (1). Please note, that the module files will be installed into the include directory of your system (e.g. /usr/local/include on Unix/Linux). You will need to tell this to your Fortran compiler, or (some compilers do not know an appropriate option for this) copy/link the file to your source file directory.
Than the library will be initialized (2), this is always necessary before using any library funtions.
Next we create a GTK+ window with title "pilib example" (3). We have to convert the standard Fortran 9x string 'Hello World' into a pilib string using the function c. Now we can create a text widget (4) and put it into the window (5). Note that you can put only one widget into the window this way, see gkcontain getting around this. Now we can display the window (6) and call gkproc until the window manager tells us to close the window (7). At last we destroy the window (8).
Now you will have to compile this program with your Fortran 9x compiler and link it with two libraries: libpilib and libpilibf. pilib has been devided into two parts, because putting module functions into shared libraries and mixing Fortran and C routines in to a single shared libary may not work. So libpilib is a dynamic library containing all C routines, and libpilibf is a static library containing all Fortran routines. Because libpilib is a shared library you do not need to link with GTK+ & Co.
4. Modifying pilib - Instructions for modifying the library itself
As pilib is opensource and distributed under terms of the GPL, you are allowed to modify pilib for your need. Espacially because pilib is still under development, you meight need to add missing functions or correct some bugs. Nevertheless you should keep in mind the following hints while changing the source code. They are very important for keeping pilib compiler and platform independent.
-
Please take care of the initial comment block of each source file, espacially if you add new functions. The format of this comment block might be very fragile (as it will be interpreted by srcproc). Even a single space character can be important!
Also note, that the Fortran interface given in these lines are inserted into the module and thus will be really processed by the Fortran 9x compiler. If you get errors compiling pimod.f90 check for the correct syntax here! Additionally these interfaces have to match the real functions, of course.
-
Do not use any tab characters anywhere. Tabs are interpreted by different editors in different ways, so they easily produce an optical mess. Be sure to switch the insertion of tab characters while automatic indent of. Else most editors do insert tab characters by default, even if you do not press the tab key!
-
If you add any source file, just run 'doautoconf' in pilibs root directory, than run 'configure' and 'make' as usual. If you want to recreate a redistributable source package, run 'makedist' (not 'make dist'!).
-
Do not use Fortran 9x pointers with C programs! The way a pointer is kept in memory is very different on various Fortran compilers. In Fortran 9x, a pointer is never (apart from some very basic and not useful cases) simply an address, in contrast to C/C++. The compiler must save additional information (like the shape and the dimensions of an array) with this address. In other words, it is not possible to modify Fortram 9x pointers in C programs, so it makes no sense to use them.
-
Please submit your changes via e-mail to <martin.hierholzer@googlemail.com>, if they may be of general interest. CVS access is also available at http://www.sourceforge.net/projects/pilib
5. User Interfaces - Creating user interfaces with pilib
The subroutines for creating user interfaces are based on GTK, and therefore called gk*. For this reason, pilib uses the same hierarchical structure, but it makes several simplifications. In general, user interfaces consists of several elements which are called "widgets". In most cases, the widgets are simply objects the user can see, but there are some widgets which are invisible.
In the following a step-by-step guide for creating graphical user interfaces:
-
Initialize the library, if this is not already done. It is done by calling piinit (see piinit).
-
Create a window using gkwindow (see gkwindow). The window will initially not be visible.
-
Since a window can contain only one single widget, you need to create a so called container (using gkcontain, see gkcontain). This is an invisible widget, that simply organizes the placement of multiple widgets (which are called its "childs"). There are several types of widgets which differs in the way they organize its childs. For example, you may want to specify simply the coordinates of the childs ("fixed" layout), or you can create a table and place the childs into its cells. For most applications, using the table layout will be the best choice, as you do not need to know the sizes of the childs (the required space of some widgets may vary from system to system). It even allows you to specify the behaviour on changing the size of the window.
-
After creating the container you have to put the container into the window (gkput, see gkput).
-
Now you are ready to create several widgets like texts (gktext, see gktext) or buttons (gkbutton, see gkbutton). You also need to place these widget into the container. The appropriate subroutine for doing this depents on the type of the container. For instance, for the fixed layout you should use gkput (see gkput), while gkputtable (see gkputtable) should be used for table layouts.
It is also possible to put containers into a container. Sometimes it may be usefull to cascade several tables, or combine a table layout with a fixed layout this way.
-
Finally you have to make the window with all its childs visible. You can do this by calling gkshow (see gkshow).
-
For allowing the library to process user actions, you need to call gkproc (see gkproc) contineously. If you do e.g. a longer calculation and stop calling gkproc for a while, the user will see a not responding application, so make sure that this will never happen! Note, that sometimes multiple calls to gkproc are needed for processing a single user action. Thus calling gkproc e.g. once per second is not sufficient.
-
After showing the window it is still possible to add and remove widgets. When adding new widgets, do not forget to make them visible by calling gkshow.
-
Calling gkdestroy (see gkdestroy) you can remove either single widgets or whole windows (or containers) with all its childs. Note, that the window will remains open, even if the user requests to close it, until you destroy it by calling gkdestroy.
A. Index - Reference of functions by name
A.1 ficlose
Name: ficlose
Category: File I/O
Synopsis: Close file
interface
subroutine ficlose(ihfile,ierr)
integer*4 :: ihfile, ierr
end subroutine ficlose
end interface
Meaning of arguments:
ihfile [in] Handle of file
ierr [out] Error code
A.2 fidelete
Name: fidelete
Category: File I/O
Synopsis: Delete file
interface
subroutine fidelete(filena,ierr)
use pimodtypes
type(string) :: filena
integer*4 :: ierr
end subroutine fidelete
end interface
Meaning of arguments:
filena [in] Filename of (existing) file to be removed
ierr [out] Error code
A.3 fiflush
Name: fiflush
Category: File I/O
Synopsis: Flushes internal write buffer of file
interface
subroutine fiflush(ihfile,ierr)
integer*4 :: ihfile, ierr
end subroutine fiflush
end interface
Meaning of arguments:
ihfile [in] Handle of file
ierr [out] Error code
A.4 filist
Name: filist
Category: File I/O
Synopsis: List files in a given directory
interface
subroutine filist(path,nmax,list,n,ierr)
use pimodtypes
type(string) :: path
integer*4 :: nmax
type(string) :: list(nmax)
integer*4 :: n, ierr
end subroutine filist
end interface
Meaning of arguments:
path [in] Path of directory
nmax [in] Maximum number of list items to get
list [out] Array of directory entries
n [out] Number of items in directory. Can be greater
than nmax! In this case, only nmax items
are listed in list.
ierr [out] Errorcode. Even 0 if array to small!
A.5 fimove
Name: fimove
Category: File I/O
Synopsis: Move/rename file or rename directory
interface
subroutine fimove(oldnam,newnam,ierr)
use pimodtypes
type(string) :: oldnam,newnam
integer*4 :: ierr
end subroutine fimove
end interface
Meaning of arguments:
oldnam [in] Filename of (existing) file to be moved
newnam [in] Target filename. Must not be an existing file
ierr [out] Error code
A.6 fiopen
Name: fiopen
Category: File I/O
Synopsis: Open/create file
interface
subroutine fiopen(filna,mode,enc,ihfile,ierr)
use pimodtypes
type(string) :: filna, mode,enc
integer*4 :: ihfile, ierr
end subroutine fiopen
end interface
Meaning of arguments:
filna [in] Filename
mode [in] Access mode
"r": Read only. File must be existing
"w": Write only. File will be emptied if existing
"a": Append. File will be created if not existing
"r+": Read and write. File must be existing
"w+": Read and write. File will be emptied if existing
"a+": Read and append. File will be created if not existing
enc [in] Codepage of content of file (will be convertet to/from UTF-8 while
reading/writing) or NULLSTRING for binary reading/writing
Examples: "UTF-8", "CP473", "CP1252"
ihfile [out] Handle of file or 0 on error
ierr [out] Error code
A.7 fiposition
Name: fiposition
Category: File I/O
Synopsis: Set position for reading/writing of file
interface
subroutine fiposition(ibt,ihfile,ierr)
integer*4 :: ibt, ihfile, ierr
end subroutine fiposition
end interface
Meaning of arguments:
ibt [in] Position in bytes relativ to beginning of file, or:
0: Beginning of file
-1: End of file
ihfile [in] Handle of file
ierr [out] Error code
A.8 firead
Name: firead
Category: File I/O
Synopsis: Read file
interface
subroutine firead(data, n, ihfile,ierr)
use pimodtypes
type(string) :: data
integer*4 :: n, ihfile,ierr
end subroutine firead
end interface
Meaning of arguments:
data [out] Read data
n [in] Number of characters (bytes if binary file) to read
ihfile [in] Handle of file
ierr [out] Error code
TODO:
- Memory allocation is NOT correct (multibyte chars)
A.9 fireadtoend
Name: fireadtoend
Category: File I/O
Synopsis: Read file to its end
interface
subroutine fireadtoend(data, ihfile,ierr)
use pimodtypes
type(string) :: data
integer*4 :: ihfile,ierr
end subroutine fireadtoend
end interface
Meaning of arguments:
data [out] Data read
ihfile [in] Handle of file (opened with fiopen)
ierr [out] Error code
A.10 fitest
Name: fitest
Category: File I/O
Synopsis: Check file type
interface
logical*4 function fitest(filna,flags)
use pimodtypes
type(string) :: filna
integer*4 :: flags
end function fitest
end interface
Meaning of arguments:
filna [in] Filename
flags [in] Flags to be tested
1: Regular file (no directory)
2: Symbolic link
4: Directory
8: Executable
16: File exists
Return value: .true. if one of the flags is set
.false. if none of the flags is set
A.11 fiwrite, fiwritestring
Name: fiwrite, fiwritestring
Category: File I/O
Synopsis: Write data into file
Currently only writing of strings and integer*1 arrays is supported.
interface fiwrite
subroutine fiwritestring(data, nbw, ihfile,ierr)
use pimodtypes
type(string) :: data
integer*4 :: nbw, ihfile,ierr
end subroutine fiwritestring
module procedure fiwritei1
end interface fiwrite
Meaning of arguments:
data [in] Data to be written. May be of one of the
following types:
type(string)
integer*1,dimension(:)
nbw [out] Number of bytes written
ihfile [in] Handle of file
ierr [out] Error code
A.12 gkaccel
Name: gkaccel
Category: User Interface
Synopsis: Add accelerator key to widget
interface
subroutine gkaccel(key,mod,signal,widget,window,accel)
use pimodtypes
type(string) :: key
integer*4 :: mod
type(string) :: signal
integer*4 :: widget,window
integer*4 :: accel
end subroutine gkaccel
end interface
Meaning of arguments:
key [in] Accelerator key. Examples: 'F1', 'Enter', 'A'
mod [in] Modifier flags for keystroke:
1: Shift
2: Lock
4: Control
8: Alt / Meta
signal [in] Signal to be submitted on activation of accelerator:
'clicked' for buttons
'activate' for menu items
widget [in] Handle of widget being accelerated
window [in] Handle of parent window of widget
accel [out] Handle of accelerator
A.13 gkbar
Name: gkbar
Category: User Interface
Synopsis: Display progress bar
interface
subroutine gkbar(widget)
integer*4 :: widget
end subroutine gkbar
end interface
Meaning of arguments:
widget [out] Handle of progress bar
A.14 gkbutton
Name: gkbutton
Category: User Interface
Synopsis: Create button
interface
subroutine gkbutton(text,button,iclick)
use pimodtypes
type(string) :: text
integer*4 :: button
integer*4 :: iclick
end subroutine gkbutton
end interface
Meaning of arguments:
text [in] Lable of button
button [out] Handle of button
iclick [out] Will be set to 1 as soon as the button has been clicked.
This happens usually after this routine has returned.
A.15 gkcbset
Name: gkcbset
Category: User Interface
Synopsis: Callback functions for setting a variable
Only internal usage!
A.16 gkcontain
Name: gkcontain
Category: User Interface
Synopsis: Create layout container
interface
subroutine gkcontain(ityp, ix,iy, iborder, container)
integer*4 :: ityp, ix,iy, iborder
integer*4 :: container
end subroutine gkcontain
end interface
Meaning of arguments:
ityp [in] Type of container:
1 = "Fixed": Elements will be at fixed coordinates
2 = "Scroll": Container for a single element witch
will get scroll bars attached
3 = "Table": Elements will be placed in a table
4 = "Notebook": Empty notebook (see gkputbook)
ix,iy [in] Meaning depents on ityp:
ityp = 3: Number of colums and rows of the table
iborder [in] Outer border of container. The outer dimensions of the
container will be enlarged by this border
container [out] Handle of container
A.17 gkdefault
Name: gkdefault
Category: User Interface
Synopsis: Sets default widget (which is activated on pressing enter, usually a button)
interface
subroutine gkdefault(widget)
integer*4 :: widget
end subroutine gkdefault
end interface
Meaning of arguments:
widget [in] Handle of widget to set as default
A.18 gkdestroy
Name: gkdestroy
Category: User Interface
Synopsis: Destroy widget/window
interface
subroutine gkdestroy(widget)
integer*4 :: widget
end subroutine gkdestroy
end interface
Meaning of arguments:
widget [in] Handle to widget/window to destroy
A.19 gkfilesel
Name: gkfilesel
Category: User Interface
Synopsis: Dialog for selecting file names
interface
subroutine gkfilesel(titel,types,patterns,ntypes,filna,ipat)
use pimodtypes
type(string) :: titel,filna
integer*4 :: ntypes
type(string) :: types(ntypes),patterns(ntypes)
integer*4 :: ipat
end subroutine gkfilesel
end interface
Meaning of arguments:
titel [in] Title of window
types [in] Description of file types the user can select
patterns [in] Patterns according to the file types
ntypes [in] Number of file types
filna [out] File name that the user has selected.
If the user hits "cancel", this string will have a length of 0.
ipat [out] Number of file type selected by user
A.20 gkfocus
Name: gkfocus
Category: User Interface
Synopsis: Sets input focus to widget
interface
subroutine gkfocus(widget)
integer*4 :: widget
end subroutine gkfocus
end interface
Meaning of arguments:
widget [in] Handle of widget to set the focus to
A.21 gkgetfloat
Name: gkgetfloat
Category: User Interface
Synopsis: Get floating point value of widget.
Can be used currently with sliders only
interface
subroutine gkgetfloat(val,widget)
real*8 :: val
integer*4 :: widget
end subroutine gkgetfloat
end interface
Meaning of arguments:
val [out] Value of widget
widget [in] Handle of widget
See also: gkslide
A.22 gkgetint
Name: gkgetint
Category: User Interface
Synopsis: Get integer value of widget.
Can be used with lists (marked line), notebooks (active tab)
and toggle buttons (state).
interface
subroutine gkgetint(val,widget)
integer*4 :: widget
integer*4 :: val
end subroutine gkgetint
end interface
Meaning of arguments:
val [out] Value of widget
widget [in] Handle of widget
See also: gklist, gkcontain, gktoggle
A.23 gkgetstring
Name: gkgetstring
Category: User Interface
Synopsis: Read out string value from a widget
Can be used with single or multi line entry fields
interface
subroutine gkgetstring(text,widget)
use pimodtypes
type(string) :: text
integer*4 :: widget
end subroutine gkgetstring
end interface
Meaning of arguments:
text [out] Content of entry field
widget [in] Handle of entry field
See also: gkxedt, gkzedt
A.24 gkgraph
Name: gkgraph
Category: User Interface
Synopsis: Create graphics area
interface
subroutine gkgraph(nx,ny,window,pixmap,widget)
integer*4 :: nx,ny
integer*4 :: window
integer*4 :: pixmap
integer*4 :: widget
end subroutine gkgraph
end interface
Meaning of arguments:
nx,ny [in] Size of graphics area in pixels
ndow [in] Handle of Window, only used for matching with display depth
pixmap [out] Handle of graphics area (used for drawing)
widget [out] Handle of corresponding widget (used for putting into window etc.)
A.25 gklist
Name: gklist
Category: User Interface
Synopsis: Create list (with automatic scroll bars)
interface
subroutine gklist(cols,width,align,ncols,ixpad,scroll,widget)
use pimodtypes
integer*4 :: ncols
type(string) :: cols(ncols)
integer*4 :: width(ncols)
real*4 :: align(ncols)
integer*4 :: ixpad
integer*4 :: scroll
integer*4 :: widget
end subroutine gklist
end interface
Meaning of arguments:
cols [in] Array with captions of columns
width [in] Array with widthes of colums (in pixel)
align [in] Array with alignment of columns:
0.0: left
0.5: center
1.0: right
ncols [in] Number of columns
ixpad [in] Padding in x (space between text and frame)
scroll [out] Handle of scrollbar container
widget [out] Handle of list
A.26 gklistins
Name: gklistins
Category: User Interface
Synopsis: Insert row into list
interface
subroutine gklistins(irow,vals,ncols,list)
use pimodtypes
integer*4 :: irow
type(string) :: vals(ncols)
integer*4 :: ncols
integer*4 :: list
end subroutine gklistins
end interface
Meaning of arguments:
irow [in] Position of new row
vals(ncols) [in] Array of values
ncols [in] Number of columns (must be the same as in gklist)
list [in] Handle of list
See also: gklist, gklistrem
A.27 gklistrem
Name: gklistrem
Category: User Interface
Synopsis: Remove single line from list or clear whole list
interface
subroutine gklistrem(irow,list)
integer*4 :: irow
integer*4 :: list
end subroutine gklistrem
end interface
Meaning of arguments:
irow [in] Number of line to delete, or -1 for whole list
list [in] Handle of list (returned by gklist)
TODO:
- Test removeal of single lines!
A.28 gklistwidth
Name: gklistwidth
Category: User Interface
Synopsis: Get widthes of colums of a list
interface
subroutine gklistwidth(width,widget)
integer*4 :: width(*)
integer*4 :: widget
end subroutine gklistwidth
end interface
Meaning of arguments:
width [out] Array with widthes
widget [in] Handle of list
A.29 gkmenubar
Name: gkmenubar
Category: User Interface
Synopsis: Create empty menu bar (items can be added with gkmenuitem)
interface
subroutine gkmenubar(widget)
integer*4 :: widget
end subroutine gkmenubar
end interface
Meaning of arguments:
widget [out] Handle of menu bar
A.30 gkmenuitem
Name: gkmenuitem
Category: User Interface
Synopsis: Create item for menu bar
interface
subroutine gkmenuitem(ipos,text,menu,item,iclick)
use pimodtypes
integer*4 :: ipos
type(string) :: text
integer*4 :: menu
integer*4 :: item
integer*4 :: iclick
end subroutine gkmenuitem
end interface
Meaning of arguments:
ipos [in] Position of item
text [in] Label of menu item
menu [in] Handle to menu bar (created with gkmenubar)
item [out] Handle to item
iclick [out] will be set to 1 as soon as item is clicked
A.31 gkmenusubmenu
Name: gkmenusubmenu
Category: User Interface
Synopsis: Create submenu for menu bar
interface
subroutine gkmenusubmenu(ipos,text,menu,submenu)
use pimodtypes
integer*4 :: ipos
type(string) :: text
integer*4 :: menu
integer*4 :: submenu
end subroutine gkmenusubmenu
end interface
Meaning of arguments:
ipos [in] Position of submenu
text [in] Label of submenu
menu [in] Handle to menu bar (created with gkmenubar)
submenu [out] Handle to submenu
A.32 gkmsgbox
Name: gkmsgbox
Category: User Interface
Synopsis: Display a message box
interface
subroutine gkmsgbox(text,ibutton,icon,iaction)
use pimodtypes
type(string) :: text
integer*4 :: ibutton,icon,iaction
end subroutine gkmsgbox
end interface
Meaning of arguments:
text [in] Text to write into message box
ibutton [in] Button(s) to display:
1: OK
2: Close
3: Cancel
4: Yes, No
5: Ok, Cancel
6: Yes, No, Cancel
icon [in] Icon to display
0: Info
1: Warning
2: Question
3: Error
iaction [out] Button pressed by the user:
1: Ok
2: Cancel
3: Close
4: Yes
5: No
A.33 gkname
Name: gkname
Category: User Interface
Synopsis: Assign a name to a widget (for special settings in rc files)
interface
subroutine gkname(name,widget)
use pimodtypes
type(string) :: name
integer*4 :: widget
end subroutine gkname
end interface
Meaning of arguments:
name [in] Name which the widget should get
widget [in] Handle of widget
A.34 gkproc
Name: gkproc
Category: User Interface
Synopsis: Process messages/events - has to be called continuously
interface
subroutine gkproc
end subroutine gkproc
end interface
Meaning of arguments:
- no arguments present -
A.35 gkputbook
Name: gkputbook
Category: User Interface
Synopsis: Insert page into notebook
interface
subroutine gkputbook(ipos,label, widget,container)
use pimodtypes
integer*4 :: ipos
type(string) :: label
integer*4 :: widget
integer*4 :: container
end subroutine gkputbook
end interface
Meaning of arguments:
ipos [in] Position of page in notebook
label [in] Label of page
widget [in] Widget/Container used as content of page
container [in] Notebook container where page should be inserted
A.36 gkput
Name: gkput
Category: User Interface
Synopsis: Insert widget into container
Do *not* use for table or notebook containers, see gkputtable and gkputbook for this
interface
subroutine gkput(ix,iy,ih,iv,container,widget)
integer*4 :: ix,iy
integer*4 :: ih,iv
integer*4 :: container
integer*4 :: widget
end subroutine gkput
end interface
Meaning of arguments:
ix,iy [in] Coordinates of left upper corner relative to window (if appropriate)
ih,iv [in] Minimal size of widget, or -1 for default
container [in] Handle of container
widget [in] Handle of widget
A.37 gkputtable
Name: gkputtable
Category: User Interface
Synopsis: Insert widget into table container
interface
subroutine gkputtable(ix1,iy1,ix2,iy2, ixt,iyt, ixp,iyp, ih,iv, container,widget)
integer*4 :: ix1,iy1, ix2,iy2
integer*4 :: ixt,iyt, ixp,iyp
integer*4 :: ih,iv
integer*4 :: container
integer*4 :: widget
end subroutine gkputtable
end interface
Meaning of arguments:
ix1,iy1 [in] Left upper cell (counting from 0)
ix2,iy2 [in] Right lower cell (counting from 0).
If (ix1.ne.ix2) and/or (iy1.ne.iy2) the widget will span over multiple cells.
ixt,iyt [in] Behaviour on resizing window
1: Enlarge cell, if possible/appropriate
2: Shrink cell, if possible/appropriate
4: Widget uses always the full space available
ixp,iyp [in] Padding (inner margin)
ih,iv [in] Minimal size of widget, or -1 for default.
The actual size of the widget can change on resizing the window (see ixt,iyt)
container [in] Handle of container
widget [in] Handle of widget
TODO:
- What does ixt,iyt exactly mean???
A.38 gksensitive
Name: gksensitive
Category: User Interface
Synopsis: Sets sensitivity of widget
interface
subroutine gksensitive(sensitive,widget)
integer*4 :: sensitive
integer*4 :: widget
end subroutine gksensitive
end interface
Meaning of arguments:
sensitive [in] Status of sensitivity
1: User can interact with widget
0: Widget is "grayed out"
widget [in] Handle of widget
A.39 gksetfloat
Name: gksetfloat
Category: User Interface
Synopsis: Sets an floating point value of widget
(e.g. percentage of progress bar)
interface
subroutine gksetfloat(val,widget)
real*8 :: val
integer*4 :: widget
end subroutine gksetfloat
end interface
Meaning of arguments:
widget [in] Handle of widgets
val [in] Value to set
A.40 gksetint
Name: gksetint
Category: User Interface
Synopsis: Sets an integer value of widget
(e.g. number of marked line of list)
interface
subroutine gksetint(ival,widget)
integer*4 :: ival
integer*4 :: widget
end subroutine gksetint
end interface
Meaning of arguments:
widget [in] Handle of widgets
ival [in] Value to set
TODO:
- Does not work with lists!
A.41 gksetstring
Name: gksetstring
Category: User Interface
Synopsis: Set text of widget (e.g. entry field)
Supported widgets:
- Single and multi line entry fields
- Status bars
- Windows (changes its title)
interface
subroutine gksetstring(text,widget)
use pimodtypes
type(string) :: text
integer*4 :: widget
end subroutine gksetstring
end interface
Meaning of arguments:
text [in] Text to be set
widget [in] Handle of widget
TODO:
- Set text of labels (gktext)
A.42 gksettablabel
Name: gksettablabel
Category: User Interface
Synopsis: Change label of notebook tab
interface
subroutine gksettablabel(notebook,widget,text)
use pimodtypes
integer*4 :: notebook,widget
type(string) :: text
end subroutine gksettablabel
end interface
Meaning of arguments:
notebook [in] Handle of notebook
widget [in] Handle of widget being contained by tab
text [in] Label to be set
A.43 gkshow
Name: gkshow
Category: User Interface
Synopsis: Show window/container/widget (with all widgets inside)
interface
subroutine gkshow(widget)
integer*4 :: widget
end subroutine gkshow
end interface
Meaning of arguments:
widget [in] Handle of window/container/widget
A.44 gksize
Name: gksize
Category: User Interface
Synopsis: Set (minimal) size of widget
interface
subroutine gksize(ih,iv ,widget)
integer*4 :: ih,iv
integer*4 :: widget
end subroutine gksize
end interface
Meaning of arguments:
ih,iv [in] Minimal size, or -1 for default
widget [in] Handle of widget
A.45 gkslide
Name: gkslide
Category: User Interface
Synopsis: Create slider
interface
subroutine gkslide(min,max,step, ityp, widget)
use pimodtypes
real*8 :: min,max,step
integer*4 :: ityp
integer*4 :: widget
end subroutine gkslide
end interface
Meaning of arguments:
min,max [in] Minimum and maximum value
step [in] Step size
ityp [in] Direction of slider:
1: horizontal
2: vertical
widget [out] Handle of slider
A.46 gkstatusbar
Name: gkstatusbar
Category: User Interface
Synopsis: Create status bar
interface
subroutine gkstatusbar(widget)
use pimodtypes
integer*4 :: widget
end subroutine gkstatusbar
end interface
Meaning of arguments:
widget [out] Handle of status bar
A.47 gktext
Name: gktext
Category: User Interface
Synopsis: Create text/label (*not* inside a graphics area!)
interface
subroutine gktext(text,widget)
use pimodtypes
type(string) :: text
integer*4 :: widget
end subroutine gktext
end interface
Meaning of arguments:
text [in] Text
widget [out] Handle of text
A.48 gktoggle
Name: gktoggle
Category: User Interface
Synopsis: Create toggle button (aka. check box)
interface
subroutine gktoggle(text,toggle)
use pimodtypes
type(string) :: text
integer*4 :: toggle
end subroutine gktoggle
end interface
Meaning of arguments:
text [in] Label of toggle button
button [out] Handle of toggle button
A.49 gkupdate
Name: gkupdate
Category: User Interface
Synopsis: Redraw/update widget or window (incl. all childs)
interface
subroutine gkupdate(widget)
integer*4 :: widget
end subroutine gkupdate
end interface
Meaning of arguments:
widget [in] Handle of widget/window
A.50 gkwindow
Name: gkwindow
Category: User Interface
Synopsis: Create window
interface
subroutine gkwindow(caption,iborder,istate,window,iclos)
use pimodtypes
type(string) :: caption
integer*4 :: iborder
integer*4 :: istate
integer*4 :: window
integer*4 :: iclos
end subroutine gkwindow
end interface
Meaning of arguments:
caption [in] Caption of window
iborder [in] Inner border of window
istate [in] Window state:
0: normal ("restored") size of window
1: maximized size
window [out] Handle of window
iclos [out] Will be set to 1 as soon as user/system requests to close window.
This happens usually after this routine has returned.
Window remains open until gkdestroy is called!
A.51 gkxedt
Name: gkxedt
Category: User Interface
Synopsis: Create single line entry field
interface
subroutine gkxedt(len,widget)
integer*4 :: len,widget
end subroutine gkxedt
end interface
Meaning of arguments:
len [in] Maximum number of characters, or 0 for infinite
widget [out] Handle of entry field
A.52 gkzedt
Name: gkzedt
Category: User Interface
Synopsis: Create multi line entry field (with automatic scrollbars)
interface
subroutine gkzedt(scroll,widget)
integer*4 :: scroll
integer*4 :: widget
end subroutine gkzedt
end interface
Meaning of arguments:
scroll [out] Handle of scrollbar container (put this into the parent container!)
widget [out] Handle of entry field (use this to get/set the content)
A.53 gkzedtcurs
Name: gkzedtcurs
Category: User Interface
Synopsis: Set cursor position of multi line entry field
interface
subroutine gkzedtcurs(ih,iv,widget)
integer*4 :: ih,iv
integer*4 :: widget
end subroutine gkzedtcurs
end interface
Meaning of arguments:
ih,iv [in] Position of cursor (column and row)
widget [in] Handle of entry field
A.54 gkzedtdel
Name: gkzedtdel
Category: User Interface
Synopsis: Delete text from multi line entry field
interface
subroutine gkzedtdel(ih,iv, nch, widget)
integer*4 :: ih,iv, nch
integer*4 :: widget
end subroutine gkzedtdel
end interface
Meaning of arguments:
ih,iv [in] Position (column and row), where the text should be deleted
nch [in] Number of characters to delete
widget [in] Handle of entry field
A.55 gkzedtinfo
Name: gkzedtinfo
Category: User Interface
Synopsis: Get some information about multi line entry field
interface
subroutine gkzedtinfo(ih,iv,mod,widget)
integer*4 :: ih,iv, mod
integer*4 :: widget
end subroutine gkzedtinfo
end interface
Meaning of arguments:
ih,iv [out] Current position of cursor (column and row)
mod [out] Number of character witch has been changed at latest, od
-1: no change since last call
-2: change since last call, but no position known for some reason
widget [in] Handle of entry field
A.56 gkzedtins
Name: gkzedtins
Category: User Interface
Synopsis: Insert text into multi line entry field
interface
subroutine gkzedtins(ih,iv, text, widget)
use pimodtypes
integer*4 :: ih,iv
type(string) :: text
integer*4 :: widget
end subroutine gkzedtins
end interface
Meaning of arguments:
ih,iv [in] Position (column and row) where the text should be inserted
text [in] Text to be inserted
widget [in] Handle of entry field
A.57 grpixbuf
Name: grpixbuf
Category: Graphics
Synopsis: Create an empty pixbuf
interface
subroutine grpixbuf(nx,ny,pixbuf)
integer*4 :: nx,ny
integer*4 :: pixbuf
end subroutine grpixbuf
end interface
Meaning of arguments:
nx,ny [in] Size of buffer in pixels
pixbuf [out] Handle to pixbuf
A.58 grpixbufload
Name: grpixbufload
Category: Graphics
Synopsis: Loads an image file into a pixbuf
interface
subroutine grpixbufload(filna,pixbuf,ierr)
use pimodtypes
type(string) :: filna
integer*4 :: pixbuf
integer*4 :: ierr
end subroutine grpixbufload
end interface
Meaning of arguments:
filna [in] Filename to load (JPEG or PNG)
pixbuf [out] Handle to pixbuf
ierr [out] Error code
A.59 grpixbufpixels
Name: grpixbufpixels
Category: Graphics
Synopsis: Get pointer to pixel data of pixbuf
interface
subroutine grpixbufpixels(data,nx,ny,linc,nbits,pixbuf)
integer*4 :: data
integer*4 :: nx,ny,linc,nbits
integer*4 :: pixbuf
end subroutine grpixbufpixels
end interface
Meaning of arguments:
data [out] Pointer to image data
nx,ny [out] Size of image in pixel
linc [out] Line increment (numer of bytes per line)
nbits [out] Number of bits per pixel
pixbuf [in] Handle to pixbuf
Note:
The pixels are saved from top to bottom, so you have to calculate
the coordinates as in a left-handed system.
A.60 grpixbufput
Name: grpixbufput
Category: Graphics
Synopsis: Puts a pixbuf into a graphics area
interface
subroutine grpixbufput(ix,iy,kx,ky,nx,ny, pixbuf, pixmap)
integer*4 :: pixbuf
integer*4 :: ix,iy,kx,ky,nx,ny
integer*4 :: pixmap
end subroutine grpixbufput
end interface
Meaning of arguments:
ix,iy [in] Lower left corner of area to copy from in source
kx,ky [in] Lower left corner of area to copy to in destination
nx,ny [in] Size of area to copy in pixels, or -1 for full size of pixbuf
pixbuf [in] Handle to pixbuf
pixmap [in] Handle to graphics area (see gkgraph)
Note:
All coordinates are given in a right-handed system
A.61 grpoint
Name: grpoint
Category: Graphics
Synopsis: Draw single point
interface
subroutine grpoint(ix,iy, icol, pixmap)
integer*4 :: ix,iy
integer*4 :: icol
integer*4 :: pixmap
end subroutine grpoint
end interface
Meaning of arguments:
ix,iy [in] Coordinate of point
icol [in] Colour of point (24 bits RGB)
pixmap [in] Handle of graphics buffer
Note:
All coordinates are given in a right-handed system
A.62 grrect
Name: grrect
Category: Graphics
Synopsis: Draw rectangle
interface
subroutine grrect(ix1,iy1,ix2,iy2, icol, pixmap)
integer*4 :: ix1,iy1,ix2,iy2
integer*4 :: icol
integer*4 :: pixmap
end subroutine grrect
end interface
Meaning of arguments:
ix1,iy1 [in] Lower left corner of rectangle
ix2,iy2 [in] Upper right corner of rectangle
icol [in] Colour of rectangle (positive: filled; negative: hollow) (24 bits RGB)
pixmap [in] Handle of graphics buffer
Note:
All coordinates are given in a right-handed system
A.63 grvect
Name: grvect
Category: Graphics
Synopsis: Draw vector/line
interface
subroutine grvect(ix1,iy1,ix2,iy2, icol, pixmap)
integer*4 :: ix1,iy1,ix2,iy2
integer*4 :: icol
integer*4 :: pixmap
end subroutine grvect
end interface
Meaning of arguments:
ix1,iy1 [in] Lower left corner of vector
ix2,iy2 [in] Upper right corner of vector
icol [in] Colour of vector (24 bits RGB)
pixmap [in] Handle of graphics buffer
Note:
All coordinates are given in a right-handed system
A.64 mamatinv
Name: mamatinv
Category: Mathematics
Synopsis: Invert a matrix
interface mamatinv
function mamatinvs(a,d)
real*4 :: a(:,:)
real*4 :: mamatinvs(size(a,1),size(a,1))
real*4 :: d
end function mamatinvs
function mamatinvd(a,d)
real*8 :: a(:,:)
real*8 :: mamatinvd(size(a,1),size(a,1))
real*8 :: d
end function mamatinvd
end interface mamatinv
Meaning of arguments:
a [in] input matrix
d [out] resultant determinant
Algorithm:
The standard Gauss-Jordan method is used. The determinant
is also calculated. A determinant of zero indicates that
the matrix is singular.
A.65 piinit
Name: piinit
Category: General
Synopsis: Initialize library; call before any other routines of
this library
During initialisation, the following rc-files will be interpreted:
/usr/share/<name of executable>/gtkrc (on UNIX)
<directory of executable>/.<name of executable>rc (on WIN32)
<user home directory>/.<name of executable>rc (always)
The user can modify with these files the appearance of named
widgets (see gkname).
interface
subroutine piinit
end subroutine piinit
end interface
Meaning of arguments:
- no arguments present -
Note:
>>> THIS ROUTINE CONTAINS PLATFORM DEPENDENT CODE <<<
TODO:
- Retrival of command line arguments on linux does not work
(how to do THAT??)
See also: gkname
A.66 type(string), c, s
Name: type(string), c, s
Category: String
Synopsis: Various routines for string manipulation
For a seamless use of text variables with the library routines a
new type called "type(string)" is introduced. The advantage is,
that you do not need to specify a maximum length (the required
memory will be allocated automatically), and that trailing blanks
are significant in contrast to ordinary Fortran characters.
type string
sequence
integer*4 :: ptr = 0
integer*4 :: len = 0
integer*4 :: mem = 0
end type
Meaning of Elements:
ptr Address (Pointer) of character data. Dont access
directly, use appropriate string functions and
overloaded operators instead.
len Current length of string. Use this as a substitution
for the Fortran intrinsic len or len_trim
mem Number of bytes reserved for buffer at address ptr
Overloaded operators:
= Assignment
// Concatenation
.eq. Comparison (equal)
.ne. Comparison (not equal)
Sometimes, we need a Nullstring, which is the equivalent of the
Fortran 95 intrinsic NULL() for strings:
type(string),parameter :: nullstring = string(0,0,0)
In many cases you can use Strings like normal Fortran character
variables. But in some cases (e.g. in a "write" statement) it is
not possible by Fortran 9x standard to instruct the compiler to
do the required conversion. For these cases you need the
following generic function "c", which works in both directions:
- Convert Fortran character <-> String:
interface c
function f_char2str(text)
type(string) :: f_char2str
character(*),intent(in) :: text
end function f_char2str
function f_str2char(str)
character(str%len) :: f_str2char
type(string),intent(in) :: str
end function f_str2char
end interface c
Meaning of arguments:
text [in] Fortran character to convert into string
str [in] String to convert into Fortran character
Return value: Converted text as string/character
Additionally, taking substrings is not possible in the standard
way either. Because we use UTF-8, where a single character may
consist of various number of bytes, converting the string into
a character fist does *not* work! Thus for taking substrings you
should use the following function:
- Take substrings from UTF-8 strings:
interface
function s(str,is,ie)
type(string) :: s
type(string),intent(in) :: str
integer*4 :: is,ie
end function s
end interface
Meaning of arguments:
src [in] Source string
is,ie [in] Start and end indices, counting from 1
A call to this function will correspond to this standard
Fortran expression: chr(is:ie)
A.67 stconvert
Name: stconvert
Category: Strings Manipulation
Synopsis: Character set conversion
interface
subroutine stconvert(src,srccode, dst,dstcode, ierr)
use pimodtypes
type(string) :: src,srccode
type(string) :: dst,dstcode
integer*4 :: ierr
end subroutine stconvert
end interface
Meaning of arguments:
src [in] String to convert
srccode [in] Codepage of source string. Possible values (among others):
'ASCII', 'CP1250', 'CP437', 'CP850', 'UTF-8', 'UTF-16'
Some codepages may not be availabe on some systems!
dst [out] Converted string
dstcode [out] Codepage into witch the string should be converted. See srccode for examples.
ierr [out] Error code:
0: No error
1: Unsupported codepage specified in srccode or dstcode
2: Other error
TODO:
- Better estimation of required space for dst2
A.68 stsubstring
Name: stsubstring
Category: Strings Manipulation
Synopsis: Extract portion of UTF-8 encoded string
A call to this routine will correspond to a Fortran statement like:
dst = src(is:ie)
where dst and src are character variables.
Do not call this function directly, use module function "s" instead!
interface
subroutine stsubstring(src,is,ie, dst)
use pimodtypes
type(string) :: src,dst
integer*4 :: is,ie
end subroutine stsubstring
end interface
Meaning of arguments:
src [in] Source string
is,ie [in] Start and end indices, counting from 1
dst [out] Portion extracted from src
A.69 sycmdargs
Name: sycmdargs
Category: System
Synopsis: Get command line arguments
interface
subroutine sycmdargs(argcount,argvals)
use pimodtypes
integer*4 :: argcount
type(string) :: argvals(*)
end subroutine sycmdargs
end interface
Meaning of arguments:
argcoun [out] Number of command line arguments
argvals [out] Array of command line arguments, dimension will be argcount
A.70 locof
Name: locof
Category: System
Synopsis: Return location of variable in memory
This function is called locof instead of sylocof, because it
should be of integer type (and does not have an explicit
interface)!
interface
integer*4 function locof(var)
<anytype> :: var
end function locof
end interface
Meaning of arguments:
var [in] Variable of any type
Return value: Location (adress, C pointer) of var
Note:
This function is in general not very usefull, because the meaning of
the returned address is platform dependend!
TODO:
- What about 64 bit CPUs?
A.71 symemread, symemwrite, symemalloc, symemfree
Name: symemread, symemwrite, symemalloc, symemfree
Category: System
Synopsis: Routines for accessing memory
interface
subroutine symemread(iadr,buf, nbt)
integer*4 :: iadr, nbt
integer*1 :: buf(*)
end subroutine symemread
end interface
interface
subroutine symemwrite(iadr,buf, nbt)
integer*4 :: iadr, nbt
integer*1 :: buf(*)
end subroutine symemwrite
end interface
interface
subroutine symemalloc(iadr, nbt)
integer*4 :: iadr, nbt
end subroutine symemalloc
end interface
interface
subroutine symemfree(iadr)
integer*4 :: iadr
end subroutine symemfree
end interface
Meaning of arguments:
iadr [in] Adress/pointer
buf [in/out] Buffer for/with data (may be of any type and shape)
nbt [in] Number of bytes to write/read/allocate
A.72 sysocketaccept
Name: sysocketaccept
Category: System
Synopsis: Accept incoming connection on network socket
interface
subroutine sysocketaccept(address,ihsock,ihconn,ierr)
use pimodtypes
type(string) :: address
integer*4 :: ihsock,ihconn,ierr
end subroutine sysocketaccept
end interface
Meaning of arguments:
address [out] Remote address in dotted notation
ihsock [in] Handle of socket
ihconn [out] Handle of connection
ierr [out] Error code, or -1 if no client tries to connect
TODO:
- Support for IPv6
A.73 sysocketclose
Name: sysocketclose
Category: System
Synopsis: Close network socket
interface
subroutine sysocketclose(ihsock,ierr)
integer*4 :: ihsock,ierr
end subroutine sysocketclose
end interface
Meaning of arguments:
ihsock [in] Handle of socket or connection
(returned by sysocketopen or sysocketaccept)
ierr [out] Error code
A.74 sysocketopen
Name: sysocketopen
Category: System
Synopsis: Open network socket
interface
subroutine sysocketopen(address,iport,ihsock,ierr)
use pimodtypes
type(string) :: address
integer*4 :: iport,ihsock,ierr
end subroutine sysocketopen
end interface
Meaning of arguments:
address [in] Target hostname for outgoing connections, or
nullstring for incoming (server) socket
iport [in] Port number
ihsock [out] Handle of socket
ierr [out] Error code
TODO:
- Win32 needs some other header files and an initialisation call!
Set non blocking mode on Win32
A.75 sysocketread
Name: sysocketread
Category: System
Synopsis: Write into network socket
interface
subroutine sysocketread(data,nbt,ihsock,ierr)
use pimodtypes
type(string) :: data
integer*4 :: nbt,ihsock,ierr
end subroutine sysocketread
end interface
Meaning of arguments:
data [out] Read data
nbt [in] Maximum number of bytes to read
ihsock [in] Handle of socket
ierr [out] Error code
A.76 sysocketwrite
Name: sysocketwrite
Category: System
Synopsis: Write into network socket
interface
subroutine sysocketwrite(data,ihsock,ierr)
use pimodtypes
type(string) :: data
integer*4 :: ihsock,ierr
end subroutine sysocketwrite
end interface
Meaning of arguments:
data [in] Data to write
ihsock [in] Handle of socket
ierr [out] Error code
A.77 sythread
Name: sythread
Category: System
Synopsis: Create thread
interface
subroutine sythread(func,data,ithread,ierr)
external :: func
<any type> :: data
integer*4 :: ithread,ierr
end subroutine sythread
end interface
Meaning of arguments:
func [in] Thread function, has to have one integer*4
argument and to return an integer*4 value.
idata [in] Variable to pass to thread function.
This variable will be common with the new
thread, i.e. the memory space is the same in the
calling thread and the new thread
ithread [out] Handle of thread
ierr [out] Error code
B. Categories - Reference of functions by category
B.1 General
B.2 File I/O
B.3 User Interface
B.4 Graphics
B.5 Mathematics
B.6 String Manipulation
B.7 System
| Index Entry | Section |
|
L | | |
| locof | A.70 locof |
|
S | | |
| sycmdargs | A.69 sycmdargs |
| symemalloc | A.71 symemread, symemwrite, symemalloc, symemfree |
| symemfree | A.71 symemread, symemwrite, symemalloc, symemfree |
| symemread | A.71 symemread, symemwrite, symemalloc, symemfree |
| symemwrite | A.71 symemread, symemwrite, symemalloc, symemfree |
| sysocketaccept | A.72 sysocketaccept |
| sysocketclose | A.73 sysocketclose |
| sysocketopen | A.74 sysocketopen |
| sysocketread | A.75 sysocketread |
| sysocketwrite | A.76 sysocketwrite |
| sythread | A.77 sythread |
|
C. Copying - GNU Lesser General Public License
GNU Lesser General Public License
*********************************
Version 2.1, February 1999
Copyright (C) 1991, 1999 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.
[This is the first released version of the Lesser GPL. It also counts
as the successor of the GNU Library Public License, version 2, hence the
version number 2.1.]
Preamble
--------
The licenses for most software are designed to take away your freedom
to share and change it. By contrast, the GNU General Public Licenses
are intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users.
This license, the Lesser General Public License, applies to some
specially designated software--typically libraries--of the Free
Software Foundation and other authors who decide to use it. You can use
it too, but we suggest you first think carefully about whether this
license or the ordinary General Public License is the better strategy to
use in any particular case, based on the explanations below.
When we speak of free software, we are referring to freedom of use,
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 and use pieces of it
in new free programs; and that you are informed that you can do these
things.
To protect your rights, we need to make restrictions that forbid
distributors to deny you these rights or to ask you to surrender these
rights. These restrictions translate to certain responsibilities for
you if you distribute copies of the library or if you modify it.
For example, if you distribute copies of the library, whether gratis
or for a fee, you must give the recipients all the rights that we gave
you. You must make sure that they, too, receive or can get the source
code. If you link other code with the library, you must provide
complete object files to the recipients, so that they can relink them
with the library after making changes to the library and recompiling
it. And you must show them these terms so they know their rights.
We protect your rights with a two-step method: (1) we copyright the
library, and (2) we offer you this license, which gives you legal
permission to copy, distribute and/or modify the library.
To protect each distributor, we want to make it very clear that
there is no warranty for the free library. Also, if the library is
modified by someone else and passed on, the recipients should know that
what they have is not the original version, so that the original
author's reputation will not be affected by problems that might be
introduced by others.
Finally, software patents pose a constant threat to the existence of
any free program. We wish to make sure that a company cannot
effectively restrict the users of a free program by obtaining a
restrictive license from a patent holder. Therefore, we insist that
any patent license obtained for a version of the library must be
consistent with the full freedom of use specified in this license.
Most GNU software, including some libraries, is covered by the
ordinary GNU General Public License. This license, the GNU Lesser
General Public License, applies to certain designated libraries, and is
quite different from the ordinary General Public License. We use this
license for certain libraries in order to permit linking those
libraries into non-free programs.
When a program is linked with a library, whether statically or using
a shared library, the combination of the two is legally speaking a
combined work, a derivative of the original library. The ordinary
General Public License therefore permits such linking only if the
entire combination fits its criteria of freedom. The Lesser General
Public License permits more lax criteria for linking other code with
the library.
We call this license the "Lesser" General Public License because it
does _Less_ to protect the user's freedom than the ordinary General
Public License. It also provides other free software developers Less
of an advantage over competing non-free programs. These disadvantages
are the reason we use the ordinary General Public License for many
libraries. However, the Lesser license provides advantages in certain
special circumstances.
For example, on rare occasions, there may be a special need to
encourage the widest possible use of a certain library, so that it
becomes a de-facto standard. To achieve this, non-free programs must be
allowed to use the library. A more frequent case is that a free
library does the same job as widely used non-free libraries. In this
case, there is little to gain by limiting the free library to free
software only, so we use the Lesser General Public License.
In other cases, permission to use a particular library in non-free
programs enables a greater number of people to use a large body of free
software. For example, permission to use the GNU C Library in non-free
programs enables many more people to use the whole GNU operating
system, as well as its variant, the GNU/Linux operating system.
Although the Lesser General Public License is Less protective of the
users' freedom, it does ensure that the user of a program that is
linked with the Library has the freedom and the wherewithal to run that
program using a modified version of the Library.
The precise terms and conditions for copying, distribution and
modification follow. Pay close attention to the difference between a
"work based on the library" and a "work that uses the library". The
former contains code derived from the library, whereas the latter must
be combined with the library in order to run.
GNU LESSER GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License Agreement applies to any software library or other
program which contains a notice placed by the copyright holder or
other authorized party saying it may be distributed under the
terms of this Lesser General Public License (also called "this
License"). Each licensee is addressed as "you".
A "library" means a collection of software functions and/or data
prepared so as to be conveniently linked with application programs
(which use some of those functions and data) to form executables.
The "Library", below, refers to any such software library or work
which has been distributed under these terms. A "work based on the
Library" means either the Library or any derivative work under
copyright law: that is to say, a work containing the Library or a
portion of it, either verbatim or with modifications and/or
translated straightforwardly into another language. (Hereinafter,
translation is included without limitation in the term
"modification".)
"Source code" for a work means the preferred form of the work for
making modifications to it. For a library, 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 library.
Activities other than copying, distribution and modification are
not covered by this License; they are outside its scope. The act
of running a program using the Library is not restricted, and
output from such a program is covered only if its contents
constitute a work based on the Library (independent of the use of
the Library in a tool for writing it). Whether that is true
depends on what the Library does and what the program that uses
the Library does.
1. You may copy and distribute verbatim copies of the Library's
complete 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 distribute a copy of this License
along with the Library.
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 Library or any portion
of it, thus forming a work based on the Library, 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. The modified work must itself be a software library.
b. You must cause the files modified to carry prominent notices
stating that you changed the files and the date of any change.
c. You must cause the whole of the work to be licensed at no
charge to all third parties under the terms of this License.
d. If a facility in the modified Library refers to a function or
a table of data to be supplied by an application program that
uses the facility, other than as an argument passed when the
facility is invoked, then you must make a good faith effort
to ensure that, in the event an application does not supply
such function or table, the facility still operates, and
performs whatever part of its purpose remains meaningful.
(For example, a function in a library to compute square roots
has a purpose that is entirely well-defined independent of the
application. Therefore, Subsection 2d requires that any
application-supplied function or table used by this function
must be optional: if the application does not supply it, the
square root function must still compute square roots.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the
Library, 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 Library, 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 Library.
In addition, mere aggregation of another work not based on the
Library with the Library (or with a work based on the Library) on
a volume of a storage or distribution medium does not bring the
other work under the scope of this License.
3. You may opt to apply the terms of the ordinary GNU General Public
License instead of this License to a given copy of the Library.
To do this, you must alter all the notices that refer to this
License, so that they refer to the ordinary GNU General Public
License, version 2, instead of to this License. (If a newer
version than version 2 of the ordinary GNU General Public License
has appeared, then you can specify that version instead if you
wish.) Do not make any other change in these notices.
Once this change is made in a given copy, it is irreversible for
that copy, so the ordinary GNU General Public License applies to
all subsequent copies and derivative works made from that copy.
This option is useful when you wish to copy part of the code of
the Library into a program that is not a library.
4. You may copy and distribute the Library (or a portion or
derivative of it, under Section 2) in object code or executable
form under the terms of Sections 1 and 2 above provided that you
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.
If distribution of 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 satisfies the requirement to
distribute the source code, even though third parties are not
compelled to copy the source along with the object code.
5. A program that contains no derivative of any portion of the
Library, but is designed to work with the Library by being
compiled or linked with it, is called a "work that uses the
Library". Such a work, in isolation, is not a derivative work of
the Library, and therefore falls outside the scope of this License.
However, linking a "work that uses the Library" with the Library
creates an executable that is a derivative of the Library (because
it contains portions of the Library), rather than a "work that
uses the library". The executable is therefore covered by this
License. Section 6 states terms for distribution of such
executables.
When a "work that uses the Library" uses material from a header
file that is part of the Library, the object code for the work may
be a derivative work of the Library even though the source code is
not. Whether this is true is especially significant if the work
can be linked without the Library, or if the work is itself a
library. The threshold for this to be true is not precisely
defined by law.
If such an object file uses only numerical parameters, data
structure layouts and accessors, and small macros and small inline
functions (ten lines or less in length), then the use of the object
file is unrestricted, regardless of whether it is legally a
derivative work. (Executables containing this object code plus
portions of the Library will still fall under Section 6.)
Otherwise, if the work is a derivative of the Library, you may
distribute the object code for the work under the terms of Section
6. Any executables containing that work also fall under Section 6,
whether or not they are linked directly with the Library itself.
6. As an exception to the Sections above, you may also combine or
link a "work that uses the Library" with the Library to produce a
work containing portions of the Library, and distribute that work
under terms of your choice, provided that the terms permit
modification of the work for the customer's own use and reverse
engineering for debugging such modifications.
You must give prominent notice with each copy of the work that the
Library is used in it and that the Library and its use are covered
by this License. You must supply a copy of this License. If the
work during execution displays copyright notices, you must include
the copyright notice for the Library among them, as well as a
reference directing the user to the copy of this License. Also,
you must do one of these things:
a. Accompany the work with the complete corresponding
machine-readable source code for the Library including
whatever changes were used in the work (which must be
distributed under Sections 1 and 2 above); and, if the work
is an executable linked with the Library, with the complete
machine-readable "work that uses the Library", as object code
and/or source code, so that the user can modify the Library
and then relink to produce a modified executable containing
the modified Library. (It is understood that the user who
changes the contents of definitions files in the Library will
not necessarily be able to recompile the application to use
the modified definitions.)
b. Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (1) uses at run
time a copy of the library already present on the user's
computer system, rather than copying library functions into
the executable, and (2) will operate properly with a modified
version of the library, if the user installs one, as long as
the modified version is interface-compatible with the version
that the work was made with.
c. Accompany the work with a written offer, valid for at least
three years, to give the same user the materials specified in
Subsection 6a, above, for a charge no more than the cost of
performing this distribution.
d. If distribution of the work is made by offering access to copy
from a designated place, offer equivalent access to copy the
above specified materials from the same place.
e. Verify that the user has already received a copy of these
materials or that you have already sent this user a copy.
For an executable, the required form of the "work that uses the
Library" must include any data and utility programs needed for
reproducing the executable from it. However, as a special
exception, the materials to be 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.
It may happen that this requirement contradicts the license
restrictions of other proprietary libraries that do not normally
accompany the operating system. Such a contradiction means you
cannot use both them and the Library together in an executable
that you distribute.
7. You may place library facilities that are a work based on the
Library side-by-side in a single library together with other
library facilities not covered by this License, and distribute
such a combined library, provided that the separate distribution
of the work based on the Library and of the other library
facilities is otherwise permitted, and provided that you do these
two things:
a. Accompany the combined library with a copy of the same work
based on the Library, uncombined with any other library
facilities. This must be distributed under the terms of the
Sections above.
b. Give prominent notice with the combined library of the fact
that part of it is a work based on the Library, and explaining
where to find the accompanying uncombined form of the same
work.
8. You may not copy, modify, sublicense, link with, or distribute the
Library except as expressly provided under this License. Any
attempt otherwise to copy, modify, sublicense, link with, or
distribute the Library 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.
9. 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 Library or its derivative works. These actions
are prohibited by law if you do not accept this License.
Therefore, by modifying or distributing the Library (or any work
based on the Library), you indicate your acceptance of this
License to do so, and all its terms and conditions for copying,
distributing or modifying the Library or works based on it.
10. Each time you redistribute the Library (or any work based on the
Library), the recipient automatically receives a license from the
original licensor to copy, distribute, link with or modify the
Library 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 with this License.
11. 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
Library at all. For example, if a patent license would not permit
royalty-free redistribution of the Library 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 Library.
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.
12. If the distribution and/or use of the Library is restricted in
certain countries either by patents or by copyrighted interfaces,
the original copyright holder who places the Library 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.
13. The Free Software Foundation may publish revised and/or new
versions of the Lesser 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
Library 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 Library
does not specify a license version number, you may choose any
version ever published by the Free Software Foundation.
14. If you wish to incorporate parts of the Library into other free
programs whose distribution conditions are incompatible with these,
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
15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO
WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE
LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
HOLDERS AND/OR OTHER PARTIES PROVIDE THE LIBRARY "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 LIBRARY IS WITH YOU. SHOULD THE
LIBRARY PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY
SERVICING, REPAIR OR CORRECTION.
16. 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 LIBRARY 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 LIBRARY (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 LIBRARY TO OPERATE WITH ANY
OTHER SOFTWARE), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Libraries
----------------------------------------------
If you develop a new library, and you want it to be of the greatest
possible use to the public, we recommend making it free software that
everyone can redistribute and change. You can do so by permitting
redistribution under these terms (or, alternatively, under the terms of
the ordinary General Public License).
To apply these terms, attach the following notices to the library.
It is safest to attach them to the start of each source file to most
effectively convey the exclusion of warranty; and each file should have
at least the "copyright" line and a pointer to where the full notice is
found.
ONE LINE TO GIVE THE LIBRARY'S NAME AND AN IDEA OF WHAT IT DOES.
Copyright (C) YEAR NAME OF AUTHOR
This library is free software; you can redistribute it and/or modify it
under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1 of the License, or (at
your option) any later version.
This library is distributed in the hope that it will be useful, but
WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
USA.
Also add information on how to contact you by electronic and paper
mail.
You should also get your employer (if you work as a programmer) or
your school, if any, to sign a "copyright disclaimer" for the library,
if necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the library
`Frob' (a library for tweaking knobs) written by James Random Hacker.
SIGNATURE OF TY COON, 1 April 1990
Ty Coon, President of Vice
That's all there is to it!
D. Copying this Manual - GNU Free Documentation License
GNU Free Documentation License
Version 1.2, November 2002
Copyright (C) 2000,2001,2002 Free Software Foundation, Inc.
51 Franklin St, Fifth Floor, Boston, MA 02110-1301 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.
ADDENDUM: How to use this License for your documents
To use this License in a document you have written, include a copy of
the License in the document and put the following copyright and
license notices just after the title page:
Copyright (c) YEAR YOUR NAME.
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".
If you have Invariant Sections, Front-Cover Texts and Back-Cover Texts,
replace the "with...Texts." line with this:
with the Invariant Sections being LIST THEIR TITLES, with the
Front-Cover Texts being LIST, and with the Back-Cover Texts being LIST.
If you have Invariant Sections without Cover Texts, or some other
combination of the three, merge those two alternatives to suit the
situation.
If your document contains nontrivial examples of program code, we
recommend releasing these examples in parallel under your choice of
free software license, such as the GNU General Public License,
to permit their use in free software.
Table of Contents
About This Document
This document was generated by Martin Hierholzer on July, 7 2006 using texi2html 1.76.
The buttons in the navigation panels have the following meaning:
Button |
Name |
Go to |
From 1.2.3 go to |
[ < ] |
Back |
previous section in reading order |
1.2.2 |
[ > ] |
Forward |
next section in reading order |
1.2.4 |
[ << ] |
FastBack |
beginning of this chapter or previous chapter |
1 |
[ Up ] |
Up |
up section |
1.2 |
[ >> ] |
FastForward |
next chapter |
2 |
[Top] |
Top |
cover (top) of document |
|
[Contents] |
Contents |
table of contents |
|
[Index] |
Index |
index |
|
[ ? ] |
About |
about (help) |
|
where the Example assumes that the current position is at Subsubsection One-Two-Three of a document of the following structure:
- 1. Section One
- 1.1 Subsection One-One
- 1.2 Subsection One-Two
- 1.2.1 Subsubsection One-Two-One
- 1.2.2 Subsubsection One-Two-Two
- 1.2.3 Subsubsection One-Two-Three
<== Current Position
- 1.2.4 Subsubsection One-Two-Four
- 1.3 Subsection One-Three
- 1.4 Subsection One-Four
This document was generated by Martin Hierholzer on July, 7 2006 using texi2html 1.76.