From 932835c1ebe010e7c12090fc2a09d00170c641ba Mon Sep 17 00:00:00 2001 From: sebres Date: Tue, 30 Jun 2020 11:59:48 +0000 Subject: doc/clock.n: clearer form explaininng format groups on output --- doc/clock.n | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/doc/clock.n b/doc/clock.n index 0460a54..b2d53ed 100644 --- a/doc/clock.n +++ b/doc/clock.n @@ -448,36 +448,36 @@ The following format groups are recognized by the \fBclock scan\fR and \fBclock format\fR commands. .TP \fB%a\fR -On output, receives an abbreviation (\fIe.g.,\fR \fBMon\fR) for the day +On output, produces an abbreviation (\fIe.g.,\fR \fBMon\fR) for the day of the week in the given locale. On input, matches the name of the day of the week in the given locale (in either abbreviated or full form, or any unique prefix of either form). .TP \fB%A\fR -On output, receives the full name (\fIe.g.,\fR \fBMonday\fR) of the day +On output, produces the full name (\fIe.g.,\fR \fBMonday\fR) of the day of the week in the given locale. On input, matches the name of the day of the week in the given locale (in either abbreviated or full form, or any unique prefix of either form). .TP \fB%b\fR -On output, receives an abbreviation (\fIe.g.,\fR \fBJan\fR) for the name +On output, produces an abbreviation (\fIe.g.,\fR \fBJan\fR) for the name of the month in the given locale. On input, matches the name of the month in the given locale (in either abbreviated or full form, or any unique prefix of either form). .TP \fB%B\fR -On output, receives the full name (\fIe.g.,\fR \fBJanuary\fR) +On output, produces the full name (\fIe.g.,\fR \fBJanuary\fR) of the month in the given locale. On input, matches the name of the month in the given locale (in either abbreviated or full form, or any unique prefix of either form). .TP \fB%c\fR -On output, receives a localized representation of date and time of day; +On output, produces a localized representation of date and time of day; the localized representation is expected to use the Gregorian calendar. On input, matches whatever \fB%c\fR produces. .TP \fB%C\fR -On output, receives the number of the century in Indo-Arabic numerals. +On output, produces the number of the century in Indo-Arabic numerals. On input, matches one or two digits, possibly with leading whitespace, that are expected to be the number of the century. .TP -- cgit v0.12 From 565b9dca95a5103374909c089697e655748cc932 Mon Sep 17 00:00:00 2001 From: sebres Date: Thu, 16 Jul 2020 15:34:57 +0000 Subject: cherry pick [df5f1e8652]: Fix [5bbd044812]: Fix index underflow. --- generic/tclFileName.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/generic/tclFileName.c b/generic/tclFileName.c index a8360fc..be1fdfa 100644 --- a/generic/tclFileName.c +++ b/generic/tclFileName.c @@ -2432,7 +2432,7 @@ DoGlob( int len; const char *joined = Tcl_GetStringFromObj(joinedPtr,&len); - if (strchr(separators, joined[len-1]) == NULL) { + if ((len > 0) && (strchr(separators, joined[len-1]) == NULL)) { Tcl_AppendToObj(joinedPtr, "/", 1); } } @@ -2469,7 +2469,7 @@ DoGlob( int len; const char *joined = Tcl_GetStringFromObj(joinedPtr,&len); - if (strchr(separators, joined[len-1]) == NULL) { + if ((len > 0) && (strchr(separators, joined[len-1]) == NULL)) { if (Tcl_FSGetPathType(pathPtr) != TCL_PATH_VOLUME_RELATIVE) { Tcl_AppendToObj(joinedPtr, "/", 1); } -- cgit v0.12 From 56e784cb1b7a6e78689cfa75df0e0dbaf51657d0 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Fri, 17 Jul 2020 11:11:47 +0000 Subject: Doc/internal variable tweaks --- doc/CrtAlias.3 | 8 ++++---- generic/tclInterp.c | 10 +++++----- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/doc/CrtAlias.3 b/doc/CrtAlias.3 index 72912bc..82ef122 100644 --- a/doc/CrtAlias.3 +++ b/doc/CrtAlias.3 @@ -158,12 +158,12 @@ If no such slave interpreter exists, \fBNULL\fR is returned. \fIinterp\fR. If \fIinterp\fR has no master (it is a top-level interpreter) then \fBNULL\fR is returned. .PP -\fBTcl_GetInterpPath\fR stores in the result of \fIaskingInterp\fR -the relative path between \fIaskingInterp\fR and \fIslaveInterp\fR; -\fIslaveInterp\fR must be a slave of \fIaskingInterp\fR. If the computation +\fBTcl_GetInterpPath\fR stores in the result of \fIinterp\fR +the relative path between \fIinterp\fR and \fIslaveInterp\fR; +\fIslaveInterp\fR must be a slave of \fIinterp\fR. If the computation of the relative path succeeds, \fBTCL_OK\fR is returned, else \fBTCL_ERROR\fR is returned and an error message is stored as the -result of \fIaskingInterp\fR. +result of \fIinterp\fR. .PP \fBTcl_CreateAlias\fR creates a command named \fIslaveCmd\fR in \fIslaveInterp\fR that when invoked, will cause the command \fItargetCmd\fR diff --git a/generic/tclInterp.c b/generic/tclInterp.c index ac66324..95c68ee 100644 --- a/generic/tclInterp.c +++ b/generic/tclInterp.c @@ -2169,23 +2169,23 @@ TclSetSlaveCancelFlags( int Tcl_GetInterpPath( - Tcl_Interp *askingInterp, /* Interpreter to start search from. */ + Tcl_Interp *interp, /* Interpreter to start search from. */ Tcl_Interp *targetInterp) /* Interpreter to find. */ { InterpInfo *iiPtr; - if (targetInterp == askingInterp) { - Tcl_SetObjResult(askingInterp, Tcl_NewObj()); + if (targetInterp == interp) { + Tcl_SetObjResult(interp, Tcl_NewObj()); return TCL_OK; } if (targetInterp == NULL) { return TCL_ERROR; } iiPtr = (InterpInfo *) ((Interp *) targetInterp)->interpInfo; - if (Tcl_GetInterpPath(askingInterp, iiPtr->slave.masterInterp) != TCL_OK){ + if (Tcl_GetInterpPath(interp, iiPtr->slave.masterInterp) != TCL_OK){ return TCL_ERROR; } - Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(askingInterp), + Tcl_ListObjAppendElement(NULL, Tcl_GetObjResult(interp), Tcl_NewStringObj(Tcl_GetHashKey(&iiPtr->master.slaveTable, iiPtr->slave.slaveEntryPtr), -1)); return TCL_OK; -- cgit v0.12