diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-08-02 23:08:00 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2018-08-02 23:08:00 (GMT) |
commit | 1bc2496e012681e5f83cbe757b04d58c57083b07 (patch) | |
tree | 233f9fd3e29f2b9fb6280ac50e8f2e251e08c7bf /generic | |
parent | 6042bb0be18a7102155afc95163120cb6b2a35ea (diff) | |
parent | 40947c7d3eeb124dfd51a08dbdfc556a7a402bd6 (diff) | |
download | tcl-1bc2496e012681e5f83cbe757b04d58c57083b07.zip tcl-1bc2496e012681e5f83cbe757b04d58c57083b07.tar.gz tcl-1bc2496e012681e5f83cbe757b04d58c57083b07.tar.bz2 |
Merge 8.7
Diffstat (limited to 'generic')
-rw-r--r-- | generic/tclAssembly.c | 2 | ||||
-rw-r--r-- | generic/tclCmdIL.c | 4 | ||||
-rw-r--r-- | generic/tclCompCmdsGR.c | 4 | ||||
-rw-r--r-- | generic/tclCompCmdsSZ.c | 14 | ||||
-rw-r--r-- | generic/tclOOInt.h | 2 | ||||
-rw-r--r-- | generic/tclPkg.c | 2 | ||||
-rw-r--r-- | generic/tclProcess.c | 70 | ||||
-rw-r--r-- | generic/tclStringObj.c | 8 | ||||
-rw-r--r-- | generic/tclUtil.c | 10 |
9 files changed, 58 insertions, 58 deletions
diff --git a/generic/tclAssembly.c b/generic/tclAssembly.c index f990852..e054b73 100644 --- a/generic/tclAssembly.c +++ b/generic/tclAssembly.c @@ -2251,7 +2251,7 @@ GetListIndexOperand( if (GetNextOperand(assemEnvPtr, tokenPtrPtr, &value) != TCL_OK) { return TCL_ERROR; } - + /* Convert to an integer, advance to the next token and return. */ /* * NOTE: Indexing a list with an index before it yields the diff --git a/generic/tclCmdIL.c b/generic/tclCmdIL.c index 2eb089a..582761e 100644 --- a/generic/tclCmdIL.c +++ b/generic/tclCmdIL.c @@ -3333,7 +3333,7 @@ Tcl_LsearchObjCmd( * sense in doing this when the match sense is inverted. */ - /* + /* * With -stride, lower, upper and i are kept as multiples of groupSize. */ @@ -4015,7 +4015,7 @@ Tcl_LsortObjCmd( /* * Do not shrink the actual memory block used; that doesn't * work with TclStackAlloc-allocated memory. [Bug 2918962] - * + * * TODO: Consider a pointer increment to replace this * array shift. */ diff --git a/generic/tclCompCmdsGR.c b/generic/tclCompCmdsGR.c index 858a0c5..1209caf 100644 --- a/generic/tclCompCmdsGR.c +++ b/generic/tclCompCmdsGR.c @@ -34,7 +34,7 @@ static int IndexTailVarIfKnown(Tcl_Interp *interp, * TclGetIndexFromToken -- * * Parse a token to determine if an index value is known at - * compile time. + * compile time. * * Returns: * TCL_OK if parsing succeeded, and TCL_ERROR if it failed. @@ -1553,7 +1553,7 @@ TclCompileLreplaceCmd( emptyPrefix = 0; } - + /* * [lreplace] raises an error when idx1 points after the list, but * only when the list is not empty. This is maximum stupidity. diff --git a/generic/tclCompCmdsSZ.c b/generic/tclCompCmdsSZ.c index cf088bb..9434e54 100644 --- a/generic/tclCompCmdsSZ.c +++ b/generic/tclCompCmdsSZ.c @@ -1002,13 +1002,13 @@ TclCompileStringReplaceCmd( if (parsePtr->numWords < 4 || parsePtr->numWords > 5) { return TCL_ERROR; } - + /* Bytecode to compute/push string argument being replaced */ valueTokenPtr = TokenAfter(parsePtr->tokenPtr); CompileWord(envPtr, valueTokenPtr, interp, 1); /* - * Check for first index known and useful at compile time. + * Check for first index known and useful at compile time. */ tokenPtr = TokenAfter(valueTokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, @@ -1017,7 +1017,7 @@ TclCompileStringReplaceCmd( } /* - * Check for last index known and useful at compile time. + * Check for last index known and useful at compile time. */ tokenPtr = TokenAfter(tokenPtr); if (TclGetIndexFromToken(tokenPtr, TCL_INDEX_BEFORE, TCL_INDEX_AFTER, @@ -1025,7 +1025,7 @@ TclCompileStringReplaceCmd( goto genericReplace; } - /* + /* * [string replace] is an odd bird. For many arguments it is * a conventional substring replacer. However it also goes out * of its way to become a no-op for many cases where it would be @@ -1108,12 +1108,12 @@ TclCompileStringReplaceCmd( * Finally we need, third: * * (first <= last) - * + * * Considered in combination with the constraints we already have, * we see that we can proceed when (first == TCL_INDEX_BEFORE) * or (last == TCL_INDEX_AFTER). These also permit simplification * of the prefix|replace|suffix construction. The other constraints, - * though, interfere with getting a guarantee that first <= last. + * though, interfere with getting a guarantee that first <= last. */ if ((first == TCL_INDEX_BEFORE) && (last >= TCL_INDEX_START)) { @@ -1141,7 +1141,7 @@ TclCompileStringReplaceCmd( /* FLOW THROUGH TO genericReplace */ } else { - /* + /* * When we have no replacement string to worry about, we may * have more luck, because the forbidden empty string replacements * are harmless when they are replaced by another empty string. diff --git a/generic/tclOOInt.h b/generic/tclOOInt.h index a43ab76..acbd2c5 100644 --- a/generic/tclOOInt.h +++ b/generic/tclOOInt.h @@ -597,7 +597,7 @@ MODULE_SCOPE void TclOOSetupVariableResolver(Tcl_Namespace *nsPtr); #define FOREACH(var,ary) \ for(i=0 ; i<(ary).num; i++) if ((ary).list[i] == NULL) { \ continue; \ - } else if (var = (ary).list[i], 1) + } else if (var = (ary).list[i], 1) /* * A variation where the array is an array of structs. There's no issue with diff --git a/generic/tclPkg.c b/generic/tclPkg.c index cad04ee..0c726c2 100644 --- a/generic/tclPkg.c +++ b/generic/tclPkg.c @@ -577,7 +577,7 @@ SelectPackage(ClientData data[], Tcl_Interp *interp, int result) { PkgAvail *availPtr, *bestPtr, *bestStablePtr; char *availVersion, *bestVersion, *bestStableVersion; /* Internal rep. of versions */ - int availStable, satisfies; + int availStable, satisfies; Require *reqPtr = data[0]; int reqc = PTR2INT(data[1]); Tcl_Obj **const reqv = data[2]; diff --git a/generic/tclProcess.c b/generic/tclProcess.c index 604b7ce..a781386 100644 --- a/generic/tclProcess.c +++ b/generic/tclProcess.c @@ -1,7 +1,7 @@ /* * tclProcess.c -- * - * This file implements the "tcl::process" ensemble for subprocess + * This file implements the "tcl::process" ensemble for subprocess * management as defined by TIP #462. * * Copyright (c) 2017 Frederic Bonnet. @@ -13,14 +13,14 @@ #include "tclInt.h" /* - * Autopurge flag. Process-global because of the way Tcl manages child + * Autopurge flag. Process-global because of the way Tcl manages child * processes (see tclPipe.c). */ static int autopurge = 1; /* Autopurge flag. */ /* - * Hash tables that keeps track of all child process statuses. Keys are the + * Hash tables that keeps track of all child process statuses. Keys are the * child process ids and resolved pids, values are (ProcessInfo *). */ @@ -29,7 +29,7 @@ typedef struct ProcessInfo { int resolvedPid; /* Resolved process id. */ int purge; /* Purge eventualy. */ TclProcessWaitStatus status;/* Process status. */ - int code; /* Error code, exit status or signal + int code; /* Error code, exit status or signal number. */ Tcl_Obj *msg; /* Error message. */ Tcl_Obj *error; /* Error code. */ @@ -47,7 +47,7 @@ static void InitProcessInfo(ProcessInfo *info, Tcl_Pid pid, int resolvedPid); static void FreeProcessInfo(ProcessInfo *info); static int RefreshProcessInfo(ProcessInfo *info, int options); -static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, int resolvedPid, +static TclProcessWaitStatus WaitProcessStatus(Tcl_Pid pid, int resolvedPid, int options, int *codePtr, Tcl_Obj **msgPtr, Tcl_Obj **errorObjPtr); static Tcl_Obj * BuildProcessStatusObj(ProcessInfo *info); @@ -160,7 +160,7 @@ RefreshProcessInfo( * Refresh & store status. */ - info->status = WaitProcessStatus(info->pid, info->resolvedPid, + info->status = WaitProcessStatus(info->pid, info->resolvedPid, options, &info->code, &info->msg, &info->error); if (info->msg) Tcl_IncrRefCount(info->msg); if (info->error) Tcl_IncrRefCount(info->error); @@ -214,7 +214,7 @@ WaitProcessStatus( /* * No change. */ - + return TCL_PROCESS_UNCHANGED; } @@ -370,7 +370,7 @@ BuildProcessStatusObj( /* * Normal exit, return TCL_OK. */ - + return Tcl_NewIntObj(TCL_OK); } @@ -388,7 +388,7 @@ BuildProcessStatusObj( * * ProcessListObjCmd -- * - * This function implements the 'tcl::process list' Tcl command. + * This function implements the 'tcl::process list' Tcl command. * Refer to the user documentation for details on what it does. * * Results: @@ -423,10 +423,10 @@ ProcessListObjCmd( list = Tcl_NewListObj(0, NULL); Tcl_MutexLock(&infoTablesMutex); - for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); + for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); - Tcl_ListObjAppendElement(interp, list, + Tcl_ListObjAppendElement(interp, list, Tcl_NewIntObj(info->resolvedPid)); } Tcl_MutexUnlock(&infoTablesMutex); @@ -438,7 +438,7 @@ ProcessListObjCmd( * * ProcessStatusObjCmd -- * - * This function implements the 'tcl::process status' Tcl command. + * This function implements the 'tcl::process status' Tcl command. * Refer to the user documentation for details on what it does. * * Results: @@ -504,7 +504,7 @@ ProcessStatusObjCmd( dict = Tcl_NewDictObj(); Tcl_MutexLock(&infoTablesMutex); - for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); + for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); RefreshProcessInfo(info, options); @@ -513,7 +513,7 @@ ProcessStatusObjCmd( /* * Purge entry. */ - + Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); @@ -523,7 +523,7 @@ ProcessStatusObjCmd( * Add to result. */ - Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), + Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), BuildProcessStatusObj(info)); } } @@ -532,7 +532,7 @@ ProcessStatusObjCmd( /* * Only return statuses of provided processes. */ - + result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs); if (result != TCL_OK) { return result; @@ -552,10 +552,10 @@ ProcessStatusObjCmd( /* * Skip unknown process. */ - + continue; } - + info = (ProcessInfo *) Tcl_GetHashValue(entry); RefreshProcessInfo(info, options); @@ -563,7 +563,7 @@ ProcessStatusObjCmd( /* * Purge entry. */ - + Tcl_DeleteHashEntry(entry); entry = Tcl_FindHashEntry(&infoTablePerPid, info->pid); Tcl_DeleteHashEntry(entry); @@ -573,7 +573,7 @@ ProcessStatusObjCmd( * Add to result. */ - Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), + Tcl_DictObjPut(interp, dict, Tcl_NewIntObj(info->resolvedPid), BuildProcessStatusObj(info)); } } @@ -587,7 +587,7 @@ ProcessStatusObjCmd( * * ProcessPurgeObjCmd -- * - * This function implements the 'tcl::process purge' Tcl command. + * This function implements the 'tcl::process purge' Tcl command. * Refer to the user documentation for details on what it does. * * Results: @@ -632,7 +632,7 @@ ProcessPurgeObjCmd( */ Tcl_MutexLock(&infoTablesMutex); - for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); + for (entry = Tcl_FirstHashEntry(&infoTablePerResolvedPid, &search); entry != NULL; entry = Tcl_NextHashEntry(&search)) { info = (ProcessInfo *) Tcl_GetHashValue(entry); if (info->purge) { @@ -647,7 +647,7 @@ ProcessPurgeObjCmd( /* * Purge only provided processes. */ - + result = Tcl_ListObjGetElements(interp, objv[1], &numPids, &pidObjs); if (result != TCL_OK) { return result; @@ -665,7 +665,7 @@ ProcessPurgeObjCmd( /* * Skip unknown process. */ - + continue; } @@ -687,7 +687,7 @@ ProcessPurgeObjCmd( * * ProcessAutopurgeObjCmd -- * - * This function implements the 'tcl::process autopurge' Tcl command. + * This function implements the 'tcl::process autopurge' Tcl command. * Refer to the user documentation for details on what it does. * * Results: @@ -715,7 +715,7 @@ ProcessAutopurgeObjCmd( /* * Set given value. */ - + int flag; int result = Tcl_GetBooleanFromObj(interp, objv[1], &flag); if (result != TCL_OK) { @@ -725,8 +725,8 @@ ProcessAutopurgeObjCmd( autopurge = !!flag; } - /* - * Return current value. + /* + * Return current value. */ Tcl_SetObjResult(interp, Tcl_NewBooleanObj(autopurge)); @@ -821,9 +821,9 @@ TclProcessCreated( /* * Pid was reused, free old info and reuse structure. */ - + info = (ProcessInfo *) Tcl_GetHashValue(entry); - entry2 = Tcl_FindHashEntry(&infoTablePerResolvedPid, + entry2 = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(resolvedPid)); if (entry2) Tcl_DeleteHashEntry(entry2); FreeProcessInfo(info); @@ -893,8 +893,8 @@ TclProcessWait( /* * Unknown process, just call WaitProcessStatus and return. */ - - result = WaitProcessStatus(pid, TclpGetPid(pid), options, codePtr, + + result = WaitProcessStatus(pid, TclpGetPid(pid), options, codePtr, msgObjPtr, errorObjPtr); if (msgObjPtr && *msgObjPtr) Tcl_IncrRefCount(*msgObjPtr); if (errorObjPtr && *errorObjPtr) Tcl_IncrRefCount(*errorObjPtr); @@ -909,7 +909,7 @@ TclProcessWait( * so report no change. */ Tcl_MutexUnlock(&infoTablesMutex); - + return TCL_PROCESS_UNCHANGED; } @@ -919,7 +919,7 @@ TclProcessWait( * No change, stop there. */ Tcl_MutexUnlock(&infoTablesMutex); - + return TCL_PROCESS_UNCHANGED; } @@ -940,7 +940,7 @@ TclProcessWait( */ Tcl_DeleteHashEntry(entry); - entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, + entry = Tcl_FindHashEntry(&infoTablePerResolvedPid, INT2PTR(info->resolvedPid)); Tcl_DeleteHashEntry(entry); FreeProcessInfo(info); diff --git a/generic/tclStringObj.c b/generic/tclStringObj.c index 7d8e736..38e0c13 100644 --- a/generic/tclStringObj.c +++ b/generic/tclStringObj.c @@ -490,7 +490,7 @@ TclCheckEmptyString( Tcl_DictObjSize(NULL, objPtr, &length); return length == 0; } - + if (objPtr->bytes == NULL) { return TCL_EMPTYSTRING_UNKNOWN; } @@ -3509,7 +3509,7 @@ TclStringFirst( start = 0; } if (ln == 0) { - /* We don't find empty substrings. Bizarre! + /* We don't find empty substrings. Bizarre! * Whenever this routine is turned into a proper substring * finder, change to `return start` after limits imposed. */ return -1; @@ -3906,7 +3906,7 @@ TclStringReplace( result = Tcl_NewByteArrayObj(NULL, numBytes - count + newBytes); /* PANIC? */ Tcl_SetByteArrayLength(result, 0); - TclAppendBytesToByteArray(result, bytes, first); + TclAppendBytesToByteArray(result, bytes, first); TclAppendBytesToByteArray(result, iBytes, newBytes); TclAppendBytesToByteArray(result, bytes + first + count, numBytes - count - first); @@ -3928,7 +3928,7 @@ TclStringReplace( Tcl_UniChar *ustring = Tcl_GetUnicodeFromObj(objPtr, &numChars); /* TODO: Is there an in-place option worth pursuing here? */ - + result = Tcl_NewUnicodeObj(ustring, first); if (insertPtr) { Tcl_AppendObjToObj(result, insertPtr); diff --git a/generic/tclUtil.c b/generic/tclUtil.c index 9b0a8b1..395d1bf 100644 --- a/generic/tclUtil.c +++ b/generic/tclUtil.c @@ -113,7 +113,7 @@ static int FindElement(Tcl_Interp *interp, const char *string, /* * The following is the Tcl object type definition for an object that * represents a list index in the form, "end-offset". It is used as a - * performance optimization in TclGetIntForIndex. The internal rep is + * performance optimization in TclGetIntForIndex. The internal rep is * stored directly in the wideValue, so no memory management is required * for it. This is a caching intrep, keeping the result of a parse * around. This type is only created from a pre-existing string, so an @@ -1630,7 +1630,7 @@ UtfWellFormedEnd( if (Tcl_UtfCharComplete(p, l - p)) { return bytes; } - /* + /* * Malformed utf-8 end, be sure we've NTS to safe compare of end-character, * avoid segfault by access violation out of range. */ @@ -3542,7 +3542,7 @@ GetEndOffsetFromObj( return TCL_OK; } - + /* *---------------------------------------------------------------------- * @@ -3725,12 +3725,12 @@ TclIndexEncode( /* usual case, the absolute index value encodes itself */ } else if (TCL_OK == GetEndOffsetFromObj(objPtr, 0, &idx)) { /* - * We parsed an end+offset index value. + * We parsed an end+offset index value. * idx holds the offset value in the range INT_MIN...INT_MAX. */ if (idx > 0) { /* - * All end+postive or end-negative expressions + * All end+postive or end-negative expressions * always indicate "after the end". */ idx = after; |