summaryrefslogtreecommitdiffstats
path: root/generic
diff options
context:
space:
mode:
Diffstat (limited to 'generic')
-rw-r--r--generic/tclClock.c20
-rw-r--r--generic/tclZipfs.c4
2 files changed, 15 insertions, 9 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index 4261832..ec7e80d 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -3417,16 +3417,18 @@ ClockParseFmtScnArgs(
if (opts->baseObj != NULL) {
Tcl_Obj *baseObj = opts->baseObj;
- /* bypass integer recognition if looks like option "-now" */
- if ((baseObj->bytes && baseObj->length == 4 && baseObj->bytes[1] == 'n')
+ /* bypass integer recognition if looks like "now" or "-now" */
+ if ((baseObj->bytes &&
+ ((baseObj->length == 3 && baseObj->bytes[0] == 'n') ||
+ (baseObj->length == 4 && baseObj->bytes[1] == 'n')))
|| TclGetWideIntFromObj(NULL, baseObj, &baseVal) != TCL_OK) {
- /* we accept "-now" as current date-time */
+ /* we accept "now" and "-now" as current date-time */
static const char *const nowOpts[] = {
- "-now", NULL
+ "now", "-now", NULL
};
int idx;
- if (Tcl_GetIndexFromObj(interp, baseObj, nowOpts, "seconds",
+ if (Tcl_GetIndexFromObj(NULL, baseObj, nowOpts, "seconds",
TCL_EXACT, &idx) == TCL_OK) {
goto baseNow;
}
@@ -3435,7 +3437,9 @@ ClockParseFmtScnArgs(
goto baseOverflow;
}
- Tcl_AppendResult(interp, " or integer", (char *)NULL);
+ Tcl_SetObjResult(interp, Tcl_ObjPrintf(
+ "bad seconds \"%s\": must be now or integer",
+ TclGetString(baseObj)));
i = baseIdx;
goto badOption;
}
@@ -3527,7 +3531,7 @@ ClockFormatObjCmd(
Tcl_Obj *const objv[]) /* Parameter values */
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
- static const char *syntax = "clock format clockval|-now "
+ static const char *syntax = "clock format clockval|now "
"?-format string? "
"?-gmt boolean? "
"?-locale LOCALE? ?-timezone ZONE?";
@@ -4358,7 +4362,7 @@ ClockAddObjCmd(
int objc, /* Parameter count */
Tcl_Obj *const objv[]) /* Parameter values */
{
- static const char *syntax = "clock add clockval|-now ?number units?..."
+ static const char *syntax = "clock add clockval|now ?number units?..."
"?-gmt boolean? "
"?-locale LOCALE? ?-timezone ZONE?";
ClockClientData *dataPtr = (ClockClientData *)clientData;
diff --git a/generic/tclZipfs.c b/generic/tclZipfs.c
index 103c343..b72abfc 100644
--- a/generic/tclZipfs.c
+++ b/generic/tclZipfs.c
@@ -6218,7 +6218,9 @@ TclZipfs_Init(
"namespace eval ::tcl::zipfs {}\n"
"proc ::tcl::zipfs::Find dir {\n"
" set result {}\n"
- " if {[catch {glob -directory $dir -nocomplain * .*} list]} {\n"
+ " if {[catch {\n"
+ " concat [glob -directory $dir -nocomplain *] [glob -directory $dir -types hidden -nocomplain *]\n"
+ " } list]} {\n"
" return $result\n"
" }\n"
" foreach file $list {\n"