Version 29 of Porting extensions to Tcl 9

Updated 2024-01-03 11:16:36 by aplsimple

AK (2023-11-14) Seeing a number of Replaced package require Tcl 8.X with package require Tcl 8.X- notes I believe that I should note that there might be a better way than this. While going from 8.X to 8.X- opens the package to 9, it also opens it to 10, 11, etc. A more restricted way would be to go to package require Tcl 8.X 9. The two requirements, 8.X, and 9 are OR-ed. The command accepts the Tcl version if it matches at least one of the requirements. With this change the package is opened to 9, but not beyond. This is not my idea. It came from Rolf Ade in his work on making Tcllib ready for Tcl 9. I had to reread the package manpage to understand.

PO - 2023-11-13

This page is the summary of my experiences trying to port the Tcl packages or programs supported by BAWT to Tcl9.

The following Tcl and Tk versions have been used for the porting tests:

Tcl9.0b19.0b1+9f0391c078075f932d389334cb30ca66b3215e477de6c0c9f4cd95b6f02d39df.gcc-702
Tk8.7b18.7b1+6e002715a6698c676a3e99eafaa1a0d68042de2b4d6a686c759a016c3bb05448.gcc-702.utf-16.win32
  • Table Packages lists all packages looked at and their current status.
  • Table Changes in Tcl summarizes all changes done at the Tcl level for all packages.
  • Table Changes in C summarizes all changes done at the C level for all packages.
  • All other tables summarize the changes done for each individual package or program.

Please feel free to add your experiences, additions and comments.


Other porting experiences:


Packages

This table summarizes the status of the package ports.

The columns show the folllowing information:

  • Library: The name and a link to the package home page.
  • Start version: The version number and a link to the source of the package as used for start of the porting.
  • Ported version: The version number and a link to the source of the ported package. If entry is Worked, then the Start version is working. If entry is N/A, I either did not look at the package or it was too much effort.
  • Build: The modified package could be compiled with Tcl 9.
  • Require: A package require suceeded for the package with Tcl 9.
  • Bawt Test: The simple BAWT test program for this package works with Tcl 9.
  • Responsible: Add a name or link, if you are the maintainer or feel responsible for this package.
  • Comments: Short comments regarding this package. Add longer comments at the end of the table.
