Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade TclX to Tcl9 #12

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions configure
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.69 for tclx 8.6.
# Generated by GNU Autoconf 2.69 for tclx 9.0.
#
#
# Copyright (C) 1992-1996, 1998-2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -577,8 +577,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tclx'
PACKAGE_TARNAME='tclx'
PACKAGE_VERSION='8.6'
PACKAGE_STRING='tclx 8.6'
PACKAGE_VERSION='9.0'
PACKAGE_STRING='tclx 9.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''

Expand Down Expand Up @@ -1298,7 +1298,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
\`configure' configures tclx 8.6 to adapt to many kinds of systems.
\`configure' configures tclx 9.0 to adapt to many kinds of systems.

Usage: $0 [OPTION]... [VAR=VALUE]...

Expand Down Expand Up @@ -1359,7 +1359,7 @@ fi

if test -n "$ac_init_help"; then
case $ac_init_help in
short | recursive ) echo "Configuration of tclx 8.6:";;
short | recursive ) echo "Configuration of tclx 9.0:";;
esac
cat <<\_ACEOF

Expand Down Expand Up @@ -1460,7 +1460,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
tclx configure 8.6
tclx configure 9.0
generated by GNU Autoconf 2.69

Copyright (C) 2012 Free Software Foundation, Inc.
Expand Down Expand Up @@ -1982,7 +1982,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by tclx $as_me 8.6, which was
It was created by tclx $as_me 9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

$ $0 $@
Expand Down Expand Up @@ -2330,7 +2330,7 @@ ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $
ac_compiler_gnu=$ac_cv_c_compiler_gnu


FULL_VERSION="8.6.0"
FULL_VERSION="9.0.0"


# TEA extensions pass this us the version of TEA they think they
Expand Down Expand Up @@ -2598,7 +2598,7 @@ $as_echo "$as_me: WARNING: --with-tcl argument should refer to directory contain
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
`ls -d /usr/lib/tcl8.6 2>/dev/null` \
`ls -d /usr/lib/tcl9.0 2>/dev/null` \
ramikhaldi marked this conversation as resolved.
Show resolved Hide resolved
`ls -d /usr/lib/tcl8.5 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
Expand Down Expand Up @@ -10398,7 +10398,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
This file was extended by tclx $as_me 8.6, which was
This file was extended by tclx $as_me 9.0, which was
generated by GNU Autoconf 2.69. Invocation command line was

CONFIG_FILES = $CONFIG_FILES
Expand Down Expand Up @@ -10451,7 +10451,7 @@ _ACEOF
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
ac_cs_version="\\
tclx config.status 8.6
tclx config.status 9.0
configured by $0, generated by GNU Autoconf 2.69,
with options \\"\$ac_cs_config\\"

Expand Down
4 changes: 2 additions & 2 deletions configure.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ dnl to configure the system for the local environment.
#
# RCS: @(#) $Id: configure.in,v 1.17 2006/01/26 00:30:54 hobbs Exp $

AC_INIT([tclx], [8.6])
FULL_VERSION="8.6.0"
AC_INIT([tclx], [9.0])
FULL_VERSION="9.0.0"

TEA_INIT([3.9])

Expand Down
6 changes: 5 additions & 1 deletion generic/tclExtend.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,10 @@ typedef void *void_pt;
#define TCLX_CMDL_INTERACTIVE (1<<0)
#define TCLX_CMDL_EXIT_ON_EOF (1<<1)

#define CONST const
ramikhaldi marked this conversation as resolved.
Show resolved Hide resolved
#define VOID void
#define panic Tcl_Panic

Comment on lines +55 to +58
Copy link
Member

@resuna resuna Nov 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It needs to build without these lines. They were not previously needed. If there are other changes necessary to make it work they need to be made elsewhere.

/*
* Application signal error handler. Called after normal signal processing,
* when a signal results in an error. Its main purpose in life is to allow
Expand Down Expand Up @@ -97,7 +101,7 @@ EXTERN void TclX_SplitWinCmdLine (int *argcPtr, char ***argvPtr);
/*
* Exported utility functions.
*/
EXTERN void TclX_AppendObjResult TCL_VARARGS_DEF(Tcl_Interp *, interpArg);
EXTERN void TclX_AppendObjResult (Tcl_Interp *, ...);

EXTERN char * TclX_DownShift (char *targetStr, CONST char *sourceStr);

