diff options
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.h | 2 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 2 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 2 | ||||
-rw-r--r-- | generic/tclIOUtil.c | 36 | ||||
-rw-r--r-- | generic/tclPkgConfig.c | 4 | ||||
-rw-r--r-- | generic/tclScan.c | 2 | ||||
-rw-r--r-- | generic/tclZlib.c | 2 |
7 files changed, 27 insertions, 23 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index e76eb58..5de113d 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -361,7 +361,7 @@ typedef long LONG; */ #if !defined(TCL_WIDE_INT_TYPE)&&!defined(TCL_WIDE_INT_IS_LONG) -# if defined(_MSC_VER) || defined(_WIN32) +# if defined(_WIN32) && (!defined(__USE_MINGW_ANSI_STDIO) || !__USE_MINGW_ANSI_STDIO) # define TCL_WIDE_INT_TYPE __int64 # define TCL_LL_MODIFIER "I64" # if defined(_WIN64) diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index e816ad8..cf900a3 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -3514,7 +3514,7 @@ Tcl_LsearchObjCmd( if (allMatches || inlineReturn) { Tcl_ResetResult(interp); } else { - TclNewIntObj(itemPtr, -1); + TclNewIntObj(itemPtr, TCL_INDEX_NONE); Tcl_SetObjResult(interp, itemPtr); } goto done; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 4bf4232..cf4240a 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -3893,7 +3893,7 @@ TclNRSwitchObjCmd( TclNewIntObj(rangeObjAry[0], info.matches[j].start); TclNewIntObj(rangeObjAry[1], info.matches[j].end-1); } else { - TclNewIntObj(rangeObjAry[1], -1); + TclNewIntObj(rangeObjAry[1], TCL_INDEX_NONE); rangeObjAry[0] = rangeObjAry[1]; } diff --git a/generic/tclIOUtil.c b/generic/tclIOUtil.c index 3591431..fcce215 100644 --- a/generic/tclIOUtil.c +++ b/generic/tclIOUtil.c @@ -1684,7 +1684,7 @@ Tcl_FSEvalFileEx( * Tilde-substitution is performed on this * pathname. */ const char *encodingName) /* Either the name of an encoding or NULL to - use the system encoding. */ + use the utf-8 encoding. */ { int length, result = TCL_ERROR; Tcl_StatBuf statBuf; @@ -1722,16 +1722,16 @@ Tcl_FSEvalFileEx( /* * If the encoding is specified, set the channel to that encoding. - * Otherwise don't touch it, leaving things up to the system encoding. If - * the encoding is unknown report an error. + * Otherwise use utf-8. If the encoding is unknown report an error. */ - if (encodingName != NULL) { - if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) - != TCL_OK) { - Tcl_Close(interp,chan); - return result; - } + if (encodingName == NULL) { + encodingName = "utf-8"; + } + if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) + != TCL_OK) { + Tcl_Close(interp,chan); + return result; } TclNewObj(objPtr); @@ -1821,7 +1821,7 @@ TclNREvalFile( * evaluate. Tilde-substitution is performed on * this pathname. */ const char *encodingName) /* The name of an encoding to use, or NULL to - * use the system encoding. */ + * use the utf-8 encoding. */ { Tcl_StatBuf statBuf; Tcl_Obj *oldScriptFile, *objPtr; @@ -1858,16 +1858,16 @@ TclNREvalFile( /* * If the encoding is specified, set the channel to that encoding. - * Otherwise don't touch it, leaving things up to the system encoding. If - * the encoding is unknown report an error. + * Otherwise use utf-8. If the encoding is unknown report an error. */ - if (encodingName != NULL) { - if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) - != TCL_OK) { - Tcl_Close(interp,chan); - return TCL_ERROR; - } + if (encodingName == NULL) { + encodingName = "utf-8"; + } + if (Tcl_SetChannelOption(interp, chan, "-encoding", encodingName) + != TCL_OK) { + Tcl_Close(interp, chan); + return TCL_ERROR; } TclNewObj(objPtr); diff --git a/generic/tclPkgConfig.c b/generic/tclPkgConfig.c index 96b6962..12df68e 100644 --- a/generic/tclPkgConfig.c +++ b/generic/tclPkgConfig.c @@ -35,6 +35,10 @@ #include "tclInt.h" +#ifndef TCL_CFGVAL_ENCODING +# define TCL_CFGVAL_ENCODING "utf-8" +#endif + /* * Use C preprocessor statements to define the various values for the embedded * configuration information. diff --git a/generic/tclScan.c b/generic/tclScan.c index ee04165..67fe6f3 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.c @@ -1089,7 +1089,7 @@ Tcl_ScanObjCmd( if (code == TCL_OK) { if (underflow && (nconversions == 0)) { if (numVars) { - TclNewIntObj(objPtr, -1); + TclNewIntObj(objPtr, TCL_INDEX_NONE); } else { if (objPtr) { Tcl_SetListObj(objPtr, 0, NULL); diff --git a/generic/tclZlib.c b/generic/tclZlib.c index e14b496..ea6a1f2 100644 --- a/generic/tclZlib.c +++ b/generic/tclZlib.c @@ -3945,7 +3945,7 @@ TclZlibInit( cfg[0].key = "zlibVersion"; cfg[0].value = zlibVersion(); cfg[1].key = NULL; - Tcl_RegisterConfig(interp, "zlib", cfg, "iso8859-1"); + Tcl_RegisterConfig(interp, "zlib", cfg, "utf-8"); /* * Allow command type introspection to do something sensible with streams. |