Library Start version Ported version Build Require Bawt Test Responsible Comments
apave 3.4.8 4.3.6 YesYesYesaplsimpletested on Windows and Linux
awthemes 10.4.0 WorksYesYesYes
BWidget 1.9.16 1.9.17 YesYesYesoehhar: Checked in upstream by [L4 ]
Canvas3d 1.2.2 1.2.3 YesYesYes
cawt 2.9.4 N/AYesYesNoPOTwapi not yet working with Tcl9
cffi 1.2.0 1.2.1 YesYesYes
critcl 3.2 3.2.1 YesYesN/AAK
DiffUtil 0.4.2 0.4.3 YesYesYes
expect 5.45.4 NoTcl9NoNoNo
ffidl 0.9.0 0.9.1 YesYesYes
fitsTcl 2.5 2.5.1 YesYesYes
gdi 0.9.9.15 WorksYesYesN/A
gorilla 1.6.0 1.6.1 YesYesN/A
hdc 0.2.0.1 WorksYesYesN/A
Img 1.4.14 1.4.15 YesYesYesPO
imgjp2 0.1 0.1.1 YesYesYes
imgtools 0.3 0.3.1 YesYesYes
iocp 1.1.0 1.1.1 YesYesNo
itk 4.2.3 WorksYesYesYes
iwidgets 4.1.1 4.1.2 YesYesYes
materialicons 0.2 WorksYesYesYes
mawt 0.4.1 0.4.3 YesYesYesPO
memchan 2.3 2.3.1 YesYesNo
mentry 3.18 WorksYesYesYes
Mpexpr 1.2 1.2.1 YesYesYes
mqtt 3.1 3.1.1 YesYesYes
MuPDFWidget 2.3.1 WorksYesYesYes
nacl 1.1 1.1.1 YesYesYes
nsf 2.4.0 N/AYesNoNo
ooxml 1.6.1 1.6.2 YesYesYes
oratcl 4.6 NoTcl9NoNoN/A
parse_args 0.3.3 0.3.4 YesYesYes
pawt 1.1.3 WorksYesYesYesPO
pdf4tcl 0.9.4 WorksYesYesYes
pgintcl 3.5.1 3.5.2 YesYesN/A
photoresize 0.2 0.2.1 YesYesYes
poApps 2.11.0 2.12.1 YesYesN/APO
poImg 2.0.2 2.0.5 YesYesYesPO
printer 0.9.6.15 0.9.6.16 YesYesYes
puppyicons 0.1 WorksYesYesYes
rbc 0.2 NoTcl9NoNoNo
rl_json 0.11.5 0.11.6 YesNoNo
ruff 2.3.0 2.3.1 YesYesYes
scrollutil 1.19 WorksYesYesYes
shellicon 0.1 0.1.1 YesYesYes
shtmlview 1.0.0 1.0.1 YesYesYes
Snack 2.2.11 2.2.12 YesYesYes
tablelist 6.22 WorksYesYesYes
tbcload 1.7.1 1.7.2 YesNoN/A
tcl3dBasic 0.9.5 0.9.6 YesYesYesPO
Tcladdressbook 1.2.4 NoTcl9NoNoN/A
tclAE 2.0.7 NoTcl9NoNoN/A
Tclapplescript 2.2 NoTcl9NoNoN/A
tclargp 0.2 WorksYesYesYes
tclcompiler 1.7.3 1.7.4 YesYesNo
tclcsv 2.3 2.3.1 YesYesYes
tclfpdf 1.6 WorksYesYesYes
tclgd 1.4 1.4.1 YesYesYes
Tclkit N/AN/AYesYesN/A
tcllib 1.21 2.0 YesYesYesNo tcllibc
tclMuPdf 2.3 WorksYesYesYes
tclparser 1.8 1.8.1 YesYesN/A
tclpy 0.4 0.4.1 YesYesYes
tclssg 2.2.1 WorksYesYesN/A
tcltls 1.7.22 1.7.23 YesYesYes
tclvfs 1.4.2 1.4.3 YesYesYes
tclws 3.4.0 3.4.1 YesYesN/Aoehhar: Ported upstream by commit [L5 ]
tclx 8.4.4 NoTcl9NoNoNoStopped porting because of unknown replacement for Tcl_Value and Tcl_ValueType

chrstphrchvz: see previous attempt https://github.com/flightaware/tclx/pull/12
tdom 0.9.3 WorksYesYesYes
Tix 8.4.3 8.4.4 YesYesNo
tkcon 2.7.10 WorksYesYesN/A
tkdnd 2.9.3 2.9.4 YesYesYes
Tkhtml 3.0.1 3.0.2 YesYesYes
tklib 0.7 0.8 YesYesN/A
tkpath 0.3.3 NoTcl9NoNoNo
tkribbon 1.1 1.2 YesYesN/A
tksqlite 0.5.13 0.5.14 YesYesN/A
tksvg 0.12 0.13 YesYesYesNot needed for Tk 8.7. oehhar:Thanks, committed upstream and released with version 0.14
Tktable 2.11 2.11.1 YesYesYes
tkwintrack 2.0.1 WorksYesYesN/A
treectrl 2.4.1 2.4.2 YesYesYes
Trf 2.1.4 NoTcl9NoNoNo
trofs 0.4.9 NoTcl9NoNoNo
tserialport 1.1 1.1.1 YesYesYes
twapi 4.7.2 NoTcl9NoNoNo
tzint 1.1 1.1.1 YesYesYes
udp 1.0.11 1.0.12 YesYesNo
ukaz 2.0a3 WorksYesYesYes
vectcl 0.2 0.2.1 YesYesNo
wcb 3.8 WorksYesYesYes
windetect 1.0.0 WorksYesYesN/A
winhelp 1.1 1.1.1 YesYesYes

Additional comments:


Changes in Tcl

Common changes in Tcl files Comments
Replaced $tcl_platform with $::tcl_platform in namespaces
Replaced package require Tcl 8.X with package require Tcl 8.X-
Replaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Added string totitle in pkgIndex.tcl.in or pkgIndex.tcl
Added string totitle in Makefile.in
Replaced "~" with file tildeexpand "~" for Tcl >= 9
Use source -encoding utf-8 instead of plain source
Changed functionality: ttk::combobox::current returns empty string instead of -1
Check for octal numbers.

Additional comments:


Changes in C

This table summarizes the changes done for porting C/C++ extensions.

Some of the actions are described first as code examples.

