summaryrefslogtreecommitdiffstats
path: root/generic/tclClockFmt.c
diff options
context:
space:
mode:
authorsebres <sebres@users.sourceforge.net>2024-05-07 20:47:37 (GMT)
committersebres <sebres@users.sourceforge.net>2024-05-07 20:47:37 (GMT)
commitb89beec96e04900aec600e7c2eeec7838ea0f785 (patch)
tree738ea3e10d1ba4f700156081e2f72ce66b481dcd /generic/tclClockFmt.c
parentaf3adb5c4aea58c1b39901f430c04ae61b39d5d6 (diff)
parent7eb7a346c38947ee1519c84274adf071762205fd (diff)
downloadtcl-b89beec96e04900aec600e7c2eeec7838ea0f785.zip
tcl-b89beec96e04900aec600e7c2eeec7838ea0f785.tar.gz
tcl-b89beec96e04900aec600e7c2eeec7838ea0f785.tar.bz2
merge 8.7
Diffstat (limited to 'generic/tclClockFmt.c')
-rw-r--r--generic/tclClockFmt.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/generic/tclClockFmt.c b/generic/tclClockFmt.c
index caab911..d4734d8 100644
--- a/generic/tclClockFmt.c
+++ b/generic/tclClockFmt.c
@@ -2295,13 +2295,12 @@ ClockGetOrParseScanFormat(
}
word_tok:
{
- ClockScanToken *wordTok = tok;
+ /* try continue with previous word token */
+ ClockScanToken *wordTok = tok - 1;
- if (tok > scnTok && (tok - 1)->map == &ScnWordTokenMap) {
- /* further with previous word token */
- wordTok = tok - 1;
- } else {
- /* new word token */
+ if (wordTok < scnTok || wordTok->map != &ScnWordTokenMap) {
+ /* start with new word token */
+ wordTok = tok;
wordTok->tokWord.start = p;
wordTok->map = &ScnWordTokenMap;
}
@@ -3339,11 +3338,12 @@ ClockGetOrParseFmtFormat(
default:
word_tok:
{
- ClockFormatToken *wordTok = tok;
+ /* try continue with previous word token */
+ ClockFormatToken *wordTok = tok - 1;
- if (tok > fmtTok && (tok - 1)->map == &FmtWordTokenMap) {
- wordTok = tok - 1;
- } else {
+ if (wordTok < fmtTok || wordTok->map != &FmtWordTokenMap) {
+ /* start with new word token */
+ wordTok = tok;
wordTok->tokWord.start = p;
wordTok->map = &FmtWordTokenMap;
}