diff options
-rw-r--r-- | generic/regc_locale.c | 6 | ||||
-rw-r--r-- | generic/regcustom.h | 8 | ||||
-rw-r--r-- | generic/tcl.decls | 37 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 10 | ||||
-rw-r--r-- | generic/tclCmdMZ.c | 20 | ||||
-rw-r--r-- | generic/tclDecls.h | 84 | ||||
-rw-r--r-- | generic/tclInt.h | 17 | ||||
-rw-r--r-- | generic/tclRegexp.c | 6 | ||||
-rw-r--r-- | generic/tclScan.c | 10 | ||||
-rw-r--r-- | generic/tclStubInit.c | 13 | ||||
-rw-r--r-- | generic/tclTest.c | 6 | ||||
-rw-r--r-- | generic/tclUtf.c | 46 | ||||
-rw-r--r-- | win/tclWinFCmd.c | 4 | ||||
-rw-r--r-- | win/tclWinFile.c | 10 |
14 files changed, 195 insertions, 82 deletions
diff --git a/generic/regc_locale.c b/generic/regc_locale.c index cd22a61..8b61301 100644 --- a/generic/regc_locale.c +++ b/generic/regc_locale.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: regc_locale.c,v 1.1.2.5 1998/12/10 00:49:44 stanton Exp $ + * RCS: @(#) $Id: regc_locale.c,v 1.1.2.6 1999/04/02 23:44:53 stanton Exp $ */ /* ASCII character-name table */ @@ -412,7 +412,7 @@ chr *endp; /* points just past end of name */ /* search table */ Tcl_DStringInit(&ds); - np = TclUniCharToUtfDString(startp, (int)len, &ds); + np = Tcl_UniCharToUtfDString(startp, (int)len, &ds); for (cn = cnames; cn->name != NULL; cn++) if (strlen(cn->name) == len && strncmp(cn->name, np, len) == 0) break; /* NOTE BREAK OUT */ @@ -571,7 +571,7 @@ int cases; /* case-independent? */ len = endp - startp; Tcl_DStringInit(&ds); - np = TclUniCharToUtfDString(startp, (int)len, &ds); + np = Tcl_UniCharToUtfDString(startp, (int)len, &ds); /* * Remap lower and upper to alpha if the match is case insensitive. diff --git a/generic/regcustom.h b/generic/regcustom.h index 9ba4a2a..b1d53a9 100644 --- a/generic/regcustom.h +++ b/generic/regcustom.h @@ -67,10 +67,10 @@ typedef int celt; /* type to hold chr, MCCE number, or NOCELT */ #define CHR_MAX 0xffff /* CHR_MAX-CHR_MIN+1 should fit in uchr */ /* functions operating on chr */ -#define iscalnum(x) TclUniCharIsAlnum(x) -#define iscalpha(x) TclUniCharIsAlpha(x) -#define iscdigit(x) TclUniCharIsDigit(x) -#define iscspace(x) TclUniCharIsSpace(x) +#define iscalnum(x) Tcl_UniCharIsAlnum(x) +#define iscalpha(x) Tcl_UniCharIsAlpha(x) +#define iscdigit(x) Tcl_UniCharIsDigit(x) +#define iscspace(x) Tcl_UniCharIsSpace(x) /* name the external functions */ #define compile TclReComp diff --git a/generic/tcl.decls b/generic/tcl.decls index a7a6eae..87f379d 100644 --- a/generic/tcl.decls +++ b/generic/tcl.decls @@ -10,7 +10,7 @@ # See the file "license.terms" for information on usage and redistribution # of this file, and for a DISCLAIMER OF ALL WARRANTIES. # -# RCS: @(#) $Id: tcl.decls,v 1.3.2.12 1999/04/01 21:58:17 stanton Exp $ +# RCS: @(#) $Id: tcl.decls,v 1.3.2.13 1999/04/02 23:44:53 stanton Exp $ library tcl @@ -1174,6 +1174,41 @@ declare 343 generic { declare 344 generic { void Tcl_ServiceModeHook(int mode) } +declare 345 generic { + int Tcl_UniCharIsAlnum(int ch) +} +declare 346 generic { + int Tcl_UniCharIsAlpha(int ch) +} +declare 347 generic { + int Tcl_UniCharIsDigit(int ch) +} +declare 348 generic { + int Tcl_UniCharIsLower(int ch) +} +declare 349 generic { + int Tcl_UniCharIsSpace(int ch) +} +declare 350 generic { + int Tcl_UniCharIsUpper(int ch) +} +declare 351 generic { + int Tcl_UniCharIsWordChar(int ch) +} +declare 352 generic { + int Tcl_UniCharLen(Tcl_UniChar *str) +} +declare 353 generic { + int Tcl_UniCharNcmp(const Tcl_UniChar *cs, const Tcl_UniChar *ct, size_t n) +} +declare 354 generic { + char * Tcl_UniCharToUtfDString(CONST Tcl_UniChar *string, int numChars, \ + Tcl_DString *dsPtr) +} +declare 355 generic { + Tcl_UniChar * Tcl_UtfToUniCharDString(CONST char *string, int length, \ + Tcl_DString *dsPtr) +} ############################################################################## diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index b75b2b1..d6a540f 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -14,7 +14,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdIL.c,v 1.1.2.10 1999/03/26 22:39:52 rjohnson Exp $ + * RCS: @(#) $Id: tclCmdIL.c,v 1.1.2.11 1999/04/02 23:44:54 stanton Exp $ */ #include "tclInt.h" @@ -2963,16 +2963,16 @@ DictionaryCompare(left, right) diff = uniLeft - uniRight; if (diff) { - if (TclUniCharIsUpper(uniLeft) && - TclUniCharIsLower(uniRight)) { + if (Tcl_UniCharIsUpper(uniLeft) && + Tcl_UniCharIsLower(uniRight)) { diff = Tcl_UniCharToLower(uniLeft) - uniRight; if (diff) { return diff; } else if (secondaryDiff == 0) { secondaryDiff = -1; } - } else if (TclUniCharIsUpper(uniRight) - && TclUniCharIsLower(uniLeft)) { + } else if (Tcl_UniCharIsUpper(uniRight) + && Tcl_UniCharIsLower(uniLeft)) { diff = uniLeft - Tcl_UniCharToLower(uniRight); if (diff) { return diff; diff --git a/generic/tclCmdMZ.c b/generic/tclCmdMZ.c index 47402c6..a29f408 100644 --- a/generic/tclCmdMZ.c +++ b/generic/tclCmdMZ.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclCmdMZ.c,v 1.1.2.9 1999/02/01 21:29:50 stanton Exp $ + * RCS: @(#) $Id: tclCmdMZ.c,v 1.1.2.10 1999/04/02 23:44:55 stanton Exp $ */ #include "tclInt.h" @@ -224,7 +224,7 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) Tcl_DStringInit(&valueBuffer); Tcl_DStringInit(&stringBuffer); - wStart = TclUtfToUniCharDString(string, stringLength, &stringBuffer); + wStart = Tcl_UtfToUniCharDString(string, stringLength, &stringBuffer); wLen = Tcl_DStringLength(&stringBuffer) / sizeof(Tcl_UniChar); match = TclRegExpExecUniChar(interp, regExpr, wStart, wLen, objc-2, eflags); @@ -269,7 +269,7 @@ Tcl_RegexpObjCmd(dummy, interp, objc, objv) sprintf(info, "%d %d", start, end - 1); value = Tcl_SetVar(interp, varName, info, 0); } else { - value = TclUniCharToUtfDString(wStart + start, end - start, + value = Tcl_UniCharToUtfDString(wStart + start, end - start, &valueBuffer); value = Tcl_SetVar(interp, varName, value, 0); Tcl_DStringSetLength(&valueBuffer, 0); @@ -390,7 +390,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv) */ Tcl_DStringInit(&stringBuffer); - wStart = TclUtfToUniCharDString(string, stringLength, &stringBuffer); + wStart = Tcl_UtfToUniCharDString(string, stringLength, &stringBuffer); wEnd = wStart + Tcl_DStringLength(&stringBuffer) / sizeof(Tcl_UniChar); numMatches = 0; @@ -421,7 +421,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv) */ TclRegExpRangeUniChar(regExpr, 0, &start, &end); - TclUniCharToUtfDString(w, start, &resultBuffer); + Tcl_UniCharToUtfDString(w, start, &resultBuffer); /* * Append the subSpec argument to the variable, making appropriate @@ -459,7 +459,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv) } TclRegExpRangeUniChar(regExpr, index, &subStart, &subEnd); if ((subStart >= 0) && (subEnd >= 0)) { - TclUniCharToUtfDString(w + subStart, subEnd - subStart, + Tcl_UniCharToUtfDString(w + subStart, subEnd - subStart, &resultBuffer); } if (*src == '\\') { @@ -476,7 +476,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv) * in order to prevent infinite loops. */ - TclUniCharToUtfDString(w, 1, &resultBuffer); + Tcl_UniCharToUtfDString(w, 1, &resultBuffer); w++; } w += end; @@ -491,7 +491,7 @@ Tcl_RegsubObjCmd(dummy, interp, objc, objv) */ if ((w < wEnd) || (numMatches == 0)) { - TclUniCharToUtfDString(w, wEnd - w, &resultBuffer); + Tcl_UniCharToUtfDString(w, wEnd - w, &resultBuffer); } if (Tcl_SetVar(interp, varname, Tcl_DStringValue(&resultBuffer), 0) == NULL) { @@ -1158,7 +1158,7 @@ Tcl_StringObjCmd(dummy, interp, objc, objv) end = string1+length1; for (cur = index; p < end; cur++) { p += Tcl_UtfToUniChar(p, &ch); - if (!TclUniCharIsWordChar(ch)) { + if (!Tcl_UniCharIsWordChar(ch)) { break; } } @@ -1195,7 +1195,7 @@ Tcl_StringObjCmd(dummy, interp, objc, objv) p = Tcl_UtfAtIndex(string1, index); for (cur = index; cur >= 0; cur--) { Tcl_UtfToUniChar(p, &ch); - if (!TclUniCharIsWordChar(ch)) { + if (!Tcl_UniCharIsWordChar(ch)) { break; } p = Tcl_UtfPrev(p, string1); diff --git a/generic/tclDecls.h b/generic/tclDecls.h index 40ec222..40d66e7 100644 --- a/generic/tclDecls.h +++ b/generic/tclDecls.h @@ -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: tclDecls.h,v 1.3.2.13 1999/04/01 21:52:55 redman Exp $ + * RCS: @(#) $Id: tclDecls.h,v 1.3.2.14 1999/04/02 23:44:55 stanton Exp $ */ #ifndef _TCLDECLS @@ -1052,6 +1052,33 @@ EXTERN void Tcl_SetDefaultEncodingDir _ANSI_ARGS_((char * path)); EXTERN void Tcl_AlertNotifier _ANSI_ARGS_((ClientData clientData)); /* 344 */ EXTERN void Tcl_ServiceModeHook _ANSI_ARGS_((int mode)); +/* 345 */ +EXTERN int Tcl_UniCharIsAlnum _ANSI_ARGS_((int ch)); +/* 346 */ +EXTERN int Tcl_UniCharIsAlpha _ANSI_ARGS_((int ch)); +/* 347 */ +EXTERN int Tcl_UniCharIsDigit _ANSI_ARGS_((int ch)); +/* 348 */ +EXTERN int Tcl_UniCharIsLower _ANSI_ARGS_((int ch)); +/* 349 */ +EXTERN int Tcl_UniCharIsSpace _ANSI_ARGS_((int ch)); +/* 350 */ +EXTERN int Tcl_UniCharIsUpper _ANSI_ARGS_((int ch)); +/* 351 */ +EXTERN int Tcl_UniCharIsWordChar _ANSI_ARGS_((int ch)); +/* 352 */ +EXTERN int Tcl_UniCharLen _ANSI_ARGS_((Tcl_UniChar * str)); +/* 353 */ +EXTERN int Tcl_UniCharNcmp _ANSI_ARGS_((const Tcl_UniChar * cs, + const Tcl_UniChar * ct, size_t n)); +/* 354 */ +EXTERN char * Tcl_UniCharToUtfDString _ANSI_ARGS_(( + CONST Tcl_UniChar * string, int numChars, + Tcl_DString * dsPtr)); +/* 355 */ +EXTERN Tcl_UniChar * Tcl_UtfToUniCharDString _ANSI_ARGS_(( + CONST char * string, int length, + Tcl_DString * dsPtr)); typedef struct TclStubHooks { struct TclPlatStubs *tclPlatStubs; @@ -1432,6 +1459,17 @@ typedef struct TclStubs { void (*tcl_SetDefaultEncodingDir) _ANSI_ARGS_((char * path)); /* 342 */ void (*tcl_AlertNotifier) _ANSI_ARGS_((ClientData clientData)); /* 343 */ void (*tcl_ServiceModeHook) _ANSI_ARGS_((int mode)); /* 344 */ + int (*tcl_UniCharIsAlnum) _ANSI_ARGS_((int ch)); /* 345 */ + int (*tcl_UniCharIsAlpha) _ANSI_ARGS_((int ch)); /* 346 */ + int (*tcl_UniCharIsDigit) _ANSI_ARGS_((int ch)); /* 347 */ + int (*tcl_UniCharIsLower) _ANSI_ARGS_((int ch)); /* 348 */ + int (*tcl_UniCharIsSpace) _ANSI_ARGS_((int ch)); /* 349 */ + int (*tcl_UniCharIsUpper) _ANSI_ARGS_((int ch)); /* 350 */ + int (*tcl_UniCharIsWordChar) _ANSI_ARGS_((int ch)); /* 351 */ + int (*tcl_UniCharLen) _ANSI_ARGS_((Tcl_UniChar * str)); /* 352 */ + int (*tcl_UniCharNcmp) _ANSI_ARGS_((const Tcl_UniChar * cs, const Tcl_UniChar * ct, size_t n)); /* 353 */ + char * (*tcl_UniCharToUtfDString) _ANSI_ARGS_((CONST Tcl_UniChar * string, int numChars, Tcl_DString * dsPtr)); /* 354 */ + Tcl_UniChar * (*tcl_UtfToUniCharDString) _ANSI_ARGS_((CONST char * string, int length, Tcl_DString * dsPtr)); /* 355 */ } TclStubs; extern TclStubs *tclStubsPtr; @@ -2810,6 +2848,50 @@ extern TclStubs *tclStubsPtr; #define Tcl_ServiceModeHook \ (tclStubsPtr->tcl_ServiceModeHook) /* 344 */ #endif +#ifndef Tcl_UniCharIsAlnum +#define Tcl_UniCharIsAlnum \ + (tclStubsPtr->tcl_UniCharIsAlnum) /* 345 */ +#endif +#ifndef Tcl_UniCharIsAlpha +#define Tcl_UniCharIsAlpha \ + (tclStubsPtr->tcl_UniCharIsAlpha) /* 346 */ +#endif +#ifndef Tcl_UniCharIsDigit +#define Tcl_UniCharIsDigit \ + (tclStubsPtr->tcl_UniCharIsDigit) /* 347 */ +#endif +#ifndef Tcl_UniCharIsLower +#define Tcl_UniCharIsLower \ + (tclStubsPtr->tcl_UniCharIsLower) /* 348 */ +#endif +#ifndef Tcl_UniCharIsSpace +#define Tcl_UniCharIsSpace \ + (tclStubsPtr->tcl_UniCharIsSpace) /* 349 */ +#endif +#ifndef Tcl_UniCharIsUpper +#define Tcl_UniCharIsUpper \ + (tclStubsPtr->tcl_UniCharIsUpper) /* 350 */ +#endif +#ifndef Tcl_UniCharIsWordChar +#define Tcl_UniCharIsWordChar \ + (tclStubsPtr->tcl_UniCharIsWordChar) /* 351 */ +#endif +#ifndef Tcl_UniCharLen +#define Tcl_UniCharLen \ + (tclStubsPtr->tcl_UniCharLen) /* 352 */ +#endif +#ifndef Tcl_UniCharNcmp +#define Tcl_UniCharNcmp \ + (tclStubsPtr->tcl_UniCharNcmp) /* 353 */ +#endif +#ifndef Tcl_UniCharToUtfDString +#define Tcl_UniCharToUtfDString \ + (tclStubsPtr->tcl_UniCharToUtfDString) /* 354 */ +#endif +#ifndef Tcl_UtfToUniCharDString +#define Tcl_UtfToUniCharDString \ + (tclStubsPtr->tcl_UtfToUniCharDString) /* 355 */ +#endif #endif /* defined(USE_TCL_STUBS) && !defined(USE_TCL_STUB_PROCS) */ diff --git a/generic/tclInt.h b/generic/tclInt.h index 75ede82..8294c65 100644 --- a/generic/tclInt.h +++ b/generic/tclInt.h @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclInt.h,v 1.1.2.17 1999/04/01 21:58:17 stanton Exp $ + * RCS: @(#) $Id: tclInt.h,v 1.1.2.18 1999/04/02 23:44:56 stanton Exp $ */ #ifndef _TCLINT @@ -2010,22 +2010,7 @@ EXTERN int TclTestChannelEventCmd _ANSI_ARGS_(( int argc, char **argv)); EXTERN void TclTransferResult _ANSI_ARGS_((Tcl_Interp *sourceInterp, int result, Tcl_Interp *targetInterp)); -EXTERN int TclUniCharIsAlnum _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsAlpha _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsDigit _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsLower _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsSpace _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsUpper _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharIsWordChar _ANSI_ARGS_((int ch)); -EXTERN int TclUniCharLen _ANSI_ARGS_((Tcl_UniChar *str)); -EXTERN int TclUniCharNcmp _ANSI_ARGS_((const Tcl_UniChar *cs, - const Tcl_UniChar *ct, size_t n)); EXTERN int TclUpdateReturnInfo _ANSI_ARGS_((Interp *iPtr)); -char * TclUniCharToUtfDString _ANSI_ARGS_(( - CONST Tcl_UniChar *string, int numChars, - Tcl_DString *dsPtr)); -Tcl_UniChar * TclUtfToUniCharDString _ANSI_ARGS_((CONST char *string, - int length, Tcl_DString *dsPtr)); /* *---------------------------------------------------------------- diff --git a/generic/tclRegexp.c b/generic/tclRegexp.c index c605591..e1647f3 100644 --- a/generic/tclRegexp.c +++ b/generic/tclRegexp.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclRegexp.c,v 1.1.2.6 1998/11/17 21:38:39 stanton Exp $ + * RCS: @(#) $Id: tclRegexp.c,v 1.1.2.7 1999/04/02 23:44:57 stanton Exp $ */ #include "tclInt.h" @@ -224,7 +224,7 @@ Tcl_RegExpExec(interp, re, string, start) regexpPtr->string = string; Tcl_DStringInit(&stringBuffer); - uniString = TclUtfToUniCharDString(string, -1, &stringBuffer); + uniString = Tcl_UtfToUniCharDString(string, -1, &stringBuffer); numChars = Tcl_DStringLength(&stringBuffer) / sizeof(Tcl_UniChar); /* @@ -757,7 +757,7 @@ CompileRegexp(interp, string, length, flags) */ Tcl_DStringInit(&stringBuf); - uniString = TclUtfToUniCharDString(string, length, &stringBuf); + uniString = Tcl_UtfToUniCharDString(string, length, &stringBuf); numChars = Tcl_DStringLength(&stringBuf) / sizeof(Tcl_UniChar); /* diff --git a/generic/tclScan.c b/generic/tclScan.c index 2ec6d4c..d7c2f12 100644 --- a/generic/tclScan.c +++ b/generic/tclScan.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: tclScan.c,v 1.1.2.3 1999/02/10 23:31:19 stanton Exp $ + * RCS: @(#) $Id: tclScan.c,v 1.1.2.4 1999/04/02 23:44:57 stanton Exp $ */ #include "tclInt.h" @@ -539,9 +539,9 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv) * If we see whitespace in the format, skip whitespace in the string. */ - if (TclUniCharIsSpace(ch)) { + if (Tcl_UniCharIsSpace(ch)) { offset = Tcl_UtfToUniChar(string, &sch); - while (TclUniCharIsSpace(sch)) { + while (Tcl_UniCharIsSpace(sch)) { if (*string == '\0') { goto done; } @@ -684,7 +684,7 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv) if (!(flags & SCAN_NOSKIP)) { while (*string != '\0') { offset = Tcl_UtfToUniChar(string, &sch); - if (!TclUniCharIsSpace(sch)) { + if (!Tcl_UniCharIsSpace(sch)) { break; } string += offset; @@ -711,7 +711,7 @@ Tcl_ScanObjCmd(dummy, interp, objc, objv) end = string; while (*end != '\0') { offset = Tcl_UtfToUniChar(end, &sch); - if (TclUniCharIsSpace(sch)) { + if (Tcl_UniCharIsSpace(sch)) { break; } end += offset; diff --git a/generic/tclStubInit.c b/generic/tclStubInit.c index 6da6b95..2151b8b 100644 --- a/generic/tclStubInit.c +++ b/generic/tclStubInit.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: tclStubInit.c,v 1.3.2.9 1999/04/01 21:58:19 stanton Exp $ + * RCS: @(#) $Id: tclStubInit.c,v 1.3.2.10 1999/04/02 23:44:57 stanton Exp $ */ #include "tclInt.h" @@ -414,6 +414,17 @@ TclStubs tclStubs = { Tcl_SetDefaultEncodingDir, /* 342 */ Tcl_AlertNotifier, /* 343 */ Tcl_ServiceModeHook, /* 344 */ + Tcl_UniCharIsAlnum, /* 345 */ + Tcl_UniCharIsAlpha, /* 346 */ + Tcl_UniCharIsDigit, /* 347 */ + Tcl_UniCharIsLower, /* 348 */ + Tcl_UniCharIsSpace, /* 349 */ + Tcl_UniCharIsUpper, /* 350 */ + Tcl_UniCharIsWordChar, /* 351 */ + Tcl_UniCharLen, /* 352 */ + Tcl_UniCharNcmp, /* 353 */ + Tcl_UniCharToUtfDString, /* 354 */ + Tcl_UtfToUniCharDString, /* 355 */ }; TclIntStubs tclIntStubs = { diff --git a/generic/tclTest.c b/generic/tclTest.c index 81444e9..4a46713 100644 --- a/generic/tclTest.c +++ b/generic/tclTest.c @@ -12,7 +12,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclTest.c,v 1.1.2.13 1999/03/10 06:49:23 stanton Exp $ + * RCS: @(#) $Id: tclTest.c,v 1.1.2.14 1999/04/02 23:44:58 stanton Exp $ */ #define TCL_TEST @@ -2647,7 +2647,7 @@ TestregexpObjCmd(dummy, interp, objc, objv) Tcl_DStringInit(&valueBuffer); Tcl_DStringInit(&stringBuffer); - wStart = TclUtfToUniCharDString(string, stringLength, &stringBuffer); + wStart = Tcl_UtfToUniCharDString(string, stringLength, &stringBuffer); wLen = Tcl_DStringLength(&stringBuffer) / sizeof(Tcl_UniChar); match = TclRegExpExecUniChar(interp, regExpr, wStart, wLen, objc-2, eflags); @@ -2692,7 +2692,7 @@ TestregexpObjCmd(dummy, interp, objc, objv) sprintf(info, "%d %d", start, end - 1); value = Tcl_SetVar(interp, varName, info, 0); } else { - value = TclUniCharToUtfDString(wStart + start, end - start, + value = Tcl_UniCharToUtfDString(wStart + start, end - start, &valueBuffer); value = Tcl_SetVar(interp, varName, value, 0); Tcl_DStringSetLength(&valueBuffer, 0); diff --git a/generic/tclUtf.c b/generic/tclUtf.c index 9fc65b8..e8d8d93 100644 --- a/generic/tclUtf.c +++ b/generic/tclUtf.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: tclUtf.c,v 1.1.2.5 1998/11/04 04:39:53 stanton Exp $ + * RCS: @(#) $Id: tclUtf.c,v 1.1.2.6 1999/04/02 23:44:58 stanton Exp $ */ #include "tclInt.h" @@ -152,7 +152,7 @@ Tcl_UniCharToUtf(ch, str) /* *--------------------------------------------------------------------------- * - * TclUniCharToUtfDString -- + * Tcl_UniCharToUtfDString -- * * Convert the given Unicode string to UTF-8. * @@ -168,7 +168,7 @@ Tcl_UniCharToUtf(ch, str) */ char * -TclUniCharToUtfDString(wString, numChars, dsPtr) +Tcl_UniCharToUtfDString(wString, numChars, dsPtr) CONST Tcl_UniChar *wString; /* Unicode string to convert to UTF-8. */ int numChars; /* Length of Unicode string in Tcl_UniChars * (must be >= 0). */ @@ -313,7 +313,7 @@ Tcl_UtfToUniChar(str, chPtr) /* *--------------------------------------------------------------------------- * - * TclUtfToUniCharDString -- + * Tcl_UtfToUniCharDString -- * * Convert the UTF-8 string to Unicode. * @@ -330,7 +330,7 @@ Tcl_UtfToUniChar(str, chPtr) */ Tcl_UniChar * -TclUtfToUniCharDString(string, length, dsPtr) +Tcl_UtfToUniCharDString(string, length, dsPtr) CONST char *string; /* UTF-8 string to convert to Unicode. */ int length; /* Length of UTF-8 string in bytes, or -1 * for strlen(). */ @@ -1045,7 +1045,7 @@ Tcl_UniCharToTitle(ch) /* *---------------------------------------------------------------------- * - * TclUniCharLen -- + * Tcl_UniCharLen -- * * Find the length of a UniChar string. The str input must be null * terminated. @@ -1060,7 +1060,7 @@ Tcl_UniCharToTitle(ch) */ int -TclUniCharLen(str) +Tcl_UniCharLen(str) Tcl_UniChar *str; /* Unicode string to find length of. */ { int len = 0; @@ -1075,7 +1075,7 @@ TclUniCharLen(str) /* *---------------------------------------------------------------------- * - * TclUniCharNcmp -- + * Tcl_UniCharNcmp -- * * Compare at most n unichars of string cs to string ct. Both cs * and ct are assumed to be at least n unichars long. @@ -1090,7 +1090,7 @@ TclUniCharLen(str) */ int -TclUniCharNcmp(cs, ct, n) +Tcl_UniCharNcmp(cs, ct, n) CONST Tcl_UniChar *cs; /* Unicode string to compare to ct. */ CONST Tcl_UniChar *ct; /* Unicode string cs is compared to. */ size_t n; /* Number of unichars to compare. */ @@ -1109,7 +1109,7 @@ TclUniCharNcmp(cs, ct, n) /* *---------------------------------------------------------------------- * - * TclUniCharIsAlnum -- + * Tcl_UniCharIsAlnum -- * * Test if a character is an alphanumeric Unicode character. * @@ -1123,7 +1123,7 @@ TclUniCharNcmp(cs, ct, n) */ int -TclUniCharIsAlnum(ch) +Tcl_UniCharIsAlnum(ch) int ch; /* Unicode character to test. */ { register int category = (GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK); @@ -1134,7 +1134,7 @@ TclUniCharIsAlnum(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsAlpha -- + * Tcl_UniCharIsAlpha -- * * Test if a character is an alphabetic Unicode character. * @@ -1148,7 +1148,7 @@ TclUniCharIsAlnum(ch) */ int -TclUniCharIsAlpha(ch) +Tcl_UniCharIsAlpha(ch) int ch; /* Unicode character to test. */ { register int category = (GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK); @@ -1158,7 +1158,7 @@ TclUniCharIsAlpha(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsDigit -- + * Tcl_UniCharIsDigit -- * * Test if a character is a numeric Unicode character. * @@ -1172,7 +1172,7 @@ TclUniCharIsAlpha(ch) */ int -TclUniCharIsDigit(ch) +Tcl_UniCharIsDigit(ch) int ch; /* Unicode character to test. */ { return ((GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK) @@ -1182,7 +1182,7 @@ TclUniCharIsDigit(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsLower -- + * Tcl_UniCharIsLower -- * * Test if a character is a lowercase Unicode character. * @@ -1196,7 +1196,7 @@ TclUniCharIsDigit(ch) */ int -TclUniCharIsLower(ch) +Tcl_UniCharIsLower(ch) int ch; /* Unicode character to test. */ { return ((GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK) == LOWERCASE_LETTER); @@ -1205,7 +1205,7 @@ TclUniCharIsLower(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsSpace -- + * Tcl_UniCharIsSpace -- * * Test if a character is a whitespace Unicode character. * @@ -1219,7 +1219,7 @@ TclUniCharIsLower(ch) */ int -TclUniCharIsSpace(ch) +Tcl_UniCharIsSpace(ch) int ch; /* Unicode character to test. */ { register int category; @@ -1240,7 +1240,7 @@ TclUniCharIsSpace(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsUpper -- + * Tcl_UniCharIsUpper -- * * Test if a character is a uppercase Unicode character. * @@ -1254,7 +1254,7 @@ TclUniCharIsSpace(ch) */ int -TclUniCharIsUpper(ch) +Tcl_UniCharIsUpper(ch) int ch; /* Unicode character to test. */ { return ((GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK) == UPPERCASE_LETTER); @@ -1263,7 +1263,7 @@ TclUniCharIsUpper(ch) /* *---------------------------------------------------------------------- * - * TclUniCharIsWordChar -- + * Tcl_UniCharIsWordChar -- * * Test if a character is alphanumeric or a connector punctuation * mark. @@ -1278,7 +1278,7 @@ TclUniCharIsUpper(ch) */ int -TclUniCharIsWordChar(ch) +Tcl_UniCharIsWordChar(ch) int ch; /* Unicode character to test. */ { register int category = (GetUniCharInfo(ch) & UNICODE_CATEGORY_MASK); diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c index 97826e5..52f2f4f 100644 --- a/win/tclWinFCmd.c +++ b/win/tclWinFCmd.c @@ -9,7 +9,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFCmd.c,v 1.1.2.2 1998/09/24 23:59:51 stanton Exp $ + * RCS: @(#) $Id: tclWinFCmd.c,v 1.1.2.3 1999/04/02 23:44:59 stanton Exp $ */ #include "tclWinInt.h" @@ -1058,7 +1058,7 @@ TraverseWinTree( } } nativeName = (TCHAR *) data.w.cFileName; - len = TclUniCharLen(data.w.cFileName) * sizeof(WCHAR); + len = Tcl_UniCharLen(data.w.cFileName) * sizeof(WCHAR); } else { if ((strcmp(data.a.cFileName, ".") == 0) || (strcmp(data.a.cFileName, "..") == 0)) { diff --git a/win/tclWinFile.c b/win/tclWinFile.c index c47a864..4a58950 100644 --- a/win/tclWinFile.c +++ b/win/tclWinFile.c @@ -11,7 +11,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclWinFile.c,v 1.1.2.5 1999/03/19 04:01:27 stanton Exp $ + * RCS: @(#) $Id: tclWinFile.c,v 1.1.2.6 1999/04/02 23:45:00 stanton Exp $ */ #include "tclWinInt.h" @@ -416,7 +416,7 @@ TclpGetUserHome(name, bufferPtr) domain = strchr(name, '@'); if (domain != NULL) { Tcl_DStringInit(&ds); - wName = TclUtfToUniCharDString(domain + 1, -1, &ds); + wName = Tcl_UtfToUniCharDString(domain + 1, -1, &ds); badDomain = (*netGetDCNameProc)(NULL, wName, (LPBYTE *) &wDomain); Tcl_DStringFree(&ds); @@ -424,12 +424,12 @@ TclpGetUserHome(name, bufferPtr) } if (badDomain == 0) { Tcl_DStringInit(&ds); - wName = TclUtfToUniCharDString(name, nameLen, &ds); + wName = Tcl_UtfToUniCharDString(name, nameLen, &ds); if ((*netUserGetInfoProc)(wDomain, wName, 1, (LPBYTE *) &uiPtr) == 0) { wHomeDir = uiPtr->usri1_home_dir; if ((wHomeDir != NULL) && (wHomeDir[0] != L'\0')) { - TclUniCharToUtfDString(wHomeDir, lstrlenW(wHomeDir), + Tcl_UniCharToUtfDString(wHomeDir, lstrlenW(wHomeDir), bufferPtr); } else { /* @@ -438,7 +438,7 @@ TclpGetUserHome(name, bufferPtr) */ GetWindowsDirectoryW(buf, MAX_PATH); - TclUniCharToUtfDString(buf, 2, bufferPtr); + Tcl_UniCharToUtfDString(buf, 2, bufferPtr); Tcl_DStringAppend(bufferPtr, "/users/default", -1); } result = Tcl_DStringValue(bufferPtr); |