Added Tcl_Size related definitions, if TCL_SIZE_MAX is not defined

/* Check, if Tcl version supports Tcl_Size,
   which was introduced in Tcl 8.7 and 9.
*/
#ifndef TCL_SIZE_MAX
    #include <limits.h>
    #define TCL_SIZE_MAX INT_MAX

    #ifndef Tcl_Size
        typedef int Tcl_Size;
    #endif

    #define TCL_SIZE_MODIFIER ""
    #define Tcl_GetSizeIntFromObj Tcl_GetIntFromObj
    #define Tcl_NewSizeIntObj     Tcl_NewIntObj
#endif

Replaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions

#if TCL_MAJOR_VERSION < 9
    Tcl_SavedResult savedResult;
#else
    Tcl_InterpState savedResult;
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_SaveResult(interp, &savedResult);
#else
    savedResult = Tcl_SaveInterpState(interp, TCL_OK);
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_RestoreResult(interp, &savedResult);
#else
    Tcl_RestoreInterpState(interp, savedResult);
#endif

#if TCL_MAJOR_VERSION < 9
    Tcl_DiscardResult(&state);
#else
    Tcl_DiscardInterpState(state);
#endif
Common changes in C/C++ files Comments
Replaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
Added #include <stdarg.h>
Removed _ANSI_ARGS_ statements
Added definition of _ANSI_ARGS_Too lazy to replace them all
Added definition of TCL_VARARGSToo lazy to replace them all
Changed CONST to const
Changed CONST84 to const
Changed CONST86 to const
Changed VOID to void
Replaced TCL_CHANNEL_VERSION_2 with TCL_CHANNEL_VERSION_5
Replaced TCL_CHANNEL_VERSION_4 with TCL_CHANNEL_VERSION_5
Unicode related changes
Replaced Tcl_UniCharNcasecmp with Tcl_UtfNcasecmp
Replaced Tcl_UniCharNcmp with Tcl_UtfNcmp
Replaced Tcl_UniCharCaseMatch with Tcl_StringCaseMatch
Replaced Tcl_Backslash with Tcl_UtfBackslashRecommended replacement ??
Replaced Tcl_DStringTrunc with Tcl_DStringSetLength
Replaced TclOffset with offsetof
Replaced Tcl_WinUtfToTChar with Tcl_UtfToChar16DString
Replaced Tk_BackgroundError with Tcl_BackgroundError
Replaced Tk_CancelIdleCall with Tcl_CancelIdleCall
Replaced Tk_DoWhenIdle with Tcl_DoWhenIdle
Replaced Tk_EventuallyFree with Tcl_EventuallyFree
Replaced Tk_Preserve with Tcl_Preserve
Replaced Tk_Release with Tcl_Release
Replaced TkpDrawHighlightBorder with Tk_DrawHighlightBorder for Tcl >= 9
Replaced TkpMakeWindow with Tk_MakeWindow for Tcl >= 9
Replaced TclSetPreInitScript with Tcl_SetPreInitScript for Tcl >= 9
Added parameter compRule to Tk_PhotoPutBlock for Tcl >= 9
Replaced Tk_PhotoPutBlock_NoComposite with Tk_PhotoPutBlock(..., TK_PHOTO_COMPOSITE_OVERLAY)
Replaced Tcl_PanicVA with `Tcl_Panic using method described in TIP 422
Replaced panic with Tcl_Panic
Replaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Changed signature of corresponding function.
Removed expressions using obsolete TCL_INTERP_DESTROYEDRecommended replacement ??
Removed expressions using obsolete TCL_PARSE_PART1Recommended replacement ??
Replaced obsolete TCL_OUT_LINE_COMPILE with TCL_ERROR
Replaced obsolete TK_X_EVENTS with TCL_WINDOW_EVENTS
Replaced obsolete TK_DONT_WAIT with TCL_DONT_WAIT
Replaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Updated tclconfig files
Updated files config.guess and config.sub
Added Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Replaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Replaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Replaced NULL with (char *)NULL in calls of function Tcl_AppendResult or Tcl_SetErrorCode

Additional comments:

DKF: Note that Tcl_SaveResult() has basically been deprecated since Tcl 8.5 because it doesn't handle the full state of the interpreter (and can't; not enough space in the Tcl_SavedResult structure definition and that's caller allocated; by comparison, Tcl_InterpState is an opaque handle and has its definition entirely managed by Tcl's internals). Unless you need the code to still work in Tcl 8.4 and before, you should update to use the new API. Tcl 9.0 just removes that deprecated API; Tcl 8.5 and 8.6 were the transition period (over a decade).

chrstphrchvz: Note that casting the NULL sentinel for Tcl_AppendResult()/Tcl_SetErrorCode() is not for Tcl 9 readiness, but rather something that should be done anyway for portability.

DGP: Any code still making use of the TCL_INTERP_DESTROYED flag should be converted to call the Tcl_InterpDeleted routine.

DGP: The last Tcl release where the TCL_PARSE_PART1 flag had any effect was Tcl 8.0. Just remove it.


CMake

File Changes Comments
Modules/FindTCL.cmakeAdded search for tcl9tk87 library files in BAWT Setup script CMake.bawt

Additional comments:


SWIG

File Changes Comments
Several filesChanged CONST to const
Several filesReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesReplaced NULL with (char *)NULL in calls of function Tcl_AppendResult or Tcl_SetErrorCode
Lib/tcl/std_vector.iReplaced Tcl_GetBoolFromObj with SwigGetBoolFromObj
Lib/tcl/tclruntime.swgAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined

Additional comments:

  • Renamed Tcl_GetBoolFromObj to SwigGetBoolFromObj, as Tcl_GetBoolFromObj is a macro in Tcl9

BWidget

File Changes Comments
demo/tree.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9
dropsite.tclReplaced $tcl_platform with $::tcl_platform in namespaces
widget.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


Canvas3d

File Changes Comments
generic/c3dsearch.cRemoved CONST86 in struct
generic/c3d.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


cffi

File Changes Comments
generic/tclhBase.hUsed definitions of Tclh_SSizeT and Tclh_USizeT as are used for Tcl 8TODO
generic/tclhBase.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclhPointer.hAdded #include <stdarg.h>
pkgIndex.tcl.inAdded string totitle
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


critcl

File Changes Comments
build.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
lib/critcl/critcl.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
lib/critcl/pkgIndex.tclReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Updated tclconfig files

Additional comments:


DiffUtil

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/diffutil.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/diffutil.cReplaced Tcl_UniCharNcasecmp with Tcl_UtfNcasecmp
generic/diffutil.cReplaced Tcl_UniCharNcmp with Tcl_UtfNcmp
generic/diffutil.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/diff.cUnicode related changes
Several filesChanged CONST to const
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


ffidl

File Changes Comments
generic/ffidl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/ffidl.cChanged CONST to const
generic/ffidl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/ffidl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
library/ffidlrt.tclReplaced $tcl_platform with $::tcl_platform in namespaces
library/ffidlrt.tclNeed to correct stubs number of obsolete Tcl_GetUnicode and Tcl_GetByteArrayFromObjTODO
Updated tclconfig files

Additional comments:


fitsTcl

File Changes Comments
configure.inAdded search for Tcl9 libraries.
fitsTcl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter

Additional comments:


gorilla

File Changes Comments
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
sources/tcllibUpdated csv module to 0.8.1
sources/tcllibUpdated md5 module to 2.0.8
sources/tcllibUpdated sha1module to 2.0.4
sources/tcllibUpdated sha1module to 1.0.7
gorilla.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9

Additional comments:


imgjp2

File Changes Comments
Makefile.inAdded string totitle
imgjp2.cReplaced Tk_PhotoPutBlock_NoComposite with Tk_PhotoPutBlock(..., TK_PHOTO_COMPOSITE_OVERLAY)
imgjp2.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
imgjp2.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


imgtools

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/imgtoolsDecl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


iocp

File Changes Comments
win/tclWinIocp.cReplaced TCL_CHANNEL_VERSION_4 with TCL_CHANNEL_VERSION_5
win/tclWinIocp.cReplaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Define IocpChannelClose only for Tcl < 9.
win/tclWinIocpTcp.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
win/tclWinIocpWinsock.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
win/tclWinIocpUtil.cReplaced Tcl_PanicVA with Tcl_Panic using method described in TIP 422
win/tclhBase.hDeclared for Tcl9: typedef ptrdiff_t Tclh_SSizeTTODO
win/tclPointer.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/tclWinIocp.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


iwidgets

File Changes Comments
win/iwidgets.tclReplaced $iwidgets with $::iwidgets in namespaces
iwidgets.tcl.inReplaced $iwidgets with $::iwidgets in namespaces
iwidgets.tcl.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


mawt

File Changes Comments
swigfiles/mawt.iReplaced SWIG module name mawtLib with mawt
swigfiles/mawt.iAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tclfiles/mawtInterface.tclReplaced namespace mawtlib with mawt
tclfiles/mawtQuery.tclReplaced namespace mawtlib with mawt
tclfiles/pkgIndex.tcl.inReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter

Additional comments:


memchan

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several header filesAdded definition of _ANSI_ARGS_
generic/memchanInt.hCorrected #if ((TCL_MAJOR_VERSION >= 8) && ...) to #if ((TCL_MAJOR_VERSION == 8) && ...)
generic/memchanInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/memchan.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: channel type memory/fifo must be version TCL_CHANNEL_VERSION_5

Mpexpr

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
./generic/mpexpr.hAdded definition of TCL_VARARGS
./generic/mpparse.cReplaced Tcl_Backslash with Tcl_UtfBackslash

Additional comments:


mqtt

File Changes Comments
mqtt-3.1.tmReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


nacl

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/nacl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/nacl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


ooxml

File Changes Comments
helper.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


parse_args

File Changes Comments
generic/parse_args.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/parse_args.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/parse_argsInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Updated tclconfig files

Additional comments:


pawt

File Changes Comments
pkgIndex.tclReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-

Additional comments:


pgintcl

File Changes Comments
pgin.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


photoresize

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/photoresize_wrap.cppChanged CONST to const
generic/photoresize_wrap.cppReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
generic/photoresize_wrap.cppAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Updated tclconfig files

Additional comments:


poApps

File Changes Comments
Several filesReplaced "~" with file tildeexpand "~" for Tcl >= 9 using new proc GetHomeDir
Several filesChanged functionality: ttk::combobox::current returns empty string instead of -1

Additional comments:


poImg

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/UTT_TclIf.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


printer

File Changes Comments
printer.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
printer.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
printer.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions

Additional comments:


rl_json

File Changes Comments
Several filesChanged CONST to const
Several filesRemoved _ANSI_ARGS_ statements
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/rl_json.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
pkgIndex.tcl.inAdded string totitle
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: Can't retrieve objType for int

rbc

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST86 to const
Several filesAdded definition of _ANSI_ARGS_
Several filesAdded definition of TCL_VARARGS
Several filesRemoved expressions using obsolete TCL_INTERP_DESTROYED

Additional comments:

  • Stopped porting because of lots of other needed changes

ruff

File Changes Comments
ruff.tclReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


shellicon

File Changes Comments
shellicon.cChanged CONST to const
shellicon.cReplaced Tcl_AppendResult with Tcl_SetResult for return of image name

Additional comments:


shtmlview

File Changes Comments
shtmlview/shtmlview.tclReplaced $tcl_platform with $::tcl_platform in namespaces

Additional comments:


Snack

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged CONST86 to const
Several filesRemoved _ANSI_ARGS_ statements
generic/jkSound.hAdded #if TCL_MAJOR_VERSION >= 9 to hide obsolete Tcl_SeekOld and Tcl_TellOld
generic/snack.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesRemoved expressions using obsolete TCL_INTERP_DESTROYED
Several filesRemoved expressions using obsolete TCL_PARSE_PART1

Additional comments:


tbcload

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
cmpInt.hAdded definition of _ANSI_ARGS_
cmpRead.cReplaced TclOffset with offsetof
Updated tclconfig files

Additional comments:

  • Critical compiler warnings regarding int * vs. size_t * with ExceptionRange
  • package require tbcload generates error message: InitTypes: failed to find the int type

tcl3dBasic

File Changes Comments
CMakeModules/Macros.cmakeAdded macro GET_TCL_MAJOR_VERSION
tcl3dOgl/Togl/togl.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tcl3dOgl/Togl/togl.cReplaced Tk_Preserve with Tcl_Preserve
tcl3dOgl/Togl/togl.cReplaced Tk_Release with Tcl_Release
tcl3dOgl/Togl/togl.cReplaced TkpMakeWindow with Tk_MakeWindow for Tcl >= 9
tcl3dOgl/Togl/togl.cReplaced panic with `Tcl_Panic
tcl3dOgl/Togl/togl.cReplaced Tk_DoWhenIdle with Tcl_DoWhenIdle
tcl3dOgl/Togl/togl.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Several filesReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
swigfiles/tcl3dDefines.iAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several pkgIndex.tcl filesUse source -encoding utf-8 instead of plain source
Several pkgIndex.tcl filesReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Several SWIG filesAdapted SWIG module names

