I just uploaded the file itcl2.0.1plus.tar.gz to
ftp://ftp.neosoft.com/pub/tcl/incoming. This file is likely to be
moved to ftp://ftp.neosoft.com/pub/tcl/NEW in the near future.
itcl2.0.1plus is an improved version of itcl2.0plus, which was my
first go at making [incr tcl] 2.0 working with tcl7.5/tk4.1.
This release fixes a few (major) problems, but its main improvement is
the incorporation of Jan Nijtmans' "plus" patches. He put a lot of
time into making these patches compatible with itcl2.0/itk2.0 and to
improve configure support. Installation now should be a breeze.
The release contains:
- tcl7.5 (modified to support name spaces/[incr tcl] 2.0)
- tk4.1 (modified to support name spaces/[incr tk] 2.0)
- itcl 2.0 (modified to support plus patches/tcl 7.5)
- itk 2.0 (modified to support plus patches/tk 4.1)
- iwidgets 2.0.1
- the "plus" patches of Jan Nijtmans
- improved installation
One important caveat. This is *not* an official release of [incr
tcl]. This is a "hack" and an intermediate solution until Michael
Mclennan releases a new official version of [incr tcl]. I do hope that
Michael will take over the plus patches of Jan Nijtmans, because
autoloading works like a charm.
If you have problems with the release, don't expect us to fix it. It
was very hard work to get the release as-is; we have to stop
hacking and resume our normal work.
The release is also available as
ftp://ftp.cv.ruu.nl/pub/software/itcl2.0.1plus.tar.gz
Here is the README.PLUS that describes the PLUS patches.
About the "plus" part of itcl2.0.1plus
This release is a combination of itcl2.0, iwidgets 2.0.1 and the
"plus"-patches for Tcl7.5/Tk4.1. Most changes are in the configure
script and the Makefiles, but also some minimal changes are made
in the code. All changes are 100% upwards compatible with the
offical Tcl7.5/Tk4.1 and itcl2.0. The itcl, itk and iwidgets parts
are adapted as well as possible to make the configuration and
installation work the same way as Tcl7.5+ and Tk4.1+
Shared library support
If the option "--enable-shared" is given to the configure script both the
static and shared libraries are created. Also in all directories where
shared libraries are a pkgIndex.tcl file is created which contains
references to all functions in these shared libraries. Finally, support for
a.out loadable libraries is improved in that these libraries can now be
archives as well as objects (extension .a in stead of ..o). This has the
advantage that these files can both be used as normal archives (linked in
with the "-l" option) and also be loaded by the "load" command.
Because of the existance of pkgIndex.tcl files, the "package require"
command is enough to load the shared libraries into tclsh. For example:
>tclsh7.5
%package require Itk
This single command is enough to load libtk4.1.so, libitcl2.0.so and
libitk2.0.so dynamically. The main window "." will appear and all
itk commands are available.
Standalone Applications
In addition to Tcl_Init() and Tk_Init (or Xxx_Init in general) there are now
additional functions Tcl_InitStandAlone() and Tk_InitStandAlone() (or
Xxx_InitStandAlone in general). These perform the same function, only the
Tcl and Tk libraries are compiled into the executable. This makes the
executable larger, of course, but they will run on any system no matter if
Tcl/Tk (or blt or Tix) is installed or not. Included is a program tcl2c,
which translates tcl scripts into C source code. Compiling this code and
linking with the necessary static libraries (it doesn't work with shared
libraries) results in a standalone executable.
Event Loop
tclsh and itclsh are now fully event-driven. That means that after the script is
finished the application will start an event-loop which is compatible with
the Tk event-loop. The application will end as soon as there are no active
event handlers any more. By default, all event handlers will be passive,
except the console and the X11 handler. So, if there is no console and no
X11-handler the application will still end immediately. As a result, this is
fully upwards compatible with the official Tcl7.5/Tk4.1
This is implemented by defining the flag TCL_ACTIVE, which is from the same
type as TCL_READABLE, TCL_WRITEABLE and TCL_EXCEPTION. If this flag is used
in the Tcl_CreateFileHandler() or Tcl_CreateChannelHandler() functions, this
is a request to the application to continue handling events as long as these
event handlers are active. There is also a new option "active" to the
fileevent command. This option is equivalent to "readable", only the
application will not exit as long as the file is not closed. For example:
#!/usr/local/bin/tclsh7.5
set f [open "test.tcl" r]
fconfigure $f -blocking 0
fileevent $f active {
set num [gets $f line]
puts stdout "$num: \"$line\""
if {[eof $f]} {
close $f
}
}
C++-support
The following files are changed such that they now can be compiled by
any C or C++ compiler (both K&R and ANSI).
Tcl
tclAppInit.c
tclTest.c
tclUnixTest.c
pkga.c
pkgb.c
pkgc.c
pkgd.c
pkge.c
pkgf.c
Tk
tkAppInit.c
tkTest.c
tkSquare.c
Loadable extensions
If shared libraries are enabled, the executables tcltest and tktest are no
longer created for testing purposes. In stead, loadable libraries Tcltest.so,
Tclunixtest.so, Tktest.so and Tksquare.so are created which only contain the
additional test functions. These loadable libraries will be used to test
tclsh and wish.
Pixmap image reader
itcl2.0.1plus contain the pixmap image reader written by Ioi Lam. This
allows the use of a new builtin image type "pixmap".
----------------------------------------------------------------------------
The "plus"-part (= configuration, Makefiles, installation and fixes for dynamical
loading and event handling) is implemented by:
Jan Nijtmans
NICI (Nijmegen Institute of Cognition and Information)
email: nijt...@nici.kun.nl
url: http://www.nici.kun.nl/~nijtmans/
The "incr tcl"-port to tk4.1/tcl7.5 was done by
Karel Zuiderveld
Department of Image Sciences, University Hospital Utrecht
email: ka...@cv.ruu.nl
Enjoy,
Karel & Jan
--
-------------------------------------------------------------------------
Karel Zuiderveld, PhD E-mail: karel.zu...@cv.ruu.nl
Department of Image Sciences Tel: +31 30 2506710/6375548
Imaging Center Utrecht - E.01.334 Fax: +31 30 2513399
University Hospital Utrecht, Heidelberglaan 100, NL-3584 CX Utrecht
--------------- We'll help, but may not be of any help ------------------
--
Karel Zuiderveld, PhD E-mail: karel.zu...@cv.ruu.nl
Department of Image Sciences Tel: +31 30 2506710/6375548
Imaging Center Utrecht - E.01.334 Fax: +31 30 2513399
University Hospital Utrecht, Heidelberglaan 100, NL-3584 CX Utrecht
I do have problems with it... :-)
I can't compile it on Linux (1.2.10), gcc263. The ./configure script
freezes after the line "Solaris strtod bug". If I "make" after aborting
it, it does an infinite loop .............
I tried to make each part of it seperately, hacking the makefiles, but
it did not work, it seems it had problems with shared stuff support
(among other troubles).
The vanilla 2.0 release, along with Tcl74/Tk40 caused me no problem.
The standard Tcl75/Tk41 also builded itself without problem.
Any idea? Did someone manage to have it run in a similar config?
Another question while I'm at it: I can't compile the tkdesk10b1
package. It includes itcl 1.5. I know close to nothing (yet) to itcl, so
I was wondering if there was a way to make it use itcl 2.0 (I don't know
the diffces in the API).
I'm not extremely familiar with Linux internals, needless to say! Maybe
my installation lacks something.
--
--- ni...@skiin.com -+- (kidding, often) -+- finger -> PGP key ---
--- "Une citation sera spirituelle ou ne sera pas" ---
--- HommePage: <URL:http://worldserver.com/Skizine/nico> ---
>Karel Zuiderveld <ka...@midas.cv.ruu.nl> wrote:
>> itcl2.0.1plus is an improved version of itcl2.0plus, which was my
>> first go at making [incr tcl] 2.0 working with tcl7.5/tk4.1.
>--%-- snip
>> If you have problems with the release, don't expect us to fix it. It
>> was very hard work to get the release as-is; we have to stop
>> hacking and resume our normal work.
>I do have problems with it... :-)
>I can't compile it on Linux (1.2.10), gcc263. The ./configure script
>freezes after the line "Solaris strtod bug". If I "make" after aborting
>it, it does an infinite loop .............
>I tried to make each part of it seperately, hacking the makefiles, but
>it did not work, it seems it had problems with shared stuff support
>(among other troubles).
>The vanilla 2.0 release, along with Tcl74/Tk40 caused me no problem.
>The standard Tcl75/Tk41 also builded itself without problem.
>Any idea? Did someone manage to have it run in a similar config?
>Another question while I'm at it: I can't compile the tkdesk10b1
>package. It includes itcl 1.5. I know close to nothing (yet) to itcl, so
>I was wondering if there was a way to make it use itcl 2.0 (I don't know
>the diffces in the API).
>I'm not extremely familiar with Linux internals, needless to say! Maybe
>my installation lacks something.
>--
>--- ni...@skiin.com -+- (kidding, often) -+- finger -> PGP key ---
>--- "Une citation sera spirituelle ou ne sera pas" ---
>--- HommePage: <URL:http://worldserver.com/Skizine/nico> ---
Hmm, I think you may be getting the same problem I had with Linux
being very sniffy about the definition of strtod in one of the tcl
".h" files - which one depends on which version of tcl your building
(eg tcl7.4 tcl7.5 or itcl2.0 etc) which one should be obvious from the
gcc error message...
Anyway just commenting out the definition of strtod() works for me...
You may also get problems due to the compiler -D_NO_FD_SET=1 macro
being set. If you get messages about fd_set just remove the above
macro from the make files.
Hope this helps, or if not, doesn't waste too much of your time :)
Julian Loaring
a good idea to port it.... all compilation works on Linux-pre2.0.10 and
gcc-2.7.2 and with
libitk2.0.so => /usr/local/lib/libitk2.0.so
libitcl2.0.so => /usr/local/lib/libitcl2.0.so
libX11.so.6 => /usr/X11/lib/libX11.so.6.0
libtcl7.5.so => /usr/local/lib/libtcl7.5.so
libdl.so.1 => /lib/libdl.so.1.7.14
libm.so.5 => /lib/libm.so.5.0.5
libc.so.5 => /lib/libc.so.5.3.9 ..
But trying any itk or iwidget-demo resulted in an error
moaning that the interpreter doesn't know the widgets name
as a command. :-((((((((((((
And running the tcl-tests results in :
==== event-1.3 Tcl_DeleteFileHandler
==== Contents of test case:
testfilehandler close
testfilehandler create 2 disabled disabled
testfilehandler create 1 readable writable
testfilehandler create 0 disabled disabled
testfilehandler fillpartial 1
set result ""
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler create 1 off off
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler close
set result
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-1.3 FAILED
==== event-2.1 Tcl_DeleteFileHandler
==== Contents of test case:
testfilehandler close
testfilehandler create 2 disabled disabled
testfilehandler create 1 readable writable
testfilehandler fillpartial 1
set result ""
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler create 1 off off
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler close
set result
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-2.1 FAILED
==== event-2.2 Tcl_DeleteFileHandler, fd reused & events still pending
==== Contents of test case:
testfilehandler close
testfilehandler create 0 readable writable
testfilehandler fillpartial 0
set result ""
testfilehandler oneevent
lappend result [testfilehandler counts 0]
testfilehandler close
testfilehandler create 0 readable writable
testfilehandler oneevent
lappend result [testfilehandler counts 0]
testfilehandler close
set result
==== Result was:
{1 0} {0 1}
---- Result should have been:
{0 1} {0 0}
---- event-2.2 FAILED
==== event-4.1 FileHandlerEventProc, race between event and disabling
==== Contents of test case:
testfilehandler close
testfilehandler create 2 disabled disabled
testfilehandler create 1 readable writable
testfilehandler fillpartial 1
set result ""
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler create 1 disabled disabled
testfilehandler oneevent
lappend result [testfilehandler counts 1]
testfilehandler close
set result
==== Result was:
{1 0} {2 0} {3 0} {0 0}
---- Result should have been:
{0 1} {1 1} {1 2} {0 0}
---- event-4.1 FAILED
==== event-4.2 FileHandlerEventProc, TCL_FILE_EVENTS off
==== Contents of test case:
testfilehandler close
testfilehandler create 1 readable writable
testfilehandler create 2 readable writable
testfilehandler fillpartial 1
testfilehandler fillpartial 2
testfilehandler oneevent
set result ""
lappend result [testfilehandler counts 1] [testfilehandler
counts 2]
testfilehandler windowevent
lappend result [testfilehandler counts 1] [testfilehandler
counts 2]
testfilehandler close
set result
==== Result was:
{0 0} {1 0} {0 0} {1 0}
---- Result should have been:
{0 0} {0 1} {0 0} {0 1}
---- event-4.2 FAILED
==== event-14.7 tkerror/bgerror backwards compabitility
==== Contents of test case:
proc foo args {return $args}
catch {rename tkerror {}}
rename foo tkerror
list [info commands bgerror] [info commands tkerror] [info commands
foo] [tk
error a b c d]
==== Result was:
{} tkerror {} {a b c d}
---- Result should have been:
bgerror tkerror {} {a b c d}
---- event-14.7 FAILED
==== event-14.9 tkerror/bgerror backwards compabitility
==== Contents of test case:
proc bgerror args {return $args}
list [catch {rename bgerror tkerror} msg] $msg
==== Result was:==== rename-3.3 error conditions
==== Contents of test case:
proc r1 {} {}
proc r2 {} {}
list [catch {rename r1 r2} msg] $msg
==== Result was:
0 {}
---- Result should have been:
1 {can't rename to "r2": command already exists}
---- rename-3.3 FAILED
0 {}
---- Result should have been:
1 {can't rename to "tkerror": command already exists}
---- event-14.9 FAILED
can't delete "bgerror": command doesn't exist
--
--------------------------------------------------------
Harald Hoyer Software Beratung, Erstellung und Vertrieb
EMAIL: sat...@studbox.uni-stuttgart.de
WWW : http://wwwcip.rus.uni-stuttgart.de/~etk10226/