summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-26 17:08:06 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2019-01-26 17:08:06 (GMT)
commita6393381ec5d16f9f82c4b8ee992bedaa7c1e4a9 (patch)
treefe6b18722418a1781841f55205a83cc15c243c6b
parentd53b2ae83f6ba7aa37755dda0d38ff034c0c0ebd (diff)
parentfa64afb29a232d853b04e8e7bb5ad53c3d02f019 (diff)
downloadtcl-a6393381ec5d16f9f82c4b8ee992bedaa7c1e4a9.zip
tcl-a6393381ec5d16f9f82c4b8ee992bedaa7c1e4a9.tar.gz
tcl-a6393381ec5d16f9f82c4b8ee992bedaa7c1e4a9.tar.bz2
Merge 8.6. Also reduce tclCharTypeTable[] to 256 entries, as this table is always addressed with unsigned chars now.
Eliminate some useless end-of-line spacing that slipped in.
-rw-r--r--compat/strtol.c2
-rw-r--r--compat/strtoul.c2
-rw-r--r--generic/tcl.h2
-rw-r--r--generic/tclCmdMZ.c2
-rw-r--r--generic/tclInt.h4
-rw-r--r--generic/tclListObj.c2
-rw-r--r--generic/tclNamesp.c2
-rw-r--r--generic/tclOOCall.c2
-rw-r--r--generic/tclOODefineCmds.c4
-rw-r--r--generic/tclObj.c6
-rw-r--r--generic/tclParse.c47
-rw-r--r--generic/tclParse.h2
-rw-r--r--library/http/cookiejar.tcl2
13 files changed, 19 insertions, 60 deletions
diff --git a/compat/strtol.c b/compat/strtol.c
index 811006a..b7f6919 100644
--- a/compat/strtol.c
+++ b/compat/strtol.c
@@ -53,7 +53,7 @@ strtol(
*/
p = string;
- while (isspace(UCHAR(*p))) {
+ while (TclIsSpaceProc(*p)) {
p += 1;
}
diff --git a/compat/strtoul.c b/compat/strtoul.c
index 15587f1..e37eb05 100644
--- a/compat/strtoul.c
+++ b/compat/strtoul.c
@@ -74,7 +74,7 @@ strtoul(
*/
p = string;
- while (isspace(UCHAR(*p))) {
+ while (TclIsSpaceProc(*p)) {
p += 1;
}
if (*p == '-') {
diff --git a/generic/tcl.h b/generic/tcl.h
index 1c55f7e..c287a84 100644
--- a/generic/tcl.h
+++ b/generic/tcl.h
@@ -760,7 +760,7 @@ typedef union Tcl_ObjIntRep { /* The internal representation: */
/* not used internally any more. */
Tcl_WideInt wideValue; /* - an integer value >= 64bits */
struct { /* - internal rep as two pointers. */
- void *ptr1;
+ void *ptr1;
void *ptr2;
} twoPtrValue;
struct { /* - internal rep as a pointer and a long, */
diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c
index 786e52c..6cb80f1 100644
--- a/generic/tclCmdMZ.c
+++ b/generic/tclCmdMZ.c
@@ -1951,7 +1951,7 @@ StringMapCmd(
* inconsistencies (see test string-10.20.1 for illustration why!)
*/
- if (!TclHasStringRep(objv[objc-2])
+ if (!TclHasStringRep(objv[objc-2])
&& Tcl_FetchIntRep(objv[objc-2], &tclDictType)){
int i, done;
Tcl_DictSearch search;
diff --git a/generic/tclInt.h b/generic/tclInt.h
index 2fba5bf..e66514d 100644
--- a/generic/tclInt.h
+++ b/generic/tclInt.h
@@ -3082,8 +3082,8 @@ MODULE_SCOPE void TclInitNotifier(void);
MODULE_SCOPE void TclInitObjSubsystem(void);
MODULE_SCOPE void TclInitSubsystems(void);
MODULE_SCOPE int TclInterpReady(Tcl_Interp *interp);
-MODULE_SCOPE int TclIsSpaceProc(char byte);
-MODULE_SCOPE int TclIsBareword(char byte);
+MODULE_SCOPE int TclIsSpaceProc(int byte);
+MODULE_SCOPE int TclIsBareword(int byte);
MODULE_SCOPE Tcl_Obj * TclJoinPath(int elements, Tcl_Obj * const objv[],
int forceRelative);
MODULE_SCOPE int TclJoinThread(Tcl_ThreadId id, int *result);
diff --git a/generic/tclListObj.c b/generic/tclListObj.c
index b7f73ed..2ea47ba 100644
--- a/generic/tclListObj.c
+++ b/generic/tclListObj.c
@@ -1691,7 +1691,7 @@ TclLsetFlat(
irPtr = Tcl_FetchIntRep(objPtr, &tclListType);
listRepPtr = irPtr->twoPtrValue.ptr1;
chainPtr = irPtr->twoPtrValue.ptr2;
-
+
if (result == TCL_OK) {
/*
diff --git a/generic/tclNamesp.c b/generic/tclNamesp.c
index 27aafc3..5205344 100644
--- a/generic/tclNamesp.c
+++ b/generic/tclNamesp.c
@@ -4711,7 +4711,7 @@ FreeNsNameInternalRep(
NsNameGetIntRep(objPtr, resNamePtr);
assert(resNamePtr != NULL);
-
+
/*
* Decrement the reference count of the namespace. If there are no more
* references, free it up.
diff --git a/generic/tclOOCall.c b/generic/tclOOCall.c
index 36fc3bd..974e598 100644
--- a/generic/tclOOCall.c
+++ b/generic/tclOOCall.c
@@ -1994,7 +1994,7 @@ AddSimpleClassDefineNamespaces(
} else {
AddDefinitionNamespaceToChain(classPtr, classPtr->objDefinitionNs,
definePtr, flags);
- }
+ }
switch (classPtr->superclasses.num) {
case 1:
diff --git a/generic/tclOODefineCmds.c b/generic/tclOODefineCmds.c
index e7c948a..65d6ea1 100644
--- a/generic/tclOODefineCmds.c
+++ b/generic/tclOODefineCmds.c
@@ -1605,7 +1605,7 @@ TclOODefineDefnNsObjCmd(
"may not modify the definition namespace of the root classes",
-1));
Tcl_SetErrorCode(interp, "TCL", "OO", "MONKEY_BUSINESS", NULL);
- return TCL_ERROR;
+ return TCL_ERROR;
}
/*
@@ -1971,7 +1971,7 @@ TclOODefineMethodObjCmd(
Tcl_WrongNumArgs(interp, 1, objv, "name ?option? args body");
return TCL_ERROR;
}
-
+
oPtr = (Object *) TclOOGetDefineCmdContext(interp);
if (oPtr == NULL) {
return TCL_ERROR;
diff --git a/generic/tclObj.c b/generic/tclObj.c
index 72c45c6..e1346cf 100644
--- a/generic/tclObj.c
+++ b/generic/tclObj.c
@@ -1730,15 +1730,15 @@ Tcl_GetStringFromObj(
* This function is called in several configurations to provide all
* the tools needed to set an object's string representation. The
* function is determined by the arguments.
- *
+ *
* (objPtr->bytes != NULL && bytes != NULL) || (numBytes < 0)
* Invalid call -- panic!
- *
+ *
* objPtr->bytes == NULL && bytes == NULL && numBytes >= 0
* Allocation only - allocate space for (numBytes+1) chars.
* store in objPtr->bytes and return. Also sets
* objPtr->length to 0 and objPtr->bytes[0] to NUL.
- *
+ *
* objPtr->bytes == NULL && bytes != NULL && numBytes >= 0
* Allocate and copy. bytes is assumed to point to chars to
* copy into the string rep. objPtr->length = numBytes. Allocate
diff --git a/generic/tclParse.c b/generic/tclParse.c
index 4b6c4be..ccb648c 100644
--- a/generic/tclParse.c
+++ b/generic/tclParse.c
@@ -19,12 +19,7 @@
/*
* The following table provides parsing information about each possible 8-bit
- * character. The table is designed to be referenced with either signed or
- * unsigned characters, so it has 384 entries. The first 128 entries
- * correspond to negative character values, the next 256 correspond to
- * positive character values. The last 128 entries are identical to the first
- * 128. The table is always indexed with a 128-byte offset (the 128th entry
- * corresponds to a character value of 0).
+ * character. The table is designed to be referenced with unsigned characters.
*
* The macro CHAR_TYPE is used to index into the table and return information
* about its character argument. The following return values are defined.
@@ -44,42 +39,6 @@
*/
const char tclCharTypeTable[] = {
- /*
- * Negative character values, from -128 to -1:
- */
-
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
- TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL, TYPE_NORMAL,
/*
* Positive character values, from 0-127:
@@ -592,7 +551,7 @@ Tcl_ParseCommand(
int
TclIsSpaceProc(
- char byte)
+ int byte)
{
return CHAR_TYPE(byte) & (TYPE_SPACE) || byte == '\n';
}
@@ -621,7 +580,7 @@ TclIsSpaceProc(
int
TclIsBareword(
- char byte)
+ int byte)
{
if (byte < '0' || byte > 'z') {
return 0;
diff --git a/generic/tclParse.h b/generic/tclParse.h
index 20c609c..5f75c9a 100644
--- a/generic/tclParse.h
+++ b/generic/tclParse.h
@@ -12,6 +12,6 @@
#define TYPE_CLOSE_BRACK 0x20
#define TYPE_BRACE 0x40
-#define CHAR_TYPE(c) (tclCharTypeTable+128)[(int)(c)]
+#define CHAR_TYPE(c) tclCharTypeTable[(unsigned char)(c)]
MODULE_SCOPE const char tclCharTypeTable[];
diff --git a/library/http/cookiejar.tcl b/library/http/cookiejar.tcl
index 309ca7a..2eae877 100644
--- a/library/http/cookiejar.tcl
+++ b/library/http/cookiejar.tcl
@@ -458,7 +458,7 @@ package provide cookiejar \
log info "constructed domain info with %d entries" $n
}
- # This forces the rebuild of the domain data, loading it from
+ # This forces the rebuild of the domain data, loading it from
method forceLoadDomainData {} {
db transaction {
db eval {