Additional comments:


tclcompiler

File Changes Comments
Several filesChanged CONST to const
Several filesChanged CONST84 to const
cmpInt.hAdded definition of _ANSI_ARGS_
cmpInt.hReplaced panic with Tcl_Panic
cmpWrite.cReplaced TclOffset with offsetof
cmpWrite.cReplaced obsolete TCL_OUT_LINE_COMPILE with TCL_ERROR
cmpWrite.cReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
cmpWrite.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
cmpWrite.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Updated tclconfig files

Additional comments:

  • Critical compiler warnings regarding int * vs. size_t * with ForeachVarList

tclcsv

File Changes Comments
src/tclcsv.cChanged CONST to const
pkgIndex.tcl.inAdded string totitle
src/csv.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclgd

File Changes Comments
Several filesChanged CONST to const
generic/tclgdtcl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/tclgd.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclgd.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


Tclkit

File Changes Comments
kbskit/generic/kitInit.cReplaced TclSetPreInitScript with Tcl_SetPreInitScript for Tcl >= 9
Several filesChanged CONST to const
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
Several filesReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
kbskit/library/setupvfs.tclAdded ability to specify different Tcl and Tk versions.
TclVfs/generic/vfs.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
Several filesRemoved _ANSI_ARGS_ statements
vqtcl/generic/vlerq.cReplaced Tcl_WinUtfToTChar with Tcl_UtfToChar16DString
Several filesReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Several filesAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclparser

