diff options
-rw-r--r-- | doc/Utf.3 | 10 | ||||
-rw-r--r-- | generic/tclCmdAH.c | 1 | ||||
-rw-r--r-- | generic/tclInt.h | 8 | ||||
-rw-r--r-- | generic/tclParse.c | 3 | ||||
-rw-r--r-- | generic/tclTest.c | 5 | ||||
-rw-r--r-- | generic/tclUtf.c | 2 | ||||
-rw-r--r-- | unix/tclUnixInit.c | 2 | ||||
-rw-r--r-- | unix/tclUnixTime.c | 1 |
8 files changed, 11 insertions, 21 deletions
@@ -75,7 +75,7 @@ int .AS "const Tcl_UniChar" *uniPattern in/out .AP char *buf out Buffer in which the UTF-8 representation of the Tcl_UniChar is stored. At most -\fBTCL_UTF_MAX\fR bytes are stored in the buffer. +4 bytes are stored in the buffer. .AP int ch in The Unicode character to be converted or examined. .AP Tcl_UniChar *chPtr out @@ -113,7 +113,7 @@ If non-NULL, filled with the number of bytes in the backslash sequence, including the backslash character. .AP char *dst out Buffer in which the bytes represented by the backslash sequence are stored. -At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer. +At most 4 bytes are stored in the buffer. .AP int nocase in Specifies whether the match should be done case-sensitive (0) or case-insensitive (1). @@ -148,8 +148,8 @@ a byte in the range 0x80 - 0x9F, \fBTcl_UtfToUniChar\fR assumes the cp1252 encoding, stores the corresponding Tcl_UniChar in \fI*chPtr\fR and returns 1. If the input is otherwise not in proper UTF-8 format, \fBTcl_UtfToUniChar\fR will store the first -byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x0000 and -0x00ff and return 1. +byte of \fIsrc\fR in \fI*chPtr\fR as a Tcl_UniChar between 0x00A0 and +0x00FF and return 1. .PP \fBTcl_UniCharToUtfDString\fR converts the given Unicode string to UTF-8, storing the result in a previously initialized \fBTcl_DString\fR. @@ -253,7 +253,7 @@ the return pointer points to the first character in the source string. \fBTcl_UtfBackslash\fR is a utility procedure used by several of the Tcl commands. It parses a backslash sequence and stores the properly formed UTF-8 character represented by the backslash sequence in the output -buffer \fIdst\fR. At most \fBTCL_UTF_MAX\fR bytes are stored in the buffer. +buffer \fIdst\fR. At most 4 bytes are stored in the buffer. \fBTcl_UtfBackslash\fR modifies \fI*readPtr\fR to contain the number of bytes in the backslash sequence, including the backslash character. The return value is the number of bytes stored in the output buffer. diff --git a/generic/tclCmdAH.c b/generic/tclCmdAH.c index dff23a8..c7ec4f9 100644 --- a/generic/tclCmdAH.c +++ b/generic/tclCmdAH.c @@ -15,7 +15,6 @@ #ifdef _WIN32 # include "tclWinInt.h" #endif -#include <locale.h> /* * The state structure used by [foreach]. Note that the actual structure has diff --git a/generic/tclInt.h b/generic/tclInt.h index f299512..d75d3fa 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -78,12 +78,12 @@ #else #include <string.h> #endif -#if defined(STDC_HEADERS) || defined(__STDC__) || defined(__C99__FUNC__) \ - || defined(__cplusplus) || defined(_MSC_VER) || defined(__ICC) -#include <stddef.h> -#else +#if !defined(STDC_HEADERS) && !defined(__STDC__) && !defined(__C99__FUNC__) \ + && !defined(__cplusplus) && !defined(_MSC_VER) && !defined(__ICC) typedef int ptrdiff_t; #endif +#include <stddef.h> +#include <locale.h> /* * Ensure WORDS_BIGENDIAN is defined correctly: diff --git a/generic/tclParse.c b/generic/tclParse.c index 164905a..448ce5e 100644 --- a/generic/tclParse.c +++ b/generic/tclParse.c @@ -784,8 +784,7 @@ TclParseBackslash( * of bytes scanned should be written. */ char *dst) /* NULL, or points to buffer where the UTF-8 * encoding of the backslash sequence is to be - * written. At most TCL_UTF_MAX bytes will be - * written there. */ + * written. At most 4 bytes will be written there. */ { register const char *p = src+1; Tcl_UniChar unichar = 0; diff --git a/generic/tclTest.c b/generic/tclTest.c index 9ad8244..63a657c 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -29,11 +29,6 @@ #include "tclRegexp.h" /* - * Required for TestlocaleCmd - */ -#include <locale.h> - -/* * Required for the TestChannelCmd and TestChannelEventCmd */ #include "tclIO.h" diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 86d1913..1387ee7 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.c @@ -1044,7 +1044,7 @@ Tcl_UtfAtIndex( * * Results: * Stores the bytes represented by the backslash sequence in dst and - * returns the number of bytes written to dst. At most TCL_UTF_MAX bytes + * returns the number of bytes written to dst. At most 4 bytes * are written to dst; dst must have been large enough to accept those * bytes. If readPtr isn't NULL then it is filled in with a count of the * number of bytes in the backslash sequence. diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 004fbff..eec0fd9 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -9,8 +9,6 @@ */ #include "tclInt.h" -#include <stddef.h> -#include <locale.h> #ifdef HAVE_LANGINFO # include <langinfo.h> # ifdef __APPLE__ diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 1d8b351..51d486e 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -11,7 +11,6 @@ */ #include "tclInt.h" -#include <locale.h> #if defined(TCL_WIDE_CLICKS) && defined(MAC_OSX_TCL) #include <mach/mach_time.h> #endif |