summaryrefslogtreecommitdiffstats
path: root/generic/tclCmdAH.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2005-04-19 16:32:51 (GMT)
committerdgp <dgp@users.sourceforge.net>2005-04-19 16:32:51 (GMT)
commit7d6158ddbd0deb5c5320cfa94ce50e58bdf6ecfc (patch)
tree0b4e1a36e2352961dd37023905e31057474481de /generic/tclCmdAH.c
parent8083af6181543c3852c249319b540c74186e6967 (diff)
downloadtcl-7d6158ddbd0deb5c5320cfa94ce50e58bdf6ecfc.zip
tcl-7d6158ddbd0deb5c5320cfa94ce50e58bdf6ecfc.tar.gz
tcl-7d6158ddbd0deb5c5320cfa94ce50e58bdf6ecfc.tar.bz2
* generic/tclBasic.c: Added unsupported command
* generic/tclCmdAH.c: [::tcl::unsupported::EncodingDirs] to permit * generic/tclInt.h: query/set of the encoding search path at * generic/tclInterp.c: the script level. Updated init.tcl to make * library/init.tcl: use of the new command. Also updated several coding practices in init.tcl ("eq" for [string equal], etc.)
Diffstat (limited to 'generic/tclCmdAH.c')
-rw-r--r--generic/tclCmdAH.c41
1 files changed, 40 insertions, 1 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c
index 1ef0dcf..eb57690 100644
--- a/generic/tclCmdAH.c
+++ b/generic/tclCmdAH.c
@@ -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: tclCmdAH.c,v 1.59 2005/04/08 20:04:03 dgp Exp $
+ * RCS: @(#) $Id: tclCmdAH.c,v 1.60 2005/04/19 16:32:55 dgp Exp $
*/
#include "tclInt.h"
@@ -530,6 +530,45 @@ Tcl_EncodingObjCmd(dummy, interp, objc, objv)
/*
*----------------------------------------------------------------------
*
+ * TclEncodingDirsObjCmd --
+ *
+ * This command manipulates the encoding search path.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * Can set the encoding search path.
+ *
+ *----------------------------------------------------------------------
+ */
+
+int
+TclEncodingDirsObjCmd(dummy, interp, objc, objv)
+ ClientData dummy; /* Not used. */
+ Tcl_Interp *interp; /* Current interpreter. */
+ int objc; /* Number of arguments. */
+ Tcl_Obj *CONST objv[]; /* Argument objects. */
+{
+ if (objc > 2) {
+ Tcl_WrongNumArgs(interp, 1, objv, "?dirList?");
+ }
+ if (objc == 1) {
+ Tcl_SetObjResult(interp, TclGetEncodingSearchPath());
+ return TCL_OK;
+ }
+ if (TclSetEncodingSearchPath(objv[1]) == TCL_ERROR) {
+ Tcl_AppendResult(interp, "expected directory list but got \"",
+ Tcl_GetString(objv[1]), "\"", NULL);
+ return TCL_ERROR;
+ }
+ Tcl_SetObjResult(interp, objv[1]);
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
* Tcl_ErrorObjCmd --
*
* This procedure is invoked to process the "error" Tcl command.