File Changes Comments
tclParser.cChanged CONST to const
tclParser.cRemoved _ANSI_ARGS_ statements
tclParser.cUsed Tcl_Size for size parameter of TclFindElement for Tcl >= 9
tclParser.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tclParser.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tclpy

File Changes Comments
generic/tclpy.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
generic/tclpy.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tclpy.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
pkgIndex.tcl.in.cmakeAdded string totitle

Additional comments:


tcltls

File Changes Comments
Several filesRemoved _ANSI_ARGS_ statements
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
tlsIO.cReplaced TCL_CHANNEL_VERSION_2 with TCL_CHANNEL_VERSION_5
tls.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
tls.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
tls.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
tls.cReplaced NULL or 0 with (Tcl_Size *)NULL in functions having Tcl_Size as input parameter
pkgIndex.tcl.inReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Updated files config.guess and config.sub

Additional comments:


tclvfs

File Changes Comments
generic/vfs.cRemoved _ANSI_ARGS_ statements
generic/vfs.cChanged CONST to const
generic/vfs.cChanged CONST86 to const
generic/vfs.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
generic/vfs.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/vfs.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/vfs.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
library/vfs.tcl.inReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


tclws

File Changes Comments
Several filesReplaced package require Tcl 8.X with package require Tcl 8.X-

