Minor changes: whitespace/formatting improvements.
This commit is contained in:
+6
-7
@@ -880,10 +880,10 @@ typedef struct Tcl_DString {
|
||||
* TCL_NUMBER_NAN Value is NaN.
|
||||
*/
|
||||
|
||||
#define TCL_NUMBER_INT 2
|
||||
#define TCL_NUMBER_BIG 3
|
||||
#define TCL_NUMBER_DOUBLE 4
|
||||
#define TCL_NUMBER_NAN 5
|
||||
#define TCL_NUMBER_INT 2
|
||||
#define TCL_NUMBER_BIG 3
|
||||
#define TCL_NUMBER_DOUBLE 4
|
||||
#define TCL_NUMBER_NAN 5
|
||||
|
||||
/*
|
||||
* Flag values passed to Tcl_ConvertElement.
|
||||
@@ -944,7 +944,7 @@ typedef struct Tcl_DString {
|
||||
#define TCL_EVAL_DIRECT 0x040000
|
||||
#define TCL_EVAL_INVOKE 0x080000
|
||||
#define TCL_CANCEL_UNWIND 0x100000
|
||||
#define TCL_EVAL_NOERR 0x200000
|
||||
#define TCL_EVAL_NOERR 0x200000
|
||||
|
||||
/*
|
||||
* Special freeProc values that may be passed to Tcl_SetResult (see the man
|
||||
@@ -2230,8 +2230,7 @@ typedef Tcl_Size (Tcl_ArgvGenFuncProc)(void *clientData, Tcl_Interp *interp,
|
||||
* Single public declaration for NRE.
|
||||
*/
|
||||
|
||||
typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp,
|
||||
int result);
|
||||
typedef int (Tcl_NRPostProc) (void *data[], Tcl_Interp *interp, int result);
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------------
|
||||
|
||||
+4
-9
@@ -390,10 +390,8 @@ typedef struct ClockClientData {
|
||||
|
||||
typedef struct ClockScanToken ClockScanToken;
|
||||
|
||||
typedef int ClockScanTokenProc(
|
||||
ClockFmtScnCmdArgs *opts,
|
||||
DateInfo *info,
|
||||
const ClockScanToken *tok);
|
||||
typedef int (ClockScanTokenProc)(ClockFmtScnCmdArgs *opts,
|
||||
DateInfo *info, const ClockScanToken *tok);
|
||||
|
||||
typedef enum {
|
||||
CTOKT_INT = 1, CTOKT_WIDE, CTOKT_PARSER, CTOKT_SPACE, CTOKT_WORD, CTOKT_CHAR,
|
||||
@@ -446,11 +444,8 @@ enum ClockFormatTokenMapFlags {
|
||||
|
||||
typedef struct ClockFormatToken ClockFormatToken;
|
||||
|
||||
typedef int ClockFormatTokenProc(
|
||||
ClockFmtScnCmdArgs *opts,
|
||||
DateFormat *dateFmt,
|
||||
ClockFormatToken *tok,
|
||||
int *val);
|
||||
typedef int (ClockFormatTokenProc)(ClockFmtScnCmdArgs *opts,
|
||||
DateFormat *dateFmt, ClockFormatToken *tok, int *val);
|
||||
|
||||
typedef struct ClockFormatTokenMap {
|
||||
unsigned short type;
|
||||
|
||||
@@ -149,16 +149,16 @@ const Tcl_ObjType tclDictType = {
|
||||
TCL_OBJTYPE_V0
|
||||
};
|
||||
|
||||
#define DictSetInternalRep(objPtr, dictRepPtr) \
|
||||
do { \
|
||||
#define DictSetInternalRep(objPtr, dictRepPtr) \
|
||||
do { \
|
||||
Tcl_ObjInternalRep ir; \
|
||||
ir.twoPtrValue.ptr1 = (dictRepPtr); \
|
||||
ir.twoPtrValue.ptr2 = NULL; \
|
||||
ir.twoPtrValue.ptr1 = (dictRepPtr); \
|
||||
ir.twoPtrValue.ptr2 = NULL; \
|
||||
Tcl_StoreInternalRep((objPtr), &tclDictType, &ir); \
|
||||
} while (0)
|
||||
|
||||
#define DictGetInternalRep(objPtr, dictRepPtr) \
|
||||
do { \
|
||||
#define DictGetInternalRep(objPtr, dictRepPtr) \
|
||||
do { \
|
||||
const Tcl_ObjInternalRep *irPtr; \
|
||||
irPtr = TclFetchInternalRep((objPtr), &tclDictType); \
|
||||
(dictRepPtr) = irPtr ? (Dict *)irPtr->twoPtrValue.ptr1 : NULL; \
|
||||
|
||||
+2
-1
@@ -951,7 +951,8 @@ IcuNormalizeUCharDString(
|
||||
/*
|
||||
* Common function for parsing convert options.
|
||||
*/
|
||||
static int IcuParseConvertOptions(
|
||||
static int
|
||||
IcuParseConvertOptions(
|
||||
Tcl_Interp *interp,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[],
|
||||
|
||||
+1
-1
@@ -3540,7 +3540,7 @@ MODULE_SCOPE void TclObjVarErrMsg(Tcl_Interp *interp, Tcl_Obj *part1Ptr,
|
||||
const char *reason, Tcl_Size index);
|
||||
MODULE_SCOPE int TclObjUnsetVar2(Tcl_Interp *interp,
|
||||
Tcl_Obj *part1Ptr, Tcl_Obj *part2Ptr, int flags);
|
||||
MODULE_SCOPE Tcl_Size TclParseBackslash(const char *src,
|
||||
MODULE_SCOPE Tcl_Size TclParseBackslash(const char *src,
|
||||
Tcl_Size numBytes, Tcl_Size *readPtr, char *dst);
|
||||
MODULE_SCOPE int TclParseNumber(Tcl_Interp *interp, Tcl_Obj *objPtr,
|
||||
const char *expected, const char *bytes,
|
||||
|
||||
+39
-39
@@ -377,19 +377,19 @@ static Tcl_ObjTypeInOperatorProc LreverseTypeInOper;
|
||||
* modification.
|
||||
*/
|
||||
static const Tcl_ObjType lreverseType = {
|
||||
"reversedList", /* name */
|
||||
LreverseFreeIntrep, /* freeIntRepProc */
|
||||
LreverseDupIntrep, /* dupIntRepProc */
|
||||
TclAbstractListUpdateString, /* updateStringProc */
|
||||
NULL, /* setFromAnyProc */
|
||||
TCL_OBJTYPE_V2(LreverseTypeLength, /* lengthProc */
|
||||
LreverseTypeIndex, /* indexProc */
|
||||
NULL, /* sliceProc */
|
||||
LreverseTypeReverse, /* reverseProc */
|
||||
NULL, /* getElementsProc */
|
||||
NULL, /* setElementProc - FUTURES */
|
||||
NULL, /* replaceProc - FUTURES */
|
||||
LreverseTypeInOper) /* inOperProc */
|
||||
"reversedList", // name
|
||||
LreverseFreeIntrep, // freeIntRepProc
|
||||
LreverseDupIntrep, // dupIntRepProc
|
||||
TclAbstractListUpdateString, // updateStringProc
|
||||
NULL, // setFromAnyProc
|
||||
TCL_OBJTYPE_V2(LreverseTypeLength, // lengthProc
|
||||
LreverseTypeIndex, // indexProc
|
||||
NULL, // sliceProc
|
||||
LreverseTypeReverse, // reverseProc
|
||||
NULL, // getElementsProc
|
||||
NULL, // setElementProc - FUTURES
|
||||
NULL, // replaceProc - FUTURES
|
||||
LreverseTypeInOper) // inOperProc
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -584,19 +584,19 @@ static Tcl_ObjTypeInOperatorProc LrepeatTypeInOper;
|
||||
* may be shared must be checked before modification.
|
||||
*/
|
||||
static const Tcl_ObjType lrepeatType = {
|
||||
"repeatedList", /* name */
|
||||
LrepeatFreeIntrep, /* freeIntRepProc */
|
||||
LrepeatDupIntrep, /* dupIntRepProc */
|
||||
TclAbstractListUpdateString, /* updateStringProc */
|
||||
NULL, /* setFromAnyProc */
|
||||
TCL_OBJTYPE_V2(LrepeatTypeLength, /* lengthProc */
|
||||
LrepeatTypeIndex, /* indexProc */
|
||||
NULL, /* sliceProc */
|
||||
NULL, /* Must be NULL - see above comment */
|
||||
NULL, /* getElementsProc */
|
||||
NULL, /* Must be NULL - see above comment */
|
||||
NULL, /* Must be NULL - see above comment */
|
||||
LrepeatTypeInOper) /* inOperProc */
|
||||
"repeatedList", // name
|
||||
LrepeatFreeIntrep, // freeIntRepProc
|
||||
LrepeatDupIntrep, // dupIntRepProc
|
||||
TclAbstractListUpdateString, // updateStringProc
|
||||
NULL, // setFromAnyProc
|
||||
TCL_OBJTYPE_V2(LrepeatTypeLength, // lengthProc
|
||||
LrepeatTypeIndex, // indexProc
|
||||
NULL, // sliceProc
|
||||
NULL, // Must be NULL - see above comment
|
||||
NULL, // getElementsProc
|
||||
NULL, // Must be NULL - see above comment
|
||||
NULL, // Must be NULL - see above comment
|
||||
LrepeatTypeInOper) // inOperProc
|
||||
};
|
||||
|
||||
static void
|
||||
@@ -796,19 +796,19 @@ static Tcl_ObjTypeSliceProc LrangeSlice;
|
||||
* may be shared and must be checked before modification.
|
||||
*/
|
||||
static const Tcl_ObjType lrangeType = {
|
||||
"rangeList", /* name */
|
||||
LrangeFreeIntrep, /* freeIntRepProc */
|
||||
LrangeDupIntrep, /* dupIntRepProc */
|
||||
TclAbstractListUpdateString, /* updateStringProc */
|
||||
NULL, /* setFromAnyProc */
|
||||
TCL_OBJTYPE_V2(LrangeTypeLength, /* lengthProc */
|
||||
LrangeTypeIndex, /* indexProc */
|
||||
LrangeSlice, /* sliceProc */
|
||||
NULL, /* reverseProc, see above comment */
|
||||
NULL, /* getElementsProc */
|
||||
NULL, /* setElementProc, see above comment */
|
||||
NULL, /* replaceProc, see above comment */
|
||||
NULL) /* inOperProc */
|
||||
"rangeList", // name
|
||||
LrangeFreeIntrep, // freeIntRepProc
|
||||
LrangeDupIntrep, // dupIntRepProc
|
||||
TclAbstractListUpdateString, // updateStringProc
|
||||
NULL, // setFromAnyProc
|
||||
TCL_OBJTYPE_V2(LrangeTypeLength, // lengthProc
|
||||
LrangeTypeIndex, // indexProc
|
||||
LrangeSlice, // sliceProc
|
||||
NULL, // reverseProc, see above comment
|
||||
NULL, // getElementsProc
|
||||
NULL, // setElementProc, see above comment
|
||||
NULL, // replaceProc, see above comment
|
||||
NULL) // inOperProc
|
||||
};
|
||||
|
||||
static inline int
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ typedef struct {
|
||||
|
||||
static Tcl_ThreadDataKey dataKey;
|
||||
|
||||
static void TclThreadFinalizeContLines(void *clientData);
|
||||
static void TclThreadFinalizeContLines(void *clientData);
|
||||
static ThreadSpecificData *TclGetContLineTable(void);
|
||||
|
||||
/*
|
||||
|
||||
+17
-11
@@ -294,31 +294,32 @@ static Tcl_ObjCmdProc TestSimpleFilesystemCmd;
|
||||
static void TestReport(const char *cmd, Tcl_Obj *arg1,
|
||||
Tcl_Obj *arg2);
|
||||
static Tcl_Obj * TestReportGetNativePath(Tcl_Obj *pathPtr);
|
||||
static Tcl_FSStatProc TestReportStat;
|
||||
static Tcl_FSStatProc TestReportStat;
|
||||
static Tcl_FSAccessProc TestReportAccess;
|
||||
static Tcl_FSOpenFileChannelProc TestReportOpenFileChannel;
|
||||
static Tcl_FSMatchInDirectoryProc TestReportMatchInDirectory;
|
||||
static Tcl_FSChdirProc TestReportChdir;
|
||||
static Tcl_FSLstatProc TestReportLstat;
|
||||
static Tcl_FSChdirProc TestReportChdir;
|
||||
static Tcl_FSLstatProc TestReportLstat;
|
||||
static Tcl_FSCopyFileProc TestReportCopyFile;
|
||||
static Tcl_FSDeleteFileProc TestReportDeleteFile;
|
||||
static Tcl_FSRenameFileProc TestReportRenameFile;
|
||||
static Tcl_FSCreateDirectoryProc TestReportCreateDirectory;
|
||||
static Tcl_FSCopyDirectoryProc TestReportCopyDirectory;
|
||||
static Tcl_FSRemoveDirectoryProc TestReportRemoveDirectory;
|
||||
static int TestReportLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
|
||||
Tcl_LoadHandle *handlePtr, Tcl_FSUnloadFileProc **unloadProcPtr);
|
||||
static Tcl_FSLinkProc TestReportLink;
|
||||
static int TestReportLoadFile(Tcl_Interp *interp, Tcl_Obj *pathPtr,
|
||||
Tcl_LoadHandle *handlePtr,
|
||||
Tcl_FSUnloadFileProc **unloadProcPtr);
|
||||
static Tcl_FSLinkProc TestReportLink;
|
||||
static Tcl_FSFileAttrStringsProc TestReportFileAttrStrings;
|
||||
static Tcl_FSFileAttrsGetProc TestReportFileAttrsGet;
|
||||
static Tcl_FSFileAttrsSetProc TestReportFileAttrsSet;
|
||||
static Tcl_FSUtimeProc TestReportUtime;
|
||||
static Tcl_FSUtimeProc TestReportUtime;
|
||||
static Tcl_FSNormalizePathProc TestReportNormalizePath;
|
||||
static Tcl_FSPathInFilesystemProc TestReportInFilesystem;
|
||||
static Tcl_FSFreeInternalRepProc TestReportFreeInternalRep;
|
||||
static Tcl_FSDupInternalRepProc TestReportDupInternalRep;
|
||||
static Tcl_ObjCmdProc TestServiceModeCmd;
|
||||
static Tcl_FSStatProc SimpleStat;
|
||||
static Tcl_FSStatProc SimpleStat;
|
||||
static Tcl_FSAccessProc SimpleAccess;
|
||||
static Tcl_FSOpenFileChannelProc SimpleOpenFileChannel;
|
||||
static Tcl_FSListVolumesProc SimpleListVolumes;
|
||||
@@ -2079,7 +2080,8 @@ TestdstringCmd(
|
||||
* Tcl_DStringGetResult handles freeProc's other than free.
|
||||
*/
|
||||
|
||||
static void SpecialFree(
|
||||
static void
|
||||
SpecialFree(
|
||||
void *blockPtr) /* Block to free. */
|
||||
{
|
||||
Tcl_Free(((char *)blockPtr) - 16);
|
||||
@@ -2123,8 +2125,12 @@ UtfTransformFn(Tcl_Interp *interp, Tcl_Encoding encoding, const char *src,
|
||||
Tcl_Size srcLen, int flags, Tcl_EncodingState *statePtr, char *dst,
|
||||
Tcl_Size dstLen, int *srcReadPtr, int *dstWrotePtr, int *dstCharsPtr);
|
||||
|
||||
static int UtfExtWrapper(
|
||||
Tcl_Interp *interp, UtfTransformFn *transformer, int objc, Tcl_Obj *const objv[])
|
||||
static int
|
||||
UtfExtWrapper(
|
||||
Tcl_Interp *interp,
|
||||
UtfTransformFn *transformer,
|
||||
int objc,
|
||||
Tcl_Obj *const objv[])
|
||||
{
|
||||
Tcl_Encoding encoding;
|
||||
Tcl_EncodingState encState, *encStatePtr;
|
||||
|
||||
+41
-38
@@ -13,25 +13,26 @@
|
||||
* Forward references
|
||||
*/
|
||||
|
||||
Tcl_Obj *myNewLStringObj(Tcl_WideInt start, Tcl_WideInt length);
|
||||
static void freeRep(Tcl_Obj* alObj);
|
||||
static Tcl_Obj* my_LStringObjSetElem(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Size numIndcies, Tcl_Obj *const indicies[], Tcl_Obj *valueObj);
|
||||
static void DupLStringRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
|
||||
static Tcl_Size my_LStringObjLength(Tcl_Obj *lstringObjPtr);
|
||||
static int my_LStringObjIndex(Tcl_Interp *interp, Tcl_Obj *lstringObj,
|
||||
Tcl_Size index, Tcl_Obj **charObjPtr);
|
||||
static int my_LStringObjRange(Tcl_Interp *interp, Tcl_Obj *lstringObj,
|
||||
Tcl_Size fromIdx, Tcl_Size toIdx, Tcl_Obj **newObjPtr);
|
||||
static int my_LStringObjReverse(Tcl_Interp *interp, Tcl_Obj *srcObj,
|
||||
Tcl_Obj **newObjPtr);
|
||||
static int my_LStringReplace(Tcl_Interp *interp, Tcl_Obj *listObj,
|
||||
Tcl_Size first, Tcl_Size numToDelete, Tcl_Size numToInsert,
|
||||
Tcl_Obj *const insertObjs[]);
|
||||
static int my_LStringGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Size *objcptr, Tcl_Obj ***objvptr);
|
||||
static void lstringFreeElements(Tcl_Obj* lstringObj);
|
||||
static void UpdateStringOfLString(Tcl_Obj *objPtr);
|
||||
Tcl_Obj * myNewLStringObj(Tcl_WideInt start, Tcl_WideInt length);
|
||||
static void freeRep(Tcl_Obj* alObj);
|
||||
static Tcl_Obj * my_LStringObjSetElem(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Size numIndcies, Tcl_Obj *const indicies[],
|
||||
Tcl_Obj *valueObj);
|
||||
static void DupLStringRep(Tcl_Obj *srcPtr, Tcl_Obj *copyPtr);
|
||||
static Tcl_Size my_LStringObjLength(Tcl_Obj *lstringObjPtr);
|
||||
static int my_LStringObjIndex(Tcl_Interp *interp, Tcl_Obj *lstringObj,
|
||||
Tcl_Size index, Tcl_Obj **charObjPtr);
|
||||
static int my_LStringObjRange(Tcl_Interp *interp, Tcl_Obj *lstringObj,
|
||||
Tcl_Size fromIdx, Tcl_Size toIdx, Tcl_Obj **newObjPtr);
|
||||
static int my_LStringObjReverse(Tcl_Interp *interp, Tcl_Obj *srcObj,
|
||||
Tcl_Obj **newObjPtr);
|
||||
static int my_LStringReplace(Tcl_Interp *interp, Tcl_Obj *listObj,
|
||||
Tcl_Size first, Tcl_Size numToDelete, Tcl_Size numToInsert,
|
||||
Tcl_Obj *const insertObjs[]);
|
||||
static int my_LStringGetElements(Tcl_Interp *interp, Tcl_Obj *listPtr,
|
||||
Tcl_Size *objcptr, Tcl_Obj ***objvptr);
|
||||
static void lstringFreeElements(Tcl_Obj* lstringObj);
|
||||
static void UpdateStringOfLString(Tcl_Obj *objPtr);
|
||||
|
||||
/*
|
||||
* Internal Representation of an lstring type value
|
||||
@@ -63,7 +64,7 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*1*/
|
||||
"lstring",
|
||||
@@ -79,7 +80,7 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*2*/
|
||||
"lstring",
|
||||
@@ -89,13 +90,13 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
NULL,
|
||||
TCL_OBJTYPE_V2(
|
||||
my_LStringObjLength, /* Length */
|
||||
NULL, /* Index */
|
||||
NULL, /* Index */
|
||||
my_LStringObjRange, /* Slice */
|
||||
my_LStringObjReverse, /* Reverse */
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*3*/
|
||||
"lstring",
|
||||
@@ -106,12 +107,12 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
TCL_OBJTYPE_V2(
|
||||
my_LStringObjLength, /* Length */
|
||||
my_LStringObjIndex, /* Index */
|
||||
NULL, /* Slice */
|
||||
NULL, /* Slice */
|
||||
my_LStringObjReverse, /* Reverse */
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*4*/
|
||||
"lstring",
|
||||
@@ -123,11 +124,11 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringObjLength, /* Length */
|
||||
my_LStringObjIndex, /* Index */
|
||||
my_LStringObjRange, /* Slice */
|
||||
NULL, /* Reverse */
|
||||
NULL, /* Reverse */
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*5*/
|
||||
"lstring",
|
||||
@@ -140,10 +141,10 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringObjIndex, /* Index */
|
||||
my_LStringObjRange, /* Slice */
|
||||
my_LStringObjReverse, /* Reverse */
|
||||
NULL, /* GetElements */
|
||||
NULL, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*6*/
|
||||
"lstring",
|
||||
@@ -157,9 +158,9 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringObjRange, /* Slice */
|
||||
my_LStringObjReverse, /* Reverse */
|
||||
my_LStringGetElements, /* GetElements */
|
||||
NULL, /* SetElement */
|
||||
NULL, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*7*/
|
||||
"lstring",
|
||||
@@ -174,8 +175,8 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringObjReverse, /* Reverse */
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
NULL, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*8*/
|
||||
"lstring",
|
||||
@@ -191,7 +192,7 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*9*/
|
||||
"lstring",
|
||||
@@ -207,7 +208,7 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
},
|
||||
{/*10*/
|
||||
"lstring",
|
||||
@@ -223,10 +224,9 @@ static const Tcl_ObjType lstringTypes[11] = {
|
||||
my_LStringGetElements, /* GetElements */
|
||||
my_LStringObjSetElem, /* SetElement */
|
||||
my_LStringReplace, /* Replace */
|
||||
NULL) /* "in" operator */
|
||||
NULL) /* "in" operator */
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
@@ -1206,7 +1206,10 @@ lGenObjCmd(
|
||||
/*
|
||||
* lgen package init
|
||||
*/
|
||||
int Lgen_Init(Tcl_Interp *interp) {
|
||||
int
|
||||
Lgen_Init(
|
||||
Tcl_Interp *interp)
|
||||
{
|
||||
if (Tcl_InitStubs(interp, "9.0-", 0) == NULL) {
|
||||
return TCL_ERROR;
|
||||
}
|
||||
|
||||
+19
-16
@@ -31,10 +31,12 @@
|
||||
* Forward declarations for functions defined later in this file:
|
||||
*/
|
||||
|
||||
static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr, Tcl_Size varIndex);
|
||||
static int CheckIfVarUnset(Tcl_Interp *interp, Tcl_Obj **varPtr,
|
||||
Tcl_Size varIndex);
|
||||
static int GetVariableIndex(Tcl_Interp *interp,
|
||||
Tcl_Obj *obj, Tcl_Size *indexPtr);
|
||||
static void SetVarToObj(Tcl_Obj **varPtr, Tcl_Size varIndex, Tcl_Obj *objPtr);
|
||||
static void SetVarToObj(Tcl_Obj **varPtr, Tcl_Size varIndex,
|
||||
Tcl_Obj *objPtr);
|
||||
static Tcl_ObjCmdProc TestbignumobjCmd;
|
||||
static Tcl_ObjCmdProc TestbooleanobjCmd;
|
||||
static Tcl_ObjCmdProc TestdoubleobjCmd;
|
||||
@@ -1064,11 +1066,15 @@ TestlistobjCmd(
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
static Tcl_Size V1TestListObjLength(TCL_UNUSED(Tcl_Obj *)) {
|
||||
static Tcl_Size
|
||||
V1TestListObjLength(
|
||||
TCL_UNUSED(Tcl_Obj *))
|
||||
{
|
||||
return 100;
|
||||
}
|
||||
|
||||
static int V1TestListObjIndex(
|
||||
static int
|
||||
V1TestListObjIndex(
|
||||
TCL_UNUSED(Tcl_Interp *),
|
||||
TCL_UNUSED(Tcl_Obj *),
|
||||
TCL_UNUSED(Tcl_Size),
|
||||
@@ -1090,9 +1096,7 @@ static const Tcl_ObjType v1TestListType = {
|
||||
NULL, NULL, NULL, NULL, NULL, NULL
|
||||
};
|
||||
|
||||
|
||||
static
|
||||
void
|
||||
static void
|
||||
HugeUpdateString(
|
||||
TCL_UNUSED(Tcl_Obj *))
|
||||
{
|
||||
@@ -1109,8 +1113,7 @@ static const Tcl_ObjType hugeType = {
|
||||
NULL, /* setFromAnyProc */
|
||||
TCL_OBJTYPE_V0
|
||||
};
|
||||
|
||||
|
||||
|
||||
static int
|
||||
TestobjCmd(
|
||||
TCL_UNUSED(void *),
|
||||
@@ -1648,7 +1651,7 @@ TeststringobjCmd(
|
||||
*------------------------------------------------------------------------
|
||||
*/
|
||||
static int
|
||||
TestbigdataCmd (
|
||||
TestbigdataCmd(
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
@@ -1759,7 +1762,7 @@ TestbigdataCmd (
|
||||
}
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
@@ -1869,7 +1872,7 @@ CheckIfVarUnset(
|
||||
}
|
||||
|
||||
static int
|
||||
TestisemptyCmd (
|
||||
TestisemptyCmd(
|
||||
TCL_UNUSED(void *),
|
||||
Tcl_Interp *interp, /* Current interpreter. */
|
||||
int objc, /* Number of arguments. */
|
||||
@@ -1882,16 +1885,16 @@ TestisemptyCmd (
|
||||
}
|
||||
result = Tcl_NewIntObj(Tcl_IsEmpty(objv[1]));
|
||||
if (!objv[1]->bytes) {
|
||||
Tcl_AppendToObj(result, " pure", TCL_INDEX_NONE);
|
||||
Tcl_AppendToObj(result, " pure", TCL_INDEX_NONE);
|
||||
}
|
||||
if (objv[1]->typePtr) {
|
||||
Tcl_AppendToObj(result, " ", TCL_INDEX_NONE);
|
||||
Tcl_AppendToObj(result, objv[1]->typePtr->name, TCL_INDEX_NONE);
|
||||
Tcl_AppendToObj(result, " ", TCL_INDEX_NONE);
|
||||
Tcl_AppendToObj(result, objv[1]->typePtr->name, TCL_INDEX_NONE);
|
||||
}
|
||||
Tcl_SetObjResult(interp, result);
|
||||
return TCL_OK;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Local Variables:
|
||||
* mode: c
|
||||
|
||||
+31
-31
@@ -3,42 +3,42 @@
|
||||
|
||||
#include <stdint.h>
|
||||
#if defined(TCL_NO_TOMMATH_H)
|
||||
typedef size_t mp_digit;
|
||||
typedef int mp_sign;
|
||||
# define MP_ZPOS 0 /* positive integer */
|
||||
# define MP_NEG 1 /* negative */
|
||||
typedef int mp_ord;
|
||||
# define MP_LT -1 /* less than */
|
||||
# define MP_EQ 0 /* equal to */
|
||||
# define MP_GT 1 /* greater than */
|
||||
typedef int mp_err;
|
||||
# define MP_OKAY 0 /* no error */
|
||||
# define MP_ERR -1 /* unknown error */
|
||||
# define MP_MEM -2 /* out of mem */
|
||||
# define MP_VAL -3 /* invalid input */
|
||||
# define MP_ITER -4 /* maximum iterations reached */
|
||||
# define MP_BUF -5 /* buffer overflow, supplied buffer too small */
|
||||
typedef int mp_order;
|
||||
# define MP_LSB_FIRST -1
|
||||
# define MP_MSB_FIRST 1
|
||||
typedef int mp_endian;
|
||||
# define MP_LITTLE_ENDIAN -1
|
||||
# define MP_NATIVE_ENDIAN 0
|
||||
# define MP_BIG_ENDIAN 1
|
||||
typedef size_t mp_digit;
|
||||
typedef int mp_sign;
|
||||
# define MP_ZPOS 0 /* positive integer */
|
||||
# define MP_NEG 1 /* negative */
|
||||
typedef int mp_ord;
|
||||
# define MP_LT -1 /* less than */
|
||||
# define MP_EQ 0 /* equal to */
|
||||
# define MP_GT 1 /* greater than */
|
||||
typedef int mp_err;
|
||||
# define MP_OKAY 0 /* no error */
|
||||
# define MP_ERR -1 /* unknown error */
|
||||
# define MP_MEM -2 /* out of mem */
|
||||
# define MP_VAL -3 /* invalid input */
|
||||
# define MP_ITER -4 /* maximum iterations reached */
|
||||
# define MP_BUF -5 /* buffer overflow, supplied buffer too small */
|
||||
typedef int mp_order;
|
||||
# define MP_LSB_FIRST -1
|
||||
# define MP_MSB_FIRST 1
|
||||
typedef int mp_endian;
|
||||
# define MP_LITTLE_ENDIAN -1
|
||||
# define MP_NATIVE_ENDIAN 0
|
||||
# define MP_BIG_ENDIAN 1
|
||||
# define MP_DEPRECATED_PRAGMA(s) /* nothing */
|
||||
# define MP_WUR /* nothing */
|
||||
# define mp_iszero(a) ((a)->used == 0)
|
||||
# define mp_isneg(a) ((a)->sign != 0)
|
||||
# define MP_WUR /* nothing */
|
||||
# define mp_iszero(a) ((a)->used == 0)
|
||||
# define mp_isneg(a) ((a)->sign != 0)
|
||||
|
||||
/* the infamous mp_int structure */
|
||||
/* the infamous mp_int structure */
|
||||
# ifndef MP_INT_DECLARED
|
||||
# define MP_INT_DECLARED
|
||||
typedef struct mp_int mp_int;
|
||||
typedef struct mp_int mp_int;
|
||||
# endif
|
||||
struct mp_int {
|
||||
int used, alloc;
|
||||
mp_sign sign;
|
||||
mp_digit *dp;
|
||||
struct mp_int {
|
||||
int used, alloc;
|
||||
mp_sign sign;
|
||||
mp_digit *dp;
|
||||
};
|
||||
|
||||
#elif !defined(BN_H_) /* If BN_H_ already defined, don't try to include tommath.h again. */
|
||||
|
||||
+1
-1
@@ -33,7 +33,7 @@ extern Tcl_LibraryInitProc Tcltest_SafeInit;
|
||||
#endif /* TCL_TEST */
|
||||
|
||||
#ifdef TCL_XT_TEST
|
||||
extern void XtToolkitInitialize(void);
|
||||
extern void XtToolkitInitialize(void);
|
||||
extern Tcl_LibraryInitProc Tclxttest_Init;
|
||||
#endif /* TCL_XT_TEST */
|
||||
|
||||
|
||||
+16
-16
@@ -253,25 +253,25 @@ typedef struct {
|
||||
const void *lpszClassName;
|
||||
} WNDCLASSW;
|
||||
|
||||
extern void CloseHandle(void *);
|
||||
extern void *CreateEventW(void *, unsigned char, unsigned char,
|
||||
extern void CloseHandle(void *);
|
||||
extern void * CreateEventW(void *, unsigned char, unsigned char,
|
||||
void *);
|
||||
extern void *CreateWindowExW(void *, const void *, const void *,
|
||||
extern void * CreateWindowExW(void *, const void *, const void *,
|
||||
unsigned int, int, int, int, int, void *, void *,
|
||||
void *, void *);
|
||||
extern unsigned int DefWindowProcW(void *, int, void *, void *);
|
||||
extern unsigned char DestroyWindow(void *);
|
||||
extern int DispatchMessageW(const MSG *);
|
||||
extern unsigned char GetMessageW(MSG *, void *, int, int);
|
||||
extern void MsgWaitForMultipleObjects(unsigned int, void *,
|
||||
extern unsigned int DefWindowProcW(void *, int, void *, void *);
|
||||
extern unsigned char DestroyWindow(void *);
|
||||
extern int DispatchMessageW(const MSG *);
|
||||
extern unsigned char GetMessageW(MSG *, void *, int, int);
|
||||
extern void MsgWaitForMultipleObjects(unsigned int, void *,
|
||||
unsigned char, unsigned int, unsigned int);
|
||||
extern unsigned char PeekMessageW(MSG *, void *, int, int, int);
|
||||
extern unsigned char PostMessageW(void *, unsigned int, void *,
|
||||
void *);
|
||||
extern void PostQuitMessage(int);
|
||||
extern void *RegisterClassW(const WNDCLASSW *);
|
||||
extern unsigned char ResetEvent(void *);
|
||||
extern unsigned char TranslateMessage(const MSG *);
|
||||
extern unsigned char PeekMessageW(MSG *, void *, int, int, int);
|
||||
extern unsigned char PostMessageW(void *, unsigned int, void *,
|
||||
void *);
|
||||
extern void PostQuitMessage(int);
|
||||
extern void * RegisterClassW(const WNDCLASSW *);
|
||||
extern unsigned char ResetEvent(void *);
|
||||
extern unsigned char TranslateMessage(const MSG *);
|
||||
|
||||
/*
|
||||
* Threaded-cygwin specific constants and functions in this file:
|
||||
@@ -279,7 +279,7 @@ extern unsigned char TranslateMessage(const MSG *);
|
||||
|
||||
#if TCL_THREADS && defined(__CYGWIN__)
|
||||
static const WCHAR className[] = L"TclNotifier";
|
||||
static unsigned int NotifierProc(void *hwnd, unsigned int message,
|
||||
static unsigned int NotifierProc(void *hwnd, unsigned int message,
|
||||
void *wParam, void *lParam);
|
||||
#endif /* TCL_THREADS && defined(__CYGWIN__) */
|
||||
#ifdef __cplusplus
|
||||
|
||||
+1
-1
@@ -646,7 +646,7 @@ MODULE_SCOPE struct group * TclpGetGrGid(gid_t gid);
|
||||
MODULE_SCOPE struct hostent * TclpGetHostByName(const char *name);
|
||||
MODULE_SCOPE struct hostent * TclpGetHostByAddr(const char *addr,
|
||||
int length, int type);
|
||||
MODULE_SCOPE void *TclpMakeTcpClientChannelMode(
|
||||
MODULE_SCOPE void * TclpMakeTcpClientChannelMode(
|
||||
void *tcpSocket, int mode);
|
||||
|
||||
#endif /* _TCLUNIXPORT */
|
||||
|
||||
+2
-2
@@ -23,8 +23,8 @@
|
||||
#define GOT_BITS(var, bits) (((var) & (bits)) != 0)
|
||||
|
||||
/* "sock" + a pointer in hex + \0 */
|
||||
#define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1)
|
||||
#define SOCK_TEMPLATE "sock%" TCL_Z_MODIFIER "x"
|
||||
#define SOCK_CHAN_LENGTH (4 + sizeof(void *) * 2 + 1)
|
||||
#define SOCK_TEMPLATE "sock%" TCL_Z_MODIFIER "x"
|
||||
|
||||
#undef SOCKET /* Possible conflict with win32 SOCKET */
|
||||
|
||||
|
||||
+4
-4
@@ -2022,12 +2022,12 @@ AllocateConsoleHandleInfo(
|
||||
SetConsoleMode(consoleHandle, consoleMode);
|
||||
}
|
||||
handleInfoPtr->consoleThread = CreateThread(
|
||||
NULL, /* default security descriptor */
|
||||
NULL, /* default security descriptor */
|
||||
2*CONSOLE_BUFFER_SIZE, /* Stack size - gets rounded up to granularity */
|
||||
permissions == TCL_READABLE ? ConsoleReaderThread : ConsoleWriterThread,
|
||||
handleInfoPtr, /* Pass to thread */
|
||||
0, /* Flags - no special cases */
|
||||
NULL); /* Don't care about thread id */
|
||||
handleInfoPtr, /* Pass to thread */
|
||||
0, /* Flags - no special cases */
|
||||
NULL); /* Don't care about thread id */
|
||||
if (handleInfoPtr->consoleThread == NULL) {
|
||||
/* Note - SRWLock and condition variables do not need finalization */
|
||||
RingBufferClear(&handleInfoPtr->buffer);
|
||||
|
||||
+4
-4
@@ -16,9 +16,9 @@
|
||||
#include "tclFileSystem.h"
|
||||
#include <winioctl.h>
|
||||
#include <shlobj.h>
|
||||
#include <lm.h> /* For TclpGetUserHome(). */
|
||||
#include <lm.h> /* For TclpGetUserHome(). */
|
||||
#include <userenv.h> /* For TclpGetUserHome(). */
|
||||
#include <aclapi.h> /* For GetNamedSecurityInfo */
|
||||
#include <aclapi.h> /* For GetNamedSecurityInfo(). */
|
||||
#if defined (__clang__) && (__clang_major__ > 20)
|
||||
#pragma clang diagnostic ignored "-Wc++-keyword"
|
||||
#endif
|
||||
@@ -3360,13 +3360,13 @@ TclWinFileOwned(
|
||||
*/
|
||||
|
||||
if (secd) {
|
||||
LocalFree(secd); /* Also frees ownerSid */
|
||||
LocalFree(secd); /* Also frees ownerSid */
|
||||
}
|
||||
if (buf) {
|
||||
Tcl_Free(buf);
|
||||
}
|
||||
|
||||
return (owned != 0); /* Convert non-0 to 1 */
|
||||
return (owned != 0); /* Convert non-0 to 1 */
|
||||
}
|
||||
|
||||
/*
|
||||
|
||||
+4
-2
@@ -77,7 +77,8 @@ static ProcessGlobalValue sourceLibraryDir =
|
||||
* Results:
|
||||
* None.
|
||||
*/
|
||||
static BOOL CALLBACK TclpGetWindowsVersionOnce(
|
||||
static BOOL CALLBACK
|
||||
TclpGetWindowsVersionOnce(
|
||||
TCL_UNUSED(PINIT_ONCE),
|
||||
TCL_UNUSED(PVOID),
|
||||
PVOID *lpContext)
|
||||
@@ -113,7 +114,8 @@ static BOOL CALLBACK TclpGetWindowsVersionOnce(
|
||||
* Results:
|
||||
* Pointer to OSVERSIONINFOW structure.
|
||||
*/
|
||||
static const OSVERSIONINFOW *TclpGetWindowsVersion(void)
|
||||
static const OSVERSIONINFOW *
|
||||
TclpGetWindowsVersion(void)
|
||||
{
|
||||
static INIT_ONCE osInfoOnce = INIT_ONCE_STATIC_INIT;
|
||||
OSVERSIONINFOW *osInfoPtr = NULL;
|
||||
|
||||
+1
-1
@@ -34,7 +34,7 @@ MODULE_SCOPE int TclWinSymLinkCopyDirectory(const WCHAR *LinkOriginal,
|
||||
const WCHAR *LinkCopy);
|
||||
MODULE_SCOPE int TclWinSymLinkDelete(const WCHAR *LinkOriginal,
|
||||
int linkOnly);
|
||||
MODULE_SCOPE int TclWinFileOwned(Tcl_Obj *);
|
||||
MODULE_SCOPE int TclWinFileOwned(Tcl_Obj *);
|
||||
MODULE_SCOPE void TclWinGenerateChannelName(char channelName[],
|
||||
const char *channelTypeName, void *channelImpl);
|
||||
MODULE_SCOPE const char*TclpGetUserName(Tcl_DString *bufferPtr);
|
||||
|
||||
+1
-1
@@ -354,7 +354,7 @@ typedef DWORD_PTR * PDWORD_PTR;
|
||||
*/
|
||||
|
||||
#ifndef S_IFLNK
|
||||
# define S_IFLNK 0120000 /* Symbolic Link */
|
||||
# define S_IFLNK 0120000 /* Symbolic Link */
|
||||
#endif
|
||||
|
||||
/*
|
||||
|
||||
Reference in New Issue
Block a user