AmendHub

vkoskiv

/

MacNTP

/

amendments

/

ShowInitIcon.c

Amendments on September 13, 2023

Implement a very rough first-pass control panel + fallback option

I honestly thought that the cdev would be the easy part, but the API
is quite weird, and I've had tons of issues just getting text boxes
to work as expected.
It now works just enough to edit the STR resources we use to store
settings. There is no validation yet, that will come later.
There are now two NTP urls, the fallback URL will be tried if the
primary one returns a DNS resolve error.
vkoskiv made amendment 16 12 months ago

Amendments on September 9, 2023

Purge resources when done to save 8K of system heap

We now no longer need to persist our resources in the system heap for
later trap access, so we now let the system purge them after MacNTP
has run. This saves 8K of system heap.
If MacNTP did end up updating the clock, it sets up the MacTCP driver,
which stays resident in the system heap until the next reboot, bloating
the system heap by 16K. Nothing we can do about that, AFAIK.
I also yanked out two globals we no longer need.
vkoskiv made amendment 15 12 months ago

Amendments on September 8, 2023

Show icon on startup and remove InitGraf trap

Earlier, I thought that I had to run the NTP querying code in a trap
instead of the main INIT invocation, but I now found that not to be
true. This simplifies main.c quite a bit.
I also fetched a copy of ShowInitIcon, fixed it up a bit, and now we
show the MacNTP icon on startup.
The icon has 3 variants: Pending, Success and Failure.
We initially show the pending variant, and then swap to one of the
other two depending on the result of the NTP query.
vkoskiv made amendment 14 about 1 year ago