Additional comments:


tix

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
generic/tix.hAdded definition of _ANSI_ARGS_
generic/tix.hAdded definition of TCL_VARARGS
generic/tix.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tixInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tixGrSort.cReplaced Tcl_DStringTrunc with Tcl_DStringSetLength
Several filesReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
Several filesReplaced Tk_Preserve with Tcl_Preserve
Several filesReplaced Tk_Release with Tcl_Release
Several filesReplaced Tk_CancelIdleCall with Tcl_CancelIdleCall
Several filesReplaced Tk_DoWhenIdle with Tcl_DoWhenIdle
Several filesReplaced Tk_EventuallyFree with Tcl_EventuallyFree
Several filesReplaced Tk_BackgroundError with Tcl_BackgroundError
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/tixWidget.cReplaced obsolete TK_X_EVENTS with TCL_WINDOW_EVENTS
generic/tixWidget.cReplaced obsolete TK_DONT_WAIT with TCL_DONT_WAIT
library/Init.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
Makefile.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:

  • BAWT demo does not run

tkdnd

File Changes Comments
library/tkdnd.tclAdded string totitle
Several filesReplaced Tk_BackgroundError with Tcl_BackgroundError
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/OleDND.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/OleDND.hUnicode related changes
Updated tclconfig files

Additional comments:


