summaryrefslogtreecommitdiffstats
path: root/generic/tclEncoding.c
diff options
context:
space:
mode:
authordgp <dgp@users.sourceforge.net>2006-03-24 21:11:45 (GMT)
committerdgp <dgp@users.sourceforge.net>2006-03-24 21:11:45 (GMT)
commit62c06ec94edf39e7579b127102f0282c1016e173 (patch)
tree6e2c8ab3cb8711466c3db37f914924e80bf28290 /generic/tclEncoding.c
parent13e59924a4d6be2bb75a9d895b37265da19d67c5 (diff)
downloadtcl-62c06ec94edf39e7579b127102f0282c1016e173.zip
tcl-62c06ec94edf39e7579b127102f0282c1016e173.tar.gz
tcl-62c06ec94edf39e7579b127102f0282c1016e173.tar.bz2
revert most recent tclEncoding.c commit. It is suspected to have
produced a huge slowdown in encoding.test on Windows.
Diffstat (limited to 'generic/tclEncoding.c')
-rw-r--r--generic/tclEncoding.c28
1 files changed, 6 insertions, 22 deletions
diff --git a/generic/tclEncoding.c b/generic/tclEncoding.c
index e8cd2e8..783e3d3 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.40 2006/03/13 20:57:39 dgp Exp $
+ * RCS: @(#) $Id: tclEncoding.c,v 1.41 2006/03/24 21:11:45 dgp Exp $
*/
#include "tclInt.h"
@@ -1564,9 +1564,6 @@ LoadEncodingFile(
}
if ((encoding == NULL) && (interp != NULL)) {
Tcl_AppendResult(interp, "invalid encoding file \"", name, "\"", NULL);
- if (ch == 'E') {
- Tcl_AppendResult(interp, " or missing sub-encoding", NULL);
- }
}
Tcl_Close(NULL, chan);
@@ -1882,7 +1879,7 @@ LoadEscapeEncoding(
CONST char *name, /* Name for new encoding. */
Tcl_Channel chan) /* File containing new encoding. */
{
- int i, missingSubEncoding = 0;
+ int i;
unsigned int size;
Tcl_DString escapeData;
char init[16], final[16];
@@ -1927,26 +1924,18 @@ LoadEscapeEncoding(
est.name[sizeof(est.name) - 1] = '\0';
/*
- * Load the subencodings first so we're never stuck
- * trying to use a half-loaded system encoding to
- * open/read a *.enc file.
+ * To avoid infinite recursion in [encoding system iso2022-*]
*/
- est.encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, est.name);
- if ((est.encodingPtr == NULL)
- || (est.encodingPtr->toUtfProc != TableToUtfProc)) {
- missingSubEncoding = 1;
- }
+ Tcl_GetEncoding(NULL, est.name);
+
+ est.encodingPtr = NULL;
Tcl_DStringAppend(&escapeData, (char *) &est, sizeof(est));
}
}
ckfree((char *) argv);
Tcl_DStringFree(&lineString);
}
- if (missingSubEncoding) {
- Tcl_DStringFree(&escapeData);
- return NULL;
- }
size = sizeof(EscapeEncodingData) - sizeof(EscapeSubTable)
+ Tcl_DStringLength(&escapeData);
@@ -3173,11 +3162,6 @@ GetTableEncoding(
encodingPtr = subTablePtr->encodingPtr;
if (encodingPtr == NULL) {
- /*
- * Now that escape encodings load their sub-encodings first, and
- * fail to load if any sub-encodings are missing, this branch should
- * never happen.
- */
encodingPtr = (Encoding *) Tcl_GetEncoding(NULL, subTablePtr->name);
if ((encodingPtr == NULL)
|| (encodingPtr->toUtfProc != TableToUtfProc)) {