summaryrefslogtreecommitdiffstats
path: root/generic/tclClock.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-22 21:12:15 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2024-05-22 21:12:15 (GMT)
commitdb098b8fd93fa7cbb4af72d00b2ecc51ec6e7ca8 (patch)
tree5461ded7b42aba8e661466f9819312e4dbf8f4f2 /generic/tclClock.c
parent75fbe030ae940e40f831f68ea1bda8cbda54d093 (diff)
downloadtcl-db098b8fd93fa7cbb4af72d00b2ecc51ec6e7ca8.zip
tcl-db098b8fd93fa7cbb4af72d00b2ecc51ec6e7ca8.tar.gz
tcl-db098b8fd93fa7cbb4af72d00b2ecc51ec6e7ca8.tar.bz2
clock option re-ordering
Diffstat (limited to 'generic/tclClock.c')
-rw-r--r--generic/tclClock.c37
1 files changed, 17 insertions, 20 deletions
diff --git a/generic/tclClock.c b/generic/tclClock.c
index c0fe59a..cbcacf2 100644
--- a/generic/tclClock.c
+++ b/generic/tclClock.c
@@ -83,8 +83,7 @@ static int ConvertLocalToUTCUsingTable(Tcl_Interp *,
Tcl_WideInt *rangesVal);
static int ConvertLocalToUTCUsingC(Tcl_Interp *,
TclDateFields *, int);
-static int ClockConfigureObjCmd(void *clientData,
- Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
+static Tcl_ObjCmdProc ClockConfigureObjCmd;
static void GetYearWeekDay(TclDateFields *, int);
static void GetGregorianEraYearDay(TclDateFields *, int);
static void GetMonthDay(TclDateFields *);
@@ -941,7 +940,8 @@ TimezoneLoaded(
*
* ClockConfigureObjCmd --
*
- * This function is invoked to process the Tcl "::clock::configure" (internal) command.
+ * This function is invoked to process the Tcl "::tcl::unsupported::clock::configure"
+ * (internal, unsupported) command.
*
* Usage:
* ::tcl::unsupported::clock::configure ?-option ?value??
@@ -964,19 +964,16 @@ ClockConfigureObjCmd(
{
ClockClientData *dataPtr = (ClockClientData *)clientData;
static const char *const options[] = {
- "-system-tz", "-setup-tz", "-default-locale", "-current-locale",
- "-clear",
+ "-default-locale", "-clear", "-current-locale",
"-year-century", "-century-switch",
"-min-year", "-max-year", "-max-jdn", "-validate",
- "-init-complete",
- NULL
+ "-init-complete", "-setup-tz", "-system-tz", NULL
};
enum optionInd {
- CLOCK_SYSTEM_TZ, CLOCK_SETUP_TZ, CLOCK_DEFAULT_LOCALE, CLOCK_CURRENT_LOCALE,
- CLOCK_CLEAR_CACHE,
+ CLOCK_DEFAULT_LOCALE, CLOCK_CLEAR_CACHE, CLOCK_CURRENT_LOCALE,
CLOCK_YEAR_CENTURY, CLOCK_CENTURY_SWITCH,
CLOCK_MIN_YEAR, CLOCK_MAX_YEAR, CLOCK_MAX_JDN, CLOCK_VALIDATE,
- CLOCK_INIT_COMPLETE
+ CLOCK_INIT_COMPLETE, CLOCK_SETUP_TZ, CLOCK_SYSTEM_TZ
};
int optionIndex; /* Index of an option. */
Tcl_Size i;
@@ -4571,16 +4568,16 @@ ClockSafeCatchCmd(
Tcl_Obj *const objv[])
{
typedef struct {
- int status; /* return code status */
- int flags; /* Each remaining field saves the */
- int returnLevel; /* corresponding field of the Interp */
- int returnCode; /* struct. These fields taken together are */
- Tcl_Obj *errorInfo; /* the "state" of the interp. */
- Tcl_Obj *errorCode;
- Tcl_Obj *returnOpts;
- Tcl_Obj *objResult;
- Tcl_Obj *errorStack;
- int resetErrorStack;
+ int status; /* return code status */
+ int flags; /* Each remaining field saves the */
+ int returnLevel; /* corresponding field of the Interp */
+ int returnCode; /* struct. These fields taken together are */
+ Tcl_Obj *errorInfo; /* the "state" of the interp. */
+ Tcl_Obj *errorCode;
+ Tcl_Obj *returnOpts;
+ Tcl_Obj *objResult;
+ Tcl_Obj *errorStack;
+ int resetErrorStack;
} InterpState;
Interp *iPtr = (Interp *)interp;