Expand Down
2 changes: 1 addition & 1 deletion generic/tclXbsearch.c
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,7 @@ TclX_BsearchObjCmd (ClientData clientData,
valPtr = Tcl_NewStringObj (Tcl_DStringValue (&searchCB.lineBuf),
-1);
if (Tcl_ObjSetVar2(interp, objv[3], NULL, valPtr,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
Tcl_DecrRefCount (valPtr);
goto errorExit;
}
Expand Down
6 changes: 1 addition & 5 deletions generic/tclXchmod.c
Original file line number Diff line number Diff line change
Expand Up @@ -313,7 +313,6 @@ TclX_ChmodObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *
Tcl_Obj **fileObjv;
char *fileIdsString;
char *modeString;
int modeBits;

/*
* Options are not parsable just looking for "-", since modes can
Expand All @@ -334,10 +333,7 @@ TclX_ChmodObjCmd (ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *

modeString = Tcl_GetStringFromObj (objv [objIdx], NULL);
if (ISDIGIT (modeString[0])) {
if (Tcl_GetIntFromObj (interp, objv [objIdx], &modeBits)
!= TCL_OK)
return TCL_ERROR;
modeInfo.absMode = modeBits;
modeInfo.absMode = strtol(modeString, 0, 0);
modeInfo.symMode = NULL;
} else {
modeInfo.symMode = modeString;
Expand Down
15 changes: 4 additions & 11 deletions generic/tclXdup.c
Original file line number Diff line number Diff line change
Expand Up @@ -208,18 +208,11 @@ TclX_DupObjCmd (ClientData clientData,
* If a number is supplied, bind it to a file handle rather than doing
* a dup.
*/
if (objv [1]->typePtr == Tcl_GetObjType ("int")) {
bindFnum = TRUE;
} else {
srcChannelId = Tcl_GetStringFromObj (objv [1], NULL);
if (ISDIGIT (srcChannelId [0])) {
if (Tcl_ConvertToType (interp, objv [1],
Tcl_GetObjType ("int")) != TCL_OK)
goto badFnum;

bindFnum = FALSE;
srcChannelId = Tcl_GetStringFromObj (objv [1], NULL);
if (ISDIGIT (srcChannelId [0])) {
bindFnum = TRUE;
} else {
bindFnum = FALSE;
}
}
if (bindFnum) {
if (objc != 2)
Expand Down
4 changes: 2 additions & 2 deletions generic/tclXfilecmds.c
Original file line number Diff line number Diff line change
Expand Up @@ -87,12 +87,12 @@ TclX_PipeObjCmd (ClientData clientData,
channelNames [1], (char *) NULL);
} else {
if (Tcl_ObjSetVar2(interp, objv[1], NULL, Tcl_NewStringObj(channelNames [0], -1),
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL)
TCL_LEAVE_ERR_MSG) == NULL)
goto errorExit;

if (Tcl_ObjSetVar2(interp, objv[2], NULL,
Tcl_NewStringObj(channelNames [1], -1),
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL)
TCL_LEAVE_ERR_MSG) == NULL)
goto errorExit;
}

Expand Down
7 changes: 1 addition & 6 deletions generic/tclXfilescan.c
Original file line number Diff line number Diff line change
Expand Up @@ -641,12 +641,7 @@ ScanFile (Tcl_Interp *interp, scanContext_t *contextPtr, Tcl_Channel channel)

data.offset = (off_t) Tcl_Tell (channel);
Tcl_DStringSetLength (&lineBuf, 0);
if (Tcl_Gets (channel, &lineBuf) < 0) {
if (Tcl_Eof (channel) || Tcl_InputBlocked (channel))
goto scanExit;
Tcl_SetStringObj (Tcl_GetObjResult (interp),
Tcl_PosixError (interp), -1);
result = TCL_ERROR;
if (Tcl_Gets (channel, &lineBuf) < 0 || Tcl_Eof (channel) || Tcl_InputBlocked (channel) ) {
goto scanExit;
}

Expand Down
4 changes: 2 additions & 2 deletions generic/tclXgeneral.c
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ SetLoopCounter (Tcl_Interp *interp, char *varName, int idx)
{
Tcl_Obj *iObj, *newVarObj;

iObj = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);
iObj = Tcl_GetVar2Ex(interp, varName, NULL, 0);
if ((iObj == NULL) || (Tcl_IsShared (iObj))) {
iObj = newVarObj = Tcl_NewLongObj (idx);
} else {
Expand All @@ -330,7 +330,7 @@ SetLoopCounter (Tcl_Interp *interp, char *varName, int idx)

Tcl_SetLongObj (iObj, idx);
if (Tcl_SetVar2Ex(interp, varName, NULL, iObj,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
if (newVarObj != NULL) {
Tcl_DecrRefCount (newVarObj);
}
Expand Down
7 changes: 3 additions & 4 deletions generic/tclXlgets.c
Original file line number Diff line number Diff line change
Expand Up @@ -282,8 +282,7 @@ ReadListElement (Tcl_Interp *interp,

case '\\': {
char bsChar;

bsChar = Tcl_Backslash(p, &numChars);
Tcl_UtfBackslash(p, &numChars, &bsChar);
if (openBraces > 0) {
p += (numChars - 1); /* Advanced again at end of loop */
} else {
Expand Down Expand Up @@ -470,7 +469,7 @@ TclX_LgetsObjCmd (ClientData clientData,
int resultLen;

if (Tcl_ObjSetVar2(interp, objv[2], NULL, dataObj,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
goto errorExit;
}

Expand Down Expand Up @@ -512,7 +511,7 @@ TclX_LgetsObjCmd (ClientData clientData,
* FIX: Need functions to save/restore error state.
*/
if (Tcl_ObjSetVar2(interp, objv[2], NULL, dataObj,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) != NULL) {
TCL_LEAVE_ERR_MSG) != NULL) {
Tcl_SetObjResult (interp, saveResult); /* Restore old message */
}
Tcl_DecrRefCount (saveResult);
Expand Down
2 changes: 1 addition & 1 deletion generic/tclXlib.c
Original file line number Diff line number Diff line change
Expand Up @@ -546,7 +546,7 @@ ProcessIndexFile (Tcl_Interp *interp,

if ((Tcl_SplitList (interp, lineBuffer.string, &lineArgc,
&lineArgv) != TCL_OK) || (lineArgc < 4))
goto formatError;
goto reachedEOF;

/*
* lineArgv [0] is the package name.
Expand Down
14 changes: 7 additions & 7 deletions generic/tclXlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ TclX_LvarcatObjCmd (ClientData clientData,
* Get the variable that we are going to update. Include it if it
* exists.
*/
varObjPtr = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);
varObjPtr = Tcl_GetVar2Ex(interp, varName, NULL, 0);

if (varObjPtr != NULL) {
catObjc = objc - 1;
Expand Down Expand Up @@ -120,7 +120,7 @@ TclX_LvarcatObjCmd (ClientData clientData,
ckfree ((char *) catObjv);

if (Tcl_SetVar2Ex(interp, varName, NULL, newObjPtr,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
Tcl_DecrRefCount (newObjPtr);
return TCL_ERROR;
}
Expand Down Expand Up @@ -150,7 +150,7 @@ TclX_LvarpopObjCmd (ClientData clientData,
varName = Tcl_GetStringFromObj (objv [1], NULL);

listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG);
TCL_LEAVE_ERR_MSG);
if (listVarPtr == NULL) {
return TCL_ERROR;
}
Expand Down Expand Up @@ -201,7 +201,7 @@ TclX_LvarpopObjCmd (ClientData clientData,
* Update variable.
*/
if (Tcl_SetVar2Ex(interp, varName, NULL, listVarPtr,
TCL_PARSE_PART1|TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
goto errorExit;
}

Expand Down Expand Up @@ -244,7 +244,7 @@ TclX_LvarpushObjCmd (ClientData clientData,
}
varName = Tcl_GetStringFromObj (objv [1], NULL);

listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL, TCL_PARSE_PART1);
listVarPtr = Tcl_GetVar2Ex(interp, varName, NULL, 0);
if ((listVarPtr == NULL) || (Tcl_IsShared (listVarPtr))) {
if (listVarPtr == NULL) {
listVarPtr = Tcl_NewListObj (0, NULL);
Expand Down Expand Up @@ -282,7 +282,7 @@ TclX_LvarpushObjCmd (ClientData clientData,
goto errorExit;

if (Tcl_SetVar2Ex(interp, varName, NULL, listVarPtr,
TCL_PARSE_PART1| TCL_LEAVE_ERR_MSG) == NULL) {
TCL_LEAVE_ERR_MSG) == NULL) {
goto errorExit;
}
return TCL_OK;
Expand Down Expand Up @@ -372,7 +372,7 @@ TclX_LassignObjCmd (ClientData clientData,
elemPtr = nullObjPtr;
}
if (Tcl_SetVar2Ex(interp, Tcl_GetStringFromObj(objv [idx], NULL), NULL,
elemPtr, TCL_PARSE_PART1 | TCL_LEAVE_ERR_MSG) == NULL)
elemPtr, TCL_LEAVE_ERR_MSG) == NULL)
goto error_exit;
}

Expand Down
Loading