[fpc-devel] TCL
Johann Glaser
Johann.Glaser at gmx.at
Tue May 13 21:55:10 CEST 2014
Hi!
Am Dienstag, den 13.05.2014, 11:46 +0200 schrieb Tomas Hajny:
> On Tue, May 13, 2014 10:54, Johann Glaser wrote:
> > Hi!
> >
> >> Hi,
> >>
> >> > I'm working on a project with an external library (libtcl, it is
> >> written
> >> > in C) which creates some problems with back traces for exceptions.
> >> .
> >> .
> >>
> >> While not completely related to your original topic, I'd like to ask you
> >> if you decided knowingly not to use the package "tcl" provided with FPC
> >> (and possibly improve / extend it for your target platform) and if so,
> >> what were your reasons.
> >>
> >> I ask because I'm not sure to which extent it's used and/or maintained,
> >> especially considering that it supports a fairly limited set of
> >> platforms
> >> measured by current FPC span and that the included name of the TCL DLL
> >> for
> >> Win32 does not seem to match currently available TCL version.
> >>
> >> Should the package not to be useful any longer, we should probably
> >> either
> >> update it (if anyone volunteers to maintain it, because I suspect that
> >> the
> >> original maintainer is not involved actively any longer), or consider
> >> deprecating it.
> >
> > I have to admit that I didn't consider that there could already be a TCL
> > unit available. Therefore I did a full header translation for TCL 8.4
> > (which
> > was the current version at that time). Additionally I added an object
> > oriented wrapper to ease the programming.
> >
> > Please see at https://github.com/hansiglaser/pas-tcl for the sources.
> >
> > I use this library (together with pas-readline) in several projects (e.g.
> > "eztool" on Github), some of which are actively in development but not yet
> > published. It currently works perfectly with TCL 8.5, but I didn't (yet)
> > update the header translations.
> >
> > I'd be happy for any help improving the library or even inclusion in FPC!
>
> Since you already use TCL, could you please check if the version included
> with FPC is still useable at all with the currently available TCL version?
> I guess that you'd be probably able to modify one of your test programs to
> only use functions available in the older TCL version (or create another
> simple test for that purpose if that would be easier)?
I used the files in /usr/share/fpcsrc/2.6.4/packages/tcl/ which also
include a demo program.
I had to do the following changes:
- tcl80.pp: remove the $define USE_C
- tcl80.pp: change TCL_LIBRARY = 'tcl8.5';
- tcl80.pp: in function ArgvItem I removed the ridiculous assembler
stuff by the simple line "Result := argv[Idx];". This expression
should also be used in tcl_demo.pp, btw.
- copied over test.tcl from a quite old SVN checkout of
http://svn.freepascal.org/svn/fpc/trunk (2011-03-05) I had somewhere
on my disk
Then compilation worked properly and the demo works too. Using tcl8.6
also works.
> Depending on the result (and compatibility of the relevant licences), we
> have to agree with other members of the FPC core team on the most sensible
> approach. I noticed that there are some obvious differences in used types
> (pointer versus PChar, minor differences in parameter or record member
> names, etc.) between the two translations, but these might not impose a
> major issue.
Ok.
> > PS: I've mentioned the TCL library in the fpc-pascal list some time ago:
> > http://lists.freepascal.org/fpc-pascal/2012-September/035177.html
>
> I see; I probably missed it then.
>
> BTW, I noticed that you refer to file license.terms in multiple places of
> your repository, but I couldn't find that file there.
That is a verbatim cite of the original TCL header files. Is it
necessary to include their file with my Pascal translations?
Thanks
Hansi
More information about the fpc-devel
mailing list