Latest Version: adatcl2.1
Location:
The following pointers are symbolic links to the latest ``official'' version.
-
README: ftp://ftp.cs.colorado.edu/pub/cs/distribs/arcadia/adatcl.txt
-
SOURCE: ftp://ftp.cs.colorado.edu/pub/cs/distribs/arcadia/adatcl.tar.Z
(symbolic link to latest ``official'' version)
Description:
This adatcl package provides access to tcl
thru Ada. It is possible to run tcl programs
and to write Ada procedures that define
new tcl procedures using tcl_createcmd.
The program tcltest.a demonstrates use of most
tcl features and implements some of the example
commands from section III of the draft of
the tcl book.
I assume that the user is familiar both with Ada
and with Tcl, hence, I assume that the example
program, tcltest.a, provides an adequate base
level of usage documentation.
There are of course a variety of caveats and limits
on all this. In particular, you should be warned
that this package seriously abuses C-Ada interoperability.
Specifically:
- This package is heavily dependent on the features of the
Gnat and SunAda compilers. In particular:
- It uses 'address to access the address
of the contents of a string.
- It used pragma import (or interface_name)
to access C library routines (see the cunix package).
- This package makes many assumptions about compatibility
between Ada and C:
- It assumes that top level procedures in packages
can be called from C code correctly when passed
integers and pointers. This is the hidden assumption
behind the ability to define new commands from
Ada procedures.
- It uses unchecked_conversion and unchecked deallocation.
- In an attempt to provide correct operation under Ada concurrent
execution, all calls to C code are surrounded by calls to a mutex
package. For Gnat, this is a noop, but when Gnat supports
protected types, this will change.
There may be problems with mutual exclusion access to malloc
that are not correctly handled.
For SunAda, mutex uses the v_i_sema package. Additionally,
malloc can be handled correctly. See the makescript file to
see what needs to be done.
- This package avoids the use of exceptions.
Its style could be improved significantly if that
were changed.
- The tcltest.a program exercises most of the features
of Tcl. The file tested has an exclamation point next to features
for which no current exercise exists in tcltest.a
Installation:
- For Gnat, examine the Makefile provided as part of the distribution.
It shows how to compile and test the adatcl package using
the tcltest program with test.tcl as input.
You should be able to just type ``make all'' to compile and test.
- For SunAda, examine the makescript file.
You should be able to just type ``makescript'' to compile and test.
Change Notes
Note that the revision level is encoded as a letter within parentheses.
Version 2.0 -> Version 2.1
- (a) Modifications to support solaris2 Ada and to support Tcl 7.4.
- Solaris2 requires a modified mutex.adb, namely mutex2.adb.
- Tcl 7.4 requires changing Tcl_DstringTrunc
to Tcl_DstringSetLength.
Examine the files tcl.ads and tcl.ads.a
See Makefile or makescript for more info.
Version 1.0 (aka 7.4)-> Version 2.0
- The version number has been disassociated from the tcl version.
- This version of adatcl has been modified to work
under both SunAda/Verdix and Gnat, the Gnu Ada Translator from NYU.
In some cases, there are two parallel files, such as cunix.ads (for gnat)
and cunix.ads.a (for SunAda).
In some cases, there is a symbolic link such as main.adb and main.adb.a
Contact and Bug Reports:
Dennis Heimbigner
(dennis@cs.colorado.edu)