diff options
author | dgp <dgp@users.sourceforge.net> | 2006-02-08 21:41:27 (GMT) |
---|---|---|
committer | dgp <dgp@users.sourceforge.net> | 2006-02-08 21:41:27 (GMT) |
commit | c02df4db03405fcafcc2112fb34211157748e459 (patch) | |
tree | feaabb969de44d4d6c82c59dab708581780f8666 /generic | |
parent | 828b7e282d4e1591be7f44c77c513ed0bf170b06 (diff) | |
download | tcl-c02df4db03405fcafcc2112fb34211157748e459.zip tcl-c02df4db03405fcafcc2112fb34211157748e459.tar.gz tcl-c02df4db03405fcafcc2112fb34211157748e459.tar.bz2 |
TIP#258 IMPLEMENTATION
* doc/Encoding.3: New subcommand [encoding dirs].
* doc/encoding.n: New routine Tcl_GetEncodingNameFromEnvironment.
* generic/tcl.decls: Made public:
* generic/tclBasic.c: TclGetEncodingFromObj
* generic/tclCmdAH.c: -> Tcl_GetEncodingFromObj
* generic/tclEncoding.c:TclGetEncodingSearchPath
* generic/tclInt.decls: -> Tcl_GetEncodingSearchPath
* generic/tclInt.h: TclSetEncodingSearchPath
* generic/tclTest.c: -> Tcl_SetEncodingSearchPath
* library/init.tcl: Removed commands:
* tests/cmdAH.test: [tcl::unsupported::EncodingDirs]
* tests/encoding.test: [testencoding path] (Tcltest)
* unix/tclUnixInit.c: [Patch 1413934].
* win/tclWinInit.c:
* generic/tclDecls.h: make genstubs
* generic/tclIntDecls.h:
* generic/tclStubInit.c:
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tcl.decls | 18 | ||||
-rw-r--r-- | generic/tclBasic.c | 9 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 21 | ||||
-rw-r--r-- | generic/tclDecls.h | 46 | ||||
-rw-r--r-- | generic/tclEncoding.c | 26 | ||||
-rw-r--r-- | generic/tclInt.decls | 21 | ||||
-rw-r--r-- | generic/tclInt.h | 7 | ||||
-rw-r--r-- | generic/tclIntDecls.h | 43 | ||||
-rw-r--r-- | generic/tclStubInit.c | 12 | ||||
-rw-r--r-- | generic/tclTest.c | 15 |
10 files changed, 122 insertions, 96 deletions
diff --git a/generic/tcl.decls b/generic/tcl.decls index 6fe33f1..e19db3f 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -11,7 +11,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.119 2006/02/01 18:27:43 dgp Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.120 2006/02/08 21:41:27 dgp Exp $ library tcl @@ -2049,6 +2049,22 @@ declare 568 generic { Tcl_Obj *handlerPtr) } +# TIP#258 Enhanced Interface for Encodings + +declare 569 generic { + int Tcl_GetEncodingFromObj(Tcl_Interp* interp, Tcl_Obj* objPtr, + Tcl_Encoding* encodingPtr) +} +declare 570 generic { + Tcl_Obj* Tcl_GetEncodingSearchPath(void) +} +declare 571 generic { + int Tcl_SetEncodingSearchPath(Tcl_Obj* searchPath) +} +declare 572 generic { + CONST char *Tcl_GetEncodingNameFromEnvironment(Tcl_DString* bufPtr) +} + ############################################################################## # Define the platform specific public Tcl interface. These functions are diff --git a/generic/tclBasic.c b/generic/tclBasic.c index 42f07a6..6496fb3 100644 --- a/generic/tclBasic.c +++ b/generic/tclBasic.c @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclBasic.c,v 1.189 2006/02/01 19:26:01 dgp Exp $ + * RCS: @(#) $Id: tclBasic.c,v 1.190 2006/02/08 21:41:27 dgp Exp $ */ #include "tclInt.h" @@ -493,13 +493,6 @@ Tcl_CreateInterp(void) TclDefaultBgErrorHandlerObjCmd, (ClientData) NULL, NULL); /* - * Register the unsupported encoding search path command. - */ - - Tcl_CreateObjCommand(interp, "::tcl::unsupported::EncodingDirs", - TclEncodingDirsObjCmd, NULL, NULL); - - /* * Register the builtin math functions. */ diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 78ce150..ce50da4 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdAH.c,v 1.71 2005/12/08 20:20:34 hobbs Exp $ + * RCS: @(#) $Id: tclCmdAH.c,v 1.72 2006/02/08 21:41:27 dgp Exp $ */ #include "tclInt.h" @@ -24,6 +24,9 @@ static int CheckAccess(Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode); +static int EncodingDirsObjCmd(ClientData dummy, + Tcl_Interp *interp, int objc, + Tcl_Obj *CONST objv[]); static int GetStatBuf(Tcl_Interp *interp, Tcl_Obj *pathPtr, Tcl_FSStatProc *statProc, Tcl_StatBuf *statPtr); static char * GetTypeFromMode(int mode); @@ -427,11 +430,11 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv) int index; static CONST char *optionStrings[] = { - "convertfrom", "convertto", "names", "system", + "convertfrom", "convertto", "dirs", "names", "system", NULL }; enum options { - ENC_CONVERTFROM, ENC_CONVERTTO, ENC_NAMES, ENC_SYSTEM + ENC_CONVERTFROM, ENC_CONVERTTO, ENC_DIRS, ENC_NAMES, ENC_SYSTEM }; if (objc < 2) { @@ -456,7 +459,7 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv) encoding = Tcl_GetEncoding(interp, NULL); data = objv[2]; } else if (objc == 4) { - if (TclGetEncodingFromObj(interp, objv[2], &encoding) != TCL_OK) { + if (Tcl_GetEncodingFromObj(interp, objv[2], &encoding) != TCL_OK) { return TCL_ERROR; } data = objv[3]; @@ -497,6 +500,8 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv) Tcl_FreeEncoding(encoding); break; } + case ENC_DIRS: + return EncodingDirsObjCmd(dummy, interp, objc-1, objv+1); case ENC_NAMES: if (objc > 2) { Tcl_WrongNumArgs(interp, 2, objv, NULL); @@ -523,7 +528,7 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv) /* *---------------------------------------------------------------------- * - * TclEncodingDirsObjCmd -- + * EncodingDirsObjCmd -- * * This command manipulates the encoding search path. * @@ -537,7 +542,7 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv) */ int -TclEncodingDirsObjCmd(dummy, interp, objc, objv) +EncodingDirsObjCmd(dummy, interp, objc, objv) ClientData dummy; /* Not used. */ Tcl_Interp *interp; /* Current interpreter. */ int objc; /* Number of arguments. */ @@ -548,10 +553,10 @@ TclEncodingDirsObjCmd(dummy, interp, objc, objv) return TCL_ERROR; } if (objc == 1) { - Tcl_SetObjResult(interp, TclGetEncodingSearchPath()); + Tcl_SetObjResult(interp, Tcl_GetEncodingSearchPath()); return TCL_OK; } - if (TclSetEncodingSearchPath(objv[1]) == TCL_ERROR) { + if (Tcl_SetEncodingSearchPath(objv[1]) == TCL_ERROR) { Tcl_AppendResult(interp, "expected directory list but got \"", Tcl_GetString(objv[1]), "\"", NULL); return TCL_ERROR; diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 236a28d..00f009f 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclDecls.h,v 1.121 2006/02/01 18:27:44 dgp Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.122 2006/02/08 21:41:27 dgp Exp $ */ #ifndef _TCLDECLS @@ -3547,6 +3547,30 @@ EXTERN int Tcl_SetNamespaceUnknownHandler _ANSI_ARGS_(( Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr)); #endif +#ifndef Tcl_GetEncodingFromObj_TCL_DECLARED +#define Tcl_GetEncodingFromObj_TCL_DECLARED +/* 569 */ +EXTERN int Tcl_GetEncodingFromObj _ANSI_ARGS_(( + Tcl_Interp* interp, Tcl_Obj* objPtr, + Tcl_Encoding* encodingPtr)); +#endif +#ifndef Tcl_GetEncodingSearchPath_TCL_DECLARED +#define Tcl_GetEncodingSearchPath_TCL_DECLARED +/* 570 */ +EXTERN Tcl_Obj* Tcl_GetEncodingSearchPath _ANSI_ARGS_((void)); +#endif +#ifndef Tcl_SetEncodingSearchPath_TCL_DECLARED +#define Tcl_SetEncodingSearchPath_TCL_DECLARED +/* 571 */ +EXTERN int Tcl_SetEncodingSearchPath _ANSI_ARGS_(( + Tcl_Obj* searchPath)); +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +#define Tcl_GetEncodingNameFromEnvironment_TCL_DECLARED +/* 572 */ +EXTERN CONST char * Tcl_GetEncodingNameFromEnvironment _ANSI_ARGS_(( + Tcl_DString* bufPtr)); +#endif typedef struct TclStubHooks { struct TclPlatStubs *tclPlatStubs; @@ -4157,6 +4181,10 @@ typedef struct TclStubs { int (*tcl_InitBignumFromDouble) _ANSI_ARGS_((Tcl_Interp* interp, double initval, mp_int * toInit)); /* 566 */ Tcl_Obj * (*tcl_GetNamespaceUnknownHandler) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr)); /* 567 */ int (*tcl_SetNamespaceUnknownHandler) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Namespace * nsPtr, Tcl_Obj * handlerPtr)); /* 568 */ + int (*tcl_GetEncodingFromObj) _ANSI_ARGS_((Tcl_Interp* interp, Tcl_Obj* objPtr, Tcl_Encoding* encodingPtr)); /* 569 */ + Tcl_Obj* (*tcl_GetEncodingSearchPath) _ANSI_ARGS_((void)); /* 570 */ + int (*tcl_SetEncodingSearchPath) _ANSI_ARGS_((Tcl_Obj* searchPath)); /* 571 */ + CONST char * (*tcl_GetEncodingNameFromEnvironment) _ANSI_ARGS_((Tcl_DString* bufPtr)); /* 572 */ } TclStubs; #ifdef __cplusplus @@ -6473,6 +6501,22 @@ extern TclStubs *tclStubsPtr; #define Tcl_SetNamespaceUnknownHandler \ (tclStubsPtr->tcl_SetNamespaceUnknownHandler) /* 568 */ #endif +#ifndef Tcl_GetEncodingFromObj +#define Tcl_GetEncodingFromObj \ + (tclStubsPtr->tcl_GetEncodingFromObj) /* 569 */ +#endif +#ifndef Tcl_GetEncodingSearchPath +#define Tcl_GetEncodingSearchPath \ + (tclStubsPtr->tcl_GetEncodingSearchPath) /* 570 */ +#endif +#ifndef Tcl_SetEncodingSearchPath +#define Tcl_SetEncodingSearchPath \ + (tclStubsPtr->tcl_SetEncodingSearchPath) /* 571 */ +#endif +#ifndef Tcl_GetEncodingNameFromEnvironment +#define Tcl_GetEncodingNameFromEnvironment \ + (tclStubsPtr->tcl_GetEncodingNameFromEnvironment) /* 572 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c index 2d942c9..1e2e8fe 100644 --- a/generic/tclEncoding.c +++ b/generic/tclEncoding.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclEncoding.c,v 1.38 2005/10/18 15:01:56 dkf Exp $ + * RCS: @(#) $Id: tclEncoding.c,v 1.39 2006/02/08 21:41:27 dgp Exp $ */ #include "tclInt.h" @@ -274,7 +274,7 @@ static Tcl_ObjType EncodingType = { /* *---------------------------------------------------------------------- * - * TclGetEncodingFromObj -- + * Tcl_GetEncodingFromObj -- * * Writes to (*encodingPtr) the Tcl_Encoding value of (*objPtr), if * possible, and returns TCL_OK. If no such encoding exists, TCL_ERROR is @@ -291,7 +291,7 @@ static Tcl_ObjType EncodingType = { */ int -TclGetEncodingFromObj( +Tcl_GetEncodingFromObj( Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr) @@ -350,7 +350,7 @@ DupEncodingIntRep( /* *---------------------------------------------------------------------- * - * TclGetEncodingSearchPath -- + * Tcl_GetEncodingSearchPath -- * * Keeps the per-thread copy of the encoding search path current with * changes to the global copy. @@ -362,7 +362,7 @@ DupEncodingIntRep( */ Tcl_Obj * -TclGetEncodingSearchPath(void) +Tcl_GetEncodingSearchPath(void) { return TclGetProcessGlobalValue(&encodingSearchPath); } @@ -370,7 +370,7 @@ TclGetEncodingSearchPath(void) /* *---------------------------------------------------------------------- * - * TclSetEncodingSearchPath -- + * Tcl_SetEncodingSearchPath -- * * Keeps the per-thread copy of the encoding search path current with * changes to the global copy. @@ -379,7 +379,7 @@ TclGetEncodingSearchPath(void) */ int -TclSetEncodingSearchPath( +Tcl_SetEncodingSearchPath( Tcl_Obj *searchPath) { int dummy; @@ -470,7 +470,7 @@ FillEncodingFileMap(void) int i, numDirs = 0; Tcl_Obj *map, *searchPath; - searchPath = TclGetEncodingSearchPath(); + searchPath = Tcl_GetEncodingSearchPath(); Tcl_IncrRefCount(searchPath); Tcl_ListObjLength(NULL, searchPath, &numDirs); map = Tcl_NewDictObj(); @@ -643,7 +643,7 @@ CONST char * Tcl_GetDefaultEncodingDir(void) { int numDirs; - Tcl_Obj *first, *searchPath = TclGetEncodingSearchPath(); + Tcl_Obj *first, *searchPath = Tcl_GetEncodingSearchPath(); Tcl_ListObjLength(NULL, searchPath, &numDirs); if (numDirs == 0) { @@ -675,12 +675,12 @@ void Tcl_SetDefaultEncodingDir( CONST char *path) { - Tcl_Obj *searchPath = TclGetEncodingSearchPath(); + Tcl_Obj *searchPath = Tcl_GetEncodingSearchPath(); Tcl_Obj *directory = Tcl_NewStringObj(path, -1); searchPath = Tcl_DuplicateObj(searchPath); Tcl_ListObjReplace(NULL, searchPath, 0, 0, 1, &directory); - TclSetEncodingSearchPath(searchPath); + Tcl_SetEncodingSearchPath(searchPath); } /* @@ -1412,7 +1412,7 @@ OpenEncodingFileChannel( { Tcl_Obj *nameObj = Tcl_NewStringObj(name, -1); Tcl_Obj *fileNameObj = Tcl_DuplicateObj(nameObj); - Tcl_Obj *searchPath = Tcl_DuplicateObj(TclGetEncodingSearchPath()); + Tcl_Obj *searchPath = Tcl_DuplicateObj(Tcl_GetEncodingSearchPath()); Tcl_Obj *map = TclGetProcessGlobalValue(&encodingFileMap); Tcl_Obj **dir, *path, *directory = NULL; Tcl_Channel chan = NULL; @@ -3211,7 +3211,7 @@ unilen( * * This is the fallback routine that sets the default value of the * encoding search path if the application has not set one via a call to - * TclSetEncodingSearchPath() by the first time the search path is needed + * Tcl_SetEncodingSearchPath() by the first time the search path is needed * to load encoding data. * * The default encoding search path is produced by taking each directory diff --git a/generic/tclInt.decls b/generic/tclInt.decls index 02eeaf5..aef1260 100644 --- a/generic/tclInt.decls +++ b/generic/tclInt.decls @@ -12,7 +12,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tclInt.decls,v 1.94 2005/12/13 22:43:17 kennykb Exp $ +# RCS: @(#) $Id: tclInt.decls,v 1.95 2006/02/08 21:41:27 dgp Exp $ library tcl @@ -846,15 +846,16 @@ declare 208 generic { Tcl_Channel TclpOpenFileChannel (Tcl_Interp *interp, Tcl_Obj *pathPtr, int mode, int permissions) } -declare 209 generic { - Tcl_Obj * TclGetEncodingSearchPath(void) -} -declare 210 generic { - int TclSetEncodingSearchPath(Tcl_Obj *searchPath) -} -declare 211 generic { - CONST char * TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) -} +# Made public by TIP 258 +#declare 209 generic { +# Tcl_Obj * TclGetEncodingSearchPath(void) +#} +#declare 210 generic { +# int TclSetEncodingSearchPath(Tcl_Obj *searchPath) +#} +#declare 211 generic { +# CONST char * TclpGetEncodingNameFromEnvironment(Tcl_DString *bufPtr) +#} declare 212 generic { void TclpFindExecutable(CONST char *argv0) } diff --git a/generic/tclInt.h b/generic/tclInt.h index 64dbfec..69a44eb 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.267 2006/02/01 19:26:02 dgp Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.268 2006/02/08 21:41:27 dgp Exp $ */ #ifndef _TCLINT @@ -2066,8 +2066,6 @@ MODULE_SCOPE int TclFormatToErrorInfo(Tcl_Interp *interp, MODULE_SCOPE int TclFSFileAttrIndex(Tcl_Obj *pathPtr, CONST char *attributeName, int *indexPtr); MODULE_SCOPE Tcl_Obj * TclGetBgErrorHandler(Tcl_Interp *interp); -MODULE_SCOPE int TclGetEncodingFromObj(Tcl_Interp *interp, - Tcl_Obj *objPtr, Tcl_Encoding *encodingPtr); MODULE_SCOPE int TclGetNamespaceFromObj(Tcl_Interp *interp, Tcl_Obj *objPtr, Tcl_Namespace **nsPtrPtr); MODULE_SCOPE int TclGetNumberFromObj(Tcl_Interp *interp, @@ -2295,9 +2293,6 @@ MODULE_SCOPE int Tcl_DictObjCmd(ClientData clientData, MODULE_SCOPE int Tcl_EncodingObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); -MODULE_SCOPE int TclEncodingDirsObjCmd( - ClientData clientData, Tcl_Interp *interp, - int objc, Tcl_Obj *CONST objv[]); MODULE_SCOPE int Tcl_EofObjCmd(ClientData clientData, Tcl_Interp *interp, int objc, Tcl_Obj *CONST objv[]); diff --git a/generic/tclIntDecls.h b/generic/tclIntDecls.h index 5df62d5..2eeaa4d 100644 --- a/generic/tclIntDecls.h +++ b/generic/tclIntDecls.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclIntDecls.h,v 1.85 2005/12/13 22:43:18 kennykb Exp $ + * RCS: @(#) $Id: tclIntDecls.h,v 1.86 2006/02/08 21:41:27 dgp Exp $ */ #ifndef _TCLINTDECLS @@ -988,23 +988,9 @@ EXTERN int TclpObjAccess _ANSI_ARGS_((Tcl_Obj * pathPtr, EXTERN Tcl_Channel TclpOpenFileChannel _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions)); #endif -#ifndef TclGetEncodingSearchPath_TCL_DECLARED -#define TclGetEncodingSearchPath_TCL_DECLARED -/* 209 */ -EXTERN Tcl_Obj * TclGetEncodingSearchPath _ANSI_ARGS_((void)); -#endif -#ifndef TclSetEncodingSearchPath_TCL_DECLARED -#define TclSetEncodingSearchPath_TCL_DECLARED -/* 210 */ -EXTERN int TclSetEncodingSearchPath _ANSI_ARGS_(( - Tcl_Obj * searchPath)); -#endif -#ifndef TclpGetEncodingNameFromEnvironment_TCL_DECLARED -#define TclpGetEncodingNameFromEnvironment_TCL_DECLARED -/* 211 */ -EXTERN CONST char * TclpGetEncodingNameFromEnvironment _ANSI_ARGS_(( - Tcl_DString * bufPtr)); -#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ #ifndef TclpFindExecutable_TCL_DECLARED #define TclpFindExecutable_TCL_DECLARED /* 212 */ @@ -1291,9 +1277,9 @@ typedef struct TclIntStubs { int (*tclpObjStat) _ANSI_ARGS_((Tcl_Obj * pathPtr, Tcl_StatBuf * buf)); /* 206 */ int (*tclpObjAccess) _ANSI_ARGS_((Tcl_Obj * pathPtr, int mode)); /* 207 */ Tcl_Channel (*tclpOpenFileChannel) _ANSI_ARGS_((Tcl_Interp * interp, Tcl_Obj * pathPtr, int mode, int permissions)); /* 208 */ - Tcl_Obj * (*tclGetEncodingSearchPath) _ANSI_ARGS_((void)); /* 209 */ - int (*tclSetEncodingSearchPath) _ANSI_ARGS_((Tcl_Obj * searchPath)); /* 210 */ - CONST char * (*tclpGetEncodingNameFromEnvironment) _ANSI_ARGS_((Tcl_DString * bufPtr)); /* 211 */ + void *reserved209; + void *reserved210; + void *reserved211; void (*tclpFindExecutable) _ANSI_ARGS_((CONST char * argv0)); /* 212 */ Tcl_Obj * (*tclGetObjNameOfExecutable) _ANSI_ARGS_((void)); /* 213 */ void (*tclSetObjNameOfExecutable) _ANSI_ARGS_((Tcl_Obj * name, Tcl_Encoding encoding)); /* 214 */ @@ -1971,18 +1957,9 @@ extern TclIntStubs *tclIntStubsPtr; #define TclpOpenFileChannel \ (tclIntStubsPtr->tclpOpenFileChannel) /* 208 */ #endif -#ifndef TclGetEncodingSearchPath -#define TclGetEncodingSearchPath \ - (tclIntStubsPtr->tclGetEncodingSearchPath) /* 209 */ -#endif -#ifndef TclSetEncodingSearchPath -#define TclSetEncodingSearchPath \ - (tclIntStubsPtr->tclSetEncodingSearchPath) /* 210 */ -#endif -#ifndef TclpGetEncodingNameFromEnvironment -#define TclpGetEncodingNameFromEnvironment \ - (tclIntStubsPtr->tclpGetEncodingNameFromEnvironment) /* 211 */ -#endif +/* Slot 209 is reserved */ +/* Slot 210 is reserved */ +/* Slot 211 is reserved */ #ifndef TclpFindExecutable #define TclpFindExecutable \ (tclIntStubsPtr->tclpFindExecutable) /* 212 */ diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 7ccef4b..45b947f 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.c @@ -8,7 +8,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclStubInit.c,v 1.128 2006/02/01 18:27:48 dgp Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.129 2006/02/08 21:41:27 dgp Exp $ */ #include "tclInt.h" @@ -300,9 +300,9 @@ TclIntStubs tclIntStubs = { TclpObjStat, /* 206 */ TclpObjAccess, /* 207 */ TclpOpenFileChannel, /* 208 */ - TclGetEncodingSearchPath, /* 209 */ - TclSetEncodingSearchPath, /* 210 */ - TclpGetEncodingNameFromEnvironment, /* 211 */ + NULL, /* 209 */ + NULL, /* 210 */ + NULL, /* 211 */ TclpFindExecutable, /* 212 */ TclGetObjNameOfExecutable, /* 213 */ TclSetObjNameOfExecutable, /* 214 */ @@ -1065,6 +1065,10 @@ TclStubs tclStubs = { Tcl_InitBignumFromDouble, /* 566 */ Tcl_GetNamespaceUnknownHandler, /* 567 */ Tcl_SetNamespaceUnknownHandler, /* 568 */ + Tcl_GetEncodingFromObj, /* 569 */ + Tcl_GetEncodingSearchPath, /* 570 */ + Tcl_SetEncodingSearchPath, /* 571 */ + Tcl_GetEncodingNameFromEnvironment, /* 572 */ }; /* !END!: Do not edit above this line. */ diff --git a/generic/tclTest.c b/generic/tclTest.c index db8d558..74d430a 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution of * this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.100 2005/12/15 04:08:33 das Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.101 2006/02/08 21:41:27 dgp Exp $ */ #define TCL_TEST @@ -1736,11 +1736,10 @@ TestencodingObjCmd(dummy, interp, objc, objv) char *string; TclEncoding *encodingPtr; static CONST char *optionStrings[] = { - "create", "delete", "path", - NULL + "create", "delete", NULL }; enum options { - ENC_CREATE, ENC_DELETE, ENC_PATH + ENC_CREATE, ENC_DELETE }; if (Tcl_GetIndexFromObj(interp, objv[1], optionStrings, "option", 0, @@ -1787,14 +1786,6 @@ TestencodingObjCmd(dummy, interp, objc, objv) Tcl_FreeEncoding(encoding); break; } - case ENC_PATH: { - if (objc == 2) { - Tcl_SetObjResult(interp, TclGetEncodingSearchPath()); - } else { - TclSetEncodingSearchPath(objv[2]); - } - break; - } } return TCL_OK; } |