tkhtml

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
src/htmltcl.cAdded #include <stdarg.h>
src/htmltcl.cReplaced Tcl_PkgRequire(interp, "Tcl", "8.X", 0) with Tcl_PkgRequire(interp, "Tcl", "8.X-", 0)
src/htmlimage.cAdded parameter compRule to Tk_PhotoPutBlock for Tcl >= 9
src/html.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
hv/hv3see.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


tklib

File Changes Comments
Lots of filesReplaced package require Tcl 8.X with package require Tcl 8.X-
Lots of filesReplaced package vsatisfies Tcl 8.X with package vsatisfies Tcl 8.X-

Additional comments:


tkpath

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void

Additional comments:

  • Stopped porting because of lots of needed Tk_OptionSpec adaptions

tkribbon

File Changes Comments
CMakeLists.txtReplaced tkribbon with Tkribbon in load command
generic/TkRibbon_Widget.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
win/TkRibbon.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter

Additional comments:


tksqlite

File Changes Comments
tksqlite.tclReplaced package require Tcl 8.X with package require Tcl 8.X-
tksqlite.tclReplaced ttk with ::ttk in namespaces
tksqlite.tclReplaced "~" with file tildeexpand "~" for Tcl >= 9

Additional comments:


tktable

File Changes Comments
generic/tkTable.cRemoved expressions using obsolete TCL_INTERP_DESTROYEDTODO
generic/tkTable.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Several filesChanged CONST to const
Several filesChanged CONST84 to const
Several filesChanged VOID to void
Several filesRemoved _ANSI_ARGS_ statements
Makefile.inReplaced package require Tcl 8.X with package require Tcl 8.X-
Updated tclconfig files

Additional comments:


treectrl

File Changes Comments
Several filesChanged CONST to const
Several filesChanged VOID to void
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
generic/tkTreeUtils.cRemoved _ANSI_ARGS_ statements
generic/tkTreeCtrl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/qebind.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/qebind.cReplaced Tcl_SavedResult, Tcl_DiscardResult, Tcl_SaveResult, Tcl_RestoreResult with Tcl9 functions
generic/tkTreeDisplay.cReplaced TkpDrawHighlightBorder with Tk_DrawHighlightBorder for Tcl >= 9
generic/tkTreeElem.cRemoved expressions using obsolete TCL_INTERP_DESTROYED
Makefile.inAdded string totitle
Updated tclconfig files

Additional comments:


tserialport

File Changes Comments
pkgIndex.tcl.inAdded string totitle
Updated files config.guess and config.sub
Updated tclconfig files

Additional comments:


twapi

File Changes Comments
twapi/storage/dirmonitor.cReplaced Tcl_UniCharCaseMatch with Tcl_StringCaseMatch
twapi/namedpipe/namedpipe.cReplaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Changed signature of NPipeCloseProc
twapi/namedpipe/namedpipe.cReplaced TCL_CHANNEL_VERSION_4 with TCL_CHANNEL_VERSION_5
twapi/include/twapi.htclStubsPtr->tcl_StaticLibrary not available in Tcl9 anymore. Replaced by Tcl_StaticPackage, which enables compilation, but Tcl_StaticPackage can/should not be used with stubs.
pkgIndex.tcl.inAdded string totitle

Additional comments:

  • Compiles, but does not work with package require

tzint

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/tzint.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/tzint.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:


udp

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/udp_tcl.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/udp_tcl.cChanged CONST to const
generic/udp_tcl.cChanged CONST86 to const
generic/udp_tcl.cReplaced Tcl_DriverCloseProc with Tcl_DriverClose2Proc. Changed signature of corresponding function.
generic/udp_tcl.cAdded #include <stdarg.h>
generic/udp_tcl.cReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: channel type udp must be version TCL_CHANNEL_VERSION_5

vectcl

File Changes Comments
pkgIndex.tcl.inAdded string totitle
generic/vmparser.cChanged CONST to const
generic/vmparser.cAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
generic/vectclInt.hAdded Tcl_Size related definitions, if TCL_SIZE_MAX is not defined
Several filesReplaced ìnt with Tcl_Size in functions having Tcl_Size as output parameter
Updated tclconfig files

Additional comments:

  • BAWT demo gives error: expected integer but got "1.0 0.0 0.0"

winhelp

File Changes Comments
Makefile.inAdded string totitle
Updated tclconfig files

Additional comments: