diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-17 13:23:29 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2013-06-17 13:23:29 (GMT) |
commit | 70024494041b53923a32939fa834efcfd2f1f888 (patch) | |
tree | 8fc39e68df09b49e0f94ad8866e2202da1168dfa | |
parent | f6678bdedc2a7668eb984f7e375886da59a63888 (diff) | |
download | tcl-70024494041b53923a32939fa834efcfd2f1f888.zip tcl-70024494041b53923a32939fa834efcfd2f1f888.tar.gz tcl-70024494041b53923a32939fa834efcfd2f1f888.tar.bz2 |
Use more portable TclIsSpaceProc() in stead of isspace().
Make sure that "string is space \u180e" continues to return 1 for whatever unicode version.
-rw-r--r-- | generic/tclCmdAH.c | 7 | ||||
-rw-r--r-- | generic/tclDate.c | 2 | ||||
-rw-r--r-- | generic/tclUtf.c | 4 |
3 files changed, 7 insertions, 6 deletions
diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index 44f08a3..7f0df83 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -130,8 +130,7 @@ Tcl_CaseObjCmd( for (i = 0; i < caseObjc; i += 2) { int patObjc, j; const char **patObjv; - char *pat; - unsigned char *p; + char *pat, *p; if (i == (caseObjc - 1)) { Tcl_ResetResult(interp); @@ -145,8 +144,8 @@ Tcl_CaseObjCmd( */ pat = TclGetString(caseObjv[i]); - for (p = (unsigned char *) pat; *p != '\0'; p++) { - if (isspace(*p) || (*p == '\\')) { /* INTL: ISO space, UCHAR */ + for (p = pat; *p != '\0'; p++) { + if (TclIsSpaceProc(*p) || (*p == '\\')) { break; } } diff --git a/generic/tclDate.c b/generic/tclDate.c index 59da2ea..0bda22f 100644 --- a/generic/tclDate.c +++ b/generic/tclDate.c @@ -2690,7 +2690,7 @@ TclDatelex( location->first_column = yyInput - info->dateStart; for ( ; ; ) { - while (isspace(UCHAR(*yyInput))) { + while (TclIsSpaceProc(*yyInput)) { yyInput++; } diff --git a/generic/tclUtf.c b/generic/tclUtf.c index f3d1758..a122685 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -1554,7 +1554,9 @@ Tcl_UniCharIsSpace( */ if (((Tcl_UniChar) ch) < ((Tcl_UniChar) 0x80)) { - return isspace(UCHAR(ch)); /* INTL: ISO space */ + return TclIsSpaceProc(ch); + } else if ((Tcl_UniChar) ch == 0x180e) { + return 1; } else { return ((SPACE_BITS >> GetCategory(ch)) & 1); } |