summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-26 10:20:03 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2013-03-26 10:20:03 (GMT)
commitd048128004c027a3ee8e8d4fab19039a3bb358e2 (patch)
tree9fb3a4c9979d3c32a95e6895e54e3e0c5f62ddfa /generic/tclEncoding.c
parenteecece2afea26aec8b61ab04a7887c203257e82a (diff)
downloadtcl-d048128004c027a3ee8e8d4fab19039a3bb358e2.zip
tcl-d048128004c027a3ee8e8d4fab19039a3bb358e2.tar.gz
tcl-d048128004c027a3ee8e8d4fab19039a3bb358e2.tar.bz2
Version having TCL_INIT_PANIC as only Tcl_InitSubsystems() flag
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c44
1 files changed, 1 insertions, 43 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index dfcca14..0ffc481 100644
--- a/generic/tclEncoding.c
+++ b/generic/tclEncoding.c
@@ -1446,58 +1446,16 @@ Tcl_Interp *
Tcl_InitSubsystems(int flags, ...)
{
va_list argList;
- int argc = 0;
- void **argv = NULL;
- const char *encodingpath = NULL;
va_start(argList, flags);
if (flags & TCL_INIT_PANIC) {
Tcl_SetPanicProc(va_arg(argList, Tcl_PanicProc *));
}
- if (flags & TCL_INIT_ENCODINGPATH) {
- encodingpath = va_arg(argList, const char *);
- }
- if (flags & TCL_INIT_CREATE) {
- argc = va_arg(argList, int);
- argv = va_arg(argList, void **);
- }
va_end(argList);
TclInitSubsystems();
- if(encodingpath) {
- Tcl_SetEncodingSearchPath(Tcl_NewStringObj(encodingpath, -1));
- }
TclpSetInitialEncodings();
- TclpFindExecutable(argv ? argv[0] : NULL);
- if (flags & TCL_INIT_CREATE) {
- Tcl_Interp *interp = Tcl_CreateInterp();
- if (--argc >= 0) {
- Tcl_Obj *argvPtr;
-
- Tcl_SetVar2Ex(interp, "argc", NULL, Tcl_NewIntObj(argc), TCL_GLOBAL_ONLY);
- argvPtr = Tcl_NewListObj(argc, NULL);
- if ((flags & TCL_INIT_CREATE) == TCL_INIT_CREATE_UTF8) {
- while (argc--) {
- Tcl_ListObjAppendElement(NULL, argvPtr,
- Tcl_NewStringObj(*++argv, -1));
- }
- } else if ((flags & TCL_INIT_CREATE) == TCL_INIT_CREATE_UNICODE) {
- while (argc--) {
- Tcl_ListObjAppendElement(NULL, argvPtr,
- Tcl_NewUnicodeObj(*++argv, -1));
- }
- } else {
- Tcl_DString ds;
-
- while (argc--) {
- Tcl_ExternalToUtfDString(NULL, *++argv, -1, &ds);
- Tcl_ListObjAppendElement(NULL, argvPtr, TclDStringToObj(&ds));
- }
- }
- Tcl_SetVar2Ex(interp, "argv", NULL, argvPtr, TCL_GLOBAL_ONLY);
- }
- return interp;
- }
+ TclpFindExecutable(NULL);
return (Tcl_Interp *) &dummyInterp;
}