summaryrefslogtreecommitdiff
path: root/support/dktools/DkClockData.cpp
diff options
context:
space:
mode:
authorNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
committerNorbert Preining <norbert@preining.info>2020-09-20 03:03:26 +0000
commit1f457376b478257b88d4a857f5ec1b6155442dd7 (patch)
tree2a06a60551dea362cf8cb0cb0ba66c78608717c4 /support/dktools/DkClockData.cpp
parentac690ca29ad5bf8a5203a65fd6252f7b564f4727 (diff)
CTAN sync 202009200303
Diffstat (limited to 'support/dktools/DkClockData.cpp')
-rw-r--r--support/dktools/DkClockData.cpp51
1 files changed, 29 insertions, 22 deletions
diff --git a/support/dktools/DkClockData.cpp b/support/dktools/DkClockData.cpp
index e9c407dd42..53d10c12d3 100644
--- a/support/dktools/DkClockData.cpp
+++ b/support/dktools/DkClockData.cpp
@@ -1,5 +1,11 @@
/*
- WARNING: This file was generated by dkct.
+Copyright (C) 2017-2020, Dirk Krause
+SPDX-License-Identifier: BSD-3-Clause
+*/
+
+/*
+ WARNING: This file was generated by the dkct program (see
+ http://dktools.sourceforge.net/ for details).
Changes you make here will be lost if dkct is run again!
You should modify the original source and run dkct on it.
Original source: DkClockData.cpt
@@ -9,21 +15,22 @@
*/
-#line 85 "DkClockData.cpt"
+#line 88 "DkClockData.cpt"
+#include "dk3conf.h"
#include "wxdkclock.h"
-#line 90 "DkClockData.cpt"
+#line 94 "DkClockData.cpt"
DkClockData::DkClockData()
{
-#line 95 "DkClockData.cpt"
+#line 99 "DkClockData.cpt"
clvd.h = 0;
clvd.m = 0;
clvd.s = 0;
@@ -40,7 +47,7 @@ DkClockData::DkClockData()
tmCurrent.s = 0;
-#line 110 "DkClockData.cpt"
+#line 114 "DkClockData.cpt"
}
@@ -50,14 +57,14 @@ DkClockData::getData(clockview_data_t *dptr)
{
-#line 118 "DkClockData.cpt"
+#line 122 "DkClockData.cpt"
if(dptr) {
wxMutexLocker lock(mxProtectData);
dk3mem_cpy((void *)dptr, (void *)(&clvd), sizeof(clockview_data_t));
}
-#line 123 "DkClockData.cpt"
+#line 127 "DkClockData.cpt"
}
@@ -69,7 +76,7 @@ DkClockData::setTime(dk3_time_t *ct)
int back = 0;
-#line 133 "DkClockData.cpt"
+#line 137 "DkClockData.cpt"
if(dk3sf_localtime_app(&lct, ct, NULL)) {
wxMutexLocker lock(mxProtectData);
/*
@@ -115,7 +122,7 @@ DkClockData::setTime(dk3_time_t *ct)
clvd.a = ((1 == iAlertState) ? 1 : 0);
}
-#line 177 "DkClockData.cpt"
+#line 181 "DkClockData.cpt"
return back;
}
@@ -126,17 +133,17 @@ DkClockData::setAlert(bool flag, int hour, int min)
{
-#line 186 "DkClockData.cpt"
+#line 190 "DkClockData.cpt"
iAlertState = 0;
{
wxMutexLocker lock(mxProtectData);
if(flag) {
-#line 190 "DkClockData.cpt"
+#line 194 "DkClockData.cpt"
if((0 <= hour) && (23 >= hour) && (0 <= min) && (59 >= min)) {
iAlertEnabled = 1;
-#line 192 "DkClockData.cpt"
+#line 196 "DkClockData.cpt"
iAlertHour = hour;
iAlertMinute = min;
if(tmCurrent.h > hour) {
@@ -150,21 +157,21 @@ DkClockData::setAlert(bool flag, int hour, int min)
}
} else {
-#line 204 "DkClockData.cpt"
+#line 208 "DkClockData.cpt"
iAlertEnabled = 0;
iAlertHour = 0;
iAlertMinute = 0;
}
} else {
-#line 209 "DkClockData.cpt"
+#line 213 "DkClockData.cpt"
iAlertEnabled = 0;
iAlertHour = 0;
iAlertMinute = 0;
}
}
-#line 214 "DkClockData.cpt"
+#line 218 "DkClockData.cpt"
}
@@ -174,7 +181,7 @@ DkClockData::endAlert(void)
{
-#line 222 "DkClockData.cpt"
+#line 226 "DkClockData.cpt"
{
wxMutexLocker lock(mxProtectData);
if(1 == iAlertState) {
@@ -182,7 +189,7 @@ DkClockData::endAlert(void)
}
}
-#line 228 "DkClockData.cpt"
+#line 232 "DkClockData.cpt"
}
@@ -192,19 +199,19 @@ DkClockData::getAlertData(int *en, int *h, int *m)
{
-#line 236 "DkClockData.cpt"
+#line 240 "DkClockData.cpt"
if((en) && (h) && (m)) {
wxMutexLocker lock(mxProtectData);
*en = iAlertEnabled;
-#line 239 "DkClockData.cpt"
+#line 243 "DkClockData.cpt"
*h = iAlertHour;
-#line 240 "DkClockData.cpt"
+#line 244 "DkClockData.cpt"
*m = iAlertMinute;
-#line 241 "DkClockData.cpt"
+#line 245 "DkClockData.cpt"
}
-#line 242 "DkClockData.cpt"
+#line 246 "DkClockData.cpt"
}